|
|
@@ -287,7 +287,7 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<view style="display: flex; color: #ffffff; align-items: center">
|
|
|
- <view class="btn1" @click="addCart()">加购物车</view>
|
|
|
+ <view class="btn1" v-if="!disCode" @click="addCart()">加购物车</view>
|
|
|
<view class="btn2" @click="buy()">立即购买 </view>
|
|
|
</view>
|
|
|
</template>
|
|
|
@@ -482,6 +482,9 @@ export default {
|
|
|
}
|
|
|
return this.specAttrPriceList[0].specialGoods;
|
|
|
},
|
|
|
+ disCode() {
|
|
|
+ return this.options.distributionCode;
|
|
|
+ },
|
|
|
},
|
|
|
onLoad(option) {
|
|
|
if (option.scene) {
|
|
|
@@ -514,7 +517,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- option.distributionCode ? this.getFxDetail() : this.getDetail();
|
|
|
+ this.disCode ? this.getFxDetail() : this.getDetail();
|
|
|
this.goodsCourseList();
|
|
|
this.appCommonGoodsCourseModuleFreeExamList();
|
|
|
// #ifdef MP-WEIXIN
|
|
|
@@ -723,7 +726,6 @@ export default {
|
|
|
this.$api
|
|
|
.addCart({
|
|
|
goodsIds: goodsIds,
|
|
|
- distributionCode: this.options.distributionCode,
|
|
|
})
|
|
|
.then((res) => {
|
|
|
if (res.data.code == 200) {
|
|
|
@@ -911,7 +913,7 @@ export default {
|
|
|
this.$api
|
|
|
.fxGoodsDetail({
|
|
|
goodsId: this.id,
|
|
|
- disCode: this.options.distributionCode,
|
|
|
+ disCode: this.disCode,
|
|
|
})
|
|
|
.then((res) => {
|
|
|
if (res.data.code == 200) {
|
|
|
@@ -974,16 +976,18 @@ export default {
|
|
|
});
|
|
|
},
|
|
|
toConfirmList(id) {
|
|
|
- let str = "?id=" + id;
|
|
|
- if (this.options.distributionCode) {
|
|
|
- str += "&distributionCode=" + this.options.distributionCode;
|
|
|
+ uni.navigateTo({
|
|
|
+ url: "/pages2/order/confirm_list?id=" + id + this.addParam(),
|
|
|
+ });
|
|
|
+ },
|
|
|
+ addParam(str = "") {
|
|
|
+ if (this.disCode) {
|
|
|
+ str += "&distributionCode=" + this.disCode;
|
|
|
}
|
|
|
if (this.options.linkCode) {
|
|
|
str += "&linkCode=" + this.options.linkCode;
|
|
|
}
|
|
|
- uni.navigateTo({
|
|
|
- url: "/pages2/order/confirm_list" + str,
|
|
|
- });
|
|
|
+ return str;
|
|
|
},
|
|
|
buy() {
|
|
|
if (this.$method.isGoLogin()) {
|
|
|
@@ -1047,11 +1051,10 @@ export default {
|
|
|
this.checkedAttrs = [];
|
|
|
let data = {};
|
|
|
let url = `/app/common/spec/${this.detail.specTemplateId}`;
|
|
|
- let { distributionCode } = this.options;
|
|
|
- if (distributionCode) {
|
|
|
+ if (this.disCode) {
|
|
|
url = "/app/common/distribution/spec";
|
|
|
data = {
|
|
|
- disCode: distributionCode,
|
|
|
+ disCode: this.disCode,
|
|
|
specTemplateId: this.detail.specTemplateId,
|
|
|
};
|
|
|
}
|
|
|
@@ -1309,7 +1312,7 @@ export default {
|
|
|
this.$store.commit("setShoppingCartList", {
|
|
|
shoppingCartList: data,
|
|
|
});
|
|
|
- this.$navTo.togo("/pages2/order/confirm_pay");
|
|
|
+ this.$navTo.togo("/pages2/order/confirm_pay" + this.addParam("?"));
|
|
|
}
|
|
|
}
|
|
|
this.closePop();
|