第一次提交
This commit is contained in:
68
package/brand/index.vue
Normal file
68
package/brand/index.vue
Normal file
@@ -0,0 +1,68 @@
|
||||
<template>
|
||||
<view class="solution">
|
||||
<!-- <view class="search">
|
||||
<search class="search" :tips="options.search ? options.search : '搜索关键词'" @event="handleSearch" />
|
||||
</view> -->
|
||||
<view class="grid">
|
||||
<u-grid :border="false">
|
||||
<u-grid-item v-for="(item,index) in baseList" :key="index">
|
||||
<image :src="item.imageUrl" class="avatar" mode="widthFix" @click="navTo('package/brand/detail?brandId=' + item.brandId)"></image>
|
||||
<text class="grid-text" @click="navTo('package/brand/detail?brandId=' + item.brandId)">{{item.name}}</text>
|
||||
</u-grid-item>
|
||||
</u-grid>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Search from './components/search'
|
||||
import * as Api from '@/api/brand/index.js'
|
||||
export default {
|
||||
components: {
|
||||
Search
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
baseList: []
|
||||
}
|
||||
},
|
||||
onLoad(){
|
||||
this.init()
|
||||
},
|
||||
methods: {
|
||||
init(){
|
||||
const app = this
|
||||
Api.list().then(res => {
|
||||
app.baseList = res.data.list.data
|
||||
})
|
||||
},
|
||||
navTo(url){
|
||||
this.$navTo(url)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="less">
|
||||
.solution {
|
||||
background-color: #ffffff;
|
||||
.search {
|
||||
padding: 10rpx 20rpx;
|
||||
}
|
||||
|
||||
.btn {
|
||||
width: 700rpx;
|
||||
border-radius: 100%;
|
||||
margin: 25rpx auto;
|
||||
}
|
||||
|
||||
.grid {
|
||||
width: 700rpx;
|
||||
margin: auto;
|
||||
}
|
||||
|
||||
.avatar {
|
||||
width: 120rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user