Browse Source

app 考勤打卡

黑艺新账号
yxq 1 year ago
parent
commit
14a217d070
2 changed files with 50 additions and 3 deletions
  1. +49
    -2
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/common/wxFn.js
  2. +1
    -1
      Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/AttendanceCard/list.vue

+ 49
- 2
Learun.Framework.Ultimate V7/LearunApp-2.2.0/common/wxFn.js View File

@@ -61,7 +61,6 @@ export default {
var longitude = res.longitude; // 经度,浮点数,范围为180 ~ -180。 var longitude = res.longitude; // 经度,浮点数,范围为180 ~ -180。
var speed = res.speed; // 速度,以米/每秒计 var speed = res.speed; // 速度,以米/每秒计
var accuracy = res.accuracy; // 位置精度 var accuracy = res.accuracy; // 位置精度
console.log(res)
resolve({ resolve({
lat:latitude, lat:latitude,
lng:longitude lng:longitude
@@ -73,7 +72,55 @@ export default {
} }
}); });
}) })
}
},
// 拍照
async chooseImage() {
return new Promise(async (resolve) => {
if (!this.wxInit) {
let res = await this.initWx(["chooseImage"])
if(!res){
resolve(false)
return
}
}
if(!wx.chooseImage){
this.TOAST("无效方法")
resolve(false)
}
wx.chooseImage({
count: 1, // 默认9
sizeType: ['original'], // 可以指定是原图还是压缩图,默认二者都有
sourceType: ['camera'], // 可以指定来源是相册还是相机,默认二者都有
success: function(res) {
var localIds = res.localIds;// 返回选定照片的本地ID列表,localId可以作为img标签的src属性显示图片
},
fail: function(error) {
this.TOAST("定位失败")
resolve(false)
}
});
})
},
// 预览图片
async previewImage(url,urlArr) {
return new Promise(async (resolve) => {
if (!this.wxInit) {
let res = await this.initWx(["previewImage"])
if(!res){
resolve(false)
return
}
}
if(!wx.previewImage){
this.TOAST("无效方法")
resolve(false)
}
wx.previewImage({
current: url, // 当前显示图片的http链接
urls: urlArr // 需要预览的图片http链接列表
});
})
},


} }
} }

+ 1
- 1
Learun.Framework.Ultimate V7/LearunApp-2.2.0/pages/AttendanceCard/list.vue View File

@@ -199,7 +199,7 @@
resolve(false) resolve(false)
} }
new BMapGL.Convertor().translate([res], 3, 5, data => { new BMapGL.Convertor().translate([res], 3, 5, data => {
if(res.status = 0){
if(res.status == 0){
alert(res.points[0].lng + '' + res.points[0].lat) alert(res.points[0].lng + '' + res.points[0].lat)
resolve(res.points[0]) resolve(res.points[0])
}else{ }else{


Loading…
Cancel
Save