|
@@ -17,7 +17,7 @@
|
|
|
</van-cell>
|
|
|
</van-cell-group>
|
|
|
|
|
|
- <div class="activeList">
|
|
|
+ <div class="activeList" v-if="dataShow">
|
|
|
<h2>优惠活动:</h2>
|
|
|
|
|
|
<div class="active" @click="onPayOrder(item)" v-for="(item, index) in dataList" :key="index">
|
|
@@ -30,6 +30,10 @@
|
|
|
</van-image>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <div class="activeList" v-else>
|
|
|
+ <h2>优惠活动:</h2>
|
|
|
+ <m-empty class="empty" msg="暂无优惠活动" key="data" />
|
|
|
+ </div>
|
|
|
|
|
|
<!-- <div class="pay_btn" >确认兑换</div> -->
|
|
|
<van-popup v-model="popupShow" closeable position="bottom"
|
|
@@ -41,12 +45,13 @@
|
|
|
<script>
|
|
|
/* eslint-disable */
|
|
|
import MHeader from '@/components/MHeader'
|
|
|
+import MEmpty from '@/components/MEmpty'
|
|
|
import { browser, calcMinute } from '@/common/common'
|
|
|
import { tenantEntryActivitesList, queryUserInfo, sysTenantAccountGet, createOrder } from '@/api/app'
|
|
|
|
|
|
export default {
|
|
|
name: 'courseApply',
|
|
|
- components: { MHeader },
|
|
|
+ components: { MHeader, MEmpty },
|
|
|
data() {
|
|
|
return {
|
|
|
userInfo: {},
|
|
@@ -57,6 +62,7 @@ export default {
|
|
|
isClick: false,
|
|
|
popupShow: false,
|
|
|
popupContent: null,
|
|
|
+ dataShow: true, // 是否有数据
|
|
|
imageStatus: false
|
|
|
}
|
|
|
},
|
|
@@ -106,11 +112,14 @@ export default {
|
|
|
await tenantEntryActivitesList().then(res => {
|
|
|
let result = res.data
|
|
|
if(result.code == 200) {
|
|
|
- this.dataList = result.data.rows
|
|
|
+ this.dataList = result.data.rows ? result.data.rows : []
|
|
|
} else {
|
|
|
loadingStatus = false
|
|
|
this.$toast(result.msg)
|
|
|
}
|
|
|
+ if(this.dataList.length <= 0) {
|
|
|
+ this.dataShow = false
|
|
|
+ }
|
|
|
})
|
|
|
if(loadingStatus) {
|
|
|
this.$toast.clear()
|