123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173 |
- <template>
- <view>
- <view class="list">
- <view class="item" v-for="(item, index) in list" :key="index" @click="detail(item)">
- <view class="lef">
- <image :src="ip + item.showPictures[0].url" mode="aspectFill" class="pic"></image>
- <view class="tag">{{ item.shopType == 1 ? '门店' : '酒店' }}</view>
- </view>
- <view class="con">
- <view class="title omit">{{ item.name }}</view>
- <view class="ms">
- <view class="wz">{{ item.addres }}</view>
- <view class="audit" v-if="item.auditFlag == 0">
- <text class="icon"></text>
- <text>未审核</text>
- </view>
- <view class="audit" v-if="item.auditFlag == 1" style="color: #18B566;">
- <text class="icon"></text>
- <text>审核通过</text>
- </view>
- </view>
- <view class="lx" @click.stop="up(item)" v-if="item.auditFlag == 1">
- <text class="icon"></text>
- 上报数据
- </view>
- </view>
- <view class="clear"></view>
- </view>
- </view>
- <view class="noLogin">
- <image class="u-error-icon" src="../../static/sj.png" mode="widthFix" v-if="list.length == 0"></image>
- <view class="dll" @click="go()">申请店铺</view>
- </view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- ip: this.$http.urls.ip,
- list: [],
- param: { pageNum: 1, pageSize: 10, memberId: this.$getUser().memberId }
- };
- },
- onLoad() {
- uni.$on('shop', res => {
- this.getData();
- });
- this.getData();
- },
- methods: {
- //获取数据
- getData() {
- this.$http.request({
- url: this.$http.urls.getShopList,
- data: this.param,
- success: res => {
- this.list = res.data.data.list;
- this.list.forEach(item => {
- item.showPictures = JSON.parse(item.showPictures);
- });
- }
- });
- },
- //上报数据
- up(item) {
- uni.navigateTo({ url: '/pages/shop/up?item=' + JSON.stringify(item) });
- },
- //开通店铺
- go() {
- uni.navigateTo({ url: '/pages/shop/apply' });
- },
- //详情
- detail(item) {
- uni.navigateTo({ url: '/pages/shop/apply?item=' + JSON.stringify(item) });
- }
- },
- //下拉刷新
- onPullDownRefresh() {
- setTimeout(() => {
- uni.stopPullDownRefresh();
- this.getData();
- }, 1000);
- }
- };
- </script>
- <style lang="scss">
- .list {
- padding: 0px 10px 70px 10px;
- .item {
- background-color: white;
- padding: 15px 8px 15px 8px;
- border-bottom: 1px solid #e5e5e5;
- border-radius: 5px;
- margin-top: 10px;
- box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.2);
- .lef {
- float: left;
- width: 30%;
- position: relative;
- overflow: hidden;
- .pic {
- width: 100%;
- border-radius: 3px;
- height: 80px;
- background-color: #dcdcdc;
- overflow: hidden;
- }
- .tag {
- position: absolute;
- bottom: 0px;
- width: 100%;
- text-align: center;
- background-color: red;
- height: 20px;
- opacity: 0.6;
- color: white;
- }
- }
- .con {
- padding-left: 30px;
- width: 60%;
- float: left;
- .title {
- font-size: 15px;
- text-align: left;
- color: #252525;
- font-weight: bold;
- }
- .ms {
- margin-top: 5px;
- .ll {
- color: #d72424;
- font-size: 16px;
- padding-right: 5px;
- }
- .wz {
- font-size: 12px;
- }
- .audit {
- font-size: 12px;
- margin-top: 5px;
- color: $dar;
- .icon {
- padding-right: 3px;
- }
- }
- }
- .lx {
- float: right;
- color: #fff;
- background: #d72424;
- border-radius: 4px;
- padding: 6px 8px;
- font-size: 15px;
- color: white;
- font-weight: bold;
- margin-right: -20px;
- margin-top: -15px;
- .icon {
- padding-right: 5px;
- font-size: 20px;
- }
- }
- }
- }
- }
- .noLogin {
- margin-top: -40px;
- }
- </style>
|