|
|
@@ -20,7 +20,8 @@
|
|
|
<text>活动时间:</text>
|
|
|
</view>
|
|
|
<view>
|
|
|
- <text v-if="activity.valid == 2">{{ activity.validBeginTime.substring(0, 10) }} 至 {{ activity.validEndTime.substring(0, 10) }}
|
|
|
+ <text v-if="activity.valid == 2">{{ activity.validBeginTime.substring(0, 10) }} 至
|
|
|
+ {{ activity.validEndTime.substring(0, 10) }}
|
|
|
</text>
|
|
|
<text v-else>长期有效</text>
|
|
|
</view>
|
|
|
@@ -170,12 +171,41 @@
|
|
|
:totalAmount="totalAmount" :lovePay="false" :blPay="false"
|
|
|
:orderNo="subOrderNo" @payResult="payResult" @improperClose="improperClose"></myPay>
|
|
|
|
|
|
- <view>
|
|
|
- <u-picker :show="show" title="选择服务对象" :closeOnClickOverlay="true" @close="show = false"
|
|
|
- :columns="serviceObjectList"
|
|
|
- keyName="nickName" @cancel="show = false" @confirm="confirm"></u-picker>
|
|
|
- </view>
|
|
|
+ <!-- <view>-->
|
|
|
+ <!-- <u-picker :show="show" title="选择服务对象" :closeOnClickOverlay="true" @close="show = false"-->
|
|
|
+ <!-- :columns="serviceObjectList"-->
|
|
|
+ <!-- keyName="nickName" @cancel="show = false" @confirm="confirm"></u-picker>-->
|
|
|
+ <!-- </view>-->
|
|
|
+ <uni-popup ref="popup" type="bottom">
|
|
|
+ <view class="addService">
|
|
|
+
|
|
|
+ <view class="popupTitle">
|
|
|
+ <text>切换服务对象</text>
|
|
|
+ </view>
|
|
|
+
|
|
|
+ <scroll-view class="scrollY" scroll-y>
|
|
|
+ <view class="flex-row objectItem" :class="{'vBackGround': selectServiceObjectIndex === index}"
|
|
|
+ v-for="(item,index) in serviceObjectList" :key="index"
|
|
|
+ @click="selectServiceObjectIndex = index">
|
|
|
+ <image class="objectImage" :src="item.facePhotoUrl || '/static/ud4.png'"></image>
|
|
|
+ <view class="flex-col objectName ">
|
|
|
+ <text>{{ item.nickName }}</text>
|
|
|
+ </view>
|
|
|
+ <image v-if="selectServiceObjectIndex === index" class="vImage"
|
|
|
+ src="/static/index/xuanzhong.png"></image>
|
|
|
+ </view>
|
|
|
+ </scroll-view>
|
|
|
|
|
|
+ <view class="flex-row justify-around">
|
|
|
+ <view class="cancelButton" @click="closeSelectServiceObjectPopup">
|
|
|
+ <text>取消</text>
|
|
|
+ </view>
|
|
|
+ <view class="confirmButton" @click="confirm(serviceObjectList[selectServiceObjectIndex].id)">
|
|
|
+ <text>确定</text>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </uni-popup>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
|
@@ -188,6 +218,7 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ selectServiceObjectIndex:-1,
|
|
|
showRemarkId: '',
|
|
|
userInfo: {},
|
|
|
subOrderNo: '',
|
|
|
@@ -204,7 +235,7 @@ export default {
|
|
|
isShare: false,
|
|
|
inviteUserId: null,
|
|
|
inviteOrderId: null,
|
|
|
- isShareMax:false,
|
|
|
+ isShareMax: false,
|
|
|
}
|
|
|
},
|
|
|
|
|
|
@@ -265,7 +296,7 @@ export default {
|
|
|
this.activityCheck()
|
|
|
},
|
|
|
|
|
|
- onShow(){
|
|
|
+ onShow() {
|
|
|
this.userInfo = uni.getStorageSync('userInfo')
|
|
|
this.listServiceObject()
|
|
|
},
|
|
|
@@ -280,6 +311,16 @@ export default {
|
|
|
|
|
|
}
|
|
|
},
|
|
|
+ getImgUrlByBannerOssId(items) {
|
|
|
+ for (let i = 0; i < items.length; i++) {
|
|
|
+ if (items[i].facePhoto) {
|
|
|
+ this.$api.getImgUrlByOssId({ossId: items[i].facePhoto}).then(res => {
|
|
|
+ items[i].facePhotoUrl = res.data.data[0].url.replace(/^http:/, "https:")
|
|
|
+ this.$set(this.serviceObjectList, i, items[i])
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
// 查询服务对像信息列表
|
|
|
listServiceObject() {
|
|
|
let serviceObjectList = []
|
|
|
@@ -291,9 +332,9 @@ export default {
|
|
|
})
|
|
|
// this.serviceObjectList[0] = serviceObjectList
|
|
|
|
|
|
- this.$set(this.serviceObjectList,0,serviceObjectList)
|
|
|
-
|
|
|
- console.log('执行了+++++++++++++++++++',this.serviceObjectList)
|
|
|
+ this.$set(this.serviceObjectList, 0, serviceObjectList)
|
|
|
+ this.getImgUrlByBannerOssId(this.serviceObjectList[0]);
|
|
|
+ console.log('执行了+++++++++++++++++++', this.serviceObjectList)
|
|
|
|
|
|
// if (this.isShare) {
|
|
|
if (serviceObjectList.length === 0) {
|
|
|
@@ -314,7 +355,10 @@ export default {
|
|
|
|
|
|
})
|
|
|
},
|
|
|
-
|
|
|
+ closeSelectServiceObjectPopup(){
|
|
|
+ this.selectServiceObjectIndex = -1
|
|
|
+ this.$refs.popup.close()
|
|
|
+ },
|
|
|
//支付结果回调
|
|
|
payResult(e) {
|
|
|
console.log(e)
|
|
|
@@ -324,6 +368,11 @@ export default {
|
|
|
title: '支付成功!'
|
|
|
});
|
|
|
this.isActivityCheck = true
|
|
|
+ setTimeout(() => {
|
|
|
+ uni.navigateTo({
|
|
|
+ url: '/myPages/myActivity/myActivity'
|
|
|
+ })
|
|
|
+ }, 2000)
|
|
|
} else {
|
|
|
uni.showToast({
|
|
|
duration: 2000,
|
|
|
@@ -341,12 +390,12 @@ export default {
|
|
|
|
|
|
beforeCommitOrder() {
|
|
|
|
|
|
- if (!this.userInfo.phone){
|
|
|
+ if (!this.userInfo.phone) {
|
|
|
uni.showModal({
|
|
|
- title:'温馨提示',
|
|
|
- content:'请先绑定手机号',
|
|
|
- success:res=>{
|
|
|
- if (res.confirm){
|
|
|
+ title: '温馨提示',
|
|
|
+ content: '请先绑定手机号',
|
|
|
+ success: res => {
|
|
|
+ if (res.confirm) {
|
|
|
uni.navigateTo({
|
|
|
url: '/myPages/setting/setting-telphone',
|
|
|
})
|
|
|
@@ -357,20 +406,22 @@ export default {
|
|
|
}
|
|
|
|
|
|
if (this.activity.isAddServiceObject == 1) {
|
|
|
- this.show = true
|
|
|
+ // this.show = true
|
|
|
+ this.$refs.popup.open()
|
|
|
} else {
|
|
|
this.commitOrder()
|
|
|
}
|
|
|
},
|
|
|
|
|
|
confirm(e) {
|
|
|
+ // console.log(e)
|
|
|
+ // this.serviceObjectId = e.value[0].id
|
|
|
console.log(e)
|
|
|
- this.serviceObjectId = e.value[0].id
|
|
|
- this.show = false
|
|
|
-
|
|
|
+ this.serviceObjectId = e
|
|
|
+ // this.show = false
|
|
|
+ this.$refs.popup.close()
|
|
|
this.commitOrder()
|
|
|
},
|
|
|
-
|
|
|
//提交订单
|
|
|
commitOrder() {
|
|
|
// if (this.subOrderNo){
|
|
|
@@ -412,7 +463,6 @@ export default {
|
|
|
// }
|
|
|
},
|
|
|
|
|
|
-
|
|
|
activityDetail() {
|
|
|
console.log(this.id, '活动ID')
|
|
|
const data = {
|