1

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