|
|
@@ -4,6 +4,7 @@
|
|
|
scroll-y
|
|
|
class="shop-list"
|
|
|
>
|
|
|
+ <block v-if="!$util.isEmpty(shopList)">
|
|
|
<view
|
|
|
class="shop-item"
|
|
|
v-for="(item, index) in shopList"
|
|
|
@@ -31,6 +32,13 @@
|
|
|
> </text>
|
|
|
</view>
|
|
|
</view>
|
|
|
+ </block>
|
|
|
+ <block v-else>
|
|
|
+ <AppWrapperEmpty
|
|
|
+ title="暂无数据"
|
|
|
+ :is-empty="$util.isEmpty(shopList)"
|
|
|
+ />
|
|
|
+ </block>
|
|
|
</scroll-view>
|
|
|
<view class="under-bar">
|
|
|
<button
|
|
|
@@ -44,19 +52,25 @@
|
|
|
</template>
|
|
|
<script>
|
|
|
import { getPxClassDataApi, pxClassDel } from "@/api/product/index";
|
|
|
+import AppWrapperEmpty from "@/components/app-wrapper-empty";
|
|
|
export default {
|
|
|
- components: {},
|
|
|
+ components: { AppWrapperEmpty },
|
|
|
data () {
|
|
|
return {
|
|
|
shopList: []
|
|
|
};
|
|
|
},
|
|
|
- mounted () {
|
|
|
- this.getData()
|
|
|
+ onPullDownRefresh() {
|
|
|
+ this.getData().then(res => {
|
|
|
+ uni.stopPullDownRefresh();
|
|
|
+ })
|
|
|
},
|
|
|
methods: {
|
|
|
+ init() {
|
|
|
+ this.getData()
|
|
|
+ },
|
|
|
getData () {
|
|
|
- getPxClassDataApi().then(res => {
|
|
|
+ return getPxClassDataApi().then(res => {
|
|
|
console.log(res)
|
|
|
this.shopList = res.data.list
|
|
|
}).catch(err => { console.log(err) })
|