Commit 328cbcb3 authored by mengcuiguang's avatar mengcuiguang

代码优化

parent ef43d451
...@@ -54,10 +54,19 @@ ...@@ -54,10 +54,19 @@
: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>
...@@ -129,6 +138,9 @@ ...@@ -129,6 +138,9 @@
}; };
}, },
methods: { methods: {
multiply(num) {
return parseInt(num * 10);
},
// 支付完成回调 // 支付完成回调
paySuccess(largeType) { paySuccess(largeType) {
this.$emit('paySuccess', largeType); this.$emit('paySuccess', largeType);
...@@ -243,13 +255,12 @@ ...@@ -243,13 +255,12 @@
} }
let that = this; let that = this;
tt.getOrderPayment({ tt.getOrderPayment({
orderId: oid, orderId: oid,
success(res) { success(res) {
that.queryOrderStatus(largeType, ttData.tidStr); that.queryOrderStatus(largeType, ttData.tidStr);
}, },
fail(res) { fail(res) {},
},
}); });
}, },
queryOrderStatus(largeType, tid) { queryOrderStatus(largeType, tid) {
......
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