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> <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');

View File

@ -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'
})
}
} }
}, },
}; };