1

parent 6a8da824
......@@ -7,22 +7,22 @@
},
"pages": [ // pages 数组中第一项表示应用启动页
{
"path": "pages/index/index",
"path": "pages/shop/shop",
"style": {
"navigationBarTitleText": "小程序平台"
"navigationBarTitleText": "店铺首页",
"onReachBottomDistance": 50
}
},
{
"path": "pages/index/foodClassification",
"path": "pages/index/index",
"style": {
"navigationBarTitleText": ""
"navigationBarTitleText": "小程序平台"
}
},
{
"path": "pages/shop/shop",
"path": "pages/index/foodClassification",
"style": {
"navigationBarTitleText": "店铺首页",
"onReachBottomDistance":50
"navigationBarTitleText": ""
}
},
{
......@@ -54,8 +54,7 @@
"style": {
"navigationBarTitleText": "查看券码"
}
}
,
},
{
"path": "pages/ticket/ticket",
"style": {
......@@ -67,22 +66,19 @@
"style": {
"navigationBarTitleText": "优惠券详情"
}
}
,
},
{
"path": "pages/shop/confirmOrder",
"style": {
"navigationBarTitleText": "确认订单"
}
}
,
},
{
"path": "pages/shop/paymentSuccessful",
"style": {
"navigationBarTitleText": "支付成功"
}
}
,
},
{
"path": "pages/order/remark",
"style": {
......
......@@ -483,7 +483,7 @@ const getEvaluationPageFn = () => {
});
xma.showLoading({
title: '加载中...',
mask: true,
mask: false,
});
return getEvaluationPage({
current: params.value.current,
......
......@@ -10,12 +10,19 @@
<view class="left">
<text class="title">{{ shopDetail.shopName }}</text>
<view class="ratebox">
<wd-rate v-model="value" size="13px" space="1px" active-color="#f12929" />
<text class="rate">4.9</text>
<wd-rate
v-model="shopDetail.grade"
size="13px"
space="1px"
active-color="#f12929"
/>
<text class="rate">{{ shopDetail.grade }}</text>
</view>
<view class="ratebox">
<text>营业时间:</text>
<text class="time">6:00-22:00</text>
<text class="time">
{{ shopDetail.transactionStart }}-{{ shopDetail.transactionEnd }}
</text>
</view>
</view>
......@@ -27,14 +34,14 @@
<view class="bottom">
<image class="address" src="@/static/ticket/address.png"></image>
<view class="infobox">
<text class="addr">贵阳市南明区花果园R1区1209</text>
<text class="addr">{{ shopDetail.shopAddress }}</text>
<text>距您400米</text>
</view>
<view class="iconbox">
<image class="img" src="@/static/ticket/map.png"></image>
<text>导航到店</text>
</view>
<view class="iconbox">
<view class="iconbox" @tap="callShopPhone(shopDetail.phone)">
<image class="img" src="@/static/ticket/phone.png"></image>
<text>电话</text>
</view>
......@@ -51,10 +58,17 @@
<script setup>
import { shopCouponList } from '@/api/ticket';
import { getShopDetail } from '@/api/order';
import { getDistance } from '@/utils/common';
import Header from '@/pages/order/components/Header/index.vue';
import TicketList from '@/pages/ticket/components/TicketList/index.vue';
const value = ref(4);
onShow(() => {
// 获取位置
getLocationFn();
});
// 当前位置的经纬度
const currentLatitudeAndLongitude = ref({ latitude: 0, longitude: 0 });
const shopId = ref('1626126617850544129');
const getList = async () => {
......@@ -74,6 +88,31 @@ const getShopMailDetail = async () => {
}
};
getShopMailDetail();
/**
* 拨打商家电话
* @param {*} phoneNumber
*/
function callShopPhone(phoneNumber) {
xma.makePhoneCall({
phoneNumber, // 仅为示例
});
}
function getLocationFn() {
xma.getLocation({
type: 'wgs84',
success: function (res) {
const myLatitude = currentLatitudeAndLongitude.value.latitude;
const myLongitude = currentLatitudeAndLongitude.value.longitude;
const distance = getDistance(res.latitude, res.longitude, myLatitude, myLongitude, 1);
shopInfo.value.distance = distance;
},
fail: function (err) {
return err;
},
});
}
</script>
<style scoped lang="scss">
......
......@@ -67,7 +67,7 @@ const changeStatus = (index) => {
/**
* 获取用户统计列表
*/
const discountAmount = ref(0.00);
const discountAmount = ref(0.0);
const getStatistics = async () => {
const params = {
statuMain: currentTab.value,
......
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