Переглянути джерело

Merge branch 'develop' into release/v5.4.1

zengzhixiang 2 роки тому
батько
коміт
18288388da

+ 1 - 1
.env.test

@@ -10,7 +10,7 @@ API_URL_BROWSER = "/api"
 FILE_PREFIX = "/"
 FILE_HOST = "file.phone.androidscloud.com"
 FILE_PORT = 8121
-FILE_UPLOAD_KEY = "3dn9b4585511476691c6"
+FILE_UPLOAD_KEY = "13d0arghebcc4cm49cf04"
 FILE_HTTPS = true
 
 # 友盟统计

BIN
assets/image/activity/invite-user/bg-3@2x.png


BIN
assets/image/activity/invite-user/cybz-content-3@2x.png


+ 40 - 13
pages/activity/invite-user/index.vue

@@ -2,22 +2,14 @@
   <v-container class="invite-user" fluid :class="`bg-${type}`">
     <activity-invite-user-box class="box1">
       <template #title>参与步骤</template>
-      <v-img
-        v-if="type === 1"
-        class="cybz-content"
-        src="~/assets/image/activity/invite-user/cybz-content@2x.png"
-      />
-      <v-img
-        v-else-if="type === 2"
-        class="cybz-content"
-        src="~/assets/image/activity/invite-user/cybz-content-2@2x.png"
-      />
+      <v-img class="cybz-content" :src="contentImg" />
       <div class="cybz-content-text">
         <div class="cybz-content-text-item">分享好友</div>
         <div class="cybz-content-text-item">邀请购买云机</div>
         <div class="cybz-content-text-item">
           <template v-if="type === 1">返星币换现金</template>
           <template v-else-if="type === 2">返云手机时长</template>
+          <template v-else-if="type === 3">返积分</template>
         </div>
       </div>
       <v-btn class="share-button" rounded @click="share()">
@@ -229,6 +221,13 @@ export default {
     // },
   },
   computed: {
+    contentImg() {
+      return {
+        1: require('@/assets/image/activity/invite-user/cybz-content@2x.png'),
+        2: require('@/assets/image/activity/invite-user/cybz-content-2@2x.png'),
+        3: require('@/assets/image/activity/invite-user/cybz-content-3@2x.png'),
+      }[this.type];
+    },
     codeHasMore() {
       return (
         this.codeTotal < 0 ||
@@ -280,6 +279,29 @@ export default {
             // { label: '可提现星币数量', value: this.data.withdrawStarCoinNum },
           ];
         }
+        case 3: {
+          return [
+            {
+              label: '今日获取的积分',
+              value: this.data.todayIncomeIntegral,
+            },
+            { label: '总积分', value: this.data.totalIncomeIntegral },
+            {
+              label: '今日购买订单数',
+              value: this.data.todayBuyOrderSuccessCount,
+            },
+            { label: '累计推广订单', value: this.data.totalBuyOrderCount },
+            {
+              label: '今日购买成功客户',
+              value: this.data.todayBuyOrderSuccessCount,
+            },
+            {
+              label: '累计购买成功客户',
+              value: this.data.totalBuyOrderSuccessCount,
+            },
+            // { label: '可提现星币数量', value: this.data.withdrawStarCoinNum },
+          ];
+        }
         default: {
           return [];
         }
@@ -402,9 +424,11 @@ export default {
       }
     },
     async getActivityRules() {
-      const agreementCoding = { 1: 'iuserrules01', 2: 'iuserrules02' }[
-        this.type
-      ];
+      const agreementCoding = {
+        1: 'iuserrules01',
+        2: 'iuserrules02',
+        3: 'iuserrules03',
+      }[this.type];
       if (agreementCoding) {
         const res = await this.$axios.$get(
           '/public/v5/agreementApi/content/getContentByType',
@@ -455,6 +479,9 @@ export default {
   &.bg-2 {
     background-image: url('~/assets/image/activity/invite-user/bg-2@2x.png');
   }
+  &.bg-3 {
+    background-image: url('~/assets/image/activity/invite-user/bg-3@2x.png');
+  }
 }
 
 // .box {

+ 3 - 0
pages/activity/invite-user/register.vue

@@ -170,6 +170,9 @@ export default {
   &.type-2 {
     background-image: url('~/assets/image/activity/invite-user/bg-2@2x.png');
   }
+  &.type-3 {
+    background-image: url('~/assets/image/activity/invite-user/bg-3@2x.png');
+  }
 }
 // .box {
 //   width: 373px;

+ 11 - 11
plugins/file-center.js

@@ -3,17 +3,17 @@ import qs from 'qs';
 // import url from 'url';
 
 
-let baseURL;
-if (process.env.NODE_ENV === 'development') {
-  // 开发环境通过本地代理
-  // baseURL = process.env.FILE_PREFIX;
-  baseURL = '/file';
-} else {
-  // 部署环境通过域名直连
-  baseURL = `http${process.env.FILE_HTTPS === 'true' ? 's' : ''}://${
-    process.env.FILE_HOST
-  }:${process.env.FILE_PORT}/${process.env.FILE_PREFIX}`;
-}
+// let baseURL;
+// if (process.env.NODE_ENV === 'development') {
+//   // 开发环境通过本地代理
+//   // baseURL = process.env.FILE_PREFIX;
+//   baseURL = '/file';
+// } else {
+//   // 部署环境通过域名直连
+// }
+const baseURL = `http${process.env.FILE_HTTPS === 'true' ? 's' : ''}://${
+  process.env.FILE_HOST
+}:${process.env.FILE_PORT}/${process.env.FILE_PREFIX}`;
 
 
 

+ 5 - 0
static/screenAndroid/WXdraw.js

@@ -319,6 +319,11 @@ function doConnectDirectives() {
 
       return;
     }
+
+    if (result.type === 'reProduceText') {
+      // 接收到云机剪贴板复制事件
+      window.copyToClipboard(result.data.text);
+    }
   };
 }
 $('body').on('click', function () {

+ 40 - 21
static/screenAndroid/WXtrialInterface.html

@@ -46,6 +46,7 @@
     <script src="../static/lib/swiper/swiper-bundle.js"></script> -->
     <script src="../static/lib/doT-1.1.3/doT.min.js"></script>
     <script src="../static/lib/qs.js"></script>
+    <script src="../static/lib/copy-to-clipboard.js"></script>
   </head>
 
   <body class="scroll h-player" style="overscroll-behavior: contain">
@@ -63,7 +64,7 @@
       {{~}}
     </template>
     <template id="template-shear">
-      {{? it.length}}
+      {{? it.length }}
       <div class="title">
         剪贴板
         <div class="btn-clear">清空</div>
@@ -129,11 +130,11 @@
           <div class="menu-btn PictureQuality avit" data-id="3">标清</div>
           <div class="menu-btn PictureQuality" data-id="2">极速</div>
         </div>
-        <!-- <div class="">
+        <div class="open-set-phone-size-dialog-btn-wrap">
           <div class="menu-btn" id="open-set-phone-size-dialog-btn">
             <span>分辨率</span>
           </div>
-        </div> -->
+        </div>
         <div class="operation">
           <div class="upload" id="showsuss" data-text="uploads">
             <img src="../static/img/wx/shangchuan_icon.png" />
@@ -1702,6 +1703,10 @@
           systemBuriedPoint('激活码-强制关闭-继续观看');
         }
       });
+      window.onbeforeunload = function () {
+        wsss.close();
+        ws.close();
+      };
       // 埋点
       function systemBuriedPoint(pointName) {
         $.ajax({
@@ -1733,10 +1738,7 @@
           });
         }
       }
-      window.onbeforeunload = function () {
-        ws.close();
-        wsss.close();
-      };
+
       function updatePhoneSizeListHtml() {
         const templatePhoneSizeItem = doT.template(
           $('#template-phone-size-item').html().replace(/&amp;/g, '&'),
@@ -1753,7 +1755,9 @@
         });
         $('#phone-size-list').html(phoneSizeListItemsHtml);
       }
-      $('#open-set-phone-size-dialog-btn').on('click', function (e) {
+
+      $('#open-set-phone-size-dialog-btn').on('click', async function (e) {
+        !window.phoneSizeList.length && (await getPhoneSizeList());
         window.activePhoneSize = window.currentPhoneSize;
         updatePhoneSizeListHtml();
         $('#set-phone-size-dialog').addClass('show');
@@ -1771,8 +1775,8 @@
       // 选中的分辨率
       // window.activePhoneSize = window.currentPhoneSize;
 
-      function getPhoneSizeList() {
-        return $.ajax({
+      async function getPhoneSizeList() {
+        const response = await $.ajax({
           url:
             baseUrl + '/api/resources/v5/machine/resolution/getResolvingPower',
           headers: {
@@ -1783,18 +1787,29 @@
           data: {
             userCardId,
           },
-        }).then(function (response) {
-          return response.data.map(function (v) {
-            return {
-              id: v.id,
-              dpi: v.dpi,
-              width: v.width,
-              height: v.high,
-            };
-          });
         });
-      }
 
+        const phoneSizeList = response.data.map(function (v) {
+          return {
+            id: v.id,
+            dpi: v.dpi,
+            width: v.width,
+            height: v.high,
+          };
+        });
+        window.phoneSizeList = phoneSizeList;
+
+        // 关联上当前云机分辨率
+        const currentPhoneSize = phoneSizeList.find(function (v) {
+          return (
+            window.currentPhoneSize &&
+            v.width === window.currentPhoneSize.width &&
+            v.height === window.currentPhoneSize.height &&
+            v.dpi === window.currentPhoneSize.dpi
+          );
+        });
+        window.currentPhoneSize = currentPhoneSize || window.currentPhoneSize;
+      }
       /*
       getPhoneSizeList().then(function (phoneSizeList) {
         window.phoneSizeList = phoneSizeList;
@@ -1812,7 +1827,6 @@
         // return updatePhoneSizeListHtml();
       });
       */
-
       // const phoneSizeListSwiper = new Swiper('#phone-size-list-swiper', {
       //   direction: 'vertical',
       //   slidesPerView: 'auto',
@@ -1845,6 +1859,7 @@
             },
           }),
         );
+        // XXX: 去除了,改为中台发送
         // 通知其他在线端
         // wsss.send(
         //   JSON.stringify({
@@ -1870,6 +1885,10 @@
       // });
       $('#phone-size-list').on('click', '.phone-size-item', function (e) {
         const data = $(e.currentTarget).data();
+        // console.log(
+        //   '🚀 ~ file: WXtrialInterface.html ~ line 1494 ~ data',
+        //   data,
+        // );
         window.activePhoneSize = data;
         updatePhoneSizeListHtml();
         // setPhoneSize(data.width, data.height);

+ 5 - 0
static/screenIos/WXdraw.js

@@ -327,6 +327,11 @@ function doConnectDirectives() {
 
       return;
     }
+
+    if (result.type === 'reProduceText') {
+      // 接收到云机剪贴板复制事件
+      window.copyToClipboard(result.data.text);
+    }
   };
 }
 $('body').on('click', function () {

+ 28 - 14
static/screenIos/WXtrialInterface.html

@@ -47,6 +47,7 @@
     <script src="../static/lib/swiper/swiper-bundle.js"></script> -->
     <script src="../static/lib/doT-1.1.3/doT.min.js"></script>
     <script src="../static/lib/qs.js"></script>
+    <script src="../static/lib/copy-to-clipboard.js"></script>
   </head>
 
   <body class="scroll h-player" style="overscroll-behavior: contain">
@@ -108,11 +109,11 @@
           <div class="menu-btn PictureQuality avit" data-id="3">标清</div>
           <div class="menu-btn PictureQuality" data-id="2">极速</div>
         </div>
-        <!-- <div class="open-set-phone-size-dialog-btn-wrap">
+        <div class="open-set-phone-size-dialog-btn-wrap">
           <div class="menu-btn" id="open-set-phone-size-dialog-btn">
             <span>分辨率</span>
           </div>
-        </div> -->
+        </div>
         <div class="operation">
           <div class="upload" id="showsuss" data-text="uploads">
             <img src="../static/img/wx/shangchuan_icon.png" />
@@ -1554,7 +1555,8 @@
         $('#phone-size-list').html(phoneSizeListItemsHtml);
       }
 
-      $('#open-set-phone-size-dialog-btn').on('click', function (e) {
+      $('#open-set-phone-size-dialog-btn').on('click', async function (e) {
+        !window.phoneSizeList.length && (await getPhoneSizeList());
         window.activePhoneSize = window.currentPhoneSize;
         updatePhoneSizeListHtml();
         $('#set-phone-size-dialog').addClass('show');
@@ -1572,8 +1574,8 @@
       // 选中的分辨率
       // window.activePhoneSize = window.currentPhoneSize;
 
-      function getPhoneSizeList() {
-        return $.ajax({
+      async function getPhoneSizeList() {
+        const response = await $.ajax({
           url:
             baseUrl + '/api/resources/v5/machine/resolution/getResolvingPower',
           headers: {
@@ -1584,16 +1586,28 @@
           data: {
             userCardId,
           },
-        }).then(function (response) {
-          return response.data.map(function (v) {
-            return {
-              id: v.id,
-              dpi: v.dpi,
-              width: v.width,
-              height: v.high,
-            };
-          });
         });
+
+        const phoneSizeList = response.data.map(function (v) {
+          return {
+            id: v.id,
+            dpi: v.dpi,
+            width: v.width,
+            height: v.high,
+          };
+        });
+        window.phoneSizeList = phoneSizeList;
+
+        // 关联上当前云机分辨率
+        const currentPhoneSize = phoneSizeList.find(function (v) {
+          return (
+            window.currentPhoneSize &&
+            v.width === window.currentPhoneSize.width &&
+            v.height === window.currentPhoneSize.height &&
+            v.dpi === window.currentPhoneSize.dpi
+          );
+        });
+        window.currentPhoneSize = currentPhoneSize || window.currentPhoneSize;
       }
       /*
       getPhoneSizeList().then(function (phoneSizeList) {

Різницю між файлами не показано, бо вона завелика
+ 1 - 0
static/static/lib/copy-to-clipboard.js