zs há 2 anos atrás
pai
commit
2130442ac3
1 ficheiros alterados com 19 adições e 7 exclusões
  1. 19 7
      pagesHome/order/detail.vue

+ 19 - 7
pagesHome/order/detail.vue

@@ -74,8 +74,8 @@
 			</view>
 		</view>
 		<view class="collect">
-			<text v-if="!collection" @click="toCollect('1')" class="iconfont icon-kongxin"></text>
-			<text v-else @click="toCollect('0')" class="iconfont icon-shixin"></text>
+			<text v-if="!collection" @click="toCollect" class="iconfont icon-kongxin"></text>
+			<text v-else @click="toCollect" class="iconfont icon-shixin"></text>
 		</view>
 		<view class="menu">
 			<text @click="toMenu" class="iconfont icon-gengduo"></text>
@@ -108,12 +108,14 @@
 				</view>
 				<view class="two">
 					<view class="two_1">口味</view>
-					<view class="two_2"><text>{{info.specs.flavor}}</text></view>
+					<view class="two_2"><text @click="toStyle"
+							:style="{color:color,background:background}">{{info.specs.flavor}}</text></view>
 				</view>
 				<view class="thr">
 					<text>数量:</text>
 					<view class="count">
-						<uni-number-box v-model="info.specs.num" @change="toCount"></uni-number-box>
+						<uni-number-box :disabled="disabled" v-model="info.specs.num" @change="toCount">
+						</uni-number-box>
 					</view>
 				</view>
 				<view @click="toBuy" class="button">立即购买</view>
@@ -223,7 +225,10 @@
 				// 收藏
 				collection: false,
 				// 菜单显示
-				menu: false
+				menu: false,
+				disabled: true,
+				background: '#f9f9f9',
+				color: '#000'
 			};
 		},
 		onShow: function() {},
@@ -252,6 +257,14 @@
 				const that = this;
 				that.$refs.popup.close()
 			},
+			// 修改样式
+			toStyle() {
+				const that = this;
+				that.color = '#ffffff';
+				that.background = '#ff0000';
+				that.Selected = that.info.specs.flavor;
+				that.disabled = false;
+			},
 			// 计数器
 			toCount(e) {
 				console.log(e);
@@ -588,9 +601,8 @@
 					font-size: var(--font14Size);
 
 					text {
-						font-weight: bold;
 						padding: 0 2vw;
-						color: var(--ff0Color);
+						color: var(--f85Color);
 					}
 				}
 			}