mirror of
http://git.coreshop.cn/jianweie/coreshoppro.git
synced 2025-12-06 14:53:26 +08:00
【调整】移除模板库功能,防止出现审核因为模板库页面存在而导致的审核失败。暂将模板库的代码存放到会员QQ群内,方便下载使用。
This commit is contained in:
@@ -51,40 +51,6 @@
|
||||
}
|
||||
],
|
||||
"subpackages": [
|
||||
{
|
||||
"root": "pages/template",
|
||||
"name": "template",
|
||||
"pages": [
|
||||
{
|
||||
"path": "index/index",
|
||||
"style": {
|
||||
"navigationBarTextStyle": "black",
|
||||
"navigationBarTitleText": "模板首页"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "zhunong/zhunong",
|
||||
"style": {
|
||||
"navigationBarTextStyle": "black",
|
||||
"navigationBarTitleText": "助农农产品首页"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "diancan/index/index",
|
||||
"style": {
|
||||
"navigationBarTextStyle": "black",
|
||||
"navigationBarTitleText": "点餐首页"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "diancan/list/list",
|
||||
"style": {
|
||||
"navigationBarTextStyle": "black",
|
||||
"navigationBarTitleText": "点餐列表"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"root": "pages/article",
|
||||
"name": "article",
|
||||
|
||||
@@ -95,7 +95,7 @@
|
||||
<!-- 购物车栏 begin -->
|
||||
<view class="cart-box">
|
||||
<view class="mark">
|
||||
<image src="https://files.cdn.coreshop.cn/static/template/diancan/images/cart.png" class="cart-img"></image>
|
||||
<image src="/static/images/common/cart.png" class="cart-img"></image>
|
||||
<view class="tag">{{cartNums}}</view>
|
||||
</view>
|
||||
<view class="price">¥{{cartMoney}}</view>
|
||||
|
||||
@@ -93,9 +93,8 @@
|
||||
methods: {
|
||||
imgTap() {
|
||||
this.modalShow = false;
|
||||
uni.navigateTo({
|
||||
url: "/pages/template/index/index"
|
||||
});
|
||||
this.$u.toast('你点击了弹窗')
|
||||
|
||||
},
|
||||
closeTap() {
|
||||
this.modalShow = false;
|
||||
|
||||
@@ -1,190 +0,0 @@
|
||||
<template>
|
||||
<view class="container">
|
||||
<swiper class="banner-swiper" circular autoplay :interval="5000" :duration="1000">
|
||||
<swiper-item class="banner-swiper-item" v-for="(item, index) in swipers" :key="index">
|
||||
<image :src="item" mode="widthFix"></image>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
<view class="content">
|
||||
<!-- section-1 begin -->
|
||||
<view class="section-1" @tap="goDianCanCategory">
|
||||
<navigator class="item" open-type="switchTab" url="/pages/index/index" hover-class="none">
|
||||
<image src="https://files.cdn.coreshop.cn/static/template/diancan/images/home_icon_ziqu1.png" mode="widthFix"></image>
|
||||
<view class="wenyue-font">门店自取</view>
|
||||
<view class="text-color-assist">下单免排队</view>
|
||||
</navigator>
|
||||
<navigator class="item" open-type="navigate" url="/pages/addresses/addresses" hover-class="none">
|
||||
<image src="https://files.cdn.coreshop.cn/static/template/diancan/images/home_icon_waimai1.png" mode="widthFix"></image>
|
||||
<view class="wenyue-font">外卖</view>
|
||||
<view class="text-color-assist">无需接触 送喜到家</view>
|
||||
</navigator>
|
||||
</view>
|
||||
<!-- section-2 end -->
|
||||
<!-- section-2 begin -->
|
||||
<view class="section-2" @tap="goDianCanCategory">
|
||||
<navigator class="item" open-type="switchTab" url="/pages/mart/mart" hover-class="none">
|
||||
<view class="title">
|
||||
<image src="https://files.cdn.coreshop.cn/static/template/diancan/images/home_icon_baihuo1.png"></image>
|
||||
<view>喜茶百货</view>
|
||||
</view>
|
||||
<view class="tips">灵感商品 立即选购</view>
|
||||
</navigator>
|
||||
<navigator class="item" open-type="navigate" url="/pages/home/group-dinner" hover-class="none">
|
||||
<view class="title">
|
||||
<image src="https://files.cdn.coreshop.cn/static/template/diancan/images/home_icon_qiye1.png"></image>
|
||||
<view>企业团餐</view>
|
||||
</view>
|
||||
<view class="tips">50份起送</view>
|
||||
</navigator>
|
||||
</view>
|
||||
<!-- section-2 end -->
|
||||
<view class="section-3" @tap="goDianCanCategory">
|
||||
<navigator class="my-integral" open-type="navigate" url="/pages/integrals/mall" hover-class="none">
|
||||
<view class="integrals">
|
||||
<view>我的积分</view>
|
||||
<view class="neutra-font">63</view>
|
||||
</view>
|
||||
<view class="tips">
|
||||
可兑换喜茶劵和丰富灵感周边
|
||||
</view>
|
||||
</navigator>
|
||||
<navigator class="my-code" open-type="navigate" url="/pages/my/code" hover-class="none">
|
||||
<image src="https://files.cdn.coreshop.cn/static/template/diancan/images/home_icon_erweima.png"></image>
|
||||
<view>会员码</view>
|
||||
</navigator>
|
||||
</view>
|
||||
|
||||
<view class="section-4" @tap="goDianCanCategory">
|
||||
<view class="left">
|
||||
<view class="grid coreshop-flex-direction coreshop-justify-center">
|
||||
<view class="coreshop-flex coreshop-align-center">
|
||||
<image src="https://files.cdn.coreshop.cn/static/template/diancan/images/csc.png" class="mark-img"></image>
|
||||
<view class="font-size-sm text-color-base">奈雪的茶商城</view>
|
||||
</view>
|
||||
<view class="text-color-assist" style="margin-left: 40rpx; font-size: 20rpx;">优质茶礼盒,网红零食</view>
|
||||
</view>
|
||||
<view class="grid justify-content-end align-items-end">
|
||||
<image src="https://files.cdn.coreshop.cn/static/template/diancan/images/yzclh.png" class="yzclh-img" mode="heightFix"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="right">
|
||||
<view class="tea-activity">
|
||||
<image src="https://files.cdn.coreshop.cn/static/template/diancan/images/mcsb.png" class="mark-img"></image>
|
||||
<view>买茶送包</view>
|
||||
<view class="right-img">
|
||||
<image src="https://files.cdn.coreshop.cn/static/template/diancan/images/mcsb_bg.png" mode="widthFix"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="member-gifts">
|
||||
<image src="https://files.cdn.coreshop.cn/static/template/diancan/images/hyjb.png" class="mark-img"></image>
|
||||
<view>会员劵包</view>
|
||||
<view class="right-img">
|
||||
<image src="https://files.cdn.coreshop.cn/static/template/diancan/images/hyjb_bg.png" mode="widthFix"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="section-5" @tap="goDianCanCategory">
|
||||
<view class="header">
|
||||
<view class="title">会员新鲜事</view>
|
||||
<view class="iconfont iconRightbutton"></view>
|
||||
</view>
|
||||
<view class="list">
|
||||
<view class="item">
|
||||
<image src="https://img-shop.qmimg.cn/s23107/2020/04/27/0039bf41c9ebd50a2c.jpg"></image>
|
||||
<view class="title">"梅"你不行 | 霸气杨梅清爽回归</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
swipers: [
|
||||
"https://files.cdn.coreshop.cn/static/template/diancan/images/1.jpg",
|
||||
"https://files.cdn.coreshop.cn/static/template/diancan/images/2.jpg",
|
||||
"https://files.cdn.coreshop.cn/static/template/diancan/images/3.jpg",
|
||||
"https://files.cdn.coreshop.cn/static/template/diancan/images/4.jpg",
|
||||
"https://files.cdn.coreshop.cn/static/template/diancan/images/5.jpg",
|
||||
]
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
goDianCanCategory() {
|
||||
this.$u.route({ url: '/pages/template/diancan/list/list', });
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
page { max-height: 100%; }
|
||||
.banner-swiper { width: 100%; height: 600rpx;
|
||||
.banner-swiper-item {
|
||||
image { width: 100%; }
|
||||
}
|
||||
}
|
||||
|
||||
.content { width: 100%; padding: 0 30rpx; position: relative; }
|
||||
.section-1 { position: relative; background-color: #ffffff; margin-top: -60rpx; border-radius: 12rpx; padding: 60rpx 0; display: flex; margin-bottom: 30rpx; box-shadow: 0 20rpx 20rpx -20rpx rgba($color: #333, $alpha: 0.1);
|
||||
.item { flex: 1; flex-shrink: 0; display: flex; flex-direction: column; align-items: center; position: relative;
|
||||
&:nth-child(1):after { content: ''; position: absolute; right: 0; top: 0; bottom: 0; width: 2rpx; background-color: #c8c7cc; }
|
||||
image { width: 100rpx; margin-bottom: 20rpx; }
|
||||
.wenyue-font { font-size: 48rpx; margin-bottom: 10rpx; }
|
||||
}
|
||||
}
|
||||
|
||||
.section-2 { display: flex; justify-content: space-between; margin-bottom: 30rpx;
|
||||
.item { width: 335rpx; background-color: #EAEBEC; padding: 30rpx 0; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 12rpx;
|
||||
.title { width: 100%; display: flex; align-items: center; justify-content: center; font-size: 32rpx;
|
||||
image { width: 60rpx; height: 60rpx; margin-right: 10rpx; }
|
||||
}
|
||||
.tips { color: #999; font-size: 26rpx; }
|
||||
}
|
||||
}
|
||||
|
||||
.section-3 { margin-bottom: 30rpx; display: flex; justify-content: space-between; align-items: center; font-size: 26rpx; color: #999; width: 100%; margin-bottom: 20rpx; border-radius: 10rpx; background-color: #ffffff; box-shadow: 0 20rpx 20rpx -20rpx rgba($color: #333, $alpha: 0.1); padding: 20rpx; display: flex;
|
||||
.my-integral { flex: 1; display: flex; flex-direction: column;
|
||||
.integrals { display: flex; align-items: center; font-size: 32rpx; color: #343434; margin-bottom: 10rpx;
|
||||
.neutra-font { margin-left: 10rpx; font-size: 42rpx; }
|
||||
}
|
||||
}
|
||||
.my-code { display: flex; flex-direction: column; align-items: center; padding: 0 30rpx; position: relative;
|
||||
image { width: 60rpx; height: 60rpx; margin-bottom: 10rpx; }
|
||||
&:before { content: " "; position: absolute; left: 0; top: 0; bottom: 0; border-left: 1rpx solid rgba($color: #c8c7cc, $alpha: 0.6); }
|
||||
}
|
||||
}
|
||||
|
||||
.section-4 { width: 100%; margin-bottom: 20rpx; border-radius: 10rpx; background-color: #ffffff; box-shadow: 0 20rpx 20rpx -20rpx rgba($color: #333, $alpha: 0.1); padding: 20rpx; display: flex; align-items: stretch;
|
||||
.left { width: 340rpx; margin-right: 20rpx; display: flex; padding: 0 20rpx; flex-direction: column; font-size: 24rpx; color: #5A5B5C; background-color: #F2F2E6;
|
||||
.grid { height: 50%; display: flex; }
|
||||
}
|
||||
.right { width: 290rpx; display: flex; flex-direction: column;
|
||||
.tea-activity, .member-gifts { width: 100%; display: flex; padding: 20rpx; font-size: 24rpx; color: #5A5B5C; align-items: center; position: relative; }
|
||||
.tea-activity { background-color: #FDF3F2; margin-bottom: 20rpx; }
|
||||
.member-gifts { background-color: #FCF6D4; }
|
||||
.right-img { flex: 1; position: relative; margin-left: 20rpx; margin-right: -20rpx; margin-bottom: -20rpx; display: flex; align-items: flex-end;
|
||||
image { width: 100%; }
|
||||
}
|
||||
}
|
||||
.mark-img { width: 30rpx; height: 30rpx; margin-right: 10rpx; }
|
||||
.yzclh-img { height: 122.96rpx; width: 214.86rpx; }
|
||||
}
|
||||
|
||||
.section-5 { width: 100%; margin-bottom: 30rpx;
|
||||
.header { display: flex; align-items: center; justify-content: space-between; padding: 20rpx 0;
|
||||
.title { font-size: 32rpx; font-weight: bold; }
|
||||
.iconfont { font-size: 52rpx; color: #919293; }
|
||||
}
|
||||
.list { width: 100%; display: flex; flex-direction: column;
|
||||
.item { width: 100%; height: 240rpx; position: relative;
|
||||
image { width: 100%; height: 100%; border-radius: 8rpx; }
|
||||
.title { position: relative; font-size: 32rpx; font-weight: 500; width: 100%; top: -70rpx; left: 16rpx; color: #ffffff; }
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,90 +0,0 @@
|
||||
.main { width: 100%; height: 100%; /*position: relative;*/ display: flex; flex-direction: column; }
|
||||
|
||||
.nav { width: 100%; height: 212rpx; flex-shrink: 0; display: flex; flex-direction: column;
|
||||
.header { width: 100%; display: flex; align-items: center; justify-content: space-between; padding: 20rpx; background-color: #ffffff; height: 140rpx;
|
||||
.left { flex: 1; display: flex; flex-direction: column;
|
||||
.store-name { display: flex; justify-content: flex-start; align-items: center; font-size: 32rpx; margin-bottom: 10rpx;
|
||||
.iconfont { margin-left: 10rpx; line-height: 100%; }
|
||||
}
|
||||
.store-location { display: flex; justify-content: flex-start; align-items: center; color: #919293; font-size: 24rpx;
|
||||
.iconfont { vertical-align: middle; display: table-cell; color: #ADB838; line-height: 100%; }
|
||||
}
|
||||
}
|
||||
.right { background-color: #F5F5F5; border-radius: 38rpx; display: flex; align-items: center; font-size: 24rpx; padding: 0 38rpx; color: #919293;
|
||||
.dinein, .takeout { position: relative; display: flex; align-items: center;
|
||||
&.active { padding: 14rpx 38rpx; color: #ffffff; background-color: #E8EACF; border-radius: 38rpx; }
|
||||
}
|
||||
.takeout { margin-left: 20rpx; height: 100%; flex: 1; padding: 14rpx 0; }
|
||||
.dinein.active { margin-left: -38rpx; }
|
||||
.takeout.active { margin-right: -38rpx; }
|
||||
}
|
||||
}
|
||||
.coupon { flex: 1; width: 100%; background-color: #E8EACF; font-size: 28rpx; color: #ADB838; padding: 0 20rpx; display: flex; align-items: center; overflow: hidden;
|
||||
.title { flex: 1; margin-left: 10rpx; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
|
||||
.iconfont { line-height: 100%; }
|
||||
}
|
||||
}
|
||||
.content { flex: 1; overflow: hidden; width: 100%; display: flex;
|
||||
.menus { width: 200rpx; height: 100%; overflow: hidden; background-color: #F5F5F5;
|
||||
.wrapper { width: 100%; height: 100%;
|
||||
.menu { display: flex; align-items: center; justify-content: flex-start; padding: 30rpx 20rpx; font-size: 26rpx; color: #919293; position: relative;
|
||||
&:nth-last-child(1) { margin-bottom: 130rpx; }
|
||||
&.current { background-color: #ffffff; color: #5A5B5C; }
|
||||
.dot { position: absolute; width: 34rpx; height: 34rpx; line-height: 34rpx; font-size: 22rpx; background-color: #ADB838; color: #ffffff; top: 16rpx; right: 10rpx; border-radius: 100%; text-align: center; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.goods { flex: 1; height: 100%; overflow: hidden; background-color: #ffffff;
|
||||
.wrapper { width: 100%; height: 100%; padding: 20rpx;
|
||||
.ads { height: calc(300 / 550 * 510rpx);
|
||||
image { width: 100%; height: 100%; border-radius: 8rpx; }
|
||||
}
|
||||
.list { width: 100%; font-size: 28rpx; padding-bottom: 30rpx;
|
||||
.category { width: 100%;
|
||||
.title { padding: 30rpx 0; display: flex; align-items: center; color: #5A5B5C;
|
||||
.icon { width: 38rpx; height: 38rpx; margin-left: 10rpx; }
|
||||
}
|
||||
}
|
||||
.items { display: flex; flex-direction: column; padding-bottom: -30rpx;
|
||||
.good { display: flex; align-items: center; margin-bottom: 30rpx;
|
||||
.image { width: 160rpx; height: 160rpx; margin-right: 20rpx; border-radius: 8rpx; }
|
||||
.right { flex: 1; height: 160rpx; overflow: hidden; display: flex; flex-direction: column; align-items: flex-start; justify-content: space-between; padding-right: 14rpx;
|
||||
.name { font-size: 28rpx; margin-bottom: 10rpx; }
|
||||
.tips { width: 100%; height: 40rpx; line-height: 40rpx; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 24rpx; color: #919293; margin-bottom: 10rpx; }
|
||||
.price_and_action { width: 100%; display: flex; justify-content: space-between; align-items: center;
|
||||
.price { font-size: 28rpx; font-weight: 600; }
|
||||
.btn-group { display: flex; justify-content: space-between; align-items: center; position: relative;
|
||||
.btn { padding: 0 20rpx; box-sizing: border-box; font-size: 24rpx; height: 44rpx; line-height: 44rpx;
|
||||
&.property_btn { border-radius: 24rpx; }
|
||||
&.add_btn,
|
||||
&.reduce_btn { padding: 0; width: 44rpx; border-radius: 44rpx; }
|
||||
}
|
||||
.dot { position: absolute; background-color: #ffffff; border: 1px solid #ADB838; color: #ADB838; font-size: 24rpx; width: 36rpx; height: 36rpx; line-height: 36rpx; text-align: center; border-radius: 100%; right: -12rpx; top: -10rpx; }
|
||||
.number { width: 44rpx; height: 44rpx; line-height: 44rpx; text-align: center; }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.cart-box { position: fixed; bottom: 30rpx; left: 30rpx; right: 30rpx; height: 96rpx; border-radius: 48rpx; box-shadow: 0 0 20rpx rgba(0, 0, 0, 0.2); background-color: #FFFFFF; display: flex; align-items: center; justify-content: space-between; z-index: 10;
|
||||
.cart-img { width: 96rpx; height: 96rpx; position: relative; margin-top: -48rpx; }
|
||||
.pay-btn { height: 100%; padding: 0 30rpx; color: #FFFFFF; border-radius: 0 50rpx 50rpx 0; display: flex; align-items: center; font-size: 28rpx; }
|
||||
.mark { padding-left: 46rpx; margin-right: 30rpx; position: relative;
|
||||
.tag { background-color: #FAB714; color: #ffffff; display: flex; justify-content: center; align-items: center; font-size: 24rpx; position: absolute; right: -10rpx; top: -50rpx; border-radius: 100%; padding: 4rpx; width: 40rpx; height: 40rpx; opacity: .9; }
|
||||
}
|
||||
.price { flex: 1; color: #5A5B5C; }
|
||||
}
|
||||
|
||||
|
||||
|
||||
.text-color-base { color: #5A5B5C; }
|
||||
text-color-assist { color: #919293; }
|
||||
.overflow-hidden { overflow: hidden !important; }
|
||||
.text-truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
||||
@@ -1,398 +0,0 @@
|
||||
<template>
|
||||
<view>
|
||||
<u-toast ref="uToast" /><u-no-network></u-no-network>
|
||||
<u-navbar title="在线点餐" safeAreaInsetTop fixed placeholder @leftClick="goNavigateBack"></u-navbar>
|
||||
<view class="main">
|
||||
<view class="nav">
|
||||
<view class="header">
|
||||
<view class="left" v-if="orderType == 'takein'">
|
||||
<view class="store-name">
|
||||
<text>南山田舍</text>
|
||||
<view class="iconfont iconarrow-right"></view>
|
||||
</view>
|
||||
<view class="store-location">
|
||||
<image src='https://files.cdn.coreshop.cn/static/template/diancan/images/location.png' style="width: 30rpx; height: 30rpx;" class="mr-10"></image>
|
||||
<text>距离您 100千米</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="left overflow-hidden" v-else>
|
||||
<view class="coreshop-flex coreshop-align-center overflow-hidden">
|
||||
<image src='https://files.cdn.coreshop.cn/static/template/diancan/images/location.png' style="width: 30rpx; height: 30rpx;" class="mr-10"></image>
|
||||
<view class="coreshop-font-20 text-color-base coreshop-font-weight-bold text-truncate">
|
||||
南山田舍生鲜平台
|
||||
</view>
|
||||
</view>
|
||||
<view class="font-size-sm text-color-assist overflow-hidden text-truncate">
|
||||
由<text class="text-color-base" style="margin: 0 10rpx">宇宙联盟银河系加里敦联合配送中心</text>配送
|
||||
</view>
|
||||
</view>
|
||||
<view class="right">
|
||||
<view class="dinein active">
|
||||
<text>自取</text>
|
||||
</view>
|
||||
<view class="takeout">
|
||||
<text>外卖</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="coupon">
|
||||
<text class="title">"霸气mini卡"超级购券活动,赶紧去购买</text>
|
||||
<view class="iconfont iconarrow-right"></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="content">
|
||||
<scroll-view class="menus" scroll-with-animation scroll-y :scroll-top="headerH" :style="'height:' + scorllH+'px;'">
|
||||
<view class="wrapper">
|
||||
<view class="menu" :id="`menu-${item.id}`" :class="{'current': item.id === currentCateId}" v-for="(item, index) in menus"
|
||||
:key="index" @tap="handleMenuTap(item.id)">
|
||||
<text>{{ item.name }}</text>
|
||||
<!--<view class="dot" v-show="menuCartNum(item.id)">{{ menuCartNum(item.id) }}</view>-->
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
<scroll-view class="goods" scroll-with-animation scroll-y :scroll-top="headerH" :style="'height:' + scorllH+'px;'">
|
||||
<view class="wrapper">
|
||||
<view class="list">
|
||||
<view class="category" v-for="(good, key) in goodsList" :key="key" :id="`cate-${item.id}`">
|
||||
<view class="items">
|
||||
<view class="good">
|
||||
<image :src="good.images" class="image" @tap="goGoodsDetail(item.id)"></image>
|
||||
<view class="right">
|
||||
<text class="name u-line-1">{{ good.name }}</text>
|
||||
<text class="tips u-line-1">{{ good.brief }}</text>
|
||||
<view class="price_and_action">
|
||||
<text class="price">¥{{ good.price }}</text>
|
||||
<view class="btn-group">
|
||||
<button type="primary" class="btn property_btn" hover-class="none" size="mini" @tap="showGoodSkuModal(good)">
|
||||
选规格
|
||||
</button>
|
||||
<!--<view class="dot">111</view>-->
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<u-loadmore :status="status" :icon-type="iconType" :load-text="loadText" margin-top="20" margin-bottom="20" />
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</scroll-view>
|
||||
<!-- 购物车栏 begin -->
|
||||
<view class="cart-box">
|
||||
<view class="mark">
|
||||
<image src="https://files.cdn.coreshop.cn/static/template/diancan/images/cart.png" class="cart-img"></image>
|
||||
<view class="tag">{{cartNums}}</view>
|
||||
</view>
|
||||
<view class="price">¥{{cartMoney}}</view>
|
||||
<button type="primary" class="pay-btn" @tap="redirectCart" :disabled="cartNums<=0">去结算</button>
|
||||
</view>
|
||||
<!-- 购物车栏 end -->
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
<vk-data-goods-sku-popup ref="skuPopup"
|
||||
v-model="skuKey"
|
||||
border-radius="20"
|
||||
:amount-type="0"
|
||||
:localdata="goodsSkuInfo"
|
||||
:mode="skuMode"
|
||||
@open="onOpenSkuPopup"
|
||||
@close="onCloseSkuPopup"
|
||||
@add-cart="addCart"
|
||||
@buy-now="buyNow"></vk-data-goods-sku-popup>
|
||||
|
||||
<!-- 登录提示 -->
|
||||
<coreshop-login-modal></coreshop-login-modal>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import { mapMutations, mapActions, mapState } from 'vuex';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
cartNums: 0, // 购物车数量
|
||||
cartMoney: 0, // 购物车数量
|
||||
menus: [],//所有分类
|
||||
goodsList: [], //所有商品
|
||||
menuScrollIntoView: '',
|
||||
good: {},
|
||||
currentCateId: 0,//默认分类
|
||||
loadStatus: 'loadmore',
|
||||
loadIconType: 'flower',
|
||||
loadText: {
|
||||
loadmore: '轻轻上拉',
|
||||
loading: '努力加载中',
|
||||
nomore: '实在没有了'
|
||||
},
|
||||
type: 2, // 1加入购物车 2购买
|
||||
cartType: this.$globalConstVars.paymentType.common,
|
||||
page: 1,
|
||||
limit: 10,
|
||||
// 是否打开SKU弹窗
|
||||
skuKey: false,
|
||||
// SKU弹窗模式
|
||||
skuMode: 1,
|
||||
// 后端返回的商品信息
|
||||
goodsSkuInfo: {},
|
||||
|
||||
headerH: 0,
|
||||
scorllH: 0, //滚动区域全屏
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapState({
|
||||
hasLogin: state => state.hasLogin,
|
||||
userInfo: state => state.userInfo,
|
||||
}),
|
||||
hasLogin: {
|
||||
get() {
|
||||
return this.$store.state.hasLogin;
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit('hasLogin', val);
|
||||
}
|
||||
},
|
||||
userInfo: {
|
||||
get() {
|
||||
return this.$store.state.userInfo;
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit('userInfo', val);
|
||||
}
|
||||
},
|
||||
},
|
||||
onShow() {
|
||||
uni.getSystemInfo({
|
||||
success: (e) => {
|
||||
// #ifndef MP
|
||||
this.StatusBar = e.statusBarHeight;
|
||||
if (e.platform == 'android') {
|
||||
this.headerH = e.statusBarHeight + 50;
|
||||
} else {
|
||||
this.headerH = e.statusBarHeight + 45;
|
||||
};
|
||||
// #endif
|
||||
this.scorllH = e.windowHeight - e.statusBarHeight - 180;
|
||||
}
|
||||
})
|
||||
|
||||
this.categories();
|
||||
// 获取购物车数量
|
||||
this.getCartNums();
|
||||
},
|
||||
onReachBottom() {
|
||||
if (this.loadStatus != 'nomore') {
|
||||
this.getGoods();
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
// 打开sku弹出
|
||||
openSkuPopup() {
|
||||
this.skuKey = true;
|
||||
},
|
||||
closeSkuPopup() {
|
||||
this.skuKey = false;
|
||||
},
|
||||
// sku组件监听
|
||||
onOpenSkuPopup() {
|
||||
//console.log("监听 - 打开sku组件");
|
||||
},
|
||||
onCloseSkuPopup() {
|
||||
//console.log("监听 - 关闭sku组件");
|
||||
},
|
||||
showGoodSkuModal(item) {
|
||||
console.log(item);
|
||||
if (item.id) {
|
||||
this.getGoodsDetail(item.id);
|
||||
}
|
||||
},
|
||||
// 获取商品详情
|
||||
getGoodsDetail(goodsId) {
|
||||
uni.showLoading({
|
||||
title: '加载中'
|
||||
});
|
||||
let _this = this;
|
||||
let data = {
|
||||
id: goodsId,
|
||||
data: true
|
||||
}
|
||||
// 如果用户已经登录 要传用户token
|
||||
let userToken = this.$db.get("userToken");
|
||||
if (userToken) {
|
||||
this.$u.api.goodsDetailByToken(data).then(res => {
|
||||
if (res.status == true) {
|
||||
_this.goodsSkuInfo = res.data.skuList;
|
||||
_this.openSkuPopup();
|
||||
uni.hideLoading();
|
||||
} else {
|
||||
_this.$refs.uToast.show({
|
||||
message: res.msg, type: 'error', complete: function () {
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
});
|
||||
}
|
||||
})
|
||||
uni.hideLoading();
|
||||
}
|
||||
})
|
||||
} else {
|
||||
this.$u.api.goodsDetail(data).then(res => {
|
||||
if (res.status == true) {
|
||||
_this.goodsSkuInfo = res.data.skuList;
|
||||
_this.openSkuPopup();
|
||||
uni.hideLoading();
|
||||
} else {
|
||||
_this.$refs.uToast.show({
|
||||
message: res.msg, type: 'error', complete: function () {
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
});
|
||||
}
|
||||
})
|
||||
uni.hideLoading();
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
// 加入购物车按钮
|
||||
addCart(selectShop) {
|
||||
//console.log("监听 - 加入购物车");
|
||||
//console.log(selectShop);
|
||||
var that = this;
|
||||
uni.showLoading({
|
||||
title: '加载中'
|
||||
});
|
||||
if (!this.hasLogin) {
|
||||
uni.hideLoading();
|
||||
this.$store.commit('showLoginTip', true);
|
||||
return false;
|
||||
}
|
||||
if (selectShop.buy_num > 0) {
|
||||
let data = {
|
||||
productId: selectShop._id,
|
||||
nums: selectShop.buy_num,
|
||||
type: 1,
|
||||
}
|
||||
this.$u.api.addCart(data).then(res => {
|
||||
if (res.status) {
|
||||
uni.hideLoading();
|
||||
that.getCartNums(); // 获取购物车数量
|
||||
that.$refs.uToast.show({ message: res.msg, type: 'success' });
|
||||
} else {
|
||||
that.$u.toast(res.msg);
|
||||
uni.hideLoading();
|
||||
}
|
||||
});
|
||||
}
|
||||
that.closeSkuPopup();
|
||||
},
|
||||
// 立即购买
|
||||
buyNow(selectShop) {
|
||||
//console.log("监听 - 立即购买");
|
||||
//console.log(selectShop);
|
||||
var that = this;
|
||||
uni.showLoading({
|
||||
title: '加载中'
|
||||
});
|
||||
if (!this.hasLogin) {
|
||||
uni.hideLoading();
|
||||
this.$store.commit('showLoginTip', true);
|
||||
return false;
|
||||
}
|
||||
if (selectShop.buy_num > 0) {
|
||||
let data = {
|
||||
productId: selectShop._id,
|
||||
nums: selectShop.buy_num,
|
||||
type: 2,
|
||||
cartType: this.cartType
|
||||
}
|
||||
this.$u.api.addCart(data).then(res => {
|
||||
if (res.status) {
|
||||
let cartIds = res.data;
|
||||
that.$u.route('/pages/placeOrder/index/index?cartIds=' + JSON.stringify(cartIds));
|
||||
uni.hideLoading();
|
||||
} else {
|
||||
this.$u.toast(res.msg);
|
||||
uni.hideLoading();
|
||||
}
|
||||
});
|
||||
}
|
||||
that.closeSkuPopup();
|
||||
},
|
||||
|
||||
handleMenuTap(id) {
|
||||
this.currentCateId = id
|
||||
this.page = 1;
|
||||
this.goodsList = [];
|
||||
this.getGoods();
|
||||
},
|
||||
categories() {
|
||||
this.$u.api.categories().then(res => {
|
||||
if (res.status) {
|
||||
this.menus = res.data;
|
||||
if (res.data.length > 0) {
|
||||
this.currentCateId = res.data[0].id;
|
||||
|
||||
}
|
||||
this.getGoods();
|
||||
}
|
||||
});
|
||||
},
|
||||
//取得商品数据
|
||||
getGoods: function () {
|
||||
uni.showLoading({
|
||||
title: '加载中'
|
||||
});
|
||||
var _this = this;
|
||||
let data = {
|
||||
page: this.page,
|
||||
limit: this.limit,
|
||||
};
|
||||
var where = {
|
||||
catId: this.currentCateId,
|
||||
};
|
||||
data.where = JSON.stringify(where);
|
||||
_this.$u.api.goodsList(data).then(res => {
|
||||
if (res.status) {
|
||||
const _list = res.data.list;
|
||||
_this.goodsList = [..._this.goodsList, ..._list];
|
||||
if (res.data.totalCount > _this.goodsList.length) {
|
||||
_this.loadStatus = 'loadmore';
|
||||
_this.page++;
|
||||
} else {
|
||||
// 数据已加载完毕
|
||||
_this.loadStatus = 'nomore';
|
||||
}
|
||||
uni.hideLoading();
|
||||
} else {
|
||||
// 接口请求出错了
|
||||
uni.hideLoading();
|
||||
this.$u.toast(res.msg);
|
||||
}
|
||||
});
|
||||
},
|
||||
// 获取购物车数量
|
||||
getCartNums() {
|
||||
let userToken = this.$db.get("userToken");
|
||||
if (userToken && userToken != '') {
|
||||
// 获取购物车数量
|
||||
this.$u.api.getCartNumAndMoney().then(res => {
|
||||
if (res.status) {
|
||||
this.cartNums = res.data.count;
|
||||
this.cartMoney = res.data.money;
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
</style>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import 'list.scss';
|
||||
</style>
|
||||
@@ -1,48 +0,0 @@
|
||||
<template>
|
||||
<view>
|
||||
<u-navbar title="模板站" safeAreaInsetTop fixed placeholder @leftClick="goNavigateBack"></u-navbar>
|
||||
<view class="content">
|
||||
<image class="logo" src="/static/images/logo/logo.png"></image>
|
||||
<view class="text-area">
|
||||
<text class="title">
|
||||
此分包模块用于展示不同的首页模板,将持续增加
|
||||
</text>
|
||||
</view>
|
||||
<view class="button-demo">
|
||||
<u-button @click="gozhunong">农产品助农平台</u-button>
|
||||
</view>
|
||||
<view class="button-demo">
|
||||
<u-button @click="goDianCan">仿点餐模块</u-button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
}
|
||||
},
|
||||
onLoad() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
gozhunong() {
|
||||
this.$u.route({ url: '/pages/template/zhunong/zhunong', });
|
||||
},
|
||||
goDianCan() {
|
||||
this.$u.route({ url: '/pages/template/diancan/index/index', });
|
||||
},
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.content { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px; }
|
||||
.logo { height: 100px; width: 100px; margin-top: 50px; margin-left: auto; margin-right: auto; margin-bottom: 25px; }
|
||||
.text-area { display: flex; justify-content: center; }
|
||||
.title { font-size: 14px; color: $u-content-color; }
|
||||
.button-demo { margin-top: 40px; }
|
||||
.link-demo { margin-top: 40px; }
|
||||
</style>
|
||||
@@ -1,60 +0,0 @@
|
||||
/*.page { padding-top: 472rpx; position: relative; }*/
|
||||
.page { padding-top: 522rpx; position: relative; }
|
||||
|
||||
swiper { display: flex; flex: 1; flex-direction: column; height: 600rpx; width: 750rpx; }
|
||||
|
||||
swiper-item image, swiper-item video { height: 600rpx; vertical-align: middle; width: 750rpx; }
|
||||
|
||||
.banner { left: 0; position: absolute; top: 0; z-index: 0; }
|
||||
|
||||
.header-plate { position: relative; z-index: 999; }
|
||||
|
||||
.index-title { color: #fff; font-size: 36rpx; font-weight: 600; left: 32rpx; position: absolute; }
|
||||
|
||||
.index-search-btn { height: 80rpx; vertical-align: middle; width: 232rpx; }
|
||||
|
||||
.search-form { height: 64rpx; width: 686rpx; }
|
||||
|
||||
.newsletter { background: linear-gradient(180deg,#fff,#ffe8e8); height: 88rpx; }
|
||||
|
||||
.divider-40 { background: #d8d8d8; height: 40rpx; width: 2rpx; }
|
||||
|
||||
.spike-item { display: inline-block; height: 208rpx; margin-right: 32rpx; width: 532rpx; }
|
||||
|
||||
.spike-item:last-child { margin-right: 0rpx; }
|
||||
|
||||
.offer-item { display: inline-block; height: 366rpx; margin-right: 32rpx; width: 250rpx; }
|
||||
|
||||
.offer-item:last-child { margin-right: 0rpx; }
|
||||
|
||||
.index-market-banner { left: 0; position: absolute; top: 32rpx; z-index: 99; }
|
||||
|
||||
.index-market { background: #ff3b3b; border-radius: 100rpx 100rpx 0rpx 0rpx; margin-top: 106rpx; padding-top: 94rpx; }
|
||||
|
||||
.index-market-item-1 { display: inline-block; height: 298rpx; margin-right: 32rpx; width: 250rpx; }
|
||||
|
||||
.index-market-item-1:last-child { margin-right: 0rpx; }
|
||||
|
||||
.index-market-item-1 .goods { background: linear-gradient(270deg,#ff8328,#ffc555); border-radius: 18rpx; display: inline-block; height: 274rpx; margin-right: 32rpx; width: 250rpx; }
|
||||
|
||||
.index-market-item-1 .price-tag { background: rgba(0,0,0,.5); border-radius: 0 12rpx 0 12rpx; left: 24rpx; padding: 3rpx 12rpx; position: absolute; top: 188rpx; }
|
||||
|
||||
.index-market-item-1 .tag-btn { background: linear-gradient(90deg,#ff7f4e,#ff3b3b); border: 4rpx solid #ffe5bf; border-radius: 24rpx; bottom: 0rpx; height: 48rpx; left: 47rpx; position: absolute; width: 156rpx; z-index: 99; }
|
||||
|
||||
.publicize-tags { background: #fff; border: 1rpx solid #ff8512; border-radius: 28rpx; padding: 4rpx 0rpx; }
|
||||
|
||||
.index-cate-item { display: inline-block; text-align: center; }
|
||||
|
||||
.cate-name { font-size: 28rpx; font-weight: 600; }
|
||||
|
||||
.cate-name.current { color: #ff3b3b; font-size: 32rpx; }
|
||||
|
||||
.current-underscore { background: linear-gradient(270deg,#ffc983,#ff3b3b); height: 6rpx; margin: 8rpx 44rpx 0rpx; width: 40rpx; }
|
||||
|
||||
.cate-name-splitline { background: #e6e6e6; height: 40rpx; margin: 22rpx 32rpx 0rpx; width: 2rpx; }
|
||||
|
||||
.index-goods .goods { -webkit-column-break-inside: avoid; border-radius: 18rpx; break-inside: avoid; margin-bottom: 24rpx; width: 326rpx; }
|
||||
|
||||
.banner-bottom { bottom: -8rpx; left: 0; position: absolute; z-index: 99; }
|
||||
|
||||
|
||||
@@ -1,815 +0,0 @@
|
||||
<template>
|
||||
<!-- 页面主体 -->
|
||||
<view class="page">
|
||||
<!--提示框组件-->
|
||||
<u-toast ref="uToast" />
|
||||
<!--无网络组件-->
|
||||
<u-no-network></u-no-network>
|
||||
<!--头部组件-->
|
||||
|
||||
<view class="banner">
|
||||
<swiper autoplay="true" circular="true" :duration="duration" :indicator-active-color="indicatorActiveColor" :indicator-color="indicatorColor" :indicator-dots="indicatorDots" :interval="interval">
|
||||
<swiper-item v-for="(img, index) in banners" :key="key">
|
||||
<image mode="aspectFill" :src="img.image"></image>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
<view class="index-title coreshop-flex coreshop-flex-direction-row coreshop-align-center" :style="{ top: statusBarHeight + 'px' }">
|
||||
<view>
|
||||
<text>{{appTitle}}</text>
|
||||
</view>
|
||||
<view class="coreshop-margin-left-8" @tap="goSearch()">
|
||||
<image class="index-search-btn" src="https://files.cdn.coreshop.cn/static/icon/index-search-btn.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="banner-bottom">
|
||||
<image class="coreshop-image-750-64" src="https://files.cdn.coreshop.cn/static/index/banner-bottom.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="header-plate">
|
||||
<view class="coreshop-margin-left-16 coreshop-margin-right-16 coreshop-coreshop-border-radius-tr-18 coreshop-bg-white coreshop-padding-20">
|
||||
<view class="coreshop-flex coreshop-justify-between">
|
||||
<view class="coreshop-flex coreshop-flex-direction-column coreshop-align-center">
|
||||
<view>
|
||||
<image class="coreshop-image-88-88" src="https://files.cdn.coreshop.cn/static/icon/icon-xffp.png"></image>
|
||||
</view>
|
||||
<view class="coreshop-margin-top-16">
|
||||
<text class="coreshop-font-14 font-color-black">消费帮扶</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="coreshop-flex coreshop-flex-direction-column coreshop-align-center">
|
||||
<view>
|
||||
<image class="coreshop-image-88-88" src="https://files.cdn.coreshop.cn/static/icon/icon-ghfl.png"></image>
|
||||
</view>
|
||||
<view class="coreshop-margin-top-16">
|
||||
<text class="coreshop-font-14 font-color-black">工会福利</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="coreshop-flex coreshop-flex-direction-column coreshop-align-center">
|
||||
<view>
|
||||
<image class="coreshop-image-88-88" src="https://files.cdn.coreshop.cn/static/icon/icon-stzc.png"></image>
|
||||
</view>
|
||||
<view class="coreshop-margin-top-16">
|
||||
<text class="coreshop-font-14 font-color-black">食堂直采</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="coreshop-flex coreshop-flex-direction-column coreshop-align-center">
|
||||
<view>
|
||||
<image class="coreshop-image-88-88" src="https://files.cdn.coreshop.cn/static/icon/icon-832.png"></image>
|
||||
</view>
|
||||
<view class="coreshop-margin-top-16">
|
||||
<text class="coreshop-font-14 font-color-black">832专馆</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="coreshop-margin-top-20 coreshop-flex coreshop-justify-between">
|
||||
<view class="coreshop-flex coreshop-flex-direction-column coreshop-align-center">
|
||||
<view>
|
||||
<image class="coreshop-image-88-88" src="https://files.cdn.coreshop.cn/static/icon/icon-hdzt.png"></image>
|
||||
</view>
|
||||
<view class="coreshop-margin-top-16">
|
||||
<text class="coreshop-font-14 font-color-black">活动专题</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="coreshop-flex coreshop-flex-direction-column coreshop-align-center">
|
||||
<view>
|
||||
<image class="coreshop-image-88-88" src="https://files.cdn.coreshop.cn/static/icon/icon-jczb.png"></image>
|
||||
</view>
|
||||
<view class="coreshop-margin-top-16">
|
||||
<text class="coreshop-font-14 font-color-black">精彩直播</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="coreshop-flex coreshop-flex-direction-column coreshop-align-center">
|
||||
<view>
|
||||
<image class="coreshop-image-88-88" src="https://files.cdn.coreshop.cn/static/icon/icon-dhzx.png"></image>
|
||||
</view>
|
||||
<view class="coreshop-margin-top-16">
|
||||
<text class="coreshop-font-14 font-color-black">兑换中心</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="coreshop-flex coreshop-flex-direction-column coreshop-align-center">
|
||||
<view>
|
||||
<image class="coreshop-image-88-88" src="https://files.cdn.coreshop.cn/static/icon/icon-allcase.png"></image>
|
||||
</view>
|
||||
<view class="coreshop-margin-top-16">
|
||||
<text class="coreshop-font-14 font-color-black">全部分类</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!--公告组件-->
|
||||
<view class="coreshop-margin-left-16 coreshop-margin-right-16 coreshop-margin-top-2 coreshop-padding-left-16 coreshop-padding-right-16 coreshop-border-radius-bl-16 newsletter coreshop-flex coreshop-align-center">
|
||||
<view>
|
||||
<image class="coreshop-icon-48-48" src="https://files.cdn.coreshop.cn/static/icon/icon-newsletter.png"></image>
|
||||
</view>
|
||||
<view class="coreshop-margin-left-8 coreshop-margin-right-12 divider-40"></view>
|
||||
<view class=" coreshop-flex coreshop-align-center">
|
||||
<view class="coreshop-font-14">小小助农乡村振兴平台于9.12正式上线…</view>
|
||||
<view class="coreshop-margin-left-12 coreshop-text-grey">
|
||||
<text class="coreshop-font-12">3/5</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<view class="coreshop-margin-left-16 coreshop-margin-right-16 coreshop-margin-top-8 coreshop-border-radius-tr-8 coreshop-backgroun-gradual-golden-origin">
|
||||
<view class="coreshop-padding-left-16 coreshop-padding-right-16 coreshop-padding-top-16 coreshop-flex coreshop-align-center">
|
||||
<view>
|
||||
<text class="coreshop-font-18 coreshop-font-weight-bold">限时秒杀</text>
|
||||
</view>
|
||||
<view>
|
||||
<text></text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="coreshop-margin-left-16 coreshop-text-orange coreshop-margin-top-6">
|
||||
<text>甄选好物,限时秒杀中</text>
|
||||
</view>
|
||||
<view class="coreshop-margin-top-12 coreshop-margin-left-16 coreshop-white-space-nowrap">
|
||||
<scroll-view scrollX="true">
|
||||
<view class="coreshop-padding-12 coreshop-bg-white coreshop-border-radius-8 spike-item" v-for="(goods, index) in seckill_goods.goods" :key="index">
|
||||
<view class="coreshop-flex coreshop-justify-between">
|
||||
<view class="coreshop-image-160-160">
|
||||
<image class="coreshop-image-160-160" :src="goods.goods_image"></image>
|
||||
</view>
|
||||
<view class="coreshop-margin-left-12 coreshop-flex coreshop-flex-direction-column coreshop-justify-between">
|
||||
<view class="coreshop-single-line-clamp" style="width:300rpx;">
|
||||
<text>{{goods.goods_name}}</text>
|
||||
</view>
|
||||
<view class="coreshop-flex coreshop-justify-between coreshop-align-center">
|
||||
<view class="coreshop-margin-right-12 coresho-font-12">剩余<text class="coreshop-text-red coreshop-margin-right-4 coreshop-margin-left-4">5</text>件</view>
|
||||
</view>
|
||||
<view class="coreshop-flex coreshop-justify-between coreshop-align-center">
|
||||
<view>
|
||||
<text class="coreshop-text-red coreshop-font-weight-bold">{{'¥'+goods.seckill_price}}</text>
|
||||
</view>
|
||||
<view class="tag-btn button-138-48 coreshop-backgroun-gradual-red-little-origin coreshop-border-radius-12">
|
||||
<text class="coreshop-font-weight-bold coresho-font-13 coreshop-text-white">立即抢</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="coreshop-margin-left-16 coreshop-margin-right-16 coreshop-margin-top-16 coreshop-border-radius-tr-8 coreshop-backgroun-gradual-golden-yellow">
|
||||
<view class="coreshop-padding-left-16 coreshop-padding-right-16 coreshop-padding-top-16 coreshop-flex coreshop-align-center coreshop-justify-between">
|
||||
<view>
|
||||
<text class="coreshop-font-18 coreshop-font-weight-bold">特价促销</text>
|
||||
</view>
|
||||
<view class="coreshop-flex coreshop-align-center">
|
||||
<text class="coreshop-text-gray">查看更多</text>
|
||||
<image class="coreshop-margin-top-2 coreshop-margin-left-6 coreshop-icon-24-24" src="https://files.cdn.coreshop.cn/static/icon/icon-more.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="coreshop-margin-top-12 coreshop-margin-left-16 coreshop-white-space-nowrap">
|
||||
<scroll-view scrollX="true">
|
||||
<view class="coreshop-padding-12 coreshop-bg-white coreshop-border-radius-8 offer-item coreshop-text-center" v-for="(goods, index) in activity_area.goods_lists" :key="index">
|
||||
<view class="coreshop-image-202-202">
|
||||
<image class="coreshop-image-202-202 coreshop-border-radius-6" mode="aspectFill" :src="goods.image"></image>
|
||||
</view>
|
||||
<view class="coreshop-margin-top-8 coreshop-margin-bottom-8">
|
||||
<text class="coreshop-text-red coreshop-font-weight-bold">{{'¥'+goods.min_price}}</text>
|
||||
<text class=" coreshop-margin-left-8 coreshop-font-12 coreshop-text-gray">{{'¥'+goods.market_price}}</text>
|
||||
</view>
|
||||
<view class="tag-btn button-138-48 coreshop-backgroun-gradual-red-little-origin coreshop-border-radius-12">
|
||||
<text class="coreshop-font-weight-bold coresho-font-13 coreshop-text-white">立即抢</text>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="coreshop-padding-top-16 coreshop-position-relative">
|
||||
<view class="coreshop-margin-left-16 coreshop-margin-right-16 index-market-banner">
|
||||
<image class="coreshop-image-686-200" src="https://files.cdn.coreshop.cn/static/index/indexzt.png"></image>
|
||||
</view>
|
||||
<view class="index-market coreshop-padding-bottom-16">
|
||||
<view class="coreshop-margin-left-16 coreshop-margin-right-16 coreshop-padding-16 coreshop-padding-right-0 coreshop-bg-white coreshop-border-radius-bl-18 coreshop-white-space-nowrap">
|
||||
<scroll-view scrollX="true">
|
||||
<view class="index-market-item-1 coreshop-position-relative" v-for="(goods, index) in assistGoods" :key="index">
|
||||
<view class="goods coreshop-padding-top-12 coreshop-padding-bottom-12">
|
||||
<view class="coreshop-image-202-202 coreshop-margin-left-12 coreshop-margin-right-12">
|
||||
<image class="coreshop-image-202-202" mode="aspectFill" :src="goods.image"></image>
|
||||
<view class="price-tag">
|
||||
<text class="coreshop-text-white">{{'¥'+goods.min_price}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="tag-btn">
|
||||
<text class="coreshop-font-weight-bold coresho-font-13 coreshop-text-white">点击选购</text>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<view class="coreshop-margin-top-16 coreshop-margin-left-16 coreshop-margin-right-16 coreshop-padding-16 coreshop-bg-white coreshop-border-radius-9 ">
|
||||
<view class="coreshop-flex coreshop-align-center">
|
||||
<view>
|
||||
<text class="coreshop-font-18 coreshop-font-weight-bold">粮油专区</text>
|
||||
</view>
|
||||
<view class="coreshop-margin-left-6 coreshop-flex publicize-tags">
|
||||
<view class="coreshop-margin-left-12 coreshop-margin-right-6">
|
||||
<text class="coreshop-text-orange">限时抢大米非转菜油</text>
|
||||
</view>
|
||||
<view class="coreshop-margin-right-6">
|
||||
<image class="coreshop-margin-top-2 coreshop-icon-24-24" src="https://files.cdn.coreshop.cn/static/icon/icon-more-2.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="coreshop-margin-top-12 coreshop-flex coreshop-justify-between coreshop-align-center">
|
||||
<view class="coreshop-text-center">
|
||||
<view>
|
||||
<image class="coreshop-image-190-190" src="https://www.xinyuyanxuan.com/static/upload/20220426009.png"></image>
|
||||
</view>
|
||||
<view class="coreshop-margin-top-4 coreshop-text-red coreshop-font-weight-bold">
|
||||
<text class="coreshop-font-12">¥</text>
|
||||
<text class="coreshop-font-16">78.00</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="coreshop-text-center">
|
||||
<view>
|
||||
<image class="coreshop-image-190-190" src="https://www.xinyuyanxuan.com/static/upload/20220426003.png"></image>
|
||||
</view>
|
||||
<view class="coreshop-margin-top-4 coreshop-text-red coreshop-font-weight-bold">
|
||||
<text class="coreshop-font-12">¥</text>
|
||||
<text class="coreshop-font-16">28.00</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="coreshop-text-center">
|
||||
<view>
|
||||
<image class="coreshop-image-190-190" src="https://test.mallapi.xinyuyanxuan.com/uploads/images/2022052015235098eb69167.jpg"></image>
|
||||
</view>
|
||||
<view class="coreshop-margin-top-4 coreshop-text-red coreshop-font-weight-bold">
|
||||
<text class="coreshop-font-12">¥</text>
|
||||
<text class="coreshop-font-16">139.00</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="coreshop-margin-top-16 coreshop-flex coreshop-justify-between">
|
||||
<view>
|
||||
<view>
|
||||
<text class="coreshop-font-18 coreshop-font-weight-bold">家居日用</text>
|
||||
</view>
|
||||
<view class="coreshop-margin-top-6">
|
||||
<text class="coreshop-font-16 coreshop-text-purple">每日生活推荐</text>
|
||||
</view>
|
||||
<view class="coreshop-margin-top-16 coreshop-flex coreshop-justify-between">
|
||||
<view class="coreshop-margin-right-8">
|
||||
<image class="coreshop-image-140-140" src="https://www.xinyuyanxuan.com/static/upload/20220426005.png"></image>
|
||||
</view>
|
||||
<view>
|
||||
<image class="coreshop-image-140-140" src="https://www.xinyuyanxuan.com/static/upload/20220426006.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view>
|
||||
<view>
|
||||
<text class="coreshop-font-18 coreshop-font-weight-bold">数码家电</text>
|
||||
</view>
|
||||
<view class="coreshop-margin-top-6">
|
||||
<text class="coreshop-font-16 coreshop-text-blue">大牌正品值得购</text>
|
||||
</view>
|
||||
<view class="coreshop-margin-top-16 coreshop-flex coreshop-justify-between">
|
||||
<view class="coreshop-margin-right-8">
|
||||
<image class="coreshop-image-140-140" src="https://www.xinyuyanxuan.com/static/upload/20220426007.png"></image>
|
||||
</view>
|
||||
<view>
|
||||
<image class="coreshop-image-140-140" src="https://www.xinyuyanxuan.com/static/upload/20220426008.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="coreshop-margin-top-16 coreshop-margin-left-16 coreshop-margin-right-16 coreshop-padding-16 coreshop-backgroun-light-pink coreshop-border-radius-9 ">
|
||||
<view class="coreshop-flex coreshop-justify-between coreshop-align-center">
|
||||
<view>
|
||||
<text class="coreshop-font-18 coreshop-font-weight-bold">甄选精品</text>
|
||||
</view>
|
||||
<view class="coreshop-flex coreshop-align-center">
|
||||
<text class="coreshop-text-grey">查看更多</text>
|
||||
<image class="coreshop-margin-top-2 coreshop-margin-left-6 coreshop-icon-24-24" src="https://files.cdn.coreshop.cn/static/icon/icon-more.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="coreshop-margin-top-6">
|
||||
<text class="coreshop-font-16 coreshop-text-orange">甄选好货 精品尝鲜</text>
|
||||
</view>
|
||||
<view class="coreshop-margin-top-12 coreshop-border-radius-bl-18 coreshop-white-space-nowrap">
|
||||
<scroll-view scrollX="true">
|
||||
<view class="scroll-item index-market-item-1" v-for="(goods, index) in activity_area.goods_lists" :key="index">
|
||||
<view class="coreshop-position-relative coreshop-image-250-250">
|
||||
<image class="coreshop-image-250-250 coreshop-border-radius-tr-18" mode="aspectFill" :src="goods.image"></image>
|
||||
<view class="tag-goods coreshop-bg-green">
|
||||
<text class="coreshop-font-11 coreshop-text-white">推荐</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="coreshop-margin-top-6 coreshop-single-line-clamp" style="width:250rpx;">
|
||||
<text class="coreshop-font-16">{{goods.name}}</text>
|
||||
</view>
|
||||
<view class="coreshop-margin-top-4 coreshop-text-red coreshop-font-weight-bold">
|
||||
<text class="coreshop-font-12">¥</text>
|
||||
<text class="coreshop-font-16">{{goods.min_price}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="coreshop-margin-top-16 coreshop-margin-left-16 coreshop-margin-right-16 coreshop-padding-16 coreshop-backgroun-light-green coreshop-border-radius-9 ">
|
||||
<view class="coreshop-flex coreshop-justify-between coreshop-align-center">
|
||||
<view>
|
||||
<text class="coreshop-font-18 coreshop-font-weight-bold">精选帮扶</text>
|
||||
</view>
|
||||
<view class="coreshop-flex coreshop-align-center">
|
||||
<text class="coreshop-text-grey">查看更多</text>
|
||||
<image class="coreshop-margin-top-2 coreshop-margin-left-6 coreshop-icon-24-24" src="https://files.cdn.coreshop.cn/static/icon/icon-more.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="coreshop-margin-top-6">
|
||||
<text class="coreshop-font-16 line-green">优质农产 精准帮扶</text>
|
||||
</view>
|
||||
<view class="coreshop-margin-top-12 coreshop-border-radius-bl-18 coreshop-white-space-nowrap">
|
||||
<scroll-view scrollX="true">
|
||||
<view class="scroll-item index-market-item-1" v-for="(goods, index) in activity_area.goods_lists" :key="index">
|
||||
<view class="coreshop-position-relative coreshop-image-250-250">
|
||||
<image class="coreshop-image-250-250 coreshop-border-radius-tr-18" mode="aspectFill" :src="goods.image"></image>
|
||||
<view class="tag-duikoubangfu">
|
||||
<text class="coreshop-margin-left-6 coreshop-font-14 coreshop-text-white">对口帮扶</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="coreshop-margin-top-6 coreshop-single-line-clamp" style="width:250rpx;">
|
||||
<text class="coreshop-font-16">{{goods.name}}</text>
|
||||
</view>
|
||||
<view class="coreshop-margin-top-4 coreshop-text-red coreshop-font-weight-bold">
|
||||
<text class="coreshop-font-12">¥</text>
|
||||
<text class="coreshop-font-16">{{goods.min_price}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="coreshop-margin-top-16 coreshop-margin-left-16 coreshop-margin-right-16 coreshop-padding-16 coreshop-backgroun-light-orange coreshop-border-radius-9 ">
|
||||
<view class="coreshop-flex coreshop-justify-between coreshop-align-center">
|
||||
<view>
|
||||
<text class="coreshop-font-18 coreshop-font-weight-bold">会员专享</text>
|
||||
</view>
|
||||
<view class="coreshop-flex coreshop-align-center">
|
||||
<text class="coreshop-text-grey">查看更多</text>
|
||||
<image class="coreshop-margin-top-2 coreshop-margin-left-6 coreshop-icon-24-24" src="https://files.cdn.coreshop.cn/static/icon/icon-more.png"></image>
|
||||
</view>
|
||||
</view>
|
||||
<view class="coreshop-margin-top-6">
|
||||
<text class="coreshop-font-16 coreshop-text-red">会员折扣 优惠专享</text>
|
||||
</view>
|
||||
<view class="coreshop-margin-top-12 coreshop-border-radius-bl-18 coreshop-white-space-nowrap">
|
||||
<scroll-view scrollX="true">
|
||||
<view class="scroll-item index-market-item-1" v-for="(goods, index) in activity_area.goods_lists" :key="index">
|
||||
<view class="coreshop-position-relative coreshop-image-250-250">
|
||||
<image class="coreshop-image-250-250 coreshop-border-radius-tr-18" mode="aspectFill" :src="goods.image"></image>
|
||||
<view class="tag-hyzx">
|
||||
<text class="coreshop-margin-left-6 coreshop-font-14 coreshop-text-white">会员专属</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="coreshop-margin-top-6 coreshop-single-line-clamp" style="width:250rpx;">
|
||||
<text class="coreshop-font-16">{{goods.name}}</text>
|
||||
</view>
|
||||
<view class="coreshop-margin-top-4 coreshop-text-red coreshop-font-weight-bold">
|
||||
<text class="coreshop-font-12">¥</text>
|
||||
<text class="coreshop-font-16">{{goods.min_price}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
||||
<view class="coreshop-margin-top-16 coreshop-margin-left-20 coreshop-margin-right-20">
|
||||
<view class="coreshop-white-space-nowrap">
|
||||
<scroll-view scrollX="true">
|
||||
<view class="index-cate-item">
|
||||
<view class="cate-name current">
|
||||
<text>综合推荐</text>
|
||||
</view>
|
||||
<view>
|
||||
<text class="coreshop-font-13 coreshop-text-gray">好品不断</text>
|
||||
</view>
|
||||
<view class="current-underscore"></view>
|
||||
</view>
|
||||
<view class="index-cate-item cate-name-splitline"></view>
|
||||
<view class="index-cate-item">
|
||||
<view class="cate-name ">
|
||||
<text>粮油干货</text>
|
||||
</view>
|
||||
<view>
|
||||
<text class="coreshop-font-13 coreshop-text-gray">主食必备</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="index-cate-item cate-name-splitline"></view>
|
||||
<view class="index-cate-item">
|
||||
<view class="cate-name ">
|
||||
<text>零食休闲</text>
|
||||
</view>
|
||||
<view>
|
||||
<text class="coreshop-font-13 coreshop-text-gray">生活小憩</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="index-cate-item cate-name-splitline"></view>
|
||||
<view class="index-cate-item">
|
||||
<view class="cate-name ">
|
||||
<text>生鲜果蔬</text>
|
||||
</view>
|
||||
<view>
|
||||
<text class="coreshop-font-13 coreshop-text-gray">绿色有机</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="index-cate-item cate-name-splitline"></view>
|
||||
<view class="index-cate-item">
|
||||
<view class="cate-name ">
|
||||
<text>综合推荐</text>
|
||||
</view>
|
||||
<view>
|
||||
<text class="coreshop-font-13 coreshop-text-gray">好品不断</text>
|
||||
</view>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<view class="coreshop-margin-top-16 index-goods coreshop-flex coreshop-justify-between coreshop-flex-wrap">
|
||||
<view class="goods" v-for="(item, index) in activity_area.goods_lists" :key="index">
|
||||
<view class="coreshop-position-relative">
|
||||
<image class="coreshop-image-326-326 coreshop-border-radius-tr-18" mode="aspectFill" :src="item.image"></image>
|
||||
<view class="tag-goods-location">
|
||||
<image class="coreshop-icon-18-20 coreshop-margin-right-4" src="https://files.cdn.coreshop.cn/static/icon/icon-location.png"></image>
|
||||
<text class="coreshop-font-10">鹤城区</text>
|
||||
</view>
|
||||
<view class="tag-goods coreshop-bg-green">
|
||||
<text class="coreshop-font-11 font-color-white">帮扶</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="coreshop-padding-top-6 coreshop-padding-bottom-6 coreshop-padding-left-8 coreshop-padding-right-8 coreshop-bg-white coreshop-border-radius-bl-18">
|
||||
<view class="title-294 coreshop-multiple-line-clamp">
|
||||
<text>{{item.name}}</text>
|
||||
</view>
|
||||
<view class="margin-t-16 coreshop-flex coreshop-justify-between coreshop-align-center">
|
||||
<view class="coreshop-text-red coreshop-font-weight-bold">
|
||||
<text class="coreshop-font-12">¥</text>
|
||||
<text class="coreshop-font-16">{{item.min_price}}</text>
|
||||
</view>
|
||||
<view>
|
||||
<text class="coreshop-font-10 coreshop-text-gray">15人付款</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="coreshop-font-12 font-color-light-gray padding-24 text-align-center">{{loadMoreText}}</view>
|
||||
</view>
|
||||
|
||||
|
||||
|
||||
<!--版权组件-->
|
||||
<coreshop-copyright v-if="copy"></coreshop-copyright>
|
||||
<!--客服组件-->
|
||||
<!-- #ifdef MP-WEIXIN -->
|
||||
<button class="floatingButton" hover-class="none" open-type="contact" :session-from="kefupara">
|
||||
<u-icon name="server-man" color="#e54d42" size="45"></u-icon>
|
||||
</button>
|
||||
<!-- #endif -->
|
||||
<!--返回顶部组件-->
|
||||
<u-back-top :scroll-top="scrollTop" :duration="500"></u-back-top>
|
||||
|
||||
<!-- 登录提示 -->
|
||||
<coreshop-login-modal></coreshop-login-modal>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
let systemInfo = uni.getSystemInfoSync();
|
||||
import { mapMutations, mapActions, mapState } from 'vuex';
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
indicatorDots: true,
|
||||
autoplay: true,
|
||||
interval: 5000,
|
||||
duration: 500,
|
||||
indicatorColor: "rgba(255, 255, 255, .5)",
|
||||
indicatorActiveColor: "#FFFFFF",
|
||||
banners: [{ "image": "https://files.cdn.coreshop.cn/static/index/banner01.jpg" }],
|
||||
seckill_goods:
|
||||
{
|
||||
"id": 4,
|
||||
"start_time": "00:00",
|
||||
"end_time": "23:59",
|
||||
"status": 1,
|
||||
"tips": "抢购中",
|
||||
"end_time_int": 1662479940,
|
||||
"goods": [
|
||||
{
|
||||
"seckill_id": 4,
|
||||
"start_date": "2022-08-22",
|
||||
"end_date": "2022-10-31",
|
||||
"goods_id": 145,
|
||||
"goods_name": "蜜悦农野山花蜜250g",
|
||||
"goods_image": "https://file.xinyuyanxuan.com/uploads/images/20220822163511fcde96224.jpg",
|
||||
"goods_min_price": "19.00",
|
||||
"seckill_price": "16.80",
|
||||
"seckill_total": 3
|
||||
},
|
||||
{
|
||||
"seckill_id": 4,
|
||||
"start_date": "2022-08-25",
|
||||
"end_date": "2022-10-31",
|
||||
"goods_id": 146,
|
||||
"goods_name": "名氏竹纤维面巾纸每抽300张",
|
||||
"goods_image": "https://file.xinyuyanxuan.com/uploads/images/2022082515333656b553439.jpg",
|
||||
"goods_min_price": "6.00",
|
||||
"seckill_price": "4.90",
|
||||
"seckill_total": 0
|
||||
}
|
||||
]
|
||||
},
|
||||
activity_area:
|
||||
{
|
||||
"id": 1,
|
||||
"name": "特价促销",
|
||||
"title": "特价促销",
|
||||
"image": "https://file.xinyuyanxuan.com/uploads/images/20220602165723151556774.png",
|
||||
"goods_lists": [
|
||||
{
|
||||
"id": 6,
|
||||
"name": "麻阳县雁享十八洞乡里大米5KG",
|
||||
"market_price": "55.00",
|
||||
"min_price": "49.00",
|
||||
"column_ids": "1,2,3,6",
|
||||
"image": "https://file.xinyuyanxuan.com/uploads/images/20220520111650c05758089.jpg"
|
||||
}, {
|
||||
"id": 6,
|
||||
"name": "麻阳县雁享十八洞乡里大米5KG",
|
||||
"market_price": "55.00",
|
||||
"min_price": "49.00",
|
||||
"column_ids": "1,2,3,6",
|
||||
"image": "https://file.xinyuyanxuan.com/uploads/images/20220520111650c05758089.jpg"
|
||||
}, {
|
||||
"id": 6,
|
||||
"name": "麻阳县雁享十八洞乡里大米5KG",
|
||||
"market_price": "55.00",
|
||||
"min_price": "49.00",
|
||||
"column_ids": "1,2,3,6",
|
||||
"image": "https://file.xinyuyanxuan.com/uploads/images/20220520111650c05758089.jpg"
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"name": "麻阳县雁享十八洞农家大米25kg",
|
||||
"market_price": "160.00",
|
||||
"min_price": "154.00",
|
||||
"column_ids": "1,2,3,6",
|
||||
"image": "https://file.xinyuyanxuan.com/uploads/images/202205201019421de277583.jpg"
|
||||
}
|
||||
]
|
||||
},
|
||||
assistGoods: [
|
||||
{
|
||||
"id": 19,
|
||||
"name": "芷江县芙蓉行乡里大米5KG",
|
||||
"image": "https://file.xinyuyanxuan.com/uploads/images/20220520150818c78ab3340.jpg",
|
||||
"min_price": "49.00",
|
||||
"market_price": "59.00",
|
||||
"second_assist_id": 132,
|
||||
"sales_actual": 44,
|
||||
"column_ids": "1,3,6,2",
|
||||
"create_time": "2021-06-23 22:20:45",
|
||||
"sales_virtual": 0,
|
||||
"sales_total": 44,
|
||||
"second_assist": "芷江县"
|
||||
},
|
||||
{
|
||||
"id": 21,
|
||||
"name": "芷江县芙蓉行高山清香菜籽油5L",
|
||||
"image": "https://file.xinyuyanxuan.com/uploads/images/202205201519025f61a5945.jpg",
|
||||
"min_price": "119.00",
|
||||
"market_price": "129.00",
|
||||
"second_assist_id": 132,
|
||||
"sales_actual": 14,
|
||||
"column_ids": "1,2,3,6",
|
||||
"create_time": "2021-06-23 23:03:18",
|
||||
"sales_virtual": 0,
|
||||
"sales_total": 14,
|
||||
"second_assist": "芷江县"
|
||||
},
|
||||
{
|
||||
"id": 27,
|
||||
"name": "芷江县芙蓉行原色古法冰糖600g",
|
||||
"image": "https://file.xinyuyanxuan.com/uploads/images/202205201603068fc0c1758.jpg",
|
||||
"min_price": "19.00",
|
||||
"market_price": "29.00",
|
||||
"second_assist_id": 132,
|
||||
"sales_actual": 12,
|
||||
"column_ids": "1,4",
|
||||
"create_time": "2021-06-24 01:10:58",
|
||||
"sales_virtual": 0,
|
||||
"sales_total": 12,
|
||||
"second_assist": "芷江县"
|
||||
},
|
||||
{
|
||||
"id": 12,
|
||||
"name": "麻阳县雁享十八洞土家腊肠500g",
|
||||
"image": "https://file.xinyuyanxuan.com/uploads/images/20220520135335e3f4d2286.jpg",
|
||||
"min_price": "51.00",
|
||||
"market_price": "66.00",
|
||||
"second_assist_id": 131,
|
||||
"sales_actual": 7,
|
||||
"column_ids": "1,2",
|
||||
"create_time": "2021-06-23 19:51:49",
|
||||
"sales_virtual": 0,
|
||||
"sales_total": 7,
|
||||
"second_assist": "麻阳县"
|
||||
},
|
||||
{
|
||||
"id": 14,
|
||||
"name": "麻阳县雁享十八洞高山香菇250g",
|
||||
"image": "https://file.xinyuyanxuan.com/uploads/images/20220520140103a3af51521.jpg",
|
||||
"min_price": "48.00",
|
||||
"market_price": "58.00",
|
||||
"second_assist_id": 131,
|
||||
"sales_actual": 5,
|
||||
"column_ids": "1,2",
|
||||
"create_time": "2021-06-23 20:34:22",
|
||||
"sales_virtual": 0,
|
||||
"sales_total": 5,
|
||||
"second_assist": "麻阳县"
|
||||
},
|
||||
{
|
||||
"id": 24,
|
||||
"name": "芷江县芙蓉行高山百合干220g",
|
||||
"image": "https://file.xinyuyanxuan.com/uploads/images/2022052015343069ca66118.jpg",
|
||||
"min_price": "28.00",
|
||||
"market_price": "38.00",
|
||||
"second_assist_id": 132,
|
||||
"sales_actual": 3,
|
||||
"column_ids": "1,6",
|
||||
"create_time": "2021-06-24 00:07:08",
|
||||
"sales_virtual": 0,
|
||||
"sales_total": 3,
|
||||
"second_assist": "芷江县"
|
||||
},
|
||||
{
|
||||
"id": 15,
|
||||
"name": "麻阳县雁享十八洞高山黑木耳250g",
|
||||
"image": "https://file.xinyuyanxuan.com/uploads/images/20220520140316fc5701854.jpg",
|
||||
"min_price": "48.00",
|
||||
"market_price": "58.00",
|
||||
"second_assist_id": 131,
|
||||
"sales_actual": 2,
|
||||
"column_ids": "1,2",
|
||||
"create_time": "2021-06-23 20:55:39",
|
||||
"sales_virtual": 0,
|
||||
"sales_total": 2,
|
||||
"second_assist": "麻阳县"
|
||||
},
|
||||
{
|
||||
"id": 13,
|
||||
"name": "麻阳县雁享十八洞土猪腊肉500g",
|
||||
"image": "https://file.xinyuyanxuan.com/uploads/images/20220520135107501fd3142.jpg",
|
||||
"min_price": "76.00",
|
||||
"market_price": "88.00",
|
||||
"second_assist_id": 131,
|
||||
"sales_actual": 2,
|
||||
"column_ids": "1,2",
|
||||
"create_time": "2021-06-23 20:13:05",
|
||||
"sales_virtual": 0,
|
||||
"sales_total": 2,
|
||||
"second_assist": "麻阳县"
|
||||
},
|
||||
{
|
||||
"id": 23,
|
||||
"name": "芷江县芙蓉行高山白莲500g",
|
||||
"image": "https://file.xinyuyanxuan.com/uploads/images/20220520153004c95720922.jpg",
|
||||
"min_price": "49.00",
|
||||
"market_price": "59.00",
|
||||
"second_assist_id": 132,
|
||||
"sales_actual": 0,
|
||||
"column_ids": "1",
|
||||
"create_time": "2021-06-23 23:45:51",
|
||||
"sales_virtual": 0,
|
||||
"sales_total": 0,
|
||||
"second_assist": "芷江县"
|
||||
}
|
||||
],
|
||||
statusBarHeight: systemInfo.statusBarHeight + 6,
|
||||
currentIndex: 0,
|
||||
opacity: 0,
|
||||
scrollTop: 0,
|
||||
imageUrl: '/static/images/ShareImage.png', //店铺分享图片
|
||||
kefupara: '', //客服传递资料
|
||||
shareUrl: this.$globalConstVars.shareUrl,
|
||||
homeTitle: '',
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
...mapState({
|
||||
hasLogin: state => state.hasLogin,
|
||||
userInfo: state => state.userInfo,
|
||||
}),
|
||||
hasLogin: {
|
||||
get() {
|
||||
return this.$store.state.hasLogin;
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit('hasLogin', val);
|
||||
}
|
||||
},
|
||||
userInfo: {
|
||||
get() {
|
||||
return this.$store.state.userInfo;
|
||||
},
|
||||
set(val) {
|
||||
this.$store.commit('userInfo', val);
|
||||
}
|
||||
},
|
||||
appTitle() {
|
||||
this.homeTitle = this.$store.state.config.shopName;
|
||||
return this.homeTitle;
|
||||
},
|
||||
// 获取店铺联系人手机号
|
||||
shopMobile() {
|
||||
return this.$store.state.config.shopMobile || 0;
|
||||
}
|
||||
},
|
||||
onLoad(e) {
|
||||
this.initData();
|
||||
},
|
||||
methods: {
|
||||
// 首页初始化获取数据
|
||||
initData() {
|
||||
|
||||
var _this = this;
|
||||
if (this.$db.get('userToken')) {
|
||||
this.$u.api.userInfo().then(res => {
|
||||
if (res.status) {
|
||||
_this.userInfo = res.data;
|
||||
_this.hasLogin = true;
|
||||
// #ifdef MP-WEIXIN
|
||||
//微信小程序打开客服时,传递用户信息
|
||||
var kefupara = {};
|
||||
kefupara.nickName = res.data.nickName;
|
||||
kefupara.tel = res.data.mobile;
|
||||
_this.kefupara = JSON.stringify(kefupara);
|
||||
//console.log(_this.kefupara);
|
||||
// #endif
|
||||
}
|
||||
});
|
||||
}
|
||||
this.getShareUrl();
|
||||
},
|
||||
//获取分享URL
|
||||
getShareUrl() {
|
||||
let data = {
|
||||
client: 2,
|
||||
url: this.$globalConstVars.shareUrl,
|
||||
type: 1,
|
||||
page: 1,
|
||||
};
|
||||
let userToken = this.$db.get('userToken');
|
||||
if (userToken && userToken != '') {
|
||||
data['token'] = userToken;
|
||||
}
|
||||
this.$u.api.share(data).then(res => {
|
||||
this.shareUrl = res.data
|
||||
});
|
||||
},
|
||||
},
|
||||
onPullDownRefresh() {
|
||||
this.initData();
|
||||
uni.stopPullDownRefresh();
|
||||
},
|
||||
//分享
|
||||
onShareAppMessage(res) {
|
||||
return {
|
||||
title: this.$store.state.config.shareTitle,
|
||||
imageUrl: this.$store.state.config.shareImage,
|
||||
path: this.shareUrl
|
||||
}
|
||||
},
|
||||
onShareTimeline(res) {
|
||||
return {
|
||||
title: this.$store.state.config.shareTitle,
|
||||
imageUrl: this.$store.state.config.shareImage,
|
||||
path: this.shareUrl
|
||||
}
|
||||
},
|
||||
onPageScroll: function (e) {
|
||||
this.isScorll = e.scrollTop > 100 ? true : false;
|
||||
this.scrollTop = e.scrollTop;
|
||||
if (e.scrollTop <= 100) {
|
||||
this.opacity = e.scrollTop / 100;
|
||||
} else if (this.scrollTop > 100) {
|
||||
this.opacity = 1;
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
@import 'zhunong.scss';
|
||||
</style>
|
||||
BIN
CoreCms.Net.Uni-App/CoreShop/static/images/common/cart.png
Normal file
BIN
CoreCms.Net.Uni-App/CoreShop/static/images/common/cart.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.7 KiB |
Reference in New Issue
Block a user