|
|
@@ -506,7 +506,8 @@ export default {
|
|
|
},
|
|
|
async getAdvertising() {
|
|
|
await this.advertisingHomeLocation();
|
|
|
- await this.advertisingList();
|
|
|
+ await this.getLocation()
|
|
|
+ // await this.advertisingList();
|
|
|
},
|
|
|
|
|
|
getUserSubscribeRecentExam() {
|
|
|
@@ -542,13 +543,26 @@ export default {
|
|
|
})
|
|
|
})
|
|
|
},
|
|
|
- advertisingList() {
|
|
|
- return new Promise(resolve => {
|
|
|
- this.$api.advertisingList({locationId:1}).then(res => {
|
|
|
+ getLocation() {
|
|
|
+ this.$api.advertisingLocation({
|
|
|
+ platform: 1,
|
|
|
+ status: 1,
|
|
|
+ locationKey: 'home-banner'
|
|
|
+ }).then((res) => {
|
|
|
+ if (res.data.code == 200) {
|
|
|
+ let locationId = res.data.data && res.data.data[0].locationId || 1
|
|
|
+ console.log('locationId:', locationId);
|
|
|
+ this.advertisingList(locationId)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ advertisingList(locationId) {
|
|
|
+ // return new Promise(resolve => {
|
|
|
+ this.$api.advertisingList({locationId: locationId}).then(res => {
|
|
|
this.list = res.data.rows;
|
|
|
- resolve()
|
|
|
+ // resolve()
|
|
|
})
|
|
|
- })
|
|
|
+ // })
|
|
|
},
|
|
|
jumpPage(){
|
|
|
this.$navTo.togo('/pages4/msg/index')
|