From f8867b8df117d1ac0f1311970994e15059c3da03 Mon Sep 17 00:00:00 2001
From: xuxueyang <xuxy@fengyuntec.com>
Date: 星期四, 05 九月 2024 15:57:36 +0800
Subject: [PATCH] add 兼容扫码问题
---
pages/user/user-info/user-info.vue | 79 +++++----------------------------------
1 files changed, 10 insertions(+), 69 deletions(-)
diff --git a/pages/user/user-info/user-info.vue b/pages/user/user-info/user-info.vue
index a8cd0ef..59f6e29 100644
--- a/pages/user/user-info/user-info.vue
+++ b/pages/user/user-info/user-info.vue
@@ -16,12 +16,12 @@
</view>
</view>
<view class="form-item">
- <view class="label">姓名</view>
+ <view class="label">昵称</view>
<view class="m-l-a m-r-0 flex text-right">
<!-- {{dto.nickName || '-'}} -->
- <input v-model="dto.nickName" type="nickname" placeholder="请输入昵称" @blur="bindblur" @input="bindinput"
- style="margin-top: 16px;text-align: right;"></input>
+ <input v-model="dto.nickName" type="nickname" placeholder="请输入昵称" @blur="bindblur"
+ @input="bindinput" style="margin-top: 16px;text-align: right;"></input>
</view>
</view>
@@ -51,49 +51,6 @@
</view>
</view>
- <!-- <view class="form-item">
- <view class="label">用户名</view>
-
- <view class="m-l-a m-r-0 flex">
- <input v-model="dto.birthday" placeholder="请输入用户名" style="margin-top: 16px;text-align: right;"></input>
- </view>
- </view> -->
-
-
- <!-- #ifndef MP -->
- <view class="form-item">
- <view class="label">部门</view>
- <view class="m-l-a m-r-0 flex desc-gray">
- <input v-model="dto.departmentName" disabled style="margin-top: 16px;text-align: right;"></input>
- </view>
- </view>
- <view class="form-item">
- <view class="label">邮箱</view>
- <view class="m-l-a m-r-0 flex desc-gray">
- <input v-model="dto.email" disabled style="margin-top: 16px;text-align: right;"></input>
- </view>
- </view>
-
- <view class="form-item">
- <view class="label">性别</view>
- <view class="m-l-a m-r-0 flex desc-gray">
- <input v-model="dto.genderStr" disabled style="margin-top: 16px;text-align: right;"></input>
- </view>
- </view>
-
- <view class="form-item">
- <view class="label">工号</view>
- <view class="m-l-a m-r-0 flex desc-gray">
- <input v-model="dto.workNo" disabled style="margin-top: 16px;text-align: right;"></input>
- </view>
- </view>
- <view class="form-item">
- <view class="label">岗位</view>
- <view class="m-l-a m-r-0 flex desc-gray">
- <input v-model="dto.positionName" disabled style="margin-top: 16px;text-align: right;"></input>
- </view>
- </view>
- <!-- #endif -->
</view>
<view class="button-green-1 m-t-20 button-fixed-bottom" @click="update">
@@ -103,7 +60,7 @@
</template>
<script>
- const appId = 'wxafc5aaa0fc79532b'; //需要替换成实际的
+ const appId = 'wx1441324401626290'; //需要替换成实际的
import WXBizDataCrypt from '@/plugins/WXBizDataCrypt.js';
import {
mapState
@@ -118,27 +75,9 @@
},
async mounted() {
// await this.$store.dispatch('getCurrentInfo');
- // #ifdef MP
this.dto = {
...this.currentInfo,
}
- // #endif
- // #ifndef MP
- this.$message.showLoading()
- const {
- data
- } = await this.$http.request('get', '/api/personnel/employee/get/' + this.currentInfo.id)
- console.log('data', data)
- this.$message.hideLoading()
-
- this.dto = {
- // address:this.currentInfo.customerInfo.address||'',
- // email:this.currentInfo.customerInfo.email||'',
- ...this.currentInfo,
- ...data
- }
- // #endif
-
},
methods: {
bindblur(e) {
@@ -155,13 +94,14 @@
}
// "/api/current/user/update"
this.$message.showLoading()
- if(this.dto.picture&&this.dto.picture.indexOf('http://tmp/')>=0){
+ if (this.dto.picture && this.dto.picture.indexOf('http://tmp/') >= 0) {
//上传
const res = await this.$http.upload(this.dto.picture)
var picture = res.data && res.data.length > 0 && res.data[0].url || ''
this.dto.picture = picture
}
- // #ifdef MP
+
+
const {
code
} = await this.$http.request('post', "/api/current/user/update", {
@@ -171,7 +111,7 @@
// fullName: this.dto.nickName
}
})
- // #endif
+
// // #ifndef MP
// if (!!this.dto.email) {
// if (!this.$util.isEmail(this.dto.email)) {
@@ -197,6 +137,7 @@
// }
await this.$store.dispatch('getCurrentInfo');
}
+
},
@@ -365,7 +306,7 @@
border: 1px solid #fff;
// border-radius: 200%;
color: #fff;
-
+
&::after {
border: none;
}
--
Gitblit v1.9.3