|
@@ -237,46 +237,103 @@ export default {
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- this.serviceType.forEach((item, index) => {
|
|
|
|
|
- this.serviceGoods[item.id] = {
|
|
|
|
|
- home: [],
|
|
|
|
|
- hot: []
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ if (this.serviceType.length == 0) {
|
|
|
this.$http.get({
|
|
this.$http.get({
|
|
|
- url: '/storeInfo/page',
|
|
|
|
|
- data: {
|
|
|
|
|
- currentPage: 1,
|
|
|
|
|
- pageNumber: 6,
|
|
|
|
|
- serviceType: item.id,
|
|
|
|
|
- homeFlag: 1,
|
|
|
|
|
- useFlag: 'Y'
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ url: '/serviceType/all',
|
|
|
|
|
+ data: {}
|
|
|
}).then(res => {
|
|
}).then(res => {
|
|
|
if (res.success) {
|
|
if (res.success) {
|
|
|
- this.serviceGoods[item.id].home = res.data.pp
|
|
|
|
|
|
|
+ this.$store.commit('updateServiceType', res.data)
|
|
|
|
|
+ this.serviceType.forEach((item, index) => {
|
|
|
|
|
+ this.serviceGoods[item.id] = {
|
|
|
|
|
+ home: [],
|
|
|
|
|
+ hot: []
|
|
|
|
|
+ }
|
|
|
|
|
+ this.$http.get({
|
|
|
|
|
+ url: '/storeInfo/page',
|
|
|
|
|
+ data: {
|
|
|
|
|
+ currentPage: 1,
|
|
|
|
|
+ pageNumber: 6,
|
|
|
|
|
+ serviceType: item.id,
|
|
|
|
|
+ homeFlag: 1,
|
|
|
|
|
+ useFlag: 'Y'
|
|
|
|
|
+ }
|
|
|
|
|
+ }).then(res => {
|
|
|
|
|
+ if (res.success) {
|
|
|
|
|
+ this.serviceGoods[item.id].home = res.data.pp
|
|
|
|
|
+ }
|
|
|
|
|
+ }).catch(e => {
|
|
|
|
|
+ console.log(e)
|
|
|
|
|
+ })
|
|
|
|
|
+
|
|
|
|
|
+ this.$http.get({
|
|
|
|
|
+ url: '/storeInfo/page',
|
|
|
|
|
+ data: {
|
|
|
|
|
+ currentPage: 1,
|
|
|
|
|
+ pageNumber: 10,
|
|
|
|
|
+ serviceType: item.id,
|
|
|
|
|
+ hotFlag: 1,
|
|
|
|
|
+ useFlag: 'Y'
|
|
|
|
|
+ }
|
|
|
|
|
+ }).then(res => {
|
|
|
|
|
+ if (res.success) {
|
|
|
|
|
+ this.serviceGoods[item.id].hot = res.data.pp
|
|
|
|
|
+ }
|
|
|
|
|
+ }).catch(e => {
|
|
|
|
|
+ console.log(e)
|
|
|
|
|
+ })
|
|
|
|
|
+
|
|
|
|
|
+ });
|
|
|
}
|
|
}
|
|
|
}).catch(e => {
|
|
}).catch(e => {
|
|
|
console.log(e)
|
|
console.log(e)
|
|
|
})
|
|
})
|
|
|
|
|
|
|
|
- this.$http.get({
|
|
|
|
|
- url: '/storeInfo/page',
|
|
|
|
|
- data: {
|
|
|
|
|
- currentPage: 1,
|
|
|
|
|
- pageNumber: 10,
|
|
|
|
|
- serviceType: item.id,
|
|
|
|
|
- hotFlag: 1,
|
|
|
|
|
- useFlag: 'Y'
|
|
|
|
|
- }
|
|
|
|
|
- }).then(res => {
|
|
|
|
|
- if (res.success) {
|
|
|
|
|
- this.serviceGoods[item.id].hot = res.data.pp
|
|
|
|
|
|
|
+ }
|
|
|
|
|
+ else {
|
|
|
|
|
+ this.serviceType.forEach((item, index) => {
|
|
|
|
|
+ this.serviceGoods[item.id] = {
|
|
|
|
|
+ home: [],
|
|
|
|
|
+ hot: []
|
|
|
}
|
|
}
|
|
|
- }).catch(e => {
|
|
|
|
|
- console.log(e)
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ this.$http.get({
|
|
|
|
|
+ url: '/storeInfo/page',
|
|
|
|
|
+ data: {
|
|
|
|
|
+ currentPage: 1,
|
|
|
|
|
+ pageNumber: 6,
|
|
|
|
|
+ serviceType: item.id,
|
|
|
|
|
+ homeFlag: 1,
|
|
|
|
|
+ useFlag: 'Y'
|
|
|
|
|
+ }
|
|
|
|
|
+ }).then(res => {
|
|
|
|
|
+ if (res.success) {
|
|
|
|
|
+ this.serviceGoods[item.id].home = res.data.pp
|
|
|
|
|
+ }
|
|
|
|
|
+ }).catch(e => {
|
|
|
|
|
+ console.log(e)
|
|
|
|
|
+ })
|
|
|
|
|
+
|
|
|
|
|
+ this.$http.get({
|
|
|
|
|
+ url: '/storeInfo/page',
|
|
|
|
|
+ data: {
|
|
|
|
|
+ currentPage: 1,
|
|
|
|
|
+ pageNumber: 10,
|
|
|
|
|
+ serviceType: item.id,
|
|
|
|
|
+ hotFlag: 1,
|
|
|
|
|
+ useFlag: 'Y'
|
|
|
|
|
+ }
|
|
|
|
|
+ }).then(res => {
|
|
|
|
|
+ if (res.success) {
|
|
|
|
|
+ this.serviceGoods[item.id].hot = res.data.pp
|
|
|
|
|
+ }
|
|
|
|
|
+ }).catch(e => {
|
|
|
|
|
+ console.log(e)
|
|
|
|
|
+ })
|
|
|
|
|
+
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
|
|
|
- });
|
|
|
|
|
|
|
|
|
|
setTimeout(() => {
|
|
setTimeout(() => {
|
|
|
this.loading = false
|
|
this.loading = false
|
|
@@ -366,8 +423,8 @@ export default {
|
|
|
document.getElementById('container').scrollTop = document.getElementById('box' + index).offsetTop + 730 - 250
|
|
document.getElementById('container').scrollTop = document.getElementById('box' + index).offsetTop + 730 - 250
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- activated(){
|
|
|
|
|
- this.quickFixed = false
|
|
|
|
|
|
|
+ activated() {
|
|
|
|
|
+ this.quickFixed = false
|
|
|
document.getElementById('quickMenu').style.left = 0
|
|
document.getElementById('quickMenu').style.left = 0
|
|
|
|
|
|
|
|
},
|
|
},
|