Commit ca01fb64 by 无尘

fix: 修改设置

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