|
@@ -3,6 +3,7 @@ import itt from '../../utils/util'
|
|
|
import { ittLogin, bindMobile, bindBaseInfo } from '../../api/my'
|
|
|
import { getAccountNmber } from '../../api/appointment'
|
|
|
import { userUploadHeadImg } from '../../api/upload'
|
|
|
+import { documentList } from "../../api/document"
|
|
|
const app = getApp()
|
|
|
Page({
|
|
|
|
|
@@ -61,14 +62,20 @@ Page({
|
|
|
url: '/pages/report/report?form=my',
|
|
|
imgUrl: '../../imaes/baogao2@2x.png'
|
|
|
},
|
|
|
- {
|
|
|
+ /* {
|
|
|
id: 5,
|
|
|
title: '开通区域',
|
|
|
url: '/pages/openArea/openArea?form=my',
|
|
|
imgUrl: '../../imaes/quyu@2x.png'
|
|
|
- },
|
|
|
+ }, */
|
|
|
{
|
|
|
id: 6,
|
|
|
+ title: '去充值',
|
|
|
+ url: '/pages/buy/buy?form=my',
|
|
|
+ imgUrl: '../../imaes/quyu@2x.png'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ id: 7,
|
|
|
title: '设置',
|
|
|
url: '/pages/set/set?form=my',
|
|
|
imgUrl: '../../imaes/shezhi@2x.png'
|
|
@@ -91,6 +98,44 @@ Page({
|
|
|
this.userLogin()
|
|
|
},
|
|
|
|
|
|
+ // 获取用户档案信息
|
|
|
+ getDocumentList () {
|
|
|
+ var that = this
|
|
|
+ wx.showLoading({
|
|
|
+ title: '加载中...',
|
|
|
+ mask: true
|
|
|
+ })
|
|
|
+ documentList({
|
|
|
+ currentPage: 1
|
|
|
+ }).then(res => {
|
|
|
+ wx.hideLoading()
|
|
|
+ const response = res.data.vos || []
|
|
|
+ if (response.length == 0) {
|
|
|
+ wx.showModal({
|
|
|
+ content: '预约用户前需要先添加检测人员信息',
|
|
|
+ cancelColor: '#666',
|
|
|
+ confirmColor: '#333',
|
|
|
+ success (res) {
|
|
|
+ if (res.confirm) {
|
|
|
+ wx.navigateTo({
|
|
|
+ url: '/pages/createFile/createFile?from=index'
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ that.authNavTo('/pages/appointment/appointment')
|
|
|
+ }
|
|
|
+ }).catch(e => {
|
|
|
+ wx.hideLoading()
|
|
|
+ wx.showModal({
|
|
|
+ content: e,
|
|
|
+ confirmColor: '#333',
|
|
|
+ showCancel: false
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
// 获取用户头像和昵称权限 该api将于2022年10月25号之后失效
|
|
|
getUserinfo () {
|
|
|
var that = this
|
|
@@ -336,8 +381,10 @@ Page({
|
|
|
var url = e.currentTarget.dataset.url
|
|
|
this.authNavTo(url)
|
|
|
},
|
|
|
+
|
|
|
+ // 立即预约
|
|
|
handleAppoint () {
|
|
|
- this.authNavTo('/pages/appointment/appointment')
|
|
|
+ this.getDocumentList()
|
|
|
},
|
|
|
/**
|
|
|
* 路由拦截
|