yijianjun il y a 1 jour
Parent
commit
ad6b6630f8

+ 1 - 1
mer_uniapp/pages/goods/order_details/index.vue

@@ -735,7 +735,7 @@
 					})
 				})
 				cartBatchAddApi(cartListRequest).then(function(res) {
-					uni.navigateTo({
+					uni.switchTab({
 						url: '/pages/order_addcart/order_addcart'
 					})
 				}).catch(res => {

+ 24 - 2
mer_uniapp/pages/merchant/home/index.vue

@@ -67,6 +67,10 @@
 				<text :class="{ 'actave1': tabindex == 1 }" class="let-txt">评价</text>
 				<view :class="{ 'actave': tabindex == 1 }" class="let-line"></view>
 			</view>
+			<view @click="getACoupon()" class="let-box1">
+				<text class="let-txt">去领券</text>
+				<view class="let-line"></view>
+			</view>
 		</view>
 		<template v-if="tabindex == 0">
 			<view class="content">
@@ -143,8 +147,14 @@
 				<view class="mode-1">
 					<!-- 判断数量大于0显示 -->
 					<view class="mode-clear" v-if="getCartGoodsNumber>0">
-						<text class="mode-txt">数量:<text style="color: #FD6716 ;">({{getCartGoodsNumber}})</text></text>
-						<text @tap="clearCart" class="mode-txt1">清空</text>
+						<view style="display: flex;align-items: center;" >
+							<text class="mode-txt">数量:<text style="color: #FD6716 ;">({{getCartGoodsNumber}})</text></text>
+							<!-- class="mode-txt1" -->
+							<text @tap="clearCart"  style="margin-left: 40rpx;">清空购物车</text>
+						</view>
+						<view class="close" @click="closeCartModal">
+							<text style="padding: 10rpx; 20rpx">x</text>
+						</view>
 					</view>
 					<view class="mode-box">
 						<view class="items">
@@ -446,6 +456,14 @@
 			}
 		},
 		methods: {
+			/**
+			 * 	去领券
+			 */
+			getACoupon(){
+				uni.navigateTo({
+					url:`/pages/merchant/classify_coupon/index?id=${this.merId}&tabActive=2`
+				})
+			},
 			clearCart(){
 				this.cart = []
 				this.lockcatble = false
@@ -732,6 +750,10 @@
 				this.good = {}
 				this.selectble = false
 			},
+			// 关闭购物车
+			closeCartModal() {
+				this.lockcatble = false
+			},
 			onTabChang(id) {
 				if (this.tabindex === id) return
 				this.tabindex = id