lilei 4 éve
szülő
commit
56fc6525c3

+ 1 - 1
App.vue

@@ -1,7 +1,7 @@
 <script>
 	// const uat_URL = 'http://md.test.zyucgj.com/at-employee/' // 预发布
 	// const uat_URL = 'http://192.168.16.107:7300/mock/5f5af637cb0f492ad4ee858f/app/at-employee/' // mock
-	const uat_URL = 'http://192.168.16.100:9102/at-employee/' // 本地
+	const uat_URL = 'http://192.168.16.104:9102/at-employee/' // 本地
 	const pro_URL = 'https://car.zyucgj.com/at-employee/'  // 生产
 	const buildType = 0 // 打包环境对应类型,1 生产 0 预发布
 	const buildURL = buildType ? pro_URL : uat_URL // 打包后实际对应的url

+ 20 - 1
libs/tools.js

@@ -275,7 +275,26 @@ export const clzConfirm = function(opts){
 		)
 	// #endif
 }
-
+// 保存图片到阿里云
+export const saveImgToAliOss = function(src,callback){
+	uni.uploadFile({
+		// url: getApp().globalData.baseUrl + '/upload', //自行修改各自的对应的接口 
+		url:'http://md.test.zyucgj.com/saas/clz/upload',
+		filePath: e.target,
+		name: 'file',
+		success: (uploadFileRes) => {
+			if (uploadFileRes) {
+				let res = JSON.parse(uploadFileRes.data);
+				callback(res)
+			}
+			uni.showToast({
+				icon: 'none',
+				title: uploadFileRes ? '保存图片成功' : '保存图片失败'
+			})
+			uni.hideLoading()
+		}
+	});
+}
 // 保存base64 图片数据到阿里云
 export const saveBase64ToAliOss = function(base64,callback){
 	let bitmap = new plus.nativeObj.Bitmap();

+ 15 - 15
pages/signIn/signIn.vue

@@ -38,7 +38,7 @@ export default {
 		return {
 			stores: null,  //  门店信息
 			location: '', //  当前位置地址
-			photograph: '', //  拍照
+			photograph: '', //  拍照临时地址
 			position: null // 位置信息
 		};
 	},
@@ -61,9 +61,9 @@ export default {
 				geocode: true,
 				success: function(res) {
 					console.log(res);
+					_this.position = res;
 					_this.location = res.address.province + res.address.city + res.address.district + res.address.street + res.address.streetNum +'靠近' + res.address.poiName
 					// console.log(_this.location, '城市编码 ', res.address.cityCode)
-					_this.position = res;
 				},
 				fail: function(error){
 					console.log(error)
@@ -90,6 +90,19 @@ export default {
 				}
 			});
 		},
+		//  预览签到图
+		previewPictures() {
+			const photograph = [this.photograph];
+			uni.previewImage({
+				urls: photograph
+			});
+		},
+		//  删除签到图
+		cancelPhotograph() {
+			setTimeout(() => {
+				this.photograph = '';
+			}, 500);
+		},
 		//  签到
 		signInFun() {
 			if(!this.position || !this.position.latitude || !this.position.longitude){
@@ -117,19 +130,6 @@ export default {
 				}
 			});
 		},
-		//  预览签到图
-		previewPictures() {
-			const photograph = [this.photograph];
-			uni.previewImage({
-				urls: photograph
-			});
-		},
-		//  删除签到图
-		cancelPhotograph() {
-			setTimeout(() => {
-				this.photograph = '';
-			}, 500);
-		}
 	}
 };
 </script>

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 0 - 0
unpackage/dist/dev/app-plus/app-config-service.js


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 0 - 0
unpackage/dist/dev/app-plus/app-service.js


A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 38 - 45
unpackage/dist/dev/app-plus/app-view.js


Nem az összes módosított fájl került megjelenítésre, mert túl sok fájl változott