dxz1228 лет назад: 2
Родитель
Сommit
c1e4da6537

+ 2 - 2
src/config/app.ts

@@ -5,8 +5,8 @@ let VUE_APP_WS_URL = `ws://${location.hostname}?type=user`
5 5
 // 网络接口修改此字符 小程序域名要求https
6 6
 
7 7
 // let httpApi = 'https://mer1.crmeb.net'
8
-let httpApi = 'https://test.bjtdba.com'
9
-// let httpApi = 'https://app.bjtdba.com'
8
+// let httpApi = 'https://test.bjtdba.com'
9
+let httpApi = 'https://app.bjtdba.com'
10 10
 // let httpApi = 'https://test.bjtdba.com'
11 11
 
12 12
 // let httpApi = 'http://192.168.1.77:8324'

+ 2 - 2
src/pages/payment/index.vue

@@ -102,8 +102,8 @@ function handleConfirm() {
102 102
       OrderLists: state.orderList,
103 103
       type: 'tdbaspzf'
104 104
     },
105
-    envVersion: 'trial', // develop(开发版),trial(体验版),release(正式版)
106
-    // envVersion: 'release', // develop(开发版),trial(体验版),release(正式版)
105
+    // envVersion: 'trial', // develop(开发版),trial(体验版),release(正式版)
106
+    envVersion: 'release', // develop(开发版),trial(体验版),release(正式版)
107 107
     success(res) {
108 108
       // 打开成功
109 109
       uni.showToast({

+ 6 - 6
src/pages/search/index.vue

@@ -383,10 +383,10 @@ function handleProductItemClick(
383 383
         & TaobaoProductThirdPartyWaresModel
384 384
         & VipProductModel
385 385
 ) {
386
-// console.log(5);
387
-// console.log("5");
386
+console.log(5);
387
+console.log("5");
388 388
 
389
-// console.log(item);
389
+console.log(item.type);
390 390
 
391 391
   function navigateToDetail(params) {
392 392
     let otherDetailUrl = `/pages/store/product/other`
@@ -420,8 +420,8 @@ function handleProductItemClick(
420 420
     }
421 421
     return navigateToDetail(encodeBase64(productParams))
422 422
   }
423
-  // 淘宝
424
-  if (item.type === 5) {
423
+  // 淘宝PLATFORM_NAME.TB
424
+  if ( state.currentTab === PLATFORM_NAME.TB && item.type === 5) {
425 425
     const productParams: Partial<IProductDetail> = {
426 426
       platform: item.type,
427 427
       id: item.id,
@@ -646,7 +646,7 @@ onReachBottom(() => {
646 646
         <grid-view type="masonry" cross-axis-count="2" cross-axis-gap="10px" main-axis-gap="10px">
647 647
           <div v-for="(item, index) in list"
648 648
                :key="index"
649
-               @tap="handleProductItemClick(item)"
649
+               @click="handleProductItemClick(item)"
650 650
           >
651 651
             <div class="bg-white rounded-lg text-dark">
652 652
               <image :src="item.image"

+ 5 - 4
src/pages/store/product/detail.vue

@@ -146,15 +146,16 @@ onLoad((option: any) => {
146 146
     userStore.setShareId(fromShareId)
147 147
 
148 148
     userStore.setRedirectPage(`/pages/store/product/detail?id=${state.id}&from=share&shareID=${fromShareId}`, 'page')
149
+    getShareId({ pid: state.id, type: 1 }).then(res => {
150
+      state.shareId = res.share_id
151
+      userStore.setRedirectPage(`/pages/store/product/detail?id=${state.id}&from=share&shareID=${state.shareId}`, 'page')
152
+
153
+    })
149 154
 
150 155
   }
151 156
 
152 157
 
153
-  getShareId({ pid: state.id, type: 1 }).then(res => {
154
-    state.shareId = res.share_id
155
-    userStore.setRedirectPage(`/pages/store/product/detail?id=${state.id}&from=share&shareID=${state.shareId}`, 'page')
156 158
 
157
-  })
158 159
 
159 160
 
160 161
 

+ 22 - 9
src/pages/store/product/other.vue

@@ -28,7 +28,7 @@ import { debounce, merge } from "lodash-es";
28 28
 
29 29
 import { useDebounceFn } from '@vueuse/core';
30 30
 import dayjs from "dayjs";
31
-import { decodeBase64 } from "~/utils/http/helper";
31
+import { decodeBase64, encodeBase64 } from "~/utils/http/helper";
32 32
 import { CDN_URL, CDM_URL } from "~/config/app";
33 33
 import { getRecommendList } from "~/apis/merchant";
34 34
 import type { DcProductModel } from "~/apis/model/dacang.model";
@@ -74,8 +74,8 @@ const detailclone = ref<IProductDetail>()
74 74
 onLoad((options: any) => {
75 75
 
76 76
   const data: Partial<IProductDetail> = JSON.parse(decodeBase64(options.params))
77
-  // console.log('我是options数据', data)
78
-
77
+  // console.log('我是options数据', data)  url: `/pages/store/product/other?platform=${item.type}&id=${item.id}`
78
+  userStore.setRedirectPage(`/pages/store/product/other?params=${encodeBase64(data)}`, 'page')
79 79
   // if (options.platform && options.id) {
80 80
   uni.showLoading({
81 81
     title: '数据加载中',
@@ -104,12 +104,25 @@ function YouLike() {
104 104
 
105 105
 //商品不存在详情
106 106
 function soldOut() {
107
-  isShow.value = true
108
-  uni.setNavigationBarTitle({
109
-    title: '商品下架不存在'
110
-  })
111
-  loadList('reload')
112
-  uni.hideLoading()
107
+  if (userStore.uid) {
108
+    isShow.value = true
109
+    uni.setNavigationBarTitle({
110
+      title: '商品下架不存在'
111
+    })
112
+    loadList('reload')
113
+    uni.hideLoading()
114
+  } else {
115
+    uni.showToast({
116
+      title: '请登录',
117
+      icon: 'none'
118
+    })
119
+    setTimeout(() => {
120
+      uni.redirectTo({
121
+        url: '/pages/user/login/index?key=4'
122
+      })
123
+    }, 500)
124
+  }
125
+
113 126
 }
114 127
 
115 128
 function mergeProductDetail(data: Partial<IProductDetail> = {}) {

+ 1 - 1
src/utils/http/index.ts

@@ -10,7 +10,7 @@ function createRequest(options?: any) {
10 10
     return new VRequest(deepMerge(
11 11
         {
12 12
             url: '',
13
-            timeout: 5 * 1000,
13
+            timeout: 20 * 1000,
14 14
             authenticationScheme: 'Bearer',
15 15
             authenticationHeader: 'X-Token',
16 16
             // authenticationHeader: 'Authorization',