里海云仓

This commit is contained in:
THK3121 2023-09-09 20:26:18 +08:00
parent f153d49273
commit 5a5a18571a
11 changed files with 725 additions and 348 deletions

View File

@ -180,8 +180,9 @@
}, { }, {
"path": "goods_list/index", "path": "goods_list/index",
"style": { "style": {
"navigationBarTitleText": "里海云仓", "enablePullDownRefresh": true,
"enablePullDownRefresh": true "navigationStyle": "custom"
} }
}, },
{ {
@ -258,8 +259,8 @@
}, { }, {
"path": "cloud_entrepot/index", "path": "cloud_entrepot/index",
"style": { "style": {
"navigationBarTitleText": "里海云仓", "navigationStyle": "custom",
"enablePullDownRefresh": false "enablePullDownRefresh": true
} }
}, { }, {

View File

@ -17,216 +17,293 @@
</view> --> </view> -->
<view class=""> <view class="" v-if="cloudList.length>0">
<view style="height: var(--status-bar-height);"></view> <view class="">
<transition name="fade"> <!-- <view style="height: var(--status-bar-height);"></view> -->
<view class="head" v-if="showtit"> <transition name="fade">
<view style="display: flex;align-items: center;"> <view class="head" style="padding-top: var(--status-bar-height);" v-if="showtit">
<u--image :showLoading="true" src="/static/images/LHYC/FH.png" width="50.82rpx" <view style="display: flex;align-items: center;">
height="50.82rpx"></u--image>
<view class="head_tit">
通滩镇里海云仓
</view>
</view>
<view class="" @click="showPop=true">
<u--image :showLoading="true" src="/static/images/LHYC/QB.png" width="50.82rpx"
height="50.82rpx"></u--image>
全部
</view>
</view>
</transition>
<transition name="fade">
<!-- 滚动 -->
<view class="heads" v-if="!showtit">
<view class="" style="display: flex;align-items: center;">
<view class="back" style="margin-right: 17rpx;">
<u--image :showLoading="true" src="/static/images/LHYC/FH.png" width="50.82rpx" <u--image :showLoading="true" src="/static/images/LHYC/FH.png" width="50.82rpx"
height="50.82rpx" @click='goBack'></u--image>
<view class="head_tit">
通滩镇里海云仓
</view>
</view>
<view class="" @click="showPop=true">
<u--image :showLoading="true" src="/static/images/LHYC/QB.png" width="50.82rpx"
height="50.82rpx"></u--image> height="50.82rpx"></u--image>
</view> 全部
<view class="" style="font-size: 40rpx;font-weight: 700;transform: skewX(-10deg);">
供销综合云市场
</view> </view>
</view> </view>
</transition>
<transition name="fade">
<!-- 滚动 -->
<view class="heads" style="padding-top: var(--status-bar-height);" v-if="!showtit">
<view style="align-items: center;display: flex;justify-content: space-between;">
<view class="" style="display: flex;align-items: center;">
<view class="back" style="margin-right: 17rpx;">
<u--image :showLoading="true" src="/static/images/LHYC/FH.png" width="50.82rpx"
height="50.82rpx" @click='goBack'></u--image>
</view>
<view class="" style="font-size: 40rpx;transform: skewX(-10deg);">
供销综合云市场
</view>
</view>
<view style="position: relative;width: 289.14rpx;">
<u-search borderColor="#FF6D20" bgColor="white" :showAction="false" placeholder="请输入..."
v-model="keyword" class="serch_cls"></u-search>
<u--image class="img_cls" :showLoading="true" src="/static/images/GXSC/SS.png"
width="115.65rpx" height="56.82rpx" @click="serch"></u--image>
</view>
<view class='iconfont search-right' @click="showPop=true">
<u--image :showLoading="true" src="/static/images/LHYC/QB.png" width="50.82rpx"
height="50.82rpx"></u--image>
<text class="">全部</text>
<view class="flag">
</view>
</view>
</view>
<view style="position: relative;width: 289.14rpx;">
<u-search borderColor="#FF6D20" bgColor="white" :showAction="false" placeholder="请输入..."
v-model="keyword" class="serch_cls"></u-search>
<u--image class="img_cls" :showLoading="true" src="/static/images/GXSC/SS.png" width="115.65rpx"
height="56.82rpx"></u--image>
</view> </view>
<view class='iconfont search-right' @click="showPop=true">
<u--image :showLoading="true" src="/static/images/LHYC/QB.png" width="50.82rpx" </transition>
height="50.82rpx"></u--image> <view class="box">
全部 <view :class="act_swiper">
<swiper :autoplay="false" :active-class="activeClass" :interval="3000" class="swipers"
:circular="true" previous-margin='0rpx' next-margin='0rpx' :current="current"
:disable-touch="true">
<swiper-item v-for="(item,index) in cloudList">
<u--image :showLoading="true" :src="item.cover" width="750rpx"
height="998.83rpx"></u--image>
</swiper-item>
</swiper>
</view> </view>
</view> <view class="" style="height:998.83rpx;" v-if="act_swiper">
</transition>
</view>
<view class="box"> <!-- <u--image :showLoading="true" src="/static/images/LHYC/BG.png" width="750rpx"
<view class="" style="">
<swiper :autoplay="false" :active-class="activeClass" :interval="3000" class="swipers"
:circular="true" previous-margin='1rpx' next-margin='1rpx' :current="current"
:disable-touch="true">
<swiper-item v-for="item in list3">
<u--image :showLoading="true" :src="item" width="750rpx" height="998.83rpx"></u--image>
</swiper-item>
</swiper>
</view>
<!-- <u--image :showLoading="true" src="/static/images/LHYC/BG.png" width="750rpx"
height="998.83rpx"></u--image> --> height="998.83rpx"></u--image> -->
<view class="menu" v-if="false"> <view class="menu" style="z-index: 999;" v-if="showtit">
<swiper :autoplay="false" :active-class="activeClass" :interval="3000" class="swiper"
<swiper :autoplay="false" :active-class="activeClass" :interval="3000" class="swiper" :circular="true" previous-margin='280rpx' next-margin='280rpx' :current="current"
:circular="true" previous-margin='280rpx' next-margin='280rpx' :current="current" @change="test">
@change="test"> <swiper-item v-for="(item,index) in cloudList" :class="{active_swiper:index==current}">
<swiper-item v-for="item in list3"> <u--image :showLoading="true" :src="item.background" width="175.23rpx"
<u--image :showLoading="true" :src="item" width="175.23rpx" height="175.23rpx"></u--image> height="175.23rpx"></u--image>
</swiper-item> </swiper-item>
</swiper> </swiper>
</view>
<view class="content_act" :style="">
<view class="content_sift" v-if="true">
<view class="">
综合
</view>
<view class="">
销量
</view>
<view class="">
价格
</view>
</view> </view>
<view class="goods_list">
<view class="goods" v-for="item,index in [1,1,1,1,1]">
<view class="left">
<u--image :showLoading="true" src="/static/images/LHYC/BG.png" width="192.76rpx"
height="192.76rpx"></u--image>
</view>
<view class="right">
<view class="tit">
亿福馒头粉纯天然无添加小麦粉加工 1000g/
</view>
<view class="">
<view class="good_score">
<text style="margin-right: 10rpx;color: #F84221;">5.0</text>
<text>3000+评论</text>
</view>
<view class="good_price">
<view class="good_price_l">
<view class=""
style="color: #F84221;font-size: 22.78rpx;font-weight: bold;">
<text style="font-size: 30rpx;">10</text>.00
</view>
<view class="old_price">
30.00
</view>
</view>
<view class="good_price_r">
<u--image :showLoading="true" src="/static/images/LHYC/J.png"
width="49.07rpx" height="49.07rpx"></u--image>
</view>
<transition name="fade">
<view class="content">
<view class="content_sift" :style="{position:pocls,top:headtop+'px'}" v-if="!showtit">
<view :class="{act:item.act}" v-for="item,index in actList" :key="index"
@click="screenGoods(item.screen,index)">
{{item.tit}}
</view>
</view>
<view class="goods_list" v-if="goodsList.length>0">
<!-- <view style="background-color: white;height: 100rpx;" v-if="!showtit">
</view> -->
<view class="empty" v-if='showLoading'>
<u-loading-icon v-if='showLoading' text="加载中" textSize="18"></u-loading-icon>
</view>
<view class="goods" @click="godDetail(item)" v-else v-for="item,index in goodsList">
<view class="left">
<u--image :showLoading="true" :src="item.image" width="192.76rpx"
height="192.76rpx"></u--image>
</view>
<view class="right">
<view class="tit">
<!-- 亿福馒头粉纯天然无添加小麦粉加工 1000g/ -->
{{item.store_info}}
</view>
<view class="">
<view class="good_score">
<text style="margin-right: 10rpx;color: #F84221;">{{item.rate}}</text>
<text>{{item.reply_count}}评论</text>
</view>
<view class="good_price">
<view class="good_price_l">
<view class=""
style="color: #F84221;font-size: 22.78rpx;font-weight: bold;">
<text style="font-size: 30rpx;">{{item.price}}</text>
</view>
<view class="old_price">
30.00
</view>
</view>
<view class="good_price_r" @click="addcart(item.price)">
<u--image class="act_class" :showLoading="true"
src="/static/images/LHYC/J.png" width="49.07rpx"
height="49.07rpx"></u--image>
</view>
</view>
</view>
</view>
</view>
<view style="height: 100rpx;">
</view>
</view>
<view v-else>
<view class="empty">
<view class="info">
<u--image :showLoading="true" src="/static/images/noCart.png" width="400.09rpx"
height="400.09rpx"></u--image>
</view> </view>
</view> </view>
</view> </view>
</view>
<view style="height: 100rpx;">
</view> <view class="card">
</view> <view class="left">
<view class="card"> <view class="" style="position: relative;">
<view class="left"> <u--image :showLoading="true" src="/static/images/LHYC/GWC.png" width="63.09rpx"
<view class=""> height="63.09rpx"></u--image>
<u--image :showLoading="true" src="/static/images/LHYC/GWC.png" width="63.09rpx"
height="63.09rpx"></u--image> <view class="badge" v-show="goodsNum">
</view> {{goodsNum}}
<view class="tot_price"> </view>
<view class=""> </view>
20.00 <view class="tot_price">
<view class="">
{{totalMoney}}
</view>
<view class="">
支持配送 售后无忧
</view>
</view>
</view> </view>
<view class=""> <view class="right" @click="navgo('/pages/order_addcart/order_addcart')">
支持配送 售后无忧 去结算
</view> </view>
</view> </view>
</view> </view>
<view class="right"> </transition>
去结算
</view>
</view>
</view> </view>
<!-- http://192.168.1.5:8080/ -->
</view> </view>
<!-- http://192.168.1.5:8080/ --> <!-- 组件 -->
<view<u-popup mode="right" :show="showPop" @close="showPop=false" @open="showPop=true">
<view class="pop">
<!-- <text>出淤泥而不染濯清涟而不妖</text> -->
<view style="height: var(--status-bar-height);"></view>
<view class="pop_head" style="display: flex;">
<u--image :showLoading="true" src="/static/images/LHYC/PFH.png" width="50.82rpx"
height="50.82rpx" @click='showPop=false'></u--image>
<view class="head_tit">
里海云仓
</view>
</view>
<view class="pop_content">
<view class="pop_li" @click="all(index)" v-for="item,index in cloudList" :key="index">
<u--image :showLoading="true" :src="item.background" width="84.11rpx"
height="84.11rpx"></u--image>
<view class="" style="margin-left: 20rpx;">
<view style="font-size: 33.29rpx;color: black;">
{{item.category_name}}云仓服务
</view>
<view class="" style="font-size: 22.78rpx;">
{{item.description}}
</view>
</view>
</view>
</view>
</view>
</u-popup>
</view> </view>
<!-- 组件 --> <view class="empty" style="" v-else>
<view<u-popup mode="right" :show="showPop" @close="showPop=false" @open="showPop=true"> <view style="height: var(--status-bar-height);"></view>
<view class="pop"> <view class="info">
<!-- <text>出淤泥而不染濯清涟而不妖</text> --> <u--image :showLoading="true" src="/static/images/noCart.png" width="400.09rpx"
<view class="pop_head" style="display: flex;"> height="400.09rpx"></u--image>
<u--image :showLoading="true" src="/static/images/LHYC/PFH.png" width="50.82rpx"
height="50.82rpx"></u--image>
<view class="head_tit">
里海云仓
</view>
</view>
<view class="pop_content">
<view class="pop_li" v-for="item in [1,1,1,1,1,1]">
<u--image :showLoading="true" src="/static/images/LHYC/SHFWYC.png" width="84.11rpx"
height="84.11rpx"></u--image>
<view class="" style="margin-left: 20rpx;">
<view style="font-size: 33.29rpx;color: black;">
生活服务云仓服务
</view>
<view class="" style="font-size: 22.78rpx;">
生活服务云仓服务
</view>
</view>
</view>
</view>
</view> </view>
</u-popup>
</view>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
import { import {
cloudWarehouse,
getCityCloundShop getCityCloundShop
} from '@/api/api.js' } from '@/api/api.js'
import { import {
Toast Toast
} from '@/libs/uniApi'; } from '@/libs/uniApi';
import {
initiateAssistApi
} from '@/api/activity.js';
import {
getCartCounts,
getCartList,
} from '@/api/order.js';
import {
goShopDetail
} from '@/libs/order.js'
export default { export default {
data() { data() {
let src = 'https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/luzhou/static4/13'; let src = 'https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/luzhou/static4/13';
return { return {
current: 3, pocls: "",
type: "",
act_swiper: "",
current: 1,
goodsNum: 0,
goodsList: [],
winHeight: 0, winHeight: 0,
cloudList: [], cloudList: [],
street_code: '', street_code: '',
totalMoney: 0,
town: '', town: '',
list: [1, 1, 1, 1, 1], list: [1, 1, 1, 1, 1],
showPop: false, showPop: false,
keyword: "", keyword: "",
showLoading: false,
tot_price: 1,
showtit: true, showtit: true,
cartList: [],
activeClass: 'activeClass', activeClass: 'activeClass',
headtop: "",
actList: [{
tit: '综合',
act: "",
screen: ""
}, {
tit: '销量',
act: "",
screen: "sales"
}, {
tit: '价格',
act: "",
screen: "price_asc"
}],
list3: [ list3: [
'/static/images/LHYC/BG.png', '/static/images/LHYC/BG.png',
'/static/images/LHYC/WYLVYC.png', '/static/images/LHYC/WYLVYC.png',
'/static/images/LHYC/NFCPYC.png', '/static/images/LHYC/NFCPYC.png',
'/static/images/LHYC/BG.png',
'/static/images/LHYC/NFCPYC.png', '/static/images/LHYC/NFCPYC.png',
'/static/images/LHYC/NFCPYC.png', '/static/images/LHYC/NFCPYC.png',
], ],
} }
}, },
onLoad(e) { onLoad(e) {
this.cartFn()
uni.getSystemInfo({ uni.getSystemInfo({
success: (res) => { success: (res) => {
this.winHeight = res.windowHeight this.winHeight = res.windowHeight
@ -236,21 +313,134 @@
this.town = e.town this.town = e.town
this.getCloundShop() this.getCloundShop()
}, },
onShow() {}, onShow() {
onPageScroll(e) {
console.log(e.scrollTop)
},
onPageScroll(e) {
let that = this
this.showtit = !Boolean(e.scrollTop) this.showtit = !Boolean(e.scrollTop)
uni.createSelectorQuery()
.in(this)
.select('.content')
.boundingClientRect(rect => {
if (rect.top <= this.headtop) {
this.pocls = 'fixed'
this.act_swiper = 'act_swiper'
} else {
this.pocls = ''
this.act_swiper = ''
}
})
.exec();
if (this.headtop) return
uni.createSelectorQuery()
.in(this)
.select('.flag')
.boundingClientRect(rect => {
this.headtop = rect.top
})
.exec();
}, },
onPullDownRefresh() { onPullDownRefresh() {
this.getCloundShop()
uni.stopPullDownRefresh() uni.stopPullDownRefresh()
this.getCloundShop()
this.getList()
}, },
// onReachBottom() {
// console.log("daidi")
// },
methods: { methods: {
cartFn() {
getCartList().then(res => {
this.cartList = res.data.list
this.cartList[0].list.forEach(e => {
this.totalMoney = this.totalMoney + Number(e.productAttr.price) * e.cart_num
})
})
getCartCounts().then(res => {
this.goodsNum = res.data[0].count
})
},
godDetail(item) {
goShopDetail(item, this.uid).then(res => {
if (this.isLogin) {
initiateAssistApi(item.activity_id).then(res => {
let id = res.data.product_assist_set_id;
uni.hideLoading();
uni.navigateTo({
url: '/pages/activity/assist_detail/index?id=' + id
});
}).catch((err) => {
uni.showToast({
title: err,
icon: 'none'
})
});
} else {
this.isAuto = true;
this.isShowAuth = true
}
})
},
serch() {
// console.log(this.keyword)
this.getList()
},
goBack() {
uni.navigateBack()
},
screenGoods(type, i) {
this.actList.forEach(item => {
item.act = ""
})
this.actList[i].act = true
this.type = type
this.getList()
// console.log(this.type)
},
navgo(url) {
uni.navigateTo({
url
})
},
getList() {
this.showLoading = true
cloudWarehouse({
street_code: this.street_code,
category_id: this.cloudList[this.current].category_id,
order: this.type,
keyword: this.keyword
}).then(res => {
this.goodsList = res.data.list
this.showLoading = false
})
},
addcart(price) {
this.tot_price += Number(price)
},
all(index) {
this.showPop = false
this.current = index
this.getList()
},
test(e) { test(e) {
// console.log(e.target.current) // console.log(e.target.current)
this.current = e.target.current this.current = e.target.current
// console.log(e)
this.getList()
}, },
async getCloundShop() { async getCloundShop() {
const { const {
data data
@ -258,6 +448,13 @@
street_code: this.street_code street_code: this.street_code
}) })
this.cloudList = data this.cloudList = data
cloudWarehouse({
street_code: this.street_code,
category_id: this.cloudList[this.current].category_id
}).then(res => {
this.goodsList = res.data.list
})
// console.log(this.cloudList)
data.length < 1 ? Toast("暂无云仓") : ''; data.length < 1 ? Toast("暂无云仓") : '';
} }
} }
@ -270,14 +467,52 @@
.content { .content {
width: 100vw; width: 100vw;
position: absolute; // position: absolute;
top: 965rpx; // top: 965rpx;
// border-top: 5px solid red;
z-index: 99; z-index: 99;
background-color: #F4F4F4; background-color: #F4F4F4;
padding: 0 10rpx; padding: 0 10rpx;
} }
.active_swiper {
transform: scale(1.3);
}
.pictrue {
position: relative;
width: 100%;
height: 345rpx;
}
.act {
color: #FF6D20;
}
.act_content {
width: 100vw;
// position: absolute;
// top: 965rpx;
z-index: 99;
background-color: #F4F4F4;
padding: 0 10rpx;
// transition: opt\ linear;
padding-top: 200rpx;
}
.act_class {
transition: 1s;
}
.act_class:active {
transform: scale(2);
// transform: translate(-500rpx, 500rpx);
}
.content_act { .content_act {
width: 100vw; width: 100vw;
position: absolute; position: absolute;
@ -291,13 +526,12 @@
.fade-enter-active, .fade-enter-active,
.fade-leave-active { .fade-leave-active {
transition: opacity 0.5s; transition: opacity 0.5s;
/* 过渡动画持续时间 */
} }
.fade-enter, .fade-enter,
.fade-leave-to { .fade-leave-to {
opacity: 0; opacity: 0;
/* 初始状态和最终状态的透明度 */
} }
.head_tits { .head_tits {
@ -350,6 +584,9 @@
} }
.act {
color: red;
}
.head { .head {
position: absolute; position: absolute;
@ -369,11 +606,10 @@
position: fixed; position: fixed;
z-index: 100; z-index: 100;
color: white; color: white;
display: flex;
justify-content: space-between;
width: 100%; width: 100%;
padding: 0 20rpx; padding: 0 20rpx;
align-items: center; // background-color: white;
@ -384,12 +620,15 @@
position: absolute; position: absolute;
top: 748rpx; top: 748rpx;
width: 750rpx; width: 750rpx;
background-color: rgba(255, 255, 255, 0.5);
// height: 175.23rpx;
// box-shadow: 0 0 100px 100px rgba(255, 255, 255, 0.5);
box-shadow: 0 0 100rpx 30rpx rgba(255, 255, 255, 0.9);
} }
.goods_list { .goods_list {
box-shadow: 0 -330rpx 20px rgba(255, 255, 255, 0.6);
.goods { .goods {
display: flex; display: flex;
@ -427,6 +666,7 @@
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
width: 60vw;
.good_price_l { .good_price_l {
display: flex; display: flex;
@ -451,14 +691,27 @@
height: 400rpx; height: 400rpx;
} }
.act_swiper {
height: 150rpx;
position: fixed;
z-index: 99;
overflow: hidden;
}
// .act_swiper2 {
// height: 998rpx;
// }
.content_sift { .content_sift {
width: 750rpx; width: 730rpx;
padding: 22rpx 0; padding: 22rpx 0;
display: flex; display: flex;
justify-content: space-around; justify-content: space-around;
position: fixed;
z-index: 99999;
background-color: white; background-color: white;
z-index: 99;
box-sizing: border-box;
} }
.swipers { .swipers {
@ -504,88 +757,117 @@
} }
} }
// .cloud_entrepot { .badge {
// background: url("https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/luzhou/static4/13/ycbg.png") no-repeat; position: absolute;
// background-size: cover; top: 0;
// padding-bottom: 92.98rpx; right: 0;
// } background-color: red;
transform: translate(50%, -50%);
padding: 0 10rpx;
border-radius: 30rpx;
}
// .head-wrapper { .cloud_entrepot {
// height: 485.96rpx; background: url("https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/luzhou/static4/13/ycbg.png") no-repeat;
// width: 100%; background-size: cover;
// background: url("https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/luzhou/static4/13/top.png") no-repeat; padding-bottom: 92.98rpx;
// background-size: cover; }
// margin-bottom: 49.12rpx;
// }
// .town-title { .head-wrapper {
// margin: 0 auto; height: 485.96rpx;
// width: 100%; width: 100%;
// text-align: center; background: url("https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/luzhou/static4/13/top.png") no-repeat;
// font-size: 50.88rpx; background-size: cover;
// color: #fff; margin-bottom: 49.12rpx;
// margin-bottom: 28.07rpx; }
// &::after { .town-title {
// content: ''; margin: 0 auto;
// display: inline-block; width: 100%;
// width: 66.67rpx; text-align: center;
// height: 31.58rpx; font-size: 50.88rpx;
// background: url("https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/luzhou/static4/13/you.png") no-repeat; color: #fff;
// background-size: cover; margin-bottom: 28.07rpx;
// margin-left: 24.56rpx;
// }
// &::before { &::after {
// content: ''; content: '';
// display: inline-block; display: inline-block;
// width: 66.67rpx; width: 66.67rpx;
// height: 31.58rpx; height: 31.58rpx;
// background: url("https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/luzhou/static4/13/zuo.png") no-repeat; background: url("https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/luzhou/static4/13/you.png") no-repeat;
// background-size: cover; background-size: cover;
// margin-right: 24.56rpx; margin-left: 24.56rpx;
// } }
// }
// .body-wrapper { &::before {
// width: 694.74rpx; content: '';
// display: flex; display: inline-block;
// justify-content: space-between; width: 66.67rpx;
// flex-wrap: wrap; height: 31.58rpx;
// margin: 0 auto; background: url("https://lihai001.oss-cn-chengdu.aliyuncs.com/public/kk/luzhou/static4/13/zuo.png") no-repeat;
background-size: cover;
margin-right: 24.56rpx;
}
}
// .item { .body-wrapper {
// width: 336.84rpx; width: 694.74rpx;
// height: 100%; display: flex;
// padding: 24.56rpx 28.07rpx; justify-content: space-between;
// margin-bottom: 21.05rpx; flex-wrap: wrap;
// background-repeat: no-repeat; margin: 0 auto;
// background-size: 100% 100%;
// box-sizing: border-box;
// text { .item {
// display: block; width: 336.84rpx;
// font-size: 24.56rpx; height: 100%;
// color: #999; padding: 24.56rpx 28.07rpx;
// margin-bottom: 14.04rpx; margin-bottom: 21.05rpx;
// } background-repeat: no-repeat;
background-size: 100% 100%;
box-sizing: border-box;
// .item-title { text {
// font-size: 31.58rpx; display: block;
// color: #333; font-size: 24.56rpx;
// } color: #999;
margin-bottom: 14.04rpx;
}
// .chakan-btn { .item-title {
// width: 114.04rpx; font-size: 31.58rpx;
// height: 49.12rpx; color: #333;
// font-size: 28.07rpx; }
// text-align: center;
// line-height: 49.12rpx; .chakan-btn {
// color: #fff; width: 114.04rpx;
// margin-top: auto; height: 49.12rpx;
// background: linear-gradient(90deg, #FE5300 0%, #F84221 100%); font-size: 28.07rpx;
// border-radius: 50px; text-align: center;
// } line-height: 49.12rpx;
// } color: #fff;
// } margin-top: auto;
background: linear-gradient(90deg, #FE5300 0%, #F84221 100%);
border-radius: 50px;
}
}
}
.empty {
// display: flex;
// justify-content: space-between;
// flex-direction: column;
// align-items: center;
// padding: 20vh 0;
position: relative;
height: 85vh;
.info {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
// padding-top: 100px;
}
</style> </style>

View File

@ -335,6 +335,8 @@
}, },
// //
godDetail(item) { godDetail(item) {
console.log(452)
return
goShopDetail(item, this.uid).then(res => { goShopDetail(item, this.uid).then(res => {
if (this.isLogin) { if (this.isLogin) {
initiateAssistApi(item.activity_id).then(res => { initiateAssistApi(item.activity_id).then(res => {

View File

@ -8,8 +8,9 @@
</view> </view>
<view class='nav acea-row row-between-wrapper'> <view class='nav acea-row row-between-wrapper'>
<view>购物数量 <text class='num t-color'>{{cartTotalCount}}</text></view> <view>购物数量 <text class='num t-color'>{{cartTotalCount}}</text></view>
<view v-if="cartList.valid.length > 0 || cartList.invalid.length > 0" class='administrate acea-row row-center-wrapper' <view v-if="cartList.valid.length > 0 || cartList.invalid.length > 0"
@click='manage'>{{ footerswitch ? '管理' : '取消'}}</view> class='administrate acea-row row-center-wrapper' @click='manage'>{{ footerswitch ? '管理' : '取消'}}
</view>
</view> </view>
<view v-if="cartList.valid.length > 0 || cartList.invalid.length > 0"> <view v-if="cartList.valid.length > 0 || cartList.invalid.length > 0">
<view class='list'> <view class='list'>
@ -20,31 +21,38 @@
<text v-if="!item.allCheck" class="iconfont icon-weixuanzhong"></text> <text v-if="!item.allCheck" class="iconfont icon-weixuanzhong"></text>
<text v-else class="iconfont icon-xuanzhong1"></text> <text v-else class="iconfont icon-xuanzhong1"></text>
</view> </view>
<navigator :url="hide_mer_status == 0 ? '/pages/store/home/index?id='+item.mer_id : '#'" class="info"> <navigator :url="hide_mer_status == 0 ? '/pages/store/home/index?id='+item.mer_id : '#'"
class="info">
<text class="iconfont icon-shangjiadingdan"></text> <text class="iconfont icon-shangjiadingdan"></text>
<view class="name">{{item.mer_name}}</view> <view class="name">{{item.mer_name}}</view>
<text class="iconfont icon-xiangyou"></text> <text class="iconfont icon-xiangyou"></text>
</navigator> </navigator>
<view class="coupon-btn" v-if="item.hasCoupon>0" @click="giveCoupon(item)">优惠券</view> <view class="coupon-btn" v-if="item.hasCoupon>0" @click="giveCoupon(item)">优惠券</view>
</view> </view>
<navigator v-for="goods in item.list" :key="goods.cart_id" :url='"/pages/goods_details/index?id="+goods.product.product_id' <navigator v-for="goods in item.list" :key="goods.cart_id"
hover-class='none' class='picTxt acea-row'> :url='"/pages/goods_details/index?id="+goods.product.product_id' hover-class='none'
class='picTxt acea-row'>
<view class="checkbox" @click.stop="goodsCheck(goods,index)"> <view class="checkbox" @click.stop="goodsCheck(goods,index)">
<text v-if="!goods.check" class="iconfont icon-weixuanzhong"></text> <text v-if="!goods.check" class="iconfont icon-weixuanzhong"></text>
<text v-else class="iconfont icon-xuanzhong1"></text> <text v-else class="iconfont icon-xuanzhong1"></text>
</view> </view>
<view class='pictrue'> <view class='pictrue'>
<image :src='(goods.productAttr && goods.productAttr.image) || goods.product.image'></image> <image :src='(goods.productAttr && goods.productAttr.image) || goods.product.image'>
</image>
<!-- <image v-else :src='item.productInfo.image'></image> --> <!-- <image v-else :src='item.productInfo.image'></image> -->
</view> </view>
<view class='text'> <view class='text'>
<view class='line1'>{{goods.product.store_name}}</view> <view class='line1'>{{goods.product.store_name}}</view>
<view class='infor line1' v-if="goods.productAttr.sku" @click.stop='changeCart(goods,goods.cart_id)'> <view class='infor line1' v-if="goods.productAttr.sku"
@click.stop='changeCart(goods,goods.cart_id)'>
{{goods.productAttr.sku}} {{goods.productAttr.sku}}
<text class="iconfont icon-xiala1"></text> <text class="iconfont icon-xiala1"></text>
</view> </view>
<view v-if="goods.product.once_max_count>0 && goods.product.once_min_count>0" class="buy_limit"> <view v-if="goods.product.once_max_count>0 && goods.product.once_min_count>0"
<text v-if="goods.product.once_min_count>0">{{goods.product.once_min_count}}件起购,</text><text v-if="goods.product.once_max_count>0">最多{{goods.product.once_max_count}}</text> class="buy_limit">
<text
v-if="goods.product.once_min_count>0">{{goods.product.once_min_count}}件起购</text><text
v-if="goods.product.once_max_count>0">最多{{goods.product.once_max_count}}</text>
</view> </view>
<view class='money acea-row row-middle'> <view class='money acea-row row-middle'>
<text>{{goods.productAttr.price}}</text> <text>{{goods.productAttr.price}}</text>
@ -54,9 +62,11 @@
</view> </view>
</view> </view>
<view class='carnum acea-row row-center-wrapper'> <view class='carnum acea-row row-center-wrapper'>
<view class="reduce" :class="goods.numSub ? 'on' : ''" @click.stop='subCart(goods)'>-</view> <view class="reduce" :class="goods.numSub ? 'on' : ''" @click.stop='subCart(goods)'>
-</view>
<view class='num'>{{goods.cart_num}}</view> <view class='num'>{{goods.cart_num}}</view>
<view class="plus" :class="goods.numAdd ? 'on' : ''" @click.stop='addCart(goods)'>+</view> <view class="plus" :class="goods.numAdd ? 'on' : ''" @click.stop='addCart(goods)'>+
</view>
</view> </view>
</navigator> </navigator>
</view> </view>
@ -64,15 +74,18 @@
</view> </view>
<view class='invalidGoods' v-if="cartList.invalid.length > 0"> <view class='invalidGoods' v-if="cartList.invalid.length > 0">
<view class='goodsNav acea-row row-between-wrapper'> <view class='goodsNav acea-row row-between-wrapper'>
<view @click='goodsOpen'><text class='iconfont' :class='goodsHidden==true?"icon-xiangxia":"icon-xiangshang"'></text>失效商品</view> <view @click='goodsOpen'><text class='iconfont'
:class='goodsHidden==true?"icon-xiangxia":"icon-xiangshang"'></text>失效商品</view>
<view class='del' @click='unsetCart'><text class='iconfont icon-shanchu1'></text>清空</view> <view class='del' @click='unsetCart'><text class='iconfont icon-shanchu1'></text>清空</view>
</view> </view>
<view class='goodsList' :hidden='goodsHidden'> <view class='goodsList' :hidden='goodsHidden'>
<block v-for="(item,index) in cartList.invalid" :key='index'> <block v-for="(item,index) in cartList.invalid" :key='index'>
<navigator :url="'/pages/goods_details/index?id='+item.product_id" class='item acea-row row-between-wrapper' hover-class='none'> <navigator :url="'/pages/goods_details/index?id='+item.product_id"
class='item acea-row row-between-wrapper' hover-class='none'>
<view class='invalid'>失效</view> <view class='invalid'>失效</view>
<view class='pictrue'> <view class='pictrue'>
<image :src='(item.productAttr && item.productAttr.image) || item.product.image'></image> <image :src='(item.productAttr && item.productAttr.image) || item.product.image'>
</image>
</view> </view>
<view class='text acea-row row-column-between'> <view class='text acea-row row-column-between'>
@ -88,17 +101,20 @@
</view> </view>
</view> </view>
</view> </view>
<view class='noCart' v-if="recommend" :style="{marginTop:cartList.invalid.length ==0 && cartList.invalid.length ==0?'170rpx':'' }"> <view class='noCart' v-if="recommend"
:style="{marginTop:cartList.invalid.length ==0 && cartList.invalid.length ==0?'170rpx':'' }">
<view class='pictrue'> <view class='pictrue'>
<image src='../../static/images/noCart.png'></image> <image src='../../static/images/noCart.png'></image>
<view>暂无商品去添加点什么吧</view> <view>暂无商品去添加点什么吧</view>
</view> </view>
<recommend v-if="recommend_switch == 1" :hostProduct='hostProduct' :isLogin="isLogin"></recommend> <recommend v-if="recommend_switch == 1" :hostProduct='hostProduct' :isLogin="isLogin"></recommend>
<view class='loadingicon acea-row row-center-wrapper' v-if="hostProduct.length>5 && recommend_switch == 1"> <view class='loadingicon acea-row row-center-wrapper'
v-if="hostProduct.length>5 && recommend_switch == 1">
<text class='loading iconfont icon-jiazai' :hidden='loading==false'></text>{{loadTitle}} <text class='loading iconfont icon-jiazai' :hidden='loading==false'></text>{{loadTitle}}
</view> </view>
</view> </view>
<view class='footer acea-row row-between-wrapper' :class="isFooter?'':'on'" v-if="cartList.valid.length > 0"> <view class='footer acea-row row-between-wrapper' :class="isFooter?'':'on'"
v-if="cartList.valid.length > 0">
<view> <view>
<view class="allcheckbox" @click.stop="checkboxAllChange"> <view class="allcheckbox" @click.stop="checkboxAllChange">
<text v-if="!isAllSelect" class="iconfont icon-weixuanzhong"></text> <text v-if="!isAllSelect" class="iconfont icon-weixuanzhong"></text>
@ -124,19 +140,16 @@
</view> </view>
<!-- 优惠券弹窗 --> <!-- 优惠券弹窗 -->
<block v-if="coupon.coupon"> <block v-if="coupon.coupon">
<couponListWindow <couponListWindow :coupon='coupon' @ChangCouponsClone="ChangCouponsClone"
:coupon='coupon' @ChangCouponsUseState="ChangCouponsUseState"></couponListWindow>
@ChangCouponsClone="ChangCouponsClone"
@ChangCouponsUseState="ChangCouponsUseState"
></couponListWindow>
</block> </block>
<!-- 组件 --> <!-- 组件 -->
<addcartWindow :attr="attr" :isShow='1' :iSplus='1' :destri='1' @myevent="onMyEvent" @ChangeAttr="ChangeAttr" @goCat="goCat" @attrVal="attrVal" id='product-window'></addcartWindow> <addcartWindow :attr="attr" :isShow='1' :iSplus='1' :destri='1' @myevent="onMyEvent" @ChangeAttr="ChangeAttr"
@goCat="goCat" @attrVal="attrVal" id='product-window'></addcartWindow>
<authorize :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse" @onLoadFun="onLoadFun"></authorize> <authorize :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse" @onLoadFun="onLoadFun"></authorize>
<view class="foot" v-if="newData.status && newData.status.status"> <view class="foot" v-if="newData.status && newData.status.status">
<view class="page-footer" id="target" :style="{'background-color':newData.bgColor.color[0].item}"> <view class="page-footer" id="target" :style="{'background-color':newData.bgColor.color[0].item}">
<view class="foot-item" v-for="(item,index) in newData.menuList" :key="index" <view class="foot-item" v-for="(item,index) in newData.menuList" :key="index" @click="goRouter(item)">
@click="goRouter(item)">
<block v-if="item.link == activeRouter"> <block v-if="item.link == activeRouter">
<image :src="item.imgList[0]"></image> <image :src="item.imgList[0]"></image>
<view class="txt" :style="{color:newData.activeTxtColor.color[0].item}">{{item.name}} <view class="txt" :style="{color:newData.activeTxtColor.color[0].item}">{{item.name}}
@ -183,7 +196,9 @@
} from "vuex"; } from "vuex";
import recommend from '@/components/recommend'; import recommend from '@/components/recommend';
import authorize from '@/components/Authorize'; import authorize from '@/components/Authorize';
import { configMap } from '@/utils'; import {
configMap
} from '@/utils';
const app = getApp(); const app = getApp();
export default { export default {
props: { props: {
@ -203,7 +218,7 @@
loading: false, // loading: false, //
loadend: false, // loadend: false, //
loadTitle: '加载更多', // loadTitle: '加载更多', //
isFooter:false, isFooter: false,
cartCount: 0, cartCount: 0,
goodsHidden: true, goodsHidden: true,
footerswitch: true, footerswitch: true,
@ -226,7 +241,7 @@
list: [], list: [],
}, },
// //
cartTotalCount:0, cartTotalCount: 0,
recommend: false, recommend: false,
productValue: [], // productValue: [], //
attr: { attr: {
@ -248,8 +263,12 @@
activeRouter: '', activeRouter: '',
}; };
}, },
computed: configMap({hide_mer_status: 1,recommend_switch:0,navigation: {}}, mapGetters(['isLogin','viewColor'])), computed: configMap({
onReady(){}, hide_mer_status: 1,
recommend_switch: 0,
navigation: {}
}, mapGetters(['isLogin', 'viewColor'])),
onReady() {},
mounted: function() {}, mounted: function() {},
onLoad: function(options) { onLoad: function(options) {
@ -270,12 +289,12 @@
this.selectValue = []; // this.selectValue = []; //
this.isShowAuth = false; this.isShowAuth = false;
uni.setStorage({ uni.setStorage({
key:'invoice_Data', key: 'invoice_Data',
data:{}, data: {},
success: function(){} success: function() {}
}) })
}else{ } else {
setTimeout(() =>{ setTimeout(() => {
this.isAuto = true; this.isAuto = true;
this.isShowAuth = true this.isShowAuth = true
}, 300); }, 300);
@ -284,10 +303,10 @@
methods: { methods: {
// //
authColse: function(e) { authColse: function(e) {
console.log(e,'authColse') console.log(e, 'authColse')
this.isShowAuth = e; this.isShowAuth = e;
}, },
onLoadFun(){ onLoadFun() {
this.isShowAuth = false; this.isShowAuth = false;
}, },
goRouter(item) { goRouter(item) {
@ -317,21 +336,21 @@
subDel: function(event) { subDel: function(event) {
let that = this let that = this
let type_id = [] let type_id = []
this.cartList.valid.forEach(el=>{ this.cartList.valid.forEach(el => {
el.list.forEach(goods=>{ el.list.forEach(goods => {
if(goods.check){ if (goods.check) {
type_id.push(goods.cart_id) type_id.push(goods.cart_id)
} }
}) })
}) })
if(type_id.length == 0){ if (type_id.length == 0) {
return that.$util.Tips({ return that.$util.Tips({
title: '请选择产品' title: '请选择产品'
}); });
}else{ } else {
cartDel({ cartDel({
cart_id:type_id, cart_id: type_id,
}).then(res=>{ }).then(res => {
this.getCartList(); this.getCartList();
this.getCartNum(); this.getCartNum();
return that.$util.Tips({ return that.$util.Tips({
@ -349,22 +368,22 @@
subCollect: function(event) { subCollect: function(event) {
let that = this let that = this
let type_id = [] let type_id = []
this.cartList.valid.forEach(el=>{ this.cartList.valid.forEach(el => {
el.list.forEach(goods=>{ el.list.forEach(goods => {
if(goods.check){ if (goods.check) {
type_id.push(goods.spu.spu_id) type_id.push(goods.spu.spu_id)
} }
}) })
}) })
if(type_id.length == 0){ if (type_id.length == 0) {
return that.$util.Tips({ return that.$util.Tips({
title: '请选择产品' title: '请选择产品'
}); });
}else{ } else {
collectAll({ collectAll({
type_id:type_id, type_id: type_id,
type:1 type: 1
}).then(res=>{ }).then(res => {
return that.$util.Tips({ return that.$util.Tips({
title: res.message, title: res.message,
icon: 'success' icon: 'success'
@ -385,21 +404,21 @@
*/ */
changeCart: function(goods, id) { changeCart: function(goods, id) {
let that = this; let that = this;
if(that.goods == goods){ if (that.goods == goods) {
that.isOpen = that.attr.cartAttr = true; that.isOpen = that.attr.cartAttr = true;
return return
}else{ } else {
that.goods = JSON.parse((JSON.stringify(goods))); that.goods = JSON.parse((JSON.stringify(goods)));
that.currSku = goods.productAttr.sku.split(","); that.currSku = goods.productAttr.sku.split(",");
that.$set(that.attr, 'productAttr', goods.attr); that.$set(that.attr, 'productAttr', goods.attr);
const sku = {} const sku = {}
that.attrValue = goods.productAttr.sku that.attrValue = goods.productAttr.sku
that.attrImage = goods.product.image that.attrImage = goods.product.image
goods.attrValue.forEach((itemn)=>{ goods.attrValue.forEach((itemn) => {
sku[itemn.sku] = itemn; sku[itemn.sku] = itemn;
}) })
that.$set(that, 'productValue',sku); that.$set(that, 'productValue', sku);
let productSelect = sku[that.attrValue]; let productSelect = sku[that.attrValue];
that.isOpen = that.attr.cartAttr = true; that.isOpen = that.attr.cartAttr = true;
// //
that.DefaultSelect(goods) that.DefaultSelect(goods)
@ -414,9 +433,9 @@
let value = []; let value = [];
let arr = [] let arr = []
console.log(arr, 'arr') console.log(arr, 'arr')
if(this.currSku){ if (this.currSku) {
value = this.currSku value = this.currSku
}else{ } else {
for (var key in this.productValue) { for (var key in this.productValue) {
if (this.productValue[key].stock > 0) { if (this.productValue[key].stock > 0) {
value = this.attr.productAttr.length ? key.split(",") : []; value = this.attr.productAttr.length ? key.split(",") : [];
@ -434,7 +453,8 @@
"store_name", "store_name",
goods.product.store_name goods.product.store_name
); );
this.$set(this.attr.productSelect, "image", productSelect.image ? productSelect.image : goods.product.image); this.$set(this.attr.productSelect, "image", productSelect.image ? productSelect.image : goods
.product.image);
this.$set(this.attr.productSelect, "price", productSelect.price); this.$set(this.attr.productSelect, "price", productSelect.price);
this.$set(this.attr.productSelect, "stock", productSelect.stock); this.$set(this.attr.productSelect, "stock", productSelect.stock);
this.$set(this.attr.productSelect, "unique", productSelect.unique); this.$set(this.attr.productSelect, "unique", productSelect.unique);
@ -495,7 +515,7 @@
} }
this.goCart(productSelect); this.goCart(productSelect);
}, },
goCart(productSelect){ goCart(productSelect) {
let that = this; let that = this;
//,, //,,
if ( if (
@ -513,28 +533,30 @@
} }
}, },
attrVal(val) { attrVal(val) {
this.$set(this.attr.productAttr[val.indexw], 'index', this.attr.productAttr[val.indexw].attr_values[val.indexn]); this.$set(this.attr.productAttr[val.indexw], 'index', this.attr.productAttr[val.indexw].attr_values[val
.indexn]);
}, },
/** /**
* 属性变动赋值 * 属性变动赋值
* *
*/ */
ChangeAttr: function(res) { ChangeAttr: function(res) {
let productSelect = this.productValue[res]; let productSelect = this.productValue[res];
this.currSku = res; this.currSku = res;
this.newVal = this.productValue[res]; this.newVal = this.productValue[res];
if(productSelect)this.$set(this, "uniqueValue", productSelect.unique); if (productSelect) this.$set(this, "uniqueValue", productSelect.unique);
if (productSelect && productSelect.stock > 0) { if (productSelect && productSelect.stock > 0) {
this.$set(this.attr.productSelect, "image", productSelect.image ? productSelect.image : this.attrImage); this.$set(this.attr.productSelect, "image", productSelect.image ? productSelect.image : this
.attrImage);
this.$set(this.attr.productSelect, "price", productSelect.price); this.$set(this.attr.productSelect, "price", productSelect.price);
this.$set(this.attr.productSelect, "stock", productSelect.stock); this.$set(this.attr.productSelect, "stock", productSelect.stock);
this.$set(this.attr.productSelect, "unique", productSelect.unique); this.$set(this.attr.productSelect, "unique", productSelect.unique);
this.$set(this, "uniqueValue", productSelect.unique); this.$set(this, "uniqueValue", productSelect.unique);
this.$set(this.attr.productSelect, "cart_num", 1); this.$set(this.attr.productSelect, "cart_num", 1);
this.$set(this, "attrValue", res); this.$set(this, "attrValue", res);
} } else {
else { this.$set(this.attr.productSelect, "image", productSelect.image ? productSelect.image : this
this.$set(this.attr.productSelect, "image", productSelect.image ? productSelect.image : this.attrImage); .attrImage);
this.$set(this.attr.productSelect, "price", productSelect.price); this.$set(this.attr.productSelect, "price", productSelect.price);
this.$set(this.attr.productSelect, "stock", 0); this.$set(this.attr.productSelect, "stock", 0);
this.$set(this.attr.productSelect, "unique", ""); this.$set(this.attr.productSelect, "unique", "");
@ -545,9 +567,9 @@
// //
subOrder: function(event) { subOrder: function(event) {
let selectValue = [] let selectValue = []
this.cartList.valid.forEach(el=>{ this.cartList.valid.forEach(el => {
el.list.forEach(goods=>{ el.list.forEach(goods => {
if(goods.check){ if (goods.check) {
selectValue.push(goods.cart_id) selectValue.push(goods.cart_id)
} }
}) })
@ -593,7 +615,8 @@
cart_num: that.goods.cart_num, cart_num: that.goods.cart_num,
product_attr_unique: that.newVal.unique product_attr_unique: that.newVal.unique
}).then(res => { }).then(res => {
if (that.goods.hasOwnProperty('productAttr') && that.goods.cart_num > that.goods.productAttr.stock) { if (that.goods.hasOwnProperty('productAttr') && that.goods.cart_num > that.goods
.productAttr.stock) {
that.goods.cart_num = that.goods.productAttr.stock; that.goods.cart_num = that.goods.productAttr.stock;
that.goods.numAdd = true; that.goods.numAdd = true;
that.goods.numSub = false; that.goods.numSub = false;
@ -631,7 +654,7 @@
}).then(res => { }).then(res => {
goods.numSub = false; goods.numSub = false;
goods.numAdd = false; goods.numAdd = false;
if(goods.cart_num <= 1){ if (goods.cart_num <= 1) {
goods.numSub = true; goods.numSub = true;
} }
goods.cart_num = Number(goods.cart_num) - 1 goods.cart_num = Number(goods.cart_num) - 1
@ -673,12 +696,12 @@
}) })
this.cartList.valid = res.data.list this.cartList.valid = res.data.list
this.cartList.invalid = res.data.fail this.cartList.invalid = res.data.fail
if(res.data.list.length == 0 && res.data.list.length == 0){ if (res.data.list.length == 0 && res.data.list.length == 0) {
this.recommend = true; this.recommend = true;
if(!this.hostProduct.length){ if (!this.hostProduct.length) {
this.getHostProduct(); this.getHostProduct();
} }
}else{ } else {
this.recommend = false this.recommend = false
} }
const sku = {} const sku = {}
@ -732,7 +755,8 @@
// // // //
el.list.forEach(e => { el.list.forEach(e => {
if (e.check) { if (e.check) {
totalMoney = this.$util.$h.Add(totalMoney, this.$util.$h.Mul(e.productAttr.price, e.cart_num)) totalMoney = this.$util.$h.Add(totalMoney, this.$util.$h.Mul(e.productAttr
.price, e.cart_num))
totalNum += e.cart_num totalNum += e.cart_num
} }
}) })
@ -778,12 +802,13 @@
}, },
// //
unsetCart: function() { unsetCart: function() {
let that = this,ids = []; let that = this,
ids = [];
for (let i = 0, len = that.cartList.invalid.length; i < len; i++) { for (let i = 0, len = that.cartList.invalid.length; i < len; i++) {
ids.push(that.cartList.invalid[i].cart_id); ids.push(that.cartList.invalid[i].cart_id);
} }
cartDel({ cartDel({
cart_id:ids cart_id: ids
}).then(res => { }).then(res => {
that.$util.Tips({ that.$util.Tips({
title: '清除成功' title: '清除成功'
@ -793,13 +818,13 @@
}).catch(res => {}); }).catch(res => {});
}, },
// //
giveCoupon(item){ giveCoupon(item) {
let that = this; let that = this;
let goodsArr = [] let goodsArr = []
let couponList = []; let couponList = [];
let activeList = []; let activeList = [];
let ids = [] let ids = []
item.list.map(el=>{ item.list.map(el => {
ids.push(el.product_id) ids.push(el.product_id)
}) })
uni.showLoading({ uni.showLoading({
@ -807,15 +832,17 @@
mask: true mask: true
}); });
getCoupons({ getCoupons({
ids:ids.join(',') ids: ids.join(',')
}).then(res => { }).then(res => {
goodsArr = res.data goodsArr = res.data
getShopCoupons(item.mer_id).then(({data})=>{ getShopCoupons(item.mer_id).then(({
data
}) => {
uni.hideLoading(); uni.hideLoading();
couponList = goodsArr.concat(data) couponList = goodsArr.concat(data)
this.$set(this.coupon, 'list', couponList); this.$set(this.coupon, 'list', couponList);
this.$set(this.coupon, 'coupon', true); this.$set(this.coupon, 'coupon', true);
}).catch(error=>{}) }).catch(error => {})
}); });
}, },
ChangCouponsClone: function() { ChangCouponsClone: function() {
@ -852,19 +879,23 @@
z-index: 5; z-index: 5;
top: 0; top: 0;
} }
.icon-xiala1{
.icon-xiala1 {
display: inline-block; display: inline-block;
transform: rotate(180deg); transform: rotate(180deg);
font-size: 14rpx; font-size: 14rpx;
padding: 0 5rpx; padding: 0 5rpx;
} }
.shoppingCart .labelNav .item .iconfont { .shoppingCart .labelNav .item .iconfont {
font-size: 25rpx; font-size: 25rpx;
margin-right: 10rpx; margin-right: 10rpx;
} }
.t-color { .t-color {
color: var(--view-theme); color: var(--view-theme);
} }
.shoppingCart { .shoppingCart {
/* #ifndef MP */ /* #ifndef MP */
padding-bottom: 180rpx; padding-bottom: 180rpx;
@ -872,13 +903,15 @@
/* #ifdef MP */ /* #ifdef MP */
padding-bottom: calc(0rpx+ constant(safe-area-inset-bottom)); padding-bottom: calc(0rpx+ constant(safe-area-inset-bottom));
padding-bottom: calc(0rpx + env(safe-area-inset-bottom)); padding-bottom: calc(0rpx + env(safe-area-inset-bottom));
/* #endif */ /* #endif */
&.showFoot{ &.showFoot {
padding-bottom: calc(180rpx+ constant(safe-area-inset-bottom)); padding-bottom: calc(180rpx+ constant(safe-area-inset-bottom));
padding-bottom: calc(180rpx + env(safe-area-inset-bottom)); padding-bottom: calc(180rpx + env(safe-area-inset-bottom));
} }
} }
.shoppingCart .nav { .shoppingCart .nav {
width: 100%; width: 100%;
height: 80rpx; height: 80rpx;
@ -892,6 +925,7 @@
z-index: 5; z-index: 5;
top: 76rpx; top: 76rpx;
} }
.shoppingCart .nav .administrate { .shoppingCart .nav .administrate {
font-size: 26rpx; font-size: 26rpx;
color: #282828; color: #282828;
@ -900,30 +934,37 @@
border-radius: 6rpx; border-radius: 6rpx;
border: 1px solid #868686; border: 1px solid #868686;
} }
.shoppingCart .noCart { .shoppingCart .noCart {
margin-top: 20rpx; margin-top: 20rpx;
margin-bottom: 20rpx; margin-bottom: 20rpx;
background-color: #fff; background-color: #fff;
padding-top: 0.1rpx; padding-top: 0.1rpx;
} }
.shoppingCart .noCart .pictrue { .shoppingCart .noCart .pictrue {
text-align: center; text-align: center;
margin: 78rpx auto 56rpx auto; margin: 78rpx auto 56rpx auto;
padding-bottom: 60rpx; padding-bottom: 60rpx;
} }
.shoppingCart .noCart .pictrue image { .shoppingCart .noCart .pictrue image {
width: 414rpx; width: 414rpx;
height: 305rpx; height: 305rpx;
} }
.shoppingCart .noCart .pictrue view{
.shoppingCart .noCart .pictrue view {
color: #999; color: #999;
} }
.shoppingCart .list { .shoppingCart .list {
margin: 171rpx 0 20rpx; margin: 171rpx 0 20rpx;
} }
.shoppingCart .list .item { .shoppingCart .list .item {
background-color: #fff; background-color: #fff;
margin-bottom: 15rpx; margin-bottom: 15rpx;
.store-title { .store-title {
display: flex; display: flex;
align-items: center; align-items: center;
@ -931,35 +972,43 @@
padding: 0 30rpx; padding: 0 30rpx;
height: 85rpx; height: 85rpx;
border-bottom: 1px solid #f0f0f0; border-bottom: 1px solid #f0f0f0;
.checkbox { .checkbox {
width: 60rpx; width: 60rpx;
.iconfont { .iconfont {
font-size: 40rpx; font-size: 40rpx;
color: #CCCCCC; color: #CCCCCC;
} }
.icon-xuanzhong1 { .icon-xuanzhong1 {
color: var(--view-theme); color: var(--view-theme);
} }
} }
.info { .info {
flex: 1; flex: 1;
display: flex; display: flex;
align-items: center; align-items: center;
.iconfont { .iconfont {
font-size: 36rpx; font-size: 36rpx;
} }
.name { .name {
margin: 0 0 0 10rpx; margin: 0 0 0 10rpx;
font-size: 28rpx; font-size: 28rpx;
color: #282828; color: #282828;
font-weight: bold; font-weight: bold;
} }
.icon-xiangyou { .icon-xiangyou {
margin-top: 6rpx; margin-top: 6rpx;
font-size: 22rpx; font-size: 22rpx;
color: #999; color: #999;
} }
} }
.coupon-btn { .coupon-btn {
color: var(--view-theme); color: var(--view-theme);
font-size: 22rpx; font-size: 22rpx;
@ -971,53 +1020,64 @@
} }
} }
} }
.vipImg { .vipImg {
width: 65rpx; width: 65rpx;
height: 28rpx; height: 28rpx;
margin-left: 10rpx; margin-left: 10rpx;
image { image {
width: 100%; width: 100%;
height: 100%; height: 100%;
display: block; display: block;
} }
} }
.shoppingCart .list .item .picTxt { .shoppingCart .list .item .picTxt {
width: 100%; width: 100%;
padding: 25rpx 30rpx; padding: 25rpx 30rpx;
position: relative; position: relative;
align-items: center; align-items: center;
border-bottom: 1px solid #f0f0f0; border-bottom: 1px solid #f0f0f0;
.checkbox { .checkbox {
width: 60rpx; width: 60rpx;
.iconfont { .iconfont {
font-size: 40rpx; font-size: 40rpx;
color: #CCCCCC; color: #CCCCCC;
} }
.icon-xuanzhong1 { .icon-xuanzhong1 {
color: var(--view-theme); color: var(--view-theme);
} }
} }
} }
.shoppingCart .list .item .picTxt .pictrue { .shoppingCart .list .item .picTxt .pictrue {
width: 160rpx; width: 160rpx;
height: 160rpx; height: 160rpx;
} }
.shoppingCart .list .item .picTxt .pictrue image { .shoppingCart .list .item .picTxt .pictrue image {
width: 100%; width: 100%;
height: 100%; height: 100%;
border-radius: 6rpx; border-radius: 6rpx;
} }
.shoppingCart .list .item .picTxt .text { .shoppingCart .list .item .picTxt .text {
width: 444rpx; width: 444rpx;
margin-left: 20rpx; margin-left: 20rpx;
font-size: 28rpx; font-size: 28rpx;
color: #282828; color: #282828;
} }
.shoppingCart .list .item .picTxt .buy_limit { .shoppingCart .list .item .picTxt .buy_limit {
margin-top: 10rpx; margin-top: 10rpx;
color: #E93323; color: #E93323;
font-size: 22rpx; font-size: 22rpx;
} }
.shoppingCart .list .item .picTxt .text .infor { .shoppingCart .list .item .picTxt .text .infor {
display: inline-block; display: inline-block;
padding: 6rpx; padding: 6rpx;
@ -1028,17 +1088,20 @@
background-color: #F5F5F5; background-color: #F5F5F5;
max-width: 460rpx; max-width: 460rpx;
} }
.shoppingCart .list .item .picTxt .text .money { .shoppingCart .list .item .picTxt .text .money {
font-size: 32rpx; font-size: 32rpx;
color: #282828; color: #282828;
margin-top: 28rpx; margin-top: 28rpx;
} }
.shoppingCart .list .item .picTxt .carnum { .shoppingCart .list .item .picTxt .carnum {
height: 47rpx; height: 47rpx;
position: absolute; position: absolute;
bottom: 30rpx; bottom: 30rpx;
right: 30rpx; right: 30rpx;
} }
.shoppingCart .list .item .picTxt .carnum view { .shoppingCart .list .item .picTxt .carnum view {
border: 1px solid #a4a4a4; border: 1px solid #a4a4a4;
min-width: 66rpx; min-width: 66rpx;
@ -1048,24 +1111,30 @@
font-size: 28rpx; font-size: 28rpx;
color: #a4a4a4; color: #a4a4a4;
} }
.shoppingCart .list .item .picTxt .carnum .reduce { .shoppingCart .list .item .picTxt .carnum .reduce {
border-right: 0; border-right: 0;
border-radius: 3rpx 0 0 3rpx; border-radius: 3rpx 0 0 3rpx;
} }
.shoppingCart .list .item .picTxt .carnum .reduce.on { .shoppingCart .list .item .picTxt .carnum .reduce.on {
border-color: #e3e3e3; border-color: #e3e3e3;
color: #dedede; color: #dedede;
} }
.shoppingCart .list .item .picTxt .carnum .plus { .shoppingCart .list .item .picTxt .carnum .plus {
border-left: 0; border-left: 0;
border-radius: 0 3rpx 3rpx 0; border-radius: 0 3rpx 3rpx 0;
} }
.shoppingCart .list .item .picTxt .carnum .num { .shoppingCart .list .item .picTxt .carnum .num {
color: #282828; color: #282828;
} }
.shoppingCart .invalidGoods { .shoppingCart .invalidGoods {
background-color: #fff; background-color: #fff;
} }
.shoppingCart .invalidGoods .goodsNav { .shoppingCart .invalidGoods .goodsNav {
width: 100%; width: 100%;
height: 66rpx; height: 66rpx;
@ -1074,25 +1143,30 @@
font-size: 28rpx; font-size: 28rpx;
color: #282828; color: #282828;
} }
.shoppingCart .invalidGoods .goodsNav .iconfont { .shoppingCart .invalidGoods .goodsNav .iconfont {
color: #424242; color: #424242;
font-size: 28rpx; font-size: 28rpx;
margin-right: 17rpx; margin-right: 17rpx;
} }
.shoppingCart .invalidGoods .goodsNav .del { .shoppingCart .invalidGoods .goodsNav .del {
font-size: 26rpx; font-size: 26rpx;
color: #999; color: #999;
} }
.shoppingCart .invalidGoods .goodsNav .del .icon-shanchu1 { .shoppingCart .invalidGoods .goodsNav .del .icon-shanchu1 {
color: #999; color: #999;
font-size: 33rpx; font-size: 33rpx;
vertical-align: -2rpx; vertical-align: -2rpx;
margin-right: 8rpx; margin-right: 8rpx;
} }
.shoppingCart .invalidGoods .goodsList .item { .shoppingCart .invalidGoods .goodsList .item {
padding: 20rpx 30rpx; padding: 20rpx 30rpx;
border-top: 1px solid #f5f5f5; border-top: 1px solid #f5f5f5;
} }
.shoppingCart .invalidGoods .goodsList .item .invalid { .shoppingCart .invalidGoods .goodsList .item .invalid {
font-size: 22rpx; font-size: 22rpx;
color: #fff; color: #fff;
@ -1103,31 +1177,38 @@
text-align: center; text-align: center;
line-height: 36rpx; line-height: 36rpx;
} }
.shoppingCart .invalidGoods .goodsList .item .pictrue { .shoppingCart .invalidGoods .goodsList .item .pictrue {
width: 140rpx; width: 140rpx;
height: 140rpx; height: 140rpx;
} }
.shoppingCart .invalidGoods .goodsList .item .pictrue image { .shoppingCart .invalidGoods .goodsList .item .pictrue image {
width: 100%; width: 100%;
height: 100%; height: 100%;
border-radius: 6rpx; border-radius: 6rpx;
} }
.shoppingCart .invalidGoods .goodsList .item .text { .shoppingCart .invalidGoods .goodsList .item .text {
width: 433rpx; width: 433rpx;
font-size: 28rpx; font-size: 28rpx;
color: #999; color: #999;
height: 140rpx; height: 140rpx;
} }
.shoppingCart .invalidGoods .goodsList .item .text .name { .shoppingCart .invalidGoods .goodsList .item .text .name {
width: 100%; width: 100%;
} }
.shoppingCart .invalidGoods .goodsList .item .text .infor { .shoppingCart .invalidGoods .goodsList .item .text .infor {
font-size: 24rpx; font-size: 24rpx;
} }
.shoppingCart .invalidGoods .goodsList .item .text .end { .shoppingCart .invalidGoods .goodsList .item .text .end {
font-size: 26rpx; font-size: 26rpx;
color: #bbb; color: #bbb;
} }
.shoppingCart .footer { .shoppingCart .footer {
z-index: 9; z-index: 9;
width: 100%; width: 100%;
@ -1141,19 +1222,23 @@
bottom: calc(98rpx + constant(safe-area-inset-bottom)); /// IOS<11.2/ bottom: calc(98rpx + constant(safe-area-inset-bottom)); /// IOS<11.2/
bottom: calc(98rpx + env(safe-area-inset-bottom)); /// IOS>11.2/ bottom: calc(98rpx + env(safe-area-inset-bottom)); /// IOS>11.2/
} }
.shoppingCart .footer.on { .shoppingCart .footer.on {
// #ifndef H5 // #ifndef H5
bottom: 0rpx; bottom: 0rpx;
// #endif // #endif
} }
.shoppingCart .footer .checkAll { .shoppingCart .footer .checkAll {
font-size: 28rpx; font-size: 28rpx;
color: #282828; color: #282828;
margin-left: 16rpx; margin-left: 16rpx;
} }
.shoppingCart .footer .money { .shoppingCart .footer .money {
font-size: 30rpx; font-size: 30rpx;
} }
.shoppingCart .footer .placeOrder { .shoppingCart .footer .placeOrder {
color: #fff; color: #fff;
font-size: 30rpx; font-size: 30rpx;
@ -1165,6 +1250,7 @@
margin-left: 22rpx; margin-left: 22rpx;
background-color: var(--view-theme); background-color: var(--view-theme);
} }
.shoppingCart .footer .button .bnt { .shoppingCart .footer .button .bnt {
font-size: 28rpx; font-size: 28rpx;
color: #999; color: #999;
@ -1174,27 +1260,33 @@
height: 60rpx; height: 60rpx;
text-align: center; text-align: center;
line-height: 60rpx; line-height: 60rpx;
&.bt-color { &.bt-color {
color: var(--view-theme); color: var(--view-theme);
border: 1px solid var(--view-theme); border: 1px solid var(--view-theme);
} }
} }
.shoppingCart .footer .button form~form { .shoppingCart .footer .button form~form {
margin-left: 17rpx; margin-left: 17rpx;
} }
.allcheckbox { .allcheckbox {
display: flex; display: flex;
align-items: center; align-items: center;
width: 260rpx; width: 260rpx;
.iconfont { .iconfont {
margin-right: 20rpx; margin-right: 20rpx;
font-size: 40rpx; font-size: 40rpx;
color: #CCCCCC; color: #CCCCCC;
} }
.icon-xuanzhong1 { .icon-xuanzhong1 {
color: var(--view-theme); color: var(--view-theme);
} }
} }
.page-footer { .page-footer {
position: fixed; position: fixed;
bottom: 0; bottom: 0;
@ -1211,9 +1303,11 @@
box-shadow: 0px 0px 17rpx 1rpx rgba(206, 206, 206, 0.32); box-shadow: 0px 0px 17rpx 1rpx rgba(206, 206, 206, 0.32);
padding-bottom: constant(safe-area-inset-bottom); /// IOS<11.2/ padding-bottom: constant(safe-area-inset-bottom); /// IOS<11.2/
padding-bottom: env(safe-area-inset-bottom); /// IOS>11.2/ padding-bottom: env(safe-area-inset-bottom); /// IOS>11.2/
&.filter{
&.filter {
filter: blur(2rpx); filter: blur(2rpx);
} }
.foot-item { .foot-item {
display: flex; display: flex;
width: max-content; width: max-content;
@ -1221,6 +1315,7 @@
justify-content: center; justify-content: center;
flex-direction: column; flex-direction: column;
position: relative; position: relative;
.count-num { .count-num {
position: absolute; position: absolute;
display: flex; display: flex;
@ -1237,15 +1332,16 @@
padding: 4rpx; padding: 4rpx;
} }
} }
.foot-item image { .foot-item image {
height: 50rpx; height: 50rpx;
width: 50rpx; width: 50rpx;
text-align: center; text-align: center;
margin: 0 auto; margin: 0 auto;
} }
.foot-item .txt { .foot-item .txt {
font-size: 24rpx; font-size: 24rpx;
} }
} }
</style> </style>

View File

@ -14,11 +14,7 @@
<view :class="['iconfont','icon-xiaoxi',isFshow?'sitebox':'']" style="color:#000;"></view> <view :class="['iconfont','icon-xiaoxi',isFshow?'sitebox':'']" style="color:#000;"></view>
</navigator> </navigator>
</view> </view>
</view> </view>
<zbpSwiper :isSelectPlace="true" :town="street" :streetname="street" :location_Arr="locationArr" <zbpSwiper :isSelectPlace="true" :town="street" :streetname="street" :location_Arr="locationArr"
@change="dchange"> @change="dchange">
</zbpSwiper> </zbpSwiper>
@ -77,7 +73,7 @@
<!-- <view class="list-con-left" <!-- <view class="list-con-left"
@tap="navgo('/pages/nongKe/specialty/index?type_code=TypeFamousSpecialties')"> --> @tap="navgo('/pages/nongKe/specialty/index?type_code=TypeFamousSpecialties')"> -->
<view class="list-con-left" <view class="list-con-left"
@tap="navgo('/pages/nongKe/specialty/indexa?type_code=TypeFamousSpecialties')"> @tap="navgo('/pages/nongKe/specialty/index?type_code=TypeFamousSpecialties')">
<!-- <view class="list-con-title"> <!-- <view class="list-con-title">
<view class="con-titlea"> <view class="con-titlea">
名优特产 名优特产
@ -92,7 +88,7 @@
<!-- <view class="con-right" style="margin-bottom: 20rpx" <!-- <view class="con-right" style="margin-bottom: 20rpx"
@click="navgo('/pages/nongKe/food/index?type_code=TypeLocalCuisine')"> --> @click="navgo('/pages/nongKe/food/index?type_code=TypeLocalCuisine')"> -->
<view class="con-right" style="margin-bottom: 20rpx" <view class="con-right" style="margin-bottom: 20rpx"
@click="navgo('/pages/nongKe/food/indexa?type_code=TypeLocalCuisine')"> @click="navgo('/pages/nongKe/food/index?type_code=TypeLocalCuisine')">
<!-- <view class="list-con-title"> <!-- <view class="list-con-title">
<view class="con-titlea"> <view class="con-titlea">
当地美食 当地美食
@ -106,7 +102,7 @@
<!-- <view class="con-right" <!-- <view class="con-right"
@click="navgo('/pages/nongKe/tourism/index?type_code=TypeFeaturedCultural')"> --> @click="navgo('/pages/nongKe/tourism/index?type_code=TypeFeaturedCultural')"> -->
<view class="con-right" <view class="con-right"
@click="navgo('/pages/nongKe/tourism/indexa?type_code=TypeFeaturedCultural')"> @click="navgo('/pages/nongKe/tourism/index?type_code=TypeFeaturedCultural')">
<!-- <view class="list-con-title"> <!-- <view class="list-con-title">
<view class="con-titlea"> <view class="con-titlea">
特色文旅 特色文旅

Binary file not shown.

Before

Width:  |  Height:  |  Size: 258 KiB

View File

Before

Width:  |  Height:  |  Size: 358 KiB

After

Width:  |  Height:  |  Size: 358 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 228 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 296 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 74 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 169 KiB