Parcourir la source

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

吃个甘蔗嚼一年 il y a 3 ans
Parent
révision
d9a5767bdb

+ 2
- 1
src/hotel/pages/landlord/landlord.jsx Voir le fichier

5
 import NoData from '@/components/NoData'
5
 import NoData from '@/components/NoData'
6
 import CustomNav from '@/components/CustomNav'
6
 import CustomNav from '@/components/CustomNav'
7
 import { withSubscribeMessage } from '@/utils/subscribeMessage'
7
 import { withSubscribeMessage } from '@/utils/subscribeMessage'
8
+import { TPL_MESSAGE_HOTEL_CHECK_IN } from '@/utils/constants'
8
 import HouseManage from '../../components/HouseManage/houseManage'
9
 import HouseManage from '../../components/HouseManage/houseManage'
9
 import Income from '../../components/Income/income'
10
 import Income from '../../components/Income/income'
10
 import tabList from './Roomtabbar'
11
 import tabList from './Roomtabbar'
45
   const handleTabChange = (e) => {
46
   const handleTabChange = (e) => {
46
     const { index } = e.detail
47
     const { index } = e.detail
47
     setCurrentTab(index)
48
     setCurrentTab(index)
48
-    withSubscribeMessage('hotel_check_in')
49
+    withSubscribeMessage(TPL_MESSAGE_HOTEL_CHECK_IN)
49
   }
50
   }
50
 
51
 
51
   useEffect(() => {
52
   useEffect(() => {

+ 2
- 1
src/pages/RoomOrder/index.jsx Voir le fichier

4
 import withLayout from '@/layouts'
4
 import withLayout from '@/layouts'
5
 import { getTaRoom, goToRoomForm, personSubmit } from '@/services/taRoom​'
5
 import { getTaRoom, goToRoomForm, personSubmit } from '@/services/taRoom​'
6
 import { withSubscribeMessage } from "@/utils/subscribeMessage"
6
 import { withSubscribeMessage } from "@/utils/subscribeMessage"
7
+import { TPL_MESSAGE_HOTEL_CHECK_OUT } from '@/utils/constants'
7
 import RoomForm from './components/RoomForm'
8
 import RoomForm from './components/RoomForm'
8
 import './style.less'
9
 import './style.less'
9
 
10
 
25
   const handleSubmit = (e) => {
26
   const handleSubmit = (e) => {
26
 
27
 
27
     // 订阅消息
28
     // 订阅消息
28
-    withSubscribeMessage('hotel_check_out', () => {
29
+    withSubscribeMessage(TPL_MESSAGE_HOTEL_CHECK_OUT, () => {
29
       for (let i = 0, len = formData.length; i < len; i++) {
30
       for (let i = 0, len = formData.length; i < len; i++) {
30
         const item = formData[i];
31
         const item = formData[i];
31
         if (!item.customerName || !item.customerPhone) {
32
         if (!item.customerName || !item.customerPhone) {

+ 3
- 2
src/pages/index/index.jsx Voir le fichier

7
 import { getHotelDetail } from '@/services/landlord'
7
 import { getHotelDetail } from '@/services/landlord'
8
 import { getTaRoom } from '@/services/taRoom​'
8
 import { getTaRoom } from '@/services/taRoom​'
9
 import withLayout from '@/layouts'
9
 import withLayout from '@/layouts'
10
+import { withSubscribeMessage } from '@/utils/subscribeMessage'
11
+import { TPL_MESSAGE_HOTEL_CHECK_OUT } from '@/utils/constants'
10
 import tabList from './tabbar'
12
 import tabList from './tabbar'
11
 import Guide from './tabs/Guide'
13
 import Guide from './tabs/Guide'
12
 import Mine from './tabs/Mine'
14
 import Mine from './tabs/Mine'
13
 import Recommend from './tabs/Recommend'
15
 import Recommend from './tabs/Recommend'
14
-import { withSubscribeMessage } from '@/utils/subscribeMessage'
15
 import './index.less'
16
 import './index.less'
16
 
17
 
17
 
18
 
40
     setCurrentTab(index)
41
     setCurrentTab(index)
41
 
42
 
42
     if (index === 1) {
43
     if (index === 1) {
43
-      withSubscribeMessage('hotel_check_out')
44
+      withSubscribeMessage(TPL_MESSAGE_HOTEL_CHECK_OUT)
44
     }
45
     }
45
   }
46
   }
46
   useEffect(() => {
47
   useEffect(() => {

+ 4
- 3
src/shop/pages/spread/spreadIndex.jsx Voir le fichier

2
 import CustomNav from '@/components/CustomNav'
2
 import CustomNav from '@/components/CustomNav'
3
 import { useRouter } from '@tarojs/taro'
3
 import { useRouter } from '@tarojs/taro'
4
 import { getShopList, getShopMoney, getAccount, getVerifiedOrder, setGetVerifiedOrder } from '@/services/shopBoss'
4
 import { getShopList, getShopMoney, getAccount, getVerifiedOrder, setGetVerifiedOrder } from '@/services/shopBoss'
5
-
6
-
5
+import { withSubscribeMessage } from '@/utils/subscribeMessage'
7
 import withLayout from '@/layouts'
6
 import withLayout from '@/layouts'
7
+import { TPL_MESSAGE_SHOP_PAY_SUCCESS } from '@/utils/constants'
8
 import tabList from './Shoptabbar'
8
 import tabList from './Shoptabbar'
9
 import ShopKeeper from '../../components/ShopKeeper/shopKeeper'
9
 import ShopKeeper from '../../components/ShopKeeper/shopKeeper'
10
 import Sparead from '../../components/Sparead/spreadMoney'
10
 import Sparead from '../../components/Sparead/spreadMoney'
36
     //如果context有的话代表他滚动了   那么切换tab页就置顶
36
     //如果context有的话代表他滚动了   那么切换tab页就置顶
37
     if (listRef.current?.context) {
37
     if (listRef.current?.context) {
38
       listRef.current.context.scrollTo({ top: 0 })
38
       listRef.current.context.scrollTo({ top: 0 })
39
-
40
     }
39
     }
40
+
41
+    withSubscribeMessage(TPL_MESSAGE_SHOP_PAY_SUCCESS)
41
   }
42
   }
42
   const handelTypeOrder = () => {
43
   const handelTypeOrder = () => {
43
 
44
 

+ 4
- 0
src/utils/constants.js Voir le fichier

1
+
2
+export const TPL_MESSAGE_HOTEL_CHECK_IN = "hotel_check_in";       // 民宿入住消息
3
+export const TPL_MESSAGE_HOTEL_CHECK_OUT = "hotel_check_out";     // 民宿离店消息
4
+export const TPL_MESSAGE_SHOP_PAY_SUCCESS = "shop_pay_success";   // 商铺下单成功通知