Commit 28e4e7ea authored by Facius's avatar Facius

Merge branch 'dev-v1.0.0' of https://git.banshouhui.com/wuzhenzhe/study into dev-v1.0.0

parents 64dcbc6b 49ee8074
......@@ -64,7 +64,6 @@ export default {
computed: {
nowDate() {
if (this.logDate) {
console.log('取数据的日期')
return this.logDate.split(' ')[0].replace('-', '.')
} else {
var Today = new Date()
......@@ -121,7 +120,6 @@ export default {
})
},
formatDataByType() {
console.log('shoudao param', getApp().globalData.certItemData)
if (!getApp().globalData.certItemData) {
return
}
......@@ -153,7 +151,6 @@ export default {
}
this.certName = certName
this.dataList = countryData
console.log('data redo log', this.dataList)
},
},
}
......
......@@ -97,7 +97,6 @@ export default {
var Today=new Date();
let m = String(Today.getMonth()+1)
let d = String(Today.getDate())
console.log('d length', d.length)
return (Today.getFullYear() + '.' + (m.length > 1 ? m : '0' + m) + '.' + (d.length > 1 ? d : '0' + d))
},
headPhoto(){
......@@ -139,7 +138,6 @@ export default {
},
methods: {
formatDataByType() {
console.log('shoudao param', getApp().globalData.certItemData.data)
if (!getApp().globalData.certItemData) {
return
}
......
......@@ -126,7 +126,6 @@ export default {
return process.uniEnv.qn_base_url + '/shezhi@3x.png'
},
isLogin() {
console.log('is login', this.userInfo.nickName)
return this.userInfo.nickName != undefined
},
loginTips() {
......@@ -184,7 +183,6 @@ export default {
this.student[key] &&
this.student[key] != ' '
) {
console.log('count key', key)
count = count + 1
}
}
......
......@@ -54,7 +54,6 @@ export default {
methods: {
getUserQuestionWareHouseList() {
this.$u.api.getUserQuestionWareHouse().then((res) => {
console.log('tiku list', res)
let length = res.length
if (res.length <= 0) {
return
......@@ -115,11 +114,6 @@ export default {
data[i].status = status
this.lists.push(data[i])
}
// if (data.length > 0) {
// this.lists = data
console.log('tiku data', this.lists)
// }
})
},
getTodayDate() {
......
......@@ -80,7 +80,6 @@ export default {
return {
student: {},
qiToken: '',
vToken: null,
}
},
computed: {
......@@ -120,7 +119,6 @@ export default {
onLoad() {
this.student = getApp().globalData.student
this.qiToken = getApp().globalData.qiNiuToken
this.vToken = this.vuex_token
},
onUnload() {
uni.hideLoading()
......
......@@ -28,8 +28,8 @@
<view slot="right-icon">
<u-image
v-if="headCertPhoto"
width="92rpx"
height="120rpx"
width="92"
height="120"
:src="headCertPhoto"
></u-image>
<text v-else style="color:#2953FF">去上传</text>
......@@ -87,7 +87,7 @@ export default {
isCertify: false,
},
qiToken: null,
code: '',
sessionCode: '',
count: 0,
}
},
......@@ -98,10 +98,6 @@ export default {
)
},
headCertPhoto() {
console.log(
'touxiang bianle',
this.student ? this.student.certificatePhotoPath : 'kong'
)
return (this.student && this.student.certificatePhotoPath) || false
},
getMobile() {
......@@ -117,20 +113,18 @@ export default {
return (this.student && this.student.workUnit) || '去填写'
},
getCertifyStatus() {
console.log('is cert', this.student.isCertify)
return this.student.isCertify ? '已认证' : '去认证'
},
},
onLoad() {
this.refleshCode()
this.$u.api
.getQiNiuToken({ bucketName: 'banshou-userprofile' })
.then((res) => {
console.log('chushihua token', res)
this.qiToken = res //token为七牛云的token一般由后台接口提供
this.qiToken = res
getApp().globalData.qiNiuToken = res
})
this.$u.api.getUserInfo().then((res) => {
console.log('huoqu userinfo', res)
if (res) {
res.isCertify =
res && res.identityNumber && res.identityNumber.length > 5
......@@ -140,10 +134,6 @@ export default {
}
})
},
onShow() {
console.log('iddd', this.student)
console.log('iddd global', getApp().globalData.student)
},
methods: {
goCertify() {
getApp().globalData.student = this.student
......@@ -158,7 +148,6 @@ export default {
})
},
getPhonenumber(e) {
console.log('eeeee', e)
let params = {}
if (e && e.detail) {
if (e.detail.errMsg.indexOf('user deny') > -1) {
......@@ -182,25 +171,16 @@ export default {
},
syncUserinfo(params) {
let that = this
if (!that.sessionCode) {
that.toLogin()
}
uni.checkSession({
success() {
console.log('走的第一个1')
//session_key 未过期,并且在本生命周期一直有效
uni.login({
provider: 'weixin',
success: (code_res) => {
//获取code
if (code_res.errMsg == 'login:ok') {
console.log('走的第一个2')
params.code = code_res.code
//传参到服务器解析
that.sendInfo(params)
}
},
})
params.code = that.sessionCode
//传参到服务器解析
that.sendInfo(params)
},
fail() {
console.log('走的第二个1', params)
// session_key 已经失效,需要重新执行登录流程
setTimeout(() => {
uni.navigateTo({
......@@ -210,6 +190,18 @@ export default {
},
})
},
refleshCode() {
let that = this
uni.login({
provider: 'weixin',
success: (code_res) => {
//获取code
if (code_res.errMsg == 'login:ok') {
that.sessionCode = code_res.code
}
},
})
},
sendInfo(params) {
this.$u.api
.loginWechatAuth(params)
......@@ -224,6 +216,7 @@ export default {
})
})
.catch((err) => {
this.$u.toast('请登录后再绑定')
this.$u.route({
url: 'pages/login/index',
params: {
......@@ -252,10 +245,13 @@ export default {
})
})
},
toUrl(url) {
this.$u.route({
url: url,
})
toLogin() {
this.$u.toast('登录信息已失效,请重新登录')
setTimeout(() => {
uni.navigateTo({
url: 'pages/login/index',
})
}, 800)
},
},
}
......
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