ConfirmOrder.vue
1.74 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
<template>
<view class="page">
<view class="order-status-img">
<image src="../../static/img/img1.jpg" mode="widthFix"></image>
</view>
<!-- 订单状态 -->
<view class="order-status">
<view class="shipping-address">
<view class="name">
<view>
<view class="name-one-omit">{{data.title}}</view>
</view>
</view>
<view class="content" v-html="data.content"></view>
</view>
<!-- 商品 -->
<view class="order-goods">
<image v-for="item in data.image" :src="item==null?'../../static/img/img2.jpg':(BASE_URL+item.url)"
mode="widthFix"></image>
</view>
</view>
<!-- 底部按钮 -->
<view class="footer-btn">
<view class="del" @click="freeTell">
<text>联系电话</text>
<image src="../../static/phone.png"></image>
</view>
<view class="btn" @click="freeTell">
<text class="action">立即咨询</text>
</view>
</view>
</view>
</template>
<script>
import BASE_URL from '@/common/config.js'
export default {
data() {
return {
BASE_URL,
data: [],
phone: ""
};
},
onLoad() {
this.GetTrue();
this.GetPhone();
},
methods: {
GetTrue() {
this.API.GetTrue().then(res => {
this.data = res.data;
});
},
GetPhone() {
this.API.GetPhone().then(res => {
this.phone = res.data.phone;
});
},
freeTell() {
wx.makePhoneCall({
phoneNumber: this.phone, //仅为示例,并非真实的电话号码
success: function() {
console.log("拨打电话成功!")
},
fail: function() {
console.log("拨打电话失败!")
}
})
},
}
}
</script>
<style scoped lang="scss">
@import 'ConfirmOrder.scss';
</style>