This commit is contained in:
lihaoyuan 2025-09-09 16:20:59 +08:00
commit f6faa871eb
13 changed files with 426 additions and 134 deletions

View File

@ -790,6 +790,8 @@
</view>
</view>
</uni-drawer>
<loginPopup :show="showLoginPopup" @close="closeLoginPopup"></loginPopup>
</view>
</template>
@ -798,6 +800,7 @@ import uniDrawer from "@/components/uni-drawer.vue";
import uniTag from "@/components/uni-tag/uni-tag.vue";
import { mapMutations, mapState } from "vuex";
import $ from "../helpers/util";
import loginPopup from "@/components/loginPopup.vue";
export default {
props: {
@ -987,12 +990,15 @@ export default {
shareTitle: "",
chatUrl: "",
timer: null,
showLoginPopup: false,
};
},
components: {
uniDrawer,
uniTag,
loginPopup,
},
computed: mapState([
"Config",
@ -1254,6 +1260,10 @@ export default {
"getUserInfo",
]),
closeLoginPopup() {
this.showLoginPopup = false;
},
async init() {
await this.$store.dispatch(`getCartList`, (data) => {
this.cartList = data.items;
@ -1902,6 +1912,11 @@ export default {
//
addCart: async function (e) {
if (!this.hasLogin) {
this.showLoginPopup = true;
return;
}
let that = this;
let index = e.currentTarget.dataset.index;
let step = parseInt(e.currentTarget.dataset.step);

View File

@ -304,7 +304,7 @@
:style="{ 'font-size': '30px', color: item.eltm8.fontColor }"></label>
</view>
<navigator url="/pagesub/search/search" class="u-search-box" v-if="item.eltmType == 9" :style="{
<navigator :url="'/pagesub/search/search?store_id='+shopInfo.store_id" class="u-search-box" v-if="item.eltmType == 9" :style="{
'background-color': item.bgColor,
'padding-top': item.eltm9.paddingTop + 'px',
'padding-bottom': item.eltm9.paddingBottom + 'px',
@ -888,6 +888,8 @@
}" v-if="item.eltmType == 103"></guess-you-like>
</view>
<loginPopup :show="showLoginPopup" @close="closeLoginPopup"></loginPopup>
</view>
</template>
@ -897,6 +899,7 @@ import diyCountdown from "../../components/themes/diy-countdown";
import guessYouLike from "@/components/product-list.vue";
import storeLists from "@/components/store-lists.vue";
import loginPopup from "@/components/loginPopup.vue";
import { mapState, mapMutations } from "vuex";
import $ from "../../helpers/util";
@ -908,6 +911,7 @@ export default {
storeLists,
wxParse,
diyCountdown,
loginPopup,
},
props: {
BgConfig: {
@ -984,6 +988,7 @@ export default {
return {
w: 0, //windowWidth
loaded: false,
showLoginPopup: false,
chatUrl: "",
initX: "690",
initY: "1336",
@ -1056,12 +1061,21 @@ export default {
"showCartNum",
]),
closeLoginPopup() {
this.showLoginPopup = false;
},
getGoodsStatus (item){
return item?.product_quantity == 0 || item?.item_quantity == 0
},
async addCart(item) {
if (!this.hasLogin) {
this.showLoginPopup = true;
return;
}
if (item?.product_quantity == 0 || item?.item_quantity == 0) {
uni.showToast({
icon: 'error',
@ -1116,16 +1130,15 @@ export default {
});
},
tplGoToPage: function (e) {
let that = this;
if(this.isLogin){
if(!this.hasLogin){
that.$emit("showLogin",true)
return
}
}
debugger;
// if(this.isLogin){
// if(!this.hasLogin){
// that.$emit("showLogin",true)
// return
// }
// }
var t = e.currentTarget.dataset;
//console.info(t);
switch (parseInt(t.type)) {

View File

@ -1,135 +1,167 @@
<template name="shoptheme1">
<view>
<view class="m-supermarket-ad">
<view v-if="(commonTPL.AdContent.F1ProductContents.length>0)">
<!-- <view class="m-supermarket-tip-list">
<view>
<view class="m-supermarket-ad">
<view v-if="commonTPL.AdContent.F1ProductContents.length > 0">
<!-- <view class="m-supermarket-tip-list">
<navigator :url="'/pages/product/list?is_store_flag=' + (commonTPL.isStoreFlag) + '&store_category_id=' + (item.store_product_cat_id) + '&cname=' + (item.name)"
v-for="(item, i) in commonTPL.smallCategory" :key="i" class="m-supermarket-tip-item">
<label>{{item.name}}</label>
</navigator>
</view> -->
<view class="m-product-list m-listv">
<navigator v-for="(item, i) in commonTPL.AdContent.F1ProductContents" :key="i" :url="'/pages/product/detail?is_store_flag=' + (commonTPL.isStoreFlag) + '&pid=' + (item.ProductContentID)"
class="m-product-item">
<view class="m-product-img">
<image :src="(item.ImagePath)" mode="aspectFill" />
</view>
<view class="m-product-info">
<view class="m-product-name">
<label>{{item.ProductName}}</label>
</view>
<view class="m-product-price">
<block v-if="item.item_color[0].item_sale_price">
<label>{{__('¥')}}</label>{{number_format(item.item_color[0].item_sale_price, 2)}}
</block>
<view class="m-product-list m-listv">
<navigator
v-for="(item, i) in commonTPL.AdContent.F1ProductContents"
:key="i"
:url="
'/pages/product/detail?is_store_flag=' +
commonTPL.isStoreFlag +
'&pid=' +
item.ProductContentID
"
class="m-product-item"
>
<view class="m-product-img">
<image :src="item.ImagePath" mode="aspectFill" />
</view>
<view class="m-product-info">
<view class="m-product-name">
<label>{{ item.ProductName }}</label>
</view>
<view class="m-product-price">
<block v-if="item.item_color[0].item_sale_price">
<label>{{ __("¥") }}</label
>{{ number_format(item.item_color[0].item_sale_price, 2) }}
</block>
<block v-if="item.product_unit_points">
<label style="margin: 0rpx 10rpx;">+</label><label style="font-size:32rpx">{{number_format(item.product_unit_points)}}</label> <label>{{__('积分')}}</label>
</block>
<block v-if="item.product_unit_points">
<label style="margin: 0rpx 10rpx">+</label
><label style="font-size: 32rpx">{{
number_format(item.product_unit_points)
}}</label>
<label>{{ __("积分") }}</label>
</block>
<block v-if="item.product_unit_sp">
<label style="margin: 0rpx 10rpx;">+</label><label style="font-size:32rpx">{{item.product_unit_sp}}</label> <label>{{__('众宝')}}</label>
</block>
<view class="btn_addcard" @click.stop="handleAddcard(item, $event)"></view>
</view>
</view>
</navigator>
</view>
</view>
<view class="m-nullcontent" v-else>
<view class="m-nullpage-middle">
<label class="iconfont icon-meiyougengduo"></label>
<view class="m-null-tip">
<text>{{__('亲~什么都没有')}}</text>
<text>{{__('暂时没有商品哦')}}</text>
</view>
</view>
</view>
</view>
</view>
<block v-if="item.product_unit_sp">
<label style="margin: 0rpx 10rpx">+</label
><label style="font-size: 32rpx">{{
item.product_unit_sp
}}</label>
<label>{{ __("众宝") }}</label>
</block>
<view
class="btn_addcard"
@click.stop="handleAddcard(item, $event)"
></view>
</view>
</view>
</navigator>
</view>
</view>
<view class="m-nullcontent" v-else>
<view class="m-nullpage-middle">
<label class="iconfont icon-meiyougengduo"></label>
<view class="m-null-tip">
<text>{{ __("亲~什么都没有") }}</text>
<text>{{ __("暂时没有商品哦") }}</text>
</view>
</view>
</view>
</view>
<loginPopup :show="showLoginPopup" @close="closeLoginPopup"></loginPopup>
</view>
</template>
<script>
import $ from "../../helpers/util";
import loginPopup from "@/components/loginPopup.vue";
import { mapMutations, mapState } from "vuex";
import $ from "../../helpers/util";
export default {
name: "shoptheme1",
props: {
commonTPL: {
type: Object,
default () {
return {
isStoreFlag: 1,
ProductInfo: {},
addCar: false,
count: 0,
windowHeight: 0,
categoryname: "",
click6: true,
cid: 0,
cartlist: {},
isdata: false,
select_cart_ids: [],
tapindex: 1,
viewtype: 0,
shopInfo: {},
pdlist: [],
sort: 2,
ispage: true,
flag: true,
distance: 0,
istop: false,
TemplateKey: "",
smallCategory: {},
AdContent: {},
post: {
store_id: 0,
orderby: 1,
sort: 2,
isnew: false,
curpage: 1
},
formdate: "",
pageId: 0
}
},
},
},
data() {
return {}
},
created: function() {},
methods: {
handleAddcard(data, event){
this.$emit('addCart', data)
}
}
}
export default {
name: "shoptheme1",
props: {
commonTPL: {
type: Object,
default() {
return {
isStoreFlag: 1,
ProductInfo: {},
addCar: false,
count: 0,
windowHeight: 0,
categoryname: "",
click6: true,
cid: 0,
cartlist: {},
isdata: false,
select_cart_ids: [],
tapindex: 1,
viewtype: 0,
shopInfo: {},
pdlist: [],
sort: 2,
ispage: true,
flag: true,
distance: 0,
istop: false,
TemplateKey: "",
smallCategory: {},
AdContent: {},
post: {
store_id: 0,
orderby: 1,
sort: 2,
isnew: false,
curpage: 1,
},
formdate: "",
pageId: 0,
};
},
},
},
components: {
loginPopup,
},
data() {
return {
showLoginPopup: false,
};
},
computed: mapState(["hasLogin"]),
created: function () {},
methods: {
handleAddcard(data, event) {
this.$emit("addCart", data);
},
closeLoginPopup() {
this.showLoginPopup = false;
},
},
};
</script>
<style lang="scss">
// @import "../../styles/_variables";
// @import "../../styles/_variables";
// @import '../../styles/layout.scss';
// @import '../../styles/store_themes.scss';
// @import '../../styles/store_tpl.scss';
.m-product-info{
// @import '../../styles/layout.scss';
// @import '../../styles/store_themes.scss';
// @import '../../styles/store_tpl.scss';
.m-product-info {
width: auto;
}
.m-product-price{
.m-product-price {
position: relative;
width: auto;
}
.btn_addcard{
.btn_addcard {
position: absolute;
right: 20rpx;
bottom: 8rpx;
width: 40rpx;
height: 40rpx;
background: url(https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/pc1.png) center no-repeat;
background-size: cover;
width: 40rpx;
height: 40rpx;
background: url(https://media-mall-prod-1259811287.cos.ap-guangzhou.myqcloud.com/static/xcxfile/appicon/pc1.png)
center no-repeat;
background-size: cover;
}
</style>

View File

@ -287,6 +287,7 @@ export default {
"menu": iu + "?ctl=Store&met=menu&typ=json",
// "lists":iu + "?ctl=Store&met=lists&typ=json",
"lists": ip + "shop/store/lists",
"category": ip + "shop/store/category",
// 附近门店列表
"nearList": ip + 'shop/store/near/list',
"listsChain": iu + "?ctl=Chain&met=lists&typ=json",
@ -1115,7 +1116,7 @@ export default {
"text": "推荐"
},
{
"pagePath": "pages/category/category",
"pagePath": "pages/category/storeCategory",
"iconPath": "static/images/tabBar2.png",
"selectedIconPath": "static/images/tabBar_sel2.png",
"text": "分类"

View File

@ -76,6 +76,16 @@
}
}
},
{
"path": "pages/category/storeCategory",
"style": {
"navigationBarTitleText": "店铺分类",
"app-plus": {
"titleNView": false
}
}
},
/*
{
@ -1524,7 +1534,7 @@
"text": "推荐"
},
{
"pagePath": "pages/category/category",
"pagePath": "pages/category/storeCategory",
"iconPath": "static/images/tabBar2.png",
"selectedIconPath": "static/images/tabBar_sel2.png",
"text": "分类"

File diff suppressed because one or more lines are too long

View File

@ -357,10 +357,10 @@ export default {
// item JSON
//console.log(item)
if(!this.hasLogin){
this.showLoginPopup = true
return
}
// if(!this.hasLogin){
// this.showLoginPopup = true
// return
// }
let url = "/community/community/detail?id=" + item.story_id;

View File

@ -1746,16 +1746,16 @@ export default {
ispage: false,
shareData: {
shareText: "澜驰商城系统支持原生App、微信小程序邀请你一起体验",
shareTitle: "澜驰商城系统支持原生App、微信小程序邀请你一起体验",
href: "https://www.suteshop.com",
shareText: "同城特惠,一站式购买小发精选好物。",
shareTitle: "大型综合体商城30分钟送货到家",
href: "https://gpxscs.cn/",
image: "",
price: 0,
},
shareText: "澜驰商城系统支持原生App、微信小程序邀请你一起体验",
shareTitle: "澜驰商城系统支持原生App、微信小程序邀请你一起体验",
href: "https://www.suteshop.com",
shareText: "同城特惠,一站式购买小发精选好物。",
shareTitle: "大型综合体商城30分钟送货到家",
href: "https://gpxscs.cn/",
image: "",
shareBoxFlag: 0,

View File

@ -230,6 +230,7 @@ export default {
ptSearchStyle: "z-index: 5;",
tpSearchStyle: "z-index: 5;",
tpSearchPlaceholder: "",
store_id: 0,
};
},
@ -274,6 +275,7 @@ export default {
});
},
async onLoad(options) {
this.store_id = options.store_id ? options.store_id : 0
await this.$onLaunched;
this.loaded = true;

View File

@ -142,7 +142,7 @@ export default {
bottom: 0;
right: 0;
left: 0;
z-index: 10;
z-index: 100;
display: flex;
align-items: center;
border-top: 1px solid rgba(0, 0, 0, 0.1);

View File

@ -573,6 +573,8 @@
</view>
<MyTabbar :current="1" :cartNum="cartNum" :storeId="shopInfo.store_id" :categoryId="shopInfo.category_id"></MyTabbar>
<loginPopup :show="showLoginPopup" @close="closeLoginPopup"></loginPopup>
</view>
</template>
@ -640,6 +642,7 @@ import shoptheme6 from "../../components/themes/shoptheme6.vue";
import diy from "../../components/themes/diy.vue";
import uniTag from "@/components/uni-tag/uni-tag.vue";
import MyTabbar from "./components/tabbar.vue";
import loginPopup from "@/components/loginPopup.vue";
import favorite from "@/helpers/favorite";
@ -704,7 +707,8 @@ export default {
loadStoreCategoryComplete: false, //
isRest:true,
showBackTop: false,
scrollThreshold: 600
scrollThreshold: 600,
showLoginPopup: false,
};
},
computed: mapState([
@ -728,6 +732,7 @@ export default {
uniTag,
wxParse,
MyTabbar,
loginPopup,
},
onBackPress({ from }) {
@ -836,6 +841,10 @@ export default {
"getStoreInfo",
]),
closeLoginPopup() {
this.showLoginPopup = false;
},
//
scrollToTop() {
uni.pageScrollTo({
@ -863,6 +872,11 @@ export default {
SKU_Id: item.item_id,
};
if (!this.hasLogin) {
this.showLoginPopup = true;
return;
}
if(item?.product_quantity == 0){
uni.showToast({
icon: 'error',
@ -1640,6 +1654,10 @@ export default {
@import "../../styles/store_themes.scss";
@import "../../styles/store_tpl.scss";
.m-listv{
padding: 0 0 0 14rpx;
}
.u-pabtn {
position: static;
}
@ -1839,7 +1857,7 @@ export default {
.all_shop_tab{
position: sticky;
top: -2px;
z-index: 100;
z-index: 2;
border-bottom: 1rpx solid #eee;
}

View File

@ -23,6 +23,7 @@
search_his_list: [],
hot_list: [],
store_id: 0,
suggest_text: ""
}
},
@ -33,6 +34,9 @@
});
var that = this;
console.log('store_id===', options.store_id);
this.store_id = options.store_id ? options.store_id : 0
that.$.request({
url: this.Config.URL.search_hot_info,
@ -50,7 +54,7 @@
getSearchText(e) {
var that = this;
that.$.isNull(e) ? that.$.confirm("请输入您要搜索的关键词!") : that.$.golevelToTabBar(that, "../../" + that.route,
"/pages/product/list?pname=" + e)
`/pages/product/list?pname=${e}&store_id=${this.store_id}`)
}
},
}

BIN
static/images/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB