|
@@ -20,7 +20,7 @@
|
|
<label class="radio"><radio value="" color="#5dbc7c" :checked="payType == 2"></radio></label>
|
|
<label class="radio"><radio value="" color="#5dbc7c" :checked="payType == 2"></radio></label>
|
|
</view>
|
|
</view>
|
|
<!-- #endif -->
|
|
<!-- #endif -->
|
|
- <view class="type-item" @click="changePayType(4)" v-if="is_zero==1">
|
|
|
|
|
|
+ <view class="type-item" @click="changePayType(4)" v-if="is_zero==1 || is_pack == 1">
|
|
<!-- <text class="icon iconfont iconyue"></text> -->
|
|
<!-- <text class="icon iconfont iconyue"></text> -->
|
|
<image src="../../static/icon/task1.png" class="icon iconfont" mode="widthFix" style="width: 40rpx;height: 40rpx;margin-right: 50rpx;"></image>
|
|
<image src="../../static/icon/task1.png" class="icon iconfont" mode="widthFix" style="width: 40rpx;height: 40rpx;margin-right: 50rpx;"></image>
|
|
<view class="con">
|
|
<view class="con">
|
|
@@ -43,9 +43,12 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
|
+ import {
|
|
|
|
+ getUserInfo,
|
|
|
|
+ } from '@/api/user.js';
|
|
import { balance } from '@/api/wallet.js';
|
|
import { balance } from '@/api/wallet.js';
|
|
import { createOrderkey,computedOrderkey,orderPay } from '@/api/order.js';
|
|
import { createOrderkey,computedOrderkey,orderPay } from '@/api/order.js';
|
|
-import { mapState } from 'vuex';
|
|
|
|
|
|
+import { mapState,mapMutations } from 'vuex';
|
|
// #ifdef H5
|
|
// #ifdef H5
|
|
import weichatObj from '@/plugin/jweixin-module/index.js';
|
|
import weichatObj from '@/plugin/jweixin-module/index.js';
|
|
// #endif
|
|
// #endif
|
|
@@ -66,7 +69,8 @@ export default {
|
|
froms: '', //保存h5中数据来源对象
|
|
froms: '', //保存h5中数据来源对象
|
|
// #endif
|
|
// #endif
|
|
pinkid: '' ,//保存拼团商品id
|
|
pinkid: '' ,//保存拼团商品id
|
|
- is_zero: 0
|
|
|
|
|
|
+ is_zero: 0,
|
|
|
|
+ is_pack: 0,
|
|
};
|
|
};
|
|
},
|
|
},
|
|
computed: {
|
|
computed: {
|
|
@@ -98,15 +102,21 @@ export default {
|
|
this.pinkid = options.pinkid;
|
|
this.pinkid = options.pinkid;
|
|
}
|
|
}
|
|
// 载入消费积分
|
|
// 载入消费积分
|
|
- balance({}).then(({ data }) => {
|
|
|
|
|
|
+ getUserInfo().then(({ data }) => {
|
|
// 获取消费积分
|
|
// 获取消费积分
|
|
this.now_money = data.now_money;
|
|
this.now_money = data.now_money;
|
|
|
|
+ console.log(data,'data');
|
|
|
|
+ this.setUserInfo(data);
|
|
});
|
|
});
|
|
if(options.is_zero) {
|
|
if(options.is_zero) {
|
|
this.is_zero = options.is_zero
|
|
this.is_zero = options.is_zero
|
|
}
|
|
}
|
|
|
|
+ if(options.is_pack) {
|
|
|
|
+ this.is_pack = options.is_pack
|
|
|
|
+ }
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
+ ...mapMutations('user', ['setUserInfo']),
|
|
//选择支付方式
|
|
//选择支付方式
|
|
changePayType(type) {
|
|
changePayType(type) {
|
|
this.payType = type;
|
|
this.payType = type;
|
|
@@ -284,7 +294,7 @@ export default {
|
|
|
|
|
|
let data = {
|
|
let data = {
|
|
is_zero: obj.is_zero,
|
|
is_zero: obj.is_zero,
|
|
- is_pack: prepage.is_pack,//是否礼包商品
|
|
|
|
|
|
+ is_pack: obj.is_pack,//是否礼包商品
|
|
real_name: prepage.addressData.real_name, //联系人名称
|
|
real_name: prepage.addressData.real_name, //联系人名称
|
|
phone: prepage.addressData.phone, //联系人号码
|
|
phone: prepage.addressData.phone, //联系人号码
|
|
couponId: prepage.couponChecked.id, //优惠券编号
|
|
couponId: prepage.couponChecked.id, //优惠券编号
|