lion 3 years ago
parent 3577f67d0b
commit a7d57d269e

@ -64,7 +64,7 @@
<view class="detail"> <view class="detail">
<view class="tit" v-if="false"></view> <view class="tit" v-if="false"></view>
<view class="txts"> <view class="txts">
<u-parse :html="info.content"></u-parse> <u-parse class='parseHtml' :html="info.content"></u-parse>
</view> </view>
</view> </view>
</view> </view>
@ -928,6 +928,15 @@
} }
} }
</script> </script>
<style scoped>
/deep/ .parseHtml video {
width: 80% !important;
min-height: 150px !important;
margin: 20px auto;
height:auto!important;
display: block;
}
</style>
<style lang="scss" scoped> <style lang="scss" scoped>
button::after { button::after {
border: none border: none
@ -1545,12 +1554,14 @@
color: #333333; color: #333333;
line-height: 45rpx; line-height: 45rpx;
} }
} }
image { image {
width: 100%; width: 100%;
margin-top: 30rpx; margin-top: 30rpx;
} }
} }
.introBox { .introBox {

@ -23,7 +23,7 @@
<view class="title"> <view class="title">
<view>{{item.order_name || '暂无'}}<!-- <text class="free">免费</text> --> <view>{{item.order_name || '暂无'}}<!-- <text class="free">免费</text> -->
</view> </view>
<view class="status">{{item.statusName}}</view> <view class="status">{{item.state_name}}</view>
</view> </view>
<view class="infoList"> <view class="infoList">
<view class="infoCol"> <view class="infoCol">
@ -36,7 +36,8 @@
<!--<view class="infoCol"><view class="address"><image mode="heightFix" src="../../static/icon_dizhi.png"></image>苏州·园区星海街188号苏州万怡大酒店南栋大酒店南栋</view></view>--> <!--<view class="infoCol"><view class="address"><image mode="heightFix" src="../../static/icon_dizhi.png"></image>苏州·园区星海街188号苏州万怡大酒店南栋大酒店南栋</view></view>-->
</view> </view>
<view class="btn"> <view class="btn">
<text @click.stop="goDetail(item.id)"> 查看 </text> <text @click.stop="goDetail(item.id)">详情</text>
<text @click.stop="goProDetail(item.bookable_id)">查看</text>
<text v-if="item.state=='unpaid'" class="pay" @click.stop="goPay(item.id)"> </text> <text v-if="item.state=='unpaid'" class="pay" @click.stop="goPay(item.id)"> </text>
</view> </view>
</view> </view>
@ -154,6 +155,12 @@
url: "../orderPackageDetail/orderPackageDetail?id=" + id url: "../orderPackageDetail/orderPackageDetail?id=" + id
}) })
}, },
goProDetail(id) {
uni.navigateTo({
url: "/packages/packageBuy/pages/shopDetail/shopDetail?id=" + id
})
},
goPay(id) { goPay(id) {
var that = this; var that = this;
weixin.request({ weixin.request({

@ -37,7 +37,7 @@
</view> </view>
<view class="hasTwo"> <view class="hasTwo">
<view class="p_left"><text class="twoWords"></text>:</view> <view class="p_left"><text class="twoWords"></text>:</view>
<view class="p_right"><text class="font_red">{{info.statusName}}</text></view> <view class="p_right"><text class="font_red">{{info.state_name}}</text></view>
</view> </view>
</view> </view>
<view class="orderBox" v-if="info.member_comment"> <view class="orderBox" v-if="info.member_comment">
@ -68,7 +68,7 @@
<text class="f_black">1</text> <text class="f_black">1</text>
</view> </view>
<view class="flex_between"> <view class="flex_between">
<text>{{mod.statusName}}</text> <text>{{mod.state_name}}</text>
</view> </view>
</view> </view>
</block> </block>
@ -202,7 +202,7 @@
console.log(res) console.log(res)
if (res.status == 1) { if (res.status == 1) {
uni.showModal({ uni.showModal({
title: "已申请退款", title: "已申请退款,请等待平台确认",
success: (res) => { success: (res) => {
if (res.confirm) { if (res.confirm) {
that.getOrder(); that.getOrder();

@ -9,10 +9,10 @@
<u-tr> <u-tr>
<u-th>时间</u-th> <u-th>时间</u-th>
<u-th> <u-th>
<p style="width:180rpx!important">上课地址</p> <p style="width:180rpx!important">主题</p>
</u-th> </u-th>
<u-th> <u-th>
<p style="width:180rpx!important">主题</p> <p style="width:180rpx!important">上课地址</p>
</u-th> </u-th>
<u-th>主讲</u-th> <u-th>主讲</u-th>
<u-th>报名</u-th> <u-th>报名</u-th>
@ -23,10 +23,10 @@
<p class="time">{{item.time}}</p> <p class="time">{{item.time}}</p>
</u-td> </u-td>
<u-td> <u-td>
<p class='address'>{{item.address}}</p> <p class='name'>{{item.theme}}</p>
</u-td> </u-td>
<u-td> <u-td>
<p class='name'>{{item.theme}}</p> <p class='address'>{{item.address}}</p>
</u-td> </u-td>
<u-td> <u-td>
<p class='speaker'>{{item.speaker?item.speaker:''}}</p> <p class='speaker'>{{item.speaker?item.speaker:''}}</p>

@ -39,7 +39,7 @@
</view> </view>
</view> </view>
</view> </view>
<!-- <view class="shops"> <!-- <view class="shops">
<view class="shop"> <view class="shop">
<image class="pic" src="../../static/shop-logo.png"></image> <image class="pic" src="../../static/shop-logo.png"></image>
<view class="infos"> <view class="infos">
@ -79,7 +79,8 @@
开始时间 开始时间
</view> </view>
<view class="viewlast" v-if="info.start_date"> <view class="viewlast" v-if="info.start_date">
<view>{{$u.timeFormat(new Date(info.start_date.replace(/-/g,'/')), 'yyyy年mm月dd日')}} {{info.start_time}}</view> <view>{{$u.timeFormat(new Date(info.start_date.replace(/-/g,'/')), 'yyyy年mm月dd日')}}
{{info.start_time}}</view>
</view> </view>
</view> </view>
<view class='viewchild'> <view class='viewchild'>
@ -128,7 +129,9 @@
开始时间 开始时间
</view> </view>
<view class="viewlast" v-if="info.apply_start"> <view class="viewlast" v-if="info.apply_start">
<view>{{$u.timeFormat(new Date(info.apply_start.replace(/-/g,'/')), 'yyyy年mm月dd日 hh:MM:ss')}}</view> <view>
{{$u.timeFormat(new Date(info.apply_start.replace(/-/g,'/')), 'yyyy年mm月dd日 hh:MM:ss')}}
</view>
</view> </view>
</view> </view>
<view class='viewchild'> <view class='viewchild'>
@ -137,7 +140,8 @@
截止时间 截止时间
</view> </view>
<view class="viewlast" v-if="info.apply_end"> <view class="viewlast" v-if="info.apply_end">
<view>{{$u.timeFormat(new Date(info.apply_end.replace(/-/g,'/')), 'yyyy年mm月dd日 hh:MM:ss')}}</view> <view>{{$u.timeFormat(new Date(info.apply_end.replace(/-/g,'/')), 'yyyy年mm月dd日 hh:MM:ss')}}
</view>
</view> </view>
</view> </view>
</block> </block>
@ -228,7 +232,7 @@
<view class="detail"> <view class="detail">
<view class="tit" v-if="false"></view> <view class="tit" v-if="false"></view>
<view class="txts"> <view class="txts">
<u-parse :html="info.content"></u-parse> <u-parse class='parseHtml' :html="info.content"></u-parse>
</view> </view>
</view> </view>
</view> </view>
@ -244,7 +248,8 @@
开始时间 开始时间
</view> </view>
<view class="viewlast" v-if="info.start_date"> <view class="viewlast" v-if="info.start_date">
<view>{{$u.timeFormat(new Date(info.start_date.replace(/-/g,'/')), 'yyyy年mm月dd日')}} {{info.start_time}}</view> <view>{{$u.timeFormat(new Date(info.start_date.replace(/-/g,'/')), 'yyyy年mm月dd日')}}
{{info.start_time}}</view>
</view> </view>
</view> </view>
<view class='viewchild'> <view class='viewchild'>
@ -293,7 +298,9 @@
开始时间 开始时间
</view> </view>
<view class="viewlast" v-if="info.apply_start"> <view class="viewlast" v-if="info.apply_start">
<view>{{$u.timeFormat(new Date(info.apply_start.replace(/-/g,'/')), 'yyyy年mm月dd日 hh:MM:ss')}}</view> <view>
{{$u.timeFormat(new Date(info.apply_start.replace(/-/g,'/')), 'yyyy年mm月dd日 hh:MM:ss')}}
</view>
</view> </view>
</view> </view>
<view class='viewchild'> <view class='viewchild'>
@ -302,7 +309,8 @@
截止时间 截止时间
</view> </view>
<view class="viewlast" v-if="info.apply_end"> <view class="viewlast" v-if="info.apply_end">
<view>{{$u.timeFormat(new Date(info.apply_end.replace(/-/g,'/')), 'yyyy年mm月dd日 hh:MM:ss')}}</view> <view>{{$u.timeFormat(new Date(info.apply_end.replace(/-/g,'/')), 'yyyy年mm月dd日 hh:MM:ss')}}
</view>
</view> </view>
</view> </view>
</block> </block>
@ -413,7 +421,8 @@
</view> </view>
</view> </view>
<view class="subInfo">{{item.start_date}} ~ {{item.end_date}}</view> <view class="subInfo">{{item.start_date}} ~ {{item.end_date}}</view>
<view class="menu"><text class="hui"></text>{{item.great_services?item.great_services:""}}</view> <view class="menu"><text class="hui"></text>{{item.great_services?item.great_services:""}}
</view>
</view> </view>
</view> </view>
</block> </block>
@ -457,8 +466,7 @@
<view class="formCol"> <view class="formCol">
<view>性别<text style="color:red">*</text></view> <view>性别<text style="color:red">*</text></view>
<view class="formRight"> <view class="formRight">
<radio-group @change="changeSex" <radio-group @change="changeSex" style="display: flex;align-items: center;">
style="display: flex;align-items: center;">
<label v-for="(item, index) in ['','']" :key="index" <label v-for="(item, index) in ['','']" :key="index"
style="display: flex;align-items: center;margin-right: 30rpx;"> style="display: flex;align-items: center;margin-right: 30rpx;">
<view> <view>
@ -585,7 +593,7 @@
id: "", id: "",
showPass: false, showPass: false,
info: {}, info: {},
viewCounts:'', viewCounts: '',
dataList: [], dataList: [],
form: { form: {
merchant_id: "", merchant_id: "",
@ -597,18 +605,19 @@
phone: "", phone: "",
budget_date: '', budget_date: '',
address: '', address: '',
spread_member_id:'' spread_member_id: ''
}, },
arrHospital: ["请选择建卡医院", "市立医院", "苏大附一院", "苏大附二院","附二浒关院区", "中医院", "第五人民医院", "苏州市第七人民医院", "明基医院", "九龙医院", "娄葑医院", arrHospital: ["请选择建卡医院", "市立医院", "苏大附一院", "苏大附二院", "附二浒关院区", "中医院", "第五人民医院", "苏州市第七人民医院", "明基医院", "九龙医院",
"娄葑医院",
"吴中人民医院", "甪直人民医院", "相城人民医院", "相城区第二人民医院", "吴江第一人民医院", "吴江第二人民医院", "盛泽医院", "其他" "吴中人民医院", "甪直人民医院", "相城人民医院", "相城区第二人民医院", "吴江第一人民医院", "吴江第二人民医院", "盛泽医院", "其他"
], ],
arrRegion: ["请选择区域", "吴中区", "吴江区", "姑苏区", "工业园区", "高新区", "相城区", "昆山", "常熟", "张家港", "太仓"], arrRegion: ["请选择区域", "吴中区", "吴江区", "姑苏区", "工业园区", "高新区", "相城区", "昆山", "常熟", "张家港", "太仓"],
rindex: 0, rindex: 0,
hindex: 0, hindex: 0,
isOrder:false, isOrder: false,
isOrderText:"", isOrderText: "",
openid: "", openid: "",
showPop: false, showPop: false,
@ -667,7 +676,7 @@
onLoad(options) { onLoad(options) {
var that = this; var that = this;
this.id = options.id; this.id = options.id;
console.log("this.id",this.id) console.log("this.id", this.id)
const scene = decodeURIComponent(options.scene); const scene = decodeURIComponent(options.scene);
console.log(scene) console.log(scene)
if (!weixin.isNull(scene)) { if (!weixin.isNull(scene)) {
@ -690,49 +699,51 @@
}, },
methods: { methods: {
// //
jumpToWeChatCustomerService() { jumpToWeChatCustomerService() {
this.openWeChatCustomerService("https://work.weixin.qq.com/kfid/kfccc6609d51a87324d?enc_scene=ENC5n1b6XBY2paqReUMjwNmTGay8jwTZQuyn17jL8n5xK9T7ZwfJx36T5EHqVbFWTzP8s", "wwe480a61872b54394"); this.openWeChatCustomerService(
}, "https://work.weixin.qq.com/kfid/kfccc6609d51a87324d?enc_scene=ENC5n1b6XBY2paqReUMjwNmTGay8jwTZQuyn17jL8n5xK9T7ZwfJx36T5EHqVbFWTzP8s",
"wwe480a61872b54394");
},
changeSex(e){ changeSex(e) {
// console.log("e",e) // console.log("e",e)
this.form.sex = e.detail.value this.form.sex = e.detail.value
}, },
// //
openWeChatCustomerService ( openWeChatCustomerService(
weiXinCustomerServiceUrl = "", weiXinCustomerServiceUrl = "",
corpId = "", corpId = "",
showMessageCard = false, showMessageCard = false,
sendMessageTitle = "", sendMessageTitle = "",
sendMessagePath = "", sendMessagePath = "",
sendMessageImg = "" sendMessageImg = ""
) { ) {
if (!weiXinCustomerServiceUrl || !corpId) if (!weiXinCustomerServiceUrl || !corpId)
return Toast("请配置好客服链接或者企业ID"); return Toast("请配置好客服链接或者企业ID");
// eslint-disable-next-line no-undef // eslint-disable-next-line no-undef
wx.openCustomerServiceChat({ wx.openCustomerServiceChat({
// //
extInfo: { extInfo: {
url: weiXinCustomerServiceUrl, // https://work.weixin.qq.com/xxxxxxxx url: weiXinCustomerServiceUrl, // https://work.weixin.qq.com/xxxxxxxx
}, },
corpId, // ID wwed1ca4d3597eXXXX corpId, // ID wwed1ca4d3597eXXXX
showMessageCard, // showMessageCard, //
sendMessageTitle, // sendMessageTitle, //
sendMessagePath, // .htmlpages/index/index.html sendMessagePath, // .htmlpages/index/index.html
sendMessageImg, // sendMessageImg, //
success(res) { success(res) {
console.log("success", JSON.stringify(res)); console.log("success", JSON.stringify(res));
}, },
fail(err) { fail(err) {
console.log("fail", JSON.stringify(err)); console.log("fail", JSON.stringify(err));
// eslint-disable-next-line no-undef // eslint-disable-next-line no-undef
return wx.showToast({ return wx.showToast({
title: err.errMsg, title: err.errMsg,
icon: "none" icon: "none"
}); });
}, },
}); });
}, },
getActivityList() { getActivityList() {
weixin.request({ weixin.request({
api: "/api/member/active-list", api: "/api/member/active-list",
@ -923,8 +934,8 @@
// //
ctx.fillStyle = "#000"; ctx.fillStyle = "#000";
// xy // xy
let active_title = this.info.template=='新'?'课程':'活动' let active_title = this.info.template == '新' ? '课程' : '活动'
ctx.fillText(active_title, 40, (h + 50) * 0.5 -10); ctx.fillText(active_title, 40, (h + 50) * 0.5 - 10);
ctx.font = "14rpx bold"; ctx.font = "14rpx bold";
// //
@ -932,19 +943,29 @@
// xy // xy
let packagesFirst = this.info let packagesFirst = this.info
let active_time = 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_add = this.info.template == '新' ? '上课地点:' :
let active_name1 = this.info.active_name.length>17?this.info.active_name.substring(17,this.info.active_name.length):'' '活动地点:'
let active_name = this.info.active_name.length > 17 ? this
ctx.fillText("" + active_name, 40, (h + 50) * 0.5 + 20 ); .info.active_name.substring(0, 17) : this.info
ctx.fillText("" + active_name1, 40, (h + 50) * 0.5 + 40 ); .active_name
ctx.fillText(active_time + this.info.start_date+' '+this.info.start_time, 40, (h + 50) * 0.5 + 50 + 20); 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); // 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 address = this.info.address.length > 14 ? this.info
let address1 = this.info.address.length>14?this.info.address.substring(14,this.info.address.length):'' .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(active_add + address, 40, (h + 50) * 0.5 +
50 + 40);
ctx.fillText(address1, 40, (h + 50) * 0.5 + 50 + 60); 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); // ctx.fillText(active_add + this.info.apply_end, 40, (h + 50) * 0.5 + 60 + 60);
@ -1068,14 +1089,14 @@
day = day > 9 ? day : '0' + day; day = day > 9 ? day : '0' + day;
return `${year}-${month}-${day}`; return `${year}-${month}-${day}`;
}, },
getNowTime(){ getNowTime() {
const date = new Date(); const date = new Date();
let year = date.getFullYear(); let year = date.getFullYear();
let month = date.getMonth() + 1; let month = date.getMonth() + 1;
let day = date.getDate(); let day = date.getDate();
let hours = date.getHours() let hours = date.getHours()
let minutes = date.getMinutes() let minutes = date.getMinutes()
let seconds =date.getSeconds() let seconds = date.getSeconds()
month = month > 9 ? month : '0' + month; month = month > 9 ? month : '0' + month;
day = day > 9 ? day : '0' + day; day = day > 9 ? day : '0' + day;
return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`; return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
@ -1084,12 +1105,12 @@
this.form.budget_date = e.target.value this.form.budget_date = e.target.value
}, },
compareDate(d1, d2) { compareDate(d1, d2) {
let reg = new RegExp('-', 'g') let reg = new RegExp('-', 'g')
return ((new Date(d1.replace(reg, '/'))) > (new Date(d2.replace(reg, '/')))) return ((new Date(d1.replace(reg, '/'))) > (new Date(d2.replace(reg, '/'))))
}, },
toBuy() { toBuy() {
if(!this.isOrder){ if (!this.isOrder) {
return return
} }
@ -1101,11 +1122,11 @@
//this.getUserProfile(); //this.getUserProfile();
} }
if (weixin.isNull(this.form.name) || weixin.isNull(this.form.budget_date) if (weixin.isNull(this.form.name) || weixin.isNull(this.form.budget_date) ||
|| weixin.isNull(this.form.phone) || weixin.isNull(this.form.sex) weixin.isNull(this.form.phone) || weixin.isNull(this.form.sex) ||
|| weixin.isNull(this.form.area) || weixin.isNull(this.form.hospital)) { weixin.isNull(this.form.area) || weixin.isNull(this.form.hospital)) {
this.showPop = true; this.showPop = true;
if (weixin.isNull(this.form.name)||this.form.name=='微信用户') { if (weixin.isNull(this.form.name) || this.form.name == '微信用户') {
this.alert('请输入真实会员姓名') this.alert('请输入真实会员姓名')
return return
} }
@ -1117,11 +1138,11 @@
this.alert('请选择预产日期') this.alert('请选择预产日期')
return return
} }
if (weixin.isNull(this.form.area) || this.form.area=='请选择区域') { if (weixin.isNull(this.form.area) || this.form.area == '请选择区域') {
this.alert('请选择区域') this.alert('请选择区域')
return return
} }
if (weixin.isNull(this.form.hospital) || this.form.hospital=='请选择建卡医院') { if (weixin.isNull(this.form.hospital) || this.form.hospital == '请选择建卡医院') {
this.alert('请选择建卡医院') this.alert('请选择建卡医院')
return return
} }
@ -1146,7 +1167,7 @@
this.form.merchant_id = this.info.shop_id this.form.merchant_id = this.info.shop_id
this.form.active_id = this.info.id this.form.active_id = this.info.id
this.form.active_name = this.info.active_name this.form.active_name = this.info.active_name
if(this.form.promotion){ if (this.form.promotion) {
this.form.spread_member_id = this.form.promotion this.form.spread_member_id = this.form.promotion
} }
// this.form.member_id = 14521 // this.form.member_id = 14521
@ -1157,26 +1178,26 @@
api: "/api/member/active-apply", api: "/api/member/active-apply",
data: this.form, data: this.form,
utilSuccess: res => { utilSuccess: res => {
console.log("res",res) console.log("res", res)
setTimeout(function(){ setTimeout(function() {
uni.showToast({ uni.showToast({
icon:'success', icon: 'success',
title:res.msg, title: res.msg,
duration:3000 duration: 3000
}) })
},500) }, 500)
this.showPop = false this.showPop = false
}, },
utilFail: err => { utilFail: err => {
console.log(err,'err'); console.log(err, 'err');
setTimeout(function(){ setTimeout(function() {
uni.showToast({ uni.showToast({
icon:'none', icon: 'none',
title:err, title: err,
duration:3000 duration: 3000
}) })
},500) }, 500)
} }
}) })
@ -1198,26 +1219,27 @@
}, },
utilSuccess: r => { utilSuccess: r => {
//r.data.poster = this.baseUrl + r.data.poster; //r.data.poster = this.baseUrl + r.data.poster;
if(r.company_ids){ if (r.company_ids) {
r.companyList = JSON.parse(r.company_ids) r.companyList = JSON.parse(r.company_ids)
} }
this.info = r; this.info = r;
let apply_end = r.apply_end let apply_end = r.apply_end
let apply_start = r.apply_start let apply_start = r.apply_start
let enddate = r.end_date+" "+r.end_time let enddate = r.end_date + " " + r.end_time
let nowtime = that.getNowTime() let nowtime = that.getNowTime()
if(r.audit_status==2){ if (r.audit_status == 2) {
that.isOrder = false that.isOrder = false
that.isOrderText = "不可报名" that.isOrderText = "不可报名"
return return
} }
if(that.compareDate(apply_start,nowtime)){ if (that.compareDate(apply_start, nowtime)) {
that.isOrder = false that.isOrder = false
that.isOrderText = "报名未开始" that.isOrderText = "报名未开始"
}else if(that.compareDate(nowtime,apply_end)||that.compareDate(nowtime,enddate)){ } else if (that.compareDate(nowtime, apply_end) || that.compareDate(nowtime,
enddate)) {
that.isOrder = false that.isOrder = false
that.isOrderText = "报名截止" that.isOrderText = "报名截止"
}else{ } else {
that.isOrder = true that.isOrder = true
that.isOrderText = "立即参加" that.isOrderText = "立即参加"
} }
@ -1263,11 +1285,11 @@
api: '/api/member/other/pv-count', api: '/api/member/other/pv-count',
customLoading: false, customLoading: false,
data: { data: {
url:'/api/member/active-show', url: '/api/member/active-show',
body:'id='+that.id body: 'id=' + that.id
}, },
utilSuccess: function(r) { utilSuccess: function(r) {
console.log("r",r) console.log("r", r)
that.viewCounts = r.total that.viewCounts = r.total
}, },
utilFail: function(res) { utilFail: function(res) {
@ -1279,14 +1301,24 @@
} }
} }
</script> </script>
<style scoped>
/deep/ .parseHtml video {
width: 80% !important;
min-height: 150px !important;
margin: 20px auto;
height:auto!important
}
</style>
<style lang="scss" scoped> <style lang="scss" scoped>
button::after { button::after {
border: none border: none
} }
.noscroll{
.noscroll {
overflow: hidden; overflow: hidden;
position: fixed; position: fixed;
} }
.userBoxBottomPass { .userBoxBottomPass {
font-size: 28rpx; font-size: 28rpx;
text-align: center; text-align: center;
@ -1390,7 +1422,7 @@
} }
} }
.buyBtn{ .buyBtn {
width: 220rpx; width: 220rpx;
height: 72rpx; height: 72rpx;
background: linear-gradient(90deg, #FF7E95 0%, #FF447B 100%); background: linear-gradient(90deg, #FF7E95 0%, #FF447B 100%);
@ -1401,7 +1433,8 @@
line-height: 72rpx; line-height: 72rpx;
color: #fff; color: #fff;
} }
.noBtn{
.noBtn {
background: linear-gradient(90deg, #ddd 0%, #ddd 100%); background: linear-gradient(90deg, #ddd 0%, #ddd 100%);
} }
@ -1867,30 +1900,36 @@
border-bottom: 0; border-bottom: 0;
} }
} }
.activeinfo{
.activeinfo {
margin-top: 10rpx; margin-top: 10rpx;
padding: 30rpx 30rpx 30rpx 30rpx; padding: 30rpx 30rpx 30rpx 30rpx;
background: #fff; background: #fff;
width: 100%; width: 100%;
box-sizing: border-box; box-sizing: border-box;
.viewchild{
display: flex; .viewchild {
justify-content: space-between; display: flex;
.viewfirst{ justify-content: space-between;
width:30%;
image{ .viewfirst {
width: 26rpx; width: 30%;
height: 26rpx;
display: inline-block; image {
margin-right: 12rpx; width: 26rpx;
} height: 26rpx;
} display: inline-block;
.viewlast{ margin-right: 12rpx;
width:70%
} }
} }
u-col{
image{ .viewlast {
width: 70%
}
}
u-col {
image {
width: 26rpx; width: 26rpx;
height: 26rpx; height: 26rpx;
display: inline-block; display: inline-block;
@ -1898,6 +1937,7 @@
} }
} }
} }
.details { .details {
margin-top: 10rpx; margin-top: 10rpx;
padding: 0 30rpx 30rpx 30rpx; padding: 0 30rpx 30rpx 30rpx;

@ -58,9 +58,9 @@
<!--<view class="infoCol"><view class="address"><image mode="heightFix" src="../../static/icon_dizhi.png"></image>苏州·园区星海街188号苏州万怡大酒店南栋大酒店南栋</view></view>--> <!--<view class="infoCol"><view class="address"><image mode="heightFix" src="../../static/icon_dizhi.png"></image>苏州·园区星海街188号苏州万怡大酒店南栋大酒店南栋</view></view>-->
</view> </view>
<view class="btn"> <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="showCode(item,item.apply)"> </text>
<text @click.stop="goDetail(item.id)"> 查看 </text> <text @click.stop="goDetail(item.id)"> 查看 </text>
<!-- <text v-if="item.state=='unpaid'" class="pay" @click.stop="goPay(item.id)"> </text> -->
</view> </view>
</view> </view>
@ -149,18 +149,27 @@
txt: "全部", txt: "全部",
is_used:"" is_used:""
}, },
// {
// state: "unpaid",
// txt: ""
// },
{ {
state: "ongoing", state: "ongoing",
txt: "待参加", txt: "待参加",
is_used:0 is_used:1
}, { }, {
state: "finished", state: "finished",
txt: "已参加", txt: "已参加",
is_used:1 is_used:3
}],
statusNames:[{
id:0,
name:'申请取消'
},{
id:1,
name:'待参加'
},{
id:2,
name:'已取消'
},{
id:3,
name:'已参加'
}], }],
user_info: {}, user_info: {},
openid: "" openid: ""
@ -207,6 +216,41 @@
url: "/pages/active/detail?id=" + id url: "/pages/active/detail?id=" + id
}) })
}, },
cancelActive(apply){
var that = this;
var id = apply[0]['id']
uni.showModal({
title:'是否确认取消活动?',
success:(res)=>{
if(res.confirm){
weixin.request({
api: '/api/member/active-member-canceled',
method: 'POST',
data: {
id:id
},
utilSuccess: res => {
uni.showToast({
title: "申请取消成功"
})
that.list = []
that.getOrderList(1)
},
utilFail: res => {
uni.showToast({
title: res
})
}
})
}else if(res.cancel){
console.log("dianjiquxiao")
}
}
})
},
showCode(item,apply){ showCode(item,apply){
if(apply.length<1){ if(apply.length<1){
return return
@ -251,48 +295,6 @@
}) })
}, },
goPay(id) {
var that = this;
weixin.request({
api: '/api/member/order-payment',
method: 'GET',
data: {
order_id: id,
openid: this.openid
},
utilSuccess: res => {
weixin.getOpenidInfo(() => {}, true);
setTimeout(function() {
uni.hideLoading();
that.showPop = false;
}, 100);
try {
let payParams = JSON.parse(res.jsApiParameters)
payParams.provider = 'wxpay'
payParams.success = result => {
that.status = "ongoing";
that.loadData(that.currentPage);
}
payParams.fail = result => {
console.log(result);
}
wx.requestPayment(payParams);
} catch (err) {
console.log(err)
} finally {
// finallyCode - try / catch
}
},
utilFail: res => {
uni.showToast({
title: res
})
console.log(res);
}
})
},
getOrderList(page) { getOrderList(page) {
const userInfo = uni.getStorageSync('userInfo') const userInfo = uni.getStorageSync('userInfo')
uni.showLoading({ uni.showLoading({
@ -304,12 +306,12 @@
page_size: 6, page_size: 6,
token: userInfo.access_token, token: userInfo.access_token,
myself:1, myself:1,
is_used:this.is_used, state:this.is_used,
} }
if (this.status != "") { if (this.status != "") {
data = { data = {
...data, ...data,
state: this.status // state: this.status
}; };
} }
var that = this; var that = this;
@ -334,7 +336,12 @@
for (var m of r.data.data) { for (var m of r.data.data) {
if(m.apply){ if(m.apply){
m.statusName = m.apply[0]['used_time']?'已参加':"待参加" for(var s of that.statusNames){
if(m.apply[0]['state']==s.id){
m.statusName = s.name
}
}
// m.statusName = m.apply[0]['used_time']?'':""
} }
} }
@ -451,6 +458,8 @@
font-size: 28rpx; font-size: 28rpx;
font-weight: 400; font-weight: 400;
color: #666666; color: #666666;
width: 160rpx;
text-align: right;
} }
} }

Loading…
Cancel
Save