back
parent
d38a86c499
commit
b9437e26e0
17
src/App.vue
17
src/App.vue
|
|
@ -1,7 +1,7 @@
|
||||||
<script>
|
<script>
|
||||||
// import { checkUpdate } from '@/utils/check-update';
|
// import { checkUpdate } from '@/utils/check-update';
|
||||||
import { strToParams } from '@/utils/tools';
|
import { strToParams } from '@/utils/tools';
|
||||||
import { wxMnpLogin } from '@/utils/login'
|
import { wxMnpLogin } from '@/utils/login';
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|
@ -15,7 +15,7 @@ export default {
|
||||||
this.$store.dispatch('app/getArticle');
|
this.$store.dispatch('app/getArticle');
|
||||||
|
|
||||||
/* #ifdef MP-WEIXIN */
|
/* #ifdef MP-WEIXIN */
|
||||||
// wxMnpLogin()
|
// wxMnpLogin()
|
||||||
/* #endif */
|
/* #endif */
|
||||||
|
|
||||||
// #ifdef APP-PLUS
|
// #ifdef APP-PLUS
|
||||||
|
|
@ -28,13 +28,12 @@ export default {
|
||||||
// checkUpdate();
|
// checkUpdate();
|
||||||
// #endif
|
// #endif
|
||||||
},
|
},
|
||||||
onShow(option) {
|
onShow(option) {
|
||||||
console.log('onShowaaa');
|
let invite_code = option.query.invite_code || strToParams(decodeURIComponent(option.query.scene)).invite_code || '';
|
||||||
let invite_code = option.query.invite_code || strToParams(decodeURIComponent(option.query.scene)).invite_code||''
|
uni.setStorageSync('INVITE_CODE', invite_code);
|
||||||
uni.setStorageSync('INVITE_CODE',invite_code)
|
/* #ifdef MP-WEIXIN */
|
||||||
/* #ifdef MP-WEIXIN */
|
// wxMnpLogin(invite_code)
|
||||||
// wxMnpLogin(invite_code)
|
/* #endif */
|
||||||
/* #endif */
|
|
||||||
},
|
},
|
||||||
onHide: function () {
|
onHide: function () {
|
||||||
console.log('App Hide');
|
console.log('App Hide');
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
<u-navbar :border-bottom="false" back-icon-color="#000000" :background="{ background: '#ffffff' }">
|
<u-navbar :border-bottom="false" back-icon-color="#000000" :background="{ background: '#ffffff' }" :custom-back="handleBack">
|
||||||
<view class="w-full">
|
<view class="w-full">
|
||||||
<u-search placeholder="搜索商品" @change="Change" @search="Search" v-model="searchText" :show-action="false"></u-search>
|
<u-search placeholder="搜索商品" @change="Change" @search="Search" v-model="searchText" :show-action="false"></u-search>
|
||||||
</view>
|
</view>
|
||||||
|
|
@ -223,6 +223,17 @@ export default {
|
||||||
this.$api.get(`/v1/store/${this.mid}/product-sku/${e.sku_id}`).then(res => {
|
this.$api.get(`/v1/store/${this.mid}/product-sku/${e.sku_id}`).then(res => {
|
||||||
this.sku = res
|
this.sku = res
|
||||||
})
|
})
|
||||||
|
},
|
||||||
|
handleBack() {
|
||||||
|
if (getCurrentPages().length > 1) {
|
||||||
|
uni.navigateBack();
|
||||||
|
} else {
|
||||||
|
// 清空桌号
|
||||||
|
uni.clearStorageSync('desk')
|
||||||
|
uni.switchTab({
|
||||||
|
url: '/pages/index/index'
|
||||||
|
})
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue