|
|
|
|
@ -145,87 +145,6 @@
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</block>
|
|
|
|
|
<!-- <u-row gutter="16">
|
|
|
|
|
<u-col span="12">
|
|
|
|
|
<view>
|
|
|
|
|
活动信息:
|
|
|
|
|
</view>
|
|
|
|
|
</u-col>
|
|
|
|
|
<u-col span="4">
|
|
|
|
|
<view>
|
|
|
|
|
<image mode="heightFix" src="../../static/icon_shijian@2x.png"></image>
|
|
|
|
|
开始时间:
|
|
|
|
|
</view>
|
|
|
|
|
</u-col>
|
|
|
|
|
<u-col span="8" v-if="info.start_date">
|
|
|
|
|
<view>{{$u.timeFormat(new Date(info.start_date.replace(/-/g,'/')), 'yyyy年mm月dd日')}} {{info.start_time}}</view>
|
|
|
|
|
</u-col>
|
|
|
|
|
<u-col span="4">
|
|
|
|
|
<view>
|
|
|
|
|
<image mode="heightFix" src="../../static/icon_shijian@2x.png"></image>
|
|
|
|
|
结束时间:
|
|
|
|
|
</view>
|
|
|
|
|
</u-col>
|
|
|
|
|
<u-col span="8" v-if="info.start_date">
|
|
|
|
|
<view>{{$u.timeFormat(new Date(info.end_date), 'yyyy年mm月dd日')}} {{info.end_time}}</view>
|
|
|
|
|
</u-col>
|
|
|
|
|
<u-col span="4">
|
|
|
|
|
<view>
|
|
|
|
|
<image mode="heightFix" src="../../static/icon_dizhi.png"></image>
|
|
|
|
|
活动地点:
|
|
|
|
|
</view>
|
|
|
|
|
</u-col>
|
|
|
|
|
<u-col span="8" v-if="info.address">
|
|
|
|
|
{{info.address}}
|
|
|
|
|
</u-col>
|
|
|
|
|
<u-col span="4">
|
|
|
|
|
<view>
|
|
|
|
|
<image mode="heightFix" src="../../static/icon_xingming@2x.png"></image>
|
|
|
|
|
活动人数:
|
|
|
|
|
</view>
|
|
|
|
|
</u-col>
|
|
|
|
|
<u-col span="8" v-if="info.member_sum">
|
|
|
|
|
{{info.member_sum}}
|
|
|
|
|
</u-col>
|
|
|
|
|
<block style="display: flex;">
|
|
|
|
|
<u-col span="4">
|
|
|
|
|
<view>
|
|
|
|
|
<image mode="heightFix" src="../../static/icon_xingming@2x.png"></image>
|
|
|
|
|
已报名数:
|
|
|
|
|
</view>
|
|
|
|
|
</u-col>
|
|
|
|
|
<u-col span="8" v-if="info.total">
|
|
|
|
|
{{info.start_member_sum+info.total}}
|
|
|
|
|
</u-col>
|
|
|
|
|
</block>
|
|
|
|
|
|
|
|
|
|
<block v-if="info.template!='新'">
|
|
|
|
|
<u-col span="12">
|
|
|
|
|
<view>
|
|
|
|
|
报名信息:
|
|
|
|
|
</view>
|
|
|
|
|
</u-col>
|
|
|
|
|
<u-col span="4">
|
|
|
|
|
<view>
|
|
|
|
|
<image mode="heightFix" src="../../static/icon_shijian@2x.png"></image>
|
|
|
|
|
开始时间:
|
|
|
|
|
</view>
|
|
|
|
|
</u-col>
|
|
|
|
|
<u-col span="8" v-if="info.apply_start">
|
|
|
|
|
<view>{{$u.timeFormat(new Date(info.apply_start.replace(/-/g,'/')), 'yyyy年mm月dd日 hh:MM:ss')}}</view>
|
|
|
|
|
</u-col>
|
|
|
|
|
<u-col span="4">
|
|
|
|
|
<view>
|
|
|
|
|
<image mode="heightFix" src="../../static/icon_shijian@2x.png"></image>
|
|
|
|
|
截止时间:
|
|
|
|
|
</view>
|
|
|
|
|
</u-col>
|
|
|
|
|
<u-col span="8" v-if="info.apply_end">
|
|
|
|
|
<view>{{$u.timeFormat(new Date(info.apply_end.replace(/-/g,'/')), 'yyyy年mm月dd日 hh:MM:ss')}}</view>
|
|
|
|
|
</u-col>
|
|
|
|
|
</block>
|
|
|
|
|
|
|
|
|
|
</u-row> -->
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
<view class="details">
|
|
|
|
|
@ -314,84 +233,6 @@
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
</block>
|
|
|
|
|
<!-- <u-row gutter="16">
|
|
|
|
|
<u-col span="12">
|
|
|
|
|
<view>
|
|
|
|
|
活动信息:
|
|
|
|
|
</view>
|
|
|
|
|
</u-col>
|
|
|
|
|
<u-col span="4">
|
|
|
|
|
<view>
|
|
|
|
|
<image mode="heightFix" src="../../static/icon_shijian@2x.png"></image>
|
|
|
|
|
开始时间:
|
|
|
|
|
</view>
|
|
|
|
|
</u-col>
|
|
|
|
|
<u-col span="8" v-if="info.start_date">
|
|
|
|
|
<view>{{$u.timeFormat(new Date(info.start_date.replace(/-/g,'/')), 'yyyy年mm月dd日')}} {{info.start_time}}</view>
|
|
|
|
|
</u-col>
|
|
|
|
|
<u-col span="4">
|
|
|
|
|
<view>
|
|
|
|
|
<image mode="heightFix" src="../../static/icon_shijian@2x.png"></image>
|
|
|
|
|
结束时间:
|
|
|
|
|
</view>
|
|
|
|
|
</u-col>
|
|
|
|
|
<u-col span="8" v-if="info.start_date">
|
|
|
|
|
<view>{{$u.timeFormat(new Date(info.end_date), 'yyyy年mm月dd日')}} {{info.end_time}}</view>
|
|
|
|
|
</u-col>
|
|
|
|
|
<u-col span="4">
|
|
|
|
|
<view>
|
|
|
|
|
<image mode="heightFix" src="../../static/icon_dizhi.png"></image>
|
|
|
|
|
活动地点:
|
|
|
|
|
</view>
|
|
|
|
|
</u-col>
|
|
|
|
|
<u-col span="8" v-if="info.address">
|
|
|
|
|
{{info.address}}
|
|
|
|
|
</u-col>
|
|
|
|
|
<u-col span="4">
|
|
|
|
|
<view>
|
|
|
|
|
<image mode="heightFix" src="../../static/icon_xingming@2x.png"></image>
|
|
|
|
|
活动人数:
|
|
|
|
|
</view>
|
|
|
|
|
</u-col>
|
|
|
|
|
<u-col span="8" v-if="info.member_sum">
|
|
|
|
|
{{info.member_sum}}
|
|
|
|
|
</u-col>
|
|
|
|
|
<u-col span="4">
|
|
|
|
|
<view>
|
|
|
|
|
<image mode="heightFix" src="../../static/icon_xingming@2x.png"></image>
|
|
|
|
|
已报名数:
|
|
|
|
|
</view>
|
|
|
|
|
</u-col>
|
|
|
|
|
<u-col span="8" v-if="info.total">
|
|
|
|
|
{{info.start_member_sum+info.total}}
|
|
|
|
|
</u-col>
|
|
|
|
|
<block v-if="info.template!='新'">
|
|
|
|
|
<u-col span="12">
|
|
|
|
|
<view>
|
|
|
|
|
报名信息:
|
|
|
|
|
</view>
|
|
|
|
|
</u-col>
|
|
|
|
|
<u-col span="4">
|
|
|
|
|
<view>
|
|
|
|
|
<image mode="heightFix" src="../../static/icon_shijian@2x.png"></image>
|
|
|
|
|
开始时间:
|
|
|
|
|
</view>
|
|
|
|
|
</u-col>
|
|
|
|
|
<u-col span="8" v-if="info.apply_start">
|
|
|
|
|
<view>{{$u.timeFormat(new Date(info.apply_start.replace(/-/g,'/')), 'yyyy年mm月dd日 hh:MM:ss')}}</view>
|
|
|
|
|
</u-col>
|
|
|
|
|
<u-col span="4">
|
|
|
|
|
<view>
|
|
|
|
|
<image mode="heightFix" src="../../static/icon_shijian@2x.png"></image>
|
|
|
|
|
截止时间:
|
|
|
|
|
</view>
|
|
|
|
|
</u-col>
|
|
|
|
|
<u-col span="8" v-if="info.apply_end">
|
|
|
|
|
<view>{{$u.timeFormat(new Date(info.apply_end.replace(/-/g,'/')), 'yyyy年mm月dd日 hh:MM:ss')}}</view>
|
|
|
|
|
</u-col>
|
|
|
|
|
</block>
|
|
|
|
|
|
|
|
|
|
</u-row> -->
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
|
|
|
|
|
@ -507,7 +348,7 @@
|
|
|
|
|
<view class="uni-input">{{arrHospital[hindex]}}</view>
|
|
|
|
|
</picker>
|
|
|
|
|
|
|
|
|
|
<input type="text" v-if="arrHospital[hindex]=='其他'" v-model="info.hospital"
|
|
|
|
|
<input type="text" v-if="arrHospital[hindex]=='其他'" v-model="form.hospital"
|
|
|
|
|
style="margin-top: 10rpx;" placeholder="请输入具体建卡医院">
|
|
|
|
|
</view>
|
|
|
|
|
</view>
|
|
|
|
|
@ -527,7 +368,7 @@
|
|
|
|
|
<uni-popup ref="shareCode" :mask-click="true" type="bottom" class="shareBox">
|
|
|
|
|
<view class="codeOuter">
|
|
|
|
|
<view class="shareCon" @click="shareClose">
|
|
|
|
|
<canvas style="width:80%;margin-left:10%;position: absolute;"
|
|
|
|
|
<canvas style="width:90%;margin-left:5%;position: absolute;"
|
|
|
|
|
:style="{ height:(shareHeight*scare) + 'px', marginTop:(cropperH-(shareHeight*scare))/2+'rpx'}"
|
|
|
|
|
canvas-id="firstCanvas" id="firstCanvas"></canvas>
|
|
|
|
|
<!-- <image class="shareBg" mode="widthFix" src="../../static/bg_haibao@2x.png"></image> -->
|
|
|
|
|
@ -633,9 +474,10 @@
|
|
|
|
|
packages: [],
|
|
|
|
|
sharePath: "",
|
|
|
|
|
scare: 1,
|
|
|
|
|
shareHeight: 500,
|
|
|
|
|
shareHeight: 600,
|
|
|
|
|
imgAvatar: "",
|
|
|
|
|
poster: "",
|
|
|
|
|
poster: "",
|
|
|
|
|
illustration:'',
|
|
|
|
|
showUser: false,
|
|
|
|
|
showPhone: false,
|
|
|
|
|
|
|
|
|
|
@ -652,7 +494,8 @@
|
|
|
|
|
onShow() {
|
|
|
|
|
|
|
|
|
|
var that = this;
|
|
|
|
|
console.log("01.onShow", that);
|
|
|
|
|
console.log("01.onShow", that);
|
|
|
|
|
|
|
|
|
|
weixin.getOpenidInfo(info => {
|
|
|
|
|
|
|
|
|
|
console.log("02.getOpenidInfo", info);
|
|
|
|
|
@ -669,7 +512,9 @@
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
that.loadInfo();
|
|
|
|
|
that.getActivityList()
|
|
|
|
|
that.getActivityList()
|
|
|
|
|
that.getArea()
|
|
|
|
|
that.getHospital()
|
|
|
|
|
}, true);
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
@ -693,9 +538,6 @@
|
|
|
|
|
uni.setStorageSync("base_promotion_id", options.promotion_id)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
methods: {
|
|
|
|
|
// 跳转微信客服
|
|
|
|
|
@ -846,6 +688,42 @@
|
|
|
|
|
if (this.arrHospital[e.target.value] != '其他') {
|
|
|
|
|
this.form.hospital = this.arrHospital[e.target.value];
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
async getArea(code) {
|
|
|
|
|
await weixin.request({
|
|
|
|
|
newUrl: true,
|
|
|
|
|
api: '/api/member/parameter/show',
|
|
|
|
|
data: {
|
|
|
|
|
number: 'area'
|
|
|
|
|
},
|
|
|
|
|
utilSuccess: (res) => {
|
|
|
|
|
this.arrRegion = []
|
|
|
|
|
|
|
|
|
|
this.arrRegion.push("请选择区域")
|
|
|
|
|
res.detail.map(item => {
|
|
|
|
|
this.arrRegion.push(item.value)
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
async getHospital(code) {
|
|
|
|
|
await weixin.request({
|
|
|
|
|
newUrl: true,
|
|
|
|
|
api: '/api/member/parameter/show',
|
|
|
|
|
data: {
|
|
|
|
|
number: 'hospital'
|
|
|
|
|
},
|
|
|
|
|
utilSuccess: (res) => {
|
|
|
|
|
this.arrHospital = []
|
|
|
|
|
|
|
|
|
|
this.arrHospital.push("请选择建卡医院")
|
|
|
|
|
res.detail.map(item => {
|
|
|
|
|
this.arrHospital.push(item.value)
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
getPoster: function() {
|
|
|
|
|
var that = this;
|
|
|
|
|
@ -856,6 +734,17 @@
|
|
|
|
|
that.getAvatar();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
getIllustration: function() {
|
|
|
|
|
var that = this;
|
|
|
|
|
// let a=require('../../static/750x500.jpg')
|
|
|
|
|
uni.getImageInfo({
|
|
|
|
|
src: that.info.illustration || '../../static/750x500.jpg', // 头像
|
|
|
|
|
success: res => {
|
|
|
|
|
console.log("res",res)
|
|
|
|
|
that.illustration = res.path
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
getAvatar: function() {
|
|
|
|
|
let userProfile = uni.getStorageSync('user_profile');
|
|
|
|
|
@ -883,7 +772,8 @@
|
|
|
|
|
});
|
|
|
|
|
var that = this;
|
|
|
|
|
this.$refs.shareCode.open();
|
|
|
|
|
this.getPoster();
|
|
|
|
|
this.getPoster();
|
|
|
|
|
// this.getIllustration()
|
|
|
|
|
},
|
|
|
|
|
draw: function() {
|
|
|
|
|
var that = this;
|
|
|
|
|
@ -900,110 +790,52 @@
|
|
|
|
|
src: this.baseUrl + r.data.data, // 二维码
|
|
|
|
|
success: res => {
|
|
|
|
|
var ctx = uni.createCanvasContext('firstCanvas')
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var w = SCREEN_WIDTH * 0.8;
|
|
|
|
|
var h = this.shareHeight * this.scare;
|
|
|
|
|
// ctx.fillStyle = '#fff';
|
|
|
|
|
// ctx.fillRect(0, 0, 214, 342);
|
|
|
|
|
ctx.drawImage('../../static/bg_haibao@2x.jpg', 0, 0,
|
|
|
|
|
w, h
|
|
|
|
|
); //(SCREEN_HEIGHT - 50 - SCREEN_WIDTH * 0.8 * 1.65) /2, SCREEN_WIDTH * 0.8, SCREEN_WIDTH * 0.8 * 1.5);
|
|
|
|
|
|
|
|
|
|
ctx.drawImage('../../static/bg_haibao1.png', 20, 40,
|
|
|
|
|
w -
|
|
|
|
|
40, h - 100);
|
|
|
|
|
/* SCREEN_WIDTH *
|
|
|
|
|
0.15, (SCREEN_HEIGHT - SCREEN_WIDTH * 0.6 * 1.65) /
|
|
|
|
|
2, SCREEN_WIDTH * 0.695, SCREEN_WIDTH * 0.6 * 1.5); */
|
|
|
|
|
|
|
|
|
|
ctx.drawImage(this.poster, 20, 40,
|
|
|
|
|
w -
|
|
|
|
|
40, (h - 60 - 60) * 0.5);
|
|
|
|
|
/* SCREEN_WIDTH * 0.15, (SCREEN_HEIGHT - SCREEN_WIDTH *
|
|
|
|
|
0.6 * 1.65) /
|
|
|
|
|
2, SCREEN_WIDTH * 0.695, SCREEN_WIDTH * 0.695 / 1.6); */
|
|
|
|
|
|
|
|
|
|
// ctx.font = "22rpx bold";
|
|
|
|
|
// // 设置颜色
|
|
|
|
|
// ctx.fillStyle = "#fff";
|
|
|
|
|
// // 绘制文字(参数:要写的字,x坐标,y坐标)
|
|
|
|
|
// ctx.fillText(this.info.active_name, 20, 50);
|
|
|
|
|
var w = SCREEN_WIDTH * 0.9;
|
|
|
|
|
var h = this. shareHeight* this.scare;
|
|
|
|
|
ctx.drawImage('../../static/bg_haibao1.png', 0, 40,
|
|
|
|
|
w, h*.9);
|
|
|
|
|
console.log("this.poster",this.poster)
|
|
|
|
|
ctx.drawImage(this.poster, 11, 51,
|
|
|
|
|
w-22, (h+5) * 0.3);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ctx.font = "16rpx bold";
|
|
|
|
|
// 设置颜色
|
|
|
|
|
ctx.fillStyle = "#000";
|
|
|
|
|
// 绘制文字(参数:要写的字,x坐标,y坐标)
|
|
|
|
|
let active_title = this.info.template == '新' ? '课程' : '活动'
|
|
|
|
|
ctx.fillText(active_title, 40, (h + 50) * 0.5 - 10);
|
|
|
|
|
// ctx.fillText(active_title, w*0.1, (h + 50) * 0.6 + 20);
|
|
|
|
|
|
|
|
|
|
ctx.font = "14rpx bold";
|
|
|
|
|
// 设置颜色
|
|
|
|
|
ctx.fillStyle = "#3377b7";
|
|
|
|
|
ctx.fillStyle = "#333";
|
|
|
|
|
|
|
|
|
|
// 绘制文字(参数:要写的字,x坐标,y坐标)
|
|
|
|
|
|
|
|
|
|
let packagesFirst = this.info
|
|
|
|
|
let active_time = this.info.template == '新' ? '上课时间:' :
|
|
|
|
|
'活动时间:'
|
|
|
|
|
let active_add = this.info.template == '新' ? '上课地点:' :
|
|
|
|
|
'活动地点:'
|
|
|
|
|
let active_time = this.info.template == '新' ? '时间:' :
|
|
|
|
|
'时间:'
|
|
|
|
|
let active_add = this.info.template == '新' ? '地点:' :
|
|
|
|
|
'地点:'
|
|
|
|
|
let active_name = this.info.active_name.length > 17 ? this
|
|
|
|
|
.info.active_name.substring(0, 17) : this.info
|
|
|
|
|
.active_name
|
|
|
|
|
let active_name1 = this.info.active_name.length > 17 ? this
|
|
|
|
|
.info.active_name.substring(17, this.info.active_name
|
|
|
|
|
.length) : ''
|
|
|
|
|
|
|
|
|
|
ctx.fillText("" + active_name, 40, (h + 50) * 0.5 + 20);
|
|
|
|
|
ctx.fillText("" + active_name1, 40, (h + 50) * 0.5 + 40);
|
|
|
|
|
ctx.fillText(active_time + this.info.start_date + ' ' +
|
|
|
|
|
this.info.start_time, 40, (h + 50) * 0.5 + 50 + 20);
|
|
|
|
|
// ctx.fillText("结束时间:" + this.info.end_date, 40, (h + 50) * 0.5 + 50 + 40);
|
|
|
|
|
let address = this.info.address.length > 14 ? this.info
|
|
|
|
|
.address.substring(0, 14) : this.info.address
|
|
|
|
|
let address1 = this.info.address.length > 14 ? this.info
|
|
|
|
|
.address.substring(14, this.info.address.length) : ''
|
|
|
|
|
|
|
|
|
|
ctx.fillText(active_add + address, 40, (h + 50) * 0.5 +
|
|
|
|
|
50 + 40);
|
|
|
|
|
ctx.fillText(address1, 40, (h + 50) * 0.5 + 50 + 60);
|
|
|
|
|
// ctx.fillText(active_add + this.info.apply_end, 40, (h + 50) * 0.5 + 60 + 60);
|
|
|
|
|
|
|
|
|
|
// let user_info = uni.getStorageSync("user_info_yunyubang");
|
|
|
|
|
|
|
|
|
|
// let userProfile = uni.getStorageSync('user_profile');
|
|
|
|
|
|
|
|
|
|
// var img = this.imgAvatar;
|
|
|
|
|
// uni.getImageInfo({
|
|
|
|
|
// src: userProfile.avatarUrl, // 头像
|
|
|
|
|
// success: rlogo => {
|
|
|
|
|
// img = rlogo.path;
|
|
|
|
|
|
|
|
|
|
// }
|
|
|
|
|
// });
|
|
|
|
|
// that.circleImg(ctx,
|
|
|
|
|
// img,
|
|
|
|
|
// 40, h - 50 - w * 0.15,
|
|
|
|
|
// w * 0.15 / 2);
|
|
|
|
|
|
|
|
|
|
// ctx.font = "12rpx normal";
|
|
|
|
|
// // 设置颜色
|
|
|
|
|
// ctx.fillStyle = "#000";
|
|
|
|
|
// // 绘制文字(参数:要写的字,x坐标,y坐标)
|
|
|
|
|
// // if(packagesFirst.template!='新'){
|
|
|
|
|
|
|
|
|
|
// // }
|
|
|
|
|
// if (!weixin.isNull(this.user_info.name))
|
|
|
|
|
// ctx.fillText(this.user_info.name,
|
|
|
|
|
// 40, h - 40);
|
|
|
|
|
// else
|
|
|
|
|
// ctx.fillText("",
|
|
|
|
|
// 40, h - 40);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.circleImg(ctx, res.path, w - 40 - w * 0.2, h - 65 -
|
|
|
|
|
w *
|
|
|
|
|
0.2, w * 0.2 / 2);
|
|
|
|
|
let lecturer = this.info.lecturer?this.info.lecturer:''
|
|
|
|
|
|
|
|
|
|
ctx.fillText(this.info.start_date + ' ' +
|
|
|
|
|
this.info.start_time, w*0.1+15, (h - 50) * 0.6);
|
|
|
|
|
let address = this.info.address.length > 17? this.info
|
|
|
|
|
.address.substring(0, 17) : this.info.address
|
|
|
|
|
let address1 = this.info.address.length > 17 ? this.info
|
|
|
|
|
.address.substring(17,this.info.address.length) : ''
|
|
|
|
|
|
|
|
|
|
ctx.fillText(address, w*0.1+15, (h - 50) * 0.6 + 60);
|
|
|
|
|
ctx.fillText(address1, w*0.1+15, (h - 50) * 0.6 + 80);
|
|
|
|
|
ctx.fillText(lecturer, w*0.1+15, (h - 50) * 0.6 + 140);
|
|
|
|
|
this.circleImg(ctx, res.path, w - 20 - w * 0.2, h - 10 -w *0.3, w * 0.2 / 2);
|
|
|
|
|
|
|
|
|
|
ctx.draw(),
|
|
|
|
|
// r: 半径
|
|
|
|
|
|