|
@@ -2,19 +2,21 @@
|
|
<view class="content">
|
|
<view class="content">
|
|
<view class="content1 flex-between relative flex">
|
|
<view class="content1 flex-between relative flex">
|
|
<view class="user 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">
|
|
<view class="name">
|
|
{{userInfo.nickname}}
|
|
{{userInfo.nickname}}
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="position">
|
|
<view class="position">
|
|
- <image v-if='list.length>1||list.length==0' @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 v-if='list.length>1||list.length==0' @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>
|
|
</image>
|
|
- </button>
|
|
|
|
- <image @click='selectCard1' src="../../static/imgs/mySet/ewm.png" mode="widthFix" class="right-img">
|
|
|
|
- </image>
|
|
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="content2">
|
|
<view class="content2">
|
|
@@ -46,6 +48,8 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
|
+ var that;
|
|
|
|
+ import uploadImage from '@/components/ossutil/uploadFile.js';
|
|
import Poster from '../../components/zhangyuhao-poster/Poster.vue'
|
|
import Poster from '../../components/zhangyuhao-poster/Poster.vue'
|
|
export default {
|
|
export default {
|
|
components: {
|
|
components: {
|
|
@@ -57,7 +61,7 @@
|
|
cardList: [],
|
|
cardList: [],
|
|
canvasData: {},
|
|
canvasData: {},
|
|
currectData: {},
|
|
currectData: {},
|
|
- list:[],
|
|
|
|
|
|
+ list: [],
|
|
selectCode: '',
|
|
selectCode: '',
|
|
show: false,
|
|
show: false,
|
|
clicknum: 0,
|
|
clicknum: 0,
|
|
@@ -107,11 +111,12 @@
|
|
]
|
|
]
|
|
};
|
|
};
|
|
},
|
|
},
|
|
- beforeDestroy(){
|
|
|
|
- this.show=false
|
|
|
|
|
|
+ beforeDestroy() {
|
|
|
|
+ this.show = false
|
|
},
|
|
},
|
|
-
|
|
|
|
|
|
+
|
|
onLoad() {
|
|
onLoad() {
|
|
|
|
+ that = this
|
|
if (uni.getStorageSync("userInfo").phone) {
|
|
if (uni.getStorageSync("userInfo").phone) {
|
|
this.userInfo = uni.getStorageSync("userInfo")
|
|
this.userInfo = uni.getStorageSync("userInfo")
|
|
this.$request.baseRequest('admin.unimall.cardManagementInfo', 'list', {
|
|
this.$request.baseRequest('admin.unimall.cardManagementInfo', 'list', {
|
|
@@ -123,17 +128,17 @@
|
|
})
|
|
})
|
|
uni.hideLoading()
|
|
uni.hideLoading()
|
|
}).then(res => {
|
|
}).then(res => {
|
|
- this.list=res.data.items
|
|
|
|
|
|
+ this.list = res.data.items
|
|
this.cardList = [res.data.items]
|
|
this.cardList = [res.data.items]
|
|
- if(res.data.items.length>0){
|
|
|
|
- if(!this.poster){
|
|
|
|
|
|
+ if (res.data.items.length > 0) {
|
|
|
|
+ if (!this.poster) {
|
|
this.cardChange({
|
|
this.cardChange({
|
|
value: this.cardList[[0]]
|
|
value: this.cardList[[0]]
|
|
})
|
|
})
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
})
|
|
})
|
|
} else {
|
|
} else {
|
|
uni.switchTab({
|
|
uni.switchTab({
|
|
@@ -161,33 +166,72 @@
|
|
return {
|
|
return {
|
|
title: '名片Box',
|
|
title: '名片Box',
|
|
path: '/pages/cardHolder/cardHolder',
|
|
path: '/pages/cardHolder/cardHolder',
|
|
- imageUrl:''
|
|
|
|
|
|
+ imageUrl: ''
|
|
};
|
|
};
|
|
}
|
|
}
|
|
},
|
|
},
|
|
methods: {
|
|
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() {
|
|
handleHiddenShare() {
|
|
this.popupshow = false
|
|
this.popupshow = false
|
|
},
|
|
},
|
|
selectCard() {
|
|
selectCard() {
|
|
- if(this.cardList[0].length>0){
|
|
|
|
|
|
+ if (this.cardList[0].length > 0) {
|
|
this.show = true
|
|
this.show = true
|
|
- }else if(this.cardList[0].length==0){
|
|
|
|
|
|
+ } else if (this.cardList[0].length == 0) {
|
|
this.$refs.uToast.show({
|
|
this.$refs.uToast.show({
|
|
type: 'error',
|
|
type: 'error',
|
|
message: '您还未创建名片',
|
|
message: '您还未创建名片',
|
|
})
|
|
})
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
},
|
|
},
|
|
selectCard1() {
|
|
selectCard1() {
|
|
console.log(this.cardList[0])
|
|
console.log(this.cardList[0])
|
|
- if(this.cardList[0].length>1){
|
|
|
|
|
|
+ if (this.cardList[0].length > 1) {
|
|
this.show1 = true
|
|
this.show1 = true
|
|
- }else if(this.cardList[0].length>0){
|
|
|
|
- this.cardConfirm({value:this.cardList[[0]]})
|
|
|
|
|
|
+ } else if (this.cardList[0].length > 0) {
|
|
|
|
+ this.cardConfirm({
|
|
|
|
+ value: this.cardList[[0]]
|
|
|
|
+ })
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
},
|
|
},
|
|
cardConfirm(e) {
|
|
cardConfirm(e) {
|
|
console.log(e)
|
|
console.log(e)
|
|
@@ -213,7 +257,8 @@
|
|
},
|
|
},
|
|
{
|
|
{
|
|
type: 'image',
|
|
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',
|
|
shape: 'circle',
|
|
use: 'head',
|
|
use: 'head',
|
|
x: 30,
|
|
x: 30,
|
|
@@ -506,7 +551,8 @@
|
|
}
|
|
}
|
|
|
|
|
|
.position {
|
|
.position {
|
|
- display:flex;
|
|
|
|
|
|
+ display: flex;
|
|
|
|
+
|
|
.right-img {
|
|
.right-img {
|
|
width: 44rpx;
|
|
width: 44rpx;
|
|
margin-left: 40rpx;
|
|
margin-left: 40rpx;
|
|
@@ -535,6 +581,7 @@
|
|
|
|
|
|
.row-right-img {
|
|
.row-right-img {
|
|
width: 12rpx;
|
|
width: 12rpx;
|
|
|
|
+ height: auto;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
@@ -556,13 +603,15 @@
|
|
border: none !important;
|
|
border: none !important;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- .shareBtn{
|
|
|
|
- background:transparent;
|
|
|
|
|
|
+
|
|
|
|
+ .shareBtn {
|
|
|
|
+ background: transparent;
|
|
line-height: 1;
|
|
line-height: 1;
|
|
- padding:0;
|
|
|
|
|
|
+ padding: 0;
|
|
}
|
|
}
|
|
- .shareBtn::after{
|
|
|
|
- border:none;
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+ .shareBtn::after {
|
|
|
|
+ border: none;
|
|
|
|
+
|
|
}
|
|
}
|
|
</style>
|
|
</style>
|