|
@@ -40,7 +40,18 @@
|
|
"
|
|
"
|
|
>
|
|
>
|
|
<view class="">
|
|
<view class="">
|
|
- <text class="toptitle">{{ item.name_cn }}</text>
|
|
|
|
|
|
+ <text class="toptitle" v-if="language == 'zh-CN'">{{
|
|
|
|
+ item.name_cn
|
|
|
|
+ }}</text>
|
|
|
|
+ <text class="toptitle" v-if="language == 'en-US'">{{
|
|
|
|
+ item.name_en
|
|
|
|
+ }}</text>
|
|
|
|
+ <text class="toptitle" v-if="language == 'es-ES'">{{
|
|
|
|
+ item.name_es
|
|
|
|
+ }}</text>
|
|
|
|
+ <text class="toptitle" v-if="language == 'it-IT'">{{
|
|
|
|
+ item.name_ita
|
|
|
|
+ }}</text>
|
|
<view class="weight">{{ item.sku_item[0].item }} </view>
|
|
<view class="weight">{{ item.sku_item[0].item }} </view>
|
|
</view>
|
|
</view>
|
|
<view class="u-flex u-row-between">
|
|
<view class="u-flex u-row-between">
|
|
@@ -82,7 +93,18 @@
|
|
"
|
|
"
|
|
>
|
|
>
|
|
<view class="">
|
|
<view class="">
|
|
- <text class="toptitle">{{ goodinfo.name_cn }}</text>
|
|
|
|
|
|
+ <text class="toptitle" v-if="language == 'zh-CN'">{{
|
|
|
|
+ goodinfo.name_cn
|
|
|
|
+ }}</text>
|
|
|
|
+ <text class="toptitle" v-if="language == 'en-US'">{{
|
|
|
|
+ goodinfo.name_en
|
|
|
|
+ }}</text>
|
|
|
|
+ <text class="toptitle" v-if="language == 'es-ES'">{{
|
|
|
|
+ goodinfo.name_es
|
|
|
|
+ }}</text>
|
|
|
|
+ <text class="toptitle" v-if="language == 'it-IT'">{{
|
|
|
|
+ goodinfo.name_ita
|
|
|
|
+ }}</text>
|
|
<view class="weight">{{ sku_info.item }} </view>
|
|
<view class="weight">{{ sku_info.item }} </view>
|
|
<!-- <view class="">{{Number(sku_info.weight)*value}}kg</view> -->
|
|
<!-- <view class="">{{Number(sku_info.weight)*value}}kg</view> -->
|
|
</view>
|
|
</view>
|
|
@@ -99,7 +121,7 @@
|
|
1000000
|
|
1000000
|
|
}}</text>
|
|
}}</text>
|
|
</view>
|
|
</view>
|
|
- <u-number-box v-model="value">
|
|
|
|
|
|
+ <u-number-box @change="valChange" v-model="value">
|
|
<view slot="minus" class="">
|
|
<view slot="minus" class="">
|
|
<u-icon name="minus" size="12"></u-icon>
|
|
<u-icon name="minus" size="12"></u-icon>
|
|
</view>
|
|
</view>
|
|
@@ -121,7 +143,7 @@
|
|
<!-- 物流 -->
|
|
<!-- 物流 -->
|
|
<view class="logistics u-flex u-row-between">
|
|
<view class="logistics u-flex u-row-between">
|
|
<text style="font-weight: 600; width: 320rpx">{{ i18n.flow }}</text>
|
|
<text style="font-weight: 600; width: 320rpx">{{ i18n.flow }}</text>
|
|
- <view class="u-flex" @click="show = true">
|
|
|
|
|
|
+ <view class="u-flex" @click="changwu">
|
|
<text class="change">{{
|
|
<text class="change">{{
|
|
containname1 ? type1 + " | " + containname1 : i18n.selection
|
|
containname1 ? type1 + " | " + containname1 : i18n.selection
|
|
}}</text>
|
|
}}</text>
|
|
@@ -132,10 +154,32 @@
|
|
<view class="recommend">
|
|
<view class="recommend">
|
|
<view class="top">
|
|
<view class="top">
|
|
<image
|
|
<image
|
|
|
|
+ v-if="language == 'zh-CN'"
|
|
src="static/images/recommend.png"
|
|
src="static/images/recommend.png"
|
|
style="width: 124rpx; height: 30rpx"
|
|
style="width: 124rpx; height: 30rpx"
|
|
mode=""
|
|
mode=""
|
|
></image>
|
|
></image>
|
|
|
|
+ <image
|
|
|
|
+ v-if="language == 'en-US'"
|
|
|
|
+ src="static/images/recommend1.png"
|
|
|
|
+ style="width: 200rpx; height: 30rpx"
|
|
|
|
+ mode=""
|
|
|
|
+ >
|
|
|
|
+ </image>
|
|
|
|
+ <image
|
|
|
|
+ v-if="language == 'es-ES'"
|
|
|
|
+ src="static/images/recommend2.png"
|
|
|
|
+ style="width: 200rpx; height: 30rpx"
|
|
|
|
+ mode=""
|
|
|
|
+ >
|
|
|
|
+ </image>
|
|
|
|
+ <image
|
|
|
|
+ v-if="language == 'it-IT'"
|
|
|
|
+ src="static/images/recommend3.png"
|
|
|
|
+ style="width: 200rpx; height: 30rpx"
|
|
|
|
+ mode=""
|
|
|
|
+ >
|
|
|
|
+ </image>
|
|
</view>
|
|
</view>
|
|
<view class="bottom">
|
|
<view class="bottom">
|
|
<scroll-view
|
|
<scroll-view
|
|
@@ -482,6 +526,7 @@ export default {
|
|
stringcheck: "",
|
|
stringcheck: "",
|
|
cartid: "",
|
|
cartid: "",
|
|
weight_total: "",
|
|
weight_total: "",
|
|
|
|
+ valuenum: false,
|
|
};
|
|
};
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
@@ -492,6 +537,7 @@ export default {
|
|
onLoad(options) {
|
|
onLoad(options) {
|
|
// url: '/pageA/order?sku=' + this.sku_info + '&value=' + this.value+'&goodinfo='+this.goodinfo
|
|
// url: '/pageA/order?sku=' + this.sku_info + '&value=' + this.value+'&goodinfo='+this.goodinfo
|
|
if (options.typea) {
|
|
if (options.typea) {
|
|
|
|
+ console.log(22222);
|
|
this.typea = options.typea;
|
|
this.typea = options.typea;
|
|
this.selelist = JSON.parse(decodeURIComponent(options.selelist));
|
|
this.selelist = JSON.parse(decodeURIComponent(options.selelist));
|
|
this.goodsPrice = options.goodsPrice;
|
|
this.goodsPrice = options.goodsPrice;
|
|
@@ -515,6 +561,16 @@ export default {
|
|
// this.container()
|
|
// this.container()
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ changwu() {
|
|
|
|
+ if (this.addinfo) {
|
|
|
|
+ this.show = true;
|
|
|
|
+ } else {
|
|
|
|
+ this.$u.toast(this.i18n.shippingaddress);
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ valChange() {
|
|
|
|
+ this.valuenum = true;
|
|
|
|
+ },
|
|
todetail(id) {
|
|
todetail(id) {
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
url: "/pageA/productdetails?id=" + id,
|
|
url: "/pageA/productdetails?id=" + id,
|
|
@@ -751,6 +807,7 @@ export default {
|
|
},
|
|
},
|
|
//确定
|
|
//确定
|
|
confirm() {
|
|
confirm() {
|
|
|
|
+ this.valuenum = false;
|
|
this.show1 = false;
|
|
this.show1 = false;
|
|
this.containname1 = this.containname;
|
|
this.containname1 = this.containname;
|
|
this.recommendweight();
|
|
this.recommendweight();
|
|
@@ -763,28 +820,32 @@ export default {
|
|
},
|
|
},
|
|
//提交订单
|
|
//提交订单
|
|
topay() {
|
|
topay() {
|
|
- uni.$u.http
|
|
|
|
- .post("/api/order", {
|
|
|
|
- address_id: this.addinfo.id, //3 是 String 地址ID
|
|
|
|
- goods_id: this.goodinfo.id, //65 是 String 商品id
|
|
|
|
- goods_num: this.value, //2 是 String 商品数量
|
|
|
|
- sku_item_id: this.sku_info.id, //60 是 String 规格id
|
|
|
|
- cart_ids: this.stringcheck, //8,9 是 String 购物车id
|
|
|
|
- remark: "", //备注 是 String 备注
|
|
|
|
- merchant_goods_id: this.goodinfo.merchant_goods_id || "", //39 是 String 团长商品id
|
|
|
|
- container_id: this.containid, //1 是 String 货柜id
|
|
|
|
- share_member_id: this.share_merchant_id, // 是 String 分享团长id 分享商品的时候传
|
|
|
|
- belong: this.goodinfo.source || "", //0 是 String 商品归属 0团长 1平台自营 2团长发布或者分享的平台自营商品、供应链商品
|
|
|
|
- })
|
|
|
|
- .then((res) => {
|
|
|
|
- console.log("share_merchant_id", this.share_merchant_id);
|
|
|
|
- console.log(res);
|
|
|
|
- uni.navigateTo({
|
|
|
|
- // url: '/pageA/payorder?sum=' + (Number(this.sum*10000+ Number(this.sku_info.discount_price)*Number(this.value)*10000))/10000 +'&orderid=' + res.id
|
|
|
|
- url: "/pageA/payorder?orderid=" + res.id + "&sum=" + res.amount,
|
|
|
|
- });
|
|
|
|
- })
|
|
|
|
- .catch(() => {});
|
|
|
|
|
|
+ if (this.valuenum) {
|
|
|
|
+ this.$u.toast(this.i18n.newcontainer);
|
|
|
|
+ } else {
|
|
|
|
+ uni.$u.http
|
|
|
|
+ .post("/api/order", {
|
|
|
|
+ address_id: this.addinfo.id, //3 是 String 地址ID
|
|
|
|
+ goods_id: this.goodinfo.id, //65 是 String 商品id
|
|
|
|
+ goods_num: this.value, //2 是 String 商品数量
|
|
|
|
+ sku_item_id: this.sku_info.id, //60 是 String 规格id
|
|
|
|
+ cart_ids: this.stringcheck, //8,9 是 String 购物车id
|
|
|
|
+ remark: "", //备注 是 String 备注
|
|
|
|
+ merchant_goods_id: this.goodinfo.merchant_goods_id || "", //39 是 String 团长商品id
|
|
|
|
+ container_id: this.containid, //1 是 String 货柜id
|
|
|
|
+ share_member_id: this.share_merchant_id, // 是 String 分享团长id 分享商品的时候传
|
|
|
|
+ belong: this.goodinfo.source || "", //0 是 String 商品归属 0团长 1平台自营 2团长发布或者分享的平台自营商品、供应链商品
|
|
|
|
+ })
|
|
|
|
+ .then((res) => {
|
|
|
|
+ console.log("share_merchant_id", this.share_merchant_id);
|
|
|
|
+ console.log(res);
|
|
|
|
+ uni.navigateTo({
|
|
|
|
+ // url: '/pageA/payorder?sum=' + (Number(this.sum*10000+ Number(this.sku_info.discount_price)*Number(this.value)*10000))/10000 +'&orderid=' + res.id
|
|
|
|
+ url: "/pageA/payorder?orderid=" + res.id + "&sum=" + res.amount,
|
|
|
|
+ });
|
|
|
|
+ })
|
|
|
|
+ .catch(() => {});
|
|
|
|
+ }
|
|
},
|
|
},
|
|
},
|
|
},
|
|
};
|
|
};
|