Commit 00b53055 by 杨明

fixed

1 parent a45909fa
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: yangming yangming@didihu.com.cn * @Author: yangming yangming@didihu.com.cn
* @Date: 2023-05-16 17:13:33 * @Date: 2023-05-16 17:13:33
* @LastEditors: yangming yangming@didihu.com.cn * @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-05-23 17:03:18 * @LastEditTime: 2023-05-24 14:45:33
* @FilePath: \scrm-micro-home\src\store\modules\marketing.js * @FilePath: \scrm-micro-home\src\store\modules\marketing.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/ */
...@@ -19,7 +19,9 @@ export default { ...@@ -19,7 +19,9 @@ export default {
customDetail: {}, customDetail: {},
calendarData: [], calendarData: [],
calendarDataAll: [], calendarDataAll: [],
schemeList: [], schemeList: {
list: []
},
keywords: '', keywords: '',
GPTList: null, GPTList: null,
merchantInfo: {} merchantInfo: {}
...@@ -104,12 +106,12 @@ export default { ...@@ -104,12 +106,12 @@ export default {
setSchemeListData(conText, payload) { setSchemeListData(conText, payload) {
apis.activity.listByPage(payload).then(res => { apis.activity.listByPage(payload).then(res => {
if (res) { if (res) {
conText.commit('SET_SCHEME_DATA', res.list) conText.commit('SET_SCHEME_DATA', res)
} }
}) })
}, },
getCalendarListDataAll(conText, payload) { getCalendarListDataAll(conText, payload) {
apis.activity.getCalendarList({}).then(res => { apis.activity.getCalendarList({ status: 1 }).then(res => {
console.log(res) console.log(res)
if (res.code == 0) { if (res.code == 0) {
conText.commit('SET_CALENDAR_DATA_ALL', res.data) conText.commit('SET_CALENDAR_DATA_ALL', res.data)
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn * @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2023-05-15 15:08:01 * @Date: 2023-05-15 15:08:01
* @LastEditors: yangming yangming@didihu.com.cn * @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-05-23 17:02:43 * @LastEditTime: 2023-05-23 17:35:23
* @FilePath: \scrm-micro-home\src\views\home\components\marketing\MarketingLeft.vue * @FilePath: \scrm-micro-home\src\views\home\components\marketing\MarketingLeft.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
--> -->
...@@ -64,9 +64,8 @@ export default { ...@@ -64,9 +64,8 @@ export default {
data() { data() {
return { return {
activityInfo: {}, activityInfo: {},
isSuper:true, isSuper: true,
schemeListData: [], schemeListData: [],
schemeList: [],
total: 0, total: 0,
dialogVisible: false, dialogVisible: false,
themeList: [ themeList: [
...@@ -89,7 +88,8 @@ export default { ...@@ -89,7 +88,8 @@ export default {
}, },
computed: { computed: {
...mapState({ ...mapState({
calendarData: state => state.marketing.calendarData calendarData: state => state.marketing.calendarData,
schemeList: state => state.marketing.schemeList
}) })
}, },
watch: { watch: {
...@@ -101,24 +101,17 @@ export default { ...@@ -101,24 +101,17 @@ export default {
} }
}, },
mounted() { mounted() {
this.getSchemeList() this.getSchemeListData() //44211227 this.$globalState.session.merchantId
this.setSchemeListData() //44211227 this.$globalState.session.merchantId
}, },
methods: { methods: {
...mapActions('marketing', ['setActivityInfo']), ...mapActions('marketing', ['setActivityInfo', 'setSchemeListData']),
setSchemeListData() { getSchemeListData() {
this.$apis.activity.listByPage({ merchantId: this.$globalState.session.merchantId, pageSize: 5, currentPage: this.currentPage }).then(res => { this.setSchemeListData({ merchantId: this.$globalState.session.merchantId, pageSize: 5, currentPage: this.currentPage })
if (res) {
let list = res.list || []
this.schemeList = this.currentPage == 1?list:this.schemeList.concat(res.list || [])
this.total = res.total
}
})
}, },
scrollLoad() { scrollLoad() {
if (this.schemeList.length == this.total) return if (this.schemeList.length == this.total) return
this.currentPage++ this.currentPage++
this.setSchemeListData() this.getSchemeListData()
}, },
getView(val) { getView(val) {
this.isSuper = true this.isSuper = true
...@@ -147,7 +140,8 @@ export default { ...@@ -147,7 +140,8 @@ export default {
}, },
getSchemeList(val) { getSchemeList(val) {
if (!val) return if (!val) return
this.schemeListData = val.map(item => { const list = val.pageNum == 1 ? val.list : this.schemeListData.concat(val.list)
this.schemeListData = list.map(item => {
return { return {
hovering: false, hovering: false,
activityName: item.activityName, activityName: item.activityName,
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn * @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2023-05-11 18:32:20 * @Date: 2023-05-11 18:32:20
* @LastEditors: yangming yangming@didihu.com.cn * @LastEditors: yangming yangming@didihu.com.cn
* @LastEditTime: 2023-05-20 17:21:14 * @LastEditTime: 2023-05-24 14:45:56
* @FilePath: \scrm-micro-home\src\views\home\marketing.vue * @FilePath: \scrm-micro-home\src\views\home\marketing.vue
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
--> -->
...@@ -57,7 +57,7 @@ export default { ...@@ -57,7 +57,7 @@ export default {
} }
}, },
mounted() { mounted() {
this.getCalendarListData({}) this.getCalendarListData({ status: 1 })
this.getCalendarListDataAll() this.getCalendarListDataAll()
this.getMerchantInfo({ merchantId: this.$globalState.session.merchantId })//'44211227' this.$globalState.session.merchantId this.getMerchantInfo({ merchantId: this.$globalState.session.merchantId })//'44211227' this.$globalState.session.merchantId
}, },
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!