|
|
|
@ -24,7 +24,9 @@ |
|
|
|
<view class="name-tip">主理人</view> |
|
|
|
</view> |
|
|
|
<view> |
|
|
|
<uv-rate :count="count" v-model="numValue" size="23" activeColor="#FFA200"></uv-rate> |
|
|
|
<uv-rate :count="count" |
|
|
|
disabled |
|
|
|
v-model="numValue" size="23" activeColor="#FFA200"></uv-rate> |
|
|
|
</view> |
|
|
|
</view> |
|
|
|
<view class="add-wx" @click="$refs.ewmpopup.open();">添加微信</view> |
|
|
|
@ -58,20 +60,39 @@ |
|
|
|
<view>报名费用</view> |
|
|
|
</view> |
|
|
|
<view class="caozuo-box"> |
|
|
|
|
|
|
|
<view class="caozuo-item border-r" |
|
|
|
@click="collect"> |
|
|
|
<image src="@/static/image/home/shoucang-icon.png" mode=""></image> |
|
|
|
@click="collect" |
|
|
|
v-if="!isCollect"> |
|
|
|
<image src="./static/shoucang-icon.png" |
|
|
|
mode=""></image> |
|
|
|
<text>收藏</text> |
|
|
|
</view> |
|
|
|
|
|
|
|
<view class="caozuo-item border-r isCollect" |
|
|
|
@click="collect" |
|
|
|
style="" |
|
|
|
v-else> |
|
|
|
<text>已收藏</text> |
|
|
|
</view> |
|
|
|
|
|
|
|
<button type="primary" style="background-color: transparent;height: 100rpx;font-size: 20rpx;padding: 0;" open-type="share" > |
|
|
|
<view class="caozuo-item"> |
|
|
|
<image src="@/static/image/home/zhuanfa-icon.png" mode=""></image> |
|
|
|
<image src="./static/zhuanfa-icon.png" mode=""></image> |
|
|
|
<text style="line-height: initial;">转发</text> |
|
|
|
</view> |
|
|
|
</button> |
|
|
|
</view> |
|
|
|
<view class="btn-box" @click="toBaoming">立即报名</view> |
|
|
|
<!-- <view class="btn-box" @click="toBaoming">立即报名</view> --> |
|
|
|
<!-- <view class="btn-box end-btn">已结束</view> --> |
|
|
|
|
|
|
|
<view class="btn-box" |
|
|
|
v-if="activityDetails.state == 0" |
|
|
|
@click="toBaoming">立即报名</view> |
|
|
|
|
|
|
|
<view class="btn-box-2" |
|
|
|
v-if="activityDetails.state == 1" |
|
|
|
>已结束</view> |
|
|
|
</view> |
|
|
|
|
|
|
|
<uv-popup ref="popup" mode="bottom" bgColor=""> |
|
|
|
@ -105,13 +126,12 @@ |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import { error } from '../uni_modules/uv-ui-tools/libs/function' |
|
|
|
|
|
|
|
export default{ |
|
|
|
data() { |
|
|
|
return { |
|
|
|
activityDetails:null, |
|
|
|
adminUserInfo:null, |
|
|
|
activityDetails:{}, |
|
|
|
adminUserInfo:{}, |
|
|
|
btnCustomStyle:{ |
|
|
|
color:'#FF5858' |
|
|
|
}, |
|
|
|
@ -134,7 +154,8 @@ import { error } from '../uni_modules/uv-ui-tools/libs/function' |
|
|
|
price:268 |
|
|
|
} |
|
|
|
], |
|
|
|
activityId:'' |
|
|
|
activityId:'', |
|
|
|
isCollect : false, |
|
|
|
} |
|
|
|
}, |
|
|
|
computed:{ |
|
|
|
@ -162,20 +183,20 @@ import { error } from '../uni_modules/uv-ui-tools/libs/function' |
|
|
|
} |
|
|
|
// 设置转发的参数 |
|
|
|
return { |
|
|
|
title:this.activityDetails.title, |
|
|
|
path: `/pages_order/huodong-detail?activityId=${this.activityId}`, |
|
|
|
imageUrl: this.imageArr[0], |
|
|
|
success: function(res) { |
|
|
|
console.log(res, '发生过是'); |
|
|
|
if (res.errMsg == 'shareAppMessage:ok') { |
|
|
|
console.log("成功", res) |
|
|
|
} |
|
|
|
}, |
|
|
|
fail: function(res) { |
|
|
|
|
|
|
|
console.log("失败", res) |
|
|
|
|
|
|
|
} |
|
|
|
title:this.activityDetails.title, |
|
|
|
path: `/pages_order/huodong-detail?activityId=${this.activityId}`, |
|
|
|
imageUrl: this.imageArr[0], |
|
|
|
success: function(res) { |
|
|
|
console.log(res, '发生过是'); |
|
|
|
if (res.errMsg == 'shareAppMessage:ok') { |
|
|
|
console.log("成功", res) |
|
|
|
} |
|
|
|
}, |
|
|
|
fail: function(res) { |
|
|
|
|
|
|
|
console.log("失败", res) |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
onPageScroll(e) { |
|
|
|
@ -203,12 +224,17 @@ import { error } from '../uni_modules/uv-ui-tools/libs/function' |
|
|
|
}); |
|
|
|
}, |
|
|
|
activityInfo(activityId) { |
|
|
|
this.$api('activityInfo',{activityId},res=> { |
|
|
|
let data = {activityId} |
|
|
|
if(uni.getStorageSync('token')){ |
|
|
|
data.token = uni.getStorageSync('token') |
|
|
|
} |
|
|
|
this.$api('activityInfo', data,res=> { |
|
|
|
if(res.code==200) { |
|
|
|
this.activityDetails = res.result.activityInfo |
|
|
|
this.numValue = res.result.adminUser.num |
|
|
|
this.ewmImg = res.result.adminUser.img |
|
|
|
this.adminUserInfo = res.result.adminUserInfo |
|
|
|
this.isCollect = res.result.collect |
|
|
|
this.typeList[0].price = res.result.activityInfo.birdPrice; |
|
|
|
this.typeList[1].price = res.result.activityInfo.personPrice; |
|
|
|
this.typeList[2].price = res.result.activityInfo.expensivePrice; |
|
|
|
@ -223,7 +249,8 @@ import { error } from '../uni_modules/uv-ui-tools/libs/function' |
|
|
|
}, |
|
|
|
collect(){ |
|
|
|
this.$api('collect', { |
|
|
|
id : this.activityId |
|
|
|
id : this.activityId, |
|
|
|
type : 0, |
|
|
|
}, res => { |
|
|
|
this.activityInfo(this.activityId) |
|
|
|
if(res.code == 200){ |
|
|
|
@ -235,24 +262,31 @@ import { error } from '../uni_modules/uv-ui-tools/libs/function' |
|
|
|
}) |
|
|
|
}, |
|
|
|
confirmClick(typePrice) { |
|
|
|
this.$api('createOrder',{id:this.activityId,typePrice:typePrice,type:0},res=>{ |
|
|
|
this.$api('createOrder',{ |
|
|
|
id:this.activityId, |
|
|
|
typePrice:typePrice, |
|
|
|
type:0 |
|
|
|
},res=>{ |
|
|
|
if(res.code === 200) { |
|
|
|
uni.requestPaymentWxPay(res) |
|
|
|
.then(res => { |
|
|
|
uni.showToast({ |
|
|
|
title: '下单成功', |
|
|
|
icon: 'none' |
|
|
|
}) |
|
|
|
uni.navigateTo({ |
|
|
|
url: '/pages_order/payOrder?id=' + res.result.id |
|
|
|
}) |
|
|
|
// uni.requestPaymentWxPay(res) |
|
|
|
// .then(res => { |
|
|
|
// uni.showToast({ |
|
|
|
// title: '下单成功', |
|
|
|
// icon: 'none' |
|
|
|
// }) |
|
|
|
|
|
|
|
setTimeout(uni.switchTab, 800, { |
|
|
|
url: '/pages/index/cart' |
|
|
|
}) |
|
|
|
// setTimeout(uni.switchTab, 800, { |
|
|
|
// url: '/pages/index/cart' |
|
|
|
// }) |
|
|
|
|
|
|
|
}).catch(n => { |
|
|
|
setTimeout(uni.switchTab, 800, { |
|
|
|
url: '/pages/index/cart' |
|
|
|
}) |
|
|
|
}) |
|
|
|
// }).catch(n => { |
|
|
|
// // setTimeout(uni.switchTab, 800, { |
|
|
|
// // url: '/pages/index/cart' |
|
|
|
// // }) |
|
|
|
// }) |
|
|
|
} |
|
|
|
}) |
|
|
|
} |
|
|
|
@ -480,6 +514,13 @@ import { error } from '../uni_modules/uv-ui-tools/libs/function' |
|
|
|
background-color: #4A3E32; |
|
|
|
} |
|
|
|
} |
|
|
|
.isCollect{ |
|
|
|
color: #f40; |
|
|
|
font-size: 28rpx; |
|
|
|
height: 100%; |
|
|
|
display: flex; |
|
|
|
align-items: center; |
|
|
|
} |
|
|
|
} |
|
|
|
.btn-box { |
|
|
|
width: 252rpx; |
|
|
|
@ -492,6 +533,19 @@ import { error } from '../uni_modules/uv-ui-tools/libs/function' |
|
|
|
background: url(@/static/image/home/hdqd-btn.png) no-repeat; |
|
|
|
background-size: 100% 100%; |
|
|
|
} |
|
|
|
.btn-box-2 { |
|
|
|
width: 252rpx; |
|
|
|
height: 74rpx; |
|
|
|
font-weight: 500; |
|
|
|
font-size: 32rpx; |
|
|
|
text-align: center; |
|
|
|
line-height: 74rpx; |
|
|
|
background-size: 100% 100%; |
|
|
|
background: #333; |
|
|
|
color: #999; |
|
|
|
border-radius: 45rpx; |
|
|
|
margin-bottom: 13rpx; |
|
|
|
} |
|
|
|
.end-btn { |
|
|
|
background: #666666; |
|
|
|
border-radius: 37rpx 37rpx 37rpx 37rpx; |
|
|
|
|