|
@@ -10,7 +10,7 @@
|
|
<tabs class="tab-content" onchange="tabbarChange" index="{{current}}">
|
|
<tabs class="tab-content" onchange="tabbarChange" index="{{current}}">
|
|
<tab-content>
|
|
<tab-content>
|
|
<home-page @change="pageSwitch" tabindex="{{current}}"></home-page>
|
|
<home-page @change="pageSwitch" tabindex="{{current}}"></home-page>
|
|
-
|
|
|
|
|
|
+
|
|
<shelf-page @change="pageSwitch" tabindex="{{current}}"></shelf-page>
|
|
<shelf-page @change="pageSwitch" tabindex="{{current}}"></shelf-page>
|
|
<my-page @customer="openCustomer" tabindex="{{current}}"></my-page>
|
|
<my-page @customer="openCustomer" tabindex="{{current}}"></my-page>
|
|
</tab-content>
|
|
</tab-content>
|
|
@@ -66,7 +66,11 @@ let getConfig;
|
|
export default {
|
|
export default {
|
|
public: {
|
|
public: {
|
|
curPage: 0,
|
|
curPage: 0,
|
|
- push_id: ''
|
|
|
|
|
|
+ push_id: '',
|
|
|
|
+ bid: '',
|
|
|
|
+ chapter_id: '',
|
|
|
|
+ send_order_id: "",
|
|
|
|
+ link_url: ''
|
|
},
|
|
},
|
|
protected: {
|
|
protected: {
|
|
current: 0,
|
|
current: 0,
|
|
@@ -103,19 +107,22 @@ export default {
|
|
showShortPop: false,
|
|
showShortPop: false,
|
|
showSignPop: false,
|
|
showSignPop: false,
|
|
home_show: 0,
|
|
home_show: 0,
|
|
- home_alert:null,
|
|
|
|
- back_alert:0,
|
|
|
|
- isInit:false,
|
|
|
|
|
|
+ home_alert: null,
|
|
|
|
+ back_alert: 0,
|
|
|
|
+ isInit: false,
|
|
},
|
|
},
|
|
async onInit() {
|
|
async onInit() {
|
|
|
|
+ let isFromPush = false;
|
|
this.$on('dispathEvt', this.changeSignPop);
|
|
this.$on('dispathEvt', this.changeSignPop);
|
|
this.$watch('current', 'watchCurrent');
|
|
this.$watch('current', 'watchCurrent');
|
|
if (this.push_id) {
|
|
if (this.push_id) {
|
|
await storage.set({ key: "push_id", value: this.push_id });
|
|
await storage.set({ key: "push_id", value: this.push_id });
|
|
}
|
|
}
|
|
|
|
+ if (this.send_order_id) {
|
|
|
|
+ await storage.set({ key: "send_order_id", value: this.send_order_id });
|
|
|
|
+ }
|
|
//今日已签到过不在弹框签到
|
|
//今日已签到过不在弹框签到
|
|
- this.getCoustom();
|
|
|
|
- this.getUser();
|
|
|
|
|
|
+
|
|
if (this.curPage && this.curPage > 0) {
|
|
if (this.curPage && this.curPage > 0) {
|
|
this.current = this.curPage
|
|
this.current = this.curPage
|
|
}
|
|
}
|
|
@@ -123,18 +130,19 @@ export default {
|
|
let { home_show } = await getConfig('task_center');
|
|
let { home_show } = await getConfig('task_center');
|
|
this.home_show = home_show;
|
|
this.home_show = home_show;
|
|
let { home_alert } = await getConfig('position');
|
|
let { home_alert } = await getConfig('position');
|
|
- if(home_alert.length>0){
|
|
|
|
|
|
+ if (home_alert.length > 0) {
|
|
this.home_alert = home_alert[0];
|
|
this.home_alert = home_alert[0];
|
|
this.showActivitys = true;
|
|
this.showActivitys = true;
|
|
}
|
|
}
|
|
- let {sign_out_app_show} = await getConfig('add_desk_alert');
|
|
|
|
|
|
+ let { sign_out_app_show } = await getConfig('add_desk_alert');
|
|
this.back_alert = sign_out_app_show;
|
|
this.back_alert = sign_out_app_show;
|
|
-
|
|
|
|
|
|
+ this.getCoustom();
|
|
|
|
+ this.getUser();
|
|
},
|
|
},
|
|
- goActicity(){
|
|
|
|
|
|
+ goActicity() {
|
|
router.push({
|
|
router.push({
|
|
uri: '/views/Activity',
|
|
uri: '/views/Activity',
|
|
- params:this.home_alert.params
|
|
|
|
|
|
+ params: this.home_alert.params
|
|
})
|
|
})
|
|
},
|
|
},
|
|
showActivity() {
|
|
showActivity() {
|
|
@@ -145,13 +153,18 @@ export default {
|
|
},
|
|
},
|
|
async onShow() {
|
|
async onShow() {
|
|
const hasInit = this.$app.getAppData('hasInit');
|
|
const hasInit = this.$app.getAppData('hasInit');
|
|
- if(hasInit){
|
|
|
|
- this.$broadcast('refreshData',{current:this.current});
|
|
|
|
|
|
+ if (hasInit) {
|
|
|
|
+ this.$broadcast('refreshData', { current: this.current });
|
|
}
|
|
}
|
|
it.getShortCut((value) => {
|
|
it.getShortCut((value) => {
|
|
this.showShortPop = !value;
|
|
this.showShortPop = !value;
|
|
|
|
+ if(value){
|
|
|
|
+ this.$app.$def.data.backClickCount = 1
|
|
|
|
+ }else{
|
|
|
|
+ this.$app.$def.data.backClickCount = 0
|
|
|
|
+ }
|
|
})
|
|
})
|
|
- this.$app.setAppData('hasInit', true);
|
|
|
|
|
|
+ this.$app.setAppData('hasInit', true);
|
|
},
|
|
},
|
|
shortEnd(value) {
|
|
shortEnd(value) {
|
|
if (value.detail.msg) {
|
|
if (value.detail.msg) {
|
|
@@ -169,6 +182,22 @@ export default {
|
|
let user = await getUserInfo();
|
|
let user = await getUserInfo();
|
|
this.user = user;
|
|
this.user = user;
|
|
this.isInit = true;
|
|
this.isInit = true;
|
|
|
|
+ if (this.send_order_id && this.link_url) {
|
|
|
|
+ let params = {
|
|
|
|
+ push_id: this.push_id,
|
|
|
|
+ bid: this.bid,
|
|
|
|
+ chapter_id: this.chapter_id,
|
|
|
|
+ send_order_id: this.send_order_id,
|
|
|
|
+ }
|
|
|
|
+ setTimeout(() => {
|
|
|
|
+ router.push({
|
|
|
|
+ uri: this.link_url,
|
|
|
|
+ params: params
|
|
|
|
+ })
|
|
|
|
+ }, 800)
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ }
|
|
},
|
|
},
|
|
goTask() {
|
|
goTask() {
|
|
router.push({
|
|
router.push({
|
|
@@ -177,7 +206,7 @@ export default {
|
|
},
|
|
},
|
|
onBackPress() {
|
|
onBackPress() {
|
|
// 退出逻辑
|
|
// 退出逻辑
|
|
- if (this.$app.$def.data.backClickCount === 0 && this.back_alert==1) {
|
|
|
|
|
|
+ if (this.$app.$def.data.backClickCount === 0 && this.back_alert == 1) {
|
|
this.$app.$def.data.backClickCount++;
|
|
this.$app.$def.data.backClickCount++;
|
|
this.$app.$def.createShortcut();
|
|
this.$app.$def.createShortcut();
|
|
return true;
|
|
return true;
|