feat: 模型增加经纬度
This commit is contained in:
File diff suppressed because one or more lines are too long
2
dist/pages/home/index.js
vendored
2
dist/pages/home/index.js
vendored
File diff suppressed because one or more lines are too long
@@ -122,14 +122,22 @@ const details = () => {
|
||||
<View>
|
||||
<Cell
|
||||
icon="clock"
|
||||
title={`开始时间 ${dataSource?.startTime?moment(dataSource?.startTime).format('YYYY-MM-DD HH:mm:ss'):''}`}
|
||||
title={`开始时间 ${
|
||||
dataSource?.startTime
|
||||
? moment(dataSource?.startTime).format("YYYY-MM-DD HH:mm:ss")
|
||||
: ""
|
||||
}`}
|
||||
// isLink
|
||||
// linkType="navigateTo"
|
||||
// url="/pages/dashboard/index"
|
||||
/>
|
||||
<Cell
|
||||
icon="clock"
|
||||
title={`结束时间 ${dataSource?.endTime?moment(dataSource?.endTime).format('YYYY-MM-DD HH:mm:ss'):''}`}
|
||||
title={`结束时间 ${
|
||||
dataSource?.endTime
|
||||
? moment(dataSource?.endTime).format("YYYY-MM-DD HH:mm:ss")
|
||||
: ""
|
||||
}`}
|
||||
// isLink
|
||||
// linkType="navigateTo"
|
||||
// url="/pages/dashboard/index"
|
||||
@@ -140,6 +148,13 @@ const details = () => {
|
||||
title={`${dataSource?.address}`}
|
||||
linkType="navigateTo"
|
||||
url="/pages/dashboard/index"
|
||||
onClick={() => {
|
||||
Taro.openLocation({
|
||||
latitude: dataSource?.latitude,
|
||||
longitude: dataSource?.longitude,
|
||||
scale: 18,
|
||||
});
|
||||
}}
|
||||
/>
|
||||
|
||||
<Cell
|
||||
|
||||
@@ -61,7 +61,7 @@ const Home = () => {
|
||||
path: "/page/user?id=123",
|
||||
};
|
||||
});
|
||||
|
||||
|
||||
// 分享到朋友圈
|
||||
useShareTimeline(() => {
|
||||
return {
|
||||
@@ -91,7 +91,7 @@ const Home = () => {
|
||||
getsystemConfig(); //获取系统配置
|
||||
setTimeout(() => {
|
||||
getdetails(); //获取活动详情
|
||||
}, 1000);
|
||||
}, 300);
|
||||
}, []);
|
||||
|
||||
useEffect(() => {
|
||||
@@ -244,11 +244,15 @@ const Home = () => {
|
||||
// Taro.navigateTo({
|
||||
// url: `/pages/home/components/CheckIn/index?fileID=${tempFilePaths?.[0]}`,
|
||||
// });
|
||||
|
||||
uploadTaro(tempFilePaths);
|
||||
},
|
||||
complete: () => {
|
||||
// 刷新页面数据
|
||||
getsystemConfig(); //获取系统配置
|
||||
setTimeout(() => {
|
||||
getdetails(); //获取活动详情
|
||||
}, 300);
|
||||
uploadTaro(tempFilePaths);
|
||||
},
|
||||
});
|
||||
};
|
||||
@@ -370,7 +374,18 @@ const Home = () => {
|
||||
setisIn(true);
|
||||
console.log("isin", isin);
|
||||
if (isin) {
|
||||
chooseImage();
|
||||
// 获取定位信息
|
||||
Taro.getLocation({
|
||||
type: "gcj02", //返回可以用于 Taro.openLocation的经纬度
|
||||
success: function (res) {
|
||||
console.log("lbs", res);
|
||||
const latitude = res.latitude;
|
||||
const longitude = res.longitude;
|
||||
// 拍照上传
|
||||
chooseImage();
|
||||
},
|
||||
});
|
||||
// chooseImage();
|
||||
} else {
|
||||
Toast.fail({
|
||||
message: "请先登录",
|
||||
|
||||
Reference in New Issue
Block a user