Commit 1e160f2a authored by Facius's avatar Facius

feat: 名片分享页

parent 6eb7425d
Pipeline #2917 canceled with stages
......@@ -33,7 +33,7 @@ export default {
},
// green 绿;blue 蓝;black 黑;
image() {
switch (this.info.type) {
switch (this.info.coverUrl) {
case 'green':
return this.baseUrl + 'muban1fanmian@3x.png'
case 'blue':
......@@ -85,6 +85,7 @@ export default {
font-weight: bold;
color: #ffffff;
margin-bottom: 24rpx;
text-align: center;
}
}
}
......
......@@ -22,7 +22,7 @@
<view class="right-view">
<u-button
:custom-style="customConFirm"
@click="handleClickConFirm"
@click="handleClickConfirm"
class="confirm-button"
>
<view class="image-view">
......@@ -32,6 +32,7 @@
</u-button>
</view>
</view>
<u-toast ref="uToast" />
</view>
</template>
......@@ -97,6 +98,9 @@ export default {
},
},
onLoad(options) {
// 测试数据
// options.cardId = '1551401777033641984'
// if (options && options.shareUserId) {
// this.shareUserId = options.shareUserId
// }
......@@ -141,13 +145,10 @@ export default {
},
operateCall() {
this.loading = true
getBusinessCard({
operateCall({
businessCardId: this.cardId,
})
.then((res) => {
if (res.data) {
this.info = res.data
}
this.loading = false
})
.catch((res) => {
......@@ -156,13 +157,10 @@ export default {
},
operateView() {
this.loading = true
getBusinessCard({
operateView({
businessCardId: this.cardId,
})
.then((res) => {
if (res.data) {
this.info = res.data
}
this.loading = false
})
.catch((res) => {
......@@ -171,13 +169,10 @@ export default {
},
operateJoinList() {
this.loading = true
getBusinessCard({
operateJoinList({
businessCardId: this.cardId,
})
.then((res) => {
if (res.data) {
this.info = res.data
}
this.loading = false
})
.catch((res) => {
......@@ -185,9 +180,29 @@ export default {
})
},
handleClickCall() {
if (this.info.phone) {
uni.makePhoneCall({
phoneNumber: this.info.phone,
})
}
this.operateCall()
},
handleClickConfirm() {
uni.addPhoneContact({
nickName: this.info.name,
mobilePhoneNumber: this.info.phone,
success: () => {
this.$refs.uToast.show({
title: '保存成功',
type: 'success',
duration: 1500,
callback: () => {},
})
},
fail: () => {
console.log('fail')
},
})
this.operateJoinList()
},
// 朋友圈
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment