Commit ca01fb64 by 无尘

fix: 修改设置

parent ff3f72a8
......@@ -4,7 +4,7 @@
* @Author: 无尘
* @Date: 2020-08-27 09:29:13
* @LastEditors: 无尘
* @LastEditTime: 2020-09-08 16:43:52
* @LastEditTime: 2020-09-09 09:56:32
*/
import getFetch from './get-fetch.js';
......@@ -39,7 +39,7 @@ let api = {
useIntercept: false
},
// 顾客展示
getShowSet: '', // 获取顾客展示数据
getShowSet: '/member//switch-list', // 获取顾客展示数据
saveShowSet: {
// 设置顾客展示数据
url: '/member/switch-setting',
......@@ -48,7 +48,7 @@ let api = {
useIntercept: false
},
// 顾客资料
getCustomerSet: '', // 获取顾客资料数据
getCustomerSet: '/member//switch-list', // 获取顾客资料数据
saveCustomerSet: {
// 设置顾客资料数据
url: '/member/switch-setting',
......
......@@ -4,7 +4,7 @@
* @Author: 无尘
* @Date: 2020-08-20 14:36:37
* @LastEditors: 无尘
* @LastEditTime: 2020-09-09 09:50:49
* @LastEditTime: 2020-09-09 09:59:32
-->
<template>
<div class="customer-assign-wrap">
......@@ -248,7 +248,8 @@ export default {
const that = this;
const para = {
wxEnterpriseId: that.wxEnterpriseId,
enterpriseId: that.brandId
enterpriseId: that.brandId,
switchType: 2
};
getCustomerSet(para)
.then(res => {
......
......@@ -4,7 +4,7 @@
* @Author: 无尘
* @Date: 2020-08-27 10:16:37
* @LastEditors: 无尘
* @LastEditTime: 2020-09-08 15:17:45
* @LastEditTime: 2020-09-09 09:59:05
-->
<template>
......@@ -77,12 +77,17 @@ export default {
*/
setData() {
const that = this;
let openCodes = [];
for(let i in that.customerShowData) {
if(that.customerShowData[i]){
openCodes.push(i);
}
}
const para = {
wxEnterpriseId: that.wxEnterpriseId,
enterpriseId: that.brandId,
mainStoreFlag: that.customerShowData.mainStoreFlag ? 1 : '0',
minorStoreFlag: that.customerShowData.minorStoreFlag ? 1 : '0',
openCardStoreFlag: that.customerShowData.openCardStoreFlag ? 1 : '0'
openCodes: openCodes.join(','),
switchType: '0'
};
saveShowSet(para)
.then(res => {
......@@ -106,11 +111,14 @@ export default {
const that = this;
const para = {
wxEnterpriseId: that.wxEnterpriseId,
enterpriseId: that.brandId
enterpriseId: that.brandId,
switchType: '0',
};
getShowSet(para)
.then(res => {
that.customerShowData = res.result || [];
res.result.forEach(ele => {
that.customerShowData[ele.switchCode] = ele.switchFlag == 1 ? true : false;
});
})
.catch(function(error) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment