|
|
@@ -2,51 +2,54 @@
|
|
|
<view class="dry-clean-box iPhone-bottom flex-common-css box-border-box">
|
|
|
<Nav title='干洗'></Nav>
|
|
|
<view class="head-box box-border-box p-24 flex-justify-space">
|
|
|
- <image src="@/static/img/my/lqzx-bg.png" mode=""></image>
|
|
|
+ <image v-if="!siteData.logo" src="@/static/img/logo/logo.png" mode="aspectFill"></image>
|
|
|
+ <image v-else :src="siteData.logo" mode="aspectFill"></image>
|
|
|
<view class="flex-1">
|
|
|
<view class="display-flex mb-16">
|
|
|
- <view class="w410 fs-40 fw-600">干洗店干洗店干洗111干 干洗店干洗店</view>
|
|
|
- <view class="fs-28 fw-400 fc-41ABF5" @click="selectsShop()">【切换门店】</view>
|
|
|
+ <view class="w410 fs-40 fw-600 text-overflow-ellipsis-one">{{siteData.name?siteData.name:'请选择站点'}}</view>
|
|
|
+ <view class="fs-28 fw-400 fc-41ABF5 text-align-right" @click="selectsShop()">【切换站点】</view>
|
|
|
</view>
|
|
|
<view class="display-flex">
|
|
|
- <view class="w410 fs-26 fw-400 fc-9">兴科大道252号兴科大道252号兴科大道252号</view>
|
|
|
+ <view v-if="siteData.city_name||siteData.address" class="w410 fs-26 fw-400 fc-9">{{siteData.city_name}}{{siteData.address}}</view>
|
|
|
+ <view v-else class="w410 fs-26 fw-400 fc-9">请选择站点已提供服务</view>
|
|
|
<view class="text-align-center" style="margin-left: auto;">
|
|
|
- <view class="">
|
|
|
+ <view class="text-align-right">
|
|
|
<uni-icons type="location" size="20"></uni-icons>
|
|
|
</view>
|
|
|
- <view class="fs-26 fc-9">1km</view>
|
|
|
+ <view class="fs-26 fc-9">{{siteData.distance||'0'}}km</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
+
|
|
|
</view>
|
|
|
|
|
|
- <view class="box-border-box p-24">
|
|
|
+ <view class="box-border-box p-24" @click="openText()">
|
|
|
<view class="sy-box flex-justify-space box-border-box p-16">
|
|
|
<view class="align-items-center">
|
|
|
<uni-icons type="help" size="20" color="#666"></uni-icons>
|
|
|
- <view class="fc-6 fs-28 ml-10">使用需知</view>
|
|
|
+ <view class="fc-6 fs-28 ml-10">使用须知</view>
|
|
|
</view>
|
|
|
<image src="@/static/img/toRight.png" mode=""></image>
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
-
|
|
|
+ <!-- 列表 -->
|
|
|
<view class="common-view-css bgc-f" style="overflow: hidden;">
|
|
|
- <Menu style="height: 100%;"></Menu>
|
|
|
+ <Menu style="height: 100%;" @relCardBuy='relCardBuy'></Menu>
|
|
|
</view>
|
|
|
|
|
|
|
|
|
- <view class="shop-buttom-money box-border-box" @click="openBuyCrad()">
|
|
|
+ <view class="shop-buttom-money box-border-box">
|
|
|
<view class="shop-buttom-money-1 flex-justify-space align-items-center">
|
|
|
- <image src="@/static/img/takeout/buy-icon.png" mode="scaleToFill"></image>
|
|
|
- <view class="shop-buttom-num fs-24 fc-f text-align-center">3</view>
|
|
|
+ <image src="@/static/img/takeout/buy-icon.png" mode="scaleToFill" @click="openBuyCrad()"></image>
|
|
|
+ <view class="shop-buttom-num fs-24 fc-f text-align-center" @click="openBuyCrad()">{{cardData.total_num||'0'}}</view>
|
|
|
<view class="">
|
|
|
<view class="">
|
|
|
<span class="fw-600 fs-24 fc-f">¥</span>
|
|
|
- <span class="fw-600 fs-44 fc-f">19.26</span>
|
|
|
+ <span class="fw-600 fs-44 fc-f">{{cardData.total_price||'0'}}</span>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="shop-buttom-money-2 text-align-center fc-f fs-32 fw-600">去结算</view>
|
|
|
+ <view class="shop-buttom-money-2 text-align-center fc-f fs-32 fw-600" @click="createOrder()">去结算</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
|
|
|
@@ -57,7 +60,6 @@
|
|
|
<view class="buy-card-top box-border-box plr-32 flex-justify-space align-items-center">
|
|
|
<view class="">
|
|
|
<span class="fs-32 fc-3 mr-12">已选商品</span>
|
|
|
- <span class="fs-32 fc-9">(打包费<span class="fs-32 fc-FB3D03">8元</span>)</span>
|
|
|
</view>
|
|
|
<view class="fs-28 fw-400 fc-9 align-items-center">
|
|
|
<view class="">
|
|
|
@@ -67,21 +69,20 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="scroll-view-css box-border-box p-32">
|
|
|
- <view class="buy-card-item display-flex" v-for="(item,i) in 5" :key="i">
|
|
|
- <image src="@/static/img/my/bg.png" mode="scaleToFill"></image>
|
|
|
+ <view class="buy-card-item display-flex" v-for="(item,i) in cardData.goods_list" :key="i">
|
|
|
+ <image :src="item.goods_image" mode="scaleToFill"></image>
|
|
|
<view class="flex-1">
|
|
|
- <view class="w-514 text-overflow-ellipsis-one fs-34 fw-600 mb-40">[畅销款]奥尔1良烤肉牛油拌饭拌饭[畅销款]奥尔1良烤肉牛油拌饭拌饭</view>
|
|
|
-
|
|
|
-
|
|
|
+ <view class="w-514 text-overflow-ellipsis-one fs-34 fw-600 mb-40">{{item.goods_name}}</view>
|
|
|
<view class="flex-justify-space">
|
|
|
<view class="">
|
|
|
<span class="fs-24 fc-FB3D03 fw-400">¥</span>
|
|
|
- <span class="fs-40 fc-FB3D03 fw-b">3.99</span>
|
|
|
+ <span class="fs-40 fc-FB3D03 fw-b">{{item.price}}</span>
|
|
|
</view>
|
|
|
<view class="display-flex align-items-center">
|
|
|
- <view class="right-only-right-red fw-500 text-align-center fs-36 fc-f">-</view>
|
|
|
- <view class="right-only-right-2 text-align-center fs-28 fw-400">1</view>
|
|
|
- <view class="right-only-right-add fw-500 text-align-center fs-36 fc-f">+</view>
|
|
|
+ <view v-show="item.number > 0" class="right-only-right-red fw-500 text-align-center fs-36 fc-f" @click="addred(1,item)">-</view>
|
|
|
+ <view v-show="item.number > 0" class="right-only-right-2 text-align-center fs-28 fw-400">{{item.number}}</view>
|
|
|
+ <view class="right-only-right-add fw-500 text-align-center fs-36 fc-f" @click="addred(2,item)">+</view>
|
|
|
+
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
@@ -91,43 +92,142 @@
|
|
|
<view class="shop-buttom-money box-border-box" @click="createOrder()">
|
|
|
<view class="shop-buttom-money-1 flex-justify-space align-items-center">
|
|
|
<image src="@/static/img/takeout/buy-icon.png" mode="scaleToFill"></image>
|
|
|
- <view class="shop-buttom-num fs-24 fc-f text-align-center">3</view>
|
|
|
+ <view class="shop-buttom-num fs-24 fc-f text-align-center">{{cardData.total_num||'0'}}</view>
|
|
|
<view class="">
|
|
|
<view class="">
|
|
|
<span class="fw-600 fs-24 fc-f">¥</span>
|
|
|
- <span class="fw-600 fs-44 fc-f">19.26</span>
|
|
|
+ <span class="fw-600 fs-44 fc-f">{{cardData.total_price||'0'}}</span>
|
|
|
</view>
|
|
|
</view>
|
|
|
- <view class="shop-buttom-money-2 text-align-center fs-32 fc-f fw-600" @click="toConfirmOrder()">去结算</view>
|
|
|
+ <view class="shop-buttom-money-2 text-align-center fs-32 fc-f fw-600">去结算</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</view>
|
|
|
</uni-popup>
|
|
|
+
|
|
|
+ <uni-popup ref="popupText" type="bottom">
|
|
|
+ <view class="use-box box-border-box p-16">
|
|
|
+ <view class="head-pop flex-justify-space align-items-center mb-24">
|
|
|
+ <uni-icons type="closeempty" size="24" color="#fff"></uni-icons>
|
|
|
+ <view class="fs-36 fc-0 fw-600">使用须知</view>
|
|
|
+ <uni-icons @click.stop="closeMsg()" type="closeempty" size="24"></uni-icons>
|
|
|
+ </view>
|
|
|
+ <view class="scroll-view-css" v-html="laundry_str"></view>
|
|
|
+ </view>
|
|
|
+ </uni-popup>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+ import {setShopIngNumber,setShopIngDel,getShopIngList} from '@/api/shopping.js'
|
|
|
+ import {getCommonText} from '@/api/common.js';
|
|
|
+
|
|
|
import Menu from './dry-mod/menu.vue';
|
|
|
import tools from "@/service/tools";
|
|
|
export default {
|
|
|
components:{Menu},
|
|
|
data(){
|
|
|
return{
|
|
|
+ laundry_str:'',
|
|
|
+ siteData:{
|
|
|
+ id:'',
|
|
|
+ school_id:'',
|
|
|
+ name:'',
|
|
|
+ logo:'',
|
|
|
+ distance:0,
|
|
|
+ city_name:'',
|
|
|
+ address:'',
|
|
|
+ },
|
|
|
|
|
|
+ cardData:{
|
|
|
+ goods_list:[],
|
|
|
+ total_num:0,
|
|
|
+ total_price:0,
|
|
|
+ },
|
|
|
+
|
|
|
+ isAJAX:false,
|
|
|
}
|
|
|
},
|
|
|
- onLoad() {
|
|
|
-
|
|
|
+ onLoad(e) {
|
|
|
+ if(e.data){
|
|
|
+ this.siteData = JSON.parse(decodeURIComponent(e.data));
|
|
|
+ }
|
|
|
+ },
|
|
|
+ onShow() {
|
|
|
+ this.getText();
|
|
|
+ this.getCardList();
|
|
|
},
|
|
|
methods:{
|
|
|
+ relCardBuy(){
|
|
|
+ // 重置购物车
|
|
|
+ this.getCardList();
|
|
|
+ },
|
|
|
+ getCardList(){
|
|
|
+ getShopIngList({type:3}).then((res)=>{
|
|
|
+ if(res.code === 1){
|
|
|
+ this.cardData = res.data;
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
+ getText(){
|
|
|
+ getCommonText().then((res)=>{
|
|
|
+ if(res.code === 1){
|
|
|
+ this.laundry_str = res.data.laundry_str
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+
|
|
|
selectsShop(){
|
|
|
uni.navigateTo({
|
|
|
- url:'/pages-buy/dry-mod/select-shop'
|
|
|
+ url:'/pages-buy/dry-mod/select-shop?id=' + this.siteData.id
|
|
|
})
|
|
|
},
|
|
|
+ openText(){
|
|
|
+ this.$refs.popupText.open()
|
|
|
+ },
|
|
|
+ closeMsg(){
|
|
|
+ this.$refs.popupText.close()
|
|
|
+ },
|
|
|
+
|
|
|
openBuyCrad(){
|
|
|
this.$refs.popupBuy.open()
|
|
|
},
|
|
|
+
|
|
|
+ addred(type,item,info){
|
|
|
+ if(this.isAJAX){
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.isAJAX = true;
|
|
|
+ if(type === 1){
|
|
|
+ // 减
|
|
|
+ setShopIngNumber({type:3,goods_id:info.goods_id,category_id:item.type,operation:2}).then((res)=>{
|
|
|
+ if(res.code === 1){
|
|
|
+ this.isAJAX = false;
|
|
|
+ info.num -= 1;
|
|
|
+
|
|
|
+ }else{
|
|
|
+ this.isAJAX = false;
|
|
|
+ tools.error(res.msg)
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ }else if(type === 2){
|
|
|
+ // 加
|
|
|
+ setShopIngAdd({type:3,goods_id:info.goods_id,category_id:item.type}).then((res)=>{
|
|
|
+ if(res.code === 1){
|
|
|
+ this.isAJAX = false;
|
|
|
+ info.num += 1;
|
|
|
+
|
|
|
+ }else{
|
|
|
+ this.isAJAX = false;
|
|
|
+ tools.error(res.msg)
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
createOrder(){
|
|
|
|
|
|
},
|
|
|
@@ -136,6 +236,19 @@
|
|
|
</script>
|
|
|
|
|
|
<style scoped lang="scss">
|
|
|
+ .use-box{
|
|
|
+ width: 100%;
|
|
|
+ height: 70vh;
|
|
|
+ background-color: #fff;
|
|
|
+ border-radius: 24rpx 24rpx 0rpx 0rpx;
|
|
|
+ display: flex;
|
|
|
+ flex-direction: column;
|
|
|
+ .head-pop{
|
|
|
+ padding-bottom: 34rpx !important;
|
|
|
+ border-bottom: 1rpx solid #F2F2F2;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
.dry-clean-box{
|
|
|
background-color: #fff;
|
|
|
.right-only-right-red{
|