Bladeren bron

修改域名

Eilly 3 jaren geleden
bovenliggende
commit
8214f54d39
4 gewijzigde bestanden met toevoegingen van 13 en 5 verwijderingen
  1. 1 1
      http/baseUrl.js
  2. 10 0
      http/request.js
  3. 1 1
      pages/peopleList/peopleList.vue
  4. 1 3
      pages/travel/poster.vue

+ 1 - 1
http/baseUrl.js

xqd
@@ -7,4 +7,4 @@ export const baseUrl = 'http://o2o.cn/api/'
 //export const imageUrl = 'http://t28.9026.com/'
 //export const baseUrl = 'http://t28.9026.com/api/'
 // export const mainUrl = 'http://t7.9026.com'
-export const mainUrl = 'https://t38.9026.com'
+export const mainUrl = 'https://ryx.scxxq.cn'

+ 10 - 0
http/request.js

xqd
@@ -43,6 +43,16 @@ module.exports = (vm) => {
 				vm.$store.commit('setToken', null)
 				return Promise.reject(data)
 			}
+			if (data.code == 401) {
+				uni.showToast({
+					title:data.message
+				})
+				setTimeout(()=>{
+					uni.navigateTo({
+						url:'/pages/login'
+					})
+				},500)
+			}
 			// 如果没有显式定义custom的toast参数为false的话,默认对报错进行toast弹出提示
 			if (custom.toast !== false) {
 				//uni.$u.toast(data.message)

+ 1 - 1
pages/peopleList/peopleList.vue

xqd
@@ -28,7 +28,7 @@
 		<view style="margin-top: 140rpx;">
 			<u-loadmore v-if="checkboxList.length==0" :status="nomore" fontSize="30" :line="true" nomoreText="暂无出行人" />
 		</view>
-
+	
 		<view class="navbar">
 			<view class="navbar-item" @click="addpeople">
 				+ 新增出行人

+ 1 - 3
pages/travel/poster.vue

xqd
@@ -94,9 +94,7 @@
 		},
 		methods:{
 			init(){
-				uni.showLoading({
-					
-				})
+				uni.showLoading()
 				uni.$u.http.post('/api/share/good', {
 					good_id: this.goodsInfo.id
 				}, {