123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144 |
- <template>
- <mobile-frame>
- <view class="main">
- <view class="one">
- <scroll-view scroll-y="true" class="scroll-view" @scrolltolower="toPage">
- <view class="list-scroll-view">
- <view class="list" v-for="(item, index) in list" :key="index" @click="toView(item)">
- <image class="image" :src="item.file" mode=""></image>
- <view class="name">
- {{item.name||'暂无'}}
- </view>
- <view class="money">
- <text>¥</text>
- <text>{{item.money}}</text>
- </view>
- <view class="other">
- <view class="other_1">
- {{item.num||0}}人评价
- </view>
- <view class="other_2">
- <text @click="toDel(item)" class="iconfont icon-del"></text>
- </view>
- </view>
- </view>
- </view>
- </scroll-view>
- </view>
- </view>
- </mobile-frame>
- </template>
- <script>
- export default {
- data() {
- return {
- list: [{
- file: require('@/static/test.png'),
- name: '摩奇桃汁250ml*24盒',
- money: 59.90,
- num: 0
- },
- {
- file: require('@/static/test.png'),
- name: '摩奇桃汁250ml*24盒',
- money: 59.90,
- num: 0
- },
- {
- file: require('@/static/test.png'),
- name: '摩奇桃汁250ml*24盒',
- money: 59.90,
- num: 0
- }
- ]
- };
- },
- onShow: function() {
- },
- methods: {
- // 详细信息
- toView(e) {
- const that = this;
- console.log(e);
- },
- // 删除
- toDel(e) {
- const that = this;
- console.log(e);
- },
- // 分页
- toPage(e) {
-
- },
- }
- }
- </script>
- <style lang="scss">
- .main {
- display: flex;
- flex-direction: column;
- width: 100vw;
- height: 100vh;
- .one {
- padding: 2vw 0 0 0;
- .list {
- width: 42vw;
- border: 1px solid var(--f1Color);
- margin: 2vw 2vw 0 2vw;
- padding: 2vw;
- border-radius: 5px;
- .image {
- width: 100%;
- height: 40vw;
- }
- .name {
- font-size: var(--font16Size);
- margin: 0 0 1vw 0;
- }
- .money {
- color: var(--fFB1Color);
- font-size: var(--font14Size);
- margin: 0 0 1vw 0;
- }
- .other {
- display: flex;
- flex-direction: row;
- justify-content: space-between;
- .other_1 {
- font-size: var(--font14Size);
- color: var(--f85Color);
- }
- }
- }
- .list:nth-child(2n) {
- margin: 2vw 0 0 0;
- }
- }
- }
- .scroll-view {
- position: absolute;
- top: 0;
- left: 0;
- right: 0;
- bottom: 0;
- .list-scroll-view {
- display: flex;
- flex-direction: row;
- flex-wrap: wrap;
- }
- }
- </style>
|