zhaojs
2023-06-30 ba3d748f9eb65a66fca9bd74fc7796b90a0a70ae
uniapp/pages/rankinglist/common_act.vue
@@ -1,16 +1,24 @@
<template>
   <view>
      <web-view :webview-styles="webviewStyles" :src="webviewUrl" @message='received'></web-view>
      <web-view v-if="webshow" :webview-styles="webviewStyles" :src="webviewUrl" @message='received'></web-view>
      <!-- taobao -->
      <u-popup v-model="empowerModel" mode="center" border-radius="12">
        <empowerModel @closemodel='closeMdl' @updataInfo='updataUser'></empowerModel>
      </u-popup>
   </view>
   
</template>
<script>
    import empowerModel from '../../components/empowerModel.vue'
   var wv;
   export default {
      components: {
        empowerModel
      },
      data() {
         return {
            webshow:true,
            empowerModel: false,
            webviewUrl: '',
            user:'',
@@ -32,7 +40,6 @@
             this.user = value;
            if(options.t_url)
            {
               console.log(encodeURI(decodeURIComponent(options.t_url)+"?token="+value.token+"&userid="+value.id));
               this.webviewUrl = encodeURI(decodeURIComponent(options.t_url)+"?token="+value.token+"&userid="+value.id);
            }
         }
@@ -46,9 +53,15 @@
         
         received(e) {
            var res=e.detail.data[0];
             if(res.action=='back')
            console.log(res);
            switch(res.action)
            {
               this.backLast();
               case "back":
                  this.backLast();
                  break;
               case "tbauth":
                  this.openTbMd();
                  break;
            }
         },
         backLast()
@@ -57,6 +70,22 @@
               delta: 1
            });
         },
         closeMdl() {
           this.empowerModel = false;
           this.webshow=true;
         },
         openTbMd()
         {
            this.webshow=false;
             this.empowerModel = true
         },
         updataUser() {
           var that = this;
           this.$u.api.getUserInfo({}).then(e => {
             utils.setCache('userInfo', e.data.userinfo)
             that.user = e.data.userinfo;
           }).catch(function(err) {})
         },
         // 关闭mui返回
           clearMuiBack() {
             // #ifdef APP-PLUS