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" ? "https://lantu.ytyanhuo.com"
: ""; : "";
console.log("sdfsf"); 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({ uni.getLocation({
type: "gcj02", type: "gcj02",
geocode: true, geocode: true,
success(res) { success(res) {
clearTimeout(timeoutId);
_this.setData({ _this.setData({
curAddress: res.address, curAddress: res.address,
locations: { locations: {
@ -417,24 +433,25 @@ export default {
}); });
}, },
fail() { fail() {
uni.showModal({ clearTimeout(timeoutId);
title: "温馨提示", // uni.showModal({
content: "提交随手拍需要获取您的位置信息", // title: "",
confirmText: "确定", // content: "",
success: (result) => { // confirmText: "",
if (result.confirm) { // success: (result) => {
console.log(this); // if (result.confirm) {
console.log(_this); // console.log(this);
_this.getLocation(); // console.log(_this);
} // _this.getLocation();
}, // }
fail() { // },
uni.hideLoading(); // fail() {
uni.alert({ // uni.hideLoading();
title: "事件上报需要您的位置,请打开定位。", // uni.alert({
}); // title: ",",
}, // });
}); // },
// });
}, },
}); });
// uni.showLoading(); // 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)')) <!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 "usingComponents" : true
}, },
"h5" : { "h5" : {
"appid" : "h5-suishijiang", "appid" : "h5-suishoupai",
"devServer" : { "devServer" : {
"port" : 8080, "port" : 8080,
"proxy" : { "proxy" : {
@ -66,11 +66,11 @@
"target" : "https://apis.map.qq.com", "target" : "https://apis.map.qq.com",
"changeOrigin" : true "changeOrigin" : true
}, },
"/h5-suishijiang" : { "/h5-suishoupai" : {
"target" : "https://lantu.ytyanhuo.com", "target" : "https://lantu.ytyanhuo.com",
"changeOrigin" : true, "changeOrigin" : true,
"pathRewrite" : { "pathRewrite" : {
"^/h5-suishijiang" : "" "^/h5-suishoupai" : ""
} }
}, },
"https://lantu.ytyanhuo.com" : { "https://lantu.ytyanhuo.com" : {
@ -96,7 +96,7 @@
} }
}, },
"router" : { "router" : {
"base" : "/h5-suishijiang/" "base" : "/h5-suishoupai/"
} }
}, },
"mp-baidu" : { "mp-baidu" : {

29
yt_suishoupai/pages/index/index.vue

@ -422,10 +422,27 @@ export default {
process.env.NODE_ENV !== "development" process.env.NODE_ENV !== "development"
? "https://lantu.ytyanhuo.com" ? "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({ uni.getLocation({
type: "gcj02", type: "gcj02",
geocode: true, geocode: true,
success(res) { success(res) {
clearTimeout(timeoutId);
_this.setData({ _this.setData({
curAddress: res.address, curAddress: res.address,
locations: { locations: {
@ -453,16 +470,8 @@ export default {
}); });
}, },
fail() { fail() {
uni.showModal({ clearTimeout(timeoutId);
title: "温馨提示",
content: "提交随手拍需要获取您的位置信息",
confirmText: "确定",
success: (result) => {
if (result.confirm) {
_this.getLocation();
}
},
});
}, },
}); });
}, },

Loading…
Cancel
Save