Compare commits

..

No commits in common. "44a4d393c65c550a667b1af78f94184e2bf7486f" and "134e9cbe6ef2b58f900e17957d59ec072af2075f" have entirely different histories.

3 changed files with 6 additions and 19 deletions

View File

@ -30,12 +30,9 @@
<view class="fz28 tc l-h-18 m-t-12">{{sku.name}}</view> <view class="fz28 tc l-h-18 m-t-12">{{sku.name}}</view>
<view class="flex1 flex msb mac"> <view class="flex1 flex msb mac">
<view class="m-l-12 fcm"> <view class="m-l-12 fcm">
<text v-if="priceDifference(sku.id)<0"> <text v-if="priceDifference(sku.id)!==0">
{{priceDifference(sku.id) | formatPrice}} {{priceDifference(sku.id) | formatPrice}}
</text> </text>
<text v-else-if="priceDifference(sku.id)>0">
+{{priceDifference(sku.id) | formatPrice}}
</text>
</view> </view>
<view class="border rad-c m-r-12" :class="isSel(sku.id)?'border-m bg-m':''" <view class="border rad-c m-r-12" :class="isSel(sku.id)?'border-m bg-m':''"
style="width: 40rpx;height: 40rpx;"> style="width: 40rpx;height: 40rpx;">

View File

@ -127,7 +127,7 @@
}, },
// //
total() { total() {
return Number(this.totalPrice(this.$store.state.cartList)) return this.totalPrice(this.$store.state.cartList)
}, },
// //
transportPrice() { transportPrice() {
@ -149,7 +149,7 @@
}, },
// //
fullPrice() { fullPrice() {
return Number(this.total) + Number(this.transportPrice) + Number(this.packPrice) return this.total + this.transportPrice + this.packPrice
}, },
// //
userInfo() { userInfo() {
@ -182,12 +182,11 @@
}).then(res => { }).then(res => {
// //
if (res.data.status === 1) { if (res.data.status === 1) {
let fullPrice = String(this.fullPrice)
// //
this.$store.commit('clearCartList') this.$store.commit('clearCartList')
// //
uni.navigateTo({ uni.navigateTo({
url: `/pages/shop/pay?order_sn=${res.data.order_sn}&fullPrice=${fullPrice}` url: `/pages/shop/pay?order_sn=${res.data.order_sn}`
}); });
} else if (res.data.status === -1) { } else if (res.data.status === -1) {
uni.removeStorage({ // uni.removeStorage({ //

View File

@ -7,32 +7,23 @@
</view> </view>
</u-navbar> </u-navbar>
<!-- 价格 --> <!-- 价格 -->
<view>{{fullPrice | formatPrice}}</view> <view></view>
<button @click="pay" type="primary" style="margin-top:200rpx;">确认支付</button> <button @click="pay" type="primary" style="margin-top:200rpx;">确认支付</button>
</view> </view>
</template> </template>
<script> <script>
import {
formatPrice
} from '@/utils/index.js'
export default { export default {
data() { data() {
return { return {
order_sn: '', // order_sn: '' //
fullPrice: 0,//
} }
}, },
onLoad(options) { onLoad(options) {
this.order_sn = options.order_sn; // this.order_sn = options.order_sn; //
this.fullPrice = Number(options.fullPrice); //
}, },
computed(){ computed(){
},
filters: {
formatPrice, //
}, },
methods: { methods: {
// //