diff --git a/components/recommend/index.vue b/components/recommend/index.vue index 951150b..cc8882d 100644 --- a/components/recommend/index.vue +++ b/components/recommend/index.vue @@ -8,7 +8,8 @@ - + + 里海云仓 @@ -17,7 +18,8 @@ - + + 供销云市场 @@ -26,7 +28,8 @@ - + + 名优特产 @@ -34,30 +37,35 @@ - - - - 里海新闻 - 更多 - - - - - - - - - {{item.title}} - {{item.synopsis}} - - - - + + + + + 里海新闻 + 更多 + + + + + + + + + {{item.title}} + {{item.synopsis}} + + + + - + {{item.name}} {{item.desc}} @@ -66,11 +74,12 @@ - - - - 暂无商品,看点别的吧 - + + + + 暂无商品,看点别的吧 + @@ -88,14 +97,16 @@ import { toLogin } from '@/libs/login.js'; - import { - getArticleList - } from "@/api/api.js"; + import { + getArticleList + } from "@/api/api.js"; import WaterfallsFlow from '@/components/WaterfallsFlow/WaterfallsFlow.vue' import { HTTP_REQUEST_URL } from '@/config/app'; - import { Toast } from "../../libs/uniApi"; + import { + Toast + } from "../../libs/uniApi"; export default { components: { WaterfallsFlow @@ -108,10 +119,10 @@ return []; } }, - showTab: { - type: Boolean, - default: false - }, + showTab: { + type: Boolean, + default: false + }, indexP: { type: Boolean, default: false @@ -120,11 +131,11 @@ type: Boolean, default: false }, - sale_type:{ - type: [Number, String], - default: 1 - }, - loading:{ + sale_type: { + type: [Number, String], + default: 1 + }, + loading: { type: Boolean, default: false }, @@ -145,38 +156,38 @@ desc: '商户汇聚', val: 3 }, { - name: '名优特产', + name: '名优农特产', desc: '特色农副', val: 4 }], currTabs: 1, - list: [] + list: [] }; }, mounted() { - this.getArticleList(); + this.getArticleList(); }, methods: { changeTab(e) { this.currTabs = e; - this.$emit('changeRecommedTab', e) + this.$emit('changeRecommedTab', e) + }, + navTo(url) { + uni.navigateTo({ + url: url, + fail: () => { + Toast('暂未开放') + } + }) + }, + getArticleList() { + getArticleList(20, { + page: 1, + limit: 10 + }).then(res => { + this.list = res.data.list; + }) }, - navTo(url){ - uni.navigateTo({ - url: url, - fail: () => { - Toast('暂未开放') - } - }) - }, - getArticleList(){ - getArticleList(20,{ - page: 1, - limit: 10 - }).then(res=>{ - this.list = res.data.list; - }) - }, goDetail(item) { goShopDetail(item, this.uid).then(res => { if (this.isLogin) { @@ -228,7 +239,7 @@ // 里海云仓 供销云市场 名优特产 .nav { display: flex; - justify-content: space-between; + justify-content: space-between; margin-bottom: 20rpx; .nav-item { @@ -271,9 +282,9 @@ .tabs { display: flex; justify-content: space-between; - align-items: center; + align-items: center; margin: 0 -20rpx 30rpx; - padding-top: 20rpx; + padding-top: 20rpx; .tabs-item { width: 23%; @@ -321,64 +332,66 @@ /deep/.looming-gray { border-radius: 16rpx 16rpx 0 0; } - - .information{ - // display: flex; - // justify-content: space-between; - // margin-bottom: 20rpx; - - .nav-item { - width: 227rpx; - overflow: hidden; - border-radius: 20rpx; - position: relative; - - - .nav-item-up { - width: 100%; - height: 227rpx; - - image { - width: 100%; - height: 100%; - } - } - - .nav-item-down { - position: absolute; - bottom: 0; - left: 0; - width: 227rpx; - padding: 8rpx 2rpx 8rpx 14rpx; - background: rgba(0, 0, 0, 0.4); - - .nav-item-down-title { - font-weight: 500; - font-size: 26rpx; - color: #FFFFFF; - text-overflow: ellipsis; - white-space: nowrap; - overflow: hidden; - } - - .nav-item-down-desc { - font-size: 20rpx; - color: #FFFFFF; - text-overflow: ellipsis; - white-space: nowrap; - overflow: hidden; - } - } - } - } - .pictrue{ - display: flex; - flex-direction: column; - align-items: center; - color: #999; - image { - width: 414rpx; - height: 305rpx; - } - } + + .information { + // display: flex; + // justify-content: space-between; + // margin-bottom: 20rpx; + + .nav-item { + width: 227rpx; + overflow: hidden; + border-radius: 20rpx; + position: relative; + + + .nav-item-up { + width: 100%; + height: 227rpx; + + image { + width: 100%; + height: 100%; + } + } + + .nav-item-down { + position: absolute; + bottom: 0; + left: 0; + width: 227rpx; + padding: 8rpx 2rpx 8rpx 14rpx; + background: rgba(0, 0, 0, 0.4); + + .nav-item-down-title { + font-weight: 500; + font-size: 26rpx; + color: #FFFFFF; + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; + } + + .nav-item-down-desc { + font-size: 20rpx; + color: #FFFFFF; + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; + } + } + } + } + + .pictrue { + display: flex; + flex-direction: column; + align-items: center; + color: #999; + + image { + width: 414rpx; + height: 305rpx; + } + } \ No newline at end of file diff --git a/pages/whole_sale/index.vue b/pages/whole_sale/index.vue index b710ca1..2846dce 100644 --- a/pages/whole_sale/index.vue +++ b/pages/whole_sale/index.vue @@ -504,7 +504,7 @@ name: '供销云市场批发', val: 2 }, { - name: '名优特产批发', + name: '名优农特产批发', val: 3 }], tabsCurr: 1,