Browse Source

打卡项目优化

MS-CIAZDCOIXVRW\Administrator 3 years ago
parent
commit
fb94bca7ee

+ 1 - 1
pagesClockIn/addLocation/addLocation.vue

@@ -130,7 +130,7 @@
 					get_poi: 1,
 					get_poi: 1,
 					poi_options: "policy=2",
 					poi_options: "policy=2",
 					success: (res) => {
 					success: (res) => {
-						console.log(res);
+						// console.log(res);
 						if (res.status == 0) {
 						if (res.status == 0) {
 							this.placeList = res.result.pois
 							this.placeList = res.result.pois
 							this.covers[0].callout.content = res.result.address
 							this.covers[0].callout.content = res.result.address

+ 1 - 1
pagesClockIn/authentication/authentication.vue

@@ -186,7 +186,7 @@
 				});
 				});
 				setTimeout(() => {
 				setTimeout(() => {
 					uni.uploadFile({
 					uni.uploadFile({
-						url: `https://www.web-server.top/attendance/api/file/upload`,
+						url: `https://chtech.ncjti.edu.cn/campusclock/attendance/api/file/upload`,
 						filePath: url,
 						filePath: url,
 						name: 'file',
 						name: 'file',
 						success: (uploadFileRes) => {
 						success: (uploadFileRes) => {

+ 1 - 1
pagesClockIn/group/group.vue

@@ -332,7 +332,7 @@
 			},
 			},
 			// 点击树状节点回调
 			// 点击树状节点回调
 			nodechange(ref) {
 			nodechange(ref) {
-				console.log(ref);
+				// console.log(ref);
 				this.$nextTick(() => {
 				this.$nextTick(() => {
 					setTimeout(() => {
 					setTimeout(() => {
 						this.$refs[ref][0].resize()
 						this.$refs[ref][0].resize()

+ 2 - 3
pagesClockIn/home/home.vue

@@ -141,7 +141,7 @@
 				// 距离签到点的距离
 				// 距离签到点的距离
 				distance: 0,
 				distance: 0,
 				// 是否可以打卡的标识
 				// 是否可以打卡的标识
-				flags: true,
+				flags: false,
 				// 当前页面的路由地址
 				// 当前页面的路由地址
 				pageUrl: "",
 				pageUrl: "",
 				// 是否显示底部 我的 导航栏
 				// 是否显示底部 我的 导航栏
@@ -216,9 +216,7 @@
 			},
 			},
 			// 获取用户详细信息
 			// 获取用户详细信息
 			async getUserInfo() {
 			async getUserInfo() {
-				// let userId = uni.getStorageSync("userInfo").id
 				let res = await this.$myRequest_clockIn({
 				let res = await this.$myRequest_clockIn({
-					// url: `/attendance/api/system/user/detail/${userId}`,
 					url: `/attendance/api/system/user/detail`,
 					url: `/attendance/api/system/user/detail`,
 				})
 				})
 				// console.log(res);
 				// console.log(res);
@@ -285,6 +283,7 @@
 						this.flags = false
 						this.flags = false
 						this.notes = "无打卡任务无需打卡"
 						this.notes = "无打卡任务无需打卡"
 					} else {
 					} else {
+						this.flags = true
 						this.list = res.data.reverse()
 						this.list = res.data.reverse()
 						this.activeid = this.list[0].id
 						this.activeid = this.list[0].id
 						this.contrastObj = this.list[0]
 						this.contrastObj = this.list[0]

+ 0 - 1
pagesClockIn/index/index.vue

@@ -105,7 +105,6 @@
 				})
 				})
 				// console.log(res);
 				// console.log(res);
 				if (res.code == 200) {
 				if (res.code == 200) {
-					// uni.setStorageSync("userInfo", res.data)
 					uni.setStorageSync("token", res.data.token)
 					uni.setStorageSync("token", res.data.token)
 					uni.reLaunch({
 					uni.reLaunch({
 						url: "/pagesClockIn/home/home"
 						url: "/pagesClockIn/home/home"

+ 1 - 1
pagesClockIn/location/location.vue

@@ -127,7 +127,7 @@
 							success: (res) => {
 							success: (res) => {
 								// console.log(res);
 								// console.log(res);
 								uni.uploadFile({
 								uni.uploadFile({
-									url: `https://www.web-server.top/attendance/api/file/upload`,
+									url: `https://chtech.ncjti.edu.cn/campusclock/attendance/api/file/upload`,
 									filePath: res.tempFilePaths[0],
 									filePath: res.tempFilePaths[0],
 									name: 'file',
 									name: 'file',
 									success: (uploadFileRes) => {
 									success: (uploadFileRes) => {

+ 3 - 3
pagesClockIn/util/api.js

@@ -1,7 +1,7 @@
 // 线上地址
 // 线上地址
-// const BASE_URL = "https://chtech.ncjti.edu.cn/campusclock"
+const BASE_URL = "https://chtech.ncjti.edu.cn/campusclock"
 // 本地地址
 // 本地地址
-const BASE_URL = "https://www.web-server.top"
+// const BASE_URL = "https://www.web-server.top"
 export const myRequest_clockIn = (options) => {
 export const myRequest_clockIn = (options) => {
 	uni.showLoading({
 	uni.showLoading({
 		title: "加载中",
 		title: "加载中",
@@ -22,7 +22,7 @@ export const myRequest_clockIn = (options) => {
 				if (res.data.code != 200) {
 				if (res.data.code != 200) {
 					if (res.data.code == 498) {
 					if (res.data.code == 498) {
 						uni.request({
 						uni.request({
-							url: 'https://www.web-server.top/attendance/api/home/permissions',
+							url: 'https://chtech.ncjti.edu.cn/campusclock/attendance/api/home/permissions',
 							header: {
 							header: {
 								'content-type': 'application/x-www-form-urlencoded',
 								'content-type': 'application/x-www-form-urlencoded',
 								'Authorization': uni.getStorageSync("token")
 								'Authorization': uni.getStorageSync("token")