首页模态窗跳实名
This commit is contained in:
parent
a4e863a872
commit
a6e5f9e2da
|
|
@ -1,6 +1,7 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
import { uploadFile } from '@/utils/request.js'
|
||||
import { exp } from 'qrcode/lib/core/galois-field'
|
||||
|
||||
/**
|
||||
* 获取用户信息
|
||||
|
|
@ -233,3 +234,9 @@ export function clearLocalUserId() {
|
|||
uni.removeStorageSync('userId')
|
||||
console.log('本地用户ID已清除')
|
||||
}
|
||||
|
||||
export function getIsRealName() {
|
||||
return request({
|
||||
url: '/app/user/isReal',
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -59,6 +59,7 @@ import { getNewAnnouncement } from '../../api/article/article.js'
|
|||
import { getBannerList } from '../../api/banner/banner.js'
|
||||
import { getDeviceList } from '../../api/device/device.js'
|
||||
import { renewDevice, getPeriodPackages, getPeriodPackagesByTypeId } from '../../api/lease/lease.js'
|
||||
import { getIsRealName } from '../../api'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
|
|
@ -70,6 +71,7 @@ export default {
|
|||
data() {
|
||||
return {
|
||||
// 基础配置
|
||||
isRealName: false,
|
||||
indicatorDots: true,
|
||||
autoplay: true,
|
||||
interval: 2000,
|
||||
|
|
@ -105,6 +107,7 @@ export default {
|
|||
this.fetchAnnouncement()
|
||||
this.fetchBannerList()
|
||||
this.fetchDeviceList()
|
||||
this.goToRealName()
|
||||
},
|
||||
|
||||
onShow() {
|
||||
|
|
@ -114,6 +117,25 @@ export default {
|
|||
},
|
||||
|
||||
methods: {
|
||||
async goToRealName() {
|
||||
const res = await getIsRealName()
|
||||
if (!res.data) {
|
||||
uni.showModal({
|
||||
title: '提示',
|
||||
content: '需要租赁,请先实名',
|
||||
showCancel: true,
|
||||
confirmText: '去实名',
|
||||
cancelText: '暂不',
|
||||
success: function (res) {
|
||||
if (res.confirm) {
|
||||
uni.navigateTo({
|
||||
url: '/pages/realNameAuthentication/realNameAuthentication',
|
||||
})
|
||||
}
|
||||
},
|
||||
})
|
||||
}
|
||||
},
|
||||
// 获取最新公告
|
||||
async fetchAnnouncement() {
|
||||
try {
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user