Merge branch 'hat' of git.oa00.com:SWS/EXEEED into dev

master
liuyongli 3 years ago
commit 484e5435ae

@ -1,4 +1,7 @@
// pages/quest/quest.js // pages/quest/quest.js
import {
http
} from '../../utils/util'
Page({ Page({
/** /**
@ -271,6 +274,7 @@ Page({
title: '任务中心', title: '任务中心',
success: function (res) {} success: function (res) {}
}) })
http("/task/list", "post", '')
}, },
/** /**

@ -37,7 +37,7 @@ Component({
console.log(e.detail.value) console.log(e.detail.value)
console.log(this.data) console.log(this.data)
this.setData({ this.setData({
[form.add]: e.detail.value 'form.add': e.detail.value
}) })
}, },
} }

@ -21,8 +21,8 @@
<!-- <input class="placeholder" placeholder="输入姓名" bindblur="blur" data-mes="name"></input> --> <!-- <input class="placeholder" placeholder="输入姓名" bindblur="blur" data-mes="name"></input> -->
<picker mode="region" bindchange="getUserProvince"> <picker mode="region" bindchange="getUserProvince">
<view class="placeholder"> <view class="placeholder">
<text wx:if="{{form.add}}">{{form.add}}</text> <text wx:if="{{form.add[2]}}">{{form.add}}</text>
<text wx:else="{{form}}">请选择地区</text> <text style="color:gray;" wx:else="{{true}}">请选择地区</text>
</view> </view>
</picker> </picker>
<view class="hr"></view> <view class="hr"></view>
@ -30,7 +30,7 @@
<image style="width: 48rpx;height: 48rpx;margin-right: 16rpx;" src="../../image/ic_gzcx@2x.png"></image> <image style="width: 48rpx;height: 48rpx;margin-right: 16rpx;" src="../../image/ic_gzcx@2x.png"></image>
关注车型 关注车型
</view> </view>
<view class="placeholder">请选择关注车型 <view class="placeholder" style="color:gray;">请选择关注车型
</view> </view>
<view class="hr"></view> <view class="hr"></view>
<view class="title"> <view class="title">
@ -45,3 +45,10 @@
<view class="bot"> <view class="bot">
<view class="button">上传</view> <view class="button">上传</view>
</view> </view>
<!-- 选择关注车型 -->
<l-arc-popup show="{{platformdia}}" max-height="700" min-height="200">
<view class="platitle">选择平台</view>
<view class="pla" wx:for="{{platforms}}" wx:key="index" data-mes="{{platforms[index]}}" bindtap="plachoose2">{{item.name}}
<view class="plaline" wx:if="{{index < platforms.length - 1}}"></view>
</view>
</l-arc-popup>

@ -8,11 +8,12 @@ Page({
}, },
getlist() {
},
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad(options) { onLoad(options) {
}, },
/** /**

@ -63,11 +63,10 @@ Page({
http("/user/login", "post", { http("/user/login", "post", {
code: res.code code: res.code
}).then(res => { }).then(res => {
console.log(res)
if (res.msg === "未注册!") { if (res.msg === "未注册!") {
this.getUserProfile() this.getUserProfile()
} else { } else {
// getApp().globalData.token = res.token getApp().globalData.token = res.data.token
this.setData({ this.setData({
user_avatar:res.data.user.avatar, user_avatar:res.data.user.avatar,
user_name:res.data.user.name, user_name:res.data.user.name,
@ -84,7 +83,6 @@ Page({
wx.getStorage({ wx.getStorage({
key: 'token', key: 'token',
success (res) { success (res) {
console.log(res.data)
} }
}) })
} }
@ -104,7 +102,6 @@ Page({
wx.getUserProfile({ wx.getUserProfile({
desc: '展示用户信息', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写 desc: '展示用户信息', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写
success: (userRes) => { success: (userRes) => {
console.log(userRes)
that.setData({ that.setData({
iv: userRes.iv, iv: userRes.iv,
encryptedData: userRes.encryptedData, encryptedData: userRes.encryptedData,
@ -123,7 +120,6 @@ Page({
phone: false phone: false
}) })
let that = this let that = this
console.log(that.data.iv)
let param = { let param = {
userinfo: { userinfo: {
iv: this.data.iv, iv: this.data.iv,

@ -25,11 +25,32 @@ const http = (url, method, data, isLoading = true) => {
}); });
} }
return new Promise(function (resolve, reject) { return new Promise(function (resolve, reject) {
let token = getApp().globalData.token if ( url === '/user/login' || url === '/user/register') {
let header = { var header = {}
'Customer-Wxapp-Token': token } else {
wx.getStorage({
key: 'token',
success (res) {
var token = res.data
var header = {
'token': token
}
},
fail(res) {
if (res.errMsg === "getStorage:fail data not found"){
wx.showToast({
title: '未登录\r\n点击个人中心头像登录',
icon: 'none',
duration: 2000
})
}
wx.hideLoading();
},
complete (res) {
console.log(res)
}
})
} }
// if (token && uid) {
wx.request({ wx.request({
url: host + url, url: host + url,
data: data, data: data,
@ -55,13 +76,6 @@ const http = (url, method, data, isLoading = true) => {
wx.hideLoading(); wx.hideLoading();
} }
}) })
// } else {
// wx.showToast({
// title: '未登录\r\n点击个人中心头像登录',
// icon: 'none',
// duration: 2000
// })
// }
}) })
} }

Loading…
Cancel
Save