6
0
Fork 0
develop
panliang 2023-02-26 10:39:49 +08:00
parent d38a86c499
commit b9437e26e0
2 changed files with 20 additions and 10 deletions

View File

@ -1,7 +1,7 @@
<script>
// import { checkUpdate } from '@/utils/check-update';
import { strToParams } from '@/utils/tools';
import { wxMnpLogin } from '@/utils/login'
import { wxMnpLogin } from '@/utils/login';
export default {
data() {
return {
@ -15,7 +15,7 @@ export default {
this.$store.dispatch('app/getArticle');
/* #ifdef MP-WEIXIN */
// wxMnpLogin()
// wxMnpLogin()
/* #endif */
// #ifdef APP-PLUS
@ -28,13 +28,12 @@ export default {
// checkUpdate();
// #endif
},
onShow(option) {
console.log('onShowaaa');
let invite_code = option.query.invite_code || strToParams(decodeURIComponent(option.query.scene)).invite_code||''
uni.setStorageSync('INVITE_CODE',invite_code)
/* #ifdef MP-WEIXIN */
// wxMnpLogin(invite_code)
/* #endif */
onShow(option) {
let invite_code = option.query.invite_code || strToParams(decodeURIComponent(option.query.scene)).invite_code || '';
uni.setStorageSync('INVITE_CODE', invite_code);
/* #ifdef MP-WEIXIN */
// wxMnpLogin(invite_code)
/* #endif */
},
onHide: function () {
console.log('App Hide');

View File

@ -1,6 +1,6 @@
<template>
<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">
<u-search placeholder="搜索商品" @change="Change" @search="Search" v-model="searchText" :show-action="false"></u-search>
</view>
@ -223,6 +223,17 @@ export default {
this.$api.get(`/v1/store/${this.mid}/product-sku/${e.sku_id}`).then(res => {
this.sku = res
})
},
handleBack() {
if (getCurrentPages().length > 1) {
uni.navigateBack();
} else {
//
uni.clearStorageSync('desk')
uni.switchTab({
url: '/pages/index/index'
})
}
}
},
};