吃个甘蔗嚼一年 3 년 전
부모
커밋
27e8124e1d
3개의 변경된 파일32개의 추가작업 그리고 18개의 파일을 삭제
  1. 17
    5
      src/pages/TobeShop/index.jsx
  2. 4
    3
      src/pages/TobeShop/style.less
  3. 11
    10
      src/pages/details/foodDetails/foodDetails.jsx

+ 17
- 5
src/pages/TobeShop/index.jsx 파일 보기

1
+import Taro from "@tarojs/taro";
2
+import { useState, useEffect } from "react";
1
 import withLayout from "@/layouts";
3
 import withLayout from "@/layouts";
2
-
3
 import CustomNav from "@/components/CustomNav";
4
 import CustomNav from "@/components/CustomNav";
5
+import { getShopDetail, getShopPackage, getExtendContent } from '@/services/home'
4
 import Popup from "@/components/Popup";
6
 import Popup from "@/components/Popup";
5
-import { useState, useEffect } from "react";
6
 import LocationBig from "@/assets/icons/UserCenter/LocationBig.png";
7
 import LocationBig from "@/assets/icons/UserCenter/LocationBig.png";
7
 import Perfection from "@/assets/icons/UserCenter/Perfection.png";
8
 import Perfection from "@/assets/icons/UserCenter/Perfection.png";
8
 import Check_OK from "@/assets/icons/UserCenter/Check_OK.png";
9
 import Check_OK from "@/assets/icons/UserCenter/Check_OK.png";
14
 import { Button, Icon, Text, Textarea } from "@tarojs/components";
15
 import { Button, Icon, Text, Textarea } from "@tarojs/components";
15
 import { getVerifyTargetList, putVerifyTarget } from "@/services/payOrder";
16
 import { getVerifyTargetList, putVerifyTarget } from "@/services/payOrder";
16
 import formatTime from '@/utils/formatTime'
17
 import formatTime from '@/utils/formatTime'
18
+
17
 import "./style.less";
19
 import "./style.less";
18
-import Taro from "@tarojs/taro";
19
 
20
 
20
 export default withLayout((props) => {
21
 export default withLayout((props) => {
21
   const { router, person } = props;
22
   const { router, person } = props;
23
+  console.log("🚀 ~ file: index.jsx ~ line 22 ~ withLayout ~ props", props)
22
   const { id, subOrderId } = props.router.params;
24
   const { id, subOrderId } = props.router.params;
23
   const [showDialog, setShowDialog] = useState(false);
25
   const [showDialog, setShowDialog] = useState(false);
24
   //核销
26
   //核销
25
   const [Consumption, setConsumption] = useState(false);
27
   const [Consumption, setConsumption] = useState(false);
26
 
28
 
27
   const [checked, setChecked] = useState();
29
   const [checked, setChecked] = useState();
30
+  const [shopContent, setShopContent] = useState([])
28
 
31
 
32
+  const [list, setList] = useState([]);
33
+
34
+
35
+  const getShop = () => {
36
+    getShopDetail(id).then(e => {
37
+      setShopContent(e)
38
+
39
+    })
40
+  }
29
 
41
 
30
 
42
 
31
-  const [list, setList] = useState([]);
32
 
43
 
33
   const getList = (params) => {
44
   const getList = (params) => {
34
     getVerifyTargetList({
45
     getVerifyTargetList({
51
 
62
 
52
   useEffect(() => {
63
   useEffect(() => {
53
     getList();
64
     getList();
65
+    getShop();
54
   }, []);
66
   }, []);
55
 
67
 
56
   const ShowMoldeOn = () => {
68
   const ShowMoldeOn = () => {
123
         <view className="position-header">
135
         <view className="position-header">
124
           <image className="position-LocationBig" src={LocationBig} />
136
           <image className="position-LocationBig" src={LocationBig} />
125
           <text cla="position-LocationBig-text">
137
           <text cla="position-LocationBig-text">
126
-            当前所在店铺:SEOUL·创意韩国料理
138
+            当前所在店铺:{shopContent?.shopName || []}
127
           </text>
139
           </text>
128
         </view>
140
         </view>
129
         <view className="shop-image">
141
         <view className="shop-image">

+ 4
- 3
src/pages/TobeShop/style.less 파일 보기

89
       position: absolute;
89
       position: absolute;
90
       width: auto;
90
       width: auto;
91
       height: 44.3px;
91
       height: 44.3px;
92
-      position: absolute;
93
       left: 200px;
92
       left: 200px;
94
       top: 28px;
93
       top: 28px;
95
       font-size: 20px;
94
       font-size: 20px;
109
 
108
 
110
     .left-complete-one {
109
     .left-complete-one {
111
       // padding-left: 64px;
110
       // padding-left: 64px;
111
+      width: 560px;
112
       padding-top: 87px;
112
       padding-top: 87px;
113
       padding-bottom: 43px;
113
       padding-bottom: 43px;
114
       position: relative;
114
       position: relative;
141
         width: 145px;
141
         width: 145px;
142
         height: 44px;
142
         height: 44px;
143
         position: absolute;
143
         position: absolute;
144
-        margin-left: 75px;
144
+        margin-left: 88px;
145
         top: 22px;
145
         top: 22px;
146
       }
146
       }
147
       .left-viewText {
147
       .left-viewText {
162
         border-radius: 24px;
162
         border-radius: 24px;
163
         overflow: hidden;
163
         overflow: hidden;
164
         position: relative;
164
         position: relative;
165
+        flex: none;
165
         .image-1 {
166
         .image-1 {
166
           width: 100%;
167
           width: 100%;
167
           height: 145px;
168
           height: 145px;
260
     background-repeat: no-repeat;
261
     background-repeat: no-repeat;
261
     width: 129px;
262
     width: 129px;
262
     border-radius: 0 15px 15px 0;
263
     border-radius: 0 15px 15px 0;
263
-    position: relative;
264
+    // position: relative;
264
     //右面部分
265
     //右面部分
265
     .right-content {
266
     .right-content {
266
       // width: 100px;
267
       // width: 100px;

+ 11
- 10
src/pages/details/foodDetails/foodDetails.jsx 파일 보기

15
 import good from '@/assets/icons/housemantj/景点爆赞.png'
15
 import good from '@/assets/icons/housemantj/景点爆赞.png'
16
 import baozan from '@/assets/icons/housemantj/爆赞.png'
16
 import baozan from '@/assets/icons/housemantj/爆赞.png'
17
 import weibaozan from '@/assets/icons/housemantj/未赞.png'
17
 import weibaozan from '@/assets/icons/housemantj/未赞.png'
18
-import Taro,{ useShareAppMessage } from '@tarojs/taro'
18
+import Taro, { useShareAppMessage } from '@tarojs/taro'
19
 import useSave from "@/utils/hooks/useSave"
19
 import useSave from "@/utils/hooks/useSave"
20
 import useLike from "@/utils/hooks/useLike"
20
 import useLike from "@/utils/hooks/useLike"
21
 import Extend from '../components/Extend/extend'
21
 import Extend from '../components/Extend/extend'
35
   }, [id, subOrderId])
35
   }, [id, subOrderId])
36
   //商铺基础信息
36
   //商铺基础信息
37
   const [detail, setDetail] = useState({})
37
   const [detail, setDetail] = useState({})
38
-  console.log("🚀 ~ file: foodDetails.jsx ~ line 38 ~ withLayout ~ setDetail", setDetail)
39
   //商铺套餐
38
   //商铺套餐
40
   const [spackage, setPackage] = useState([])
39
   const [spackage, setPackage] = useState([])
41
   //banner图集数组
40
   //banner图集数组
45
     setIndex(e.detail.current)
44
     setIndex(e.detail.current)
46
   }
45
   }
47
 
46
 
47
+
48
+
48
   const [isSaved, toggleSave] = useSave(detail.isSaved, 'shop', id)
49
   const [isSaved, toggleSave] = useSave(detail.isSaved, 'shop', id)
49
   const [isLike, toggleLike] = useLike(detail.isLike, 'shop', id)
50
   const [isLike, toggleLike] = useLike(detail.isLike, 'shop', id)
50
 
51
 
108
     })
109
     })
109
   }, [])
110
   }, [])
110
   const star = parseFloat(((detail.sweetScore + detail.environmentScore + detail.serviceScore) / 3).toFixed(1));
111
   const star = parseFloat(((detail.sweetScore + detail.environmentScore + detail.serviceScore) / 3).toFixed(1));
111
-  
112
+
112
   // 分享
113
   // 分享
113
-  useShareAppMessage(()=>{
114
-      return {
115
-        title: detail.shopName,
116
-        path: `/pages/details/foodDetails/foodDetails?id=${id}`,
117
-        imageUrl: detail.poster,
118
-      }
119
-    
114
+  useShareAppMessage(() => {
115
+    return {
116
+      title: detail.shopName,
117
+      path: `/pages/details/foodDetails/foodDetails?id=${id}`,
118
+      imageUrl: detail.poster,
119
+    }
120
+
120
   })
121
   })
121
 
122
 
122
   return (
123
   return (