修改跳转咖啡字段没有传入的问题

This commit is contained in:
duan
2024-05-16 09:35:37 +08:00
parent ca6380a9c0
commit c234c61dfc
3 changed files with 41 additions and 14 deletions

View File

@@ -38,7 +38,15 @@
});
break;
case 'relative':
uni.pro.navigateTo(item.absUrl, JSON.stringify(item));
uni.setStorage({
key: 'titleName',
data: item.name,
});
uni.setStorage({
key: 'itemData',
data: item,
});
uni.pro.navigateTo(item.absUrl, item.name);
break;
case 'scan':
if (!uni.utils.pluschooseImage()) {

View File

@@ -150,11 +150,23 @@
}
},
onLoad(e) {
this.type = e.value
this.distiricttopCommon()
let _this = this
uni.getStorage({
key: 'itemData',
success: function(res) {
console.log(res.data,'数据');
_this.type = res.data.value
_this.distiricttopCommon()
setTimeout(() => {
this.GetTop()
_this.GetTop()
}, 1000)
}
});
// this.type = e.value
// this.distiricttopCommon()
// setTimeout(() => {
// this.GetTop()
// }, 1000)
},
onShow() {
this.init_fn()

View File

@@ -43,8 +43,7 @@
免单状态
</view>
</view>
<view class="swiperitem" v-for="(item,index) in orderfindWiningUserlist"
:key="index">
<view class="swiperitem" v-for="(item,index) in orderfindWiningUserlist" :key="index">
<view class="swiper-item" style="margin-top: 32rpx;">
<view class="swiper_itemone">
{{item.orderAmount}}
@@ -56,8 +55,7 @@
{{item.isRefund == true ? '已免单':'待免单'}}
</view>
</view>
</view
>
</view>
<!-- <swiper class="swiper" circular :autoplay='true' :vertical='true' interval="3000"
display-multiple-items="4">
<swiper-item class="swiperitem" v-for="(item,index) in orderfindWiningUserlist"
@@ -87,6 +85,9 @@
</template>
<script>
import {
forEach
} from 'lodash';
import navseat from '@/components/navseat.vue'
export default {
components: {
@@ -94,7 +95,7 @@
},
data() {
return {
titlename: '今日上新',
titlename: '',
opacity: false,
orderfindWiningUserlist: [],
form: {
@@ -110,8 +111,14 @@
},
onLoad(e) {
this.orderfindWiningUser()
let data = JSON.parse(e)
this.titlename = data.name
let _this = this
uni.getStorage({
key: 'titleName',
success: function(res) {
console.log(res.data);
_this.titlename = res.data
}
});
},
onPageScroll(e) {
if (e.scrollTop <= 44) { //搜索导航栏