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

页面修改

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