|
@@ -42,7 +42,8 @@
|
|
|
<view class="open-svip-btn" @click="creatOrder">立即开通</view>
|
|
|
</view>
|
|
|
<CustomTabBar></CustomTabBar>
|
|
|
- <tip-middle-dialog ref="daoPokeRef" @confirm-btn="daoPokeConfirm" :content="daoPokeContent"></tip-middle-dialog>
|
|
|
+ <!-- 蛋破壳 -->
|
|
|
+ <pay-success ref="daoPokeRef"></pay-success>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
@@ -55,7 +56,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 paySuccess from './paySuccess.vue';
|
|
|
import {
|
|
|
onLoad,
|
|
|
onReady
|
|
@@ -66,7 +67,6 @@
|
|
|
} 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',
|
|
@@ -93,30 +93,26 @@
|
|
|
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
|
|
|
}
|
|
|
orderAdd(req).then(res => {
|
|
|
- console.log('res');
|
|
|
cacheManager.updateVipStatus('auth', cardId.value)
|
|
|
- toast('开通成功!')
|
|
|
daoPokeRef.value.handleShow();
|
|
|
setTimeout(() => {
|
|
|
- daoPokeConfirm()
|
|
|
- },2000)
|
|
|
- return
|
|
|
- uni.redirectTo({
|
|
|
- url: '/pages/study/index'
|
|
|
- })
|
|
|
+ daoPokeRef.value.handleClose();
|
|
|
+ uni.redirectTo({
|
|
|
+ url: '/pages/study/index'
|
|
|
+ })
|
|
|
+ },3000)
|
|
|
})
|
|
|
}
|
|
|
|