Commit ee39768c by 胡悦

提交

1 parent 899b2036
......@@ -3,21 +3,21 @@
* @version:
* @Author: limin
* @Date: 2021-06-07 14:12:32
* @LastEditors: limin
* @LastEditTime: 2021-09-07 14:38:52
* @LastEditors: Please set LastEditors
* @LastEditTime: 2022-02-18 19:05:02
*/
// 根据环境引入不同配置 process.env.VUE_APP_ENV
// let request = require('@/http/request.js')
let cfg = require('./conf.js')
import { Http } from 'glsx-common'
let timeout = 30000 //超时时间
export const fetchConfig = function(isEnv = true) {
export const fetchConfig = function (isEnv = true) {
// console.log(1111111)
if (isEnv) {
let { request } = cfg
Object.assign(request, { timeout })
return Promise.resolve(cfg)
}
// if (isEnv) {
// let { request } = cfg
// Object.assign(request, { timeout })
// return Promise.resolve(cfg)
// }
//return window.fetch('https://', {}).then(res => res.json())
// request({ url: 'https://oss-config.test.glsx.com.cn/mock/5be17454f31545347559d499/config/oss_commodity_center', method: 'get' })
return new Http().get('https://oss-config.test.glsx.com.cn/mock/619c87331072f92988f05a29/marketing/config')
......
......@@ -198,7 +198,7 @@ export default {
return {
addLoading: false,
eventBus: new Vue(),
taggingList: '',
taggingList: [],
btnList: [
{
id: 1,
......@@ -342,31 +342,31 @@ export default {
this.$refs.membersForm.remove(val)
this.$set(this.basicForm, 'userList', this.$refs.membersForm.innerTags)
this.key = new Date()
this.isUpdate = true
} else {
this.basicForm.userList.splice(idx, 1)
this.selectData = this.basicForm.userList
this.key = new Date()
}
this.isUpdate = true
},
openLabel() {
this.dialogVisible = !this.dialogVisible
this.$refs.selectLabel.init()
},
handleSubmit() {
let arr = []
this.tagging.forEach(item => {
item.labelList.forEach(tag => {
arr.push({
groupId: parseInt(item.labelGroup.id),
groupName: item.labelGroup.name,
labelId: parseInt(tag.id),
labelName: tag.name,
groupType: item.labelType
})
})
})
this.taggingList = arr
// let arr = []
// this.tagging.forEach(item => {
// item.labelList.forEach(tag => {
// arr.push({
// groupId: parseInt(item.labelGroup.id),
// groupName: item.labelGroup.name,
// labelId: parseInt(tag.id),
// labelName: tag.name,
// groupType: item.labelType
// })
// })
// })
// this.taggingList = arr
// console.log(this.taggingList)
this.$refs.basicForm.validate(valid => {
if (valid) {
......@@ -456,6 +456,20 @@ export default {
// })
// }
this.tagging = val
let arr = []
this.tagging.forEach(item => {
item.labelList.forEach(tag => {
arr.push({
groupId: parseInt(item.labelGroup.id),
groupName: item.labelGroup.name,
labelId: parseInt(tag.id),
labelName: tag.name,
groupType: item.labelType
})
})
})
this.taggingList = arr
console.log(this.taggingList)
// this.taggingList = val
console.log(val, '1')
console.log(this.tagging, '2')
......@@ -467,7 +481,21 @@ export default {
tag.labelList.splice(idx1, 1)
if (tag.labelList.length == 0) {
this.tagging.splice(idx, 1)
// this.taggingList.splice(idx, 1)
}
let arr = []
this.tagging.forEach(item => {
item.labelList.forEach(tag => {
arr.push({
groupId: parseInt(item.labelGroup.id),
groupName: item.labelGroup.name,
labelId: parseInt(tag.id),
labelName: tag.name,
groupType: item.labelType
})
})
})
this.taggingList = arr
this.isUpdate = true
// this.$refs.selectLabel.init(this.tagging)
},
......
......@@ -119,12 +119,12 @@ export default {
labelTreeReq: {
pageNum: 1,
pageSize: 1000,
// shopId: this.$globalState.session.merchantId,
shopId: '44210934',
shopId: this.$globalState.session.merchantId,
// shopId: '44210934',
labelGroupName: this.labelGroupName,
// labelTypesStr: '自店标签,企业标签',
// edition: this.$globalState.session.merchantModel
edition: 4
labelTypesStr: '自店标签,企业标签',
edition: this.$globalState.session.merchantModel
// edition: 4
}
})
.then(res => {
......@@ -375,7 +375,7 @@ export default {
.el-tag {
font-size: 12px;
border: none;
background: rgba($color: #5850FF, $alpha: 0.3)
background: rgba($color: #5850ff, $alpha: 0.3);
}
}
.tag-selected-box {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!