|
|
@@ -117,7 +117,7 @@
|
|
|
</view>
|
|
|
<view class="service-person-option ddflex">
|
|
|
<image src="/static/pages/images/cy_hui.png"></image>
|
|
|
- <view>入司{{recommendCard.inDate?getAgeFn(recommendCard.inDate):1}}年</view>
|
|
|
+ <view>入司{{recommendCard.inDate?monthDayDiff(recommendCard.inDate):'1年'}}</view>
|
|
|
</view>
|
|
|
<view class="service-person-option ddflex">
|
|
|
<image src="/static/pages/images/fw_hui.png"></image>
|
|
|
@@ -142,14 +142,14 @@
|
|
|
</view>
|
|
|
<!-- url="/promote/invite/invite" -->
|
|
|
<view class="box mlist" v-if="userInfos.userType!=1">
|
|
|
- <navigator class="li ddflex" hover-class="none">
|
|
|
+ <button class="li ddflex" open-type="share">
|
|
|
<image src="/static/images/yqhy.png" class="mico"></image>
|
|
|
<view class="fflex">推荐好友</view>
|
|
|
<image src="../../static/pages/images/more.png" class="rico"></image>
|
|
|
- </navigator>
|
|
|
+ </button>
|
|
|
</view>
|
|
|
<view class="box mlist" v-else>
|
|
|
- <navigator class="li ddflex" url="/card/index/index" hover-class="none">
|
|
|
+ <navigator class="li ddflex" @click="toCard()" hover-class="none">
|
|
|
<image src="/static/images/wdmp.png" class="mico"></image>
|
|
|
<view class="fflex">我的名片</view>
|
|
|
<image src="../../static/pages/images/more.png" class="rico"></image>
|
|
|
@@ -180,6 +180,11 @@
|
|
|
<view class="fflex">关于中国人寿</view>
|
|
|
<image src="../../static/pages/images/more.png" class="rico"></image>
|
|
|
</navigator>
|
|
|
+ <navigator class="li ddflex" url="/mine/set/set" hover-class="none">
|
|
|
+ <image src="/static/images/setting.png" class="mico"></image>
|
|
|
+ <view class="fflex">设置中心</view>
|
|
|
+ <image src="../../static/pages/images/more.png" class="rico"></image>
|
|
|
+ </navigator>
|
|
|
</view>
|
|
|
<!-- <footer-copyright></footer-copyright> -->
|
|
|
<view style="height: 80rpx;"></view>
|
|
|
@@ -259,7 +264,7 @@
|
|
|
isShowUpdate: false, //是否显示更新信息弹窗
|
|
|
isUpdateInfo: false, //更新用户信息
|
|
|
isUpdateMobile: false, //绑定手机号
|
|
|
- recommendCard:{},
|
|
|
+ recommendCard:'',
|
|
|
isShowCodePop:false,
|
|
|
isShowBind:false,
|
|
|
myCount:{
|
|
|
@@ -317,13 +322,22 @@
|
|
|
if (this.isLogin) {
|
|
|
this.getMy();
|
|
|
this.getAbout();
|
|
|
- this.getRecommendCard()
|
|
|
this.getMyCount()
|
|
|
this.noLogin = true;
|
|
|
} else {
|
|
|
this.noLogin = false;
|
|
|
}
|
|
|
},
|
|
|
+ onShareAppMessage(res) {
|
|
|
+ if (res.from == 'button') {
|
|
|
+ let userInfo = req.getStorage('userInfo');
|
|
|
+ return {
|
|
|
+ title: userInfo.nickName+'邀请您加入'+this.config.CONFIG_PROJECT_TITLE,
|
|
|
+ path: '/pages/index/index',
|
|
|
+ imageUrl: this.config.CONFIG_PROJECT_LOGO, // 分享图
|
|
|
+ };
|
|
|
+ }
|
|
|
+ },
|
|
|
methods: {
|
|
|
|
|
|
jumpUrl(url) {
|
|
|
@@ -348,27 +362,11 @@
|
|
|
this.userInfos = data;
|
|
|
// that.setData(data); // this.isbindmobile();
|
|
|
console.log('userinfo==' + JSON.stringify(data));
|
|
|
- this.getuserMoney();
|
|
|
+ this.getRecommendCard()
|
|
|
// console.log(this);
|
|
|
});
|
|
|
},
|
|
|
|
|
|
- getuserMoney() {
|
|
|
- let is_open_wallet = JSON.parse(req.getStorage('configRes')).is_open_wallet;
|
|
|
-
|
|
|
- if (is_open_wallet) {
|
|
|
- if (JSON.parse(is_open_wallet).isOpenWallet == 1) {
|
|
|
- route.extendNew({}, res => {
|
|
|
- // console.log(parseFloat(res.all).toFixed(2));
|
|
|
- if (res)
|
|
|
- this.setData({
|
|
|
- userMoney: parseFloat(res.all).toFixed(2)
|
|
|
- });
|
|
|
- });
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
-
|
|
|
getAbout() {
|
|
|
var _this = this;
|
|
|
|
|
|
@@ -451,13 +449,22 @@
|
|
|
// },
|
|
|
// 获取推荐销售
|
|
|
getRecommendCard(){
|
|
|
- req.getRequest('/api/visiting/card/recommendCardInfo',{},res=>{
|
|
|
- this.recommendCard = res
|
|
|
- })
|
|
|
+ if(this.userInfos.userType==1){
|
|
|
+ req.getRequest('/api/visiting/card/userInfo',{},res=>{
|
|
|
+ this.recommendCard = res
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ if(this.userInfos.manageSaleNo){
|
|
|
+ req.getRequest('/api/visiting/card/recommendCardInfo',{},res=>{
|
|
|
+ this.recommendCard = res
|
|
|
+ })
|
|
|
+ }else{
|
|
|
+ this.recommendCard = ''
|
|
|
+ }
|
|
|
+ }
|
|
|
},
|
|
|
- getAgeFn(date){
|
|
|
- console.log('getAge',date)
|
|
|
- return util.getAge(date)
|
|
|
+ monthDayDiff(date){
|
|
|
+ return util.monthDayDiff(date)
|
|
|
},
|
|
|
// 拨打电话
|
|
|
callPhone(val) {
|
|
|
@@ -486,6 +493,25 @@
|
|
|
req.getRequest('/api/my/count',{},res=>{
|
|
|
this.myCount = res
|
|
|
})
|
|
|
+ },
|
|
|
+ toCard(){
|
|
|
+ if(this.recommendCard){
|
|
|
+ if(this.recommendCard.auditState==0){
|
|
|
+ // 待审核
|
|
|
+ this.jumpUrl('card/success/success?state=0')
|
|
|
+ return false
|
|
|
+ }else if(this.recommendCard.auditState==1){
|
|
|
+ // 审核成功
|
|
|
+ this.jumpUrl('card/success/success?state=1')
|
|
|
+ return false
|
|
|
+ }else if(this.recommendCard.auditState==2){
|
|
|
+ // 审核失败
|
|
|
+ this.jumpUrl('card/success/success?state=2&&msg='+this.recommendCard.auditFailReason)
|
|
|
+ return false
|
|
|
+ }
|
|
|
+ }else{
|
|
|
+ this.jumpUrl('card/create/create')
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
created() {
|