张延森 3 years ago
parent
commit
a56c22a235

BIN
src/assets/icons/housemantj/loc-o.png View File


BIN
src/assets/icons/housemantj/phone-o.png View File


+ 22
- 2
src/pages/details/foodDetails/foodDetails.jsx View File

@@ -16,7 +16,8 @@ import SpinBox from "@/components/Spin/SpinBox";
16 16
 import TabIcon from "@/components/HorTabbar/TabIcon";
17 17
 import ax from "@/assets/icons/housemantj/onlove.png";
18 18
 import yysj from "@/assets/icons/housemantj/openTime.png";
19
-import dw from "@/assets/icons/housemantj/loc.png";
19
+import dw from "@/assets/icons/housemantj/loc-o.png";
20
+import phoneImg from "@/assets/icons/housemantj/phone-o.png";
20 21
 import zhuandao from "@/assets/icons/housemantj/backTop.png";
21 22
 import titlezs from "@/assets/icons/housemantj/titleTip.png";
22 23
 import showMore from "@/assets/icons/housemantj/setMore.png";
@@ -99,6 +100,22 @@ export default withLayout((props) => {
99 100
   const log = useRef("");
100 101
   const lat = useRef("");
101 102
 
103
+
104
+  const handlePhone = () => {
105
+    if (!detail.phone) {
106
+      Taro.showToast({
107
+        title: '暂无商家联系方式',
108
+        icon: 'none',
109
+      })
110
+
111
+      return;
112
+    }
113
+
114
+    Taro.makePhoneCall({
115
+      phoneNumber: detail.phone
116
+    })
117
+  }
118
+
102 119
   useEffect(() => {
103 120
     if (id) {
104 121
       setLoading(true)
@@ -197,7 +214,10 @@ export default withLayout((props) => {
197 214
               </view>
198 215
               <view className='yysj'>
199 216
                 <image src={yysj} className='yysjImg' />
200
-                营业时间:{detail.businessHours}
217
+                <text>营业时间:{detail.businessHours}</text>
218
+                <view style={{ float: 'right', paddingLeft: '30rpx', borderLeft: '1px dotted #999' }} onClick={handlePhone}>
219
+                  <image src={phoneImg} style={{ width: '32rpx', height: '32rpx' }} />
220
+                </view>
201 221
               </view>
202 222
               <view className='dpPosition' onClick={openMap}>
203 223
                 <image src={dw} className='dwTip' />

+ 4
- 4
src/pages/details/foodDetails/foodDetails.less View File

@@ -79,11 +79,11 @@
79 79
       margin-top: 40px;
80 80
       position: relative;
81 81
       .dwTip {
82
-        width: 28px;
83
-        height: 28px;
82
+        width: 48px;
83
+        height: 48px;
84
+        top: -8px;
85
+        left: -16px;
84 86
         position: absolute;
85
-        top: 4px;
86
-        left: 0;
87 87
       }
88 88
       view {
89 89
         font-size: 24px;

+ 1
- 1
src/pages/details/mjDetails/sceneryDetails.jsx View File

@@ -1,6 +1,6 @@
1 1
 import CustomNav from '@/components/CustomNav'
2 2
 import ax from '@/assets/icons/housemantj/onlove.png'
3
-import dw from '@/assets/icons/housemantj/loc.png'
3
+import dw from '@/assets/icons/housemantj/loc-o.png'
4 4
 import titlejd from '@/assets/icons/housemantj/goodTourist.png'
5 5
 import titlems from '@/assets/icons/housemantj/goodFood.png'
6 6
 import showMore from '@/assets/icons/housemantj/setMore.png'

+ 4
- 4
src/pages/details/mjDetails/sceneryDetails.less View File

@@ -55,11 +55,11 @@
55 55
     .dpPosition {
56 56
       position: relative;
57 57
       .dwTip {
58
-        width: 28px;
59
-        height: 28px;
58
+        width: 48px;
59
+        height: 48px;
60
+        top: -8px;
61
+        left: -8px;
60 62
         position: absolute;
61
-        top: 4px;
62
-        left: 0;
63 63
       }
64 64
       .distance {
65 65
         padding-left: 38px;