Merge branch 'master' of https://gitea.lihaink.cn/mkm/new_shop_app
This commit is contained in:
commit
ef8bcd4d48
@ -467,7 +467,7 @@
|
|||||||
bottom: 0;
|
bottom: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
max-height: 600rpx;
|
// max-height: 600rpx;
|
||||||
border-radius: 16rpx 16rpx 0 0;
|
border-radius: 16rpx 16rpx 0 0;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
padding-bottom: 60rpx;
|
padding-bottom: 60rpx;
|
||||||
|
@ -29,14 +29,15 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="v-con-group">
|
<view class="v-con-group">
|
||||||
<view class="v-con-group-title">
|
<!-- <view class="v-con-group-title">
|
||||||
<view class="v-con-group-title-left">套餐详情</view>
|
<view class="v-con-group-title-left">套餐详情</view>
|
||||||
<view class="v-con-group-title-right" @click.stop="handleOpen">
|
<view class="v-con-group-title-right" @click.stop="handleOpen">
|
||||||
<text>{{isOpen?'折叠':'展开'}}</text>
|
<text>{{isOpen?'折叠':'展开'}}</text>
|
||||||
<u-icon :name="isOpen?'arrow-down' : 'arrow-right'" size="15"></u-icon>
|
<u-icon :name="isOpen?'arrow-down' : 'arrow-right'" size="15"></u-icon>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view> -->
|
||||||
<scroll-view scroll-y>
|
|
||||||
|
<!-- <scroll-view scroll-y>
|
||||||
<view class="v-con-group-list" :style="{'max-height':isOpen?'400rpx':'0'}">
|
<view class="v-con-group-list" :style="{'max-height':isOpen?'400rpx':'0'}">
|
||||||
<block v-for="(item,indx) in merchantInfo" :key="indx">
|
<block v-for="(item,indx) in merchantInfo" :key="indx">
|
||||||
<view class="v-con-group-list-item">
|
<view class="v-con-group-list-item">
|
||||||
@ -45,11 +46,11 @@
|
|||||||
</view>
|
</view>
|
||||||
</block>
|
</block>
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view> -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="v-btn-wrap" @click="cartForm.total_amount?submitOrder():null">
|
<view class="v-btn-wrap" @click="submitOrder">
|
||||||
<u-button class="v-btn" :loading="loading"
|
<u-button class="v-btn" :loading="loading"
|
||||||
:text="Number(cartForm.total_amount||0).toFixed(2)+'元 确认支付'"></u-button>
|
:text="Number(cartForm.total_amount||0).toFixed(2)+'元 确认支付'"></u-button>
|
||||||
</view>
|
</view>
|
||||||
@ -204,69 +205,43 @@
|
|||||||
|
|
||||||
// 提交订单
|
// 提交订单
|
||||||
async submitOrder() {
|
async submitOrder() {
|
||||||
if (!this.cartForm.total_amount) {
|
if (!this.cartForm.total_amount || this.cartForm.total_amount == 0) {
|
||||||
return this.$util.Tips({
|
return this.$util.Tips({
|
||||||
title: "请输入付款金额!"
|
title: "请输入付款金额"
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
|
if (that.merchantInfo && that.merchantInfo.length > 0) {
|
||||||
|
// 循环加入购物车
|
||||||
|
for (var i = 0; i < that.merchantInfo.length; i++) {
|
||||||
|
let info = {
|
||||||
|
product_id: that.merchantInfo[i].product_id,
|
||||||
|
product_attr_unique: that.merchantInfo[i].unique,
|
||||||
|
cart_num: that.merchantInfo[i].num,
|
||||||
|
is_new: 1,
|
||||||
|
product_type: 0,
|
||||||
|
source: 999,
|
||||||
|
total_amount: that.cartForm.total_amount
|
||||||
|
};
|
||||||
|
|
||||||
// 循环加入购物车
|
try {
|
||||||
for (var i = 0; i < that.merchantInfo.length; i++) {
|
let res = await addCart(info);
|
||||||
let info = {
|
that.checkForm.cart_id.push(res.data.cart_id);
|
||||||
product_id: that.merchantInfo[i].product_id,
|
} catch (err) {
|
||||||
product_attr_unique: that.merchantInfo[i].unique,
|
that.loading = false;
|
||||||
cart_num: that.merchantInfo[i].num,
|
return that.$util.Tips({
|
||||||
is_new: 1,
|
title: err.message || err.msg || err
|
||||||
product_type: 0,
|
})
|
||||||
source: 999,
|
}
|
||||||
total_amount: that.cartForm.total_amount
|
}
|
||||||
};
|
|
||||||
console.log(that.merchantInfo[i]);
|
|
||||||
|
|
||||||
try {
|
if (that.checkForm.cart_id && that.checkForm.cart_id.length > 0) {
|
||||||
let res = await addCart(info);
|
return uni.navigateTo({
|
||||||
that.checkForm.cart_id.push(res.data.cart_id);
|
url: "/pages/payment/settlement?cartId=" + this.checkForm.cart_id.join(',') +
|
||||||
} catch (e) {
|
"&money=" + this.cartForm.total_amount,
|
||||||
return that.$util.Tips({
|
|
||||||
title: err.message || err.msg || err
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (that.checkForm.cart_id && that.checkForm.cart_id.length > 0) {
|
|
||||||
// return console.log(this.checkForm);
|
|
||||||
return uni.navigateTo({
|
|
||||||
url: "/pages/payment/settlement?cartId=" + this.checkForm.cart_id.join(',') +
|
|
||||||
"&money=" + this.cartForm.total_amount,
|
|
||||||
})
|
|
||||||
orderCheck(that.checkForm).then(res1 => {
|
|
||||||
that.loading = false;
|
|
||||||
|
|
||||||
uni.navigateTo({
|
|
||||||
url: "/pages/payment/settlement",
|
|
||||||
success: (res) => {
|
|
||||||
res.eventChannel.emit('acceptDataFromOpenedPage', {
|
|
||||||
platformConsumption: res1.data.platformCoupon || [],
|
|
||||||
productData: that.merchantInfo,
|
|
||||||
checkForm: that.checkForm,
|
|
||||||
merName: that.mer_name,
|
|
||||||
money: that.cartForm.total_amount,
|
|
||||||
key: res1.data.key,
|
|
||||||
order_type: res1.data.order_type,
|
|
||||||
enabledPlatformCoupon: res1.data.enabledPlatformCoupon,
|
|
||||||
platformCoupon: res1.data.platformCoupon
|
|
||||||
})
|
|
||||||
},
|
|
||||||
fail(err) {
|
|
||||||
console.log(err)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}).catch(err => {
|
|
||||||
that.loading = false;
|
|
||||||
Toast(err.message || err)
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// 折叠商品
|
// 折叠商品
|
||||||
|
@ -1,109 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<view :style="viewColor">
|
<view :style="viewColor">
|
||||||
<view class='order-submission'>
|
<view class='order-submission'>
|
||||||
<!-- 商品信息 -->
|
|
||||||
<view class="storeinfo-wrapper">
|
|
||||||
<view class="store-item" v-for="(item,index) in cartInfo" :key="index">
|
|
||||||
<view class="store-title">
|
|
||||||
<text class="iconfont icon-shangjiadingdan"></text>
|
|
||||||
<view class="txt" @click="goStore(item.mer_id)">{{item.mer_name}}</view>
|
|
||||||
<text class="iconfont icon-xiangyou"></text>
|
|
||||||
</view>
|
|
||||||
<view v-for="(goods,j) in item.list" :key="j">
|
|
||||||
<view v-if="goods.product_type == 2">
|
|
||||||
<view class="product-item">
|
|
||||||
<view class="img-box">
|
|
||||||
<image :src="goods.productPresellAttr.image || goods.product.image"></image>
|
|
||||||
</view>
|
|
||||||
<view class="content event_content">
|
|
||||||
<view class="name line1"><text
|
|
||||||
class="event_name event_bg">预售</text>{{goods.productPresell.store_name}}
|
|
||||||
</view>
|
|
||||||
<view class="label" style="width: 70%;">{{goods.productAttr.sku}}</view>
|
|
||||||
<view class="price">
|
|
||||||
¥{{goods.productPresellAttr.presell_price}}
|
|
||||||
<text>X{{goods.cart_num}}</text>
|
|
||||||
</view>
|
|
||||||
<view class="event_ship event_color">发货时间:
|
|
||||||
<!--全款预售-->
|
|
||||||
<text
|
|
||||||
v-if="goods.productPresell.presell_type === 1">{{goods.productPresell.delivery_type === 1 ? '支付后' : '预售结束后'}}{{ goods.productPresell.delivery_day }}天内</text>
|
|
||||||
<!--定金预售-->
|
|
||||||
<text
|
|
||||||
v-if="goods.productPresell.presell_type === 2">{{ goods.productPresell.delivery_type === 1 ? '付尾款后' : '预售结束后' }}{{ goods.productPresell.delivery_day }}天内</text>
|
|
||||||
</view>
|
|
||||||
<view class="err-txt" v-if="goods.undelivered && addressInfo.real_name">
|
|
||||||
<text class="iconfont icon-zhuyi-copy"></text>
|
|
||||||
<view class="txt">此商品不支持该区域配送</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view v-if="goods.productPresell.presell_type === 2" class="event_payTime">
|
|
||||||
<view class="event_progress">
|
|
||||||
<view class="progress_step">
|
|
||||||
<text class="name color_red">定金</text>
|
|
||||||
<text
|
|
||||||
class="price color_red">¥{{ (goods.productPresellAttr.down_price * goods.cart_num).toFixed(2) }}</text>
|
|
||||||
</view>
|
|
||||||
<view class="progress_step">
|
|
||||||
<text class="name">尾款</text>
|
|
||||||
<text
|
|
||||||
class="price">¥{{ (goods.productPresellAttr.final_price * goods.cart_num).toFixed(2) }}</text>
|
|
||||||
</view>
|
|
||||||
<view class="progress_pay">
|
|
||||||
{{ goods.productPresell.final_start_time | filterDay}}开始支付尾款
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view v-else>
|
|
||||||
<view class="product-item">
|
|
||||||
<view class="img-box">
|
|
||||||
<image :src="goods.productAttr.image || goods.product.image"></image>
|
|
||||||
</view>
|
|
||||||
<view class="content">
|
|
||||||
<view class="name line1">{{goods.product.store_name}}</view>
|
|
||||||
<view class="label">{{goods.productAttr.sku}}</view>
|
|
||||||
<view class="price acea-row row-between">
|
|
||||||
<view class="acea-row row-middle">
|
|
||||||
<block v-if="order_type == 3">
|
|
||||||
¥{{goods.productAssistAttr.assist_price}}
|
|
||||||
</block>
|
|
||||||
<block v-else-if="order_type == 4">
|
|
||||||
¥{{goods.activeSku.active_price}}
|
|
||||||
</block>
|
|
||||||
<block v-else>
|
|
||||||
¥{{goods.productAttr.price}}
|
|
||||||
</block>
|
|
||||||
<text>X{{goods.cart_num}}</text>
|
|
||||||
<view v-if="goods.productAttr.show_svip_price" class="vipImg">
|
|
||||||
<image :src="`${domain}/static/images/svip.png`"></image>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="delivery_type">
|
|
||||||
<text v-if="!goods.allow_delivery">不支持快递</text>
|
|
||||||
<text v-if="!goods.allow_take">不支持到店核销</text>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="err-txt" v-if="goods.undelivered && addressInfo.real_name">
|
|
||||||
<text class="iconfont icon-zhuyi-copy"></text>
|
|
||||||
<view class="txt">此商品不支持该区域配送</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class="settlementAgreement" v-if="showProtocol">
|
|
||||||
<view class="setAgCount">
|
|
||||||
<i class="icon iconfont icon-cha" @click="showProtocol = false"></i>
|
|
||||||
<div class="title">{{agrementTtile}}</div>
|
|
||||||
<view class="content">
|
|
||||||
<jyf-parser :html="protocol" ref="article" :tag-style="tagStyle"></jyf-parser>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
</view>
|
|
||||||
<view class='wrapper'>
|
<view class='wrapper'>
|
||||||
<view class='item'>
|
<view class='item'>
|
||||||
<view>支付方式</view>
|
<view>支付方式</view>
|
||||||
@ -205,8 +102,7 @@
|
|||||||
<text @click="openDiscount">优惠明细</text>
|
<text @click="openDiscount">优惠明细</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class='settlement' style='z-index:100'
|
<view class='settlement' style='z-index:100' @tap="SubOrder">{{'提交订单'}}</view>
|
||||||
@tap="SubOrder">{{'提交订单'}}</view>
|
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<block v-if="coupon.status">
|
<block v-if="coupon.status">
|
||||||
@ -289,10 +185,10 @@
|
|||||||
import addInvoicing from '@/components/addInvoicing';
|
import addInvoicing from '@/components/addInvoicing';
|
||||||
import parser from "@/components/jyf-parser/jyf-parser";
|
import parser from "@/components/jyf-parser/jyf-parser";
|
||||||
import payPwd from "@/components/payPwd/index.vue";
|
import payPwd from "@/components/payPwd/index.vue";
|
||||||
import {
|
import {
|
||||||
orderPay,
|
orderPay,
|
||||||
orderCheck
|
orderCheck
|
||||||
} from "@/api/payment.js";
|
} from "@/api/payment.js";
|
||||||
import {
|
import {
|
||||||
mapGetters
|
mapGetters
|
||||||
} from "vuex";
|
} from "vuex";
|
||||||
@ -506,7 +402,7 @@
|
|||||||
moneyInfo: {},
|
moneyInfo: {},
|
||||||
orderData: {}, //支付参数
|
orderData: {}, //支付参数
|
||||||
sale_type: 1,
|
sale_type: 1,
|
||||||
my_money: 0,
|
my_money: 0,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
@ -525,7 +421,7 @@
|
|||||||
mounted: function() {},
|
mounted: function() {},
|
||||||
onLoad: function(options) {
|
onLoad: function(options) {
|
||||||
this.seckillId = options.seckillId
|
this.seckillId = options.seckillId
|
||||||
this.my_money = options.money;
|
this.my_money = options.money;
|
||||||
if (options.sale_type) this.sale_type = options.sale_type;
|
if (options.sale_type) this.sale_type = options.sale_type;
|
||||||
// #ifdef H5
|
// #ifdef H5
|
||||||
this.from = this.$wechat.isWeixin() ? 'weixin' : 'h5'
|
this.from = this.$wechat.isWeixin() ? 'weixin' : 'h5'
|
||||||
@ -912,11 +808,11 @@
|
|||||||
getOrderConfirm({
|
getOrderConfirm({
|
||||||
cart_id: that.cartId.split(","),
|
cart_id: that.cartId.split(","),
|
||||||
address_id: '',
|
address_id: '',
|
||||||
consumption_id:'',
|
consumption_id: '',
|
||||||
product_type: 0,
|
product_type: 0,
|
||||||
takes: that.take,
|
takes: that.take,
|
||||||
source: 999,
|
source: 999,
|
||||||
money: that.my_money,
|
money: that.my_money,
|
||||||
use_coupon: that.subCoupon,
|
use_coupon: that.subCoupon,
|
||||||
use_integral: that.use_integral
|
use_integral: that.use_integral
|
||||||
}).then(res => {
|
}).then(res => {
|
||||||
@ -1449,7 +1345,7 @@
|
|||||||
order_type: this.order_type,
|
order_type: this.order_type,
|
||||||
key: this.order_key,
|
key: this.order_key,
|
||||||
takes: this.take,
|
takes: this.take,
|
||||||
source: 999,
|
source: 999,
|
||||||
use_integral: this.use_integral,
|
use_integral: this.use_integral,
|
||||||
receipt_data: this.invoiceData,
|
receipt_data: this.invoiceData,
|
||||||
extend: this.extend,
|
extend: this.extend,
|
||||||
|
@ -346,6 +346,7 @@
|
|||||||
<!-- <home></home> -->
|
<!-- <home></home> -->
|
||||||
<payment :payMode='payMode' :pay_close="pay_close" @onChangeFun='onChangeFun' :order_id="pay_order_id"
|
<payment :payMode='payMode' :pay_close="pay_close" @onChangeFun='onChangeFun' :order_id="pay_order_id"
|
||||||
:totalPrice='totalPrice'></payment>
|
:totalPrice='totalPrice'></payment>
|
||||||
|
|
||||||
<addInvoicing ref="addInvoicing" @changeInvoiceClose="changeInvoiceClose" :invoice='invoice'></addInvoicing>
|
<addInvoicing ref="addInvoicing" @changeInvoiceClose="changeInvoiceClose" :invoice='invoice'></addInvoicing>
|
||||||
|
|
||||||
<!-- 用户复制对公账户信息 -->
|
<!-- 用户复制对公账户信息 -->
|
||||||
@ -381,42 +382,7 @@
|
|||||||
</uni-popup>
|
</uni-popup>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<style lang="scss">
|
|
||||||
.popups {
|
|
||||||
width: 640rpx;
|
|
||||||
background-color: #fff;
|
|
||||||
border-radius: 18rpx;
|
|
||||||
padding: 30rpx;
|
|
||||||
|
|
||||||
.popups-btn {
|
|
||||||
padding: 16rpx 20rpx;
|
|
||||||
background-color: #40AE36;
|
|
||||||
color: #fff;
|
|
||||||
font-size: 28rpx;
|
|
||||||
text-align: center;
|
|
||||||
border-radius: 10rpx;
|
|
||||||
margin-top: 20rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.popups-item {
|
|
||||||
display: flex;
|
|
||||||
margin-bottom: 30rpx;
|
|
||||||
|
|
||||||
.popups-item-label {
|
|
||||||
width: 160rpx;
|
|
||||||
font-size: 28rpx;
|
|
||||||
color: #282828;
|
|
||||||
text-align-last: justify;
|
|
||||||
margin-right: 40rpx;
|
|
||||||
}
|
|
||||||
|
|
||||||
.popups-item-val {
|
|
||||||
flex: 1;
|
|
||||||
color: #868686;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
<script>
|
<script>
|
||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
// | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
// | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
|
||||||
@ -541,8 +507,6 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
onLoad(options) {
|
onLoad(options) {
|
||||||
//如果是对公转账 则跳转商户订单
|
|
||||||
if (options.type == 2) this.changeSaleType(2);
|
|
||||||
if (options.sale_type) this.sale_type = options.sale_type;
|
if (options.sale_type) this.sale_type = options.sale_type;
|
||||||
if (options.status) this.orderStatus = options.status;
|
if (options.status) this.orderStatus = options.status;
|
||||||
let user = this.$store.state.app.userInfo;
|
let user = this.$store.state.app.userInfo;
|
||||||
@ -999,6 +963,41 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
|
.popups {
|
||||||
|
width: 640rpx;
|
||||||
|
background-color: #fff;
|
||||||
|
border-radius: 18rpx;
|
||||||
|
padding: 30rpx;
|
||||||
|
|
||||||
|
.popups-btn {
|
||||||
|
padding: 16rpx 20rpx;
|
||||||
|
background-color: #40AE36;
|
||||||
|
color: #fff;
|
||||||
|
font-size: 28rpx;
|
||||||
|
text-align: center;
|
||||||
|
border-radius: 10rpx;
|
||||||
|
margin-top: 20rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.popups-item {
|
||||||
|
display: flex;
|
||||||
|
margin-bottom: 30rpx;
|
||||||
|
|
||||||
|
.popups-item-label {
|
||||||
|
width: 160rpx;
|
||||||
|
font-size: 28rpx;
|
||||||
|
color: #282828;
|
||||||
|
text-align-last: justify;
|
||||||
|
margin-right: 40rpx;
|
||||||
|
}
|
||||||
|
|
||||||
|
.popups-item-val {
|
||||||
|
flex: 1;
|
||||||
|
color: #868686;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.my-order .header {
|
.my-order .header {
|
||||||
height: 260rpx;
|
height: 260rpx;
|
||||||
padding: 0 30rpx;
|
padding: 0 30rpx;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user