Commit 00b53055 by 杨明

fixed

1 parent a45909fa
......@@ -2,7 +2,7 @@
* @Author: yangming yangming@didihu.com.cn
* @Date: 2023-05-16 17:13:33
* @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
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
......@@ -19,7 +19,9 @@ export default {
customDetail: {},
calendarData: [],
calendarDataAll: [],
schemeList: [],
schemeList: {
list: []
},
keywords: '',
GPTList: null,
merchantInfo: {}
......@@ -104,12 +106,12 @@ export default {
setSchemeListData(conText, payload) {
apis.activity.listByPage(payload).then(res => {
if (res) {
conText.commit('SET_SCHEME_DATA', res.list)
conText.commit('SET_SCHEME_DATA', res)
}
})
},
getCalendarListDataAll(conText, payload) {
apis.activity.getCalendarList({}).then(res => {
apis.activity.getCalendarList({ status: 1 }).then(res => {
console.log(res)
if (res.code == 0) {
conText.commit('SET_CALENDAR_DATA_ALL', res.data)
......
......@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2023-05-15 15:08:01
* @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
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
......@@ -64,9 +64,8 @@ export default {
data() {
return {
activityInfo: {},
isSuper:true,
isSuper: true,
schemeListData: [],
schemeList: [],
total: 0,
dialogVisible: false,
themeList: [
......@@ -89,7 +88,8 @@ export default {
},
computed: {
...mapState({
calendarData: state => state.marketing.calendarData
calendarData: state => state.marketing.calendarData,
schemeList: state => state.marketing.schemeList
})
},
watch: {
......@@ -101,24 +101,17 @@ export default {
}
},
mounted() {
this.getSchemeList()
this.setSchemeListData() //44211227 this.$globalState.session.merchantId
this.getSchemeListData() //44211227 this.$globalState.session.merchantId
},
methods: {
...mapActions('marketing', ['setActivityInfo']),
setSchemeListData() {
this.$apis.activity.listByPage({ merchantId: this.$globalState.session.merchantId, pageSize: 5, currentPage: this.currentPage }).then(res => {
if (res) {
let list = res.list || []
this.schemeList = this.currentPage == 1?list:this.schemeList.concat(res.list || [])
this.total = res.total
}
})
...mapActions('marketing', ['setActivityInfo', 'setSchemeListData']),
getSchemeListData() {
this.setSchemeListData({ merchantId: this.$globalState.session.merchantId, pageSize: 5, currentPage: this.currentPage })
},
scrollLoad() {
if (this.schemeList.length == this.total) return
this.currentPage++
this.setSchemeListData()
this.getSchemeListData()
},
getView(val) {
this.isSuper = true
......@@ -147,7 +140,8 @@ export default {
},
getSchemeList(val) {
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 {
hovering: false,
activityName: item.activityName,
......
......@@ -2,7 +2,7 @@
* @Author: 前端 qianduan01@didihu.com.cn
* @Date: 2023-05-11 18:32:20
* @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
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
......@@ -57,7 +57,7 @@ export default {
}
},
mounted() {
this.getCalendarListData({})
this.getCalendarListData({ status: 1 })
this.getCalendarListDataAll()
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!