Browse Source

合并5.8.1相关代码

leo 1 year ago
parent
commit
6912897f98
34 changed files with 139 additions and 79 deletions
  1. 2 0
      .env.production
  2. 2 0
      .env.test
  3. 3 0
      .env.uat
  4. BIN
      assets/image/claimCloudPhone/Invitee-to-claim.png
  5. BIN
      assets/image/claimCloudPhone/Inviting-others-img.png
  6. BIN
      assets/image/claimCloudPhone/bg.png
  7. BIN
      assets/image/claimCloudPhone/claim-mobile-phone-btn.png
  8. BIN
      assets/image/claimCloudPhone/first-reward-1.png
  9. BIN
      assets/image/claimCloudPhone/first-reward-2.png
  10. BIN
      assets/image/claimCloudPhone/first-reward-3.png
  11. BIN
      assets/image/claimCloudPhone/first-reward-container-privilege.png
  12. BIN
      assets/image/claimCloudPhone/first-reward-img.png
  13. BIN
      assets/image/claimCloudPhone/inviter-exit.png
  14. BIN
      assets/image/claimCloudPhone/purchase-img.png
  15. BIN
      assets/image/claimCloudPhone/second-reward-img.png
  16. BIN
      assets/image/claimCloudPhone/second-reward-title.png
  17. 1 1
      assets/style/main.scss
  18. 0 1
      components/layout/index.vue
  19. 2 1
      components/lottie/index.vue
  20. 5 0
      components/verifition/Verify/VerifySlide.vue
  21. 1 1
      pages/claimCloudPhone/chooseCloudPhone.vue
  22. 49 19
      pages/claimCloudPhone/components/bargainingAssistance.vue
  23. 0 8
      pages/claimCloudPhone/components/layout.vue
  24. 1 1
      pages/claimCloudPhone/components/setMealItem.vue
  25. 2 2
      pages/claimCloudPhone/confirmation.vue
  26. 2 2
      pages/claimCloudPhone/firstReward.vue
  27. 3 3
      pages/claimCloudPhone/index.vue
  28. 2 2
      pages/claimCloudPhone/inviteeExits.vue
  29. 14 1
      pages/claimCloudPhone/mixins/common.js
  30. 24 18
      pages/claimCloudPhone/purchase.vue
  31. 11 10
      pages/claimCloudPhone/secondReward.vue
  32. 1 1
      pages/claimCloudPhone/_type.vue
  33. 3 3
      pages/claimCloudPhone/zeroYuanClaim.vue
  34. 11 5
      plugins/plugins.js

+ 2 - 0
.env.production

@@ -27,3 +27,5 @@ QIYUKF_TEMPLATE_ID = "6635862"
 
 IMG_URL = "https://www.androidscloud.com:9001/cloud/picture/assist"
 
+H5_URL = "https://client.phone.androidscloud.com"
+

+ 2 - 0
.env.test

@@ -26,3 +26,5 @@ SZX_APP_ANDROID_SCHEME = "opengeminiapp"
 QIYUKF_TEMPLATE_ID = "6635862"
 
 IMG_URL = "http://gntest.phone.androidscloud.com:9002/cloud/picture/assist"
+
+H5_URL = "http://gntest.phone.androidscloud.com:1280"

+ 3 - 0
.env.uat

@@ -27,3 +27,6 @@ SZX_APP_ANDROID_SCHEME = "opengeminiapp"
 QIYUKF_TEMPLATE_ID = "6635862"
 
 IMG_URL = "https://gntest.phone.androidscloud.com:9001/clouduat/picture/assist"
+
+H5_URL = "https://prese.phone.androidscloud.com"
+

BIN
assets/image/claimCloudPhone/Invitee-to-claim.png


BIN
assets/image/claimCloudPhone/Inviting-others-img.png


BIN
assets/image/claimCloudPhone/bg.png


BIN
assets/image/claimCloudPhone/claim-mobile-phone-btn.png


BIN
assets/image/claimCloudPhone/first-reward-1.png


BIN
assets/image/claimCloudPhone/first-reward-2.png


BIN
assets/image/claimCloudPhone/first-reward-3.png


BIN
assets/image/claimCloudPhone/first-reward-container-privilege.png


BIN
assets/image/claimCloudPhone/first-reward-img.png


BIN
assets/image/claimCloudPhone/inviter-exit.png


BIN
assets/image/claimCloudPhone/purchase-img.png


BIN
assets/image/claimCloudPhone/second-reward-img.png


BIN
assets/image/claimCloudPhone/second-reward-title.png


+ 1 - 1
assets/style/main.scss

@@ -56,7 +56,7 @@ body {
 }
 
 .van-overlay {
-	background-color: rgba(0, 0, 0, .95) !important;
+	background-color: rgba(0, 0, 0, .9) !important;
 }
 
 [v-cloak] {

+ 0 - 1
components/layout/index.vue

@@ -24,7 +24,6 @@ export default {
   mounted() {
     // 如果是安卓的需要判断一下是否显示h5内置的返回按钮
     // 如果是H5、微信小程序,不需要显示次按钮
-    // 如果是苹果就显示,不需要做任何处理
     this.isApp = this.$userAgent.isSzx || this.$userAgent.isSzxBrowser
     this.isAndroid = this.$userAgent.isAndroid;
     if (!this.isApp) return this.visible = false

+ 2 - 1
components/lottie/index.vue

@@ -17,8 +17,9 @@ export default {
       this.data?.default.assets.forEach((item) => {
         item.u = '';
         if (item.w && item.h) {
+          if(!item.ww) item.ww = item.p
           if(item.p.includes('assets/lottie/images')) return 
-          item.p = require(`@/assets/lottie/images/${item.p}`);
+          item.p = require(`@/assets/lottie/images/${item.ww}`);
         }
       });
       this.defaultOptions = {

+ 5 - 0
components/verifition/Verify/VerifySlide.vue

@@ -203,6 +203,11 @@ export default {
     },
   },
   mounted() {
+    let verifyMoveBlock = document.querySelector('.verify-move-block');
+    verifyMoveBlock.addEventListener('touchmove', function (event) {
+      // 阻止默认的滑动行为
+      event.preventDefault();
+    });
     // 禁止拖拽
     this.$el.onselectstart = function () {
       return false;

+ 1 - 1
pages/claimCloudPhone/chooseCloudPhone.vue

@@ -1,5 +1,5 @@
 <template>
-  <layout @goBack="leaveFun" :isNavBar="isNavBar" :bgHeight="350">
+  <layout @goBack="leaveFun" :isNavBar="isNavBar" :bgHeight="350" bgImgName="bg">
     <div class="choose-cloud-phone">
       <div
         class="choose-cloud-phone_title"

+ 49 - 19
pages/claimCloudPhone/components/bargainingAssistance.vue

@@ -178,7 +178,8 @@
       <template v-if="bargainingTipsBool">
         <div class="bargaining-amount">
           <div class="bargaining-amount-text">
-            恭喜您,砍价成功<span>{{ bargainingAmount }}元</span>
+            <div> 恭喜您</div>
+            砍价成功<span>10.52元</span>
           </div>
           <lottie
             class="species"
@@ -211,6 +212,7 @@
           </div>
         </div>
         <img src="@/assets/image/claimCloudPhone/inviter-exit.png" alt="" />
+        <lottie class="exit-glory" :data="glory" :key="'exit-glory'" />
       </div>
     </van-dialog>
 
@@ -310,6 +312,14 @@
         为您带来更多精彩的活动和内容。<br />
       </div> -->
     </van-dialog>
+    <van-dialog style="background: #fff !important" v-model="copyVisble" showCancelButton :showConfirmButton="false">
+      <div class="copy-visble">请手动复制以下内容</div>
+      <van-field
+        v-model="copyValue"
+        rows="4"
+        type="textarea"
+      />
+    </van-dialog>
     <Verify
       @success="success"
       mode="pop"
@@ -394,6 +404,8 @@ export default {
       species,
       redPacket,
       glory,
+      copyVisble: false,
+      copyValue: ''
     };
   },
   components: {
@@ -745,17 +757,18 @@ export default {
                   if (this.$userAgent.isSzx || this.$userAgent.isSzxBrowser) {
                     this.$native.share(shareInfo);
                   } else {
-                    writeToClipboard(res.data.link)
-                      .then(() => {
+                    writeToClipboard(
+                      res.data.link,
+                      () => {
                         setTimeout(() => {
                           this.$toast('链接复制成功');
                         });
-                      })
-                      .catch((err) => {
-                        setTimeout(() => {
-                          this.$toast('链接复制失败');
-                        });
-                      });
+                      },
+                      () => {
+                        this.copyValue = res.data.link
+                        this.copyVisble = true
+                      },
+                    );
                   }
                 }
               })
@@ -932,12 +945,6 @@ export default {
   }
   height: 100%;
   position: relative;
-  /deep/ .van-overlay {
-    z-index: 0 !important;
-  }
-  /deep/ .van-dialog {
-    z-index: 0 !important;
-  }
   .inviter-tips,
   .invitee-tips {
     font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
@@ -1258,6 +1265,9 @@ export default {
             font-size: 14px;
             color: #6d2b12;
             text-align: center;
+            overflow: hidden;
+            white-space: nowrap;
+            text-overflow: ellipsis;
             font-style: normal;
           }
         }
@@ -1419,7 +1429,7 @@ export default {
       font-weight: bold;
       font-size: 24px;
       color: #ffffff;
-      line-height: 20px;
+      line-height: 30px;
       text-align: center;
       font-style: normal;
       span {
@@ -1434,10 +1444,21 @@ export default {
     height: 520px;
     position: relative;
     & > img {
-      height: 100%;
-      width: 100%;
+      position: absolute;
+      top: 50%;
+      left: 50%;
+      transform: translate(-50%, -50%);
+      height: 321px;
+      width: 284px;
+      z-index: -1;
+    }
+    .exit-glory {
+      position: absolute;
+      top: 50%;
+      left: 50%;
+      transform: translate(-50%, -50%) scale(1.5);
+      z-index: -2;
     }
-
     .exit-content {
       position: absolute;
       top: 25%;
@@ -1451,6 +1472,7 @@ export default {
       font-style: normal;
       font-weight: bold;
       font-size: 16px;
+      z-index: 0;
       & > div span {
         color: #f04646;
       }
@@ -1673,4 +1695,12 @@ export default {
 .mb-24 {
   margin-bottom: 24px !important;
 }
+
+.mask {
+  z-index: 4000;
+}
+
+.copy-visble {
+  padding: 16px;
+}
 </style>

+ 0 - 8
pages/claimCloudPhone/components/layout.vue

@@ -92,12 +92,8 @@ export default {
 .layout {
   height: 100%;
   display: flex;
-  position: relative;
-  z-index: 0;
   flex-direction: column;
   .layout-container {
-    position: relative;
-    z-index: -1;
     flex: 1;
     overflow-y: auto;
   }
@@ -113,9 +109,5 @@ export default {
     color: #0a132b !important;
     line-height: 24px !important;
   }
-
-  .van-nav-bar {
-    z-index: 0;
-  }
 }
 </style>

+ 1 - 1
pages/claimCloudPhone/components/setMealItem.vue

@@ -94,7 +94,7 @@ export default {
           .then((res) => {
             if (res.success) {
               if (!res.data.bargainingStatus) {
-                let url = '/claimCloudPhone/1?menuRuleId=' + data.id;
+                let url = '/claimCloudPhone/type?type=1&menuRuleId=' + data.id;
                 if (this.$route.query.userCardId) {
                   url += `&userCardId=${this.$route.query.userCardId}`;
                 }

+ 2 - 2
pages/claimCloudPhone/confirmation.vue

@@ -64,6 +64,7 @@ export default {
       },
       currentStatus: '',
       index: 1,
+      H5_URL: process.env.H5_URL,
     };
   },
   mounted() {
@@ -118,8 +119,7 @@ export default {
         : 'https://www.androidscloud.com';
     },
     toH5() {
-      location.href =
-        'http://gntest.phone.androidscloud.com:1280/cloud/phone/web/#/';
+      location.href = this.H5_URL + '/cloud/phone/web/#/';
     },
   },
 };

+ 2 - 2
pages/claimCloudPhone/firstReward.vue

@@ -1,5 +1,5 @@
 <template>
-  <layout bgImgName="first-reward-img" bgColor="#f64d5d" bgHeight="188">
+  <layout bgImgName="first-reward-img" bgColor="#f64d5d" bgHeight="219">
     <div class="first-reward">
       <img src="@/assets/image/claimCloudPhone/first-reward-1.png" alt="" />
       <img
@@ -47,7 +47,7 @@ export default {
 .first-reward {
   height: 100%;
   box-sizing: border-box;
-  padding-top: 188px;
+  padding-top: 210px;
   position: relative;
   & > img {
     height: 95px;

+ 3 - 3
pages/claimCloudPhone/index.vue

@@ -48,8 +48,8 @@ export default {
         window.atob(operateActivityId),
       );
       this.$router.replace({
-        path: '/claimCloudPhone/0',
-        query: this.$route.query,
+        path: '/claimCloudPhone/type',
+        query: {...this.$route.query, type: 0},
       });
       return;
     }
@@ -98,7 +98,7 @@ export default {
                 break;
               default:
                 this.$router.replace(
-                  '/claimCloudPhone/' + res.data.bargainingStatus,
+                  '/claimCloudPhone/type?type=' + res.data.bargainingStatus,
                 );
                 break;
             }

+ 2 - 2
pages/claimCloudPhone/inviteeExits.vue

@@ -1,5 +1,5 @@
 <template>
-  <layout bgImgName="invitee-exits-img" bgColor="#fdf2e3" bgHeight="188">
+  <layout bgImgName="invitee-exits-img" bgColor="#fdf2e3" bgHeight="219">
     <div class="invitee-exits">
       <div class="invitee-exits-privilege">
         <div>三大云机特权</div>
@@ -103,7 +103,7 @@ export default {
 }
 .invitee-exits {
   height: 100%;
-  padding-top: 188px;
+  padding-top: 210px;
   box-sizing: border-box;
   .invitee-exits-privilege,
   .invitee-exits-phone-info {

+ 14 - 1
pages/claimCloudPhone/mixins/common.js

@@ -3,7 +3,8 @@ export default {
     data() {
         return {
             packageList: [], // 邀请人被邀请人选择的套餐
-            visible: false
+            visible: false,
+            currentLoading: false
         }
     },
     mounted() {
@@ -26,7 +27,19 @@ export default {
                         this.visible = true
                         return
                     }
+                    let index = 0
+                    for (let i of res.data) {
+                        if (!i?.mealList?.length) {
+                            index++
+                        }
+                    }
+                    if(index === res.data.length) {
+                        this.visible = true
+                        this.currentLoading = false
+                        return 
+                    }
                     this.packageList = res.data || []
+                    this.currentLoading = true
                 }
             }).finally(() => {
                 this.$toast.clear();

File diff suppressed because it is too large
+ 24 - 18
pages/claimCloudPhone/purchase.vue


+ 11 - 10
pages/claimCloudPhone/secondReward.vue

@@ -1,8 +1,11 @@
 <template>
-  <layout bgImgName="second-reward-img" bgColor="#f64d5d" bgHeight="188">
+  <layout bgImgName="second-reward-img" bgColor="#f64d5d" bgHeight="219">
     <div class="second-reward">
       <div class="second-reward-title">
-        请搜索您希望在云机内运行的应用为您安装至云机
+        <img
+          src="@/assets/image/claimCloudPhone/second-reward-title.png"
+          alt=""
+        />
       </div>
       <div>
         <div class="application">
@@ -87,6 +90,7 @@ export default {
           applicationName: this.imgName,
         })
         .then((res) => {});
+      localStorage.removeItem('activityPurchaseVisible');
       this.$router.push('/claimCloudPhone/purchase');
     },
   },
@@ -97,15 +101,12 @@ export default {
 .second-reward {
   height: 100%;
   box-sizing: border-box;
-  padding-top: 188px;
+  padding-top: 210px;
   .second-reward-title {
-    font-family: AlibabaPuHuiTi, AlibabaPuHuiTi;
-    font-weight: bold;
-    font-size: 15px;
-    color: #fefefe;
-    line-height: 18px;
-    text-align: center;
-    font-style: normal;
+   &>img{
+      height: 15px;
+      width: 100%;
+   }
   }
 
   .application {

+ 1 - 1
pages/claimCloudPhone/_type.vue

@@ -3,7 +3,7 @@
     <!-- type 1(砍一刀) 2(邀请好友) 3 (失败) 4 (成功)都是邀请人  0 是被邀请人 -->
     <bargainingAssistance
       ref="bargainingAssistance"
-      :type="$route.params.type"
+      :type="$route.query.type"
       :operateActivityId="operateActivityId"
       :getSystemTime="getSystemTime"
       :leaveFun="leaveFun"

+ 3 - 3
pages/claimCloudPhone/zeroYuanClaim.vue

@@ -1,6 +1,6 @@
 <template>
-  <layout :isNavBar="isNavBar" padding="24px 16px 16px">
-    <div class="zero-yuan-claim">
+  <layout :isNavBar="isNavBar" padding="24px 16px 16px" :bgImgName="currentLoading ? 'bg' : ''">
+    <div class="zero-yuan-claim" v-if="currentLoading">
       <img
         class="zero-yuan-claim-title"
         src="@/assets/image/claimCloudPhone/zero-yuan-claim-title.png"
@@ -25,7 +25,7 @@
     >
       <div class="dialog-tips">
         很抱歉<br />
-        您的套餐不支持此活动进行续费
+        {{ $route.query.userCardId ? ' 您的套餐不支持此活动进行续费' : '暂时没有可选择的套餐' }}
       </div>
     </van-dialog>
   </layout>

+ 11 - 5
plugins/plugins.js

@@ -17,16 +17,21 @@ export function timeStamp(StatusMinute, userCardType, nextSendTime) {
 
 
 // 封装对剪贴板的访问为异步函数
-export async function writeToClipboard(text) {
+export function writeToClipboard(text, success = () => { }, error = () => { }) {
     // 如果navigator.clipboard存在,直接使用复制功能
     if (navigator.clipboard) {
         try {
-            await navigator.clipboard.writeText(text);
+            setTimeout(() => {
+                navigator.clipboard.writeText(text).then(() => {
+                    success()
+                }).catch((err) => {
+                    error()
+                })
+            }, 0);
         } catch (err) {
-            throw err
+            error()
         }
     } else {
-        // 否则使用传统的document.execCommand('copy')方法
         const textArea = document.createElement('textarea');
         textArea.value = text;
         document.body.appendChild(textArea);
@@ -34,11 +39,12 @@ export async function writeToClipboard(text) {
         try {
             const successful = document.execCommand('copy');
             if (successful) {
+                success()
             } else {
                 throw '复制失败'
             }
         } catch (err) {
-            throw err
+            error()
         }
         document.body.removeChild(textArea);
     }