-
{{ params.address }}(附近)
+
{{ params.address }}
{{ params.time }}
@@ -22,6 +22,7 @@
:key="index"
:type="item.type"
:icon="item.icon"
+ v-show="item.show"
@click="onErrorReport(item.name)"
>{{ item.text }}
@@ -48,7 +49,6 @@ export default {
inject: ["reload"],
data(){
return {
- title: '进入涉水区域警报',
alarm: {
message: '你的孩子靠近水域危险区',
address: '',
@@ -62,8 +62,8 @@ export default {
lat: ''
},
buttonList: [
- { name: 'goHere', text: '去这里', type: 'primary', icon: 'guide-o' },
- { name: 'errorReport', text: '误报', type: 'primary', icon: 'warn-o' },
+ { name: 'goHere', text: '去这里', type: 'primary', icon: 'guide-o', show: true},
+ { name: 'errorReport', text: '误报', type: 'primary', icon: 'warn-o', show: true },
],
map: {
geocoder: null,
@@ -90,8 +90,14 @@ export default {
time: ''
},
isPageShow: null,
+ status: 1
}
},
+ computed: {
+ title() {
+ return this.status === "1" ? '进入涉水区域警报' : '离开涉水区域警报';
+ }
+ },
created() {
this.getAuth();
this.getParams();
@@ -111,6 +117,9 @@ export default {
if (isNotNull(params)) {
console.log("params", params);
this.params = {...params};
+ this.buttonList[1].show = params.status === "1";
+ this.status = params.status;
+ this.alarm.message = params.status === "1" ? '你的孩子靠近水域危险区': '你的孩子离开水域危险区';
this.isPageShow = true;
this.initAmap();
console.log("this.params", this.params);
@@ -183,7 +192,7 @@ export default {
if (status == "complete" && result.info == "OK") {
this.currentAddress.address = result.regeocode.formattedAddress;
this.alarm.address = result.regeocode.formattedAddress;
- console.log("当前地址", this.currentAddress.address);
+ console.log("使用高德逆地理解析得到的地址", this.currentAddress.address);
}
});
},
From b68ccefb59910226f6c9faff27da412a3aa76627 Mon Sep 17 00:00:00 2001
From: JinxChen <2183691628@qq.com>
Date: Mon, 3 Apr 2023 11:04:56 +0800
Subject: [PATCH 10/11] =?UTF-8?q?update=20-=20packageHome=20=20=20=20=20-?=
=?UTF-8?q?=20=E5=A2=9E=E5=8A=A0=20=E8=BF=9B=E5=85=A5=E9=A6=96=E9=A1=B5?=
=?UTF-8?q?=E5=88=A4=E6=96=AD=E6=98=AF=E5=90=A6=E5=AD=98=E5=9C=A8redUrl?=
=?UTF-8?q?=E7=9A=84=E9=80=BB=E8=BE=91?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
README.md | 6 ++++++
src/config/models.js | 2 +-
src/views/package-home/index.vue | 18 ++++++++++--------
3 files changed, 17 insertions(+), 9 deletions(-)
diff --git a/README.md b/README.md
index a2addb2..fc58656 100644
--- a/README.md
+++ b/README.md
@@ -322,3 +322,9 @@ update
- packageList
- 修改 微信支付方式
+
+## v1.0.38
+`2023.4.3`
+update
+- packageHome
+ - 增加 进入首页判断是否存在redUrl的逻辑
\ No newline at end of file
diff --git a/src/config/models.js b/src/config/models.js
index cdd30b0..a6de2d4 100644
--- a/src/config/models.js
+++ b/src/config/models.js
@@ -5,7 +5,7 @@
* @FilePath: \TelpoH5FrontendWeb\src\config\models.js
* @description:
*/
-export const VERSION_MODEL = '1.0.37F'; //版本号
+export const VERSION_MODEL = '1.0.38F'; //版本号
export const IMAGE_URL = {
production: 'http://zfb.ssjlai.com/web/',
test: 'http://zfb.ssjlai.com/web/',
diff --git a/src/views/package-home/index.vue b/src/views/package-home/index.vue
index 2510fec..349aece 100644
--- a/src/views/package-home/index.vue
+++ b/src/views/package-home/index.vue
@@ -1,7 +1,7 @@
@@ -27,11 +27,8 @@ export default {
created() {
this.getToken();
this.getAuth();
- this.getParams();
this.checkImei();
- },
- mounted() {
-
+ this.getParams();
},
methods: {
checkImei() {
@@ -40,13 +37,10 @@ export default {
iccid: this.params.imei || ''
};
APIWx.CheckImei(reqBody).then(res =>{
- console.log("checkImei", res);
let data = res.data;
if(data) {
this.isRecharge = data.isRecharge;
- console.log("是否已经支付", this.isRecharge);
};
- this.checkBrowser();
}).catch(e => {
console.log("e", e.message);
})
@@ -141,6 +135,14 @@ export default {
console.log("params", params);
this.params = {...params};
this.$store.commit("appId", params.appId);
+ if(params.redUrl) {
+ const redUrl = encodeURI(params.redUrl);
+ console.log("redUrl", params.redUrl, redUrl);
+ window.location.href = redUrl;
+ } else {
+ console.log("不存在redUrl");
+ this.checkBrowser();
+ }
console.log("this.params", this.params);
}
},
From 62a4041e1eb74ecbe82bd1b0577fe12d5ff862cf Mon Sep 17 00:00:00 2001
From: JinxChen <2183691628@qq.com>
Date: Mon, 3 Apr 2023 11:11:56 +0800
Subject: [PATCH 11/11] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20params=20reqUrl?=
=?UTF-8?q?=E5=8F=82=E6=95=B0=E8=8E=B7=E5=8F=96=E9=94=99=E8=AF=AF=E7=9A=84?=
=?UTF-8?q?=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/package-home/index.vue | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/views/package-home/index.vue b/src/views/package-home/index.vue
index 349aece..5adc03a 100644
--- a/src/views/package-home/index.vue
+++ b/src/views/package-home/index.vue
@@ -1,7 +1,7 @@
@@ -135,10 +135,10 @@ export default {
console.log("params", params);
this.params = {...params};
this.$store.commit("appId", params.appId);
- if(params.redUrl) {
- const redUrl = encodeURI(params.redUrl);
- console.log("redUrl", params.redUrl, redUrl);
- window.location.href = redUrl;
+ if(params.reqUrl) {
+ const reqUrl = encodeURI(params.reqUrl);
+ console.log("reqUrl", params.reqUrl, reqUrl);
+ window.location.href = reqUrl;
} else {
console.log("不存在redUrl");
this.checkBrowser();