bug修改
This commit is contained in:
+19
-7
@@ -115,7 +115,10 @@ Page({
|
||||
url: '../home/home',
|
||||
})
|
||||
wx.setStorageSync('authorize', true) // 设置有过微信授权
|
||||
wx.setStorageSync('avatarUrl', that.data.userInfoTemp.avatarUrl)
|
||||
wx.setStorage({
|
||||
key: 'avatarUrl',
|
||||
data: result.avatarUrl
|
||||
})
|
||||
}else{ // 首次登录不能直接用微信快捷登录
|
||||
wx.showToast({
|
||||
title: '暂无授权手机号',
|
||||
@@ -267,7 +270,21 @@ Page({
|
||||
UserApi.wxBind(params).then(res=>{})
|
||||
})
|
||||
},
|
||||
onLoad(){
|
||||
// onLoad(){
|
||||
// const that = this
|
||||
// wx.getStorage({
|
||||
// key: 'userInfoTemp',
|
||||
// success(res){
|
||||
// that.setData({
|
||||
// userInfoTemp: res.data
|
||||
// })
|
||||
// }
|
||||
// })
|
||||
// },
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow: function () {
|
||||
const that = this
|
||||
wx.getStorage({
|
||||
key: 'userInfoTemp',
|
||||
@@ -277,11 +294,6 @@ Page({
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow: function () {
|
||||
UserApi.getRSAPublicKey().then(res => {
|
||||
if (res.success) {
|
||||
this.setData({
|
||||
|
||||
+61
-32
@@ -1,6 +1,8 @@
|
||||
// pages/mine/mine.js
|
||||
import UserApi from '../../assets/js/http/userApi'
|
||||
import {isLogin} from '../../assets/js/common'
|
||||
import {
|
||||
isLogin
|
||||
} from '../../assets/js/common'
|
||||
Page({
|
||||
|
||||
/**
|
||||
@@ -38,9 +40,15 @@ Page({
|
||||
success(res) {
|
||||
if (res.confirm) {
|
||||
UserApi.wxUnbind().then(res => {
|
||||
wx.removeStorage({key:'userInfo'})
|
||||
wx.removeStorage({key:'X-Access-Token'})
|
||||
wx.removeStorage({key:'avatarUrl'})
|
||||
wx.removeStorage({
|
||||
key: 'userInfo'
|
||||
})
|
||||
wx.removeStorage({
|
||||
key: 'X-Access-Token'
|
||||
})
|
||||
wx.removeStorage({
|
||||
key: 'avatarUrl'
|
||||
})
|
||||
wx.redirectTo({
|
||||
url: '../login/login',
|
||||
})
|
||||
@@ -57,33 +65,42 @@ Page({
|
||||
onlyFromCamera: false,
|
||||
scanType: [],
|
||||
success: (result) => {
|
||||
console.log(result)
|
||||
let meetingId = result.result // 会议Id
|
||||
// 成功扫码的回调
|
||||
UserApi.scanCode({
|
||||
meetingId
|
||||
}).then(res => {
|
||||
console.log(res)
|
||||
if (res.success) {
|
||||
let result = JSON.stringify(res.result)
|
||||
wx.navigateTo({ // 已报名
|
||||
url: `../scanSign/scanSign?signed=1&meeting=${result}`,
|
||||
})
|
||||
} else {
|
||||
let result = JSON.stringify(res.result)
|
||||
// 未查到报名信息
|
||||
wx.navigateTo({ // 未报名
|
||||
url: `../scanSign/scanSign?signed=0&meeting=${result}`,
|
||||
})
|
||||
}
|
||||
})
|
||||
// if(result.result.indexOf("scanSign") > -1){ // 证明是签到二维码
|
||||
// let meetingId = result.result.split("=")[1] // 会议Id
|
||||
let meetingId = result.result // 会议Id
|
||||
// 成功扫码的回调
|
||||
UserApi.scanCode({
|
||||
meetingId
|
||||
}).then(res => {
|
||||
if (res.success) {
|
||||
let result = JSON.stringify(res.result)
|
||||
wx.navigateTo({ // 已报名
|
||||
url: `../scanSign/scanSign?signed=1&meeting=${result}`,
|
||||
})
|
||||
} else {
|
||||
let result = JSON.stringify(res.result)
|
||||
// 未查到报名信息
|
||||
wx.navigateTo({ // 未报名
|
||||
url: `../scanSign/scanSign?signed=0&meeting=${result}`,
|
||||
})
|
||||
}
|
||||
}).catch(err=>{
|
||||
})
|
||||
// }else {
|
||||
// wx.showToast({
|
||||
// title: '此二维码不是签到码',
|
||||
// icon: 'none',
|
||||
// duration: 2000
|
||||
// })
|
||||
// return
|
||||
// }
|
||||
}
|
||||
})
|
||||
})
|
||||
},
|
||||
// 我的资料
|
||||
mineData() {
|
||||
isLogin(()=>{
|
||||
isLogin(() => {
|
||||
wx.navigateTo({
|
||||
url: '../mineData/mineData',
|
||||
})
|
||||
@@ -91,7 +108,7 @@ Page({
|
||||
},
|
||||
// 我的合同
|
||||
mineContract() {
|
||||
isLogin(()=>{
|
||||
isLogin(() => {
|
||||
wx.navigateTo({
|
||||
url: '../mineContract/mineContract',
|
||||
})
|
||||
@@ -111,9 +128,15 @@ Page({
|
||||
success(res) {
|
||||
if (res.confirm) {
|
||||
UserApi.logout().then(res => {
|
||||
wx.removeStorage({key:'userInfo'})
|
||||
wx.removeStorage({key:'X-Access-Token'})
|
||||
wx.removeStorage({key:'avatarUrl'})
|
||||
wx.removeStorage({
|
||||
key: 'userInfo'
|
||||
})
|
||||
wx.removeStorage({
|
||||
key: 'X-Access-Token'
|
||||
})
|
||||
wx.removeStorage({
|
||||
key: 'avatarUrl'
|
||||
})
|
||||
wx.redirectTo({
|
||||
url: '../login/login',
|
||||
})
|
||||
@@ -122,11 +145,11 @@ Page({
|
||||
}
|
||||
})
|
||||
},
|
||||
onLoad(){
|
||||
onLoad() {
|
||||
const that = this
|
||||
wx.getStorage({
|
||||
key: 'avatarUrl',
|
||||
success(res){
|
||||
success(res) {
|
||||
that.setData({
|
||||
avatarUrl: res.data
|
||||
})
|
||||
@@ -138,6 +161,7 @@ Page({
|
||||
*/
|
||||
onShow: function () {
|
||||
let userInfo = wx.getStorageSync('userInfo')
|
||||
let userInfoTemp = wx.getStorageSync('userInfoTemp')
|
||||
let token = wx.getStorageSync('X-Access-Token')
|
||||
this.setData({
|
||||
token
|
||||
@@ -148,5 +172,10 @@ Page({
|
||||
phone: userInfo.phone.substr(0, 3) + '-' + userInfo.phone.substr(3, 4) + '-' + userInfo.phone.substr(7, 4)
|
||||
})
|
||||
}
|
||||
if(userInfoTemp){
|
||||
this.setData({
|
||||
avatarUrl: userInfoTemp.avatarUrl
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
@@ -67,6 +67,7 @@
|
||||
</view>
|
||||
<!-- 资料网员的项目详情不显示项目资料 -->
|
||||
<view style="height: auto !important;" wx:if="{{showProjectData}}">
|
||||
|
||||
<text>项目资料</text>
|
||||
<view class="info-file" wx:if="{{projectFileList && projectFileList.length}}">
|
||||
<text class='color-green' data-file="{{item}}" wx:for="{{projectFileList}}" wx:key='item'
|
||||
|
||||
Reference in New Issue
Block a user