Browse Source

url优化

程志平 5 years ago
parent
commit
a2ce2a05a4
3 changed files with 11 additions and 12 deletions
  1. 1 2
      .gitignore
  2. 10 7
      pages/reshui/reshui.vue
  3. 0 3
      static/api.js

+ 1 - 2
.gitignore

@@ -1,2 +1 @@
-# Windows:
-unpackage
+/unpackage/

+ 10 - 7
pages/reshui/reshui.vue

@@ -184,13 +184,15 @@
 				// console.log(res.data.mess, 'request_consumption_records');
 				// console.log(res.data.mess, 'request_consumption_records');
 				if (typeof(res.data.mess) != 'undefined') {
 				if (typeof(res.data.mess) != 'undefined') {
 					let items = res.data.mess
 					let items = res.data.mess
-					items.sort((a, b) => {
-						return a.begin_time < b.begin_time ? 1 : -1;
-					})
+					// 按时间倒序排列
+					// items.sort((a, b) => {
+					// 	return a.begin_time < b.begin_time ? 1 : -1;
+					// })
 					for (var i = 0; i < items.length; i++) {
 					for (var i = 0; i < items.length; i++) {
-						if (items[i].use_amount > 0.00) {
+						// 过滤掉为0的记录,只显示消费大于0的记录
+						// if (items[i].use_amount > 0.00) {
 							this.xiaofei_items.push(items[i])
 							this.xiaofei_items.push(items[i])
-						}
+						// }
 					}
 					}
 				} else {
 				} else {
 					uni.showToast({
 					uni.showToast({
@@ -205,7 +207,7 @@
 			 */
 			 */
 			async select_user_info() {
 			async select_user_info() {
 				const res = await this.$myRequest({
 				const res = await this.$myRequest({
-					host: 'my',
+					host: 'code',
 					url: '/HotWater/userget_stu.action',
 					url: '/HotWater/userget_stu.action',
 					method: 'POST',
 					method: 'POST',
 					header: {
 					header: {
@@ -242,7 +244,7 @@
 			 */
 			 */
 			async send_save_user_info() {
 			async send_save_user_info() {
 				const res = await this.$myRequest({
 				const res = await this.$myRequest({
-					host: 'my',
+					host: 'code',
 					url: '/HotWater/userstu_info.action',
 					url: '/HotWater/userstu_info.action',
 					method: 'POST',
 					method: 'POST',
 					header: {
 					header: {
@@ -884,6 +886,7 @@
 
 
 			setInit() {
 			setInit() {
 				setTimeout(() => {
 				setTimeout(() => {
+					this.isUserClose = false
 					this.isChecked = false
 					this.isChecked = false
 					this.isConnected = false
 					this.isConnected = false
 					this.isScan = false
 					this.isScan = false

+ 0 - 3
static/api.js

@@ -1,5 +1,4 @@
 const WECARD_BASE_URL = 'https://open.wecard.qq.com' // wecard
 const WECARD_BASE_URL = 'https://open.wecard.qq.com' // wecard
-const MY_BASE_URL = 'http://demo.xwsyjjy.com' // my
 const CODE_BASE_URL = 'https://developdomain.chuanghai-tech.com' // code
 const CODE_BASE_URL = 'https://developdomain.chuanghai-tech.com' // code
 
 
 export const myRequest = (options) => {
 export const myRequest = (options) => {
@@ -14,8 +13,6 @@ export const myRequest = (options) => {
 
 
 		if (options.host == 'wecard')
 		if (options.host == 'wecard')
 			BASE_URL = WECARD_BASE_URL;
 			BASE_URL = WECARD_BASE_URL;
-		else if (options.host == 'my')
-			BASE_URL = MY_BASE_URL;
 		else if (options.host == 'code')
 		else if (options.host == 'code')
 			BASE_URL = CODE_BASE_URL;
 			BASE_URL = CODE_BASE_URL;
 		else
 		else