|
|
@@ -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> = {}) {
|