李志伟 3 years ago
parent
commit
a72a80e181

+ 16
- 7
src/components/foodCards/RecommendedCard/index.jsx View File

@@ -22,14 +22,23 @@ export default (props) => {
22 22
     Taro.navigateTo({ url: `/pages/details/foodDetails/foodDetails?id=${targetId}` })
23 23
   }
24 24
   const handlePayClick = (e) => {
25
-    saveTravel(travelId, { dayOrder: dayNumber, targetId: targetId, targetType: targetType }).then((res) => {
26
-      Taro.showToast({
27
-        title: '添加成功',
28
-        icon: 'none',
29
-        duration: 1000
30
-      })
31
-      handelAddTravel()
25
+    Taro.showModal({
26
+      title: '提示',
27
+      content: '确定要添加吗',
28
+      success: function (res) {
29
+        if (res.confirm) {
30
+          saveTravel(travelId, { dayOrder: dayNumber, targetId: targetId, targetType: targetType }).then((res) => {
31
+            Taro.showToast({
32
+              title: '添加成功',
33
+              icon: 'none',
34
+              duration: 1000
35
+            })
36
+            handelAddTravel()
37
+          })
38
+        }
39
+      }
32 40
     })
41
+    
33 42
   }
34 43
   const PayAction = <Action.Icon icon={add} text='增加' onClick={handlePayClick} />
35 44
   return (

+ 2
- 2
src/pages/Travel/customizedTravel/index.jsx View File

@@ -53,7 +53,7 @@ export default (props) => {
53 53
         <CustomNav title='定制行程' />
54 54
       </View>
55 55
       <CustomDay showCutover={showCutover} onClose={onClose} />
56
-      <TwoModel showCutover={showCutoverTwo} onClose={onCloseTwo} dayNum2={dayNum2} dayNum1={dayNum1}/>
56
+      <TwoModel showCutover={showCutoverTwo} onClose={onCloseTwo} dayNum2={dayNum2} dayNum1={dayNum1} />
57 57
       <View className='index-container custom'>
58 58
         <View className='selectbtn'>
59 59
           <Image src={oneDay} className='img' onClick={handelDay}></Image>
@@ -64,4 +64,4 @@ export default (props) => {
64 64
       </View>
65 65
     </View>
66 66
   )
67
-}
67
+}