noAuth.vue 2.7 KB

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