jwyu 3 tahun lalu
induk
melakukan
aa0f20e3d2
3 mengubah file dengan 36 tambahan dan 3 penghapusan
  1. 1 1
      pages-activity/noAuthority.vue
  2. 26 1
      pages/activity/activity.vue
  3. 9 1
      pages/user/user.vue

+ 1 - 1
pages-activity/noAuthority.vue

@@ -72,7 +72,7 @@ export default {
                         })
                         if(res.code===200){
                             this.pupData.show=true
-					        this.pupData.content=`<p style="padding-top:20px">您已提交过申请,请耐心等待</p>`
+					        this.pupData.content=`<p>申请已提交</p><p>请等待销售人员与您联系</p>`
                             // uni.redirectTo({
                             //     url:"/pages-applyPermission/applyResult"
                             // })

+ 26 - 1
pages/activity/activity.vue

@@ -324,8 +324,21 @@ export default {
                 this.pupData.show=true
             }else if(res.code===403){
                 if(res.data.type=='contact'){
+                    if(!res.data.customer_info.has_apply){
+                        if(res.data.customer_info.status=='冻结'||(res.data.customer_info.status=='试用'&&res.data.customer_info.is_suspend==1)){
+                            apiApplyPermission({
+                                company_name:res.data.customer_info.company_name,
+                                real_name:res.data.customer_info.name,
+                            }).then(res=>{
+                                if(res.code===200){
+                                    console.log('主动申请成功');
+                                }
+                            }) 
+                        }
+                    }
                     this.pupData.content=`<p>您暂无权限参加此会议,若想参加请联系对口销售--${res.data.name}:${res.data.mobile}</p>`
                     this.pupData.mobile=res.data.mobile
+
                 }else if(res.data.type=='apply'){
                     this.pupData.content=`<p style="margin-top:20px">您暂无权限参加此会议,若想参加可以申请开通哦</p>`
                 }
@@ -387,6 +400,18 @@ export default {
                 this.pupData.show=true
             }else if(res.code===403){
                 if(res.data.type=='contact'){
+                    if(!res.data.customer_info.has_apply){
+                        if(res.data.customer_info.status=='冻结'||(res.data.customer_info.status=='试用'&&res.data.customer_info.is_suspend==1)){
+                            apiApplyPermission({
+                                company_name:res.data.customer_info.company_name,
+                                real_name:res.data.customer_info.name,
+                            }).then(res=>{
+                                if(res.code===200){
+                                    console.log('主动申请成功');
+                                }
+                            }) 
+                        }
+                    }
                     this.pupData.content=`<p>您暂无权限参加此活动,若想参加请联系对口销售--${res.data.name}:${res.data.mobile}</p>`
                     this.pupData.mobile=res.data.mobile
                 }else if(res.data.type=='apply'){
@@ -439,7 +464,7 @@ export default {
                         real_name:this.pupData.customer_info.name,
                     })
                     if(res.code===200){
-                        this.pupData.content=`<p style="padding-top:20px">您已提交过申请,请耐心等待</p>`
+                        this.pupData.content=`<p>申请已提交</p><p>请等待销售人员与您联系</p>`
                         this.pupData.type=''
                     }
                 }

+ 9 - 1
pages/user/user.vue

@@ -68,7 +68,7 @@
 
 <script>
 	const moment=require('@/utils/moment-with-locales.min')
-	import {apiLastApplyRecord} from '@/api/user'
+	import {apiLastApplyRecord,apiApplyPermission} from '@/api/user'
 	export default {
 		computed: {
 			lastTime(){
@@ -124,6 +124,14 @@
 			},
 
 			handleContact(){
+				apiApplyPermission({
+                    company_name:this.userInfo.company_name,
+                    real_name:this.userInfo.real_name,
+                }).then(res=>{
+                    if(res.code===200){
+                        console.log('主动申请成功');
+                    }
+                }) 
 				uni.makePhoneCall({
 					phoneNumber: this.userInfo.seal_mobile
 				});