完善功能

This commit is contained in:
2025-05-06 17:33:45 +08:00
parent 889f2b8fca
commit 6b5c475dd1
283 changed files with 6420 additions and 3694 deletions

View File

@ -24,7 +24,7 @@
<!-- 轮播图 -->
<view class="swiper u-relative">
<u-swiper height="524" :list="list" border-radius="0"></u-swiper>
<u-swiper height="524" :list="adList" border-radius="0"></u-swiper>
<view class="balance bg-white u-flex">
<view>
<navigator class="u-flex u-row-center" url="/pages/my/wallet" hover-class="none">
@ -91,17 +91,12 @@
import { mapGetters, mapActions } from 'vuex'
import { getConfig } from '@/api/app'
import { getUser, getDefaultAddress, getOneAddress } from '@/api/user'
import { getMenu } from '@/api/store'
import { getAdList } from '@/api/store'
import { setTabbar } from '@/utils/tools'
export default {
data() {
return {
list: [
{
image: "http://jianbing-media.stnav.com/frontend/img/banner.png",
title: "昨夜星辰昨夜风,画楼西畔桂堂东",
},
],
adList: [],
userAddress: '',
addressId: 0
}
@ -116,6 +111,7 @@
this.updateUserAddress()
})
this.getAdListFun()
},
onShow() {
this.getUser()
@ -128,6 +124,18 @@
methods: {
...mapActions(['getCartNum', 'getUser']),
// 获取广告轮播图
async getAdListFun() {
const { code, data } = await getAdList({
pid: 1,
client: 1
})
if (code) {
this.adList = data
}
},
// 获取默认物流地址
getUserAddress() {
getDefaultAddress().then(res => {
@ -150,16 +158,6 @@
})
},
// 立即下单
buy() {
console.log(this.$buyType)
this.$buyType = 1
uni.navigateTo({
url: '/pages/store/store'
})
},
// 签到
signin() {
uni.navigateTo({