订单进度消息订阅授权,及问题修复
This commit is contained in:
parent
13d13f903d
commit
617a10bb6f
|
|
@ -0,0 +1,49 @@
|
|||
<template>
|
||||
<view>
|
||||
<!-- 模态框 -->
|
||||
<view class="cu-modal" :class="isShow?'show':''">
|
||||
<view class="cu-dialog">
|
||||
<view class="padding-xl text-left">
|
||||
<view>前往确认是否授权订单进度消息提醒</view>
|
||||
</view>
|
||||
<view class="cu-bar bg-white">
|
||||
<navigator class="modal-bottom-oper margin-0 flex-sub text-black" @tap="hideModal" target="miniProgram">取消
|
||||
</navigator>
|
||||
<view class="modal-bottom-oper margin-0 flex-sub text-main-color solid-left" @tap="confirm">确定</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'vertify-subscribe',
|
||||
data() {
|
||||
return {
|
||||
isShow: false
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
showModal(e) {
|
||||
this.isShow = true
|
||||
},
|
||||
hideModal(e) {
|
||||
this.isShow = false;
|
||||
},
|
||||
confirm(e) {
|
||||
this.hideModal();
|
||||
// 提示订阅消息
|
||||
uni.requestSubscribeMessage({
|
||||
tmplIds: ['JtsGFPDjYhL2GbHfKxvTJaR_lLp8xLyw8VeR01Y0JHM'],
|
||||
complete(res) {
|
||||
console.log(res)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
</style>
|
||||
2
main.js
2
main.js
|
|
@ -11,11 +11,13 @@ import dateUtil from './common/js/dateUtil.js';
|
|||
import globalData from './common/js/globalData.js';
|
||||
import vertifyLogin from '@/components/vertify/vertify-login.vue';
|
||||
import vertifyPhone from '@/components/vertify/vertify-phone.vue';
|
||||
import vertifySubscribe from '@/components/vertify/vertify-subscribe.vue';
|
||||
|
||||
Vue.component('cu-custom', CuCustom)
|
||||
Vue.component('confirm-modal', ConfirmModal);
|
||||
Vue.component('vertify-login', vertifyLogin);
|
||||
Vue.component('vertify-phone', vertifyPhone);
|
||||
Vue.component('vertify-subscribe', vertifySubscribe);
|
||||
|
||||
const data = type => {
|
||||
//模拟异步请求数据
|
||||
|
|
|
|||
|
|
@ -10,6 +10,8 @@
|
|||
<!-- 登录校验弹窗 -->
|
||||
<vertify-login ref="vertifyLogin" @reload="reloadForwardPage"></vertify-login>
|
||||
<vertify-phone ref="vertifyPhone" @reload="reloadForwardPage"></vertify-phone>
|
||||
<!-- 订阅授权 -->
|
||||
<vertify-subscribe ref="vertifySubscribe"></vertify-subscribe>
|
||||
|
||||
<!-- 发布 -->
|
||||
<view class="cu-modal content-mask" :class="isShowPublish?'show':''">
|
||||
|
|
@ -157,6 +159,19 @@
|
|||
this.inParam = null;
|
||||
}
|
||||
}
|
||||
let _this = this;
|
||||
wx.getSetting({
|
||||
withSubscriptions: true,
|
||||
success(res) {
|
||||
console.log(res.subscriptionsSetting)
|
||||
if (!res.subscriptionsSetting.mainSwitch
|
||||
|| !res.subscriptionsSetting.itemSettings
|
||||
|| res.subscriptionsSetting.itemSettings['yqd3p4qsqn1RiyUb8kO4dPqoGKipRQg_y99nGw0jtLE'] !== 'accept') {
|
||||
// 提示授权订单进度消息提示
|
||||
_this.$refs.vertifySubscribe.showModal();
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
changeCurPageCode(targetPageCode) {
|
||||
// #ifdef MP
|
||||
|
|
|
|||
|
|
@ -15,8 +15,8 @@
|
|||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<uni-collapse v-model="openStatusArr[index]" ref="collapse" v-for="(billItem, index) in bill">
|
||||
<uni-collapse-item>
|
||||
<uni-collapse ref="collapse">
|
||||
<uni-collapse-item ref="collapseItem" :showArrow="false" v-for="(billItem, index) in bill" :open="openStatusArr[index] === '0' ? true : false" >
|
||||
<template v-slot:title>
|
||||
<view class="padding bg-white" :data-index="index" @click="showStatement">
|
||||
<view class="margin-bottom-xs">{{billItem.createTime}}</view>
|
||||
|
|
@ -89,7 +89,13 @@
|
|||
this.openStatusArr = [];
|
||||
for (let i = 0; i < this.bill.length; i++) {
|
||||
this.openStatusArr.push('1');
|
||||
this.$nextTick(() => {
|
||||
this.$refs.collapseItem[i].onClick(false, 'init');
|
||||
})
|
||||
}
|
||||
this.$nextTick(() => {
|
||||
this.$refs.collapse.resize();
|
||||
})
|
||||
},
|
||||
async showStatement(e) {
|
||||
let curIndex = e.currentTarget.dataset.index;
|
||||
|
|
@ -119,7 +125,7 @@
|
|||
this.bill = newBill;
|
||||
// #ifdef MP
|
||||
this.$nextTick(() => {
|
||||
this.$refs.collapse[curIndex].resize();
|
||||
this.$refs.collapse.resize();
|
||||
uni.hideLoading();
|
||||
})
|
||||
// #endif
|
||||
|
|
|
|||
|
|
@ -511,6 +511,20 @@
|
|||
},
|
||||
editAddress(addressInfo) {
|
||||
console.log(addressInfo)
|
||||
// let res = await this.$request.updateOrder({
|
||||
// id: order.orderMasterId,
|
||||
// orderStatus: status
|
||||
// });
|
||||
// if (res && res.code === 0) {
|
||||
// this.reload();
|
||||
// if (ifRollback) {
|
||||
// uni.showToast({
|
||||
// title: '订单已回滚至服务中状态,请联系师傅',
|
||||
// icon: 'none',
|
||||
// duration: 3000
|
||||
// })
|
||||
// }
|
||||
// }
|
||||
},
|
||||
makePhoneCall(phoneNum) {
|
||||
uni.makePhoneCall({
|
||||
|
|
|
|||
Loading…
Reference in New Issue