|
@@ -1,7 +1,7 @@
|
|
|
<script setup>
|
|
|
import apiReport from '@/api/modules/report'
|
|
|
import { useRoute } from 'vue-router'
|
|
|
-import { Message, Toast } from 'tdesign-mobile-vue';
|
|
|
+import { Message, Toast, DialogPlugin } from 'tdesign-mobile-vue';
|
|
|
import apiUser from '@/api/modules/user'
|
|
|
import { useThrottleFn } from '@vueuse/core'
|
|
|
import dayjs from 'dayjs'
|
|
@@ -172,7 +172,33 @@ function handleGoTestRisk(){
|
|
|
}
|
|
|
|
|
|
//跳转购买
|
|
|
-function goPrimary(){
|
|
|
+async function goPrimary(){
|
|
|
+ // 校验开户
|
|
|
+ const res=await apiUser.checkUserStatus()
|
|
|
+ if(res.Ret===430){
|
|
|
+ DialogPlugin.confirm({
|
|
|
+ title: '温馨提示',
|
|
|
+ content: '您尚未开户,请开户后继续购买产品',
|
|
|
+ confirmBtn: '立即开户',
|
|
|
+ cancelBtn:'取消',
|
|
|
+ onConfirm:()=>{
|
|
|
+ wx.miniProgram.navigateTo({
|
|
|
+ url: `/pages/user/openAccount`
|
|
|
+ })
|
|
|
+ }
|
|
|
+ });
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if(res.Ret===435){
|
|
|
+ DialogPlugin.confirm({
|
|
|
+ title: '温馨提示',
|
|
|
+ content: '开户中,请等待',
|
|
|
+ confirmBtn: '确认',
|
|
|
+ });
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
wx.miniProgram.navigateTo({
|
|
|
url: `/pages-order/payPage/index?id=${productId}`
|
|
|
})
|