From 2e05e553f0caadf3d4ed9def5c922709f6ff942e Mon Sep 17 00:00:00 2001 From: xuxy <1059738716@qq.com> Date: 星期一, 24 六月 2024 17:45:24 +0800 Subject: [PATCH] 1 --- pages/farmer/flower-manage/flower-manage.vue | 200 ++++++++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 194 insertions(+), 6 deletions(-) diff --git a/pages/farmer/flower-manage/flower-manage.vue b/pages/farmer/flower-manage/flower-manage.vue index 8183fd0..a539a1e 100644 --- a/pages/farmer/flower-manage/flower-manage.vue +++ b/pages/farmer/flower-manage/flower-manage.vue @@ -1,6 +1,72 @@ <template> - <view> - + <view class="flow-manage"> + <view class="top-buttons" v-if="type==='all'"> + <view @click.stop="clickButton('add')" class="button button-add"></view> + <view class="button button-search-in"></view> + <view class="button button-search-unpass"></view> + <view class="button button-search-inpass"></view> + <view class="button button-search-delete"></view> + + </view> + + <view class="p15" style="min-height: calc(100vh - 160rpx);"> + <no-data v-if="!list||list.length==0" style="width: 100%;"></no-data> + <view v-for="(item,index) in list" :key="index" class="m-b-24 flow-manage-list"> + <view class="flow-manage-list-item"> + <view class="flex"> + <image class="flower-img img100 m-r-6" :src="item.img" @click="previewImg(item.img)"></image> + <view> + <view class="flex"> + <view class="title">{{item.title}}<span class="level">A级别</span></view> + <view class="t-red m-l-a m-r-0"> + ¥20.00/扎 + </view> + </view> + <view class="each-list"> + <view class="each-item"> + <view class="label">分类</view> + <view class="value">卡罗拉</view> + + </view> + <view class="each-item"> + <view class="label">颜色</view> + <view class="value">红色</view> + + </view> + <view class="each-item"> + <view class="label">规格</view> + <view class="value">20支/扎</view> + + </view> + <view class="each-item"> + <view class="label">库存</view> + <view class="value">10</view> + + </view> + <view class="each-item"> + <view class="label">销量</view> + <view class="value">10</view> + </view> + </view> + </view> + </view> + <view class="line-gray"> + + </view> + <view class="buttons"> + <view class="button">复制</view> + <view class="button">删除</view> + <view class="button">下架</view> + <view class="button" @click.stop="toDetail(item)">编辑</view> + <view class="button">价格</view> + <view class="button">库存</view> + </view> + </view> + </view> + </view> + + <!-- 判断是否到底了,自动吧 --> + <footer-msg :more="page.total>0&&page.total>page.current*page.size"></footer-msg> </view> </template> @@ -8,15 +74,137 @@ export default { data() { return { - + type: 'all', + query: { + type: '' + } } }, + onLoad(options) { + this.type = options.type || 'all' + //todo 根据type切换查询条件 + this.listApi = '/api/ua/announcement/list' + this.getList() + }, + onReachBottom() { + this.page.current += 1 + this.getMore() + }, + async onPullDownRefresh() { + this.page.current = 1 + await this.getList() + uni.stopPullDownRefresh() + }, methods: { - + toDetail(item) { + uni.navigateTo({ + url: '/pages/farmer/flower-manage/flower-add?id=' + item.id + }) + }, + clickButton(type) { + if (type == 'add') { + //添加页面 + uni.navigateTo({ + url: '/pages/farmer/flower-manage/flower-add' + }) + } else { + uni.navigateTo({ + url: '/pages/farmer/flower-manage/flower-manage?type=' + type + }) + } + }, } } </script> -<style> +<style lang="scss" scoped> + .flow-manage { + .flow-manage-list { + margin: 20rpx 30rpx; + padding: 22rpx; -</style> + .flow-manage-item { + margin-bottom: 20rpx; + + .buttons { + display: flex; + + .button { + margin: 0 auto; + width: 98rpx; + height: 48rpx; + border-radius: 24rpx; + border: 2rpx solid #CECECE; + } + } + + .flower-img { + width: 128rpx; + height: 118rpx; + + } + + .each-list { + display: flex; + flex-wrap: wrap; + + .each-item { + min-width: 30%; + max-width: 40%; + text-align: center; + + .label { + font-weight: 400; + font-size: 24rpx; + color: #666666; + } + + .label::after { + content: ": " + } + + .value {} + } + } + } + } + + .top-buttons { + display: flex; + margin: 22rpx 42rpx; + + .button { + // flex:1; + margin: 0 auto; + width: 96rpx; + height: 130rpx; + background-size: 100% 100%; + } + + .button-add { + background-image: url('@/static/images/farmer/flower/flower-mange-icon-add-flower.png'); + + } + + .button-search-in { + background-image: url('@/static/images/farmer/flower/flower-mange-icon-flower-in.png'); + + } + + .button-search-unpass { + background-image: url('@/static/images/farmer/flower/flower-mange-icon-flower-unpass.png'); + + } + + .button-search-inpass { + background-image: url('@/static/images/farmer/flower/flower-mange-icon-flower-inpass.png'); + + } + + .button-search-delete { + background-image: url('@/static/images/farmer/flower/flower-mange-icon-flower-delete.png'); + + } + } + } +</style> \ No newline at end of file -- Gitblit v1.9.3