|
@@ -6,7 +6,10 @@
|
|
<view v-for="(item, index) in goodsList" :key="item.id">
|
|
<view v-for="(item, index) in goodsList" :key="item.id">
|
|
<view class="item">
|
|
<view class="item">
|
|
<view style="display: flex; justify-content: space-between">
|
|
<view style="display: flex; justify-content: space-between">
|
|
- <image :src="$method.splitImgHost(item.coverUrl)" style="height: 120rpx; width: 204rpx; border-radius: 16rpx">
|
|
|
|
|
|
+ <image
|
|
|
|
+ :src="$method.splitImgHost(item.coverUrl)"
|
|
|
|
+ style="height: 120rpx; width: 204rpx; border-radius: 16rpx"
|
|
|
|
+ >
|
|
</image>
|
|
</image>
|
|
<view class="right_con" style="margin-left: 20rpx">
|
|
<view class="right_con" style="margin-left: 20rpx">
|
|
<view style="color: #333333; font-size: 30rpx; font-weight: bold">
|
|
<view style="color: #333333; font-size: 30rpx; font-weight: bold">
|
|
@@ -14,38 +17,66 @@
|
|
<text v-if="item.sevenYear"> ({{ item.sevenYear }}) </text>
|
|
<text v-if="item.sevenYear"> ({{ item.sevenYear }}) </text>
|
|
</view>
|
|
</view>
|
|
<view class="priceTag"> ¥ {{ item.standPrice }} </view>
|
|
<view class="priceTag"> ¥ {{ item.standPrice }} </view>
|
|
- <view class="input_c" v-if="item.templateType != null && item.goodsType == 1">
|
|
|
|
- <view v-if="item.templateType == 'class'" style="
|
|
|
|
|
|
+ <view
|
|
|
|
+ class="input_c"
|
|
|
|
+ v-if="item.templateType != null && item.goodsType == 1"
|
|
|
|
+ >
|
|
|
|
+ <view
|
|
|
|
+ v-if="item.templateType == 'class'"
|
|
|
|
+ style="
|
|
display: flex;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
align-items: center;
|
|
height: 56rpx;
|
|
height: 56rpx;
|
|
padding: 8rpx;
|
|
padding: 8rpx;
|
|
border-radius: 8rpx;
|
|
border-radius: 8rpx;
|
|
- " @click="openPopup(0, item)">
|
|
|
|
|
|
+ "
|
|
|
|
+ @click="openPopup(0, item)"
|
|
|
|
+ >
|
|
<view style="color: #666666; font-size: 24rpx">{{
|
|
<view style="color: #666666; font-size: 24rpx">{{
|
|
item.gradObj ? item.gradObj.className : "选择班级"
|
|
item.gradObj ? item.gradObj.className : "选择班级"
|
|
}}</view>
|
|
}}</view>
|
|
- <view><u-icon name="arrow-down" color="#999999" size="28"></u-icon></view>
|
|
|
|
|
|
+ <view
|
|
|
|
+ ><u-icon
|
|
|
|
+ name="arrow-down"
|
|
|
|
+ color="#999999"
|
|
|
|
+ size="28"
|
|
|
|
+ ></u-icon
|
|
|
|
+ ></view>
|
|
</view>
|
|
</view>
|
|
- <view v-if="item.templateType == 'apply'" style="
|
|
|
|
|
|
+ <view
|
|
|
|
+ v-if="item.templateType == 'apply'"
|
|
|
|
+ style="
|
|
display: flex;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
align-items: center;
|
|
height: 56rpx;
|
|
height: 56rpx;
|
|
padding: 8rpx;
|
|
padding: 8rpx;
|
|
border-radius: 8rpx;
|
|
border-radius: 8rpx;
|
|
- " @click="openPopup(1, item)">
|
|
|
|
- <view style="color: #666666; font-size: 24rpx">{{
|
|
|
|
- !applyAreas.areaName
|
|
|
|
- ? "报考地区"
|
|
|
|
- : examDate.examineName +
|
|
|
|
- "-" +
|
|
|
|
- applyAreas.areaName +
|
|
|
|
- "-" +
|
|
|
|
- applyAreas.cityName
|
|
|
|
- }}</view>
|
|
|
|
- <view><u-icon name="arrow-down" color="#999999" size="28"></u-icon></view>
|
|
|
|
|
|
+ "
|
|
|
|
+ @click="openPopup(1, item)"
|
|
|
|
+ >
|
|
|
|
+ <view
|
|
|
|
+ v-if="item.applyAreas"
|
|
|
|
+ style="color: #666666; font-size: 24rpx"
|
|
|
|
+ >{{
|
|
|
|
+ item.examDate.examineName +
|
|
|
|
+ "-" +
|
|
|
|
+ item.applyAreas.areaName +
|
|
|
|
+ "-" +
|
|
|
|
+ item.applyAreas.cityName
|
|
|
|
+ }}</view
|
|
|
|
+ >
|
|
|
|
+ <view v-else style="color: #666666; font-size: 24rpx">
|
|
|
|
+ 报考地区
|
|
|
|
+ </view>
|
|
|
|
+ <view
|
|
|
|
+ ><u-icon
|
|
|
|
+ name="arrow-down"
|
|
|
|
+ color="#999999"
|
|
|
|
+ size="28"
|
|
|
|
+ ></u-icon
|
|
|
|
+ ></view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
@@ -62,23 +93,40 @@
|
|
</view>
|
|
</view>
|
|
|
|
|
|
<view style="display: flex; color: #ffffff; align-items: center">
|
|
<view style="display: flex; color: #ffffff; align-items: center">
|
|
- <view class="btn2" :class="{ able: isAble() }" @click="goBuy()">确认购买</view>
|
|
|
|
|
|
+ <view class="btn2" :class="{ able: isAble() }" @click="goBuy()"
|
|
|
|
+ >确认购买</view
|
|
|
|
+ >
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<u-popup v-model="show1" mode="bottom" border-radius="40">
|
|
<u-popup v-model="show1" mode="bottom" border-radius="40">
|
|
<view class="popup_box">
|
|
<view class="popup_box">
|
|
<view class="check_head">
|
|
<view class="check_head">
|
|
<view class="grade">选择考期/地区</view>
|
|
<view class="grade">选择考期/地区</view>
|
|
- <u-icon name="close" color="#CFCFCF" size="30" @click="closePop(1)"></u-icon>
|
|
|
|
|
|
+ <u-icon
|
|
|
|
+ name="close"
|
|
|
|
+ color="#CFCFCF"
|
|
|
|
+ size="30"
|
|
|
|
+ @click="closePop(1)"
|
|
|
|
+ ></u-icon>
|
|
</view>
|
|
</view>
|
|
|
|
|
|
<view style="display: flex; height: 550rpx">
|
|
<view style="display: flex; height: 550rpx">
|
|
<view style="width: 50%">
|
|
<view style="width: 50%">
|
|
<view class="topTxt">考期</view>
|
|
<view class="topTxt">考期</view>
|
|
<view>
|
|
<view>
|
|
- <picker-view :indicator-style="indicatorStyle" :value="value" @change="bindChangeE" class="picker-view">
|
|
|
|
|
|
+ <picker-view
|
|
|
|
+ :indicator-style="indicatorStyle"
|
|
|
|
+ :value="value"
|
|
|
|
+ @change="bindChangeE"
|
|
|
|
+ class="picker-view"
|
|
|
|
+ >
|
|
<picker-view-column>
|
|
<picker-view-column>
|
|
- <view class="picker-item" v-for="(item, index) in examine" :key="index">{{ item.examineName }}</view>
|
|
|
|
|
|
+ <view
|
|
|
|
+ class="picker-item"
|
|
|
|
+ v-for="(item, index) in examine"
|
|
|
|
+ :key="index"
|
|
|
|
+ >{{ item.examineName }}</view
|
|
|
|
+ >
|
|
</picker-view-column>
|
|
</picker-view-column>
|
|
</picker-view>
|
|
</picker-view>
|
|
</view>
|
|
</view>
|
|
@@ -86,12 +134,27 @@
|
|
<view style="width: 50%">
|
|
<view style="width: 50%">
|
|
<view class="topTxt">地区</view>
|
|
<view class="topTxt">地区</view>
|
|
<view>
|
|
<view>
|
|
- <picker-view :indicator-style="indicatorStyle" :value="value" @change="bindChange" class="picker-view">
|
|
|
|
|
|
+ <picker-view
|
|
|
|
+ :indicator-style="indicatorStyle"
|
|
|
|
+ :value="value"
|
|
|
|
+ @change="bindChange"
|
|
|
|
+ class="picker-view"
|
|
|
|
+ >
|
|
<picker-view-column>
|
|
<picker-view-column>
|
|
- <view class="picker-item" v-for="(item, index) in provinceList" :key="index">{{ item.areaName }}</view>
|
|
|
|
|
|
+ <view
|
|
|
|
+ class="picker-item"
|
|
|
|
+ v-for="(item, index) in provinceList"
|
|
|
|
+ :key="index"
|
|
|
|
+ >{{ item.areaName }}</view
|
|
|
|
+ >
|
|
</picker-view-column>
|
|
</picker-view-column>
|
|
<picker-view-column>
|
|
<picker-view-column>
|
|
- <view class="picker-item" v-for="(item, index) in cityList" :key="index">{{ item.areaName }}</view>
|
|
|
|
|
|
+ <view
|
|
|
|
+ class="picker-item"
|
|
|
|
+ v-for="(item, index) in cityList"
|
|
|
|
+ :key="index"
|
|
|
|
+ >{{ item.areaName }}</view
|
|
|
|
+ >
|
|
</picker-view-column>
|
|
</picker-view-column>
|
|
</picker-view>
|
|
</picker-view>
|
|
</view>
|
|
</view>
|
|
@@ -142,7 +205,7 @@ export default {
|
|
activeItem: {},
|
|
activeItem: {},
|
|
};
|
|
};
|
|
},
|
|
},
|
|
- onPullDownRefresh() { },
|
|
|
|
|
|
+ onPullDownRefresh() {},
|
|
async onLoad(option) {
|
|
async onLoad(option) {
|
|
this.id = option.id;
|
|
this.id = option.id;
|
|
this.isBK = option.isBK;
|
|
this.isBK = option.isBK;
|
|
@@ -164,7 +227,7 @@ export default {
|
|
}
|
|
}
|
|
});
|
|
});
|
|
},
|
|
},
|
|
- onShow() { },
|
|
|
|
|
|
+ onShow() {},
|
|
methods: {
|
|
methods: {
|
|
getExamine(id) {
|
|
getExamine(id) {
|
|
let self = this;
|
|
let self = this;
|
|
@@ -215,10 +278,9 @@ export default {
|
|
};
|
|
};
|
|
this.applyObj.applyAreasJson = JSON.stringify(this.applyAreas);
|
|
this.applyObj.applyAreasJson = JSON.stringify(this.applyAreas);
|
|
this.applyObj.examDateJson = JSON.stringify(this.examDate);
|
|
this.applyObj.examDateJson = JSON.stringify(this.examDate);
|
|
- this.detail.examDate = this.examDate;
|
|
|
|
- this.detail.applyAreas = this.applyAreas;
|
|
|
|
|
|
+ this.activeItem.examDate = this.examDate;
|
|
|
|
+ this.activeItem.applyAreas = this.applyAreas;
|
|
this.show1 = false;
|
|
this.show1 = false;
|
|
-
|
|
|
|
},
|
|
},
|
|
|
|
|
|
checkAreaData() {
|
|
checkAreaData() {
|
|
@@ -261,7 +323,7 @@ export default {
|
|
});
|
|
});
|
|
return false;
|
|
return false;
|
|
}
|
|
}
|
|
- return this.goodsList.some(item => {
|
|
|
|
|
|
+ return this.goodsList.some((item) => {
|
|
if (item.templateType == "class" && item.goodsType == 1) {
|
|
if (item.templateType == "class" && item.goodsType == 1) {
|
|
if (!item.gradObj.className) {
|
|
if (!item.gradObj.className) {
|
|
uni.showModal({
|
|
uni.showModal({
|
|
@@ -282,9 +344,8 @@ export default {
|
|
// return false;
|
|
// return false;
|
|
// }
|
|
// }
|
|
}
|
|
}
|
|
- return true
|
|
|
|
- })
|
|
|
|
-
|
|
|
|
|
|
+ return true;
|
|
|
|
+ });
|
|
},
|
|
},
|
|
radioGroupChange(e) {
|
|
radioGroupChange(e) {
|
|
console.log(e);
|
|
console.log(e);
|
|
@@ -320,7 +381,7 @@ export default {
|
|
},
|
|
},
|
|
goBuy() {
|
|
goBuy() {
|
|
if (!this.checkData()) {
|
|
if (!this.checkData()) {
|
|
- return
|
|
|
|
|
|
+ return;
|
|
}
|
|
}
|
|
this.$store.commit("setShoppingCartList", {
|
|
this.$store.commit("setShoppingCartList", {
|
|
shoppingCartList: this.goodsList,
|
|
shoppingCartList: this.goodsList,
|
|
@@ -377,24 +438,24 @@ export default {
|
|
},
|
|
},
|
|
bindChange(e) {
|
|
bindChange(e) {
|
|
const val = e.detail.value;
|
|
const val = e.detail.value;
|
|
- if (this.pAreaIndex != e.detail.value[0]) {
|
|
|
|
- this.pAreaIndex = e.detail.value[0];
|
|
|
|
|
|
+ if (this.pAreaIndex != val[0]) {
|
|
|
|
+ this.pAreaIndex = val[0];
|
|
this.getCityList(this.provinceList[this.pAreaIndex].areaId);
|
|
this.getCityList(this.provinceList[this.pAreaIndex].areaId);
|
|
}
|
|
}
|
|
- if (this.cAreaIndex != e.detail.value[1]) {
|
|
|
|
- this.cAreaIndex = e.detail.value[1];
|
|
|
|
|
|
+ if (this.cAreaIndex != val[1]) {
|
|
|
|
+ this.cAreaIndex = val[1];
|
|
}
|
|
}
|
|
},
|
|
},
|
|
openPopup(index, item) {
|
|
openPopup(index, item) {
|
|
this.activeItem = item || {};
|
|
this.activeItem = item || {};
|
|
if (index == 0) {
|
|
if (index == 0) {
|
|
- // this.show = true;
|
|
|
|
|
|
+
|
|
this.$refs["grade"].open(
|
|
this.$refs["grade"].open(
|
|
this.gradeListObj[item.goodsId],
|
|
this.gradeListObj[item.goodsId],
|
|
item.gradObj.gradeId
|
|
item.gradObj.gradeId
|
|
);
|
|
);
|
|
} else {
|
|
} else {
|
|
- this.getExamine(item.projectId)
|
|
|
|
|
|
+ this.getExamine(100);
|
|
this.getProvinceList();
|
|
this.getProvinceList();
|
|
this.show1 = true;
|
|
this.show1 = true;
|
|
}
|
|
}
|
|
@@ -407,7 +468,7 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
},
|
|
},
|
|
- onReachBottom() { },
|
|
|
|
|
|
+ onReachBottom() {},
|
|
computed: {
|
|
computed: {
|
|
...mapGetters(["userInfo", "shoppingCartList"]),
|
|
...mapGetters(["userInfo", "shoppingCartList"]),
|
|
disCode() {
|
|
disCode() {
|
|
@@ -594,7 +655,7 @@ page {
|
|
box-sizing: unset;
|
|
box-sizing: unset;
|
|
box-shadow: 0px -2px 6px 0px rgba(0, 0, 0, 0.1);
|
|
box-shadow: 0px -2px 6px 0px rgba(0, 0, 0, 0.1);
|
|
|
|
|
|
- >view {
|
|
|
|
|
|
+ > view {
|
|
margin: 0 30rpx;
|
|
margin: 0 30rpx;
|
|
}
|
|
}
|
|
|
|
|