Browse Source

上传

master
前端-胡立永 7 months ago
parent
commit
f016da3b79
11 changed files with 50 additions and 15 deletions
  1. +2
    -2
      App.vue
  2. +1
    -1
      components/base/tabbar.vue
  3. +4
    -4
      components/tourGuide/locations.vue
  4. +29
    -0
      interceptor/interceptor.js
  5. +2
    -0
      main.js
  6. +1
    -0
      pages/index/index.vue
  7. +1
    -1
      pages_order/auth/wxUserInfo.vue
  8. +4
    -4
      pages_order/order/orderDetail.vue
  9. +5
    -1
      pages_order/order/orderSubscribe.vue
  10. +1
    -1
      pages_order/service/heritagePath.vue
  11. +0
    -1
      store/store.js

+ 2
- 2
App.vue View File

@ -9,8 +9,8 @@
this.$store.commit('getSpotList')
setInterval(() => {
// this.$store.commit('getPosition')
}, 5000)
this.$store.commit('getPosition')
}, 20000)
},
onHide: function() {
}


+ 1
- 1
components/base/tabbar.vue View File

@ -53,7 +53,7 @@
if(index == this.select){
return
}
uni.redirectTo({
uni.reLaunch({
url: item.pagePath
})
},


+ 4
- 4
components/tourGuide/locations.vue View File

@ -69,7 +69,7 @@
v-if="show && spotGuide.length > 0">
<view class="main"
v-for="(item, index) in spotGuide"
@click="toUrl(item)"
@click.stop="toUrl(item)"
:key="index">
<image
class="main-image"
@ -97,14 +97,14 @@
</view>
<view class="f">
<image
@click="openLocation(item)"
@click.stop="openLocation(item)"
src="/static/image/tourGuide/f.png" mode=""></image>
</view>
<view
v-if="item.categoryId == 0"
class="f">
<image
@click="textToSpeech"
@click.stop="textToSpeech"
src="/static/image/tourGuide/a.png" mode=""></image>
</view>
</view>
@ -125,7 +125,7 @@
</template>
<script>
var plugin = requirePlugin("WechatSI")
// var plugin = requirePlugin("WechatSI")
// "plugins" : {
// "WechatSI" : {


+ 29
- 0
interceptor/interceptor.js View File

@ -0,0 +1,29 @@
let needLogin = [
// "/pages/user/user",
]
let list = ["navigateTo"];
list.forEach(item => { //用遍历的方式分别为,uni.navigateTo,uni.redirectTo,uni.reLaunch,uni.switchTab这4个路由方法添加拦截器
console.log(item, 'router list item')
uni.addInterceptor(item, {
invoke(e) { // 调用前拦截
let length = getCurrentPages().length
if (length >= 10) {
uni.showToast({
title: '页面栈已满,即将回到首页',
icon: 'none'
})
setTimeout(uni.reLaunch, 1000, {
url: '/pages/index/index'
})
return false
}
return true
},
fail(err) { // 失败回调拦截
console.log(err);
},
})
})

+ 2
- 0
main.js View File

@ -23,6 +23,8 @@ Vue.component('configPopup',configPopup)
Vue.component('navbar',navbar)
Vue.component('tabber',tabber)
import 'interceptor/interceptor.js'
const app = new Vue({
...App,
store,


+ 1
- 0
pages/index/index.vue View File

@ -152,6 +152,7 @@
})
},
search(){
this.keyword = ''
uni.navigateTo({
url: '/pages_order/service/applyRelic?keyword=' + this.keyword
})


+ 1
- 1
pages_order/auth/wxUserInfo.vue View File

@ -1,7 +1,7 @@
<template>
<view class="login">
<view class="title">
酒店桌布租赁平台
遗产里的景徳镇
</view>
<view class="title">
申请获取你的头像昵称


+ 4
- 4
pages_order/order/orderDetail.vue View File

@ -528,8 +528,8 @@
}
.btn-x {
color: #6fc6ad;
border: 1px solid #6fc6ad;
color: $uni-color;
border: 1px solid $uni-color;
padding: 10rpx 20rpx;
border-radius: 30rpx;
}
@ -539,8 +539,8 @@
justify-content: center;
.btn {
color: #6fc6ad;
border: 1px solid #6fc6ad;
color: $uni-color;
border: 1px solid $uni-color;
padding: 10rpx 20rpx;
border-radius: 30rpx;
}


+ 5
- 1
pages_order/order/orderSubscribe.vue View File

@ -227,6 +227,7 @@
}, res => {
if(res.code == 200){
this.timeColumns.splice(timeType, 0, res.result)
// this.form.orderTime.splice(timeType, 0, res.result[0].timeDot)
}
})
},
@ -239,6 +240,9 @@
this.form.orderTime = []
e.value.forEach((n, i) => {
this.form.orderTime.push(n && n.timeDot)
if(!this.form.orderTime[i]){
this.form.orderTime[i] = this.timeColumns[i][0].timeDot
}
})
},
submit(){
@ -269,7 +273,7 @@
title: res.message,
icon : 'none'
})
uni.navigateTo({
uni.redirectTo({
url: '/pages_order/mine/subscribe'
})
}


+ 1
- 1
pages_order/service/heritagePath.vue View File

@ -37,7 +37,7 @@
<view style="font-size: 20rpx; color: #999999;" v-if="item.isPay == '1'">{{ item.amusementPrice }}</view>
</view>
<view class="heritagePath-card-font-button"
@click="toPayUrl(item)"
@click.stop="toPayUrl(item)"
v-if="item.isPay == '1'">线上预订</view>
</view>
<view style="height: 40rpx;" />


+ 0
- 1
store/store.js View File

@ -149,7 +149,6 @@ const store = new Vuex.Store({
// 排序,最近的在前面
state.spotList.sort((a, b) => a.distance - b.distance)
console.log(state.spotList);
}
},


Loading…
Cancel
Save