zs 1 year ago
parent
commit
5a78cece29
3 changed files with 7 additions and 5 deletions
  1. 1 0
      App.vue
  2. 1 1
      common/api.js
  3. 5 4
      pagesHome/customer/index.vue

+ 1 - 0
App.vue

@@ -116,6 +116,7 @@
 		--fffColor: #ffffff;
 		--fffColor: #ffffff;
 		--fF0Color: #FF0000;
 		--fF0Color: #FF0000;
 		--fFFColor: #2979ff;
 		--fFFColor: #2979ff;
+		--f3CColor: #007AFF;
 		--f35BColor: #35BD7B;
 		--f35BColor: #35BD7B;
 	}
 	}
 </style>
 </style>

+ 1 - 1
common/api.js

@@ -30,7 +30,7 @@ export const requestBase = async (uri, method = 'GET', data, type) => {
 	});
 	});
 };
 };
 export const requestApp = async (uri, method = 'GET', data, type) => {
 export const requestApp = async (uri, method = 'GET', data, type) => {
-	let baseUrl = `https://broadcast.waityou24.cn${uri}`;
+	let baseUrl = `https://120.48.146.1${uri}`;
 	return new Promise((resolve, reject) => {
 	return new Promise((resolve, reject) => {
 		uni.request({
 		uni.request({
 			url: baseUrl,
 			url: baseUrl,

+ 5 - 4
pagesHome/customer/index.vue

@@ -11,8 +11,7 @@
 							{{item.time}}
 							{{item.time}}
 						</view>
 						</view>
 						<view class="msg-m msg-left" v-if="item.speaker !=  user._id">
 						<view class="msg-m msg-left" v-if="item.speaker !=  user._id">
-							<image class="user-img"
-								:src="config.logo_url&&config.logo_url.length>0?config.logo_url[0].url:''">
+							<image class="user-img" :src="config.logo&&config.logo.length>0?config.logo[0].url:''">
 							</image>
 							</image>
 							<!-- 文字 -->
 							<!-- 文字 -->
 							<view class="message" v-if="item.msg_type =='0'">                           
 							<view class="message" v-if="item.msg_type =='0'">                           
@@ -24,8 +23,7 @@
 							</view>
 							</view>
 						</view>
 						</view>
 						<view class="msg-m msg-right" v-else-if="item.speaker == user._id">
 						<view class="msg-m msg-right" v-else-if="item.speaker == user._id">
-							<image class="user-img" :src="user.logo&&user.logo.length>0?user.logo[0].url:''">
-							</image>
+							<u-avatar :text="formatName(user.nickname)" fontSize="22" randomBgColor></u-avatar>
 							<!-- 文字 -->
 							<!-- 文字 -->
 							<view class="message" v-if="item.msg_type =='0'">
 							<view class="message" v-if="item.msg_type =='0'">
 								<view class="msg-text">{{item.content}}</view>
 								<view class="msg-text">{{item.content}}</view>
@@ -259,6 +257,9 @@
 				that.$set(that, `skip`, 0)
 				that.$set(that, `skip`, 0)
 				that.$set(that, `limit`, 6)
 				that.$set(that, `limit`, 6)
 				that.$set(that, `page`, 0)
 				that.$set(that, `page`, 0)
+			},
+			formatName(str) {
+				if (str) return str.substr(0, 1) + new Array(str.length).join('');
 			}
 			}
 		}
 		}
 	}
 	}