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