Commit 3495eb76 authored by mengcuiguang's avatar mengcuiguang

添加ios钻石支付

parent 2b46873e
...@@ -49,15 +49,24 @@ ...@@ -49,15 +49,24 @@
<view class="section"> <view class="section">
<view class="pack-box"> <view class="pack-box">
<view class="pack-item" <view class="pack-item"
:style="item.largeType !=='vip' ?'background: #f5f5f5;':'background: #f4c98b;'" :style="item.largeType !=='vip' ?'background: #f5f5f5;':'background: #f5f5f5;'"
:class="[{active: index==selectedIndex}]" v-for='(item, index) in vipList' :class="[{active: index==selectedIndex}]" v-for='(item, index) in vipList'
:key='index' @click="choosePack(item, index)"> :key='index' @click="choosePack(item, index)">
<view style="display: flex;flex-direction: column;align-items: center;"> <view style="display: flex;flex-direction: column;align-items: center;">
<view class="price row"> <view v-if="os=='android'" class="price row">
{{item.firstPayPrice}} {{item.firstPayPrice}}
</view> </view>
<view v-else style="display: flex;align-items: center;font-size: 40rpx;
color: #f2b068;
font-weight: 700;">
<image style="width: 50rpx;height: 50rpx;display: flex;margin-right: 10rpx;"
src="@/static/ic_zuan.png">
</image>
+{{multiply(item.firstPayPrice)}}
</view>
<view class="name row" v-if="item.title!=null&&item.title!=''"> <view class="name row" v-if="item.title!=null&&item.title!=''">
{{item.title}} {{item.title}}
</view> </view>
...@@ -137,6 +146,9 @@ ...@@ -137,6 +146,9 @@
}; };
}, },
methods: { methods: {
multiply(num) {
return parseInt(num * 10);
},
// 支付完成回调 // 支付完成回调
paySuccess(largeType) { paySuccess(largeType) {
this.$emit('paySuccess', largeType); this.$emit('paySuccess', largeType);
...@@ -200,11 +212,6 @@ ...@@ -200,11 +212,6 @@
this.handlePay(); this.handlePay();
}, },
handlePay() { handlePay() {
if (this.os == 'ios') {
message.notify('暂不支持ios支付');
return
}
let that = this; let that = this;
let vipBean = this.vipList[this.selectedIndex]; let vipBean = this.vipList[this.selectedIndex];
this.post({ this.post({
...@@ -251,47 +258,19 @@ ...@@ -251,47 +258,19 @@
} }
let that = this; let that = this;
if (this.os == 'ios') { tt.getOrderPayment({
if (!tt.canIUse('getOrderPayment.object.imId')) { orderId: oid,
message.notify('请升级抖音APP版本'); success(res) {
return that.queryOrderStatus(largeType, ttData.tidStr);
} },
fail(res) {
if (ttData.imId == null) { if (res.errNo == '4') {
message.notify('暂不支付ios支付,请更换设备'); // 4-支付取消
return
}
tt.getOrderPayment({
orderId: oid,
imId: ttData.imId,
success(res) {
that.queryOrderStatus(largeType, ttData.tidStr);
},
fail(res) {
if (res.errNo == '4') {
// 4-支付取消
}
// message.notify(res.errMsg);
},
});
} else {
tt.getOrderPayment({
orderId: oid,
success(res) {
that.queryOrderStatus(largeType, ttData.tidStr);
},
fail(res) {
if (res.errNo == '4') {
// 4-支付取消
} }
// message.notify(res.errMsg); // message.notify(res.errMsg);
}, },
}); });
}
}, },
queryOrderStatus(largeType, tid) { queryOrderStatus(largeType, tid) {
let that = this; let that = this;
......
This diff is collapsed.
...@@ -11,7 +11,15 @@ ...@@ -11,7 +11,15 @@
<view style="font-size: 26rpx;color: gray;margin-top: 16rpx;">付款时间:{{item.createtime}}</view> <view style="font-size: 26rpx;color: gray;margin-top: 16rpx;">付款时间:{{item.createtime}}</view>
<view style="font-size: 26rpx;color: gray;margin-top: 1rpx;">订单编号:{{item.orderid}}</view> <view style="font-size: 26rpx;color: gray;margin-top: 1rpx;">订单编号:{{item.orderid}}</view>
</view> </view>
<view style="display: flex;align-items: center;margin-right: 8rpx;font-size: 36rpx;color: red;"> <view v-if="item.detailChannel=='DIAMOND'"
style="display: flex;align-items: center;margin-right: 8rpx;font-size: 36rpx;color: #f2b068;">
<image style="width: 50rpx;height: 50rpx;display: flex;margin-right: 10rpx;"
src="@/static/ic_zuan.png">
</image>
{{multiply(item.balance)}}
</view>
<view v-else
style="display: flex;align-items: center;margin-right: 8rpx;font-size: 36rpx;color: red;">
{{item.balance}} {{item.balance}}
</view> </view>
</view> </view>
...@@ -35,8 +43,8 @@ ...@@ -35,8 +43,8 @@
mixins: [common], mixins: [common],
data() { data() {
return { return {
dataList: [], dataList: [],
showKefuPop:false showKefuPop: false
}; };
}, },
methods: { methods: {
...@@ -44,6 +52,9 @@ ...@@ -44,6 +52,9 @@
if (this.$refs.paging != null) { if (this.$refs.paging != null) {
this.$refs.paging.refresh(); this.$refs.paging.refresh();
} }
},
multiply(num) {
return parseInt(num * 10);
}, },
queryList(page, size) { queryList(page, size) {
this.post({ this.post({
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment