asd26269546 2 anni fa
parent
commit
9cf30f45ea

+ 2 - 2
components/components/tui-chat/message-input/index.vue

@@ -67,14 +67,14 @@
 					<image class="TUI-Extension-icon" src="/static/static/assets/video-calling.svg"></image>
 					<view class="TUI-Extension-slot-name">视频通话</view>
 				</view>
-				<view class="TUI-Extension-slot" @tap="handleServiceEvaluation">
+				<!-- <view class="TUI-Extension-slot" @tap="handleServiceEvaluation">
 					<image class="TUI-Extension-icon" src="/static/static/assets/service-assess.svg"></image>
 					<view class="TUI-Extension-slot-name">服务评价</view>
 				</view>
 				<view class="TUI-Extension-slot" @tap="handleSendOrder">
 					<image class="TUI-Extension-icon" src="/static/static/assets/send-order.svg"></image>
 					<view class="TUI-Extension-slot-name">发送订单</view>
-				</view>
+				</view> -->
 			</view>
 			<TUI-Common-Words class="tui-cards" :display="displayCommonWords" @sendMessage="$handleSendTextMessage" @close="$handleCloseCards"></TUI-Common-Words>
 			<TUI-Order-List class="tui-cards" :display="displayOrderList" @sendCustomMessage="$handleSendCustomMessage" @close="$handleCloseCards"></TUI-Order-List>

+ 10 - 10
components/tui-chat/message-input/index.vue

@@ -67,14 +67,14 @@
 					<image class="TUI-Extension-icon" src="/static/static/assets/video-calling.svg"></image>
 					<view class="TUI-Extension-slot-name">视频通话</view>
 				</view>
-				<view class="TUI-Extension-slot" @tap="handleServiceEvaluation">
+				<!-- <view class="TUI-Extension-slot" @tap="handleServiceEvaluation">
 					<image class="TUI-Extension-icon" src="/static/static/assets/service-assess.svg"></image>
 					<view class="TUI-Extension-slot-name">服务评价</view>
 				</view>
 				<view class="TUI-Extension-slot" @tap="handleSendOrder">
 					<image class="TUI-Extension-icon" src="/static/static/assets/send-order.svg"></image>
 					<view class="TUI-Extension-slot-name">发送订单</view>
-				</view>
+				</view> -->
 			</view>
 			<TUI-Common-Words class="tui-cards" :display="displayCommonWords" @sendMessage="$handleSendTextMessage" @close="$handleCloseCards"></TUI-Common-Words>
 			<TUI-Order-List class="tui-cards" :display="displayOrderList" @sendCustomMessage="$handleSendCustomMessage" @close="$handleCloseCards"></TUI-Order-List>
@@ -124,15 +124,15 @@ export default {
 				{
 					name: '常用语',
 					key: '0'
-				},
-				{
-					name: '发送订单',
-					key: '1'
-				},
-				{
-					name: '服务评价',
-					key: '2'
 				}
+				// {
+				// 	name: '发送订单',
+				// 	key: '1'
+				// },
+				// {
+				// 	name: '服务评价',
+				// 	key: '2'
+				// }
 			],
 			displayServiceEvaluation: false,
 			displayCommonWords: false,

+ 11 - 9
manifest.json

@@ -17,26 +17,28 @@
             "delay" : 0
         },
         /* 模块配置 */
-        "modules" : {},
+        "modules" : {
+            "VideoPlayer" : {}
+        },
         /* 应用发布信息 */
         "distribute" : {
             /* android打包配置 */
             "android" : {
                 "permissions" : [
-                    "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
-                    "<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
-                    "<uses-permission android:name=\"android.permission.VIBRATE\"/>",
-                    "<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
-                    "<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
+                    "<uses-feature android:name=\"android.hardware.camera\"/>",
                     "<uses-feature android:name=\"android.hardware.camera.autofocus\"/>",
                     "<uses-permission android:name=\"android.permission.ACCESS_NETWORK_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.ACCESS_WIFI_STATE\"/>",
                     "<uses-permission android:name=\"android.permission.CAMERA\"/>",
+                    "<uses-permission android:name=\"android.permission.CHANGE_NETWORK_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
                     "<uses-permission android:name=\"android.permission.GET_ACCOUNTS\"/>",
+                    "<uses-permission android:name=\"android.permission.MOUNT_UNMOUNT_FILESYSTEMS\"/>",
+                    "<uses-permission android:name=\"android.permission.READ_LOGS\"/>",
                     "<uses-permission android:name=\"android.permission.READ_PHONE_STATE\"/>",
-                    "<uses-permission android:name=\"android.permission.CHANGE_WIFI_STATE\"/>",
+                    "<uses-permission android:name=\"android.permission.VIBRATE\"/>",
                     "<uses-permission android:name=\"android.permission.WAKE_LOCK\"/>",
-                    "<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
-                    "<uses-feature android:name=\"android.hardware.camera\"/>",
                     "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
                 ]
             },

+ 22 - 15
pages.json

@@ -10,6 +10,20 @@
 	"pages": [ //pages数组中第一项表示应用启动页,参考:https://uniapp.dcloud.io/collocation/pages
 		//im页面
 		{
+			"path": "pages/equipment/equipment",
+			"style": {
+				"navigationBarTitleText": "设备",
+				"navigationStyle": "custom"
+			}
+		},
+		{
+			"path": "pages/im/im",
+			"style": {
+				"navigationBarTitleText": "设备",
+				"navigationStyle": "custom"
+			}
+		},
+		{
 			"path": "pages/TUI-Login/login",
 			"style": {}
 		},
@@ -27,8 +41,6 @@
 				"navigationStyle": "custom"
 			}
 		},
-
-
 		{
 			"path": "pages/production/production",
 			"style": {
@@ -42,13 +54,7 @@
 				"navigationStyle": "custom"
 			}
 		},
-		{
-			"path": "pages/equipment/equipment",
-			"style": {
-				"navigationBarTitleText": "设备",
-				"navigationStyle": "custom"
-			}
-		},
+		
 		{
 			"path": "pages/equipment/assemblyMachine",
 			"style": {
@@ -152,12 +158,7 @@
 			// 	"iconPath": "static/btn_kanban_gray.png",
 			// 	"selectedIconPath": "static/btn_kanban_blue.png"
 			// },
-			// {
-			// 	"pagePath": "pages/production/production",
-			// 	"text": "生产",
-			// 	"iconPath": "static/btn_shengc_gray.png",
-			// 	"selectedIconPath": "static/btn_shengc_blue.png"
-			// },
+			
 			{
 				"pagePath": "pages/equipment/equipment",
 				"text": "设备",
@@ -165,6 +166,12 @@
 				"selectedIconPath": "static/btn_shebei_blue.png"
 			},
 			{
+				"pagePath": "pages/im/im",
+				"text": "通讯录",
+				"iconPath": "static/btn_shengc_gray.png",
+				"selectedIconPath": "static/btn_shengc_blue.png"
+			},
+			{
 				"pagePath": "pages/user/user",
 				"text": "我的",
 				"iconPath": "static/btn_mine_gray.png",

+ 1 - 0
pages/TUI-Conversation/create-conversation/create.vue

@@ -91,6 +91,7 @@ export default {
 						this.setData({
 							searchUser: imRes.data[0]
 						});
+						console.log(imRes.data[0])
 					} else {
 						uni.showToast({
 							title: '用户不存在',

+ 1 - 1
pages/TUI-Index/index.vue

@@ -65,7 +65,7 @@ export default {
 	methods: {
 		handleOnPageNavigate(event) {
 			const tab = event.currentTarget.dataset.item;
-
+			console.log(tab.url)
 			if (!tab.url) {
 				uni.navigateToMiniProgram({
 					appId: 'wx3b91b7aaa809ecf9'

+ 1 - 0
pages/equipment/equipment.vue

@@ -250,6 +250,7 @@
 <style lang="less">
 	.search-box{
 		background-color: #fff;
+		padding-top: 100rpx;
 		ul{
 			li{
 				padding: 25rpx 30rpx;

+ 220 - 0
pages/im/im.vue

@@ -0,0 +1,220 @@
+<template>
+	<view class="im">
+		<commons-header></commons-header>
+		<view style="margin-top:128rpx" @click="bindConfirmInvite">
+			<view class="company-list">
+				<view class="company-title"><span>新美特</span></view>
+				<view class="list-box">
+					<view class="user-img">
+						张
+					</view>
+					<view class="user-text">
+						<p>张三</p>
+						<span>总经理</span>
+					</view>
+				</view>
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import commonsHeader from '../../components/commons-header/index.vue'
+	import { setTokenStorage } from '../../utils/token';
+	import logger from '../../utils/logger';
+	import { genTestUserSig } from '../../debug/GenerateTestUserSig.js';
+	const { getTokenStorage } = require('../../utils/token.js');
+	const app = getApp();
+	export default {
+		components:{
+			commonsHeader
+		},
+		data() {
+			return {
+				userID: '',
+				hidden: false,
+				btnValue: '获取验证码',
+				btnDisabled: false,
+				privateAgree: false,
+				phone: '',
+				code: '',
+				sessionID: '',
+				second: 60,
+				path: '',
+				lastTime: 0,
+				countryIndicatorStatus: false,
+				country: '86',
+				indicatorValue: 46,
+				headerHeight: app.globalData.headerHeight,
+				statusBarHeight: app.globalData.statusBarHeight,
+				showlogin: false
+			}
+		},
+		onLoad(option) {
+			const v = this
+			this.setData({
+				path: option.path
+			});
+			uni.getStorage({
+				// 获取本地缓存
+				key: 'sessionID',
+				success(res) {
+					that.setData({
+						sessionID: res.data
+					});
+				}
+			});
+			uni.setStorage({
+				key: 'path',
+				data: option.path
+			});
+			setTimeout(()=>{
+				v.imInit()
+			},5000)
+		},
+		methods: {
+			
+			bindConfirmInvite() {
+				uni.$TUIKit
+					.getUserProfile({
+						userIDList: ['111']
+					})
+					.then(imRes => {
+						if (imRes.data.length > 0) {
+							console.log(imRes.data[0].userID)
+							uni.navigateTo({
+								url: `../TUI-Chat/chat?conversationID=C2C${imRes.data[0].userID}`
+							});
+						} else {
+							uni.showToast({
+								title: '用户不存在',
+								icon: 'error'
+							});
+							this.setData({
+								userID: ''
+							});
+						}
+					});
+			},
+			imInit(){
+				const userID = '111';
+				const userSig = genTestUserSig(userID).userSig;
+				const SDKAppID = app.globalData.SDKAppID;
+				
+				
+				
+				app.globalData.userInfo = {
+					userSig,
+					userID
+				};
+				setTokenStorage({
+					userInfo: app.globalData.userInfo
+				});
+				wx.setStorageSync(`TIM_${getApp().SDKAppID}_isTUIKit`, true);
+				uni.$TUIKit.login({
+					userID: userID,
+					userSig: userSig
+				}).then(() => {
+					
+				}).catch((error) => {
+					
+				})
+				console.log(SDKAppID,userID,userSig)
+				uni.$TUICalling.login(
+					{
+						sdkAppID: SDKAppID,
+						userID: userID,
+						userSig: userSig
+					},
+					res => {
+						console.log(JSON.stringify(res.msg));
+						// uni.showToast({
+						// 	title: 'login',
+						// 	icon: 'none'
+						// });
+						// uni.navigateTo({
+						// 	url: '../TUI-Index/index'
+						// });
+					}
+				);
+				// 登录原生插件
+				// #ifdef APP-PLUS
+				// if(typeof(uni.$TUICalling) == 'undefined') {
+				// 	uni.showToast({
+				// 		title: '如果需要音视频功能,请集成插件使用真机运行并且自定义基座调试哦~',
+				// 		icon: 'none',
+				// 		duration: 3000
+				// 	});
+				// 	logger.error('请使用真机运行并且自定义基座调试,否则影响音视频功能~ 插件地址:https://ext.dcloud.net.cn/plugin?id=7097 , 调试地址:https://nativesupport.dcloud.net.cn/NativePlugin/use/use');
+				// } else {
+					
+				// }
+				
+				// #endif
+				if (this.path && this.path !== 'undefined') {
+					uni.redirectTo({
+						url: this.path
+					});
+				} else {
+					
+				}
+			},
+			
+		},
+	}
+</script>
+
+<style lang="less">
+	.im{
+		background-color: #f1f1f1;
+		min-height: calc(100vh - 128rpx);
+		.company-title{
+			height: 100rpx;
+			line-height: 100rpx;
+			color: #333;
+			font-size: 28rpx;
+			position: relative;
+			padding: 0 47rpx;
+			background-color: #fff;
+			border-bottom: 1rpx solid #ddd;
+		}
+		.company-title::before{
+			content:' ';
+			position: absolute;
+			width: 8rpx;
+			height: 32rpx;
+			top: 35rpx;
+			left: 24rpx;
+			background-color: #3370FF;
+			
+		}
+		.list-box{
+			background-color: #fff;
+			height: 160rpx;
+			padding: 40rpx 24rpx;
+			display: flex;
+			box-sizing: border-box;
+			.user-img{
+				height: 80rpx;
+				width: 80rpx;
+				background-color: #3370FF;
+				border-radius: 10rpx;
+				color: #fff;
+				text-align: center;
+				line-height: 80rpx;
+			}
+			.user-text{
+				margin-left: 24rpx;
+				line-height: 40rpx;
+				p{
+					color: #333;
+					font-size: 28rpx;
+				}
+				span{
+					color: #999;
+					font-size: 24rpx;
+				}
+			}
+		}
+	}
+</style>

File diff suppressed because it is too large
+ 0 - 1
unpackage/dist/build/app-plus/app-config-service.js


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/app-plus/app-service.js


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/app-plus/app-view.js


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/build/app-plus/manifest.json


File diff suppressed because it is too large
+ 0 - 1
unpackage/dist/dev/app-plus/app-config-service.js


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/dev/app-plus/app-service.js


File diff suppressed because it is too large
+ 679 - 225
unpackage/dist/dev/app-plus/app-view.js


File diff suppressed because it is too large
+ 0 - 0
unpackage/dist/dev/app-plus/manifest.json


Some files were not shown because too many files changed in this diff