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