Browse Source

烟台

xiaowang-yantai
是小王呀\24601 1 year ago
parent
commit
7d445994db
  1. 53
      yt_suishijiang/pages/index/index.vue
  2. 0
      yt_suishijiang/unpackage/dist/build/.automator/h5/.automator.json
  3. 2
      yt_suishijiang/unpackage/dist/build/h5-suishijiang/index.html
  4. 8
      yt_suishoupai/manifest.json
  5. 29
      yt_suishoupai/pages/index/index.vue

53
yt_suishijiang/pages/index/index.vue

@ -386,10 +386,26 @@ export default {
? "https://lantu.ytyanhuo.com"
: "";
console.log("sdfsf");
let timeoutFlag = false;
let timeoutId = setTimeout(() => {
if (!timeoutFlag) {
timeoutFlag = true;
console.log("获取位置超时");
uni.hideLoading();
uni.showModal({
title: "温馨提示",
content: "获取位置超时,请打开手机定位",
confirmText: "确定",
showCancel: false,
});
}
}, 10000); // 3
uni.getLocation({
type: "gcj02",
geocode: true,
success(res) {
clearTimeout(timeoutId);
_this.setData({
curAddress: res.address,
locations: {
@ -417,24 +433,25 @@ export default {
});
},
fail() {
uni.showModal({
title: "温馨提示",
content: "提交随手拍需要获取您的位置信息",
confirmText: "确定",
success: (result) => {
if (result.confirm) {
console.log(this);
console.log(_this);
_this.getLocation();
}
},
fail() {
uni.hideLoading();
uni.alert({
title: "事件上报需要您的位置,请打开定位。",
});
},
});
clearTimeout(timeoutId);
// uni.showModal({
// title: "",
// content: "",
// confirmText: "",
// success: (result) => {
// if (result.confirm) {
// console.log(this);
// console.log(_this);
// _this.getLocation();
// }
// },
// fail() {
// uni.hideLoading();
// uni.alert({
// title: ",",
// });
// },
// });
},
});
// uni.showLoading();

0
yt_suishijiang/unpackage/dist/build/.automator/h5/.automator.json

2
yt_suishijiang/unpackage/dist/build/h5-suishijiang/index.html

@ -1,2 +1,2 @@
<!DOCTYPE html><html lang=zh-CN><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><title>yantai</title><script>var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)'))
document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel=stylesheet href=/h5-suishijiang/static/index.2da1efab.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/h5-suishijiang/static/js/chunk-vendors.d940854d.js></script><script src=/h5-suishijiang/static/js/index.610adbeb.js></script></body></html>
document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel=stylesheet href=/h5-suishijiang/static/index.2da1efab.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/h5-suishijiang/static/js/chunk-vendors.d940854d.js></script><script src=/h5-suishijiang/static/js/index.50bb07c2.js></script></body></html>

8
yt_suishoupai/manifest.json

@ -58,7 +58,7 @@
"usingComponents" : true
},
"h5" : {
"appid" : "h5-suishijiang",
"appid" : "h5-suishoupai",
"devServer" : {
"port" : 8080,
"proxy" : {
@ -66,11 +66,11 @@
"target" : "https://apis.map.qq.com",
"changeOrigin" : true
},
"/h5-suishijiang" : {
"/h5-suishoupai" : {
"target" : "https://lantu.ytyanhuo.com",
"changeOrigin" : true,
"pathRewrite" : {
"^/h5-suishijiang" : ""
"^/h5-suishoupai" : ""
}
},
"https://lantu.ytyanhuo.com" : {
@ -96,7 +96,7 @@
}
},
"router" : {
"base" : "/h5-suishijiang/"
"base" : "/h5-suishoupai/"
}
},
"mp-baidu" : {

29
yt_suishoupai/pages/index/index.vue

@ -422,10 +422,27 @@ export default {
process.env.NODE_ENV !== "development"
? "https://lantu.ytyanhuo.com"
: "";
let timeoutFlag = false;
let timeoutId = setTimeout(() => {
if (!timeoutFlag) {
timeoutFlag = true;
console.log("获取位置超时");
uni.hideLoading();
uni.showModal({
title: "温馨提示",
content: "获取位置超时,请打开手机定位",
confirmText: "确定",
showCancel: false,
});
}
}, 10000);
uni.getLocation({
type: "gcj02",
geocode: true,
success(res) {
clearTimeout(timeoutId);
_this.setData({
curAddress: res.address,
locations: {
@ -453,16 +470,8 @@ export default {
});
},
fail() {
uni.showModal({
title: "温馨提示",
content: "提交随手拍需要获取您的位置信息",
confirmText: "确定",
success: (result) => {
if (result.confirm) {
_this.getLocation();
}
},
});
clearTimeout(timeoutId);
},
});
},

Loading…
Cancel
Save