he2802 4 лет назад
Родитель
Сommit
32e05498e5
3 измененных файлов с 21 добавлено и 11 удалено
  1. 5 4
      common/request.js
  2. 8 1
      components/home.vue
  3. 8 6
      pages2/wd/info.vue

+ 5 - 4
common/request.js

@@ -1,6 +1,6 @@
-const BASE_URL = 'http://192.168.1.222:8088'
+//const BASE_URL = 'http://192.168.1.222:8088'
 //const BASE_URL = 'http://127.0.0.1:8088' 
-//const BASE_URL = 'https://api.xyyxt.net' 
+const BASE_URL = 'https://api.xyyxt.net' 
 import store from '@/store/index.js'
 import api from './api.js'
 var num = 1
@@ -13,8 +13,9 @@ export const myRequest = (options) => {
 			url: BASE_URL + options.url,
 			method: options.method || 'GET',
 			data: options.data,
-			header: options.noToken ? {} : {
-				AuthorizationToken: 'WX ' + uni.getStorageSync('token')
+			header: options.noToken ? {TenantId:'867735392558919680'} : {
+				AuthorizationToken: 'WX ' + uni.getStorageSync('token'),
+				TenantId:'867735392558919680'
 			},
 			success: async (res) => {
 				if (res.data.code == 401) {

+ 8 - 1
components/home.vue

@@ -258,7 +258,14 @@ export default {
 					}
 					let date = new Date();
 					let num = date.getDate();
-					let list = result.data.data.calendarStudyVo[0].dayStudyList;
+					let month = date.getMonth()+1
+					let list = [];
+					for(let i = 0; i < result.data.data.calendarStudyVo.length; i++){
+						let item = result.data.data.calendarStudyVo[i]
+						if(item.month==month){
+							list = item.dayStudyList
+						}
+					}
 					for(let i = 0; i < list.length; i++) {
 					    let item = list[i]
 						item.color = 0

+ 8 - 6
pages2/wd/info.vue

@@ -171,22 +171,23 @@ export default {
 	},
 	onReady() {
 		this.$refs.uForm.setRules(this.rules);
-		if(this.form.houseProvince === ''){
+		this.form = this.userInfo
+		if(this.form.houseProvince === ''||this.form.houseProvince == null){
 			this.form.houseProvince = '广东省'
 		}
-		if(this.form.houseCity === ''){
+		if(this.form.houseCity === ''||this.form.houseCity == null){
 			this.form.houseCity = '广州市'
 		}
-		if(this.form.houseDistrict === ''){
+		if(this.form.houseDistrict === ''||this.form.houseDistrict == null){
 			this.form.houseDistrict = '天河区'
 		}
-		if(this.form.province === ''){
+		if(this.form.province === ''||this.form.province == null){
 			this.form.province = '广东省'
 		}
-		if(this.form.city === ''){
+		if(this.form.city === ''||this.form.city == null){
 			this.form.city = '广州市'
 		}
-		if(this.form.district === ''){
+		if(this.form.district === ''||this.form.district == null){
 			this.form.district = '天河区'
 		}
 	},
@@ -387,6 +388,7 @@ export default {
 	watch:{
 		userInfo(val, oldVal){
 			this.form = val
+			console.log(this.form,66)
 		}
 	}
 };