2025.03.12 工作代码提交

This commit is contained in:
sx 2025-03-12 22:11:26 +08:00
parent 09e8b23e43
commit 134facabb2
14 changed files with 633 additions and 605 deletions

View File

@ -110,6 +110,18 @@ const shop = {
}) })
}, },
/**
* 商品详情下面的商品推荐
* @param {Object} param
*/
getInfoProductRecommendations(param) {
return util.request({
url: `/shopify/appProductionApi/infoProductRecommendations`,
method: 'GET',
query: param.query
})
},
/** /**
* 商品分类列表 * 商品分类列表
* @param {Object} param * @param {Object} param
@ -134,6 +146,18 @@ const shop = {
}) })
}, },
/**
* 个人中心下面的商品推荐
* @param {Object} param
*/
getMineUserProList(param) {
return util.request({
url: `/shopify/appProductionApi/personalCenterProductRecommendations`,
method: 'GET',
query: param.query,
})
},
/** /**
* 添加商品浏览记录 * 添加商品浏览记录
* @param {Object} param * @param {Object} param

View File

@ -9,7 +9,7 @@ const config = {
host: 'http://91f.xyz:8080', host: 'http://91f.xyz:8080',
// #endif // #endif
// 是否vivo显示 // 是否vivo显示
showVivo: false, showVivo: true,
// 支付方式配置 // 支付方式配置
payType: { payType: {
score: { score: {

View File

@ -126,6 +126,9 @@
<view class="main"> <view class="main">
<!-- 获取详情 --> <!-- 获取详情 -->
<proDetail :id="proId" :detail="detail" /> <proDetail :id="proId" :detail="detail" />
<!-- 填充 -->
<view class="fill" style="height: 180rpx;"></view>
</view> </view>
</scroll-view> </scroll-view>

View File

@ -49,23 +49,6 @@
}) })
// //
const recentOrderList = ref([]) const recentOrderList = ref([])
//
const menuFn = {
//
store() {
link('/pages/shop/store/index')
},
//
customerService() {
link('/pages/news/question-answer/index')
},
//
heibianStar() {
//
}
}
//
const editorCtx = ref(null)
// //
const spaceIndex = ref(0) const spaceIndex = ref(0)
// //
@ -94,7 +77,6 @@
let result = '' let result = ''
const richText = props.detail.infoRichText || '' const richText = props.detail.infoRichText || ''
if (richText) result = decodeURIComponent(escape(atob(richText))) if (richText) result = decodeURIComponent(escape(atob(richText)))
console.log('richText', result, decodeURIComponent(escape(atob(richText))))
return result return result
}) })
@ -378,12 +360,9 @@
<!-- 商品详情 --> <!-- 商品详情 -->
<view class="content mt30"> <view class="content mt30">
<!-- <rich-text :nodes="infoRichText" v-if="infoRichText" /> --> <!-- <rich-text :nodes="infoRichText" v-if="infoRichText" /> -->
<parseRichText :imageProp="{'mode': 'widthFix',}" :content="infoRichText" /> <parseRichText :imageProp="{'mode': 'widthFix',}" :content="infoRichText" v-if="infoRichText" />
</view> </view>
</view> </view>
<!-- 填充 -->
<view class="fill" style="height: 180rpx;"></view>
</template> </template>
<style lang="scss"> <style lang="scss">

View File

@ -1,42 +1,42 @@
<script setup> <script setup>
// //
import { import {
ref, ref,
reactive, reactive,
getCurrentInstance, getCurrentInstance,
computed, computed,
defineEmits, defineEmits,
onMounted onMounted
} from 'vue' } from 'vue'
// //
import util from '@/common/js/util.js' import util from '@/common/js/util.js'
// //
import api from '@/api/index.js' import api from '@/api/index.js'
// //
import { import {
useStore useStore
} from 'vuex' } from 'vuex'
const { const {
proxy proxy
} = getCurrentInstance() } = getCurrentInstance()
// //
const store = useStore() const store = useStore()
// //
const props = defineProps({ const props = defineProps({
// //
detail: { detail: {
type: Object, type: Object,
default: () => ({}) default: () => ({})
}, },
}) })
// //
const emit = defineEmits(['update', 'buy']) const emit = defineEmits(['update', 'buy'])
// //
const userinfo = computed(() => store.state.userinfo) const userinfo = computed(() => store.state.userinfo)
// //
function handleCollect() { function handleCollect() {
util.isLogin().then(rs => { util.isLogin().then(rs => {
// //
api.shop.addProductCollect({ api.shop.addProductCollect({
@ -45,7 +45,7 @@ function handleCollect() {
type: { type: {
0: 1, 0: 1,
1: 0, 1: 0,
}[props.detail.isCollect] } [props.detail.isCollect]
} }
}).then(rs => { }).then(rs => {
if (rs.code == 200) { if (rs.code == 200) {
@ -53,7 +53,7 @@ function handleCollect() {
props.detail.isCollect = { props.detail.isCollect = {
0: 1, 0: 1,
1: 0, 1: 0,
}[props.detail.isCollect] } [props.detail.isCollect]
// //
props.detail.collectNumber = rs.data props.detail.collectNumber = rs.data
return return
@ -69,26 +69,26 @@ function handleCollect() {
url: '/pages/login/loginPhone' url: '/pages/login/loginPhone'
}) })
}) })
} }
/** /**
* 跳转 * 跳转
* @param {Object} url 跳转路径 * @param {Object} url 跳转路径
*/ */
function link(url) { function link(url) {
uni.navigateTo({ uni.navigateTo({
url, url,
}) })
} }
// //
function handleBuy() { function handleBuy() {
emit('buy') emit('buy')
} }
// //
function toCustomer() { function toCustomer() {
// api.shop.getCustomerService({ merchantId: props.detail.merId }).then(rs => { // api.shop.getCustomerService({ merchantId: props.detail.merId }).then(rs => {
// if (rs.code == 200) { // if (rs.code == 200) {
// let param = {}; // let param = {};
@ -107,7 +107,7 @@ function toCustomer() {
// } // }
// }) // })
} }
</script> </script>
<template> <template>
@ -144,8 +144,8 @@ function toCustomer() {
</template> </template>
<style scoped lang="scss"> <style scoped lang="scss">
// //
.footerMneu { .footerMneu {
// //
.option { .option {
@ -156,5 +156,5 @@ function toCustomer() {
font-size: 24rpx; font-size: 24rpx;
} }
} }
} }
</style> </style>

View File

@ -16,24 +16,23 @@
choicenessTitle: { choicenessTitle: {
type: Boolean, type: Boolean,
default: false, default: false,
},
requestFn: {
type: Function,
default: (ev) => {
return api.shop.getProduct(ev)
} }
},
}) })
// //
const listPrototype = reactive({ const listPrototype = reactive({
pageSize: 10, pageSize: 10,
pageNum: 1, pageNum: 1,
total: 0, total: 0,
//
searchValue: '',
//
merId: '',
//
brandId: '',
// code
categoryCode: '',
data: [],
}) })
//
const list = reactive([])
/** /**
* 点击列表项 * 点击列表项
@ -43,7 +42,8 @@
// //
uni.navigateTo({ uni.navigateTo({
url: util.setUrl('/pages/shop/commodity/index', { url: util.setUrl('/pages/shop/commodity/index', {
productId: item.id productId: item.id,
categoryId: item.categoryId,
}) })
}) })
} }
@ -64,24 +64,18 @@
// //
function getList() { function getList() {
api.shop.getProduct({ console.log('listPrototype', listPrototype)
// props.requestFn({
data: { data: {
pageSize: listPrototype.pageSize, ...listPrototype,
pageNum: listPrototype.pageNum, },
// query: {
searchValue: listPrototype.searchValue, ...listPrototype,
//
merId: listPrototype.merId,
//
brandId: listPrototype.brandId,
// code
categoryCode: listPrototype.categoryCode,
}, },
}).then(rs => { }).then(rs => {
if (rs.code == 200) { if (rs.code == 200) {
if (listPrototype.pageNum == 1) listPrototype.data.length = [] if (listPrototype.pageNum == 1) list.length = []
listPrototype.data.push(...rs.rows) list.push(...rs.rows)
listPrototype.total = rs.total listPrototype.total = rs.total
return return
} }
@ -111,8 +105,7 @@
</view> </view>
<view class="list"> <view class="list">
<view class="item oh bfff br20" v-for="(item, index) in listPrototype.data" :key="index" <view class="item oh bfff br20" v-for="(item, index) in list" :key="index" @click="handleItem(item)">
@click="handleItem(item)">
<!-- 需要展示的图 --> <!-- 需要展示的图 -->
<image class="poster" :src="item.sliderImage.split(',')[0]" mode="aspectFill" /> <image class="poster" :src="item.sliderImage.split(',')[0]" mode="aspectFill" />

View File

@ -96,7 +96,8 @@
"path": "pages/mine/mine", "path": "pages/mine/mine",
"style": { "style": {
"navigationBarTitleText": "我的", "navigationBarTitleText": "我的",
"navigationStyle": "custom" "navigationStyle": "custom",
"enablePullDownRefresh": true
} }
}, },
{ {

View File

@ -65,9 +65,7 @@
return result return result
}) })
// //
const purse = computed(() => { const purse = computed(() => store.state.purse || {})
return store.state.purse || {}
})
// //
const configData = reactive({ const configData = reactive({

View File

@ -1,59 +1,79 @@
<script setup> <script setup>
/** /**
* 个人中心 商城 * 个人中心 商城
*/ */
// //
import { import {
ref, ref,
computed, computed,
} from 'vue' getCurrentInstance
import { } from 'vue'
import {
onReachBottom, onReachBottom,
onPullDownRefresh, onPullDownRefresh,
onShow, onShow,
onLoad, onLoad,
onPageScroll onReady,
} from '@dcloudio/uni-app'; onPageScroll,
import { } from '@dcloudio/uni-app';
import {
useStore useStore
} from 'vuex' } from 'vuex'
// //
import statusBar from '@/components/header/statusBar' import statusBar from '@/components/header/statusBar'
// //
import noLogin from '@/components/login/noLogin' import noLogin from '@/components/login/noLogin'
// //
import productList from '@/components/shop/productList/productList'; import productList from '@/components/shop/productList/productList';
// //
import footerMneu from '@/components/footerMenu/footerMenu' import footerMneu from '@/components/footerMenu/footerMenu'
// //
import util from '@/common/js/util'; import util from '@/common/js/util';
// //
const store = useStore() import api from '@/api/index.js'
//
const userinfo = computed(() => {
let result = store.state.userinfo || {}
return result
})
//
const showHeader = ref(false)
onPageScroll((ev) => { const {
proxy
} = getCurrentInstance()
//
const store = useStore()
//
const userinfo = computed(() => store.state.userinfo || {})
//
const showHeader = ref(false)
onReady(() => {
util.isLogin().then(rs => {
proxy.$refs.productListRef.getList()
})
})
onReachBottom(() => {
proxy.$refs.productListRef.getMoreList()
})
onPullDownRefresh(() => {
proxy.$refs.productListRef.refreshList()
})
onPageScroll((ev) => {
if (ev.scrollTop > 44) showHeader.value = true if (ev.scrollTop > 44) showHeader.value = true
else showHeader.value = false else showHeader.value = false
}) })
// //
function link(url) { function link(url) {
uni.navigateTo({ uni.navigateTo({
url, url,
}) })
} }
function toCustomer() {
function toCustomer() {
uni.navigateTo({ uni.navigateTo({
url: util.setUrl('/pages/mine/setting/feedback') url: util.setUrl('/pages/mine/setting/feedback')
}) })
} }
</script> </script>
<template> <template>
@ -211,7 +231,8 @@ function toCustomer() {
<!-- 精选 --> <!-- 精选 -->
<view class="recommend mtb20 mlr20"> <view class="recommend mtb20 mlr20">
<productList choicenessTitle="true"></productList> <productList ref="productListRef" :choicenessTitle="true" :requestFn="api.shop.getMineUserProList">
</productList>
</view> </view>
</view> </view>
@ -220,8 +241,8 @@ function toCustomer() {
</template> </template>
<style lang="scss" scoped> <style lang="scss" scoped>
// //
.apex { .apex {
position: fixed; position: fixed;
top: 0; top: 0;
left: 0; left: 0;
@ -234,17 +255,17 @@ function toCustomer() {
opacity: 1; opacity: 1;
background-color: #fff; background-color: #fff;
} }
} }
// //
.header { .header {
.avatar { .avatar {
background: #D8D8D8; background: #D8D8D8;
} }
} }
// //
.wallet { .wallet {
position: relative; position: relative;
.right { .right {
@ -255,10 +276,10 @@ function toCustomer() {
margin-right: 20rpx; margin-right: 20rpx;
} }
} }
} }
// //
.container { .container {
position: relative; position: relative;
overflow: hidden; overflow: hidden;
margin: 20rpx 20rpx; margin: 20rpx 20rpx;
@ -270,5 +291,5 @@ function toCustomer() {
display: grid; display: grid;
grid-template-columns: repeat(5, 1fr); grid-template-columns: repeat(5, 1fr);
} }
} }
</style> </style>

View File

@ -60,7 +60,8 @@
function getList() { function getList() {
api.mine.getBankCards({}).then(rs => { api.mine.getBankCards({}).then(rs => {
if (rs.code == 200) { if (rs.code == 200) {
Object.assign(list, rs.data) list.length = 0
list.push(...rs.data)
return return
} }
util.alert({ util.alert({

View File

@ -1,49 +1,49 @@
<script setup> <script setup>
/** /**
* 个人信息 * 个人信息
*/ */
import { import {
ref, ref,
computed, computed,
reactive, reactive,
} from 'vue' } from 'vue'
import { import {
onLoad, onLoad,
} from '@dcloudio/uni-app' } from '@dcloudio/uni-app'
import { import {
useStore useStore
} from 'vuex' } from 'vuex'
// //
import util from '@/common/js/util'; import util from '@/common/js/util';
// //
import api from '@/api'; import api from '@/api';
// vuex // vuex
const store = useStore() const store = useStore()
// //
const user = reactive({}) const user = reactive({})
// //
const gender = reactive([{ const gender = reactive([{
id: 0, id: 0,
name: '男', name: '男',
}, },
{ {
id: 1, id: 1,
name: '女', name: '女',
} }
]) ])
// //
const genderIndex = ref(0) const genderIndex = ref(0)
onLoad(() => { onLoad(() => {
// //
syncInfo() syncInfo()
}) })
// //
function syncInfo() { function syncInfo() {
// //
const userinfo = store.state.userinfo const userinfo = store.state.userinfo
user.background = userinfo.background user.background = userinfo.background
@ -58,33 +58,33 @@ function syncInfo() {
user.email = userinfo.email user.email = userinfo.email
// //
genderIndex.value = gender.findIndex(item => item.id == userinfo.sex) genderIndex.value = gender.findIndex(item => item.id == userinfo.sex)
} }
/** /**
* 选择生日日期 * 选择生日日期
* @param {Object} ev 默认事件 * @param {Object} ev 默认事件
*/ */
function handleBirthday(ev) { function handleBirthday(ev) {
const value = ev.detail.value const value = ev.detail.value
if (user.birthday === value) return if (user.birthday === value) return
user.birthday = value user.birthday = value
} }
/** /**
* 选择性别 * 选择性别
* @param {Object} ev 默认事件 * @param {Object} ev 默认事件
*/ */
function handleGender(ev) { function handleGender(ev) {
const value = ev.detail.value const value = ev.detail.value
if (genderIndex.value === value) return if (genderIndex.value === value) return
genderIndex.value = value genderIndex.value = value
} }
/** /**
* 上传图片 * 上传图片
* @param {String} key 需要修改个人信息的字段 * @param {String} key 需要修改个人信息的字段
*/ */
function uploadImg(key) { function uploadImg(key) {
util.upload_image({ util.upload_image({
value: user[key], value: user[key],
type: 1, type: 1,
@ -94,14 +94,14 @@ function uploadImg(key) {
console.log('user', user) console.log('user', user)
} }
}) })
} }
// //
function handleSubmit() { function handleSubmit() {
// //
if (gender[genderIndex.value]) user.sex = gender[genderIndex.value].id if (gender[genderIndex.value]) user.sex = gender[genderIndex.value].id
if (!IsEmail(user.email)) { if (user.email && !IsEmail(user.email)) {
util.alert('邮箱格式不正确!') util.alert('邮箱格式不正确!')
return return
} }
@ -110,10 +110,6 @@ function handleSubmit() {
...user, ...user,
} }
//
// if(data.avatar) data.avatar = util.replace_url(data.avatar)
// if(data.background) data.background = util.replace_url(data.background)
// //
api.mine.updateUserInfo({ api.mine.updateUserInfo({
data, data,
@ -132,13 +128,13 @@ function handleSubmit() {
showCancel: false, showCancel: false,
}) })
}) })
} }
//
function IsEmail(str) { //
function IsEmail(str) {
var reg = /^([a-zA-Z]|[0-9])(\w|\-)+@[a-zA-Z0-9]+\.([a-zA-Z]{2,4})$/; var reg = /^([a-zA-Z]|[0-9])(\w|\-)+@[a-zA-Z0-9]+\.([a-zA-Z]{2,4})$/;
return reg.test(str); return reg.test(str);
} }
</script> </script>
<template> <template>
@ -233,8 +229,8 @@ function IsEmail(str) {
</template> </template>
<style lang="scss" scoped> <style lang="scss" scoped>
// //
.bgBox { .bgBox {
.content { .content {
height: 400rpx; height: 400rpx;
} }
@ -243,16 +239,16 @@ function IsEmail(str) {
.changeBg { .changeBg {
background-color: rgba(0, 0, 0, .3); background-color: rgba(0, 0, 0, .3);
} }
} }
// //
.avatarBox { .avatarBox {
padding: 2rpx; padding: 2rpx;
background-color: #fff; background-color: #fff;
} }
// //
.info { .info {
margin-top: -20rpx; margin-top: -20rpx;
} }
</style> </style>

View File

@ -39,13 +39,16 @@
const id = ref('') const id = ref('')
// //
const detail = reactive({}) const detail = reactive({})
// id
const categoryId = ref('')
// //
const userinfo = computed(() => { const userinfo = computed(() => store.state.userinfo)
return store.state.userinfo
})
onLoad(option => { onLoad(option => {
// id
if (option.productId) id.value = option.productId if (option.productId) id.value = option.productId
// id
if (option.categoryId) categoryId.value = option.categoryId
// //
getDetail() getDetail()
// //
@ -55,7 +58,13 @@
}) })
onReady(() => { onReady(() => {
// // id
if (categoryId.value) {
proxy.$refs.productListRef.listPrototype.categoryId = categoryId.value
proxy.$refs.productListRef.listPrototype.productId = id.value
//
proxy.$refs.productListRef.getList()
}
}) })
// //
@ -72,7 +81,6 @@
function addListener() { function addListener() {
// //
uni.$on('commodityDetail', (data) => { uni.$on('commodityDetail', (data) => {
//
if (detail.id == data.id) getDetail() if (detail.id == data.id) getDetail()
}) })
} }
@ -186,9 +194,13 @@
<proDetail :id="id" :detail="detail" /> <proDetail :id="id" :detail="detail" />
<!-- 精选 --> <!-- 精选 -->
<view class="recommend mlr20"> <view class="recommend mlr20">
<productList :choicenessTitle="true" /> <productList ref="productListRef" :choicenessTitle="true"
:requestFn="api.shop.getInfoProductRecommendations" />
</view> </view>
<!-- 填充 -->
<view class="fill" style="height: 180rpx;"></view>
<!-- 底部菜单 --> <!-- 底部菜单 -->
<view class="footer plr20 shadow bfff"> <view class="footer plr20 shadow bfff">
<footerMenu :detail="detail" @update="handleDetail" @buy="showMakeOrder" /> <footerMenu :detail="detail" @update="handleDetail" @buy="showMakeOrder" />

View File

@ -89,7 +89,7 @@
if (cateIndex.value === index) return if (cateIndex.value === index) return
cateIndex.value = index cateIndex.value = index
// //
proxy.$refs.product.listPrototype.categoryCode = cateList[index].categoryCode proxy.$refs.product.listPrototype.categoryId = cateList[index].id
// //
proxy.$refs.product.refreshList() proxy.$refs.product.refreshList()
} }

View File

@ -1,78 +1,78 @@
<script setup> <script setup>
// //
import { import {
computed, computed,
reactive, reactive,
ref, ref,
defineExpose, defineExpose,
} from 'vue' } from 'vue'
import { import {
onLoad, onLoad,
onPageScroll onPageScroll
} from '@dcloudio/uni-app'; } from '@dcloudio/uni-app';
// //
import util from '@/common/js/util.js' import util from '@/common/js/util.js'
// //
import apex from '@/components/header/apex.vue' import apex from '@/components/header/apex.vue'
// //
import productList from '@/components/shop/productList/productList' import productList from '@/components/shop/productList/productList'
import api from '@/api/index.js' import api from '@/api/index.js'
// //
const filteredList = ref([{ const filteredList = ref([{
label: '默认', label: '默认',
value: 1, value: 1,
isUpDown: false, isUpDown: false,
slot: null slot: null
}, { }, {
label: '销量', label: '销量',
value: 2, value: 2,
isUpDown: false, isUpDown: false,
slot: null slot: null
}, { }, {
label: '新品', label: '新品',
value: 3, value: 3,
isUpDown: false, isUpDown: false,
slot: null slot: null
}, { }, {
label: '价格', label: '价格',
value: 4, value: 4,
isUpDown: true, isUpDown: true,
slot: null slot: null
}]) }])
// //
const apexBgColor = ref('#ffffff00') const apexBgColor = ref('#ffffff00')
// id // id
const storeId = ref('') const storeId = ref('')
// //
const detail = reactive({}) const detail = reactive({})
// //
const listPrototype = reactive({ const listPrototype = reactive({
pageSize: 10, pageSize: 10,
pageNum: 1, pageNum: 1,
total: 0, total: 0,
// //
merId: '', merId: '',
data: [], data: [],
}) })
// //
const userinfo = computed(() => uni.$store.state.userinfo || {}) const userinfo = computed(() => uni.$store.state.userinfo || {})
onLoad((option) => { onLoad((option) => {
if (option.storeId) storeId.value = option.storeId if (option.storeId) storeId.value = option.storeId
getDetail() getDetail()
listPrototype.merId = storeId.value listPrototype.merId = storeId.value
getList() getList()
}) })
onPageScroll((ev) => { onPageScroll((ev) => {
apexBgColor.value = ev.scrollTop > 44 ? '#fff' : '#ffffff00' apexBgColor.value = ev.scrollTop > 44 ? '#fff' : '#ffffff00'
}) })
// //
function getDetail() { function getDetail() {
api.shop.merchant({ api.shop.merchant({
query: { query: {
merId: storeId.value, merId: storeId.value,
@ -88,16 +88,16 @@ function getDetail() {
showCancel: false showCancel: false
}); });
}) })
} }
// //
function handleCollectStore() { function handleCollectStore() {
api.shop.followShop({ api.shop.followShop({
data: { data: {
shopId: storeId.value, shopId: storeId.value,
status: { status: {
0: 1, 0: 1,
1: 0, 1: 0,
}[detail.isFollow] } [detail.isFollow]
} }
}).then(rs => { }).then(rs => {
if (rs.code == 200) { if (rs.code == 200) {
@ -105,7 +105,7 @@ function handleCollectStore() {
detail.isFollow = { detail.isFollow = {
0: 1, 0: 1,
1: 0, 1: 0,
}[detail.isFollow] } [detail.isFollow]
// //
detail.followNum = rs.data detail.followNum = rs.data
@ -117,9 +117,9 @@ function handleCollectStore() {
showCancel: false, showCancel: false,
}) })
}) })
} }
// //
function toCustomer() { function toCustomer() {
uni.navigateTo({ uni.navigateTo({
url: util.setUrl('/pages/mine/setting/feedback') url: util.setUrl('/pages/mine/setting/feedback')
}) })
@ -141,9 +141,9 @@ function toCustomer() {
// } // }
// }) // })
} }
// //
function getList() { function getList() {
api.shop.getProduct({ api.shop.getProduct({
data: { data: {
@ -166,33 +166,33 @@ function getList() {
}).finally(rs => { }).finally(rs => {
uni.stopPullDownRefresh() uni.stopPullDownRefresh()
}) })
} }
// //
function handleItem(item) { function handleItem(item) {
uni.navigateTo({ uni.navigateTo({
url: util.setUrl('/pages/shop/commodity/index', { url: util.setUrl('/pages/shop/commodity/index', {
productId: item.id productId: item.id
}) })
}) })
} }
// //
function refreshList() { function refreshList() {
listPrototype.pageNum = 1 listPrototype.pageNum = 1
listPrototype.total = 0 listPrototype.total = 0
getList() getList()
} }
// //
function getMoreList() { function getMoreList() {
if (listPrototype.total <= listPrototype.data.length) return if (listPrototype.total <= listPrototype.data.length) return
listPrototype.pageNum++ listPrototype.pageNum++
getList() getList()
} }
defineExpose({ defineExpose({
refreshList, refreshList,
getMoreList, getMoreList,
}) })
</script> </script>
<template> <template>
@ -283,8 +283,8 @@ defineExpose({
</template> </template>
<style lang="scss" scoped> <style lang="scss" scoped>
// //
.list { .list {
display: grid; display: grid;
grid-template-columns: repeat(2, 1fr); grid-template-columns: repeat(2, 1fr);
grid-gap: 20rpx; grid-gap: 20rpx;
@ -297,5 +297,5 @@ defineExpose({
border-radius: 20rpx 20rpx 0 0; border-radius: 20rpx 20rpx 0 0;
} }
} }
} }
</style> </style>