noAuth.vue 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. <template>
  2. <view class="voice-no-auth">
  3. <image class="img" :src="globalImgUrls.activityNoAuth" mode="widthFix"></image>
  4. <view style="margin-bottom:15px">您暂无权限查看线上路演</view>
  5. <view v-if="info.type==='contact'" style="margin-bottom:15px">若想查看可以联系对口销售</view>
  6. <view v-else style="margin-bottom:15px">若想查看可以申请开通</view>
  7. <view v-if="info.type==='contact'">
  8. {{info.name||''}}:<text @click="handleCall" style="color:#E3B377">{{info.mobile||''}}</text>
  9. </view>
  10. <view class="global-btn-yellow-change btn" @click="handleApply" v-else style="margin-top:30px">立即申请</view>
  11. </view>
  12. </template>
  13. <script>
  14. import {apiApplyPermission} from '@/api/user'
  15. export default {
  16. props: {
  17. info:null
  18. },
  19. watch:{
  20. info(){
  21. this.handleAutoApply()
  22. }
  23. },
  24. methods: {
  25. handleCall(){
  26. uni.makePhoneCall({
  27. phoneNumber: this.info.mobile,
  28. success: (result) => {},
  29. fail: (error) => {}
  30. })
  31. },
  32. handleAutoApply(){
  33. if(this.info.type=='contact'&&!this.info.customer_info.has_apply){
  34. if(this.info.customer_info.status=='冻结'||(this.info.customer_info.status=='试用'&&this.info.customer_info.is_suspend==1)){
  35. apiApplyPermission({
  36. company_name:this.info.customer_info.company_name,
  37. real_name:this.info.customer_info.name,
  38. source:10,
  39. from_page:'线上路演'
  40. }).then(res=>{
  41. if(res.code===200){
  42. console.log('主动申请成功');
  43. }
  44. })
  45. }
  46. }
  47. },
  48. async handleApply(){
  49. await this.checkUserIsBind()
  50. const {customer_info}=this.info
  51. if(customer_info.has_apply){
  52. uni.showToast({
  53. title:'您已提交过申请,请耐心等待',
  54. icon:'none'
  55. })
  56. }else{
  57. if (!customer_info.status || customer_info.status != '流失') {
  58. uni.navigateTo({
  59. url: "/pages-applyPermission/applyPermission?source=10&from_page=线上路演"
  60. })
  61. }else{
  62. apiApplyPermission({
  63. company_name:customer_info.company_name,
  64. real_name:customer_info.name,
  65. source:10,
  66. from_page:'线上路演'
  67. }).then(res=>{
  68. uni.navigateTo({url:'/pages-applyPermission/applyResult'})
  69. })
  70. }
  71. }
  72. }
  73. }
  74. }
  75. </script>
  76. <style lang="scss" scoped>
  77. .voice-no-auth{
  78. padding: 34rpx;
  79. text-align: center;
  80. font-size: $global-font-size-lg;
  81. .img{
  82. width: 100%;
  83. margin-bottom: 50rpx;
  84. }
  85. .btn{
  86. width: 380rpx;
  87. line-height: 70rpx;
  88. margin-left: auto;
  89. margin-right: auto;
  90. margin-top: 40rpx;
  91. }
  92. }
  93. </style>