zs 2 年 前
コミット
cb9fe330c6
2 ファイル変更1 行追加73 行削除
  1. 1 29
      pagesIntegral/order/detail.vue
  2. 0 44
      pagesIntegral/order/index.vue

+ 1 - 29
pagesIntegral/order/detail.vue

@@ -48,7 +48,7 @@
 				</scroll-view>
 			</view>
 			<view class="foot">
-				<uni-goods-nav :options="options" :buttonGroup="buttonGroup" @click="onClick"
+				<uni-goods-nav :buttonGroup="buttonGroup" 
 					@buttonClick="buttonClick" />
 			</view>
 		</view>
@@ -113,7 +113,6 @@
 					backgroundColor: 'linear-gradient(90deg, #6A5ACD, #6A5ACD)',
 					color: '#fff',
 				}],
-				options: [],
 				// 商品id
 				id: '',
 				user: {},
@@ -126,8 +125,6 @@
 				// 是否显示返回顶部
 				isShow: false,
 				topItem: '',
-				// 店铺收藏
-				shop_collect: false,
 				// 菜单显示
 				menu: false,
 				disabled: true,
@@ -144,7 +141,6 @@
 			// 监听用户是否登录
 			await that.watchLogin();
 			await that.search();
-			await that.configShare();
 		},
 		methods: {
 			//主菜单跳转
@@ -241,17 +237,6 @@
 						that.$set(that, `shop`, shop.data)
 					}
 				}
-			},
-			// 配置分享内容
-			configShare() {
-				const that = this;
-				let user_id = that.user && that.user._id ? that.user._id : '';
-				let id = that.info && that.info._id ? that.info._id : '';
-				that.$config.share = {
-					title: that.info.name,
-					path: `/pagesHome/order/detail?id=${id}&user_id=${user_id}`,
-					imageUrl: that.info.file[0].url
-				}
 			}
 		}
 	}
@@ -312,19 +297,6 @@
 							font-weight: bold;
 						}
 					}
-
-					.money_2 {
-						text-decoration: line-through;
-						color: var(--f99Color);
-
-						text {
-							margin: 0 1vw 0 0;
-						}
-
-						text:last-child {
-							font-size: var(--font16Size);
-						}
-					}
 				}
 
 				.two_2 {

+ 0 - 44
pagesIntegral/order/index.vue

@@ -119,9 +119,6 @@
 	export default {
 		data() {
 			return {
-				Style: {
-					btn: true
-				},
 				user: {},
 				key: '',
 				address: {},
@@ -276,47 +273,6 @@
 					that.$set(that, `costTotal`, arr.data.costTotal);
 					that.$set(that, `shopInfo`, arr.data.shop);
 					that.$set(that, `buy_num`, arr.data.buy_num);
-					// this.computedTotal();
-				}
-			},
-			async computedTotal() {
-				const total_detail = this.total_detail;
-				let total = this.$plus(total_detail.freight_total, total_detail.goods_total)
-				if (this.coupon.length > 0) {
-					let discount = 0;
-					for (const coupon of this.coupon) {
-						const r = this.couponList.find(f => f._id === coupon)
-						if (!r) continue;
-						const {
-							discount_config,
-							discount_type
-						} = r;
-						if (discount_type === 'min') {
-							const min = discount_config.min;
-							discount = this.$plus(discount, min)
-						} else if (discount_type === 'discount') {
-							const min = discount_config.min || 0;
-							let discount_money = 0;
-							const max = discount_config.max || 0;
-							// TODO 现在是平台发放的优惠券,所以可以直接用总价*折扣,如果是店铺的折扣券,则需要将金额分开,对应店铺计算折扣
-							// const dm = min / 10 * total;
-							const dm = this.$multiply(this.divide(min, 10), total)
-							if (max !== 0) {
-								if (max > dm) discount_money = dm;
-								else discount_money = max
-							}
-							discount += discount_money
-						}
-					}
-					total = this.$minus(total, discount)
-				}
-				if (total >= 0) {
-					this.$set(this, `goods_total`, total);
-				} else {
-					uni.showToast({
-						title: `实付金额不能为负数 不能使用该优惠劵`,
-						icon: 'none'
-					})
 				}
 			}
 		}