Преглед изворни кода

refactor: 统一接口命名规则

HMY пре 1 година
родитељ
комит
48bedf809f

+ 2 - 2
App.vue

@@ -1,6 +1,6 @@
 <script>
 import { getUserInfo } from '@/utils/auth'
-import { CheckAttendance } from '@/api/mine.js'
+import { checkAttendance } from '@/api/mine.js'
 import $tab from '@/plugins/tab.js'
 export default {
 	onLaunch: function () {
@@ -35,7 +35,7 @@ export default {
 						rizi: (now.getFullYear()) + '-' + (now.getMonth() + 1) + '-' + (now.getDate())
 					}
 					// 获取当天考勤信息
-					CheckAttendance(params).then(({ returnParams }) => { 
+					checkAttendance(params).then(({ returnParams }) => { 
 						if (returnParams.list.length) {
 							// 已签到 跳转消息页
 							$tab.reLaunch('/pages/message/index')

+ 2 - 2
pages/mine/checkIn/checkIn.vue

@@ -106,7 +106,7 @@
 
 <script setup>
 import { ref, onMounted, reactive } from 'vue';
-import { CheckAttendance, getMyTotalCount } from '@/api/mine.js'
+import { checkAttendance, getMyTotalCount } from '@/api/mine.js'
 import { useUserStore } from '@/store/user.js';
 const userStore = useUserStore();
 
@@ -200,7 +200,7 @@ function getDayAttData() {
 		universalid: userId.value,
 		rizi: todayData.day
 	}
-	CheckAttendance(params).then(res => {
+	checkAttendance(params).then(res => {
 		if ("success" == res.returnMsg) {
 			const attList = res.returnParams.list;
 			const time1 = attList.find(item => item.att_type_id === '1');

+ 6 - 6
pages/mine/clockIn/clockIn.vue

@@ -63,8 +63,8 @@
 	import config from '@/config.js';
 	import {
 		createAttendance,
-		TranAddress,
-		CheckAttendance
+		tranAddress,
+		checkAttendance
 	} from '@/api/mine.js'
 	const userStore = useUserStore();
 	const thisUser = userStore.user;
@@ -106,7 +106,7 @@
 			universalid: thisUser.useId,
 			rizi: currentDate.value
 		}
-		CheckAttendance(params).then(res => {
+		checkAttendance(params).then(res => {
 			if ("success" == res.returnMsg) {
 				// console.log("kaoqin",res);
 				const attList = res.returnParams.list;
@@ -249,13 +249,13 @@
 	// 获取当前位置地址
 	function getAddress() {
 		getlocation(); // 获取当前位置
-		tranAddress(); // 执行地址转换
+		tranLocationToAddress(); // 执行地址转换
 	}
 
 	// 经纬度转地址
-	function tranAddress() {
+	function tranLocationToAddress() {
 		let locationStr = latitude.value + ',' + longitude.value; // 组合经纬度
-		TranAddress(locationStr).then(res => {
+		tranAddress(locationStr).then(res => {
 				console.log('请求成功', res);
 				address.value = res.result.address; // 保存地址
 			})

+ 2 - 2
pages/mine/edit/edit.vue

@@ -61,7 +61,7 @@
 		onMounted
 	} from 'vue';
 	import { useUserStore } from '@/store/user';
-	import { ModifyMe } from '@/api/mine';
+	import { modifyMe } from '@/api/mine';
 	import $modal from '@/plugins/modal.js'
 	// 定义用户信息的响应式对象
 	const thisUser=useUserStore().user;
@@ -109,7 +109,7 @@
 		// 	});
 		// 	return; // 终止提交
 		// }
-		ModifyMe(userInfo).then(res=>{
+		modifyMe(userInfo).then(res=>{
 			// console.log(res);
 			if("success"==res.returnMsg){
 				$modal.showToast('修改成功');

+ 3 - 3
pages/mine/index.vue

@@ -159,7 +159,7 @@
 	.info-detail {
 		flex-grow: 1;
 		font-size: 18px;
-		text-align: center;
+		// text-align: center;
 	}
 
 	.name {
@@ -187,7 +187,7 @@
 
 	.title {
 		flex-grow: 1;
-		font-size: 16px;
+		font-size: 15px;
 	}
 
 	.desc {
@@ -211,7 +211,7 @@
 
 	//样式穿透
 	::v-deep .uni-list-cell {
-		justify-content: center;
+		justify-content: left;
 	}
 
 	::v-deep .uni-list-cell-left {

+ 2 - 2
pages/mine/setting/pwdEdit/pwdEdit.vue

@@ -32,7 +32,7 @@
 	} from 'vue';
 	import $modal from '@/plugins/modal.js'
 	import {
-		ChangePWD
+		changePWD
 	} from '@/api/mine';
 	import {
 		useUserStore
@@ -66,7 +66,7 @@
 			oldpassword: oldPassword.value,
 			newpassword: newPassword.value,
 		}
-		ChangePWD(params).then(res => {
+		changePWD(params).then(res => {
 			$modal.showToast(res.returnMsg);
 			if ("1" == res.returnCode) { //修改成功
 				userStore.LogOut().then(() => {