Zory 1 semana atrás
pai
commit
135ff5c0c1

+ 7 - 2
components/item/index.vue

@@ -52,6 +52,9 @@
 						<view v-else-if="item.type === 'pay'" @tap.stop="onClick">
 							<m-price :isMy="isMy" :value="item"></m-price>
 						</view>
+						<view v-else-if="item.type === 'address'" @tap.stop="onClick">
+							<m-address :isMy="isMy" :value="item"></m-address>
+						</view>
 						<view v-else-if="item.type === 'audio'">
 							<m-audio :isMy="isMy" :value="item" @onClick="onClick"></m-audio>
 						</view>
@@ -103,7 +106,8 @@ import mArticle from './m-article.vue';
 import mShareSbcf from './m-share-sbcf.vue';
 import mShareMall from './m-share-mall.vue';
 import mOrder from './m-order.vue';
-import mPrice from './m-price.vue';
+import mPrice from './m-price.vue';
+import mAddress from './m-address.vue';
 
 import mFunctionalModule from './m-functional-module.vue';
 
@@ -123,7 +127,8 @@ export default {
 		mShareMall,
 		mFunctionalModule,
 		mOrder,
-		mPrice
+		mPrice,
+		mAddress
 	},
 	props: {
 		myid: {

+ 8 - 0
components/item/m-address.vue

@@ -0,0 +1,8 @@
+<template>
+</template>
+
+<script>
+</script>
+
+<style>
+</style>

+ 11 - 5
pages/service/chat/chat.vue

@@ -155,9 +155,9 @@ export default {
 			sendId:null,
 			myid:"",
 			pushObj:null,
-            wsAuth:"http://192.168.2.183:9881/plugin/webman/push/auth",
+            wsAuth:"http://192.168.3.16:9881/plugin/webman/push/auth",
             // wsAuth:"https://panel.huiyinduo.cn/plugin/webman/push/auth",
-            wsUrl: 'ws://192.168.2.183:3131',
+            wsUrl: 'ws://192.168.3.16:3131',
 			page:2,
 			size:10
 		}
@@ -417,7 +417,8 @@ export default {
 			this.pushList(message);
 		},
 		// 更多操作相关===============
-		onMore(item) {
+		onMore(item) {
+			// console.log(item)
 			switch (item.type) {
 				case 'img':
 					this.sendImageMessage();
@@ -434,14 +435,19 @@ export default {
 			
 		},
 		// 创建发送照片内容
-		sendImageMessage() {
+		sendImageMessage() {
+			console.log('upload')
 			uni.chooseImage({
-				count: 9,
+				count: 1,
+				sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
 				success: async (res) => {
 					res.tempFiles.forEach((file) => {
 						console.log(file);
 						this.createImageMessage(file);
 					});
+				},
+				fail(e) {
+					console.log("选择失败",e)
 				}
 			});
 		},

+ 5 - 0
static/api/service.js

@@ -6,9 +6,14 @@ const apiUri = {
 	save: '/user/save',
 	send: '/service/send',
 	msg: '/service/msg',
+	upload: '/home/upload',
 	pricePay: '/order/pricePay'
 }
 
+export function upload(path,param) {
+	return request.uploadFile(apiUri.upload,path,param)
+}
+
 export function pricePay(param) {
 	return request.request(apiUri.pricePay,'POST', param,false,true,false)
 }

+ 1 - 1
static/js/request.js

@@ -16,7 +16,7 @@ const axg = {
 		// #endif
 		// #ifdef MP
 		// return 'https://tran.jsshuita.cn/dy'
-		return 'http://192.168.2.183:9881/dy'
+		return 'http://192.168.3.16:9881/dy'
 		// #endif
 	},
 	toast: function(text, duration, success) {