trade:完善砍价的下单流程
parent
ae95b0def7
commit
7ce062229f
|
@ -25,10 +25,10 @@
|
||||||
<div class="end" v-else>活动已结束</div>
|
<div class="end" v-else>活动已结束</div>
|
||||||
<div class="acea-row row-middle row-right">
|
<div class="acea-row row-middle row-right">
|
||||||
<div class="bnt bg-color-red" v-if="item.status === 2 && !item.orderId" @click="goConfirm(item)">
|
<div class="bnt bg-color-red" v-if="item.status === 2 && !item.orderId" @click="goConfirm(item)">
|
||||||
去付款
|
去下单
|
||||||
</div>
|
</div>
|
||||||
<div class="bnt bg-color-red" v-if="item.status === 2 && item.orderId && !item.payStatus" @click="goPay(item.surplusPrice,item.orderNo)">
|
<div class="bnt bg-color-red" v-if="item.status === 2 && item.orderId && !item.payStatus" @click="goPay(item.payOrderId)">
|
||||||
立即付款
|
去付款
|
||||||
</div>
|
</div>
|
||||||
<div class="bnt bg-color-red" v-if="item.status === 1" @click="goDetail(item.id)">
|
<div class="bnt bg-color-red" v-if="item.status === 1" @click="goDetail(item.id)">
|
||||||
继续砍价
|
继续砍价
|
||||||
|
@ -46,7 +46,6 @@
|
||||||
<emptyPage title="暂无砍价记录~"></emptyPage>
|
<emptyPage title="暂无砍价记录~"></emptyPage>
|
||||||
</block>
|
</block>
|
||||||
<home></home>
|
<home></home>
|
||||||
<payment :payMode='payMode' :pay_close="pay_close" @onChangeFun='onChangeFun' :order_id="pay_order_id" :totalPrice='totalPrice'></payment>
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
@ -56,9 +55,9 @@
|
||||||
import * as BargainApi from '@/api/promotion/bargain.js';
|
import * as BargainApi from '@/api/promotion/bargain.js';
|
||||||
import Loading from "@/components/Loading";
|
import Loading from "@/components/Loading";
|
||||||
import home from '@/components/home';
|
import home from '@/components/home';
|
||||||
import payment from '@/components/payment';
|
|
||||||
import { mapGetters } from "vuex";
|
import { mapGetters } from "vuex";
|
||||||
import * as Util from '@/utils/util.js';
|
import * as Util from '@/utils/util.js';
|
||||||
|
import { toLogin } from '@/libs/login.js';
|
||||||
export default {
|
export default {
|
||||||
name: "BargainRecord",
|
name: "BargainRecord",
|
||||||
components: {
|
components: {
|
||||||
|
@ -66,7 +65,6 @@
|
||||||
Loading,
|
Loading,
|
||||||
emptyPage,
|
emptyPage,
|
||||||
home,
|
home,
|
||||||
payment
|
|
||||||
},
|
},
|
||||||
props: {},
|
props: {},
|
||||||
computed: mapGetters(['isLogin', 'userInfo', 'uid']),
|
computed: mapGetters(['isLogin', 'userInfo', 'uid']),
|
||||||
|
@ -100,9 +98,6 @@
|
||||||
number: 0
|
number: 0
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
pay_close: false,
|
|
||||||
pay_order_id: '',
|
|
||||||
totalPrice: '0'
|
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
onLoad: function() {
|
onLoad: function() {
|
||||||
|
@ -188,42 +183,12 @@
|
||||||
/**
|
/**
|
||||||
* 打开支付组件
|
* 打开支付组件
|
||||||
*/
|
*/
|
||||||
goPay(pay_price, order_id) {
|
goPay: function (payOrderId) {
|
||||||
this.$set(this, 'pay_close', true);
|
const returnUrl = encodeURIComponent('/pages/activity/bargain/index');
|
||||||
this.$set(this, 'pay_order_id', order_id);
|
uni.navigateTo({
|
||||||
this.$set(this, 'totalPrice', pay_price);
|
url: `/pages/goods/cashier/index?order_id=${payOrderId}&returnUrl=${returnUrl}`
|
||||||
},
|
});
|
||||||
/**
|
},
|
||||||
* 事件回调
|
|
||||||
*/
|
|
||||||
onChangeFun: function(e) {
|
|
||||||
let opt = e;
|
|
||||||
let action = opt.action || null;
|
|
||||||
let value = opt.value != undefined ? opt.value : null;
|
|
||||||
(action && this[action]) && this[action](value);
|
|
||||||
},
|
|
||||||
/**
|
|
||||||
* 关闭支付组件
|
|
||||||
*/
|
|
||||||
payClose: function() {
|
|
||||||
this.pay_close = false;
|
|
||||||
},
|
|
||||||
/**
|
|
||||||
* 支付成功回调
|
|
||||||
*/
|
|
||||||
pay_complete: function() {
|
|
||||||
this.status = false;
|
|
||||||
this.page = 1;
|
|
||||||
this.$set(this, 'bargain', []);
|
|
||||||
this.$set(this, 'pay_close', false);
|
|
||||||
this.getBargainUserList();
|
|
||||||
},
|
|
||||||
/**
|
|
||||||
* 支付失败回调
|
|
||||||
*/
|
|
||||||
pay_fail: function() {
|
|
||||||
this.pay_close = false;
|
|
||||||
},
|
|
||||||
|
|
||||||
fen2yuan(price) {
|
fen2yuan(price) {
|
||||||
return Util.fen2yuan(price)
|
return Util.fen2yuan(price)
|
||||||
|
|
Loading…
Reference in New Issue