|
@@ -2,7 +2,8 @@
|
|
|
<view class="page" :style="{height:height}">
|
|
<view class="page" :style="{height:height}">
|
|
|
|
|
|
|
|
<!-- #ifdef H5-->
|
|
<!-- #ifdef H5-->
|
|
|
- <uni-nav-bar v-if="!$isWxBrowser()" :fixed="true" background-color="#FFE05C" :border="false" :statusBar="false" title="个人中心"/>
|
|
|
|
|
|
|
+ <uni-nav-bar v-if="!$isWxBrowser()" :fixed="true" background-color="#FFE05C" :border="false" :statusBar="false"
|
|
|
|
|
+ title="个人中心" />
|
|
|
<!-- #endif -->
|
|
<!-- #endif -->
|
|
|
|
|
|
|
|
|
|
|
|
@@ -14,8 +15,8 @@
|
|
|
<view class="flex-col justify-evenly useMsg">
|
|
<view class="flex-col justify-evenly useMsg">
|
|
|
<view class="flex-row">
|
|
<view class="flex-row">
|
|
|
<text class="name">{{userInfo.name}}</text>
|
|
<text class="name">{{userInfo.name}}</text>
|
|
|
-<!-- <view class="tag">{{userInfo.isManager === 1? '拓客经理': userInfo.roleTag == '0' ? '拓客专员': userInfo.roleTag == '1' ? '合作伙伴':'推广人员'}}-->
|
|
|
|
|
-<!-- </view>-->
|
|
|
|
|
|
|
+ <!-- <view class="tag">{{userInfo.isManager === 1? '拓客经理': userInfo.roleTag == '0' ? '拓客专员': userInfo.roleTag == '1' ? '合作伙伴':'推广人员'}}-->
|
|
|
|
|
+ <!-- </view>-->
|
|
|
</view>
|
|
</view>
|
|
|
<view>
|
|
<view>
|
|
|
<text class="phone">电话:{{userInfo.phone}}</text>
|
|
<text class="phone">电话:{{userInfo.phone}}</text>
|
|
@@ -50,18 +51,18 @@
|
|
|
<view class="flex-row justify-center out ">
|
|
<view class="flex-row justify-center out ">
|
|
|
<view class="flex-col statisticsItem "
|
|
<view class="flex-col statisticsItem "
|
|
|
@click="navigateTo('/pages/directPromotionList/directPromotionList')">
|
|
@click="navigateTo('/pages/directPromotionList/directPromotionList')">
|
|
|
-<!-- <view>-->
|
|
|
|
|
-<!-- <image src="/static/my/fuwuTimeLong.png" class="statisticsImg"></image>-->
|
|
|
|
|
-<!-- </view>-->
|
|
|
|
|
|
|
+ <!-- <view>-->
|
|
|
|
|
+ <!-- <image src="/static/my/fuwuTimeLong.png" class="statisticsImg"></image>-->
|
|
|
|
|
+ <!-- </view>-->
|
|
|
<text class="statisticsKey">我的直推(人)</text>
|
|
<text class="statisticsKey">我的直推(人)</text>
|
|
|
<text class="statisticsValue">{{statistics.myMember}}</text>
|
|
<text class="statisticsValue">{{statistics.myMember}}</text>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="flex-row justify-center out leftBorder" v-if="userInfo.roleTag == '0'">
|
|
<view class="flex-row justify-center out leftBorder" v-if="userInfo.roleTag == '0'">
|
|
|
<view class="flex-col statisticsItem " @click="navigateTo('/pages/earningsList/earningsList')">
|
|
<view class="flex-col statisticsItem " @click="navigateTo('/pages/earningsList/earningsList')">
|
|
|
-<!-- <view>-->
|
|
|
|
|
-<!-- <image src="/static/my/benyuerenwu.png" class="statisticsImg"></image>-->
|
|
|
|
|
-<!-- </view>-->
|
|
|
|
|
|
|
+ <!-- <view>-->
|
|
|
|
|
+ <!-- <image src="/static/my/benyuerenwu.png" class="statisticsImg"></image>-->
|
|
|
|
|
+ <!-- </view>-->
|
|
|
<text class="statisticsKey">推广收益(人)</text>
|
|
<text class="statisticsKey">推广收益(人)</text>
|
|
|
<text class="statisticsValue">{{statistics.myEarning}}</text>
|
|
<text class="statisticsValue">{{statistics.myEarning}}</text>
|
|
|
<view v-if="isCanWithdraw" @click.stop="navigateTo('/pages/withdraw/withdraw')">
|
|
<view v-if="isCanWithdraw" @click.stop="navigateTo('/pages/withdraw/withdraw')">
|
|
@@ -74,18 +75,21 @@
|
|
|
|
|
|
|
|
<view class="flex-col justify-start list">
|
|
<view class="flex-col justify-start list">
|
|
|
<uni-list :border="false">
|
|
<uni-list :border="false">
|
|
|
- <uni-list-item v-if="userInfo.isManager == 1" :clickable="true" title="我的分组" to="/pages/myGroup/myGroup" showArrow thumb="/static/my/fenzu.png" thumb-size="sm"/>
|
|
|
|
|
- <uni-list-item v-if="userInfo.isExtensionWorker == 1" :clickable="true" title="推广码" showArrow thumb="/static/my/qr.png" thumb-size="sm" @click="openQrCord"/>
|
|
|
|
|
- <uni-list-item v-if="userInfo.roleTag == 1" :clickable="true" title="购买优惠券" to="/pages/purchaseCoupon/purchaseCoupon" showArrow thumb="/static/my/coupon.png" thumb-size="sm"/>
|
|
|
|
|
|
|
+ <uni-list-item v-if="userInfo.isManager == 1" :clickable="true" title="我的分组" to="/pages/myGroup/myGroup"
|
|
|
|
|
+ showArrow thumb="/static/my/fenzu.png" thumb-size="sm" />
|
|
|
|
|
+ <uni-list-item v-if="userInfo.isExtensionWorker == 1" :clickable="true" title="推广码" showArrow
|
|
|
|
|
+ thumb="/static/my/qr.png" thumb-size="sm" @click="openQrCord" />
|
|
|
|
|
+ <uni-list-item v-if="userInfo.roleTag == 1" :clickable="true" title="购买优惠券"
|
|
|
|
|
+ to="/pages/purchaseCoupon/purchaseCoupon" showArrow thumb="/static/my/coupon.png" thumb-size="sm" />
|
|
|
</uni-list>
|
|
</uni-list>
|
|
|
</view>
|
|
</view>
|
|
|
|
|
|
|
|
-<!-- <button @click="">按钮</button>-->
|
|
|
|
|
|
|
+<!-- <button @click="anniu">按钮</button>-->
|
|
|
|
|
|
|
|
<uni-popup ref="qrCodePopup" type="center" @change="qrCodePopupChange">
|
|
<uni-popup ref="qrCodePopup" type="center" @change="qrCodePopupChange">
|
|
|
<view class="flex-col qrCodePopupView">
|
|
<view class="flex-col qrCodePopupView">
|
|
|
<view class="flex-row justify-center">
|
|
<view class="flex-row justify-center">
|
|
|
-<!-- 标题不要了-->
|
|
|
|
|
|
|
+ <!-- 标题不要了-->
|
|
|
<text class="popupTitle"> </text>
|
|
<text class="popupTitle"> </text>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="xoIcon" @click="closePopup">
|
|
<view class="xoIcon" @click="closePopup">
|
|
@@ -107,23 +111,25 @@
|
|
|
import UniPopup from "../../uni_modules/uni-popup/components/uni-popup/uni-popup";
|
|
import UniPopup from "../../uni_modules/uni-popup/components/uni-popup/uni-popup";
|
|
|
import commonUtils from "../../common/js/utils/commonUtils";
|
|
import commonUtils from "../../common/js/utils/commonUtils";
|
|
|
export default {
|
|
export default {
|
|
|
- components: {UniPopup},
|
|
|
|
|
|
|
+ components: {
|
|
|
|
|
+ UniPopup
|
|
|
|
|
+ },
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
- qrcodeUrl:this.$xcxUrl+'?expandUserId={expandUserId}&ruleId={ruleId}×tamp={timestamp}&type=',
|
|
|
|
|
|
|
+ qrcodeUrl: this.$xcxUrl + '?expandUserId={expandUserId}&ruleId={ruleId}×tamp={timestamp}&type=',
|
|
|
options: {
|
|
options: {
|
|
|
// 指定二维码前景,一般可在中间放logo
|
|
// 指定二维码前景,一般可在中间放logo
|
|
|
- foregroundImagePadding:2,
|
|
|
|
|
- foregroundImageBorderRadius:5,
|
|
|
|
|
|
|
+ foregroundImagePadding: 2,
|
|
|
|
|
+ foregroundImageBorderRadius: 5,
|
|
|
foregroundImageSrc: '/static/logo.png'
|
|
foregroundImageSrc: '/static/logo.png'
|
|
|
},
|
|
},
|
|
|
- qrCreateTime:'',
|
|
|
|
|
- isWxBrowser:false,
|
|
|
|
|
- isCanWithdraw:true,
|
|
|
|
|
|
|
+ qrCreateTime: '',
|
|
|
|
|
+ isWxBrowser: false,
|
|
|
|
|
+ isCanWithdraw: true,
|
|
|
staticsData: {},
|
|
staticsData: {},
|
|
|
userInfo: {},
|
|
userInfo: {},
|
|
|
height: '',
|
|
height: '',
|
|
|
- statistics:{},
|
|
|
|
|
|
|
+ statistics: {},
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
onLoad() {
|
|
onLoad() {
|
|
@@ -140,23 +146,23 @@
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
methods: {
|
|
methods: {
|
|
|
- anniu(){
|
|
|
|
|
|
|
+ anniu() {
|
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
|
- url:'/pages/register/register?roleId=1772472312711086081&parentId=1772471873559068674×tamp=2032242661103'
|
|
|
|
|
|
|
+ url: '/pages/register/register?roleId=1772472312711086081&parentId=1772471873559068674×tamp=2032242661103'
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
- closePopup(){
|
|
|
|
|
|
|
+ closePopup() {
|
|
|
this.$refs.qrCodePopup.close()
|
|
this.$refs.qrCodePopup.close()
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
- formatDate(){
|
|
|
|
|
|
|
+ formatDate() {
|
|
|
this.qrCreateTime = commonUtils.formatDate(new Date())
|
|
this.qrCreateTime = commonUtils.formatDate(new Date())
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
- openQrCord(){
|
|
|
|
|
|
|
+ openQrCord() {
|
|
|
console.log(11111111111111111)
|
|
console.log(11111111111111111)
|
|
|
- this.$api.service.getExtensionId().then(res=>{
|
|
|
|
|
|
|
+ this.$api.service.getExtensionId().then(res => {
|
|
|
let data = {
|
|
let data = {
|
|
|
ruleId: res.data.data,
|
|
ruleId: res.data.data,
|
|
|
expandUserId: this.userInfo.id,
|
|
expandUserId: this.userInfo.id,
|
|
@@ -166,34 +172,35 @@
|
|
|
let regexp = new RegExp("{" + key + "}"); // 构造正则表达式
|
|
let regexp = new RegExp("{" + key + "}"); // 构造正则表达式
|
|
|
this.qrcodeUrl = this.qrcodeUrl.replace(regexp, data[key]); // 执行替换操作
|
|
this.qrcodeUrl = this.qrcodeUrl.replace(regexp, data[key]); // 执行替换操作
|
|
|
}
|
|
}
|
|
|
- if (this.userInfo.isManager === '1'){
|
|
|
|
|
- this.qrcodeUrl = this.qrcodeUrl + '4'
|
|
|
|
|
- }else {
|
|
|
|
|
- this.qrcodeUrl = this.qrcodeUrl + '3'
|
|
|
|
|
|
|
+ if (this.userInfo.isManager == '1') {
|
|
|
|
|
+ this.qrcodeUrl = this.qrcodeUrl + '4' + '&expand1=4'
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.qrcodeUrl = this.qrcodeUrl + '3' + '&expand1=3'
|
|
|
}
|
|
}
|
|
|
this.formatDate()
|
|
this.formatDate()
|
|
|
- console.log('生成的链接',this.qrcodeUrl)
|
|
|
|
|
|
|
+ console.log('生成的链接', this.qrcodeUrl)
|
|
|
this.$refs.qrCodePopup.open()
|
|
this.$refs.qrCodePopup.open()
|
|
|
|
|
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
- qrCodePopupChange(e){
|
|
|
|
|
|
|
+ qrCodePopupChange(e) {
|
|
|
console.log(e)
|
|
console.log(e)
|
|
|
- if (!e.show){
|
|
|
|
|
- this.qrcodeUrl=this.$xcxUrl+'?expandUserId={expandUserId}&ruleId={ruleId}×tamp={timestamp}&type='
|
|
|
|
|
|
|
+ if (!e.show) {
|
|
|
|
|
+ this.qrcodeUrl = this.$xcxUrl +
|
|
|
|
|
+ '?expandUserId={expandUserId}&ruleId={ruleId}×tamp={timestamp}&type='
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
- canWithdraw(){
|
|
|
|
|
- this.$api.service.canWithdraw().then(res=>{
|
|
|
|
|
|
|
+ canWithdraw() {
|
|
|
|
|
+ this.$api.service.canWithdraw().then(res => {
|
|
|
console.log(res)
|
|
console.log(res)
|
|
|
this.isCanWithdraw = res.data.data
|
|
this.isCanWithdraw = res.data.data
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
- exStatistics(){
|
|
|
|
|
- this.$api.service.exStatistics().then(res=>{
|
|
|
|
|
|
|
+ exStatistics() {
|
|
|
|
|
+ this.$api.service.exStatistics().then(res => {
|
|
|
this.statistics = res.data.data
|
|
this.statistics = res.data.data
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|