This commit is contained in:
zmj 2024-06-24 14:07:32 +08:00
parent 242cc21a92
commit 57fa7980cf
2 changed files with 15 additions and 23 deletions

View File

@ -1,8 +1,8 @@
let BASE_URL let BASE_URL
import store from "@/store/user.js" import store from "@/store/user.js"
// 环境 // 环境
// let env = "dev" let env = "dev"
let env = "prod" // let env = "prod"
// let env = "liu"; // let env = "liu";
switch (env) { switch (env) {

View File

@ -247,8 +247,8 @@
import useUserStore from "@/store/user"; import useUserStore from "@/store/user";
const userStore = useUserStore(); const userStore = useUserStore();
const STORE_INFO = reactive({ const STORE_INFO = reactive({
id: 23, id: '',
store_name: "农(特)产品直营店" store_name: ""
}) })
const getStoreInfoFn = () => { const getStoreInfoFn = () => {
@ -370,8 +370,7 @@
name: '', name: '',
order: '', order: '',
store_name: '', store_name: '',
// store_id: 23 store_id: ''
store_id: 4
}) })
const loading = ref(true); const loading = ref(true);
@ -387,8 +386,7 @@
if (class_all) class_id = ""; // if (class_all) class_id = ""; //
if (loadmore) where.value.page_no++; if (loadmore) where.value.page_no++;
else where.value.page_no = 1; else where.value.page_no = 1;
// where.value.store_id = 23 console.log('where------------', where.value)
where.value.store_id = 4
goodListApi({ goodListApi({
...where.value, ...where.value,
class_all: class_all, class_all: class_all,
@ -397,11 +395,6 @@
}).then(res => { }).then(res => {
if (loadmore) goodList.value.push(...res.data.lists); if (loadmore) goodList.value.push(...res.data.lists);
else goodList.value = res.data.lists; else goodList.value = res.data.lists;
//
// if (!STORE_INFO.store_name || !STORE_INFO.detailed_address) {
// STORE_INFO.store_name = res.data.store.name;
// STORE_INFO.value.detailed_address = res.data.store.detailed_address;
// }
}) })
} }
@ -423,9 +416,7 @@
page_no: page_no, page_no: page_no,
page_size: 30, page_size: 30,
level: three, level: three,
// store_id: STORE_INFO.id // id store_id: STORE_INFO.id // id
// store_id: 23 // id
store_id: 4 // id
}).then(res => { }).then(res => {
if (pid == 0) { // if (pid == 0) { //
if (!res.data?.lists?.length) return; if (!res.data?.lists?.length) return;
@ -527,10 +518,7 @@
const openGoodPopup = (item) => { // / const openGoodPopup = (item) => { // /
goodData.value = item; goodData.value = item;
goodRef.value.setData(item); goodRef.value.setData(item);
// goodRef.value.founcsFn();
showGoodPopup.value = true; showGoodPopup.value = true;
//访 //访
productLogApi({ productLogApi({
product_id: item.product_id, product_id: item.product_id,
@ -609,13 +597,17 @@
getShareInfo() getShareInfo()
onLoad(async (opt) => { onLoad(async (opt) => {
where.value.store_id = opt.id || STORE_INFO.id;
// id
if (opt.id) { if (opt.id) {
where.value.store_id = (opt.id == 'undefined' ? STORE_INFO.id : opt.id);
} else {
where.value.store_id = STORE_INFO.id
}
// id
if (opt.id && opt.id != 'undefined') {
console.log(opt.id, opt.id != 'undefined', "进来了这里")
where.value.store_id = opt.id; where.value.store_id = opt.id;
const info = await shopDetailApi({ const info = await shopDetailApi({
store_id: 4 store_id: where.value.store_id
// store_id: 23
}); });
// //
if (opt.spread_uid) { if (opt.spread_uid) {