|
@@ -42,6 +42,7 @@
|
|
|
<view class="open-svip-btn" @click="creatOrder">立即开通</view>
|
|
|
</view>
|
|
|
<CustomTabBar></CustomTabBar>
|
|
|
+ <tip-middle-dialog ref="daoPokeRef" @confirm-btn="daoPokeConfirm" :content="daoPokeContent"></tip-middle-dialog>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
@@ -54,6 +55,7 @@
|
|
|
} from "@/api/order.js"
|
|
|
import CustomTabBar from '@/components/custom-tabbar/custom-tabbar.vue';
|
|
|
import cacheManager from "@/utils/cacheManager.js";
|
|
|
+ import tipMiddleDialog from '@/components/dialog/tipMiddleDialog.vue';
|
|
|
import {
|
|
|
onLoad,
|
|
|
onReady
|
|
@@ -64,6 +66,8 @@
|
|
|
} from "@/utils/common";
|
|
|
let payType = ref('weixin')
|
|
|
let cardId = ref('')
|
|
|
+ const daoPokeContent = '蛋破壳了!';
|
|
|
+ const daoPokeRef = ref(null);
|
|
|
const svipArr = [{
|
|
|
iconPath: 'static/images/pay/svip-list-icon1.png',
|
|
|
title: '学习资源,随心畅学',
|
|
@@ -89,18 +93,27 @@
|
|
|
cardId.value = options.cardId
|
|
|
})
|
|
|
|
|
|
+ function daoPokeConfirm() {
|
|
|
+ daoPokeRef.value.handleClose();
|
|
|
+ }
|
|
|
+
|
|
|
function radioChange(data) {
|
|
|
payType.value = data.detail.value;
|
|
|
}
|
|
|
|
|
|
function creatOrder(data) {
|
|
|
let req = {
|
|
|
- cardId:cardId.value
|
|
|
+ cardId: cardId.value
|
|
|
}
|
|
|
- orderAdd(req).then(res=>{
|
|
|
+ orderAdd(req).then(res => {
|
|
|
console.log('res');
|
|
|
- cacheManager.updateVipStatus('auth',cardId.value)
|
|
|
+ cacheManager.updateVipStatus('auth', cardId.value)
|
|
|
toast('开通成功!')
|
|
|
+ daoPokeRef.value.handleShow();
|
|
|
+ setTimeout(() => {
|
|
|
+ daoPokeConfirm()
|
|
|
+ },2000)
|
|
|
+ return
|
|
|
uni.redirectTo({
|
|
|
url: '/pages/study/index'
|
|
|
})
|