cyl/develop
zsk 12 months ago
commit 80bc1a07fe

@ -38,6 +38,42 @@ Component({
this.setData({
showModal: false
})
},
saveImage: function (e) {
console.log('saveImage', e.currentTarget.dataset.src);
const imageUrl = e.currentTarget.dataset.src;
// 给出确认弹窗
wx.downloadFile({
url: imageUrl,
success: res => {
if (res.statusCode === 200) {
wx.saveImageToPhotosAlbum({
filePath: res.tempFilePath,
success: () => {
wx.showToast({
title: '保存成功',
icon: 'success'
});
},
fail: err => {
console.error('保存失败', err);
wx.showToast({
title: '保存失败',
icon: 'none'
});
}
});
}
},
fail: err => {
console.error('下载失败', err);
wx.showToast({
title: '下载失败',
icon: 'none'
});
}
});
},
}
})

@ -16,7 +16,13 @@
</view>
<view class hover-class="none" hover-stop-propagation="false">加载中...</view>
</view>
<!-- #if MP -->
<image src="{{serviceInfo.qrCode}}" bindload="imageLoad" show-menu-by-longpress="{{true}}" style="width: 184px;height: 184px;"></image>
<!-- #elif IOS -->
<image src="{{serviceInfo.qrCode}}" data-src="{{serviceInfo.qrCode}}" bindload="imageLoad" bindlongpress="saveImage" show-menu-by-longpress="{{false}}" style="width: 184px;height: 184px;"></image>
<!-- #elif ANDROID -->
<image src="{{serviceInfo.qrCode}}" data-src="{{serviceInfo.qrCode}}" bindload="imageLoad" bindlongpress="saveImage" show-menu-by-longpress="{{false}}" style="width: 184px;height: 184px;"></image>
<!-- #endif -->
<!-- <view class="f14 c9">人才经纪人</view> -->
<!-- <view class="mt20 f22 c3">{{pmdUserInfo.tel}}</view> -->
<view class="f14 c3 mt6">长按识别二维码</view>

@ -76,6 +76,22 @@ Page({
});
},
});
},
chooseAnImage() {
const that = this;
wx.chooseMedia({
sizeType: ["original"], // 可以指定是原图还是压缩图,默认二者都有
sourceType: ["album", "camera"], // 可以指定来源是相册还是相机,默认二者都有
success(res) {
// 返回选定照片的本地文件路径列表tempFilePath可以作为img标签的src属性显示图片
console.log(res);
that.setData({
files: that.data.files.concat(res.tempFilePaths),
temporaryImg: res.tempFiles[0].tempFilePath,
isSure: true,
});
},
});
},
changeUserImgsrc: function () {
var that = this;

@ -14,8 +14,10 @@
<!-- bindtap='chooseImage'
<button wx:else open-type="chooseAvatar" style='' bindchooseavatar='choiceAvatar' class="change weui-btn_primary fw500 mt32" aria-role="button">更换头像</button>
-->
<!-- #if MP || ANDROID -->
<!-- #if MP -->
<button wx:else open-type="chooseAvatar" bindchooseavatar='choiceAvatar' class="change weui-btn_primary fw500 mt32" aria-role="button">更换头像</button>
<!-- #elif ANDROID -->
<button wx:else open-type="chooseAvatar" bindtap='chooseAnImage' class="change weui-btn_primary fw500 mt32" aria-role="button">更换头像</button>
<!-- #elif IOS -->
<button wx:else bindtap='chooseImage' class="change weui-btn_primary fw500 mt32" aria-role="button">更换头像</button>
<!-- #endif -->

@ -64,9 +64,9 @@
</button>
<!-- #elif ANDROID -->
<button type class="loginBtn wxBtn ysd-base-bgcolor" style="display:flex;justify-content:center;align-items:center;" hover-class="loginBtnHov" bindtap="appLogin">
<!-- <button type class="loginBtn wxBtn ysd-base-bgcolor" style="display:flex;justify-content:center;align-items:center;" hover-class="loginBtnHov" bindtap="appLogin">
<i class="iconfont icon-shouji1 mr8"></i>手机号快捷登录
</button>
</button> -->
<!-- #endif -->
</view>
</form>

@ -78,7 +78,7 @@ Page({
*/
onLoad: function (options) {
setTimeout(() => {
console.log(app.globalData.loginUserInfo);
console.log('mine:',app.globalData.loginUserInfo);
this.setData({
isLogin: app.globalData.isLogin,
hasUserInfo: app.globalData.hasUserInfo,

@ -20,7 +20,7 @@
</block>
<view class="usernamebox">
<view class="username">
<view class="theusername">{{userInfo.user.nickName || '伯才用户' }}</view>
<view class="theusername">{{userInfo.user.userName || '伯才用户' }}</view>
<i class="iconfont icon-nv3 f12" style="color:#fb8585;line-height:20px" wx:if="{{userInfo.user.sex == 2}}"></i>
<i class="iconfont icon-nan3 f12" style="color:#10aeff;line-height:20px" wx:if="{{userInfo.user.sex == 1}}"></i>
</view>

@ -602,8 +602,8 @@ Page({
console.log('options.agencyInfo', options.agencyInfo);
if (app.isNotEmptyCheck(options.agencyInfo)) {
that.setData({
agentName: JSON.parse(options.agencyInfo).aliasName,
agentId: JSON.parse(options.agencyInfo).id,
// agentName: JSON.parse(options.agencyInfo).aliasName,
// agentId: JSON.parse(options.agencyInfo).id,
});
}
if (app.isNotEmptyCheck(options.imgUrl)) {
@ -1055,7 +1055,7 @@ Page({
new Promise(function (resolve, reject) {
var paramData = {};
console.log(' wx.getStorageSync("townsManInfoJob")', wx.getStorageSync("townsManInfoJob"));
console.log(' paramData', paramData);
console.log(' paramData', that.data);
delete paramData.config_str
delete paramData.face_rect
delete paramData.request_id
@ -1081,7 +1081,7 @@ Page({
paramData["address"] = e.detail.value.address;
paramData["desp"] = e.detail.value.desp;
paramData["policyIdx"] = that.data.policyIdx
console.log('paramData',paramData);
// if(app.isNotEmptyCheck(userInfo.imgs)){
// paramData["imgs"] = userInfo.imgs.toString();
// }

@ -29,18 +29,19 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow: function () {
let that = this;
if (wx.getStorageSync("configInfo")) {
this.setData({
configInfo: { ...wx.getStorageSync("configInfo"), biao: false },
});
console.log('configInfo', this.data.configInfo);
}
setTimeout(() => {
that.copyUpdateToken(()=>{
console.log('app.globalData.loginUserInfo',app.globalData.loginUserInfo);
this.setData({
that.setData({
userInfo: app.globalData.loginUserInfo,
});
}, 100);
})
},
showToggle () {
@ -108,6 +109,22 @@ Page({
})
},
copyUpdateToken(callback=()=>{}){
let that = this;
customRequest('/appLoginByToken', { header: 'headers', method: 'GET', data: {} }).then((res) => {
console.log(res);
app.globalData.agencyStatus = res.data.data.agencyStatus;
app.globalData.loginUserInfo = res.data.data;
wx.setStorageSync("loginUser", res.data.data);
wx.setStorageSync("LOGINUSER_ID", res.data.data.user.agencyId);
this.setData({
drawerShow: false
})
// that.onLoad()
// that.onShow()
callback();
})
},
/**
* 生命周期函数--监听页面隐藏
*/

@ -22,7 +22,7 @@
<view class="userName">
<view class="fw500">用户名</view>
<view>
<view>{{userInfo.nickName}}</view>
<view>{{userInfo.userName}}</view>
<view class="iconfont icon-gengduo11"></view>
</view>
</view>
@ -32,9 +32,9 @@
<view class="gender">
<view class="fw500">性别</view>
<view>
<view wx:if="{{userInfo.sex==1}}">男</view>
<view wx:if="{{userInfo.sex==2}}">女</view>
<view wx:if="{{userInfo.sex==0}}">未知</view>
<view wx:if="{{userInfo.user.sex==1}}">男</view>
<view wx:if="{{userInfo.user.sex==2}}">女</view>
<view wx:if="{{userInfo.user.sex==0}}">未知</view>
<view class="iconfont icon-gengduo11"></view>
</view>
</view>
@ -60,7 +60,7 @@
</view>
</navigator>-->
<view class hover-class="none" hover-stop-propagation="false">
<navigator class="bgf br8" url="/pages/realName1/index" hover-class="hcb" open-type="navigate" wx:if="{{userInfo.idauth == 0}}">
<navigator class="bgf br8" url="/pages/realName1/index" hover-class="hcb" open-type="navigate" wx:if="{{userInfo.user.idauth == 0}}">
<view class="realname mt_10 br_8">
<view class="fw500">实名认证</view>
<view>
@ -69,14 +69,14 @@
</view>
</view>
</navigator>
<navigator class="bgf br8" url="/pages/trueName/index?realName={{userInfo.realName}}" open-type="navigate" wx:else>
<navigator class="bgf br8" url="/pages/trueName/index?realName={{userInfo.user.realName}}" open-type="navigate" wx:else>
<view class="realname mt_10 br_8 bgf" hover-class="hcb">
<view class="fw500">
实名认证
<view class="iconfont icon-yirenzheng ysd-base-color fw400 f18 ml4" style="line-height:1"></view>
</view>
<view>
<view class="display-flex c9" style="align-items:center">{{userInfo.realName}}</view>
<view class="display-flex c9" style="align-items:center">{{userInfo.user.realName}}</view>
<view class="iconfont icon-gengduo11 c9"></view>
</view>
</view>

@ -7,7 +7,7 @@ Page({
*/
data: {
userId: "",
nickName: "",
userName: "",
btnLoading: false,
},
@ -21,7 +21,7 @@ Page({
var that = this;
if (app.isEmptyCheck(e.detail.value.nickName)) {
if (app.isEmptyCheck(e.detail.value.userName)) {
wx.showToast({
icon: "none",
title: "请输入姓名",
@ -34,10 +34,12 @@ Page({
var formData = e.detail.value;
// formData["userId"] = that.data.userId;
console.log(formData);
customRequest("/user/updateNickName", { header: 'headers', method: 'POST', data:formData }).then((res) => {
customRequest("/user/updateNickName", { header: 'headers', method: 'POST', data:{
nickName:formData.userName
} }).then((res) => {
if (res.data.status == 200) {
app.globalData.user.nickName = formData.nickName;
app.globalData.user.userName = formData.userName;
wx.navigateBack({
delta: 1,
@ -93,7 +95,7 @@ Page({
onShow: function () {
this.setData({
userId: app.globalData.user.id,
nickName: app.globalData.user.nickName,
userName: app.globalData.user.userName,
});
},

@ -4,7 +4,7 @@
<view class="weui-cell">
<view class="weui-cell__hd"><label class="weui-label fw500">用户名</label></view>
<view class="weui-cell__bd">
<input name="nickName" type='nickname' value="{{nickName}}" class="weui-input tr" placeholder="请输入用户名" placeholder-class="weui-input__placeholder" />
<input name="userName" type='userName' value="{{userName}}" class="weui-input tr" placeholder="请输入用户名" placeholder-class="weui-input__placeholder" />
</view>
</view>
</view>

@ -2,6 +2,7 @@
"miniVersion": "v2",
"name": "伯才供应链",
"version": "1.2.0",
"i18nFilePath": "i18n",
"mini-android": {
"sdkVersion": "1.6.2",
@ -107,5 +108,9 @@
"customImage": "/Users/zhangshaokang/Desktop/伯才供应链app上架相关图片/安卓启动页及图标/画板备份 12.png"
}
},
<<<<<<< HEAD
"versionCode": 120
=======
"versionCode": 125
>>>>>>> f9e7a56bed4415c8dc3372ab13fd25ed5ac6d5ee
}

Loading…
Cancel
Save