|
@@ -25,7 +25,7 @@
|
|
|
|
|
|
<view class="middle">
|
|
|
<view class="middle--item" v-for="(item, index) in itemList" :key="item.src">
|
|
|
- <view class="middle--item__content" @click="navigateTo(item.url)">
|
|
|
+ <view class="middle--item__content" @click="navigateTo(item.url, item.text)">
|
|
|
<view class="middle--item__img">
|
|
|
<u-image :src="item.src" :width="item.width" :height="item.height" mode="aspectFit"></u-image>
|
|
|
</view>
|
|
@@ -89,18 +89,12 @@
|
|
|
},
|
|
|
computed: {
|
|
|
...mapState('m_user', ['userInfo', 'token']),
|
|
|
- listDebug() {
|
|
|
- return [{
|
|
|
- src: "/static/change_hotel.png",
|
|
|
- text: "选择酒店",
|
|
|
- url: '/subpkg/changeHotel/changeHotel'
|
|
|
- }]
|
|
|
- }
|
|
|
+ ...mapState("m_business", ["currentHotel"]),
|
|
|
},
|
|
|
methods: {
|
|
|
...mapMutations('m_user', ['updateUserInfo', 'updateToken']),
|
|
|
...mapMutations('m_business', ['updateCurrentHotel', 'updateIdCardInfo']),
|
|
|
- navigateTo(url) {
|
|
|
+ navigateTo(url, text) {
|
|
|
if (url !== '' && url !== null && url !== undefined) {
|
|
|
if (url === '/pages/order/order') {
|
|
|
uni.switchTab({
|
|
@@ -112,7 +106,21 @@
|
|
|
})
|
|
|
}
|
|
|
} else {
|
|
|
- uni.$showMsg('功能开发中,敬请期待')
|
|
|
+ if (text === "预约开票") {
|
|
|
+ uni.$showMsg('该酒店不支持该服务,请至前台办理')
|
|
|
+ } else if (text === "联系前台") {
|
|
|
+ uni.showModal({
|
|
|
+ title: "联系前台",
|
|
|
+ content: `将要拨打前台电话:${this.currentHotel.phone}`,
|
|
|
+ success: (res) => {
|
|
|
+ if (res.confirm) {
|
|
|
+ uni.makePhoneCall({
|
|
|
+ phoneNumber: this.currentHotel.phone,
|
|
|
+ });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
async logout() {
|