Browse Source

删除账号401重定向

李万涛 2 years ago
parent
commit
2a2a9a794d
2 changed files with 6 additions and 2 deletions
  1. 4 2
      pages/chat/chat.vue
  2. 2 0
      utils/request/responseInterceptors.js

+ 4 - 2
pages/chat/chat.vue

xqd xqd xqd
@@ -22,7 +22,7 @@
 							<view class="right">
 								<view class="username">
 									<view class="name"></view>
-									<view class="time">'ai问答机器人</view>
+									<view class="time">{{robotName}}</view>
 								</view>
 								<view class="bubble">
 									<view class="content">
@@ -136,6 +136,8 @@
 		},
 		data() {
 			return {
+				robotName: '数趣AI机器人',
+
 				talkList: [],
 				thecontent: '',
 				content: '',
@@ -275,7 +277,7 @@
 					toid: 666,
 					fromid: -1,
 					avatar: 'https://nywhcm.com/addons/wike_aging/public/static/storage/presets/mode/1.png',
-					nickname: '小助手',
+					nickname: this.robotName,
 
 					show_flash: true,
 					done: false

+ 2 - 0
utils/request/responseInterceptors.js

xqd
@@ -30,6 +30,8 @@ module.exports = (vm) => {
 		/*  对响应错误做点什么 (statusCode !== 200)*/
 		let statusCode = response.statusCode
 		if (statusCode == 401) {
+			console.log('当前接口401----------------------------');
+			uni.clearStorageSync()
 			uni.redirectTo({
 				url: '/pages/user/signin'
 			})