浏览代码

feat: NC-30: 01

Tyler 1 年之前
父节点
当前提交
8a11b3b27f

二进制
frontendEle/src/static/img/arrow_icon.png


二进制
frontendEle/src/static/img/browser.png


+ 1 - 1
frontendEle/src/views/dashboard/index.vue

@@ -15,7 +15,7 @@
                   v-for="(o,key) in parseInt(myEmpLv['ICON_NUM'])"
                   :key="key" v-if="myEmpLv['ICON_TYPE']>0">
               </el-col>
-              <el-col v-if="isStudio" :xs="24" :sm="24" :md="24" :lg="4" :xl="12">是否店:{{isStudio}}</el-col>
+              <el-col v-if="isStudio" :xs="24" :sm="24" :md="24" :lg="4" :xl="12">是否店中店:{{isStudio}}</el-col>
               <el-col :xs="24" :sm="24" :md="24" :lg="4" :xl="12">会员级别:{{decLvName}}</el-col>
               <el-col :xs="24" :sm="24" :md="24" :lg="8" :xl="12">当前业绩期:{{periodNum}}</el-col>
 <!--              <el-col :xs="24" :sm="24" :md="24" :lg="8" :xl="12">剩余PV:{{myRemainPv}}</el-col>&lt;!&ndash;剩余的PV&ndash;&gt;-->

+ 109 - 0
frontendEle/src/views/login/index.vue

@@ -32,8 +32,43 @@
         </el-form>
       </div>
     </div>
+      <div class="trxtTooltip" v-if="isWeChatTooltip" @click="openIsWeChatModal">
+          <div>
+          检测到您正在微信中使用系统
+          </div>
+          <div class="chere">
+            <span>建议</span>
+            <el-link type="primary" :underline="false" style="font-size: 15px">点击这里</el-link>
+            <span>使用手机浏览器登录系统</span>
+          </div>
+      </div>
   </div>
+
+
     </div>
+<!--    微信内打开提示-->
+    <transition name="el-fade-in-linear">
+      <div v-show="isWeChat" class="isWeChatModal">
+        <div class="modal-box">
+          <div class="transition-box">
+            <img class="arrow" src="../../static/img/arrow_icon.png" alt="">
+            <div class="browser">
+              <span>请点击右上角“<i class="el-icon-more"></i>”</span>
+            </div>
+            <div class="browser">
+              <span>选择“</span>
+              <img src="../../static/img/browser.png" alt="" style="width: 20px">
+              <span>在浏览器中打开 ”</span>
+            </div>
+          </div>
+          <div>
+            <i class="el-icon-close closeWechat" style="font-size: 45px" @click="closeIsWeChatModal"></i>
+          </div>
+
+        </div>
+
+      </div>
+    </transition>
   </div>
 
 </template>
@@ -64,6 +99,8 @@ export default {
       pageId:'',
       captchaUrl: '',
       isLoginVerify:false,
+      isWeChat: false,
+      isWeChatTooltip: false,
     }
   },
   beforeCreate () {
@@ -78,6 +115,13 @@ export default {
     })
   },
   mounted () {
+    if(this.is_weixn()){
+      setTimeout(()=>{
+        this.isWeChatTooltip = true
+      },500)
+    }else{
+      this.isWeChatTooltip = false
+    }
     network.getSiteInfo()
     // 检测用户是否已经登录,如果已经登录则直接跳转到控制台页
     // if(userInfo.hasLogin()){
@@ -166,6 +210,16 @@ export default {
         this.submitButtonStat = false
       })
     },
+    is_weixn(){
+      const ua = navigator.userAgent.toLowerCase();
+      return ua.indexOf('micromessenger') !== -1;
+    },
+    openIsWeChatModal(){
+      this.isWeChat = true
+    },
+    closeIsWeChatModal(){
+      this.isWeChat = false
+    }
   }
 }
 
@@ -259,4 +313,59 @@ export default {
     .login-wrapper .el-input-group__prepend{width: 8%;}
     .el-input-group--prepend .el-input__inner, .el-input-group__append{width: 90%;}
   }
+  .isWeChatModal{
+    position: fixed;
+    top: 0;
+    right: 0;
+    bottom: 0;
+    left: 0;
+    background-color: rgba(0, 0, 0, 0.8); /* 黑色背景,50% 透明度 */
+    z-index: 9999;
+    color: white;
+    font-size: 24px;
+  }
+  .modal-box{
+    width: 100%;
+    height: 100%;
+    display: flex;
+    flex-direction: column;
+    align-items: center;
+    justify-content: space-between;
+  }
+  .transition-box{
+      display: flex;
+      align-items: center;
+      flex-direction: column;
+  }
+  .transition-box div{
+    padding: 20px 0;
+    display: flex;
+    justify-content: flex-start;
+    align-items: center;
+  }
+  .browser img, i{
+    padding: 0 6px;
+  }
+  .closeWechat{
+    transform: translateY(-10rem);
+  }
+  .arrow{
+    width: 50%;
+    align-self: flex-end;
+    transform: translateX(-10px);
+  }
+  .trxtTooltip{
+    display: flex;
+    align-items: center;
+    flex-direction: column;
+    color: #522989;
+  }
+  .trxtTooltip div{
+    padding: 5px 0;
+  }
+  .chere{
+    display: flex;
+    justify-content: flex-start;
+    align-items: center;
+  }
 </style>

+ 82 - 1
frontendEle/src/views/shop/index.vue

@@ -50,6 +50,35 @@
                 <pagination :total="totalCount" :page_size="pageSize" @size-change="handleSizeChange" @current-change="handleCurrentChange"></pagination>
             </div>
         </div>
+
+      <!--    微信内打开提示-->
+      <transition name="el-fade-in-linear">
+        <div v-show="isWeChat" class="isWeChatModal">
+          <div class="modal-box">
+            <div class="transition-box">
+              <img class="arrow" src="../../static/img/arrow_icon.png" alt="">
+              <div>
+                检测到您正在微信中使用系统
+              </div>
+              <div>
+                在微信中无法完成海外商品的付款
+              </div>
+              <div class="browser">
+                <span>请点击右上角“<i class="el-icon-more"></i>”</span>
+              </div>
+              <div class="browser">
+                <span>选择“</span>
+                <img src="../../static/img/browser.png" alt="" style="width: 20px">
+                <span>在浏览器中打开 ”</span>
+              </div>
+            </div>
+            <div>
+              <i class="el-icon-close closeWechat" style="font-size: 45px" @click="closeIsWeChatModal"></i>
+            </div>
+          </div>
+
+        </div>
+      </transition>
     </div>
 </template>
 
@@ -84,7 +113,8 @@ export default {
                 selectLock:false,
                 cate: [],
                 cateId: 1,
-                baseInfo: JSON.parse(localStorage.getItem('baseInfo'))
+                baseInfo: JSON.parse(localStorage.getItem('baseInfo')),
+                isWeChat: false,
             }
         },
         watch: {
@@ -101,6 +131,9 @@ export default {
         },
         methods: {
             cateIdChange(val){
+              if(val === 2){
+                this.isWeChat = this.is_weixn();
+              }
               if(val){
                 this.getData(this.currentPage, this.pageSize)
               }
@@ -260,6 +293,13 @@ export default {
 
                 })
             },
+          is_weixn(){
+            const ua = navigator.userAgent.toLowerCase();
+            return ua.indexOf('micromessenger') !== -1;
+          },
+          closeIsWeChatModal(){
+            this.isWeChat = false
+          }
         }
 
     }
@@ -272,4 +312,45 @@ export default {
 .radio{
   margin-bottom: 1rem;
 }
+.isWeChatModal{
+  position: fixed;
+  top: 0;
+  right: 0;
+  bottom: 0;
+  left: 0;
+  background-color: rgba(0, 0, 0, 0.8); /* 黑色背景,50% 透明度 */
+  z-index: 9999;
+  color: white;
+  font-size: 24px;
+}
+.transition-box{
+  display: flex;
+  align-items: center;
+  flex-direction: column;
+}
+.transition-box div{
+  padding: 20px 0;
+  display: flex;
+  justify-content: flex-start;
+  align-items: center;
+}
+.browser img, i{
+  padding: 0 6px;
+}
+.closeWechat{
+  transform: translateY(-8rem);
+}
+.arrow{
+  width: 30%;
+  align-self: flex-end;
+  transform: translateX(-60px);
+}
+.modal-box{
+  width: 100%;
+  height: 100%;
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  justify-content: space-between;
+}
 </style>

+ 26 - 28
frontendEle/src/views/shop/order-overseas.vue

@@ -176,7 +176,7 @@
               consigneeIdNo: '',
               IDCardDialog: false,
               IDCardWebsite: 'http://t.taoplus.com.my/Home/UploadIDCard',
-              flag:this.isPC()
+              flag:this.isPC(),
           }
       },
       created() {
@@ -212,45 +212,43 @@
         async pay(info) {
           if (this.flag === 'website') {
             //pc
-            let payTypeText = this.payType === 'WECHAT' ? '微信' : '支付宝'
-            let url = await QRCode.toDataURL(info.qrCode);
-            await this.$alert(`<img src=${url}  alt="" >`, `请使用${payTypeText}扫码支付`, {
-              showClose: false,
-              showCancelButton: true,
-              showConfirmButton: true,
-              confirmButtonText: '支付成功',
-              cancelButtonText: '取消支付',
-              dangerouslyUseHTMLString: true,
-              center: true,
-              callback: action => {
-                if(action === 'confirm'){
-                  this.$router.push({path: `/shop/order-list`})
-                }else{
-                  this.$router.push({path: `/shop/index`})
-                }
-              }
-            });
-            if (this.payType === 'WECHAT') {
+            if (this.payType === 'WAPWECHAT') {
               //微信
+              let payTypeText = this.payType === 'WECHAT' ? '微信' : '支付宝'
+              let url = await QRCode.toDataURL(info.qrCode);
+              await this.$alert(`<img src=${url}  alt="" >`, `请使用${payTypeText}扫码支付`, {
+                showClose: false,
+                showCancelButton: true,
+                showConfirmButton: true,
+                confirmButtonText: '支付成功',
+                cancelButtonText: '取消支付',
+                dangerouslyUseHTMLString: true,
+                center: true,
+                callback: action => {
+                  if(action === 'confirm'){
+                    this.$router.push({path: `/shop/order-list`})
+                  }else{
+                    this.$router.push({path: `/shop/index`})
+                  }
+                }
+              });
             } else {
              //支付宝
             }
           } else {
             //移动端
-            // let origin = window.location.origin + '/#/shop/order-list'
-            window.location.replace("https://fele.ncshop.elken.com/wechat.html?mweb_url=" + info.mweb_url)
-
-						// let origin = window.location.origin + '/#/shop/order-list'
-						// console.log('tyler', info.mweb_url + '&redirect_url=' + encodeURIComponent(origin))
-						// window.location.replace(info.mweb_url + '&redirect_url=' + encodeURIComponent(origin))
-
-            if (this.payType === 'WECHAT') {
+            if (this.payType === 'WAPWECHAT') {
               //微信
+              window.location.replace("https://fele.ncshop.elken.com/wechat.html?mweb_url=" + info.mweb_url)
             } else {
 
             }
           }
         },
+         is_weixn(){
+           const ua = navigator.userAgent.toLowerCase();
+           return ua.indexOf('micromessenger') !== -1;
+         },
           getSummaries(param) {
             const { columns, data } = param;
             const sums = [];