|
@@ -110,12 +110,10 @@
|
|
|
<view class="two">
|
|
|
<view class="two_1">规格</view>
|
|
|
<view class="two_2">
|
|
|
- <view class="two_2_1" v-for="(item,index) in specs" :key="index">
|
|
|
- <text @click="toStyle(item,index)" :class="{ 'style': isActive==index}">{{item.name}}
|
|
|
- </text>
|
|
|
- <text @click="toGroup(item)">参团</text>
|
|
|
- </view>
|
|
|
- <!-- v-if="can_group=='0'" -->
|
|
|
+ <text v-for="(item,index) in specs" :key="index" @click="toStyle(item,index)"
|
|
|
+ :class="{ 'style': isActive==index}">{{item.name}}
|
|
|
+ </text>
|
|
|
+ <!-- <text class="group" v-if="item.can_group=='0'" @click="toGroup(item)">参团</text> -->
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="thr">
|
|
@@ -126,7 +124,10 @@
|
|
|
</view>
|
|
|
<text>库存{{max}}</text>
|
|
|
</view>
|
|
|
- <view @click="toBuy(type)" class="button">{{type=='0'?'加入购物车':'立即购买'}}</view>
|
|
|
+ <view class="btn">
|
|
|
+ <view @click="toBuy(type)" class="button1">{{type=='0'?'加入购物车':'立即购买'}}</view>
|
|
|
+ <view @click="toGroup" class="button2">参团</view>
|
|
|
+ </view>
|
|
|
</view>
|
|
|
</uni-popup>
|
|
|
</mobile-frame>
|
|
@@ -146,11 +147,6 @@
|
|
|
route: 'pages/store/index',
|
|
|
normal: require('@/static/store.png'),
|
|
|
},
|
|
|
- {
|
|
|
- name: '周边',
|
|
|
- route: 'pages/week/index',
|
|
|
- normal: require('@/static/week.png'),
|
|
|
- },
|
|
|
{
|
|
|
name: '购物车',
|
|
|
route: 'pages/market/index',
|
|
@@ -308,12 +304,24 @@
|
|
|
}
|
|
|
},
|
|
|
// 参团
|
|
|
- toGroup(e) {
|
|
|
- console.log(e);
|
|
|
+ toGroup() {
|
|
|
const that = this;
|
|
|
- uni.navigateTo({
|
|
|
- url: `/pagesHome/group/index?specs_id=${e._id}&goods_id=${that.id}`
|
|
|
- })
|
|
|
+ if (that.Selected) {
|
|
|
+ let specs_id;
|
|
|
+ let specs = that.specs.find(i => i.name == that.Selected)
|
|
|
+ if (specs) specs_id = specs._id
|
|
|
+ uni.navigateTo({
|
|
|
+ url: `/pagesHome/group/index?specs_id=${specs_id}&goods_id=${that.id}`
|
|
|
+ })
|
|
|
+ } else {
|
|
|
+ uni.showModal({
|
|
|
+ title: '提示',
|
|
|
+ content: '请选择规格',
|
|
|
+ confirmColor: '#ff0000',
|
|
|
+ showCancel: false,
|
|
|
+ success: function(res) {}
|
|
|
+ });
|
|
|
+ }
|
|
|
},
|
|
|
//主菜单跳转
|
|
|
toPath(e) {
|
|
@@ -817,30 +825,17 @@
|
|
|
|
|
|
.two_2 {
|
|
|
padding: 1vw;
|
|
|
- display: flex;
|
|
|
|
|
|
- .two_2_1 {
|
|
|
- display: flex;
|
|
|
- flex-direction: column;
|
|
|
- align-items: center;
|
|
|
-
|
|
|
- text {
|
|
|
- margin: 0 2vw 0 0;
|
|
|
- padding: 1vw;
|
|
|
- border-radius: 1vw;
|
|
|
- background-color: var(--f9Color);
|
|
|
- }
|
|
|
-
|
|
|
- text:last-child {
|
|
|
- margin: 1vw 0 0 0;
|
|
|
- color: var(--mainColor);
|
|
|
- background-color: #FFD700;
|
|
|
- }
|
|
|
+ text {
|
|
|
+ margin: 0 2vw 0 0;
|
|
|
+ padding: 1vw;
|
|
|
+ border-radius: 1vw;
|
|
|
+ background-color: var(--f9Color);
|
|
|
+ }
|
|
|
|
|
|
- .style {
|
|
|
- color: var(--mainColor);
|
|
|
- background-color: var(--ff0Color);
|
|
|
- }
|
|
|
+ .style {
|
|
|
+ color: var(--mainColor);
|
|
|
+ background-color: var(--ff0Color);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -862,15 +857,30 @@
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- .button {
|
|
|
+ .btn {
|
|
|
+ display: flex;
|
|
|
+ justify-content: space-between;
|
|
|
position: fixed;
|
|
|
- width: 100vw;
|
|
|
- padding: 4vw 0;
|
|
|
- background-color: var(--fFB1Color);
|
|
|
bottom: 0;
|
|
|
- text-align: center;
|
|
|
- font-size: var(--font18Szie);
|
|
|
- color: var(--mainColor);
|
|
|
+
|
|
|
+ .button1 {
|
|
|
+ width: 50vw;
|
|
|
+ padding: 4vw 0;
|
|
|
+ background-color: var(--fFB1Color);
|
|
|
+ text-align: center;
|
|
|
+ font-size: var(--font18Szie);
|
|
|
+ color: var(--mainColor);
|
|
|
+ }
|
|
|
+
|
|
|
+ .button2 {
|
|
|
+ width: 50vw;
|
|
|
+ padding: 4vw 0;
|
|
|
+ background-color: #FF8A18;
|
|
|
+ text-align: center;
|
|
|
+ font-size: var(--font18Szie);
|
|
|
+ color: var(--mainColor);
|
|
|
+ }
|
|
|
}
|
|
|
+
|
|
|
}
|
|
|
</style>
|