123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225 |
- <template>
- <mobile-frame>
- <view class="main">
- <view class="one">
- <input type="text" v-model="searchInfo.name" @input="toInput" placeholder="搜索商品">
- </view>
- <view class="two">
- <scroll-view scroll-y="true" class="scroll-view" @scrolltolower="toPage">
- <view class="list-scroll-view">
- <view class="two_1">
- <view class="cond_1">
- 默认
- </view>
- <view class="cond_1">
- 默认
- </view>
- <view class="cond_1">
- 默认
- </view>
- <view class="cond_1">
- 默认
- </view>
- </view>
- <view class="two_2">
- <view class="list" v-for="(item,index) in list" :key="index">
- <view class="list_1">
- <view class="name">
- <text @click="toDel(item)" class="iconfont icon-shangdian"></text>
- <text>{{item.shop}}</text>
- </view>
- <view class="status">{{item.status=='0'?'待付款':'已付款'}}</view>
- </view>
- <view class="list_2">
- <image class="image" :src="item.url" mode=""></image>
- <view class="other">
- <view class="name">{{item.name}}</view>
- <view class="other_1">
- 口味: {{item.num||'暂无'}}
- </view>
- </view>
- <view class="money">
- <text>¥</text>
- <text>{{item.money}}</text>
- <view class="num">
- ×{{item.num}}
- </view>
- </view>
- </view>
- <view class="list_3">
- <text>共{{item.num}}件商品</text>
- <text>总价¥{{item.money}}</text>
- </view>
- </view>
- </view>
- </view>
- </scroll-view>
- </view>
- </view>
- </mobile-frame>
- </template>
- <script>
- export default {
- data() {
- return {
- searchInfo: {},
- list: [ //商品列表
- {
- url: require('@/static/test.png'),
- shop: '官方自营店',
- name: '商品名称',
- money: '10.00',
- status: '0',
- num: 2,
- },
- {
- url: require('@/static/test.png'),
- name: '商品名称',
- shop: '官方自营店',
- money: '10.00',
- status: '0',
- num: 2,
- },
- {
- url: require('@/static/test.png'),
- name: '商品名称',
- shop: '官方自营店',
- money: '10.00',
- status: '0',
- num: 2,
- },
- ]
- };
- },
- onShow: function() {},
- methods: {
- // 分页
- toPage(e) {
- },
- // 输入框
- toInput(e) {
- const that = this;
- that.$set(that.searchInfo, `name`, e.detail.value)
- }
- }
- }
- </script>
- <style lang="scss">
- .main {
- display: flex;
- flex-direction: column;
- width: 100vw;
- height: 100vh;
- .one {
- padding: 2vw;
- input {
- padding: 2vw;
- background-color: var(--f1Color);
- font-size: var(--font14Size);
- border-radius: 5px;
- }
- }
- .two {
- position: relative;
- flex-grow: 1;
- .two_1 {
- background-color: var(--fffColor);
- padding: 2vw;
- display: flex;
- flex-direction: row;
- }
- .two_2 {
- display: flex;
- flex-direction: column;
- padding: 2vw 2vw 0 2vw;
- .list {
- width: 95vw;
- border-radius: 5px;
- border: 1px solid red;
- margin: 2vw 0 0 0;
- .list_1 {
- display: flex;
- flex-direction: row;
- justify-content: space-between;
- padding: 2vw;
- .name {
- font-size: var(--font16Size);
- text {
- margin: 0 1vw 0 0;
- }
- }
- .status {
- font-size: var(--font16Size);
- color: var(--ff0Color);
- }
- }
- .list_2 {
- display: flex;
- flex-direction: row;
- justify-content: space-between;
- padding: 2vw;
- background-color: var(--f1Color);
- .image {
- width: 25vw;
- height: 25vw;
- margin: 0 2vw 0 0;
- }
- .other {
- display: flex;
- flex-direction: column;
- flex-grow: 1;
- .name {
- font-size: var(--font16Size);
- font-weight: bold;
- margin: 0 0 2vw 0;
- }
- .other_1 {
- font-size: var(--font14Size);
- color: var(--f85Color);
- }
- }
- .money {
- font-size: var(--font14Size);
- .num {
- text-align: right;
- }
- }
- }
- }
- }
- }
- }
- .scroll-view {
- position: absolute;
- top: 0;
- left: 0;
- right: 0;
- bottom: 0;
- .list-scroll-view {
- display: flex;
- flex-direction: column;
- }
- }
- </style>
|