Commit bfca8aa6 authored by linwenqing's avatar linwenqing

Merge branch 'dev-fix-auth' into test

parents b47e92d1 2ec167e1
...@@ -31,9 +31,6 @@ function getPhoto(type, token) { ...@@ -31,9 +31,6 @@ function getPhoto(type, token) {
//上传七牛 //上传七牛
function upload(filePath, token) { function upload(filePath, token) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
uni.showLoading({
title: '上传中...',
})
let key = let key =
new Date().getTime() + Math.random(1000) + filePath.split('/').pop() //key为自定义文件名 new Date().getTime() + Math.random(1000) + filePath.split('/').pop() //key为自定义文件名
uni.uploadFile({ uni.uploadFile({
......
...@@ -117,12 +117,16 @@ export default { ...@@ -117,12 +117,16 @@ export default {
}, },
}, },
onLoad() { onLoad() {
uni.showLoading({
title: '加载中',
})
getApp().trackPage('我的信息') getApp().trackPage('我的信息')
this.$u.api.getQiNiuToken({ bucketName: 'wsy-exam' }).then((res) => { this.$u.api.getQiNiuToken({ bucketName: 'wsy-exam' }).then((res) => {
this.qiToken = res this.qiToken = res
getApp().globalData.qiNiuToken = res getApp().globalData.qiNiuToken = res
}) })
this.$u.api.getUserInfo().then((res) => { this.$u.api.getUserInfo().then((res) => {
uni.hideLoading()
if (res) { if (res) {
res.isCertify = res.isCertify =
res && res.identityNumber && res.identityNumber.length > 5 res && res.identityNumber && res.identityNumber.length > 5
...@@ -157,6 +161,7 @@ export default { ...@@ -157,6 +161,7 @@ export default {
}) })
return return
} else if (e.detail.encryptedData && e.detail.iv) { } else if (e.detail.encryptedData && e.detail.iv) {
this.inGetPhone()
//允许授权-解析-更新手机号 //允许授权-解析-更新手机号
params = { params = {
encryptedData: e.detail.encryptedData, encryptedData: e.detail.encryptedData,
...@@ -211,13 +216,15 @@ export default { ...@@ -211,13 +216,15 @@ export default {
}) })
}, },
inUpload() { inUpload() {
if (uni.getSystemInfoSync().platform === 'android') {
return
}
uni.showLoading({ uni.showLoading({
title: '上传中...', title: '上传中...',
}) })
}, },
refleshCode() { refleshCode() {
let that = this let that = this
this.inGetPhone()
uni.login({ uni.login({
provider: 'weixin', provider: 'weixin',
success: (code_res) => { success: (code_res) => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment