|
@@ -2,17 +2,14 @@
|
|
|
<view class="content">
|
|
|
<view class="content1 flex-between relative flex">
|
|
|
<view class="user flex">
|
|
|
- <image :src="userInfo.head" mode="widthFix" class="img"></image>
|
|
|
+ <image :src="userInfo.head" mode="widthFix" class="img" @click="editHead"></image>
|
|
|
<view class="name">
|
|
|
{{userInfo.nickname}}
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="position">
|
|
|
<image @click='selectCard' src="../../static/imgs/mySet/share.png" mode="widthFix" class="right-img">
|
|
|
-<!-- <button v-if='list.length==1' class="shareBtn" type="default" data-name="shareBtn" open-type="share">
|
|
|
- <image src="../../static/imgs/mySet/share.png" mode="widthFix" class="right-img">
|
|
|
- </image>
|
|
|
- </button> -->
|
|
|
+
|
|
|
<image @click='selectCard1' src="../../static/imgs/mySet/ewm.png" mode="widthFix" class="right-img">
|
|
|
</image>
|
|
|
</view>
|
|
@@ -46,6 +43,8 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+ var that;
|
|
|
+ import uploadImage from '@/components/ossutil/uploadFile.js';
|
|
|
import Poster from '../../components/zhangyuhao-poster/Poster.vue'
|
|
|
export default {
|
|
|
components: {
|
|
@@ -95,6 +94,11 @@
|
|
|
type: "contactCustomer",
|
|
|
src: '../../static/imgs/mySet/kf.png'
|
|
|
},
|
|
|
+ {
|
|
|
+ name: "修改昵称",
|
|
|
+ type: 'editNickName',
|
|
|
+ src: '../../static/imgs/mySet/set.png'
|
|
|
+ },
|
|
|
{
|
|
|
name: "设置",
|
|
|
type: 'set',
|
|
@@ -103,7 +107,12 @@
|
|
|
]
|
|
|
};
|
|
|
},
|
|
|
- onShow() {
|
|
|
+ beforeDestroy() {
|
|
|
+ this.show = false
|
|
|
+ },
|
|
|
+
|
|
|
+ onLoad() {
|
|
|
+ that = this
|
|
|
if (uni.getStorageSync("userInfo").phone) {
|
|
|
this.userInfo = uni.getStorageSync("userInfo")
|
|
|
this.$request.baseRequest('admin.unimall.cardManagementInfo', 'list', {
|
|
@@ -115,7 +124,7 @@
|
|
|
})
|
|
|
uni.hideLoading()
|
|
|
}).then(res => {
|
|
|
- this.list=res.data.items
|
|
|
+ this.list = res.data.items
|
|
|
this.cardList = [res.data.items]
|
|
|
})
|
|
|
} else {
|
|
@@ -144,36 +153,76 @@
|
|
|
return {
|
|
|
title: '名片Box',
|
|
|
path: '/pages/cardHolder/cardHolder',
|
|
|
- imageUrl:''
|
|
|
+ imageUrl: ''
|
|
|
};
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ editHead() {
|
|
|
+ uni.chooseImage({
|
|
|
+ count: 1,
|
|
|
+ sizeType: ['original', 'compressed'],
|
|
|
+ success: function(res) {
|
|
|
+ uploadImage(res.tempFilePaths[0], 'cardImages/',
|
|
|
+ result => {
|
|
|
+ that.userInfo.head = result
|
|
|
+ that.$request.baseRequest('commonUserApp', 'edit', {
|
|
|
+ commonUserInfo: JSON.stringify(that.userInfo)
|
|
|
+ }, failres => {
|
|
|
+ that.$refs.uToast.show({
|
|
|
+ type: 'error',
|
|
|
+ message: failres.errmsg,
|
|
|
+ })
|
|
|
+ uni.hideLoading()
|
|
|
+ }).then(res => {
|
|
|
+ uni.setStorageSync("userInfo", that.userInfo)
|
|
|
+ let params = {
|
|
|
+ type: 'success',
|
|
|
+ message: "修改成功",
|
|
|
+ url: '/pages/mySet/mySet'
|
|
|
+ }
|
|
|
+ that.$refs.uToast.show({
|
|
|
+ ...params,
|
|
|
+ complete() {
|
|
|
+ params.url && uni.switchTab({
|
|
|
+ url: params.url
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+ }
|
|
|
+ )
|
|
|
+ }
|
|
|
+ });
|
|
|
+ },
|
|
|
handleHiddenShare() {
|
|
|
this.popupshow = false
|
|
|
},
|
|
|
selectCard() {
|
|
|
+
|
|
|
if(this.cardList[0].length>0){
|
|
|
this.index=0
|
|
|
this.cardChange({
|
|
|
value: this.cardList[[0]]
|
|
|
})
|
|
|
- }else if(this.list.length==0){
|
|
|
+ } else if (this.cardList[0].length == 0) {
|
|
|
this.$refs.uToast.show({
|
|
|
type: 'error',
|
|
|
message: '您还未创建名片',
|
|
|
})
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
},
|
|
|
selectCard1() {
|
|
|
- if(this.list.length>1){
|
|
|
+ console.log(this.cardList[0])
|
|
|
+ if (this.cardList[0].length > 1) {
|
|
|
this.show1 = true
|
|
|
- }else if(this.list.length>0){
|
|
|
- this.cardConfirm({value:this.cardList[[0]]})
|
|
|
+ } else if (this.cardList[0].length > 0) {
|
|
|
+ this.cardConfirm({
|
|
|
+ value: this.cardList[[0]]
|
|
|
+ })
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
},
|
|
|
cardConfirm(e) {
|
|
|
console.log(e)
|
|
@@ -200,7 +249,8 @@
|
|
|
},
|
|
|
{
|
|
|
type: 'image',
|
|
|
- path: this.currectData.headSculpture?this.currectData.headSculpture:'../../static/imgs/card/defaulthead.png',
|
|
|
+ path: this.currectData.headSculpture ? this.currectData.headSculpture :
|
|
|
+ '../../static/imgs/card/defaulthead.png',
|
|
|
shape: 'circle',
|
|
|
use: 'head',
|
|
|
imageType:this.currectData.headSculpture?'wl':'bd',
|
|
@@ -493,13 +543,16 @@
|
|
|
width: 124rpx;
|
|
|
border-radius: 50%;
|
|
|
margin-right: 32rpx;
|
|
|
+ height: auto;
|
|
|
}
|
|
|
|
|
|
.position {
|
|
|
- display:flex;
|
|
|
+ display: flex;
|
|
|
+
|
|
|
.right-img {
|
|
|
width: 44rpx;
|
|
|
margin-left: 40rpx;
|
|
|
+ height: auto;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -515,6 +568,7 @@
|
|
|
.nav-img {
|
|
|
width: 32rpx;
|
|
|
margin-right: 20rpx;
|
|
|
+ height: auto;
|
|
|
}
|
|
|
|
|
|
.row {
|
|
@@ -523,6 +577,7 @@
|
|
|
|
|
|
.row-right-img {
|
|
|
width: 12rpx;
|
|
|
+ height: auto;
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -544,13 +599,15 @@
|
|
|
border: none !important;
|
|
|
}
|
|
|
}
|
|
|
- .shareBtn{
|
|
|
- background:transparent;
|
|
|
+
|
|
|
+ .shareBtn {
|
|
|
+ background: transparent;
|
|
|
line-height: 1;
|
|
|
- padding:0;
|
|
|
+ padding: 0;
|
|
|
}
|
|
|
- .shareBtn::after{
|
|
|
- border:none;
|
|
|
-
|
|
|
+
|
|
|
+ .shareBtn::after {
|
|
|
+ border: none;
|
|
|
+
|
|
|
}
|
|
|
</style>
|