瀏覽代碼

Merge branch 'dev' of http://git.ycjcjy.com/shigongli/miniapp-v2 into dev

lisen 3 年之前
父節點
當前提交
04b616ec12

+ 4
- 2
src/components/ShopUsed/index.jsx 查看文件

1
 import Taro from '@tarojs/taro'
1
 import Taro from '@tarojs/taro'
2
-import {  setGetVerifiedOrder } from '@/services/shopBoss'
3
-import { View,  Text, Image } from '@tarojs/components'
2
+import { setGetVerifiedOrder } from '@/services/shopBoss'
3
+import { View, Text, Image } from '@tarojs/components'
4
 import { useState } from 'react'
4
 import { useState } from 'react'
5
 import formatTimes from '@/utils/formatTime'
5
 import formatTimes from '@/utils/formatTime'
6
 import './style.less'
6
 import './style.less'
13
   const [buttonStyle, setButtonStyle] = useState('')
13
   const [buttonStyle, setButtonStyle] = useState('')
14
 
14
 
15
 
15
 
16
+
17
+
16
   const confirmOrder = () => {
18
   const confirmOrder = () => {
17
     setGetVerifiedOrder(verifyNo).then((e) => {
19
     setGetVerifiedOrder(verifyNo).then((e) => {
18
       Taro.showToast({
20
       Taro.showToast({

+ 1
- 2
src/pages/details/foodDetails/foodDetails.jsx 查看文件

113
   useEffect(() => {
113
   useEffect(() => {
114
     if (id) {
114
     if (id) {
115
       getShopDetail(id).then((res) => {
115
       getShopDetail(id).then((res) => {
116
-        console.log(res)
117
         setDetail(res);
116
         setDetail(res);
118
         log.current = res.locaton.toString().split(",")[0];
117
         log.current = res.locaton.toString().split(",")[0];
119
         lat.current = res.locaton.toString().split(",")[1];
118
         lat.current = res.locaton.toString().split(",")[1];
141
   useShareAppMessage(() => {
140
   useShareAppMessage(() => {
142
     return {
141
     return {
143
       title: detail.shopName,
142
       title: detail.shopName,
144
-      path: `/pages/details/foodDetails/foodDetails?id=${id}`,
143
+      path: `/pages/details/foodDetails/foodDetails?id=${id}&subOrderId=${subOrderId}`,
145
       imageUrl: detail.poster,
144
       imageUrl: detail.poster,
146
     };
145
     };
147
   });
146
   });

+ 2
- 3
src/pages/details/mjDetails/sceneryDetails.jsx 查看文件

26
   const [detail, setDetail] = useState({})
26
   const [detail, setDetail] = useState({})
27
   const [isSaved, toggleSave] = useSave(detail.isSaved, 'tourist', id)
27
   const [isSaved, toggleSave] = useSave(detail.isSaved, 'tourist', id)
28
   const [isLike, toggleLike] = useLike(detail.isLike, 'tourist', id)
28
   const [isLike, toggleLike] = useLike(detail.isLike, 'tourist', id)
29
-  const [distance, setDistance] = useState()
30
   //banner图集数组
29
   //banner图集数组
31
   const [imglist, setimglist] = useState([])
30
   const [imglist, setimglist] = useState([])
32
   const [index, setIndex] = useState(0)
31
   const [index, setIndex] = useState(0)
54
   const [recommend, setRecommend] = useState([])
53
   const [recommend, setRecommend] = useState([])
55
 
54
 
56
   const openMap = () => {
55
   const openMap = () => {
57
-    const [lng, lat] = detail.location.split(',')
56
+    const [lng, lat] = detail.locaton.split(',')
58
 
57
 
59
     Taro.openLocation({
58
     Taro.openLocation({
60
       longitude: lng - 0,
59
       longitude: lng - 0,
132
               <view className='wz'>{detail.address}</view>
131
               <view className='wz'>{detail.address}</view>
133
               <view className='dpPosition' onClick={openMap}>
132
               <view className='dpPosition' onClick={openMap}>
134
                 <image src={dw} className='dwTip' />
133
                 <image src={dw} className='dwTip' />
135
-                <view className='distance'>{distance}公里<image src={zhuandao} className="zhuandao" /></view>
134
+                <view className='distance'>{(detail.distance / 1000).toFixed(2)}公里<image src={zhuandao} className="zhuandao" /></view>
136
               </view>
135
               </view>
137
             </view>
136
             </view>
138
           </view>
137
           </view>