zs 2 年之前
父节点
当前提交
8aca50d09d
共有 1 个文件被更改,包括 14 次插入6 次删除
  1. 14 6
      pagesHome/order/detail.vue

+ 14 - 6
pagesHome/order/detail.vue

@@ -118,7 +118,7 @@
 						</uni-number-box>
 					</view>
 				</view>
-				<view @click="toBuy" class="button">立即购买</view>
+				<view @click="toBuy" class="button">{{type=='0'?'加入购物车':'立即购买'}}</view>
 			</view>
 		</uni-popup>
 	</mobile-frame>
@@ -174,12 +174,14 @@
 				buttonGroup: [{
 						text: '加入购物车',
 						backgroundColor: 'linear-gradient(90deg, #FFCD1E, #FF8A18)',
-						color: '#fff'
+						color: '#fff',
+						type: '0'
 					},
 					{
 						text: '立即购买',
 						backgroundColor: 'linear-gradient(90deg, #FE6035, #EF1224)',
-						color: '#fff'
+						color: '#fff',
+						type: '1'
 					}
 				],
 				bannerList: [ // 轮播图
@@ -228,7 +230,9 @@
 				menu: false,
 				disabled: true,
 				background: '#f9f9f9',
-				color: '#000'
+				color: '#000',
+				// 显示文字判断
+				type:'0'
 			};
 		},
 		onShow: function() {},
@@ -240,16 +244,19 @@
 				})
 			},
 			toPath(e) {
-				if (e && e.route) uni.redirectTo({
+				if (e && e.route) uni.reLaunch({
 					url: `/${e.route}`
 				})
 			},
 			buttonClick(e) {
-				console.log(e)
+				const that = this;
+				if (e && e.content) that.type = e.content.type;
+				that.$refs.popup.open();
 			},
 			// 选择规格
 			toChoose() {
 				const that = this;
+				that.type = '1';
 				that.$refs.popup.open();
 			},
 			// 关闭弹框
@@ -552,6 +559,7 @@
 
 			.name {
 				margin: 0 0 0 1vw;
+				font-size: var(--font14Size);
 			}
 
 		}