Blame view

pages/OrderDetails/OrderDetails.vue 2.81 KB
c7add6cf   “wangming”   初始版本开发完毕
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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
  <template>

  	<view class="page">

  		<!-- 订单状态 -->

  		<view class="order-status">

  			<image :src="info.cover[0]==null?'../../static/img/head.jpg':(BASE_URL+info.cover[0].url)" mode="widthFix">

  			</image>

  			<view class="shipping-address">

  				<view class="name">

  					<view>

  						<view class="name-one-omit">{{info.name}}</view>

  						<view class="name-price">¥{{info.price}}</view>

  					</view>

  					<view>

  						<view>

  							<view class="cart-box-btn" @click="freeTell">

  								<image src="../../static/kefu.png"></image>联系客服

  							</view>

  						</view>

  						<view class="name-num">{{info.browse}}人浏览</view>

  					</view>

  				</view>

  				<view class="content two-omit" v-html="info.content">

  				</view>

  			</view>

  		</view>

  

  		<!-- <view class="sex-list">

  			<view class="title">

  				<text>产品类型</text>

  			</view>

  			<view class="more-content">

  				<text class="content">{{sexText}}</text>

  				<text class="iconfont icon-more more"></text>

  			</view>

  			<view class="picker">

  				<picker @change="sexPickerChange" :value="sexIndex" :range="sexArray">

  					<view class="uni-input" style="height: 100rpx;">{{sexText}}</view>

  				</picker>

  			</view>

  		</view> -->

  		<!-- 商品 -->

  		<view class="order-goods">

  			<image v-for="item in info.images" :src="BASE_URL+item.url" mode="widthFix"></image>

  		</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,

  				sexText: '请选择产品类型',

  				sexArray: ['类型1', '类型2', '类型3'],

  				sexIndex: 0,

  				id: 0,

  				info: {},

  				phone: ""

  			};

  		},

  		onLoad(e) {

  			this.id = e.id;

  			this.phone = e.phone;

  			this.GettbgoodscompanyById();

  		},

  		methods: {

  			freeTell() {

  				wx.makePhoneCall({

  					phoneNumber: this.phone , //仅为示例,并非真实的电话号码

  					success: function() {

  						console.log("拨打电话成功!")

  					},

  					fail: function() {

  						console.log("拨打电话失败!")

  					}

  				})

  			},

  			sexPickerChange(e) {

  				this.sexIndex = e.detail.value;

  				this.sexText = this.sexArray[this.sexIndex];

  			},

  			GettbgoodscompanyById() {

  				this.API.GettbgoodscompanyById(this.id).then(res => {

  					this.info = res.data;

  				});

  			},

  			/**

  			 * 售后点击

  			 */

  			onApplyAftersales() {

  				uni.navigateTo({

  					url: '/pages/AfterSaleType/AfterSaleType',

  				})

  			}

  		}

  	}

  </script>

  

  <style scoped lang="scss">

  	@import 'OrderDetails.scss';

  </style>