瀏覽代碼

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

李志伟 3 年之前
父節點
當前提交
3f7f903944
共有 2 個檔案被更改,包括 31 行新增25 行删除
  1. 28
    24
      src/components/foodCards/ShopNoteCard/index.jsx
  2. 3
    1
      src/pages/MineUserAll/MyTravel/index.jsx

+ 28
- 24
src/components/foodCards/ShopNoteCard/index.jsx 查看文件

@@ -60,6 +60,7 @@ export default (props) => {
60 60
 
61 61
 
62 62
   const handleColumn = e => {
63
+    console.log("🚀 ~ file: index.jsx ~ line 63 ~ e", e)
63 64
     // console.log(e.detail.column);
64 65
 
65 66
     const { column, value } = e.detail
@@ -77,36 +78,38 @@ export default (props) => {
77 78
   const d = day.getDate();
78 79
   let number = 0
79 80
   const onChange = (e) => {
80
-
81
+    console.log("🚀 ~ file: index.jsx ~ line 63 ~ e", e)
81 82
 
82 83
     if (travelMine?.records == '') {
83 84
 
84 85
 
85
-      console.log('没有行程');
86
-      newTravelMine({ title: `我的行程 ${y}-${m}-${d}` }).then(res => {
87
-        handelNoteList()
88
-        // 首先创建一个行程,然后才能拿到下面的这些数据
86
+      // console.log('没有行程');
87
+      // newTravelMine({ title: `我的行程 ${y}-${m}-${d}` }).then(res => {
88
+      //   handelNoteList()
89
+      //   // 首先创建一个行程,然后才能拿到下面的这些数据
89 90
 
90
-        const [firstInx, secondInx] = e.detail?.value
91
+      //   const [firstInx, secondInx] = e.detail?.value
91 92
 
92
-        const firstValue = valueList[firstInx] || ''
93
+      //   const firstValue = valueList[firstInx] || ''
93 94
 
94
-        const secondValue = numberTrave[secondInx] || ''
95
+      //   const secondValue = numberTrave[secondInx] || ''
95 96
 
96
-        const { travelId } = firstValue
97
+      //   const { travelId } = firstValue
97 98
 
98
-        //行程内容
99
-        const { i } = secondValue//天数
100
-        // saveTravel({})
101
-        saveTravel(res.travelId, { dayOrder: i, targetId: targetId, targetType: targetType }).then((val) => {
102
-          Taro.showToast({
103
-            title: '添加成功',
104
-            icon: 'none',
105
-            duration: 1000
106
-          })
107
-          resourceList(travelId)
108
-        })
109
-      })
99
+      //   //行程内容
100
+      //   const { id } = secondValue//天数
101
+      //   // saveTravel({})
102
+      //   saveTravel(res.travelId, { dayOrder: id, targetId: targetId, targetType: targetType }).then((val) => {
103
+      //     Taro.showToast({
104
+      //       title: '添加成功',
105
+      //       icon: 'none',
106
+      //       duration: 1000
107
+      //     })
108
+      //     resourceList(travelId)
109
+      //   })
110
+      // })
111
+
112
+      return;
110 113
     } else {
111 114
       console.log('有行程', e);
112 115
       const [firstInx, secondInx] = e.detail.value
@@ -117,10 +120,12 @@ export default (props) => {
117 120
 
118 121
       const { travelId } = firstValue
119 122
 
123
+
120 124
       //行程内容
121
-      const { i } = secondValue//天数
125
+      const { id } = secondValue//天数
126
+      console.log("🚀 ~ file: index.jsx ~ line 102 ~ newTravelMine ~ secondValue", secondValue)
122 127
 
123
-      saveTravel(travelId, { dayOrder: i, targetId: targetId, targetType: targetType }).then((res) => {
128
+      saveTravel(travelId, { dayOrder: id, targetId: targetId, targetType: targetType }).then((res) => {
124 129
         Taro.showToast({
125 130
           title: '添加成功',
126 131
           icon: 'none',
@@ -154,7 +159,6 @@ export default (props) => {
154 159
     }
155 160
 
156 161
 
157
-
158 162
     // Taro.navigateTo({ url: `/pages/PayOrder/index?packageId=${item.packageId}&scene=${scene || ''}&subOrderId=${subOrderId}&id=${id}` })
159 163
 
160 164
   }

+ 3
- 1
src/pages/MineUserAll/MyTravel/index.jsx 查看文件

@@ -25,16 +25,18 @@ export default withLayout((props) => {
25 25
         if (res.confirm) {
26 26
 
27 27
           deleteTravel(e.travelId).then(r => {
28
+            getList()
29
+
28 30
             Taro.showToast({
29 31
               title: '删除成功',
30 32
               icon: 'none',
31 33
               duration: 1000
32 34
             })
33
-            getList()
34 35
 
35 36
           })
36 37
 
37 38
         } else if (res.cancel) {
39
+          getList()
38 40
 
39 41
 
40 42
         }