123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157 |
- <template>
- <mobile-frame>
- <view class="main">
- <view class="one">
- <image class="image" :src="oneUrl" mode=""></image>
- </view>
- <view class="two">
- <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">
- <image class="image" :src="item.url" mode=""></image>
- <view class="name">
- {{item.name}}
- </view>
- <view class="other">
- <view class="money">
- <text>¥</text>
- <text>{{item.money}}</text>
- </view>
- <view class="btn">
- <button type="default" size="mini">购买</button>
- </view>
- </view>
- </view>
- </view>
- </scroll-view>
- </view>
- </view>
- </mobile-frame>
- </template>
- <script>
- export default {
- data() {
- return {
- oneUrl: require('@/static/test.png'),
- list: [ //
- {
- url: require('@/static/test.png'),
- name: '商品名称',
- money: 100,
- },
- {
- url: require('@/static/test.png'),
- name: '商品名称',
- money: 100,
- },
- {
- url: require('@/static/test.png'),
- name: '商品名称',
- money: 100,
- },
- {
- url: require('@/static/test.png'),
- name: '商品名称',
- money: 100,
- },
- {
- url: require('@/static/test.png'),
- name: '商品名称',
- money: 100,
- },
- ]
- };
- },
- onShow: function() {},
- methods: {
- // 分页
- toPage() {}
- }
- }
- </script>
- <style lang="scss">
- .main {
- display: flex;
- flex-direction: column;
- width: 96vw;
- height: 97.5vh;
- padding: 2vw;
- background-color: #FB1438;
- .one {
- margin: 0 0 2vw 0;
- .image {
- width: 100%;
- height: 50vw;
- }
- }
- .two {
- position: relative;
- flex-grow: 1;
- .list {
- margin: 0 2vw 2vw 0;
- background-color: var(--fffColor);
- padding: 2vw;
- width: 43vw;
- border-radius: 5px;
- .image {
- width: 100%;
- height: 49vw;
- margin: 0 0 1vw 0;
- }
- .name {
- font-size: var(--font15Size);
- margin: 0 0 2vw 0;
- }
- .other {
- display: flex;
- flex-direction: row;
- justify-content: space-between;
- .money {
- color: var(--ff0Color);
- text:nth-child(1) {
- font-size: var(--font12Size);
- }
- }
- .btn {
- button {
- border-radius: 25px;
- color: var(--fffColor);
- background-color: var(--ff0Color);
- font-size: var(--font12Size);
- }
- }
- }
- }
- .list:nth-child(2n) {
- margin: 0 0 2vw 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>
|