|
@@ -28,7 +28,7 @@
|
|
|
<template v-if="!showList">
|
|
<template v-if="!showList">
|
|
|
<view class="btn" @click="checkIn">打卡</view>
|
|
<view class="btn" @click="checkIn">打卡</view>
|
|
|
<view class="location">
|
|
<view class="location">
|
|
|
- <u--text @click="getLocation" :lines="1" :block="true" align="center" size="24rpx" :text="address">
|
|
|
|
|
|
|
+ <u--text @click="getLocation" :lines="1" :block="true" align="center" size="32rpx" :text="address">
|
|
|
</u--text>
|
|
</u--text>
|
|
|
<u-loading-icon mode="circle" size="24rpx" :show="show"></u-loading-icon>
|
|
<u-loading-icon mode="circle" size="24rpx" :show="show"></u-loading-icon>
|
|
|
</view>
|
|
</view>
|
|
@@ -101,7 +101,7 @@
|
|
|
header: {
|
|
header: {
|
|
|
"Content-Type": "application/text"
|
|
"Content-Type": "application/text"
|
|
|
},
|
|
},
|
|
|
- url: 'http://apis.map.qq.com/ws/geocoder/v1/?location=' + latitude + ',' + longitude +
|
|
|
|
|
|
|
+ url: process.uniEnv.VUE_APP_PROTOCOL + 'apis.map.qq.com/ws/geocoder/v1/?location=' + latitude + ',' + longitude +
|
|
|
'&key=6REBZ-BRN6J-BMAFY-FIRI3-SMK43-G3FXU',
|
|
'&key=6REBZ-BRN6J-BMAFY-FIRI3-SMK43-G3FXU',
|
|
|
success(re) {
|
|
success(re) {
|
|
|
if (re.statusCode === 200) {
|
|
if (re.statusCode === 200) {
|
|
@@ -138,18 +138,18 @@
|
|
|
// this.$refs.upload.choose()
|
|
// this.$refs.upload.choose()
|
|
|
const [err, res] = await uni.chooseImage({
|
|
const [err, res] = await uni.chooseImage({
|
|
|
count: 1, //默认9
|
|
count: 1, //默认9
|
|
|
- sizeType: ['original'] //可以指定是原图还是压缩图,默认二者都有
|
|
|
|
|
|
|
+ sizeType: ['original'], //可以指定是原图还是压缩图,默认二者都有
|
|
|
|
|
+ sourceType:['camera']
|
|
|
})
|
|
})
|
|
|
console.log(res, 'rs');
|
|
console.log(res, 'rs');
|
|
|
if (err) return
|
|
if (err) return
|
|
|
this.select(res)
|
|
this.select(res)
|
|
|
res.tempFiles[0].name = (new Date()).getTime() + ''
|
|
res.tempFiles[0].name = (new Date()).getTime() + ''
|
|
|
- res.tempFiles[0].type = 'image'
|
|
|
|
|
|
|
+ res.tempFiles[0].type = ''
|
|
|
console.log(res.tempFiles[0], typeof res.tempFiles[0])
|
|
console.log(res.tempFiles[0], typeof res.tempFiles[0])
|
|
|
},
|
|
},
|
|
|
// // 选择上传触发函数
|
|
// // 选择上传触发函数
|
|
|
select(e) {
|
|
select(e) {
|
|
|
- console.log(e)
|
|
|
|
|
let url = process.uniEnv.VUE_APP_UPLOAD_WEED
|
|
let url = process.uniEnv.VUE_APP_UPLOAD_WEED
|
|
|
uni.request({
|
|
uni.request({
|
|
|
url, //仅为示例,并非真实接口地址。
|
|
url, //仅为示例,并非真实接口地址。
|
|
@@ -160,7 +160,7 @@
|
|
|
},
|
|
},
|
|
|
// 上传函数
|
|
// 上传函数
|
|
|
async uploadFiles(e, res) {
|
|
async uploadFiles(e, res) {
|
|
|
- let action = 'http://' + res.url + '/' + res.fid
|
|
|
|
|
|
|
+ let action = process.uniEnv.VUE_APP_PROTOCOL + res.publicUrl + '/' + res.fid
|
|
|
uni.uploadFile({
|
|
uni.uploadFile({
|
|
|
url: action,
|
|
url: action,
|
|
|
filePath: e.tempFilePaths[0],
|
|
filePath: e.tempFilePaths[0],
|