|
@@ -47,13 +47,20 @@
|
|
confirm-text="知道了"
|
|
confirm-text="知道了"
|
|
:title="descriptionTitle" >
|
|
:title="descriptionTitle" >
|
|
<view v-html="descriptionHtml" style="padding: 10px;font-size: 14px;"></view>
|
|
<view v-html="descriptionHtml" style="padding: 10px;font-size: 14px;"></view>
|
|
|
|
+ </u-modal>
|
|
|
|
+
|
|
|
|
+ <u-modal v-model="gotoGzShow" @confirm="gotoGz" cancel-text="暂不关注" @cancel="cancelGz" confirm-text="前往关注"
|
|
|
|
+ confirm-color="#53b56b" :show-cancel-button="true" ref="uModal2" :asyncClose="true">
|
|
|
|
+ <view style="padding: 15px;">请关注<span
|
|
|
|
+ style=" color: #53b56b;">{{projectName}}</span>公众号,以便第一时间收到充电结束消息提醒</view>
|
|
</u-modal>
|
|
</u-modal>
|
|
|
|
|
|
</view>
|
|
</view>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
- import * as API from '@/apis/index.js'
|
|
|
|
|
|
+ import * as API from '@/apis/index.js'
|
|
|
|
+ import * as API_weixin from '@/apis/weixin.js'
|
|
import {
|
|
import {
|
|
newDate,
|
|
newDate,
|
|
currentTimeStamp,
|
|
currentTimeStamp,
|
|
@@ -197,7 +204,9 @@
|
|
}
|
|
}
|
|
},
|
|
},
|
|
data() {
|
|
data() {
|
|
- return {
|
|
|
|
|
|
+ return {
|
|
|
|
+ gotoGzShow:false,
|
|
|
|
+ projectName: "",
|
|
description:'',
|
|
description:'',
|
|
descriptionHtml:'',
|
|
descriptionHtml:'',
|
|
descriptionShow:false,
|
|
descriptionShow:false,
|
|
@@ -262,7 +271,7 @@
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
|
|
|
|
-
|
|
|
|
|
|
+ this.projectName = process.car.ProjectName;
|
|
var nowtime = parseUnixTime(currentTimeStamp(), '{y}-{m}-{d} {h}')
|
|
var nowtime = parseUnixTime(currentTimeStamp(), '{y}-{m}-{d} {h}')
|
|
var time=this.carhelp.get("getTips_$");
|
|
var time=this.carhelp.get("getTips_$");
|
|
if((time&&nowtime==time)){
|
|
if((time&&nowtime==time)){
|
|
@@ -276,10 +285,45 @@
|
|
|
|
|
|
})
|
|
})
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+ if (this.carhelp.getGzDate() && !this.gotoGzShow) {
|
|
|
|
+
|
|
|
|
+ this.checkSubscribe()
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ // this.checkSubscribe()
|
|
|
|
|
|
},
|
|
},
|
|
- methods: {
|
|
|
|
|
|
+ methods: {
|
|
|
|
+ checkSubscribe() {
|
|
|
|
+ API_weixin.checkSubscribe({
|
|
|
|
+ openId: this.carhelp.getOpenId()
|
|
|
|
+ }).then((res) => {
|
|
|
|
+
|
|
|
|
+ if (res.data == "0") {
|
|
|
|
+
|
|
|
|
+ this.gotoGzShow = true;
|
|
|
|
+ } else {
|
|
|
|
+ this.carhelp.setGzDate()
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ //setGzDate
|
|
|
|
+ }).catch(error => {
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title: error
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
+ cancelGz() {
|
|
|
|
+ this.carhelp.setGzDate()
|
|
|
|
+ },
|
|
|
|
+ gotoGz() {
|
|
|
|
+ this.carhelp.setGzDate()
|
|
|
|
+ this.gotoGzShow = false;
|
|
|
|
+ var url = "https://mp.weixin.qq.com/s/mCHz1nNvg0xAICiBeIyKRQ";
|
|
|
|
+ window.location.href = url
|
|
|
|
+
|
|
|
|
+ },
|
|
getConfigMessage(){
|
|
getConfigMessage(){
|
|
let url=window.location.href.split("#/")[1];
|
|
let url=window.location.href.split("#/")[1];
|
|
let routes = getCurrentPages(); // 获取当前打开过的页面路由数组
|
|
let routes = getCurrentPages(); // 获取当前打开过的页面路由数组
|