活动分享

master
lion 2 years ago
parent a7d57d269e
commit 05470e94b2

@ -160,7 +160,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>
@ -259,8 +259,8 @@
address: '',
hospital: ''
},
arrHospital: ["请选择建卡医院", "市立医院", "苏大附一院", "苏大附二院", "附二浒关院区","中医院", "第五人民医院", "苏州市第七人民医院", "明基医院", "九龙医院", "娄葑医院",
"吴中人民医院", "甪直人民医院", "相城人民医院", "相城区第二人民医院", "吴江第一人民医院", "吴江第二人民医院", "盛泽医院", "其他"
arrHospital: ["请选择建卡医院","苏大附一院", "吴中人民医院","市立医院", "苏大附二院", "附二浒关院区","中医院", "第五人民医院", "苏州市第七人民医院", "明基医院", "九龙医院", "娄葑医院",
"甪直人民医院", "相城人民医院", "相城区第二人民医院", "吴江第一人民医院", "吴江第二人民医院", "盛泽医院", "其他"
],
arrRegion: ["请选择区域", "吴中区", "吴江区", "姑苏区", "工业园区", "高新区", "相城区", "昆山", "常熟", "张家港", "太仓"],
rindex: 0,
@ -315,8 +315,8 @@
}
that.loadInfo();
that.loadPage();
that.getHospital()
that.getArea()
}, true);
@ -503,8 +503,43 @@
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;
uni.getImageInfo({
@ -735,8 +770,6 @@
return false;
//this.getUserProfile();
}
if (weixin.isNull(this.form.member_name) || weixin.isNull(this.form.due_date) || weixin.isNull(this.form
.phone)) {
this.showPop = true;
@ -767,7 +800,8 @@
this.alert('请选择建卡医院')
return
}
// console.log(this.form)
// return
// jsuni.$u.throttle()
uni.$u.throttle(this.toDoBuy, 1000);

@ -213,7 +213,8 @@
},
utilFail: res => {
uni.showToast({
title: res
title: res,
duration:1500
})
console.log(res);
}

@ -56,8 +56,9 @@
</view>
</view>
<view class="subInfo">{{item.address}}</view>
<view class="subInfo">已报名数:{{item.start_member_sum+item.total}}</view>
<view class="menu">{{$u.timeFormat(new Date(item.start_date.replace(/-/g,'/')), 'yyyy年mm月dd日')}}{{$u.timeFormat(new Date(item.end_date.replace(/-/g,'/')), 'yyyy年mm月dd日')}}</view>
<view class="subInfo">已报名数:{{item.start_member_sum+item.total}}</view>
<view class="menu" v-if="item.start_date==item.end_date">{{$u.timeFormat(new Date(item.start_date.replace(/-/g,'/')), 'yyyymmdd')}}</view>
<view class="menu" v-else>{{$u.timeFormat(new Date(item.start_date.replace(/-/g,'/')), 'yyyymmdd')}}{{$u.timeFormat(new Date(item.end_date.replace(/-/g,'/')), 'yyyymmdd')}}</view>
</view>
</view>
</block>

@ -7,7 +7,8 @@
<view class='course_table'>
<u-table border-color='#fff'>
<u-tr>
<u-th>时间</u-th>
<u-th>
<p style="width:120rpx!important">时间</p></u-th>
<u-th>
<p style="width:180rpx!important">主题</p>
</u-th>
@ -198,7 +199,8 @@
.day {
color: #ff9197;
font-size: 24rpx !important;
font-size: 24rpx !important;
width: 120rpx;
}
.time {

@ -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";
// // xy
// 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";
// xy
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";
// xy
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";
// // xy
// // 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:

@ -58,8 +58,8 @@
<!--<view class="infoCol"><view class="address"><image mode="heightFix" src="../../static/icon_dizhi.png"></image>苏州·园区星海街188号苏州万怡大酒店南栋大酒店南栋</view></view>-->
</view>
<view class="btn">
<text v-if="item.statusName=='待参加'" @click.stop="cancelActive(item.apply)"> </text>
<text v-if="item.statusName=='待参加'" @click.stop="showCode(item,item.apply)"> </text>
<text v-if="item.statusName=='待参加'" @click.stop="cancelActive(item.apply_id)"> </text>
<text v-if="item.statusName=='待参加'" @click.stop="showCode(item,item.apply_id)"> </text>
<text @click.stop="goDetail(item.id)"> 查看 </text>
</view>
@ -216,22 +216,27 @@
url: "/pages/active/detail?id=" + id
})
},
cancelActive(apply){
cancelActive(apply_id){
var that = this;
var id = apply[0]['id']
var id = apply_id
console.log("id",id)
uni.showModal({
title:'是否确认取消活动?',
title: "请输入取消理由",
editable:true,
success:(res)=>{
if(res.confirm){
weixin.request({
api: '/api/member/active-member-canceled',
method: 'POST',
data: {
id:id
id:id,
remark:res.content
},
utilSuccess: res => {
uni.showToast({
title: "申请取消成功"
title: "申请取消成功",
icon:'none',
duration:2000
})
that.list = []
@ -239,7 +244,9 @@
},
utilFail: res => {
uni.showToast({
title: res
title: res,
icon:'none',
duration:2000
})
}
})
@ -251,17 +258,17 @@
})
},
showCode(item,apply){
if(apply.length<1){
showCode(item,apply_id){
if(!apply_id){
return
}
this.activeName = item.active_name
let text = ""
for(var k of apply){
text = k.code
this.applyName = k.name
this.applyMobile = k.phone
}
// for(var k of apply){
text = item.code
this.applyName = item.name
this.applyMobile = item.phone
// }
if(!text){
uni.showModal({
title: '',
@ -335,14 +342,14 @@
}
for (var m of r.data.data) {
if(m.apply){
// if(m.apply){
for(var s of that.statusNames){
if(m.apply[0]['state']==s.id){
if(m['state']==s.id){
m.statusName = s.name
}
}
// m.statusName = m.apply[0]['used_time']?'':""
}
// }
}
this.list = this.list.concat(r.data.data);

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 233 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Loading…
Cancel
Save