ConfirmOrder.vue 1.74 KB
<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>