noAuth.vue 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. <template>
  2. <view class="chart-no-auth">
  3. <image class="img" :src="globalImgUrls.activityNoAuth" mode="widthFix" v-if="authType!=4"></image>
  4. <image class="img-wait" :src="globalImgUrls.chartWait" mode="widthFix" v-else></image>
  5. <block v-if="authType==1">
  6. <view style="margin-bottom:15px">您暂无权限查看图库</view>
  7. <view>若想查看请联系对口销售</view>
  8. <!-- <view>{{info.name}}:{{info.mobile}}</view> -->
  9. <view class="global-btn-yellow-change btn" style="margin-top:30px" @click="handleCall">联系销售</view>
  10. </block>
  11. <block v-if="authType==2">
  12. <view style="margin-bottom:15px">您的权限已到期,暂时无法查看图库</view>
  13. <view>若想继续查看请联系对口销售</view>
  14. <!-- <view>{{info.name}}:{{info.mobile}}</view> -->
  15. <view class="global-btn-yellow-change btn" style="margin-top:30px" @click="handleCall">联系销售</view>
  16. </block>
  17. <block v-if="authType==3">
  18. <view style="margin-bottom:15px">您暂无权限查看图库</view>
  19. <view>若想查看可以申请开通</view>
  20. <view class="global-btn-yellow-change btn" style="margin-top:30px" @click="handleApply">立即申请</view>
  21. </block>
  22. <block v-if="authType==4">
  23. <view style="margin-bottom:15px">您已提交申请</view>
  24. <view>请等待销售人员与您联系</view>
  25. </block>
  26. </view>
  27. </template>
  28. <script>
  29. import {apiApplyPermission} from '@/api/user'
  30. export default {
  31. props: {
  32. info:null
  33. },
  34. computed: {
  35. authType(){
  36. if(!this.info) return
  37. // 该客户为冻结、试用暂停状态;该客户为正式、试用、永续状态,但联系人图表权限未开启或禁用
  38. if(this.info.type==='contact'){
  39. return 1
  40. }
  41. if(this.info.type==='expired'){
  42. return 2
  43. }
  44. if(this.info.type==='apply'&&!this.info.customer_info.has_apply){
  45. return 3
  46. }
  47. if(this.info.type==='apply'&&!this.info.customer_info.has_apply){
  48. return 4
  49. }
  50. }
  51. },
  52. methods: {
  53. handleCall(){
  54. uni.makePhoneCall({
  55. phoneNumber: this.info.mobile,
  56. success: (result) => {},
  57. fail: (error) => {}
  58. })
  59. },
  60. handleApply(){
  61. if(this.info.customer_info.status=='流失'){
  62. apiApplyPermission({
  63. company_name:this.info.customer_info.company_name,
  64. real_name:this.info.customer_info.name,
  65. }).then(res=>{
  66. uni.navigateTo({url:'/pages-applyPermission/applyResult'})
  67. })
  68. return
  69. }
  70. uni.navigateTo({ url: '/pages-applyPermission/applyPermission?source=3' })
  71. }
  72. }
  73. }
  74. </script>
  75. <style lang="scss" scoped>
  76. .chart-no-auth{
  77. padding: 34rpx;
  78. text-align: center;
  79. font-size: $global-font-size-lg;
  80. .img{
  81. width: 100%;
  82. margin-bottom: 50rpx;
  83. }
  84. .img-wait{
  85. width: 186rpx;
  86. margin-bottom: 50rpx;
  87. }
  88. .btn{
  89. width: 380rpx;
  90. line-height: 70rpx;
  91. margin-left: auto;
  92. margin-right: auto;
  93. margin-top: 40rpx;
  94. }
  95. }
  96. </style>