Jelajahi Sumber

Merge branch 'master' of ssh://gogs.zfire.top:2222/zfire-front/recycle-mobile

* 'master' of ssh://gogs.zfire.top:2222/zfire-front/recycle-mobile:
  no message
  feat: 修改默认
  no message
  no message
  no message
  no message
  feat: 修改路径
  feat: 对接跳转商品详情
  feat: 兼容其他小程序跳转项目的h5 / 原生
Moss 1 tahun lalu
induk
melakukan
0b97556fbc

+ 2 - 2
.env.production

@@ -8,6 +8,6 @@ VUE_APP_BASE_URL = 'https://jiasm.zfire.top'
 VUE_APP_BASE_API = '/recycleapi'
 
 # PATH
-VUE_APP_BASE_PATH = '/recycleh5/'
+VUE_APP_BASE_PATH = '/'
 
-VUE_APP_HREF = 'https://jiasm.zfire.top/recycleh5'
+VUE_APP_HREF = 'https://jiasmh5.zfire.top'

+ 2 - 2
.env.test

@@ -8,6 +8,6 @@ VUE_APP_BASE_URL = 'https://jiasm.zfire.top'
 VUE_APP_BASE_API = '/recycleapi'
 
 # PATH
-VUE_APP_BASE_PATH = '/recycleh5/'
+VUE_APP_BASE_PATH = '/'
 
-VUE_APP_HREF = 'https://jiasm.zfire.top/recycleh5'
+VUE_APP_HREF = 'https://jiasmh5.zfire.top'

+ 1 - 1
src/common/http/index.js

@@ -16,7 +16,7 @@ const program = {
 };
 const whiteCodes = [200, 201, 4444]
 
-export const $http = (url, method, data, json, loadingBool = true) => {
+export const $http = (url, method, data, json, loadingBool = false) => {
   //设置请求前拦截器
   http.interceptor.request = (config) => {
     if (loadingBool && url !== '/homepage/study') {

+ 15 - 5
src/common/utils/navPag.js

@@ -54,11 +54,21 @@ export const navToPage = (function() {
                   ...data
                 })
               } else {
-                // 第三方小程序跳转我们的h5页面处理
-                uniWebview[goToType]({
-                  url: `/pagesJsm/pages/webview?webUrl=${encodeURIComponent(webViewHref(url))}`,
-                  ...data
-                })
+                // 原生小程序页面
+                var miniProgramPages = []
+                if (!!~miniProgramPages.indexOf(url.split("?")[0])) {
+                  // 第三方小程序跳转我们的h5页面处理
+                  uniWebview[goToType]({
+                    url: `/pagesJsm/pages/middle?webUrl=${encodeURIComponent(webViewHref(url))}`,
+                    ...data
+                  })
+                } else {
+                  // 第三方小程序跳转我们的h5页面处理
+                  uniWebview[goToType]({
+                    url: `/pagesJsm/pages/webview?webUrl=${encodeURIComponent(webViewHref(url))}`,
+                    ...data
+                  })
+                }
               }
             } else if (i < 10) {
               gopageid = setTimeout(function() {

+ 1 - 1
src/manifest.json

@@ -1,5 +1,5 @@
 {
-  "name": "recycle",
+  "name": " ",
   "appid": "__UNI__ED0779D",
   "description": "",
   "versionName": "1.0.0",

+ 3 - 3
src/mixins/index.js

@@ -82,9 +82,9 @@ export default {
     // #endif
   },
   mounted() {
-    // // #ifdef MP-WEIXIN
-    // routerBeforeEach()
-    // // #endif
+    // #ifdef MP-WEIXIN
+    routerBeforeEach()
+    // #endif
     if (isWeixin()) {
       updatePageLay()
     }

+ 9 - 1
src/pages/message/msgView.vue

@@ -20,7 +20,7 @@
             <view class="goods_jiag">{{goodsDetail.amount?"¥"+goodsDetail.amount:"面议"}}</view>
             <view class="goods_fuwu">卖家包运费</view>
           </view>
-          <view class="go_goods_btn">立即购买</view>
+          <view class="go_goods_btn" @click="goGoodsDetail">立即购买</view>
         </view>
       </view>
     </view>
@@ -155,6 +155,14 @@
     },
     methods: {
       // #ifdef H5
+      goGoodsDetail() {
+        if (!this.pam.goodsId) {
+          return
+        }
+        this.$navToPage({
+          url: '/pages/goods/detail?id=' + this.pam.goodsId
+        })
+      },
       getGoods() {
         if (!this.pam.goodsId) {
           return

+ 1 - 0
src/static/D8BXYc39Qo.txt

@@ -0,0 +1 @@
+00f24385946eb1138d24a43b5f28b75c