123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115 |
- <template>
- <view class="voice-no-auth">
- <image class="img" :src="globalImgUrls.activityNoAuth" mode="widthFix"></image>
- <template v-if="userInfo&&userInfo.is_bind==0">
- <view style="margin-bottom:15px">您尚未登录,请登录后查看更多信息</view>
- <view class="global-btn-yellow-change btn" @click="handleGoLogin">立即登录</view>
- </template>
- <template v-else>
- <view style="margin-bottom:15px">您暂无权限查看线上路演</view>
- <view v-if="info.type==='contact'" style="margin-bottom:15px">若想查看可以联系对口销售</view>
- <view v-else style="margin-bottom:15px">若想查看可以申请开通</view>
- <view v-if="info.type==='contact'">
- {{info.name||''}}:<text @click="handleCall" style="color:#E3B377">{{info.mobile||''}}</text>
- </view>
- <view class="global-btn-yellow-change btn" @click="handleApply" v-else style="margin-top:30px">立即申请</view>
- </template>
- </view>
- </template>
- <script>
- import {apiApplyPermission} from '@/api/user'
- export default {
- props: {
- info:null
- },
- watch:{
- info(){
- this.handleAutoApply()
- }
- },
- computed: {
- userInfo() {
- return this.$store.state.user.userInfo;
- }
- },
- methods: {
- handleCall(){
- uni.makePhoneCall({
- phoneNumber: this.info.mobile,
- success: (result) => {},
- fail: (error) => {}
- })
- },
- handleAutoApply(){
- if(this.info.type=='contact'&&!this.info.customer_info.has_apply){
- if(this.info.customer_info.status=='冻结'||(this.info.customer_info.status=='试用'&&this.info.customer_info.is_suspend==1)){
- apiApplyPermission({
- company_name:this.info.customer_info.company_name,
- real_name:this.info.customer_info.name,
- source:10,
- from_page:'线上路演'
- }).then(res=>{
- if(res.code===200){
- console.log('主动申请成功');
- }
- })
- }
- }
- },
-
- handleGoLogin(){
- uni.navigateTo({
- url:'/pages/login?from=tologin'
- })
- },
- async handleApply(){
- await this.checkUserIsBind()
- const {customer_info}=this.info
- if(customer_info.has_apply){
- uni.showToast({
- title:'您已提交过申请,请耐心等待',
- icon:'none'
- })
- }else{
- if (!customer_info.status || customer_info.status != '流失'|| customer_info.status != '关闭') {
- uni.navigateTo({
- url: "/pages-applyPermission/applyPermission?source=10&from_page=线上路演"
- })
- }else{
- apiApplyPermission({
- company_name:customer_info.company_name,
- real_name:customer_info.name,
- source:10,
- from_page:'线上路演'
- }).then(res=>{
- uni.navigateTo({url:'/pages-applyPermission/applyResult'})
- })
- }
- }
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .voice-no-auth{
- padding: 34rpx;
- text-align: center;
- font-size: $global-font-size-lg;
- .img{
- width: 100%;
- margin-bottom: 50rpx;
- }
- .btn{
- width: 380rpx;
- line-height: 70rpx;
- margin-left: auto;
- margin-right: auto;
- margin-top: 40rpx;
- }
- }
- </style>
|