Commit 7cea1560 authored by 黄奎's avatar 黄奎

页面修改

parent 7467ba7c
This diff is collapsed.
import axios from 'axios' import axios from 'axios'
import domainManager from './domainManager' import domainManager from './domainManager'
const getLocalStorage = function () { const getLocalStorage = function () {
var localStorageData = window.localStorage["userInfo"]; var localStorageData = window.localStorage["userInfo"];
if (localStorageData != undefined) { if (localStorageData != undefined) {
return JSON.parse(localStorageData); return JSON.parse(localStorageData);
} else { } else {
return null; return null;
} }
} }
//CRM接口 //CRM接口
export default function(cmd,content, msg, successCall, faildCall) { export default function (cmd, content, msg, successCall, faildCall) {
console.log('CRM接口', content) if (msg == null || msg == "") {
if (msg == null || msg == "") { msg = {}
msg = {} }
} var apiurl = domainManager().PostUrl + cmd;
var apiurl = domainManager().PostUrl + cmd; var timestamp = (new Date()).valueOf();
var timestamp = (new Date()).valueOf(); var token = "";
var token = ""; var key = "";
var key = ""; if (getLocalStorage() != null) {
if (getLocalStorage() != null) { token = getLocalStorage().token;
token = getLocalStorage().token; key = getLocalStorage().secretKey;
key = getLocalStorage().secretKey; }
} var encodeMsg = encodeURIComponent(JSON.stringify(msg)).toLowerCase();
var encodeMsg = encodeURIComponent(JSON.stringify(msg)).toLowerCase(); var md5Str = md5(`cmd=${cmd}&msg=${encodeMsg}&timestamp=${timestamp}&token=${token}&key=${key}`);
var md5Str = md5(`cmd=${cmd}&msg=${encodeMsg}&timestamp=${timestamp}&token=${token}&key=${key}`); var postData = {
var postData = { "msg": msg,
"msg": msg, "timestamp": timestamp,
"timestamp": timestamp, "token": token,
"token": token, "sign": md5Str
"sign": md5Str }
if (localStorage.g && localStorage.g != 'undefined') {
postData.groupId = 2;
}
axios.post(apiurl, postData, {
headers: {
'Content-Type': 'application/json',
'Referer-Viitto': content.$route.path
} }
if (localStorage.g && localStorage.g != 'undefined') { })
postData.groupId = 2; .then(res => {
} if (res.data.resultCode == 10000 || res.data.resultCode == 10001) {
axios.post(apiurl, postData, { content.$router.push({
headers: { path: '/login'
'Content-Type': 'application/json',
'Referer-Viitto': content.$route.path
}
}) })
.then(res => { } else if (res.data.resultCode == 10005) {
if (res.data.resultCode == 10000 || res.data.resultCode == 10001) { content.$router.go(-1)
content.$router.push({ } else {
path: '/login' successCall(res)
}) }
} else if (res.data.resultCode == 10005) { }, faildCall)
content.$router.go(-1) }
} else { \ No newline at end of file
successCall(res)
}
}, faildCall)
}
\ No newline at end of file
...@@ -5,7 +5,7 @@ export default function() { ...@@ -5,7 +5,7 @@ export default function() {
//CRM API //CRM API
let domainUrl = ""; let domainUrl = "";
// domainUrl = "http://192.168.10.46:8500"; // domainUrl = "http://192.168.10.46:8500";
domainUrl = "http://192.168.10.226:5003"; domainUrl = "http://192.168.10.128:5003";
// domainUrl = "http://crm.oytour.com" // domainUrl = "http://crm.oytour.com"
//domainUrl = "http://localhost:5003"; //domainUrl = "http://localhost:5003";
let locationName = window.location.hostname; let locationName = window.location.hostname;
......
...@@ -135,7 +135,6 @@ export default { ...@@ -135,7 +135,6 @@ export default {
if (msg == null || msg == "") { if (msg == null || msg == "") {
msg = {} msg = {}
} }
console.log('CRM接口', this)
var apiurl = this.domainManager().PostUrl + cmd; var apiurl = this.domainManager().PostUrl + cmd;
var timestamp = (new Date()).valueOf(); var timestamp = (new Date()).valueOf();
var token = ""; var token = "";
......
...@@ -246,7 +246,6 @@ ...@@ -246,7 +246,6 @@
//获取客户操作配置 //获取客户操作配置
const getConfig = () => { const getConfig = () => {
customerSetService.getCustomerConfig({}).then(res => { customerSetService.getCustomerConfig({}).then(res => {
console.log('客户操作配置', res.data.Data)
data.data = res.data.Data data.data = res.data.Data
if (data.data.PublicGetDept == -1) { if (data.data.PublicGetDept == -1) {
data.PublicGetDeptState = false data.PublicGetDeptState = false
...@@ -312,7 +311,6 @@ ...@@ -312,7 +311,6 @@
data.data.AbandonDept = ids data.data.AbandonDept = ids
data.data.AbandonDeptList = dept data.data.AbandonDeptList = dept
} }
console.log('dpt', dept)
} }
//以下部门允许领取公海客户 //以下部门允许领取公海客户
const ChangePublicGetDeptState = val => { const ChangePublicGetDeptState = val => {
...@@ -324,7 +322,7 @@ ...@@ -324,7 +322,7 @@
watch( watch(
() => data.data, () => data.data,
val => { val => {
console.log('watch', val)
}, { }, {
deep: true deep: true
} }
...@@ -347,7 +345,6 @@ ...@@ -347,7 +345,6 @@
} }
} }
}) })
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.CustomerOperation { .CustomerOperation {
...@@ -409,5 +406,4 @@ ...@@ -409,5 +406,4 @@
padding: 0 14px; padding: 0 14px;
margin: 6px; margin: 6px;
} }
</style>
</style> \ No newline at end of file
...@@ -11,12 +11,12 @@ ...@@ -11,12 +11,12 @@
</div> </div>
</div> </div>
<div class="box-businessModel" :class="{ 'checked-border': msg.type == 2 }" @click="chooseChange(2)"> <div class="box-businessModel" :class="{ 'checked-border': msg.type == 2 }" @click="chooseChange(2)">
<div > <div>
<i class="iconfont icon-customer" style="font-size:38px"></i> <i class="iconfont icon-customer" style="font-size:38px"></i>
<span class="q-mx-md" style="font-size:28px">+</span> <span class="q-mx-md" style="font-size:28px">+</span>
<i class="iconfont icon-qiye" style="font-size:38px"></i> <i class="iconfont icon-qiye" style="font-size:38px"></i>
</div> </div>
<div>个人客户 + 企业客户</div> <div>个人客户 + 企业客户</div>
<div class="right" v-if="msg.type == 2"> <div class="right" v-if="msg.type == 2">
<q-icon name="check" class="check-icon" /> <q-icon name="check" class="check-icon" />
...@@ -32,14 +32,12 @@ ...@@ -32,14 +32,12 @@
} from 'vue' } from 'vue'
export default defineComponent({ export default defineComponent({
setup() { setup() {
const msg = reactive({ const msg = reactive({
type: 1 type: 1
}) })
const chooseChange = (n) => { const chooseChange = (n) => {
msg.type = n; msg.type = n;
console.log(msg)
} }
return { return {
msg, msg,
...@@ -47,11 +45,10 @@ ...@@ -47,11 +45,10 @@
} }
} }
}) })
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.businessModel { .businessModel {
overflow: hidden; overflow: hidden;
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
margin: 0 auto; margin: 0 auto;
...@@ -106,5 +103,4 @@ ...@@ -106,5 +103,4 @@
border: 2px solid #3470ff !important; border: 2px solid #3470ff !important;
color: #3470ff; color: #3470ff;
} }
</style>
</style> \ No newline at end of file
...@@ -227,7 +227,6 @@ ...@@ -227,7 +227,6 @@
cancel: '取消', cancel: '取消',
ok: "确认" ok: "确认"
}).onOk(() => { }).onOk(() => {
console.log('>>>> OK', id)
let msg = { let msg = {
RuleId: id, RuleId: id,
Type: 2, Type: 2,
...@@ -237,10 +236,8 @@ ...@@ -237,10 +236,8 @@
} }
const configChange = () => { const configChange = () => {
customerSetService.setCustomerClueRuleConfig(configMsg).then(res => { customerSetService.setCustomerClueRuleConfig(configMsg).then(res => {
console.log(228, res.data)
}) })
} }
const setState = (msg) => { const setState = (msg) => {
customerSetService.setCustomerClueRuleState(msg).then(res => { customerSetService.setCustomerClueRuleState(msg).then(res => {
message.successMsg(res.data.Message) message.successMsg(res.data.Message)
......
...@@ -113,7 +113,6 @@ ...@@ -113,7 +113,6 @@
}); });
}, },
datadragEnd(e) { datadragEnd(e) {
// console.log('拖动结束',e)
let olddragId = 0 let olddragId = 0
if (e.newIndex > 0) { if (e.newIndex > 0) {
olddragId = data[e.newIndex - 1].Id olddragId = data[e.newIndex - 1].Id
...@@ -127,7 +126,6 @@ ...@@ -127,7 +126,6 @@
} }
this.apipost('/api/Scene/SetCustomerFiledState',msg,(res) => { this.apipost('/api/Scene/SetCustomerFiledState',msg,(res) => {
if (res.data.Code == 1) { if (res.data.Code == 1) {
console.log(res)
} else {//如果移动失败 重新获取列表 } else {//如果移动失败 重新获取列表
this.changePage() this.changePage()
} }
......
...@@ -101,7 +101,6 @@ export default defineComponent({ ...@@ -101,7 +101,6 @@ export default defineComponent({
{Name:' 根据设置自动指定负责人 '}, {Name:' 根据设置自动指定负责人 '},
]) ])
const Addallocation = (url: string) => {//新增分配规则 const Addallocation = (url: string) => {//新增分配规则
console.log('新增匹配规则')
router.push({ router.push({
path: url, path: url,
query: { query: {
...@@ -109,9 +108,6 @@ export default defineComponent({ ...@@ -109,9 +108,6 @@ export default defineComponent({
} }
}) })
} }
// onMounted(() => {
// })
return { return {
Addallocation, Addallocation,
icon:ref(false), icon:ref(false),
......
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