diff --git a/packages/packageBuy/pages/shopDetail/shopDetail.vue b/packages/packageBuy/pages/shopDetail/shopDetail.vue
index b63e5ec..1524a4a 100644
--- a/packages/packageBuy/pages/shopDetail/shopDetail.vue
+++ b/packages/packageBuy/pages/shopDetail/shopDetail.vue
@@ -160,7 +160,7 @@
{{arrHospital[hindex]}}
-
@@ -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
// 此处用法为在js中调用,需要写uni.$u.throttle()
uni.$u.throttle(this.toDoBuy, 1000);
diff --git a/packages/packageOrder/pages/orderPackageDetail/orderPackageDetail.vue b/packages/packageOrder/pages/orderPackageDetail/orderPackageDetail.vue
index 8b69c34..54c8366 100644
--- a/packages/packageOrder/pages/orderPackageDetail/orderPackageDetail.vue
+++ b/packages/packageOrder/pages/orderPackageDetail/orderPackageDetail.vue
@@ -213,7 +213,8 @@
},
utilFail: res => {
uni.showToast({
- title: res
+ title: res,
+ duration:1500
})
console.log(res);
}
diff --git a/pages/active/active.vue b/pages/active/active.vue
index d07bd6f..03514c7 100644
--- a/pages/active/active.vue
+++ b/pages/active/active.vue
@@ -56,8 +56,9 @@
{{item.address}}
- 已报名数:{{item.start_member_sum+item.total}}
-
+ 已报名数:{{item.start_member_sum+item.total}}
+
+
diff --git a/pages/active/course.vue b/pages/active/course.vue
index ddfefe7..fb67db8 100644
--- a/pages/active/course.vue
+++ b/pages/active/course.vue
@@ -7,7 +7,8 @@
- 时间
+
+ 时间
主题
@@ -198,7 +199,8 @@
.day {
color: #ff9197;
- font-size: 24rpx !important;
+ font-size: 24rpx !important;
+ width: 120rpx;
}
.time {
diff --git a/pages/active/detail.vue b/pages/active/detail.vue
index b18a3f4..bcc61fc 100644
--- a/pages/active/detail.vue
+++ b/pages/active/detail.vue
@@ -145,87 +145,6 @@
-
@@ -314,84 +233,6 @@
-
@@ -507,7 +348,7 @@
{{arrHospital[hindex]}}
-
@@ -527,7 +368,7 @@
-
@@ -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: 半径
diff --git a/pages/active/my.vue b/pages/active/my.vue
index b271e75..c776c21 100644
--- a/pages/active/my.vue
+++ b/pages/active/my.vue
@@ -58,8 +58,8 @@
- 申请取消
- 核销码
+ 申请取消
+ 核销码
查看
@@ -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);
diff --git a/static/bg_haibao1.png b/static/bg_haibao1.png
index 19b64ab..a9f5e56 100644
Binary files a/static/bg_haibao1.png and b/static/bg_haibao1.png differ
diff --git a/static/bg_haibao2.png b/static/bg_haibao2.png
new file mode 100644
index 0000000..19b64ab
Binary files /dev/null and b/static/bg_haibao2.png differ