Browse Source

[bug]
修复bug

天梦 2 năm trước cách đây
mục cha
commit
cfc4651cad
3 tập tin đã thay đổi với 16 bổ sung10 xóa
  1. 3 1
      components/nav-bar/nav-bar.vue
  2. 6 2
      manifest.json
  3. 7 7
      pages/index/index.vue

+ 3 - 1
components/nav-bar/nav-bar.vue

@@ -41,7 +41,9 @@ import {updateWorkStatus, updateOnlineStatus } from "@/static/js/api.js"
 const props = defineProps({
 	userInfo: {
 		default: function() {
-			return {}
+			return {
+				workStatus: '0'
+			}
 		},
 		type: Object
 	}

+ 6 - 2
manifest.json

@@ -55,9 +55,13 @@
 	"mp-weixin": {
 		"appid": "",
 		"setting": {
-			"urlCheck": false
+			"urlCheck": false,
+			"es6": true,
+			"minified": true
+			
 		},
-		"usingComponents": true
+		"usingComponents": true,
+		"lazyCodeLoading": "requiredComponents"
 	},
 	"mp-alipay": {
 		"usingComponents": true

+ 7 - 7
pages/index/index.vue

@@ -198,14 +198,14 @@ const updateList = (v)=>{
 }
 
 const handleSearch = async()=>{
-	const token = uni.getStorageSync('token')
-	console.log('handleSearch token',token)
+	// 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(currentStatus.value ===0 && searchVal.value) {
 		const params = {
-			token: token,
+			token: uni.getStorageSync('token'),
 			data: JSON.stringify({
 				currentUserId: parseInt(uni.getStorageSync('userId')) || 0,
 				name: searchVal.value,
@@ -222,7 +222,7 @@ const handleSearch = async()=>{
 	}
 	if(currentStatus.value===1){
 		const params = {
-			token: token,
+			token: uni.getStorageSync('token'),
 			data: JSON.stringify({
 				currentUserId: parseInt(uni.getStorageSync('userId')) || 0,
 				startTime: searchTime.value[0] || '',
@@ -262,8 +262,8 @@ const handleRefresh = async()=>{
 	}
 	const {data:res} = await releaseOrder(params)
 	if (res.code === 200) {
-		params = {
-			token: token,
+		const paramss = {
+			token: uni.getStorageSync('token'),
 			data:JSON.stringify({
 				currentUserId: parseInt(uni.getStorageSync('userId')),
 				page: page.value,
@@ -272,7 +272,7 @@ const handleRefresh = async()=>{
 			})
 		}
 		
-		const {data:res} = await receiveOrderList(params)
+		const {data:res} = await receiveOrderList(paramss)
 		if (res.code === 200) {
 			total.value = res.total
 			orderList.value = res.rows