Sfoglia il codice sorgente

[dev]
1、修复几个bug
2、打开websocket

Neo 1 anno fa
parent
commit
397865b080
3 ha cambiato i file con 29 aggiunte e 14 eliminazioni
  1. 9 4
      manifest.json
  2. 19 9
      pages/index/index.vue
  3. 1 1
      pages/login/login.vue

+ 9 - 4
manifest.json

@@ -42,7 +42,8 @@
                     "<uses-permission android:name=\"android.permission.FLASHLIGHT\"/>",
                     "<uses-feature android:name=\"android.hardware.camera\"/>",
                     "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
-                ]
+                ],
+                "minSdkVersion" : 21
             },
             /* ios打包配置 */
             "ios" : {
@@ -51,6 +52,10 @@
             /* SDK配置 */
             "sdkConfigs" : {
                 "ad" : {}
+            },
+            "splashscreen" : {
+                "iosStyle" : "common",
+                "androidStyle" : "default"
             }
         },
         "nativePlugins" : {
@@ -70,14 +75,14 @@
             },
             "Html5app-Gprinter" : {
                 "__plugin_info__" : {
-                    "name" : "Android 和 IOS 佳博 蓝牙小票 标签 打印插件支持 ESC 、TSC、CPCL 指令 - [试用版,仅用于自定义调试基座]",
+                    "name" : "Android 和 IOS 佳博 蓝牙小票 标签 打印插件支持 ESC 、TSC、CPCL 指令",
                     "description" : "Android / IOS 小票 、标签 打印机插件,QQ交流群:891416757",
                     "platforms" : "Android,iOS",
                     "url" : "https://ext.dcloud.net.cn/plugin?id=462",
-                    "android_package_name" : "",
+                    "android_package_name" : "uni.UNIF501A17",
                     "ios_bundle_id" : "",
                     "isCloud" : true,
-                    "bought" : 0,
+                    "bought" : 1,
                     "pid" : "462",
                     "parameters" : {}
                 }

+ 19 - 9
pages/index/index.vue

@@ -109,7 +109,6 @@ import {releaseOrder} from "@/static/js/request.js"
 
 const userInfo = ref({})
 const workStatus = ref('0')
-const searchVal = ref('')
 const tabList = ref([
 	{title:"今日待完成", status: '0', leng:0},
 	{title:"历史处方", status: '1'},
@@ -138,6 +137,7 @@ const officeIndex = ref(0)
 const typeArr = ref(['姓名:','处方号:'])
 const typeIndex = ref(0)
 
+const searchVal = ref('')
 const searchTime =ref([])
 const searchDepartment = ref('')
 const searchName = ref('')
@@ -204,6 +204,17 @@ onLoad(async () => {
 	}
 })
 
+const reset = ()=>{
+	searchTime.value =[]
+	searchDepartment.value =''
+	searchName.value =''
+	searchPreNo.value =''
+	searchSex.value =''
+	searchPreMzZy.value =''
+	searchStatus.value =''
+	searchVal.value = ''
+}
+
 // 子传父,更新userInfo
 const updateUser = (v)=>{
 	console.log('updateUserStatus', v)
@@ -223,17 +234,14 @@ const emitSelect = (v)=>{
 }
 
 const handleSearch = async()=>{
-	// const token = uni.getStorageSync('token')
-	// console.log('handleSearch token',token)
-	console.log('handleSearch searchVal', searchVal.value)
-	console.log('currentStatus.value', currentStatus.value)
-	searchVal.value = searchVal.value.trim()
+	
+	
 	if(tabActive.value ===0 && searchVal.value) {
 		const params = {
 			token: uni.getStorageSync('token'),
 			data: JSON.stringify({
 				currentUserId: parseInt(uni.getStorageSync('userId')) || 0,
-				name: searchVal.value,
+				name: searchVal.value.trim(),
 				page: page.value,
 				pageSize: pageSize.value,
 				status: tabList.value[tabActive.value].status
@@ -245,14 +253,14 @@ const handleSearch = async()=>{
 			orderList.value = res.rows
 		}
 	}
-	if(tabActive.value===1){
+	if(tabActive.value==1){
 		const params = {
 			token: uni.getStorageSync('token'),
 			data: JSON.stringify({
 				currentUserId: parseInt(uni.getStorageSync('userId')) || 0,
 				startTime: searchTime.value[0] || '',
 				endTime:  searchTime.value[1] || '',
-				name: searchVal.value || '',
+				name: searchName.value.trim() || '',
 				preNo: searchPreNo.value || '',
 				prescriptionStatus: searchStatus.value || '',
 				sex: searchSex.value || '',
@@ -304,6 +312,7 @@ const handleRefresh = async()=>{
 					console.log('orderList',orderList.value)
 				}
 			})
+			ids.value = []
 		}
 	}
 }
@@ -412,6 +421,7 @@ const checkIndex = async(index) => {
 	page.value= 1
 	console.log('index',index)
 	ids.value = []
+	reset()
 	tabName.value = tabList.value[index].title
 	currentStatus.value = parseInt(tabList.value[index].status)
 	const token = uni.getStorageSync('token')

+ 1 - 1
pages/login/login.vue

@@ -97,7 +97,7 @@ const submit = async ()=> {
 		uni.setStorageSync('token', res.token)
 		uni.setStorageSync('userId', res.userId)
 		// 开启监听 neo
-		// uni.$emit('login',{userId:res.userId})
+		uni.$emit('login',{userId:res.userId})
 		console.log('11')
 		console.log('res.token',res.token)
 		// JSON.stringify(params.data.data)