Explorar o código

修改发送消息按钮

zs hai 1 ano
pai
achega
1195ff34ef
Modificáronse 2 ficheiros con 7 adicións e 7 borrados
  1. 1 1
      pagesHome/customer/common/submit_1.vue
  2. 6 6
      pagesHome/customer/index.vue

+ 1 - 1
pagesHome/customer/common/submit_1.vue

@@ -125,7 +125,7 @@
 			margin: 0 0 0 10rpx;
 
 			.button {
-				background-color: var(--f3CColor);
+				background-color: var(--fFFColor);
 				color: var(--mainColor);
 				font-size: var(--font14Size);
 			}

+ 6 - 6
pagesHome/customer/index.vue

@@ -73,7 +73,7 @@
 		},
 		onShow: async function() {
 			const that = this;
-			that.searchToken();
+			that.searchUser();
 			that.searchConfig();
 			// 判断是否是选择图片刷新
 			if (!that.is_img) {
@@ -88,10 +88,10 @@
 			uni.stopPullDownRefresh();
 		},
 		methods: {
-			searchToken() {
+			searchUser() {
 				const that = this;
 				try {
-					const res = uni.getStorageSync('token');
+					const res = uni.getStorageSync('user');
 					if (res) that.$set(that, `user`, res);
 				} catch (e) {
 					uni.showToast({
@@ -122,7 +122,7 @@
 					limit: that.limit,
 					user: that.user._id
 				}
-				const res = await that.$api(`/chat`, 'GET', {
+				const res = await that.$api(`chat`, 'GET', {
 					...info,
 				})
 				if (res.errcode == '0') {
@@ -175,7 +175,7 @@
 						"msg_type": e.type
 					};
 					// 发送给服务器消息
-					let res = await that.$api(`/chat`, `POST`, data);
+					let res = await that.$api(`chat`, `POST`, data);
 					if (res.errcode == '0') {
 						that.msgList.push(res.data);
 					} else {
@@ -188,7 +188,7 @@
 					that.goBottom();
 				} else {
 					uni.navigateTo({
-						url: `/pagesIndex/login/index`
+						url: `/pagesHome/login/index`
 					})
 				}
 			},