This commit is contained in:
唐明明
2024-04-29 10:24:46 +08:00
parent 70c5d15d44
commit ea4949e588
12 changed files with 357 additions and 109 deletions

View File

@@ -141,11 +141,14 @@
<view class="block-flex-title">业务联系人</view>
<view>{{userData.salesman.nickname || '-'}}</view>
</view>
<!-- v-if="userData.identity.id > 1" -->
<view class="block-flex" @click="$Router.push({name: 'Tema'})">
<view class="block-flex" @click="$Router.push({name: 'Tema'})" v-if="userData.identity.id > 1">
<view class="block-flex-title">我的推荐</view>
<u-icon name="arrow-right"></u-icon>
</view>
<view class="block-flex" @click="qrcodeShow = true">
<view class="block-flex-title">我的邀请码</view>
<u-icon name="arrow-right"></u-icon>
</view>
<view class="tool">
<view class="tool-title">
其他工具
@@ -204,13 +207,27 @@
</view>
</view>
</view>
</view>
</view>
<!-- 邀请码 -->
<u-popup mode="center" closeable :show="qrcodeShow" @close="qrcodeShow = false">
<view class="qrcode">
<image class="qrcode-bg" src="/static/qrcode_bg.png" mode="widthFix"></image>
<view class="qrcode-content">
<image class="qrcode-src" :src="qrcode.qrcode" mode="aspectFit"></image>
<view class="qrcode-footer">
<view class="qrcode-code">{{qrcode.invite}}</view>
<view class="qrcode-text">邀请码</view>
</view>
</view>
</view>
</u-popup>
</view>
</template>
<script>
import { articleList } from '@/apis/interfaces/index'
import { userIndex } from '@/apis/interfaces/user'
import { userIndex, userQrcode } from '@/apis/interfaces/user'
import { synthesisCount } from '@/apis/interfaces/synthesis'
export default {
data() {
@@ -225,7 +242,9 @@
synthesisAll : '', // 综法数量
listArr : [], // 文章列表
page : {}, // 分页信息
lodingStats : false, // 加载状态
lodingStats : false, // 加载状态
qrcodeShow : false, // 弹出层
qrcode : ''
};
},
@@ -245,15 +264,16 @@
methods:{
// 用户信息
userInfo() {
userIndex().then(res => {
this.userData = res
}).catch(err => {
uni.showToast({
title: err.message,
icon: "none"
})
})
userInfo() {
Promise.all([userIndex(), userQrcode()]).then(res => {
this.userData = res[0]
this.qrcode = res[1]
}).catch(err => {
uni.showToast({
title: err.message,
icon: "none"
})
})
},
// 拨打电话
@@ -302,6 +322,25 @@
</script>
<style lang="scss" scoped>
.qrcode{
width: 600rpx;
position: relative;
.qrcode-bg{ width: 100%; vertical-align: top; }
.qrcode-content{
position: absolute;
top: 290rpx;
left: 0;
right: 0;
width: 100%;
text-align: center;
.qrcode-src{ width: 220rpx; height: 220rpx; background: #333; }
.qrcode-footer{ width: 100%; padding-top: 30rpx; text-align: center; }
.qrcode-code{ font-weight: bold; font-size: 34rpx; }
.qrcode-text{ font-size: 28rpx; color: gray; line-height: 30rpx; }
}
}
.block-flex{
display: flex; color: gray; font-size: 32rpx; align-items: center; justify-content: space-between; padding: 20rpx 30rpx; line-height: 60rpx;
&-title{ color: #333; }