Commit 80460fc8 by 徐学军

Accept Merge Request #3: (v3.0.x -> master)

Merge Request: v3.0

Created By: @徐学军
Accepted By: @徐学军
URL: https://linkwechat.coding.net/p/linkwechat-front/d/linkwechat/git/merge/3
2 parents 10d1993a 06cc30f2
Showing 457 changed files with 2082 additions and 1777 deletions
...@@ -19,4 +19,5 @@ velocity.log ...@@ -19,4 +19,5 @@ velocity.log
.DS_Store .DS_Store
logs logs
.m2 .m2
linkwe-taskMobile/dist/ linkwe-pc/pc/
linkwe-mobile/h5/
\ No newline at end of file \ No newline at end of file
.DS_Store .DS_Store
node_modules node_modules
/dist /saas
# local env files # local env files
......
const envs = { const envs = {
development: { development: {
BASE_URL: '/', // 路由基础路径 BASE_URL: '/devMobile/saas/', // 路由基础路径
BASE_API: 'http://demo.linkwechat.cn/dev-api', BASE_API: 'http://demo.linkwechat.net/saas-dev-api',
APPID: 'ww622fc852f79c3f13'
}, },
test: { test: {
BASE_URL: '/devMobile/', // 路由基础路径 BASE_URL: '/mobile/', // 路由基础路径
BASE_API: 'http://demo.linkwechat.cn/dev-api', BASE_API: 'http://demo.linkwechat.net/linkwechat-api',
APPID: 'ww622fc852f79c3f13'
}, },
production: { production: {
BASE_URL: '/mobile/', // 路由基础路径 BASE_URL: '/mobile/', // 路由基础路径
BASE_API: 'http://demo.linkwechat.cn/prod-api', BASE_API: 'http://demo.linkwechat.net/linkwechat-api',
APPID: 'ww622fc852f79c3f13'
}, },
} }
let env = envs[process.env.VUE_APP_ENV] let env = envs[process.env.VUE_APP_ENV]
......
{
"compilerOptions": {
"baseUrl": "./",
"paths": {
"@/*": ["src/*"]
}
},
// "include": ["src/**/*"],
"exclude": ["node_modules", "dist"]
}
This diff could not be displayed because it is too large.
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
"license": "GPL-3.0", "license": "GPL-3.0",
"scripts": { "scripts": {
"serve": "vue-cli-service serve", "serve": "vue-cli-service serve",
"develop": "vue-cli-service build --ENV=development",
"build": "vue-cli-service build", "build": "vue-cli-service build",
"test": "vue-cli-service build --ENV=test", "test": "vue-cli-service build --ENV=test",
"lint": "vue-cli-service lint" "lint": "vue-cli-service lint"
...@@ -37,6 +38,7 @@ ...@@ -37,6 +38,7 @@
"prettier": "^1.19.1", "prettier": "^1.19.1",
"script-ext-html-webpack-plugin": "^2.1.5", "script-ext-html-webpack-plugin": "^2.1.5",
"style-resources-loader": "^1.3.2", "style-resources-loader": "^1.3.2",
"svg-sprite-loader": "^6.0.11",
"vue-cli-plugin-style-resources-loader": "~0.1.4", "vue-cli-plugin-style-resources-loader": "~0.1.4",
"vue-template-compiler": "^2.6.11" "vue-template-compiler": "^2.6.11"
}, },
......
No preview for this file type
...@@ -5,11 +5,13 @@ ...@@ -5,11 +5,13 @@
<meta charset="utf-8"> <meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="renderer" content="webkit"> <meta name="renderer" content="webkit">
<meta name="viewport" content="width=device-width,initial-scale=1.0, maximum-scale=1, user-scalable=no"> <meta name="viewport"
<link rel="icon" href="<%= BASE_URL %>favicon.ico"> content="width=device-width,initial-scale=1.0, maximum-scale=1, user-scalable=no,viewport-fit=cover">
<link rel="icon" href="<%= BASE_URL %>favicon.png">
<title> <title>
仟微助手 仟微助手
</title> </title>
<script src="https://hm.baidu.com/hm.js?b744cd76e6cd68bc38d23e1c5ba6b449"></script>
<script src="./static/config.js"></script> <script src="./static/config.js"></script>
<script src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script> <script src="http://res.wx.qq.com/open/js/jweixin-1.2.0.js"></script>
<script src="https://open.work.weixin.qq.com/wwopen/js/jwxwork-1.0.0.js"></script> <script src="https://open.work.weixin.qq.com/wwopen/js/jwxwork-1.0.0.js"></script>
......
// 用于无打包配置,会覆盖系统相关配置 // 用于无打包配置,会覆盖系统相关配置
// window.lwConfig = { window.lwConfig = {
// // BASE_URL: '/', // 路由基础路径 // BASE_URL: '/', // 路由基础路径
// // BASE_API: 'http://demo.linkwechat.cn/prod-api', // BASE_API: 'http://demo.linkwechat.cn/prod-api',
// } // IS_VCONSOLE: true,
}
<script> <script>
import { getUserInfo } from '@/api/common'
import { getAgentTicket, getAppTicket } from '@/api/common'
import { param2Obj } from '@/utils/index'
export default { export default {
name: 'App', name: 'App',
provide() { provide() {
...@@ -10,164 +7,30 @@ export default { ...@@ -10,164 +7,30 @@ export default {
} }
}, },
data() { data() {
return { return {}
corpId: '',
agentId: '',
isRouterAlive: true,
}
}, },
async created() {
// http://106.13.201.219/?code=xxx&state=linkwechat#/route
// console.log('routerbeforeCreate', this.$route);
// this.$dialog({ message: 'url' + JSON.stringify(window.location) })
let query = param2Obj(window.location.search)
let hash = param2Obj(window.location.hash)
query = Object.assign(query, hash)
let code = query.code
this.corpId = query.corpId
this.agentId = query.agentId
// this.$toast('agentId:' + this.agentId)
this.$router.onReady(async () => {
const noAuth = this.$router.app.$route.meta ? this.$router.app.$route.meta.noAuth : false
if (!code && !noAuth) {
this.$dialog({ message: '未获得授权' })
}
const noGetUser = this.$router.app.$route.meta ? this.$router.app.$route.meta.noAuth : false
if (!code || noGetUser) {
// this.$toast('未获得授权')
return
}
let userId = sessionStorage.getItem('userId')
//取缓存中的用户信息
if (userId) {
userId = JSON.parse(userId)
} else {
let { data } = await getUserInfo(code, this.agentId)
// 存入sessionStorage,解决刷新重复code获取用户问题
sessionStorage.setItem('userId', JSON.stringify(data.userId))
userId = data.userId
}
this.$store.state.userId = userId
})
// this.$toast('userId:' + this.$store.state.userId) created() {},
},
watch: {
// 通过config接口注入权限验证配置
// 所有需要使用JS-SDK的页面必须先注入配置信息,否则将无法调用(同一个url仅需调用一次,对于变化url的SPA(single-page application)的web app可在每次url变化时进行调用)
$route(route) {
// this.wxConfig()
const noAuth = route.meta ? route.meta.noAuth : false
!noAuth && this.wxConfig()
},
},
methods: { methods: {
reload() { reload() {
this.isRouterAlive = false this.$store.state.reload = false
this.$nextTick(() => { this.$nextTick(() => {
this.isRouterAlive = true this.$store.state.reload = true
})
},
async wxConfig() {
this.$store.state.agentConfigStatus = false
try {
let { data } = await getAgentTicket(window.location.href.split('#')[0], this.agentId)
let { timestamp, nonceStr, signature } = data
wx.agentConfig({
beta: true, // 必须这么写,否则wx.invoke调用形式的jsapi会有问题
debug: true,
corpid: this.corpId, // 必填,企业微信的corpid,必须与当前登录的企业一致
agentid: this.agentId, // 必填,企业微信的应用id (e.g. 1000247)
timestamp, // 必填,生成签名的时间戳
nonceStr, // 必填,生成签名的随机串
signature, // 必填,签名,见附录-JS-SDK使用权限签名算法
jsApiList: [
'sendChatMessage',
'getContext',
'getCurExternalContact',
'getCurExternalChat',
'openEnterpriseChat',
'shareToExternalContact',
'shareToExternalChat',
'navigateToAddCustomer',
], //必填
success: (res) => {
// 回调
// this.$toast('agentId成功:')
this.$store.state.agentConfigStatus = true
},
fail: (res) => {
console.log('agent config 失败: ', res)
this.$toast('agentId失败:' + JSON.stringify(res))
if (res.errMsg.indexOf('function not exist') > -1) {
alert('版本过低请升级')
}
},
}) })
} catch (error) {}
}, },
// 丢弃
// _wxConfig() {
// // 获取企业的jsapi_ticket
// getAppTicket(window.location.href).then(({ data }) => {
// let { timestamp, nonceStr, signature } = data
// wx.config({
// beta: true, // 必须这么写,否则wx.invoke调用形式的jsapi会有问题
// debug: true, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
// corpId: this.corpId, // 必填,企业微信的corpID
// timestamp, // 必填,生成签名的时间戳
// nonceStr, // 必填,生成签名的随机串
// signature, // 必填,签名,见 附录-JS-SDK使用权限签名算法
// jsApiList: ['getContext', 'sendChatMessage'], // 必填,需要使用的JS接口列表,凡是要调用的接口都需要传进来
// })
// wx.ready(() => {
// // config信息验证后会执行ready方法,所有接口调用都必须在config接口获得结果之后,config是一个客户端的异步操作,所以如果需要在页面加载时就调用相关接口,则须把相关接口放在ready函数中调用来确保正确执行。对于用户触发时才调用的接口,则可以直接调用,不需要放在ready函数中。
// getAgentTicket(window.location.href).then(({ data }) => {
// let { timestamp, nonceStr, signature } = data
// wx.agentConfig({
// corpid: this.corpId, // 必填,企业微信的corpid,必须与当前登录的企业一致
// agentid: this.agentId, // 必填,企业微信的应用id (e.g. 1000247)
// timestamp, // 必填,生成签名的时间戳
// nonceStr, // 必填,生成签名的随机串
// signature, // 必填,签名,见附录-JS-SDK使用权限签名算法
// jsApiList: ['sendChatMessage'], //必填
// success: (res) => {
// // 回调
// },
// fail: (res) => {
// if (res.errMsg.indexOf('function not exist') > -1) {
// alert('版本过低请升级')
// }
// },
// })
// })
// })
// wx.error(function(res) {
// console.error(res)
// // config信息验证失败会执行error函数,如签名过期导致验证失败,具体错误信息可以打开config的debug模式查看,也可以在返回的res参数中查看,对于SPA可以在这里更新签名。
// })
// })
// },
}, },
} }
</script> </script>
<template> <template>
<div id="app"> <div id="app">
<router-view class="page" v-if="isRouterAlive" /> <router-view class="page" v-if="$store.state.reload" />
</div> </div>
</template> </template>
<style lang="less"> <style lang="less">
#app { .page {
font-family: Avenir, Helvetica, Arial, sans-serif; height: 100vh;
-webkit-font-smoothing: antialiased; background: #fafafa;
-moz-osx-font-smoothing: grayscale; overflow: auto;
color: #2c3e50;
} }
</style> </style>
import request from '@/utils/request' import request from '@/utils/request'
const wecom = window.CONFIG.services.wecom const wecom = window.lwConfig.services.wecom
const service = wecom + '/chat' const service = wecom + '/chat'
const serviceMaterial = wecom + '/material' const serviceMaterial = wecom + '/material'
......
import request from '@/utils/request' import request from '@/utils/request'
import config from '@/config' const service = window.lwConfig.services.wecom
const service = config.services.wecom
/** /**
* 获取应用的jsapi_ticket * 获取应用的jsapi_ticket
* @param {*} url 页面url * @param {*} url 页面url
*/ */
export function getAgentTicket(url, agentId) { export function getAgentTicket (url) {
return request({ return request({
url: service + '/ticket/getAgentTicket', url: service + '/ticket/getAgentTicket',
params: { params: {
url, url,
agentId, appType: 1,
}, },
}) })
} }
export function getWxTicket (data) {
return request({
url: service + '/ticket/getWxTicket',
params: {
url: data,
},
})
}
// /**
// * 获取企业的jsapi_ticket
// * @param {*} url 页面url
// */
// export function getAppTicket(url) {
// return request({
// url: service + '/ticket/getAppTicket',
// params: {
// url,
// appType: 1,
// },
// })
// }
/** /**
* 获取企业的jsapi_ticket * 企业微信端登录 / 获取token接口
* @param {*} url 页面url * @param {*} auth_code
*/ */
export function getAppTicket(url) { export function login (auth_code) {
return request({ return request({
url: service + '/ticket/getAppTicket', url: '/auth/linkLogin',
method: 'get',
params: { params: {
url, auth_code,
}, },
}) })
} }
/** /**
* 获取登录用户id * 企微端获取登录用户信息
* @param {*} code 授权码 */
* @param {*} agentId 应用agentId export function getUserInfo () {
return request({
url: '/system/user/getInfo',
})
}
/**
* 获取微信授权链接
* @param {*} redirectUrl 回调跳转地址
* @returns
*/ */
export function getUserInfo(code, agentId) { export function getWxRedirect (redirectUrl = location.href) {
return request({ return request({
url: service + '/user/getUserInfo', url: '/auth/wxRedirect',
method: 'get',
params: { params: {
code, redirectUrl,
agentId,
}, },
}) })
} }
/** /**
* 获取授权用户openid * 微信获取token接口
* @param {*} code * @param {*} code 是 code码 必填
* @param {*} openId 否 微信用户ID 非必填
* @returns * @returns
*/ */
export function getUserOpenid(code) { export function wxLogin (code, openId) {
return request({ url: `/weixin/auth/getToken?code=${code}` }) return request({
url: '/auth/wxLogin',
method: 'get',
params: {
code,
openId,
},
})
} }
/** /**
* 获取微信授权用户信息 * 获取微信授权用户信息
* @param {*} openId * @param {*} openId
*/ */
export function getWechatUserInfo(openId) { export function getWechatUserInfo () {
return request({ return request({
url: `/weixin/auth/getUserInfo`, url: `/system/user/getWxInfo`,
params: { })
openId, }
lang: 'zh_CN',
}, /**
* 行政区划
* @param {*} param
{
id,integer,false,,区域ID,
parentId,integer,false,,父ID,
name,string,false,,区域名称,
ePrefix,string,false,,拼音首字母,
}
* @returns
*/
export function getAreaList (params) {
return request({
url: `/system/area/list`,
params,
}) })
} }
import request from '@/utils/request' import request from '@/utils/request'
const wecom = window.CONFIG.services.wecom const wecom = window.lwConfig.services.wecom
const service = wecom + '/community/h5' const service = wecom + '/community/h5'
/** /**
* 获取用户相关的所有任务 * 获取用户相关的所有任务
* @param {*} userId 用户ID * @param {*} userId 用户ID
* @param {*} taskType 0: 全部 1: 老客标签建群 2: 群SOP * @param {*} taskType 0: 全部 1: 老客标签建群 2: 群SOP
* @returns * @returns
*/ */
export function getTasks (userId, taskType) { export function getTasks(userId, taskType) {
return request({ return request({
url: service + '/' + userId, url: service + '/' + userId,
params: { params: {
type: taskType type: taskType,
} },
}) })
} }
/** /**
* 获取任务相关员工及完成情况 * 获取任务相关员工及完成情况
* @param {*} taskId 任务ID * @param {*} taskId 任务ID
* @param {*} taskType 1: 老客标签建群 2: 群SOP * @param {*} taskType 1: 老客标签建群 2: 群SOP
* @returns * @returns
*/ */
export function getState (taskId, taskType) { export function getState(taskId, taskType) {
return request({ return request({
url: service + '/scope/' + taskId, url: service + '/scope/' + taskId,
params: { params: {
type: taskType type: taskType,
} },
}) })
} }
/** /**
* 更新任务状态 * 更新任务状态
* @param {*} userId 用户ID * @param {*} userId 用户ID
...@@ -42,28 +39,27 @@ export function getState (taskId, taskType) { ...@@ -42,28 +39,27 @@ export function getState (taskId, taskType) {
* @param {*} taskType 0: 老客标签建群 1: 群SOP * @param {*} taskType 0: 老客标签建群 1: 群SOP
* @returns * @returns
*/ */
export function changeStatus (userId, taskId, taskType) { export function changeStatus(userId, taskId, taskType) {
return request({ return request({
url: service + '/changeStatus', url: service + '/changeStatus',
params: { params: {
emplId: userId, emplId: userId,
taskId: taskId, taskId: taskId,
type: taskType type: taskType,
} },
}) })
} }
/** /**
* 获取用户相关的所有关键词任务任务 * 获取用户相关的所有关键词任务任务
* @param {*} word 搜索的关键词或活码名称 * @param {*} word 搜索的关键词或活码名称
* @returns * @returns
*/ */
export function getKeywordTasks (word) { export function getKeywordTasks(word) {
return request({ return request({
url: service + '/filter', url: service + '/filter',
params: { params: {
word: word taskNameOrKeys: word,
} },
}) })
} }
import request from '@/utils/request'
const wecom = window.lwConfig.services.wecom
// 客户群、客群画像、标签
const service = wecom + '/groupchat'
/**
* 客户群列表
* @param {Object} params
* {
* beginTime string 否 开始时间
* chatId string 否 群聊Id
* endTime string 否 结束时间
* groupName string 否 群名
* id string 否 主键Id
* owner string 否 群主userId
* }
* @returns
*/
export function getList(params) {
return request({
url: service + '/page/list',
params,
})
}
/**
* 客户群详情
* @param {string} chatId
* @returns
* {
* addTime string date-time群创建时间
* adminUserId string 群管理员id
* allocateState integer int32分配状态:0-被接替成功;1-待接替;2-接替失败;3-正常状态
* chatId string 群聊id
* customerNum integer int32客户数量
* delFlag integer int32删除标识 0 正常 1 删除
* groupLeaderName string 管理员名称
* groupName string 群名
* id integer int64主键ID
* memberNum integer int32群成员数量
* notice string 群公告
* owner string 群主userId
* status integer int32跟进状态 0-正常;1-跟进人离职;2-离职继承中;3-离职继承完成
* tagId string 标签id
* tagIds string
* tags string 标签名,使用逗号隔开
* tenantId integer int32租户ID
* toDayMemberNum integer int32今日进群数
* toDayExitMemberNum integer 今日退群人数
* }
*/
export function getDetail(chatId) {
return request({
url: service + '/get/' + chatId,
})
}
/**
* 客户群成员列表
* @param {*} params
{
chatId string false "群id,移动应用必传参数",
delFlag string false 删除标识 0 正常 1 删除,
groupNickName string false 在群里的昵称,
id string false 主键ID,
invitorUserId string false 邀请人userId,
joinScene string false 加入方式,
joinTime string false 加群时间,
name string false 名字,
tenantId string false 租户ID,
type string false 成员类型:1 - 企业成员;2 - 外部联系人,
unionId string false 外部联系人在微信开放平台的唯一身份标识,
userId string false 群成员id,
pageNum string false "当前页,移动应用必传参数",
pageSize string false "当前每页显示条数,移动应用必传参数",
}
* @returns
{
code integer int32
msg string
rows [object]
[{ userId string 成员id
avatar string 头像
name string 名称
invitorUserId string 邀请人id
invitorUserName string 邀请人姓名
joinTime string 入群时间
joinScene integer 加入方式 1 - 由群成员邀请入群(直接邀请入群) 2 - 由群成员邀请入群(通过邀请链接入群) 3 - 通过扫描群二维码入群
type integer 成员类型:1 - 成员;2 - 客户 3:群主
customerType integer 1:微信客户;2:企业微信客户
}]
total integer int64
}
*/
export function getMemberList(params) {
return request({
url: service + '/member/page/list',
params,
})
}
/**
* 编辑群标签
* @param {*} data
* {
* chatId string 群聊ID
* tagIds array[string] 标签Id列表
* }
* @returns
*/
export function markTag(data) {
return request({
url: service + '/makeGroupTag',
method: 'post',
data,
})
}
// 同步客户群
export function sync() {
return request({
url: service + '/synch',
})
}
/**
* 获取轨迹信息
* @param {*}
{
pageNum:
pageSize:
chatId: chatId
}
* @returns
*/
export function findTrajectory({ pageNum, pageSize, chatId }) {
return request({
url: service + '/findGroupTrajectory/' + chatId,
params: { pageNum, pageSize },
})
}
/**
* 标签列表获取
* @param {Object} params
* {
"pageNum": "当前页",
"pageSize": "每页显示条数",
"groupName": "标签组名"
"groupTagType": "标签分组类型(1:客户标签;2:群标签)"
}
*/
export function getTagList(params) {
return request({
url: wecom + '/tag/list',
params,
})
}
export function getDataList(params) {
return request({
url: wecom + '/customer/findWeCustomerListByApp',
params,
})
}
export function getGroupList(params) {
return request({
url: wecom + '/groupchat/page/listByApp',
params,
})
}
import request from '@/utils/request' import request from '@/utils/request'
const wecom = window.CONFIG.services.wecom const wecom = window.lwConfig.services.wecom
const service = wecom + '/groupCode' const service = wecom + '/groupCode'
// 通过群活码UUID获取群活码详情及可用的实际群码 // 通过群活码UUID获取群活码详情及可用的实际群码
export function getDetail (uuid) { export function getDetail (uuid) {
return request({ return request({
url: service + '/getActualCode/' + uuid url: service + '/getActualCode/' + uuid,
})
}
// 门店活码获取 storeCodeType: 1:门店导购码 2:门店群活码
export function getCodeInStore (params) {
return request({
url: wecom + '/storeCode/findStoreCode',
params
})
}
// 门店活码基础数据 storeCodeType: 1:门店导购码 2:门店群活码
export function getCodeBase (params) {
return request({
url: wecom + '/storeCode/findWeStoreCodeConfig',
params
})
}
export function recordCode (data) {
return request({
url: wecom + '/storeCode/countUserBehavior',
method: 'post',
data
}) })
} }
\ No newline at end of file \ No newline at end of file
import request from "@/utils/request";
const wecom = window.lwConfig.services.wecom;
// const service = wecom + "/groupCode";
// 获取客户分析数据
export function getCustomerAnalysisData(params) {
return request({
url: wecom + "/operation/getCustomerAnalysisForApp",
params,
});
}
// 获取群分析数据
export function getGroupAnalysisData(params) {
return request({
url: wecom + "/operation/getGroupAnalysisByApp",
params,
});
}
// 获取企业轨迹
export function getCompanyDynamicsData(params) {
return request({
url: wecom + "/trajectory/findCompanyDynamics",
params,
});
}
import request from '@/utils/request' import request from '@/utils/request'
const wecom = window.CONFIG.services.wecom const wecom = window.lwConfig.services.wecom
const service = wecom + '/portrait' const service = wecom + '/portrait'
// 客户画像
// 根据客户id和当前企业员工id获取客户详细信息 // 根据客户id和当前企业员工id获取客户详细信息
export function getCustomerInfo(params) { export function getCustomerInfo(params) {
return request({ return request({
url: service + '/findWeCustomerInfo', url: service + '/findWeCustomerInfo',
params params,
}) })
} }
// 客户画像资料更新 // 客户画像资料更新
export function getWeCustomerInfo(data) { export function updateWeCustomerInfo(data) {
return request({ return request({
url: service + '/updateWeCustomerInfo', url: service + '/updateWeCustomerInfo',
method: 'post', method: 'post',
...@@ -24,8 +26,11 @@ export function getWeCustomerInfo(data) { ...@@ -24,8 +26,11 @@ export function getWeCustomerInfo(data) {
qq: data.qq, // qq qq: data.qq, // qq
position: data.position, // 职业 position: data.position, // 职业
remarkCorpName: data.remarkCorpName, // 公司 remarkCorpName: data.remarkCorpName, // 公司
description: data.description // 其他描述 provinceId: data.provinceId, // 省
} cityId: data.cityId, // 市
areaId: data.areaId, // 区
area: data.area, // 区
},
}) })
} }
// //
...@@ -39,7 +44,7 @@ userId 员工的id 当groupTagType为3的时候需要传该字段 ...@@ -39,7 +44,7 @@ userId 员工的id 当groupTagType为3的时候需要传该字段
export function getAllTags(params) { export function getAllTags(params) {
return request({ return request({
url: service + '/findAllTags', url: service + '/findAllTags',
params params,
}) })
} }
// //
...@@ -62,20 +67,20 @@ export function updateWeCustomerPorTraitTag(data) { ...@@ -62,20 +67,20 @@ export function updateWeCustomerPorTraitTag(data) {
return request({ return request({
url: service + '/updateWeCustomerPorTraitTag', url: service + '/updateWeCustomerPorTraitTag',
method: 'post', method: 'post',
data data,
}) })
} }
// 查看客户添加的员工 // 查看客户添加的员工
export function findAddaddEmployes(params) { export function findAddaddEmployes(params) {
return request({ return request({
url: service + '/findAddaddEmployes/' + params url: service + '/findAddaddEmployes/' + params,
}) })
} }
// 获取用户添加的群 // 获取用户添加的群
export function findAddGroupNum(params) { export function findAddGroupNum(params) {
return request({ return request({
url: service + '/findAddGroupNum', url: service + '/findAddGroupNum',
params params,
}) })
} }
// 获取轨迹信息 // 获取轨迹信息
...@@ -93,8 +98,8 @@ externalUserid: 客户id ...@@ -93,8 +98,8 @@ externalUserid: 客户id
*/ */
export function findTrajectory(params) { export function findTrajectory(params) {
return request({ return request({
url: service + '/findTrajectory', url: wecom + '/trajectory/findTrajectory',
params params,
}) })
} }
...@@ -114,21 +119,21 @@ export function addOrEditWaitHandle(data) { ...@@ -114,21 +119,21 @@ export function addOrEditWaitHandle(data) {
return request({ return request({
url: service + '/addOrEditWaitHandle', url: service + '/addOrEditWaitHandle',
method: 'post', method: 'post',
data data,
}) })
} }
// 删除轨迹 // 删除轨迹
export function removeTrajectory(params) { export function removeTrajectory(params) {
return request({ return request({
url: service + '/removeTrajectory/' + params, url: service + '/removeTrajectory/' + params,
method: 'delete' method: 'delete',
}) })
} }
// 完成待办 // 完成待办
export function handleWait(params) { export function handleWait(params) {
return request({ return request({
url: service + '/handleWait/' + params, url: service + '/handleWait/' + params,
method: 'delete' method: 'delete',
}) })
} }
...@@ -150,7 +155,7 @@ export function addOrUpdatePersonTags(data) { ...@@ -150,7 +155,7 @@ export function addOrUpdatePersonTags(data) {
return request({ return request({
url: service + '/addOrUpdatePersonTags', url: service + '/addOrUpdatePersonTags',
method: 'post', method: 'post',
data data,
}) })
} }
...@@ -162,7 +167,7 @@ export function addOrUpdatePersonTags(data) { ...@@ -162,7 +167,7 @@ export function addOrUpdatePersonTags(data) {
export function deletePersonTag(ids) { export function deletePersonTag(ids) {
return request({ return request({
url: service + '/deletePersonTag/' + ids, url: service + '/deletePersonTag/' + ids,
method: 'delete' method: 'delete',
}) })
} }
...@@ -174,6 +179,6 @@ export function deletePersonTag(ids) { ...@@ -174,6 +179,6 @@ export function deletePersonTag(ids) {
export function sync(userId) { export function sync(userId) {
return request({ return request({
url: service + '/synchMomentsInteracte/' + userId, url: service + '/synchMomentsInteracte/' + userId,
method: 'get' method: 'get',
}) })
} }
import request from '@/utils/request' import request from '@/utils/request'
const wecom = window.CONFIG.services.wecom const wecom = window.lwConfig.services.wecom
const service = wecom + '/RedEnvelopes' const service = wecom + '/RedEnvelopes'
/** /**
......
import request from '@/utils/request' import request from '@/utils/request'
const service = window.lwConfig.services.wecom + '/seas'
export function getTypeList (data) { export function getTypeList(data) {
return request({ return request({
url: "/wecom/seas/findEmployeeCustomer", url: service + '/findEmployeeCustomer',
params: data params: data,
}) })
} }
export function setState (data) { export function setState(data) {
return request({ return request({
url: "/wecom/seas/setState", url: service + '/setState',
method: "post", method: 'post',
data: data data: data,
}) })
} }
import request from '@/utils/request'
const wecom = window.lwConfig.services.wecom
const service = wecom + '/fission'
const serviceWeChat = window.lwConfig.services.weChat + '/fission'
/**
* 生成带二维码的海报
* @param {*} data
{
taskFissionId integer int64任务id
tenantId integer int32
租户ID userId string 员工ID
}
* @returns
*/
export function getPoster(data) {
return request({ url: serviceWeChat + '/poster', method: 'post', data })
}
/**
* 根据任务id获取任务进度
* @param {*} data
{
taskFissionId integer int64任务id
tenantId integer int32
租户ID userId string 员工ID
}
* @returns
*/
export function getProgress(data) {
return request({ url: serviceWeChat + '/progress', method: 'post', data })
}
export function setFissionComplete(fissionId, recordId, params) {
return request(service + `/complete/${fissionId}/records/${recordId}`, params, 'post')
}
/* Logo 字体 */
@font-face {
font-family: "iconfont logo";
src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834');
src: url('https://at.alicdn.com/t/font_985780_km7mi63cihi.eot?t=1545807318834#iefix') format('embedded-opentype'),
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.woff?t=1545807318834') format('woff'),
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.ttf?t=1545807318834') format('truetype'),
url('https://at.alicdn.com/t/font_985780_km7mi63cihi.svg?t=1545807318834#iconfont') format('svg');
}
.logo {
font-family: "iconfont logo";
font-size: 160px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
/* tabs */
.nav-tabs {
position: relative;
}
.nav-tabs .nav-more {
position: absolute;
right: 0;
bottom: 0;
height: 42px;
line-height: 42px;
color: #666;
}
#tabs {
border-bottom: 1px solid #eee;
}
#tabs li {
cursor: pointer;
width: 100px;
height: 40px;
line-height: 40px;
text-align: center;
font-size: 16px;
border-bottom: 2px solid transparent;
position: relative;
z-index: 1;
margin-bottom: -1px;
color: #666;
}
#tabs .active {
border-bottom-color: #f00;
color: #222;
}
.tab-container .content {
display: none;
}
/* 页面布局 */
.main {
padding: 30px 100px;
width: 960px;
margin: 0 auto;
}
.main .logo {
color: #333;
text-align: left;
margin-bottom: 30px;
line-height: 1;
height: 110px;
margin-top: -50px;
overflow: hidden;
*zoom: 1;
}
.main .logo a {
font-size: 160px;
color: #333;
}
.helps {
margin-top: 40px;
}
.helps pre {
padding: 20px;
margin: 10px 0;
border: solid 1px #e7e1cd;
background-color: #fffdef;
overflow: auto;
}
.icon_lists {
width: 100% !important;
overflow: hidden;
*zoom: 1;
}
.icon_lists li {
width: 100px;
margin-bottom: 10px;
margin-right: 20px;
text-align: center;
list-style: none !important;
cursor: default;
}
.icon_lists li .code-name {
line-height: 1.2;
}
.icon_lists .icon {
display: block;
height: 100px;
line-height: 100px;
font-size: 42px;
margin: 10px auto;
color: #333;
-webkit-transition: font-size 0.25s linear, width 0.25s linear;
-moz-transition: font-size 0.25s linear, width 0.25s linear;
transition: font-size 0.25s linear, width 0.25s linear;
}
.icon_lists .icon:hover {
font-size: 100px;
}
.icon_lists .svg-icon {
/* 通过设置 font-size 来改变图标大小 */
width: 1em;
/* 图标和文字相邻时,垂直对齐 */
vertical-align: -0.15em;
/* 通过设置 color 来改变 SVG 的颜色/fill */
fill: currentColor;
/* path 和 stroke 溢出 viewBox 部分在 IE 下会显示
normalize.css 中也包含这行 */
overflow: hidden;
}
.icon_lists li .name,
.icon_lists li .code-name {
color: #666;
}
/* markdown 样式 */
.markdown {
color: #666;
font-size: 14px;
line-height: 1.8;
}
.highlight {
line-height: 1.5;
}
.markdown img {
vertical-align: middle;
max-width: 100%;
}
.markdown h1 {
color: #404040;
font-weight: 500;
line-height: 40px;
margin-bottom: 24px;
}
.markdown h2,
.markdown h3,
.markdown h4,
.markdown h5,
.markdown h6 {
color: #404040;
margin: 1.6em 0 0.6em 0;
font-weight: 500;
clear: both;
}
.markdown h1 {
font-size: 28px;
}
.markdown h2 {
font-size: 22px;
}
.markdown h3 {
font-size: 16px;
}
.markdown h4 {
font-size: 14px;
}
.markdown h5 {
font-size: 12px;
}
.markdown h6 {
font-size: 12px;
}
.markdown hr {
height: 1px;
border: 0;
background: #e9e9e9;
margin: 16px 0;
clear: both;
}
.markdown p {
margin: 1em 0;
}
.markdown>p,
.markdown>blockquote,
.markdown>.highlight,
.markdown>ol,
.markdown>ul {
width: 80%;
}
.markdown ul>li {
list-style: circle;
}
.markdown>ul li,
.markdown blockquote ul>li {
margin-left: 20px;
padding-left: 4px;
}
.markdown>ul li p,
.markdown>ol li p {
margin: 0.6em 0;
}
.markdown ol>li {
list-style: decimal;
}
.markdown>ol li,
.markdown blockquote ol>li {
margin-left: 20px;
padding-left: 4px;
}
.markdown code {
margin: 0 3px;
padding: 0 5px;
background: #eee;
border-radius: 3px;
}
.markdown strong,
.markdown b {
font-weight: 600;
}
.markdown>table {
border-collapse: collapse;
border-spacing: 0px;
empty-cells: show;
border: 1px solid #e9e9e9;
width: 95%;
margin-bottom: 24px;
}
.markdown>table th {
white-space: nowrap;
color: #333;
font-weight: 600;
}
.markdown>table th,
.markdown>table td {
border: 1px solid #e9e9e9;
padding: 8px 16px;
text-align: left;
}
.markdown>table th {
background: #F7F7F7;
}
.markdown blockquote {
font-size: 90%;
color: #999;
border-left: 4px solid #e9e9e9;
padding-left: 0.8em;
margin: 1em 0;
}
.markdown blockquote p {
margin: 0;
}
.markdown .anchor {
opacity: 0;
transition: opacity 0.3s ease;
margin-left: 8px;
}
.markdown .waiting {
color: #ccc;
}
.markdown h1:hover .anchor,
.markdown h2:hover .anchor,
.markdown h3:hover .anchor,
.markdown h4:hover .anchor,
.markdown h5:hover .anchor,
.markdown h6:hover .anchor {
opacity: 1;
display: inline-block;
}
.markdown>br,
.markdown>p>br {
clear: both;
}
.hljs {
display: block;
background: white;
padding: 0.5em;
color: #333333;
overflow-x: auto;
}
.hljs-comment,
.hljs-meta {
color: #969896;
}
.hljs-string,
.hljs-variable,
.hljs-template-variable,
.hljs-strong,
.hljs-emphasis,
.hljs-quote {
color: #df5000;
}
.hljs-keyword,
.hljs-selector-tag,
.hljs-type {
color: #a71d5d;
}
.hljs-literal,
.hljs-symbol,
.hljs-bullet,
.hljs-attribute {
color: #0086b3;
}
.hljs-section,
.hljs-name {
color: #63a35c;
}
.hljs-tag {
color: #333333;
}
.hljs-title,
.hljs-attr,
.hljs-selector-id,
.hljs-selector-class,
.hljs-selector-attr,
.hljs-selector-pseudo {
color: #795da3;
}
.hljs-addition {
color: #55a532;
background-color: #eaffea;
}
.hljs-deletion {
color: #bd2c00;
background-color: #ffecec;
}
.hljs-link {
text-decoration: underline;
}
/* 代码高亮 */
/* PrismJS 1.15.0
https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javascript */
/**
* prism.js default theme for JavaScript, CSS and HTML
* Based on dabblet (http://dabblet.com)
* @author Lea Verou
*/
code[class*="language-"],
pre[class*="language-"] {
color: black;
background: none;
text-shadow: 0 1px white;
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
text-align: left;
white-space: pre;
word-spacing: normal;
word-break: normal;
word-wrap: normal;
line-height: 1.5;
-moz-tab-size: 4;
-o-tab-size: 4;
tab-size: 4;
-webkit-hyphens: none;
-moz-hyphens: none;
-ms-hyphens: none;
hyphens: none;
}
pre[class*="language-"]::-moz-selection,
pre[class*="language-"] ::-moz-selection,
code[class*="language-"]::-moz-selection,
code[class*="language-"] ::-moz-selection {
text-shadow: none;
background: #b3d4fc;
}
pre[class*="language-"]::selection,
pre[class*="language-"] ::selection,
code[class*="language-"]::selection,
code[class*="language-"] ::selection {
text-shadow: none;
background: #b3d4fc;
}
@media print {
code[class*="language-"],
pre[class*="language-"] {
text-shadow: none;
}
}
/* Code blocks */
pre[class*="language-"] {
padding: 1em;
margin: .5em 0;
overflow: auto;
}
:not(pre)>code[class*="language-"],
pre[class*="language-"] {
background: #f5f2f0;
}
/* Inline code */
:not(pre)>code[class*="language-"] {
padding: .1em;
border-radius: .3em;
white-space: normal;
}
.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
color: slategray;
}
.token.punctuation {
color: #999;
}
.namespace {
opacity: .7;
}
.token.property,
.token.tag,
.token.boolean,
.token.number,
.token.constant,
.token.symbol,
.token.deleted {
color: #905;
}
.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
color: #690;
}
.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string {
color: #9a6e3a;
background: hsla(0, 0%, 100%, .5);
}
.token.atrule,
.token.attr-value,
.token.keyword {
color: #07a;
}
.token.function,
.token.class-name {
color: #DD4A68;
}
.token.regex,
.token.important,
.token.variable {
color: #e90;
}
.token.important,
.token.bold {
font-weight: bold;
}
.token.italic {
font-style: italic;
}
.token.entity {
cursor: help;
}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>IconFont Demo</title>
<link rel="shortcut icon" href="//img.alicdn.com/imgextra/i2/O1CN01ZyAlrn1MwaMhqz36G_!!6000000001499-73-tps-64-64.ico" type="image/x-icon"/>
<link rel="icon" type="image/svg+xml" href="//img.alicdn.com/imgextra/i4/O1CN01EYTRnJ297D6vehehJ_!!6000000008020-55-tps-64-64.svg"/>
<link rel="stylesheet" href="https://g.alicdn.com/thx/cube/1.3.2/cube.min.css">
<link rel="stylesheet" href="demo.css">
<link rel="stylesheet" href="iconfont.css">
<script src="iconfont.js"></script>
<!-- jQuery -->
<script src="https://a1.alicdn.com/oss/uploads/2018/12/26/7bfddb60-08e8-11e9-9b04-53e73bb6408b.js"></script>
<!-- 代码高亮 -->
<script src="https://a1.alicdn.com/oss/uploads/2018/12/26/a3f714d0-08e6-11e9-8a15-ebf944d7534c.js"></script>
</head>
<body>
<div class="main">
<h1 class="logo"><a href="https://www.iconfont.cn/" title="iconfont 首页" target="_blank">&#xe86b;</a></h1>
<div class="nav-tabs">
<ul id="tabs" class="dib-box">
<li class="dib active"><span>Unicode</span></li>
<li class="dib"><span>Font class</span></li>
<li class="dib"><span>Symbol</span></li>
</ul>
<a href="https://www.iconfont.cn/manage/index?manage_type=myprojects&projectId=2510853" target="_blank" class="nav-more">查看项目</a>
</div>
<div class="tab-container">
<div class="content unicode" style="display: block;">
<ul class="icon_lists dib-box">
<li class="dib">
<span class="icon iconfont">&#xe600;</span>
<div class="name">性别</div>
<div class="code-name">&amp;#xe600;</div>
</li>
<li class="dib">
<span class="icon iconfont">&#xe601;</span>
<div class="name">性别</div>
<div class="code-name">&amp;#xe601;</div>
</li>
</ul>
<div class="article markdown">
<h2 id="unicode-">Unicode 引用</h2>
<hr>
<p>Unicode 是字体在网页端最原始的应用方式,特点是:</p>
<ul>
<li>兼容性最好,支持 IE6+,及所有现代浏览器。</li>
<li>支持按字体的方式去动态调整图标大小,颜色等等。</li>
<li>但是因为是字体,所以不支持多色。只能使用平台里单色的图标,就算项目里有多色图标也会自动去色。</li>
</ul>
<blockquote>
<p>注意:新版 iconfont 支持多色图标,这些多色图标在 Unicode 模式下将不能使用,如果有需求建议使用symbol 的引用方式</p>
</blockquote>
<p>Unicode 使用步骤如下:</p>
<h3 id="-font-face">第一步:拷贝项目下面生成的 <code>@font-face</code></h3>
<pre><code class="language-css"
>@font-face {
font-family: 'iconfont';
src: url('iconfont.eot');
src: url('iconfont.eot?#iefix') format('embedded-opentype'),
url('iconfont.woff2') format('woff2'),
url('iconfont.woff') format('woff'),
url('iconfont.ttf') format('truetype'),
url('iconfont.svg#iconfont') format('svg');
}
</code></pre>
<h3 id="-iconfont-">第二步:定义使用 iconfont 的样式</h3>
<pre><code class="language-css"
>.iconfont {
font-family: "iconfont" !important;
font-size: 16px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
</code></pre>
<h3 id="-">第三步:挑选相应图标并获取字体编码,应用于页面</h3>
<pre>
<code class="language-html"
>&lt;span class="iconfont"&gt;&amp;#x33;&lt;/span&gt;
</code></pre>
<blockquote>
<p>"iconfont" 是你项目下的 font-family。可以通过编辑项目查看,默认是 "iconfont"。</p>
</blockquote>
</div>
</div>
<div class="content font-class">
<ul class="icon_lists dib-box">
<li class="dib">
<span class="icon iconfont icon-man"></span>
<div class="name">
性别
</div>
<div class="code-name">.icon-man
</div>
</li>
<li class="dib">
<span class="icon iconfont icon-xingbie"></span>
<div class="name">
性别
</div>
<div class="code-name">.icon-xingbie
</div>
</li>
</ul>
<div class="article markdown">
<h2 id="font-class-">font-class 引用</h2>
<hr>
<p>font-class 是 Unicode 使用方式的一种变种,主要是解决 Unicode 书写不直观,语意不明确的问题。</p>
<p>与 Unicode 使用方式相比,具有如下特点:</p>
<ul>
<li>兼容性良好,支持 IE8+,及所有现代浏览器。</li>
<li>相比于 Unicode 语意明确,书写更直观。可以很容易分辨这个 icon 是什么。</li>
<li>因为使用 class 来定义图标,所以当要替换图标时,只需要修改 class 里面的 Unicode 引用。</li>
<li>不过因为本质上还是使用的字体,所以多色图标还是不支持的。</li>
</ul>
<p>使用步骤如下:</p>
<h3 id="-fontclass-">第一步:引入项目下面生成的 fontclass 代码:</h3>
<pre><code class="language-html">&lt;link rel="stylesheet" href="./iconfont.css"&gt;
</code></pre>
<h3 id="-">第二步:挑选相应图标并获取类名,应用于页面:</h3>
<pre><code class="language-html">&lt;span class="iconfont icon-xxx"&gt;&lt;/span&gt;
</code></pre>
<blockquote>
<p>"
iconfont" 是你项目下的 font-family。可以通过编辑项目查看,默认是 "iconfont"。</p>
</blockquote>
</div>
</div>
<div class="content symbol">
<ul class="icon_lists dib-box">
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-man"></use>
</svg>
<div class="name">性别</div>
<div class="code-name">#icon-man</div>
</li>
<li class="dib">
<svg class="icon svg-icon" aria-hidden="true">
<use xlink:href="#icon-xingbie"></use>
</svg>
<div class="name">性别</div>
<div class="code-name">#icon-xingbie</div>
</li>
</ul>
<div class="article markdown">
<h2 id="symbol-">Symbol 引用</h2>
<hr>
<p>这是一种全新的使用方式,应该说这才是未来的主流,也是平台目前推荐的用法。相关介绍可以参考这篇<a href="">文章</a>
这种用法其实是做了一个 SVG 的集合,与另外两种相比具有如下特点:</p>
<ul>
<li>支持多色图标了,不再受单色限制。</li>
<li>通过一些技巧,支持像字体那样,通过 <code>font-size</code>, <code>color</code> 来调整样式。</li>
<li>兼容性较差,支持 IE9+,及现代浏览器。</li>
<li>浏览器渲染 SVG 的性能一般,还不如 png。</li>
</ul>
<p>使用步骤如下:</p>
<h3 id="-symbol-">第一步:引入项目下面生成的 symbol 代码:</h3>
<pre><code class="language-html">&lt;script src="./iconfont.js"&gt;&lt;/script&gt;
</code></pre>
<h3 id="-css-">第二步:加入通用 CSS 代码(引入一次就行):</h3>
<pre><code class="language-html">&lt;style&gt;
.icon {
width: 1em;
height: 1em;
vertical-align: -0.15em;
fill: currentColor;
overflow: hidden;
}
&lt;/style&gt;
</code></pre>
<h3 id="-">第三步:挑选相应图标并获取类名,应用于页面:</h3>
<pre><code class="language-html">&lt;svg class="icon" aria-hidden="true"&gt;
&lt;use xlink:href="#icon-xxx"&gt;&lt;/use&gt;
&lt;/svg&gt;
</code></pre>
</div>
</div>
</div>
</div>
<script>
$(document).ready(function () {
$('.tab-container .content:first').show()
$('#tabs li').click(function (e) {
var tabContent = $('.tab-container .content')
var index = $(this).index()
if ($(this).hasClass('active')) {
return
} else {
$('#tabs li').removeClass('active')
$(this).addClass('active')
tabContent.hide().eq(index).fadeIn()
}
})
})
</script>
</body>
</html>
@font-face {font-family: "iconfont";
src: url('iconfont.eot?t=1619340295504'); /* IE9 */
src: url('iconfont.eot?t=1619340295504#iefix') format('embedded-opentype'), /* IE6-IE8 */
url('data:application/x-font-woff2;charset=utf-8;base64,d09GMgABAAAAAAOAAAsAAAAAB1wAAAMzAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHEIGVgCCfgqCTIJEATYCJAMMCwgABCAFhG0HNxuDBsgekiQBeyhJThMigiCE4uFr7H/n7u5XgQbJ3SpE89A90yhFvKo25v3fWhvcKm8Q9ROzlb97onODZxLRQncPCTLpqCQJDaa2SYOKV45GKObVdCmZ1Of65iVDaFNpS3UGXE6/tuA8oJzW2vZP0ZiACQa0N7aBAymQBL1FdhFXxCJPE6jXXbesGbM0FlSoQJMCcWCvyKDCjE1poIZaobpiZRFXValN59IJV4Lvx2fDopakKkMzl+yS8mj+HfQucs5UJjZ4BPl4HijryBgAKcSqSt8SOVFugBz1Vi5XD2hdg4J38V/hHU+22j88QiKqIXIj6MPnE+9QnVOT8xdIIINqFByA3OZNnX13T70b+7Ucf6jffcbHylvVbEqt2gfEit1J0oNeja57PHryOvNG3AvfBWfTG4gf0+RZRfdJH1Bi+/isev2Al5Jv2H6urOxlWz4zjGXScnaXQ4ef6ff5/MKbezpJX+Bndle/dRt3vpZOqHpDV21uWquB09iS/XaazV/s//t0SZPd1+iQSuxNPkeT2tvh5R/qbb3erJtt4+0GjYi6U50rc/MSyYKpYD9PKzDtMcLTaNqZ2BvpdEzryKDV9T6JZH5OrP0lT/8vT5E/5O6Df5tcqan7zixyYH0mwA4d/jMWz4zpS3NntkCo/Es/cz3kOWn3W37j+Z1jy1+h/kUaCnhzz4ODWOVfATfUnrg/+AlyYFOxlcieiymjMjeQje3pSfASNagChdp99jd0AZMJtbokSGp0Q1arB62wBqBKgxGoVmsy6vUnX9+gA5EjSh362eIQWp0hafYYWat3WmFlUKWrb1RrjYx6qwLfsUGv2FvvHAOGAo/ZdRziEnGBOGlxSDWBuBxlSFoZ8GxA0qEkHhg0JF+UQxzIGHPSK+IgpQIWSCKGZdx5EI0mcJIkwsDR3iClycm+wbuqXtTLJWKo2HQEYFCAh7HWYSGchDjB60wVFz5vAkTLohikoawlbgOItFD32IBe/QCaXBcHlV3LJWkrRIMoSoAJiIQYTMZ5QBTnErBk9bAwwKF6BXtkkib1Ce0EqK53fkPsAUqVKtCBOVLkKPLBrfGCzt64yIYAIQA=') format('woff2'),
url('iconfont.woff?t=1619340295504') format('woff'),
url('iconfont.ttf?t=1619340295504') format('truetype'), /* chrome, firefox, opera, Safari, Android, iOS 4.2+ */
url('iconfont.svg?t=1619340295504#iconfont') format('svg'); /* iOS 4.1- */
}
.iconfont {
font-family: "iconfont" !important;
font-size: 16px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.icon-man:before {
content: "\e600";
}
.icon-xingbie:before {
content: "\e601";
}
!function(e){var t,n,o,i,c,a,l='<svg><symbol id="icon-man" viewBox="0 0 1024 1024"><path d="M734.81728 575.0016a238.976 238.976 0 0 0-52.80768-79.54432 239.488 239.488 0 0 0-149.4272-69.53472l0.00512-236.58496 89.7024 89.7024a21.6576 21.6576 0 1 0 30.63296-30.63808L528.98304 124.4672a21.6576 21.6576 0 0 0-30.63296 0L374.41536 248.3968a21.66784 21.66784 0 0 0 30.63808 30.63808l84.18816-84.19328v231.26528a239.45728 239.45728 0 0 0-67.70688 16.5376 238.8992 238.8992 0 0 0-79.54432 52.80768 238.9504 238.9504 0 0 0-52.80768 79.54432c-11.68384 28.81024-17.60768 59.24352-17.60768 90.46016s5.92384 61.64992 17.60768 90.46016c12.09856 29.83936 29.87008 56.6016 52.80768 79.54432s49.71008 40.70912 79.54432 52.80768c28.80512 11.68384 59.24352 17.60256 90.46016 17.60256s61.65504-5.91872 90.45504-17.60256a238.93504 238.93504 0 0 0 79.54944-52.8128 238.976 238.976 0 0 0 52.80768-79.54432 239.55456 239.55456 0 0 0 17.60768-90.46016 239.54944 239.54944 0 0 0-17.59744-90.44992z m-83.45088 229.82144c-76.84608 76.84608-201.88672 76.84608-278.72768 0-76.8512-76.84608-76.84608-201.88672 0-278.72768 76.8512-76.84608 201.8816-76.84608 278.72768 0s76.84608 201.88672 0 278.72768z" fill="#40b1fc" ></path></symbol><symbol id="icon-xingbie" viewBox="0 0 1024 1024"><path d="M832.205 631.5a25.615 25.615 0 0 0-36.199 0l-64.153 64.154-68.557-68.556c87.86-106.138 82.125-264.192-17.203-363.52-51.149-51.098-119.04-79.258-191.283-79.258s-140.186 28.16-191.232 79.206-79.258 119.04-79.258 191.284 28.16 140.185 79.206 191.232c52.736 52.736 122.01 79.104 191.232 79.104 61.236 0 122.47-20.634 172.288-61.85l68.557 68.557-64.153 64.153a25.615 25.615 0 0 0 0 36.199c5.017 5.017 11.57 7.475 18.124 7.475s13.108-2.509 18.125-7.475l64.154-64.154 42.496 42.496c5.017 5.018 11.571 7.475 18.125 7.475s13.107-2.508 18.124-7.475a25.615 25.615 0 0 0 0-36.198l-42.496-42.496 64.154-64.154a25.667 25.667 0 0 0-0.051-36.198z m-532.48-21.657c-41.421-41.42-64.205-96.46-64.205-155.033 0-58.573 22.784-113.613 64.205-155.034 41.42-41.472 96.512-64.256 155.085-64.256 58.572 0 113.612 22.784 155.033 64.205 85.504 85.504 85.504 224.614 0 310.118-85.504 85.504-224.614 85.504-310.118 0z" fill="#1296DB" ></path></symbol></svg>',s=(s=document.getElementsByTagName("script"))[s.length-1].getAttribute("data-injectcss");if(s&&!e.__iconfont__svg__cssinject__){e.__iconfont__svg__cssinject__=!0;try{document.write("<style>.svgfont {display: inline-block;width: 1em;height: 1em;fill: currentColor;vertical-align: -0.1em;font-size:16px;}</style>")}catch(e){console&&console.log(e)}}function d(){c||(c=!0,o())}t=function(){var e,t,n,o;(o=document.createElement("div")).innerHTML=l,l=null,(n=o.getElementsByTagName("svg")[0])&&(n.setAttribute("aria-hidden","true"),n.style.position="absolute",n.style.width=0,n.style.height=0,n.style.overflow="hidden",e=n,(t=document.body).firstChild?(o=e,(n=t.firstChild).parentNode.insertBefore(o,n)):t.appendChild(e))},document.addEventListener?~["complete","loaded","interactive"].indexOf(document.readyState)?setTimeout(t,0):(n=function(){document.removeEventListener("DOMContentLoaded",n,!1),t()},document.addEventListener("DOMContentLoaded",n,!1)):document.attachEvent&&(o=t,i=e.document,c=!1,(a=function(){try{i.documentElement.doScroll("left")}catch(e){return void setTimeout(a,50)}d()})(),i.onreadystatechange=function(){"complete"==i.readyState&&(i.onreadystatechange=null,d())})}(window);
\ No newline at end of file \ No newline at end of file
{
"id": "2510853",
"name": "linkWechart",
"font_family": "iconfont",
"css_prefix_text": "icon-",
"description": "",
"glyphs": [
{
"icon_id": "13963323",
"name": "性别",
"font_class": "man",
"unicode": "e600",
"unicode_decimal": 58880
},
{
"icon_id": "16921771",
"name": "性别",
"font_class": "xingbie",
"unicode": "e601",
"unicode_decimal": 58881
}
]
}
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
<!--
2013-9-30: Created.
-->
<svg>
<metadata>
Created by iconfont
</metadata>
<defs>
<font id="iconfont" horiz-adv-x="1024" >
<font-face
font-family="iconfont"
font-weight="500"
font-stretch="normal"
units-per-em="1024"
ascent="896"
descent="-128"
/>
<missing-glyph />
<glyph glyph-name="man" unicode="&#58880;" d="M734.81728 320.99839999999995a238.976 238.976 0 0 1-52.80768 79.54432 239.488 239.488 0 0 1-149.4272 69.53472l0.00512 236.58496 89.7024-89.7024a21.6576 21.6576 0 1 1 30.63296 30.63808L528.98304 771.5328a21.6576 21.6576 0 0 1-30.63296 0L374.41536 647.6032a21.66784 21.66784 0 0 1 30.63808-30.63808l84.18816 84.19328v-231.26528a239.45728 239.45728 0 0 1-67.70688-16.5376 238.8992 238.8992 0 0 1-79.54432-52.80768 238.9504 238.9504 0 0 1-52.80768-79.54432c-11.68384-28.81024-17.60768-59.24352-17.60768-90.46016s5.92384-61.64992 17.60768-90.46016c12.09856-29.83936 29.87008-56.6016 52.80768-79.54432s49.71008-40.70912 79.54432-52.80768c28.80512-11.68384 59.24352-17.60256 90.46016-17.60256s61.65504 5.91872 90.45504 17.60256a238.93504 238.93504 0 0 1 79.54944 52.8128 238.976 238.976 0 0 1 52.80768 79.54432 239.55456 239.55456 0 0 1 17.60768 90.46016 239.54944 239.54944 0 0 1-17.59744 90.44992z m-83.45088-229.82144c-76.84608-76.84608-201.88672-76.84608-278.72768 0-76.8512 76.84608-76.84608 201.88672 0 278.72768 76.8512 76.84608 201.8816 76.84608 278.72768 0s76.84608-201.88672 0-278.72768z" horiz-adv-x="1024" />
<glyph glyph-name="xingbie" unicode="&#58881;" d="M832.205 264.5a25.615 25.615 0 0 1-36.199 0l-64.153-64.154-68.557 68.556c87.86 106.138 82.125 264.192-17.203 363.52-51.149 51.098-119.04 79.258-191.283 79.258s-140.186-28.16-191.232-79.206-79.258-119.04-79.258-191.284 28.16-140.185 79.206-191.232c52.736-52.736 122.01-79.104 191.232-79.104 61.236 0 122.47 20.634 172.288 61.85l68.557-68.557-64.153-64.153a25.615 25.615 0 0 1 0-36.199c5.017-5.017 11.57-7.475 18.124-7.475s13.108 2.509 18.125 7.475l64.154 64.154 42.496-42.496c5.017-5.018 11.571-7.475 18.125-7.475s13.107 2.508 18.124 7.475a25.615 25.615 0 0 1 0 36.198l-42.496 42.496 64.154 64.154a25.667 25.667 0 0 1-0.051 36.198z m-532.48 21.657c-41.421 41.42-64.205 96.46-64.205 155.033 0 58.573 22.784 113.613 64.205 155.034 41.42 41.472 96.512 64.256 155.085 64.256 58.572 0 113.612-22.784 155.033-64.205 85.504-85.504 85.504-224.614 0-310.118-85.504-85.504-224.614-85.504-310.118 0z" horiz-adv-x="1024" />
</font>
</defs></svg>
import Vue from 'vue'
import SvgIcon from '@/components/SvgIcon'// svg component
// register globally
Vue.component('svg-icon', SvgIcon)
const req = require.context('./svg', false, /\.svg$/)
const requireAll = requireContext => requireContext.keys().map(requireContext)
requireAll(req)
<svg width="128" height="128" xmlns="http://www.w3.org/2000/svg"><path d="M121.718 73.272v9.953c3.957-7.584 6.199-16.05 6.199-24.995C127.917 26.079 99.273 0 63.958 0 28.644 0 0 26.079 0 58.23c0 .403.028.806.028 1.21l22.97-25.953h13.34l-19.76 27.187h6.42V53.77l13.728-19.477v49.361H22.998V73.272H2.158c5.951 20.284 23.608 36.208 45.998 41.399-1.44 3.3-5.618 11.263-12.565 12.674-8.607 1.764 23.358.428 46.163-13.178 17.519-4.611 31.938-15.849 39.77-30.513h-13.506V73.272H85.02V59.464l22.998-25.977h13.008l-19.429 27.187h6.421v-7.433l13.727-19.402v39.433h-.027zm-78.24 2.822a10.516 10.516 0 0 1-.996-4.535V44.548c0-1.613.332-3.124.996-4.535a11.66 11.66 0 0 1 2.713-3.68c1.134-1.032 2.49-1.864 4.04-2.468 1.55-.605 3.21-.908 4.982-.908h11.292c1.77 0 3.431.303 4.981.908 1.522.604 2.85 1.41 3.986 2.418l-12.26 16.303v-2.898a1.96 1.96 0 0 0-.665-1.512c-.443-.403-.996-.604-1.66-.604-.665 0-1.218.201-1.661.604a1.96 1.96 0 0 0-.664 1.512v9.071L44.364 77.606a10.556 10.556 0 0 1-.886-1.512zm35.73-4.535c0 1.613-.332 3.124-.997 4.535a11.66 11.66 0 0 1-2.712 3.68c-1.134 1.032-2.49 1.864-4.04 2.469-1.55.604-3.21.907-4.982.907H55.185c-1.77 0-3.431-.303-4.981-.907-1.55-.605-2.906-1.437-4.041-2.47a12.49 12.49 0 0 1-1.384-1.512l13.727-18.217v6.375c0 .605.222 1.109.665 1.512.442.403.996.604 1.66.604.664 0 1.218-.201 1.66-.604a1.96 1.96 0 0 0 .665-1.512V53.87L75.97 36.838c.913.932 1.66 1.99 2.214 3.175.664 1.41.996 2.922.996 4.535v27.011h.028z"/></svg>
\ No newline at end of file \ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="44" height="44" viewBox="0 0 44 44"><defs><filter id="master_svg1_132_6477" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB" x="10.75" y="21.887451171875" width="30.060585021972656" height="18.92308521270752"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur in="BackgroundImage" stdDeviation="4.030292510986328"/><feComposite in2="SourceAlpha" operator="in" result="effect1_foregroundBlur"/><feBlend mode="normal" in="SourceGraphic" in2="effect1_foregroundBlur" result="shape"/></filter><linearGradient x1="0.5" y1="0" x2="0.5" y2="1" id="master_svg2_17_0043"><stop offset="0%" stop-color="#00D695" stop-opacity="1"/><stop offset="100%" stop-color="#00D695" stop-opacity="0.10000000149011612"/></linearGradient></defs><clipPath id="master_svg0_132_4495"><rect x="8" y="8" width="28" height="28" rx="0"/></clipPath><g style="mix-blend-mode:passthrough"><g><g style="mix-blend-mode:passthrough"><g><g style="mix-blend-mode:passthrough"><rect x="0" y="0" width="44" height="44" rx="8" fill="#ECF5FF" fill-opacity="1"/></g><g clip-path="url(#master_svg0_132_4495)"><g><path d="M16.750000435965,15.749532734375C16.749046544,18.511622734375,18.9879,20.751302734375003,21.75,20.751302734375003C24.5121,20.751302734375003,26.750999999999998,18.511622734375,26.75,15.749532734375C26.750999999999998,12.987432734375,24.5121,10.747802734375,21.75,10.747802734375C18.9879,10.747803061349,16.749046108,12.987432734375,16.750000435965,15.749532734375Z" fill="#0079DE" fill-opacity="1"/><path d="M23.1717,22.211467171875L22.384999999999998,22.998261171875C22.0343,23.348931171875,21.4657,23.348931171875,21.115000000000002,22.998261171875L20.32826,22.211467171875C20.12473,22.007941171875,19.83224,21.912472971875,19.55017,21.969777771875C14.81592,22.931581171875,11.184696,26.934181171875,10.7863323,31.849611171875C10.74627172,32.343951171875,11.15203,32.749951171875,11.647959,32.749951171875L31.852,32.749951171875C32.348,32.749951171875,32.753699999999995,32.343951171875,32.7137,31.849611171875C32.3153,26.934181171875,28.6841,22.931581171875,23.9498,21.969777871875C23.6678,21.912472971875,23.3753,22.007941171875,23.1717,22.211467171875M21.1155,30.543981171875L20.259050000000002,29.687571171875C20.018610000000002,29.447131171875,19.9346,29.091501171875,20.04205,28.768881171875L20.8979,26.199211171875C21.1706,25.380191171875,22.3291,25.380271171875002,22.6018,26.199321171875L23.457900000000002,28.771011171875C23.5654,29.093801171875,23.4812,29.449591171875,23.2405,29.690001171875L22.384999999999998,30.544401171875002C22.0342,30.894681171875,21.466,30.894501171875,21.1155,30.543981171875" fill="#0079DE" fill-opacity="1"/><g filter="url(#master_svg1_132_6477)" style="mix-blend-mode:passthrough"><path d="M23.1717,22.211467171875L22.384999999999998,22.998261171875C22.0343,23.348931171875,21.4657,23.348931171875,21.115000000000002,22.998261171875L20.32826,22.211467171875C20.12473,22.007941171875,19.83224,21.912472971875,19.55017,21.969777771875C14.81592,22.931581171875,11.184696,26.934181171875,10.7863323,31.849611171875C10.74627172,32.343951171875,11.15203,32.749951171875,11.647959,32.749951171875L31.852,32.749951171875C32.348,32.749951171875,32.753699999999995,32.343951171875,32.7137,31.849611171875C32.3153,26.934181171875,28.6841,22.931581171875,23.9498,21.969777871875C23.6678,21.912472971875,23.3753,22.007941171875,23.1717,22.211467171875M21.1155,30.543981171875L20.259050000000002,29.687571171875C20.018610000000002,29.447131171875,19.9346,29.091501171875,20.04205,28.768881171875L20.8979,26.199211171875C21.1706,25.380191171875,22.3291,25.380271171875002,22.6018,26.199321171875L23.457900000000002,28.771011171875C23.5654,29.093801171875,23.4812,29.449591171875,23.2405,29.690001171875L22.384999999999998,30.544401171875002C22.0342,30.894681171875,21.466,30.894501171875,21.1155,30.543981171875" fill="url(#master_svg2_17_0043)" fill-opacity="1"/></g></g></g></g></g></g></g></svg>
\ No newline at end of file \ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="18" height="18" viewBox="0 0 18 18"><clipPath id="master_svg0_56_2138"><rect x="1" y="1" width="16" height="16" rx="0"/></clipPath><g style="mix-blend-mode:passthrough"><g><g clip-path="url(#master_svg0_56_2138)"><g><path d="M8.99990296875,1.9879150390625C5.13236296875,1.9879150390625,1.98779296875,5.121425039062499,1.98779296875,8.9999750390625C1.98779296875,12.8676150390625,5.121302968749999,16.0121150390625,8.99990296875,16.0121150390625C12.86759296875,16.0121150390625,16.01199296875,12.8785150390625,16.01199296875,8.9999750390625C16.01199296875,5.132405039062499,12.87849296875,1.9879148864745,8.99990296875,1.9879150390625ZM8.99990296875,15.0104150390625C5.680532968750001,15.0104150390625,2.9895929687500002,12.3195150390625,2.9895929687500002,8.999995039062501C2.9895929687500002,5.6805650390625,5.680532968750001,2.9896550390625,8.99990296875,2.9896550390625C12.31939296875,2.9896550390625,15.01029296875,5.6805650390625,15.01029296875,8.999995039062501C15.01029296875,12.3195150390625,12.31939296875,15.0104150390625,8.99990296875,15.0104150390625ZM8.99990296875,11.0707950390625C8.60556296875,11.0707950390625,8.27679296875,11.4104550390625,8.27679296875,11.8157850390625C8.27679296875,12.2322150390625,8.60556296875,12.5608150390625,8.99990296875,12.5608150390625C9.40530296875,12.5608150390625,9.72301296875,12.2321150390625,9.72301296875,11.8157850390625C9.72301296875,11.3994750390625,9.394352968749999,11.0707950390625,8.99990296875,11.0707950390625ZM10.89540296875,6.3375950390625C10.72013296875,6.0637150390625,10.46809296875,5.8445350390624995,10.15038296875,5.6802250390625C9.832602968749999,5.5158750390625,9.46002296875,5.4392050390625,9.04371296875,5.4392050390625C8.59449296875,5.4392050390625,8.20015296875,5.5268250390625,7.86043296875,5.7240750390625C7.53170296875,5.9103250390625,7.26882296875,6.1513450390625,7.09345296875,6.4471850390625C6.91818296875,6.7429950390625,6.83059296875,7.0278450390625,6.83059296875,7.3127050390625C6.83059296875,7.4441650390625,6.88532296875,7.5756350390625,6.99491296875,7.6961750390625C7.10450296875,7.8167450390625,7.23599296875,7.8715450390625,7.40031296875,7.8715450390625C7.67422296875,7.8715450390625,7.86043296875,7.7071550390625,7.95907296875,7.3675050390625C8.06866296875,7.0388250390625,8.18920296875,6.7977950390625,8.34257296875,6.6334350390625C8.49597296875,6.4691150390625,8.72601296875,6.3814650390625,9.04371296875,6.3814650390625C9.317622968750001,6.3814650390625,9.536802968749999,6.4691150390625,9.71217296875,6.6334350390625C9.887442968750001,6.7977950390625,9.97502296875,6.9950350390625,9.97502296875,7.2360350390625C9.97502296875,7.3565450390625,9.94219296875,7.4661050390625,9.88743296875,7.5756350390625C9.832602968749999,7.6852250390625,9.76689296875,7.7729350390625,9.679202968750001,7.8605550390625C9.591522968749999,7.9482150390625,9.46002296875,8.0796750390625,9.273802968750001,8.2440250390625C9.06566296875,8.4302850390625,8.89029296875,8.5946650390625,8.769862968750001,8.7370850390625C8.649322968749999,8.8685450390625,8.550692968749999,9.032935039062501,8.47395296875,9.2191850390625C8.39732296875,9.4054150390625,8.36446296875,9.6245950390625,8.36446296875,9.8765150390625C8.36446296875,10.0737650390625,8.41932296875,10.2271650390625,8.51786296875,10.3257650390625C8.62745296875,10.4243750390625,8.747902968750001,10.4791650390625,8.90136296875,10.4791650390625C9.18622296875,10.4791650390625,9.36159296875,10.3147850390625,9.41624296875,10.0080450390625C9.449162968749999,9.8656350390625,9.48193296875,9.7560450390625,9.49297296875,9.7012450390625C9.50383296875,9.6464550390625,9.52593296875,9.5807050390625,9.55866296875,9.5259750390625C9.591522968749999,9.4601950390625,9.63542296875,9.3944450390625,9.690152968749999,9.3286650390625C9.755872968750001,9.2629850390625,9.832602968749999,9.1753350390625,9.93124296875,9.087645039062501C10.28188296875,8.7589450390625,10.52296296875,8.5288850390625,10.66527296875,8.3864750390625C10.79676296875,8.2549450390625,10.91730296875,8.0906250390625,11.01594296875,7.8934150390625C11.12544296875,7.7071550390625,11.16931296875,7.4770850390625,11.15836296875,7.2360550390625C11.15836296875,6.9183050390625,11.07077296875,6.6115350390625,10.89540296875,6.3375950390625Z" fill="#999999" fill-opacity="1"/></g></g></g></g></svg>
\ No newline at end of file \ No newline at end of file
<svg width="130" height="130" xmlns="http://www.w3.org/2000/svg"><path d="M63.444 64.996c20.633 0 37.359-14.308 37.359-31.953 0-17.649-16.726-31.952-37.359-31.952-20.631 0-37.36 14.303-37.358 31.952 0 17.645 16.727 31.953 37.359 31.953zM80.57 75.65H49.434c-26.652 0-48.26 18.477-48.26 41.27v2.664c0 9.316 21.608 9.325 48.26 9.325H80.57c26.649 0 48.256-.344 48.256-9.325v-2.663c0-22.794-21.605-41.271-48.256-41.271z" stroke="#979797"/></svg>
\ No newline at end of file \ No newline at end of file
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1569580729849" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1939" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M513.3 958.5c-142.2 0-397.9-222.1-401.6-440.5V268c1.7-39.6 31.7-72.3 71.1-77.3 49-4.6 97.1-16.5 142.7-35.3 47.8-14 91.9-38.3 129.4-71.1 30.3-24.4 72.9-26.3 105.3-4.6 39.9 30.7 83.8 55.9 130.5 74.6 48.6 14.7 98.2 25.9 148.4 33.7 38.5 7.6 67.1 40.3 69.5 79.5 3.3 84.9 2.5 169.9-2.6 254.7-33.7 281.6-253.7 436.4-392.7 436.3z m-0.1-813.7c-7.2-0.2-14.3 2-20 6.4-39.7 35.2-86.8 61.1-137.7 75.7-46.8 19.2-96.2 31-146.6 35.2-11 3.2-18.8 13-19.5 24.4v230.1c3.5 180.3 223.3 361 323.9 361s287.3-120.2 317.6-360.5c7.3-142.7 0-228.6 0-229.6-1.3-13.3-11-24.3-24-27.3-49.6-7.7-98.6-19-146.5-33.7-46.3-19.5-89.7-45.3-129-76.7-5.8-3.8-12.7-5.5-19.5-4.9l1.3-0.1z" fill="#C6CCDA" p-id="1940"></path><path d="M750.1 428L490.7 673.2c-11.7 11.1-29.5 12.9-43.1 4.2l-6.8-5.8-141.2-149.4c-9.3-9.3-12.7-22.9-9-35.5 3.8-12.6 14.1-22.1 27-24.8 12.9-2.7 26.1 1.9 34.6 11.9L469 597.5l233.7-221c14.6-12.8 36.8-11.6 49.9 2.7 13.2 14.2 11.5 35.3-2.5 48.8" fill="#C6CCDA" p-id="1941"></path></svg>
\ No newline at end of file \ No newline at end of file
<svg width="128" height="110" xmlns="http://www.w3.org/2000/svg"><path d="M86.635 33.334c1.467 0 2.917.113 4.358.283C87.078 14.392 67.58.111 45.321.111 20.44.111.055 17.987.055 40.687c0 13.104 6.781 23.863 18.115 32.209l-4.527 14.352 15.82-8.364c5.666 1.182 10.207 2.395 15.858 2.395 1.42 0 2.829-.073 4.227-.189-.886-3.19-1.398-6.53-1.398-9.996 0-20.845 16.98-37.76 38.485-37.76zm-24.34-12.936c3.407 0 5.665 2.363 5.665 5.954 0 3.576-2.258 5.97-5.666 5.97-3.392 0-6.795-2.395-6.795-5.97 0-3.591 3.403-5.954 6.795-5.954zM30.616 32.323c-3.393 0-6.818-2.395-6.818-5.971 0-3.591 3.425-5.954 6.818-5.954 3.392 0 5.65 2.363 5.65 5.954 0 3.576-2.258 5.97-5.65 5.97z"/><path d="M127.945 70.52c0-19.075-18.108-34.623-38.448-34.623-21.537 0-38.5 15.548-38.5 34.623 0 19.108 16.963 34.622 38.5 34.622 4.508 0 9.058-1.2 13.584-2.395l12.414 7.167-3.404-11.923c9.087-7.184 15.854-16.712 15.854-27.471zm-50.928-5.97c-2.254 0-4.53-2.362-4.53-4.773 0-2.378 2.276-4.771 4.53-4.771 3.422 0 5.665 2.393 5.665 4.771 0 2.41-2.243 4.773-5.665 4.773zm24.897 0c-2.24 0-4.498-2.362-4.498-4.773 0-2.378 2.258-4.771 4.498-4.771 3.392 0 5.665 2.393 5.665 4.771 0 2.41-2.273 4.773-5.665 4.773z"/></svg>
\ No newline at end of file \ No newline at end of file
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" fill="none" version="1.1" width="44" height="44" viewBox="0 0 44 44"><defs><filter id="master_svg1_132_6989" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB" x="23.768310546875" y="22.449951171875" width="11.432647824287415" height="11.432647824287415"><feFlood flood-opacity="0" result="BackgroundImageFix"/><feBlend mode="normal" in="SourceGraphic" in2="BackgroundImageFix" result="shape"/><feGaussianBlur in="BackgroundImage" stdDeviation="0.6110387444496155"/><feComposite in2="SourceAlpha" operator="in" result="effect1_foregroundBlur"/><feBlend mode="normal" in="SourceGraphic" in2="effect1_foregroundBlur" result="shape"/></filter><linearGradient x1="0.5" y1="0" x2="0.5" y2="1" id="master_svg2_17_0043"><stop offset="0%" stop-color="#00D695" stop-opacity="1"/><stop offset="100%" stop-color="#00D695" stop-opacity="0.10000000149011612"/></linearGradient><linearGradient x1="0.9054054021835327" y1="1.0000001192092896" x2="0.5027027130126953" y2="0.05913979187607765" id="master_svg3_17_0045"><stop offset="0%" stop-color="#FFFFFF" stop-opacity="1"/><stop offset="100%" stop-color="#FFFFFF" stop-opacity="0"/></linearGradient></defs><clipPath id="master_svg0_132_6780"><rect x="8" y="8" width="28" height="28" rx="0"/></clipPath><g style="mix-blend-mode:passthrough"><g><g style="mix-blend-mode:passthrough"><g><g style="mix-blend-mode:passthrough"><rect x="0" y="0" width="44" height="44" rx="8" fill="#ECF5FF" fill-opacity="1"/></g><g clip-path="url(#master_svg0_132_6780)"><g><path d="M30.2487,23.625373828125L30.2487,15.812523828125C30.2474,13.156013828125,28.0935,11.003173828125,25.436999999999998,11.003173828125C22.7804,11.003174144834,20.62655,13.156013828125,20.62525,15.812523828125L20.62525,28.185473828125C20.62581,29.324773828125,19.70239,30.248673828125,18.56309,30.248673828125C17.4238,30.248673828125,16.50038,29.324773828125,16.50094,28.185473828125L16.50094,20.371273828125C19.11473,19.447153828125,20.09062,16.258993828125,18.44193,14.030143828125C16.79325,11.801299828125,13.45907,11.801300828125001,11.810392,14.030143828125C10.161711,16.258993828125,11.137598,19.447153828125,13.75139,20.371273828125L13.75139,28.185473828125C13.75139,30.842873828125,15.905660000000001,32.997173828125,18.56309,32.997173828125C21.2205,32.997173828125,23.3748,30.842873828125,23.3748,28.185473828125L23.3748,15.812523828125C23.3748,14.673633828125,24.298099999999998,13.750373828125,25.436999999999998,13.750373828125C26.5759,13.750373828125,27.4991,14.673633828125,27.4991,15.812523828125L27.4991,23.628073828125C24.8853,24.552173828125,23.909399999999998,27.740373828125,25.5581,29.969273828125C27.2068,32.198073828125004,30.541,32.198073828125004,32.1897,29.969273828125C33.838300000000004,27.740373828125,32.8625,24.552173828125,30.2487,23.628073828125L30.2487,23.625373828125ZM15.126159999999999,15.125143828125001C15.88543,15.125143828125001,16.50094,15.740643828125,16.50094,16.499913828125C16.50094,17.259183828125,15.88543,17.874683828125,15.126159999999999,17.874683828125C14.3669,17.874683828125,13.75139,17.259183828125,13.75139,16.499913828125C13.75139,15.740643828125,14.3669,15.125143828125001,15.126159999999999,15.125143828125001ZM28.8739,28.872873828125C28.1146,28.872873828125,27.4991,28.257373828125,27.4991,27.498073828125C27.4991,26.738873828125,28.1146,26.123273828125,28.8739,26.123273828125C29.6332,26.123273828125,30.2487,26.738873828125,30.2487,27.498073828125C30.2487,28.257373828125,29.6332,28.872873828125,28.8739,28.872873828125Z" fill="#0079DE" fill-opacity="1"/><g style="mix-blend-mode:passthrough"><g><g style="mix-blend-mode:passthrough"><ellipse cx="28.873595714569092" cy="27.555236339569092" rx="5.105285167694092" ry="5.105285167694092" fill="#0079DE" fill-opacity="1"/></g><g filter="url(#master_svg1_132_6989)" style="mix-blend-mode:passthrough"><ellipse cx="28.873595714569092" cy="27.555236339569092" rx="5.105285167694092" ry="5.105285167694092" fill="url(#master_svg2_17_0043)" fill-opacity="1"/><ellipse cx="28.873595714569092" cy="27.555236339569092" rx="5.098478120286018" ry="5.098478120286018" stroke="url(#master_svg3_17_0045)" fill-opacity="0" stroke-width="0.013614094816148281" fill="none" stroke-dasharray=""/></g><path d="M27.772529140625,26.691083203125C27.552789140625,26.690993203125,27.335509140625,26.644803203125,27.134729140625,26.555503203125L26.168976140625,26.126723203125C25.879638140625,25.998133203125,25.749329940625,25.659341203125,25.877924040625,25.370010203125C26.006518140625,25.080678203125,26.345319140625,24.950372503125,26.634657140625,25.078964203125L27.600409140625,25.508816203125C27.714889140625,25.559754203125,27.846049140625,25.557394203125,27.958629140625,25.502368203125L28.899479140625,25.043859203125C29.393129140625,24.802946003125,29.967269140625,24.789212303125,30.471869140625,25.006247203125L31.571419140625,25.478547203125C31.862239140625,25.603529203125,31.996679140624998,25.940603203125,31.871699140625,26.231413203125C31.746709140625,26.522233203125,31.409629140625,26.656663203125,31.118809140625,26.531683203125L30.019799140625,26.058493203125C29.821629140625,25.973223203125,29.596129140625,25.978593203125,29.402239140625,26.073173203125002L28.461559140625,26.531863203125C28.247039140625,26.636633203125,28.011389140625,26.691083203125,27.772529140625,26.691083203125Z" fill="#FFFFFF" fill-opacity="1"/><path d="M27.77251328125,28.474748046875C27.55282328125,28.474678046875,27.335603281250002,28.428488046875,27.13489328125,28.339168046875L26.16913728125,27.909318046875C25.87984948125,27.780728046875,25.74958178125,27.441971046875,25.87817588125,27.152689046875C26.00677028125,26.863406046875,26.34553128125,26.733141046875,26.63481928125,26.861733046875L27.60057328125,27.291585046875C27.71507328125,27.342448046875,27.84619328125,27.340088046875,27.95878328125,27.285137046875L28.89964328125,26.826449046875C29.393323281249998,26.585702646875,29.96740328125,26.571970346875,30.47203328125,26.788837046875L31.57158328125,27.261137046875C31.862153281250002,27.386303046875,31.996363281249998,27.723208046875,31.87146328125,28.013888046875C31.74656328125,28.304568046875,31.40977328125,28.439088046875,31.11897328125,28.314448046875L30.01978328125,27.843048046875C29.82161328125,27.757788046875,29.59611328125,27.763148046875,29.40222328125,27.857738046875L28.46154328125,28.315528046875C28.24711328125,28.420298046875,28.01145328125,28.474748046875,27.77251328125,28.474748046875Z" fill="#FFFFFF" fill-opacity="1"/><path d="M27.772449140625,30.258509453125C27.552759140625,30.258439453125,27.335539140625,30.212249453125,27.134819140624998,30.122929453125L26.168893140625,29.693969453125C25.879605340625,29.565379453125,25.749337640625,29.226628453125,25.877931740625,28.937345453125C26.006526140625,28.648063453125,26.345287140625,28.517797953125,26.634575140625,28.646389453125L27.600329140625,29.075166453125C27.714799140625,29.126085453125,27.845929140625,29.123791453125,27.958539140625,29.068898453125L28.899399140625,28.610210453125C29.393059140625,28.369370253125,29.967179140625,28.355637953125,30.471789140625,28.572598453125L31.571339140625,29.044898453125C31.861899140625,29.170063453125,31.996119140624998,29.506969453125,31.871219140625,29.797649453125C31.746319140625,30.088319453125,31.409529140625,30.222849453125,31.118729140625,30.098209453125L30.019719140625,29.625909453125C29.821549140625,29.540649453125,29.596049140625,29.546019453124998,29.402159140625,29.640599453125L28.461479140625,30.099829453125C28.246859140625,30.204439453125,28.011209140625,30.258709453125,27.772449140625,30.258509453125Z" fill="#FFFFFF" fill-opacity="1"/></g></g></g></g></g></g></g></g></svg>
\ No newline at end of file \ No newline at end of file
# replace default config
# multipass: true
# full: true
plugins:
# - name
#
# or:
# - name: false
# - name: true
#
# or:
# - name:
# param1: 1
# param2: 2
- removeAttrs:
attrs:
- 'fill'
- 'fill-rule'
<template>
<van-overlay :show="isLoad" @click="show = false" z-index="999">
<div class="popup">
<div class="pop-box">
<div class="pop-box-bg"></div>
<div class="pop-box-content">
<!-- <img src="@/assets/lodash.png" alt="" /> -->
<svg-icon class="lodash-icon" name="lodash"></svg-icon>
<span>数据查询中,请稍后...</span>
</div>
</div>
</div>
</van-overlay>
</template>
<script>
export default {
props: {
isLoad: {
type: Boolean,
default: false,
},
},
};
</script>
<style lang="less" scoped>
.popup {
display: flex;
justify-content: center;
align-items: center;
width: 100%;
height: 100%;
.pop-box {
width: 310px;
height: 110px;
background: #ffffff;
border-radius: 12px 12px 12px 12px;
position: relative;
.pop-box-bg {
width: 100%;
height: 100%;
background: #0079de;
opacity: 0.1;
}
.pop-box-content {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
display: flex;
flex-direction: column;
align-items: center;
.lodash-icon {
width: 22px;
height: 22px;
margin-bottom: 20px;
}
@keyframes turnZ {
0% {
transform: rotateZ(0deg);
}
100% {
transform: rotateZ(360deg);
}
}
.lodash-icon {
animation-name: turnZ;
animation-duration: 1.5s;
animation-timing-function: linear;
animation-iteration-count: infinite;
}
span {
font-size: 13px;
font-family: "PingFang SC-中等", "PingFang SC";
font-weight: normal;
color: #999999;
line-height: 12px;
}
}
}
}
</style>
<template>
<div class="no-data">
<div class="no-data-content">
<!-- <img src="@/assets/no-data.png" alt="" /> -->
<svg-icon class="no-data-icon" name="no-data"></svg-icon>
<span>对不起,暂无数据。</span>
</div>
</div>
</template>
<script>
export default {};
</script>
<style lang="less" scoped>
.no-data {
width: 100%;
height: 180px;
display: flex;
justify-content: center;
align-items: center;
.no-data-content {
width: 120px;
display: flex;
flex-direction: column;
align-items: center;
// img {
// width: 100px;
// height: 100px;
// }
.no-data-icon {
width: 100px;
height: 100px;
}
span {
font-size: 12px;
font-family: "PingFang SC-中等", "PingFang SC";
font-weight: normal;
color: #cccccc;
line-height: 12px;
}
}
}
</style>
<template>
<div class="content">
<div class="header">
<div class="button" :class="{'active': current === 'begin'}" @click="setUp('begin')" style="margin-right: 10px;">
<div class="name">开始时间</div>
<div class="date">{{setDate(beginTime) || '--'}}</div>
</div>
<div class="button" :class="{'active': current === 'end'}" @click="setUp('end')">
<div class="name">结束时间</div>
<div class="date">{{setDate(endTime) || '--'}}</div>
</div>
</div>
<div class="body">
<van-datetime-picker key="1" v-if="current === 'begin'" type="date" v-model="beginTime" visible-item-count="5" :max-date="today" :show-toolbar="false" />
<van-datetime-picker key="2" v-if="current === 'end'" type="date" v-model="endTime" visible-item-count="5" :max-date="today" :show-toolbar="false" />
</div>
<div class="buttom">
<div class="cancel_button" @click="resetFn">
重置
</div>
<div class="submit_button" @click="submitFn">
确定
</div>
</div>
</div>
</template>
<script>
import {dateFormat} from '@/utils/index'
export default {
name: 'select-date',
data () {
return {
current: '',
today: new Date(),
beginTime: '',
endTime: ''
}
},
props: {
start: {
type: String,
default: ''
},
end: {
type: String,
default: ''
}
},
watch: {
start: {
handler (val) {
if (val) {
this.beginTime = new Date(val)
}
},
immediate: true
},
end: {
handler (val) {
if (val) {
this.endTime = new Date(val)
}
},
immediate: true
},
},
methods: {
setUp (type) {
if (this.current === type) {
this.current = ''
} else {
this.current = type
if (type === 'begin' && !this.beginTime) {
this.beginTime = new Date()
}
if (type === 'end' && !this.endTime) {
this.endTime = new Date()
}
}
},
setDate (date) {
if (date) return dateFormat(date, 'yyyy-MM-dd')
},
formatFn (type, val) {
return val;
},
resetFn() {
this.beginTime = ''
this.endTime = ''
this.current = ''
},
submitFn () {
if (this.beginTime && this.endTime) {
if (this.compare(this.beginTime, this.endTime)) {
this.$emit('success', dateFormat(this.beginTime, 'yyyy-MM-dd'), dateFormat(this.endTime, 'yyyy-MM-dd'))
} else {
this.$toast('开始时间不得大于结束时间!')
}
} else if (!this.beginTime && !this.endTime) {
this.$emit('success', '','')
} else {
this.$toast('请选择完整开始结束时间!')
}
},
compare (date1, date2) {
let dates1 = new Date(date1)
let dates2 = new Date(date2)
if (dates1 > dates2) {
return false
} else {
return true
}
}
},
created() {
},
}
</script>
<style lang="less" scoped>
.content {
padding: 20px;
}
.header {
display:flex;
.button {
flex: 1;
border-radius: 8px;
border: 1px solid #F2F2F2;
text-align: center;
color: #999999;
font-weight: 500;
height:40px;
padding: 6px 0;
.name {
margin-bottom: 2px;
font-size: 10px;
}
.date {
font-size: 12px;
}
}
.active {
border: 1px solid rgba(0,121,222,0.5);
color: #0079DE;
}
}
.buttom {
padding-top: 20px;
display: flex;
font-size: 16px;
font-weight: 600px;
.cancel_button {
flex:1;
background: #F8F8F8;
border-radius: 8px;
color: #666666;
text-align: center;
height: 40px;
line-height: 40px;
margin-right: 9px;
}
.submit_button {
flex:1;
background: #0079DE;
border-radius: 8px;
color: #fff;
text-align: center;
height: 40px;
line-height: 40px;
}
}
</style>
\ No newline at end of file \ No newline at end of file
<template>
<div v-loading="loading">
<div class="label-group">
<div v-for="item in list" :key="item.groupId" class="label-group-item">
<div class="label-group-item-title">{{ item.groupName }}</div>
<div v-if="item.weTags" class="label-group-item-body">
<span class="label-group-item-body-tag" :style="setTagSelect(tag) ? selectedStyle:''" v-for="tag in item.weTags" :key="tag.tagId" @click="onSelectTag(tag)">{{ tag.name }}</span>
</div>
</div>
</div>
<div class="buttom">
<div class="cancel_button" @click="resetFn">
重置
</div>
<div class="submit_button" @click="submitFn">
确定
</div>
</div>
</div>
</template>
<script>
import { getTagList } from '@/api/group'
export default {
name: 'tag-select',
data () {
return {
loading:false,
list: [],
listOneArray: [],
selectedList: [],
selectedStyle: {
background: '#ECF5FF',
color: '#0079DE'
}
}
},
props: {
type: {
type: String,
default: '1'
},
selected: {
type: Array,
default: () => []
},
},
watch: {
selected: {
handler (val = []) {
this.selectedList = [...val]
},
immediate: true
},
},
computed: {
checkedTagMap () {
return new Set(this.selectedList.map((i) => i.tagId || (typeof i == 'string' && i)))
}
},
methods: {
onSelectTag (tag) {
const existIdx = this.selectedList.findIndex((i) => i.tagId === tag.tagId)
if (existIdx > -1) {
this.selectedList.splice(existIdx, 1)
} else {
this.selectedList.push(tag)
}
},
getTagFn () {
this.loading = true
getTagList({ groupTagType: this.type }).then(({ rows }) => {
this.list = rows
// this.list = [{"tenantId":26,"searchValue":null,"createBy":"姜鹏凯","createById":"259","createTime":"2022-06-27 15:02:43","updateBy":"姜鹏凯","updateById":"259","updateTime":"2022-06-27 15:02:43","remark":null,"params":{},"id":"1541316073415118848","groupId":"1541316073415118848","groupName":"测试","gourpName":null,"groupTagType":2,"owner":"admin","weTags":[{"tenantId":null,"searchValue":null,"createBy":null,"createById":null,"createTime":null,"updateBy":null,"updateById":null,"updateTime":null,"remark":null,"params":{},"id":"1541316073419313152","tagId":"1541316073419313152","groupId":"1541316073415118848","name":"11223","tagType":null,"owner":null,"delFlag":null},{"tenantId":null,"searchValue":null,"createBy":null,"createById":null,"createTime":null,"updateBy":null,"updateById":null,"updateTime":null,"remark":null,"params":{},"id":"1541316113281978368","tagId":"1541316113281978368","groupId":"1541316073415118848","name":"11222","tagType":null,"owner":null,"delFlag":null},{"tenantId":null,"searchValue":null,"createBy":null,"createById":null,"createTime":null,"updateBy":null,"updateById":null,"updateTime":null,"remark":null,"params":{},"id":"1541316113281978369","tagId":"1541316113281978369","groupId":"1541316073415118848","name":"222222","tagType":null,"owner":null,"delFlag":null}],"delFlag":0},{"tenantId":26,"searchValue":null,"createBy":"盛锡勇","createById":"248","createTime":"2022-06-27 14:10:16","updateBy":"盛锡勇","updateById":"248","updateTime":"2022-06-27 14:10:16","remark":null,"params":{},"id":"1541302874477301760","groupId":"1541302874477301760","groupName":"客群标签001分组","gourpName":null,"groupTagType":2,"owner":"admin","weTags":[{"tenantId":null,"searchValue":null,"createBy":null,"createById":null,"createTime":null,"updateBy":null,"updateById":null,"updateTime":null,"remark":null,"params":{},"id":"1541302874477301761","tagId":"1541302874477301761","groupId":"1541302874477301760","name":"客群标签001","tagType":null,"owner":null,"delFlag":null},{"tenantId":null,"searchValue":null,"createBy":null,"createById":null,"createTime":null,"updateBy":null,"updateById":null,"updateTime":null,"remark":null,"params":{},"id":"1541302874481496064","tagId":"1541302874481496064","groupId":"1541302874477301760","name":"客群标签002","tagType":null,"owner":null,"delFlag":null}],"delFlag":0}],
this.listOneArray = []
this.list.forEach((element) => {
element.weTags.forEach((d) => {
this.listOneArray.push({ tagId: d.tagId, name: d.name })
})
})
this.loading = false
})
},
setTagSelect (data) {
return this.checkedTagMap.has(data.tagId) || this.checkedTagMap.has(data.name)
},
resetFn () {
this.selectedList = []
},
submitFn () {
this.$emit('submit', this.selectedList)
}
},
mounted() {
},
created() {
this.getTagFn()
},
}
</script>
<style lang="less" scoped>
.label-group {
max-height: 270px;
min-height: 270px;
overflow-x: hidden;
overflow-y: scroll;
padding: 20px;
&-item {
// margin: 10px;
// border-bottom: 1px solid #f1f1f1;
&-title {
font-size: 16px;
color: #3D3D3D;
margin-bottom: 10px;
margin-top: 10px;
font-weight: 600;
font-family: 'PingFang SC-粗体, PingFang SC';
}
&-body {
padding: 10px 0;
display: flex;
&-tag {
font-size: 12px;
margin-right: 13px;
margin-bottom: 11px;
background: #FAFAFA;
border-radius: 8px;
padding: 0 10px;
height: 34px;
line-height: 34px;
}
}
}
}
.buttom {
padding: 20px;
display: flex;
font-size: 16px;
font-weight: 600px;
.cancel_button {
flex:1;
background: #F8F8F8;
border-radius: 8px;
color: #666666;
text-align: center;
height: 40px;
line-height: 40px;
margin-right: 9px;
}
.submit_button {
flex:1;
background: #0079DE;
border-radius: 8px;
color: #fff;
text-align: center;
height: 40px;
line-height: 40px;
}
}
</style>
\ No newline at end of file \ No newline at end of file
<template>
<div style="display: flex;align-items:center;">
<span class="tag_name" :class="{color1: resource === 1, color2:resource === 2 }">{{resource === 1 ? '@微信':'@企业'}}</span>
<img class="tag_sex" v-if="sex === 1" width="16" height="16" src="../assets/man.png" />
<img class="tag_sex" v-else-if='sex === 2' width="16" height="16" src="../assets/woman.png" />
</div>
</template>
<script>
export default {
name: 'show-resource',
data () {
return {}
},
props: {
resource: {
type: Number,
default: 1 // 1: 微信, 2: 企业
},
sex: {
type: Number,
default: 1 // 1: 男,2:女
}
},
methods: {
},
created () {
},
}
</script>
<style lang="less" scoped>
.tag_name {
font-size: 12px;
}
.color1 {
color: #00d695;
}
.color2 {
color: #0079de;
}
.tag_sex {
margin-left: 3px;
}
</style>
\ No newline at end of file \ No newline at end of file
<template> <template>
<div> <div>
<van-pull-refresh v-model="refreshing" success-text="刷新成功" @refresh="getList(1)">
<van-list <van-list
v-model="loading" v-model="loading"
:finished="finished" :finished="finished"
finished-text="没有更多了" :finished-text="finishedText"
loading-text="上划加载更多" :error.sync="error"
error-text="请求失败,点击重新加载"
@load="getList()"
> >
<van-cell v-for="(item, index) in wList" :key="index"> <van-cell v-for="(item, index) in list" :key="index">
<!-- 时间 --> <!-- 时间 -->
<p class="f12" style="position:relative; "> <p class="f12" style="position:relative; ">
{{ dateFormat(item[0].createTime, 'yyyy-MM-dd w') }} {{ dateFormat(item[0].createTime, 'yyyy-MM-dd w') }}
...@@ -15,12 +18,11 @@ ...@@ -15,12 +18,11 @@
<!-- <van-cell> --> <!-- <van-cell> -->
<van-steps <van-steps
direction="vertical" direction="vertical"
inactive-color="#2c8cf0" :inactive-color="color"
:active="active" :active-color="color"
v-for="(item1, index) in item" :active="item.length"
:key="index"
> >
<van-step class="msg"> <van-step class="msg" v-for="(item1, index) in item" :key="index">
<span class="f12 po"> {{ dateFormat(item1.createTime, 'hh:mm') }}</span> <span class="f12 po"> {{ dateFormat(item1.createTime, 'hh:mm') }}</span>
<span class="fs14">{{ item1.title }}</span> <span class="fs14">{{ item1.title }}</span>
<!-- <span class="finish-box"> <!-- <span class="finish-box">
...@@ -44,90 +46,104 @@ ...@@ -44,90 +46,104 @@
</van-step> --> </van-step> -->
</van-steps> </van-steps>
</van-cell> </van-cell>
<!-- <van-divider /> -->
</van-list> </van-list>
</van-pull-refresh>
</div> </div>
</template> </template>
<script> <script>
import { removeTrajectory, handleWait } from '@/api/portrait' import { color } from '@/styles/varibles.less'
// import { removeTrajectory, handleWait } from '@/api/portrait'
import { dateFormat } from '@/utils' import { dateFormat } from '@/utils'
export default { export default {
props: ['stepList'], props: {
inject: ['reload'], load: Function,
},
data() { data() {
return { return {
// 步骤条 query: {
active: -1, pageNum: 1,
// 轨迹外层按时间 pageSize: 10,
wlist: [], },
content: '', content: '',
type: 0, type: 0,
wList: [], // 轨迹外层按时间
finished: false, list: [],
loading: false, loading: false,
dateFormat finished: false,
refreshing: false,
dateFormat,
color,
} }
}, },
watch: { watch: {},
stepList(newVal, oldVal) { methods: {
// console.log(newVal, oldVal); getList(page) {
this.wList = [] this.loading = true
let dayList = [] this.finished = false
page && (this.query.pageNum = page)
if (this.query.pageNum == 1) {
this.list = []
}
if (this.refreshing) {
this.list = []
this.refreshing = false
}
newVal.forEach((ele) => { this.load(this.query)
let date = this.dateFormat(ele.createTime, 'yyyyMMdd') .then(({ rows, total }) => {
rows = rows || []
let dayList = []
rows.forEach((ele) => {
let date = dateFormat(ele.createTime, 'yyyyMMdd')
dayList.includes(date) || dayList.push(date) dayList.includes(date) || dayList.push(date)
}) })
dayList.sort((a, b) => b - a) dayList.sort((a, b) => b - a)
for (let i = 0; i < dayList.length; i++) { for (let i = 0; i < dayList.length; i++) {
let timeList = [] let timeList = []
for (let j = 0; j < newVal.length; j++) { for (let j = 0; j < rows.length; j++) {
// console.log(newVal[j].createTime); // console.log(rows[j].createTime);
if (dayList[i] == this.dateFormat(newVal[j].createTime, 'yyyyMMdd')) { if (dayList[i] == dateFormat(rows[j].createTime, 'yyyyMMdd')) {
timeList.push(newVal[j]) timeList.push(rows[j])
} }
} }
this.wList.push(timeList) this.list.push(timeList)
} }
this.loading = false this.loading = false
this.finished = true this.refreshing = false
// console.log(this.wlist); // 判断加载状态
// this.onLoad() if (!total || total == 0) {
this.finishedText = '暂无数据'
this.finished = true
} else if (rows.length < this.query.pageSize) {
this.finishedText = '没有更多了'
this.finished = true
} else {
this.query.pageNum++
} }
},
methods: { // 数据全部加载完成
onLoad() { // if (this.list.length >= +total) {
// // 异步更新数据 // if (this.list.length == 0) {
// // setTimeout 仅做示例,真实场景中一般为 ajax 请求 // this.query.pageNum = 1
// setTimeout(() => { // this.finishedText = '暂无数据'
// // debugger // } else {
// let total = this.wlist.length > 10 ? 10 : this.wlist.length // this.finishedText = '没有更多了'
// for (let i = 0; i < total; i++) {
// this.wList.push(this.wlist[i])
// } // }
// console.log(this.wList)
// // 加载状态结束
// this.loading = false
// // 数据全部加载完成
// if (this.wList.length >= this.wlist.length) {
// this.finished = true // this.finished = true
// } else {
// this.query.pageNum++
// } // }
// }, 1000) })
} .catch((error) => {
// 根据数字判断类型 this.loading = false
// chargeType(num) { this.finished = true
// if (num == 1) { this.error = true
// return (this.type = '客户动态') alert(error)
// } else if (num == 2) { })
// return (this.type = '员工动态') },
// } else if (num == 3) {
// return (this.type = '互动动态')
// } else if (num == 4) {
// return (this.type = '跟进动态')
// }
// },
// 删除轨迹 // 删除轨迹
// delDynamic(id) { // delDynamic(id) {
...@@ -158,7 +174,7 @@ export default { ...@@ -158,7 +174,7 @@ export default {
// console.log(err) // console.log(err)
// }) // })
// } // }
} },
} }
</script> </script>
...@@ -180,29 +196,24 @@ export default { ...@@ -180,29 +196,24 @@ export default {
color: #333; color: #333;
font-size: 14px; font-size: 14px;
position: relative; position: relative;
left: 20px; margin-left: 20px;
} }
// .deldynamic {
// float: right;
// color: #9c9c9c;
// font-size: 12px;
// font-weight: 600;
// }
.con { .con {
left: 51px; margin-left: 51px;
margin-top: 20px; margin-top: 20px;
color: #666;
} }
// .finish-box { /deep/.van-step__circle {
// float: right; width: 8px;
// position: relative; height: 8px;
// width: 80px; margin-left: 110px;
// } }
.finish { /deep/.van-step__line {
position: absolute; margin-left: 54px;
color: #2c8cf0; width: 2px;
font-size: 12px; transform: scaleX(0.5);
font-weight: 600; }
// right: 30px; .van-step--vertical:not(:last-child)::after {
// top: 0px; border-width: 1px;
} }
</style> </style>
<template>
<svg class="svg-icon" aria-hidden="true" v-on="$listeners">
<use :xlink:href="iconName" />
</svg>
</template>
<script>
export default {
name: 'SvgIcon',
props: {
name: {
type: String,
required: true,
},
},
computed: {
iconName() {
return `#icon-${this.name}`
},
styleExternalIcon() {
return {
mask: `url(${this.name}) no-repeat 50% 50%`,
'-webkit-mask': `url(${this.name}) no-repeat 50% 50%`,
}
},
},
}
</script>
<style scoped>
.svg-icon {
width: 1em;
height: 1em;
vertical-align: -0.15em;
fill: currentColor;
overflow: hidden;
}
.svg-external-icon {
background-color: currentColor;
mask-size: cover !important;
display: inline-block;
}
</style>
<template>
<div>
<span class="weui-switch" :class="{'weui-switch-on': isChecked}" :value="value" @click="toggle" style="position:relative;">
<div v-if="isChecked && direction.length > 0" style="width:100%;height:100%;position:absolute;padding:0 5px;line-height:22px;color:#FFF;user-select:none">
{{direction[0]}}
</div>
<div v-if="!isChecked && direction.length > 0" style="width:100%;height:100%;position:absolute;padding:0 5px;right:2px;line-height:22px;color:#fff;text-align:right;user-select:none">
{{direction[1]}}
</div>
</span>
</div>
</template>
<script>
export default {
name: 'switch-component',
props: {
value: {
type: Boolean,
default: true
},
text: {
type: String,
default: ''
}
},
data () {
return {
isChecked: this.value
}
},
computed: {
direction () {
if (this.text) {
return this.text.split('|')
} else {
return []
}
}
},
watch: {
value (val) {
this.isChecked = val
},
isChecked (val) {
this.$emit('change', val)
}
},
methods: {
toggle () {
this.isChecked = !this.isChecked
}
}
}
</script>
<style lang="less" scoped>
.weui-switch {
font-size: 10px;
display: block;
position: relative;
width: 52px;
height: 24px;
border: 1px solid #0079DE;
outline: 0;
border-radius: 16px;
box-sizing: border-box;
background-color: #0079DE;
transition: background-color 0.1s, border 0.1s;
cursor: pointer;
}
.weui-switch:before {
content: '';
position: absolute;
top: 0;
left: 0;
width: 50px;
height: 22px;
border-radius:15px;
background-color: #0079DE;
transition: transform 0.35s cubic-bezier(0.45, 1, 0.4, 1);
}
.weui-switch:after {
content: '';
position: absolute;
top: 1px;
left: 2px;
width: 20px;
height: 20px;
border-radius: 15px;
background-color: #fff;
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
transition: transform 0.35 cubic-bezier(0.4, 0.4, 0.25, 1.35);
}
.weui-switch-on {
border-color: #0079DE;
background-color: #0079DE;
}
.weui-switch-on:before {
border-color: #0079DE;
background-color: #0079DE;
}
.weui-switch-on:after {
transform: translateX(26px);
}
</style>
\ No newline at end of file \ No newline at end of file
import env from '../env' import env from '../env'
// 系统常量 // 系统常量
const common = { const common = {
SYSTEM_NAME: '仟微助手', SYSTEM_NAME: '仟微助手',
SYSTEM_NAME_ALL: 'LinkWechat 企业微信SCRM 仟微助手', // SYSTEM_NAME_ALL: '仟微科技 企业微信SCRM',
COMPANY_NAME: '仟微科技', // COMPANY_NAME: '仟微科技',
COMPANY_NAME_ALL: '仟微科技', // COMPANY_NAME_ALL: '仟微科技',
// COPYRIGHT: 'Copyright © 2018-2022 LinkWeChat All Rights Reserved.', // COPYRIGHT: 'Copyright © 2018-2022 LinkWeChat All Rights Reserved.',
// LOGO_DARK: env.BASE_URL + 'static/LOGO_DARK.png', // LOGO_DARK: env.BASE_URL + 'static/LOGO_DARK.png',
// LOGO_LIGHT: env.BASE_URL + 'static/LOGO_LIGHT.png', // LOGO_LIGHT: env.BASE_URL + 'static/LOGO_LIGHT.png',
...@@ -14,19 +13,15 @@ const common = { ...@@ -14,19 +13,15 @@ const common = {
// QRCODE_CONTACT_US: env.BASE_URL + 'static/QRCODE_CONTACT_US.png', // QRCODE_CONTACT_US: env.BASE_URL + 'static/QRCODE_CONTACT_US.png',
// QRCODE_CUSTOMER_SERVICE: env.BASE_URL + 'static/QRCODE_CUSTOMER_SERVICE.png', // QRCODE_CUSTOMER_SERVICE: env.BASE_URL + 'static/QRCODE_CUSTOMER_SERVICE.png',
// IS_PUBLISH_DIALOG: true, // 是否显示发布弹窗 // IS_PUBLISH_DIALOG: true, // 是否显示发布弹窗
IS_VCONSOLE: true, // 是否显示发布弹窗 TOKEN: '',
APPID: 'wx863c031a74f589a0', // 微信公众号id IS_VCONSOLE: process.env.VUE_APP_ENV !== 'production', // 是否显示VCONSOLE
} }
const config = { let config = {
cookieExpires: 1, //token在Cookie中存储的天数,默认1天 // cookieExpires: 1, //token在Cookie中存储的天数,默认1天
homeName: 'home', //默认打开的首页的路由name值,默认为home
services: { services: {
wecom: '/wecom', wecom: '/open',
weChat: '/wx-api',
}, },
} }
window.lwConfig = Object.assign(env, common, window.lwConfig || {}, config) window.lwConfig = Object.assign(env, common, window.lwConfig || {}, config)
document.title = window.lwConfig.SYSTEM_NAME document.title = window.lwConfig.SYSTEM_NAME
window.CONFIG = config
export default config
import Vue from 'vue' import Vue from 'vue'
import './config' import '@/assets/icons' // icon
import '@/assets/icon/iconfont.css'
import 'normalize.css/normalize.css' import 'normalize.css/normalize.css'
import Vant from 'vant' import Vant, { Dialog, Toast } from 'vant'
import 'vant/lib/index.css' import 'vant/lib/index.less'
Vue.use(Vant) Vue.use(Vant)
// import { color } from './styles/varibles.less'
Dialog.setDefaultOptions({
title: '系统提示',
width: '68vw',
// confirmButtonColor: color
})
Toast.setDefaultOptions('loading', {
message: '加载中...',
forbidClick: true,
loadingType: 'spinner',
duration: 0,
})
import '@/styles/index.less' // global css import '@/styles/index.less' // global css
import './config'
import { stringifyError } from '@/utils/index'
stringifyError()
import App from './App.vue' import App from './App.vue'
import router from './router' import router from './router'
import store from './store' import store from './store'
......
import Vue from 'vue' import Vue from 'vue'
import VueRouter from 'vue-router' import VueRouter from 'vue-router'
import Home from '../views/Home.vue' import Home from '../views/Home.vue'
import { getAgentTicket } from '@/api/common'
import store from '@/store'
import { Toast } from 'vant'
Vue.use(VueRouter) Vue.use(VueRouter)
let noAuth = process.env.NODE_ENV === 'development'
const routes = [ const routes = [
{ {
path: '/', path: '/',
...@@ -20,7 +23,7 @@ const routes = [ ...@@ -20,7 +23,7 @@ const routes = [
name: 'chat', name: 'chat',
component: () => import('../views/chat'), component: () => import('../views/chat'),
meta: { meta: {
title: 'chat', title: '聊天素材',
}, },
}, },
// 用户画像 // 用户画像
...@@ -29,28 +32,40 @@ const routes = [ ...@@ -29,28 +32,40 @@ const routes = [
name: 'portrait', name: 'portrait',
component: () => import('../views/portrait/index'), component: () => import('../views/portrait/index'),
meta: { meta: {
title: 'portrait', title: '客户画像',
noAuth,
}, },
}, },
// 用户画像详情 // 用户画像-社群关系
{ {
path: '/customerDetail', path: '/community',
name: 'customerDetail', name: 'community',
component: () => import('../views/portrait/customerDetail.vue'), component: () => import('../views/portrait/community.vue'),
hidden: true, hidden: true,
meta: { meta: {
title: '', title: '社群关系',
noAuth: true, noAuth,
}, },
}, },
// 社群关系 // 客群画像
{ {
path: '/community', path: '/portraitGroup',
name: 'community', name: 'portraitGroup',
component: () => import('../views/portrait/community.vue'), component: () => import('../views/portraitGroup/index.vue'),
hidden: true, hidden: true,
meta: { meta: {
title: '', title: '客群画像',
noAuth,
},
},
{
path: '/groupMembers',
name: 'groupMembers',
component: () => import('../views/portraitGroup/members.vue'),
hidden: true,
meta: {
title: '群成员',
noAuth,
}, },
}, },
// 群活码扫描跳转页面 // 群活码扫描跳转页面
...@@ -67,10 +82,9 @@ const routes = [ ...@@ -67,10 +82,9 @@ const routes = [
// 标签建群+群sop // 标签建群+群sop
{ {
path: '/task', path: '/task',
// name: 'task',
hidden: true, hidden: true,
meta: { meta: {
title: '', title: '消息群发',
noAuth: true, noAuth: true,
}, },
component: () => import('../views/communityOperating/task/index'), component: () => import('../views/communityOperating/task/index'),
...@@ -80,7 +94,7 @@ const routes = [ ...@@ -80,7 +94,7 @@ const routes = [
component: () => import('../views/communityOperating/task/list'), component: () => import('../views/communityOperating/task/list'),
hidden: true, hidden: true,
meta: { meta: {
title: '', title: '消息群发',
// noAuth: true // noAuth: true
}, },
}, },
...@@ -90,7 +104,7 @@ const routes = [ ...@@ -90,7 +104,7 @@ const routes = [
component: () => import('../views/communityOperating/task/state.vue'), component: () => import('../views/communityOperating/task/state.vue'),
hidden: true, hidden: true,
meta: { meta: {
title: '', title: '消息群发',
noAuth: true, noAuth: true,
}, },
}, },
...@@ -103,7 +117,7 @@ const routes = [ ...@@ -103,7 +117,7 @@ const routes = [
component: () => import('../views/communityOperating/keywords/index'), component: () => import('../views/communityOperating/keywords/index'),
hidden: true, hidden: true,
meta: { meta: {
title: '', title: '关键词群',
}, },
}, },
// 客户公海 // 客户公海
...@@ -134,17 +148,136 @@ const routes = [ ...@@ -134,17 +148,136 @@ const routes = [
noAuth: true, noAuth: true,
}, },
}, },
// 任务宝、群裂变
{
path: '/taskTreasure',
name: 'taskTreasure',
component: () => import('../views/task/index'),
meta: {
title: '裂变任务',
noAuth: true,
},
},
// 任务宝、群裂变 任务进度查询
{
path: '/taskProcess',
name: 'taskProcess',
component: () => import('../views/task/process'),
meta: {
title: '任务进度',
noAuth: true,
},
},
// 群裂变 扫码结果页面
{
path: '/fission',
name: 'fission',
component: () => import('../views/fission/index'),
meta: {
title: '群裂变',
noAuth: true,
},
},
// 门店活码
{
path: '/guideCode',
name: 'guideCode',
component: () => import('../views/storeCode/index'),
hidden: true,
meta: {
title: '门店导购码',
noAuth: true,
},
},
{
path: '/storeCode',
name: 'storeCode',
component: () => import('../views/storeCode/code'),
hidden: true,
meta: {
title: '门店群活码',
noAuth: true,
},
},
// 解决授权重定向返回问题
{ path: '*', redirect: '/', hidden: true },
] ]
const router = new VueRouter({ const router = new VueRouter({
// mode: 'history', window.lwConfig
base: window.lwConfig.BASE_URL,
routes, routes,
}) })
router.beforeEach((to, from, next) => {
let init = true
router.beforeEach(async (to, from, next) => {
Toast.clear()
/* 路由发生变化修改页面title */ /* 路由发生变化修改页面title */
if (to.meta.title) { if (to.meta.title) {
document.title = to.meta.title document.title = to.meta.title
} }
// 通过config接口注入权限验证配置
// 所有需要使用JS-SDK的页面必须先注入配置信息,否则将无法调用(同一个url仅需调用一次,对于变化url的SPA(single-page application)的web app可在每次url变化时进行调用)
const noAuth = to.meta ? to.meta.noAuth : false
try {
if (init && !noAuth) {
Toast.loading()
await store.dispatch('login')
window.lwConfig.TOKEN || (await wxConfig())
init = false
Toast.clear()
}
next() next()
} catch (error) {
error && alert(JSON.stringify(error))
next(false)
}
}) })
async function wxConfig() {
try {
let { data } = await getAgentTicket(window.location.href.split('#')[0])
let { timestamp, nonceStr, signature } = data
return new Promise((resolve, reject) => {
wx.agentConfig({
beta: true, // 必须这么写,否则wx.invoke调用形式的jsapi会有问题
debug: true,
corpid: sessionStorage.corpId, // 必填,企业微信的corpid,必须与当前登录的企业一致
agentid: sessionStorage.agentId, // 必填,企业微信的应用id (e.g. 1000247)
timestamp, // 必填,生成签名的时间戳
nonceStr, // 必填,生成签名的随机串
signature, // 必填,签名,见附录-JS-SDK使用权限签名算法
jsApiList: [
'sendChatMessage',
'getContext',
'getCurExternalContact',
'getCurExternalChat',
'openEnterpriseChat',
'shareToExternalContact',
'shareToExternalChat',
'navigateToAddCustomer',
'openEnterpriseChat',
'openExistedChatWithMsg',
], //必填
success: (res) => {
// 回调
// toast('agentId成功:')
resolve()
},
fail: (res) => {
alert('agent config失败:' + JSON.stringify(res))
if (res.errMsg.indexOf('function not exist') > -1) {
alert('版本过低请升级')
}
reject()
},
})
})
} catch (error) {
error && alert(JSON.stringify(error))
return Promise.reject()
}
}
export default router export default router
import Vue from 'vue' import Vue from 'vue'
import Vuex from 'vuex' import Vuex from 'vuex'
import router from '@/router/index'
import { getUserInfo, login } from '@/api/common'
import { param2Obj, getQueryValue } from '@/utils/index'
Vue.use(Vuex) Vue.use(Vuex)
let count = 0
export default new Vuex.Store({ export default new Vuex.Store({
state: { state: {
userId: '', userId: sessionStorage.userId,
agentConfigStatus: false, reload: true,
},
mutations: {
userId(state, userId) {
state.userId = userId
},
reload(state, reload) {
state.reload = false
setTimeout(() => {
state.reload = true
}, 0)
},
},
actions: {
// 企业微信端授权登录
async login({ commit }) {
// http://106.13.201.219/?code=xxx&state=linkwechat#/route
//取缓存中的用户信息
window.lwConfig.TOKEN && (sessionStorage.token = window.lwConfig.TOKEN)
if (!sessionStorage.token) {
// 解决授权重定向返回问题
let indexRoute = router.getRoutes().find((e) => e.path == '')
indexRoute && (indexRoute.redirect = window.location.hash.slice(1))
//缓存中没有用户信息,进入授权流程
let code = getQueryValue('code') //是否存在code
let query = param2Obj() //是否存在code
// let code = query.code
let appid = window.lwConfig.APPID || query.corpId
let local = window.location.origin.includes('localhost')
? 'http://h5.linkwechat.cn/test.html':'http://demo.linkwechat.cn/mobile/#/index'
// : window.location.href
// 第三方授权重定向回来手动刷新页面
if (code && window.lwConfig.APPID && count === 1) {
// window.location.reload()
commit('reload')
// return Promise.reject()
}
if (!code) {
count++
//不存在就打开上面的地址进行授权
let url = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appid}&redirect_uri=${encodeURIComponent(
local
)}&response_type=code&scope=snsapi_privateinfo&state=linkwechat&agentid=1000002#wechat_redirect`
// 注意:第三方授权重定向回来携带的code是直接拼接在url后面的,企微没有做查询字符串hash检测,eg:url***code=****
// 由于上述原因router hash模式下,使用第三方授权重定向回来的时候不会刷新页面,解析code是需要注意
// 使用其他授权模式无上述问题
setTimeout(() => {
// window.location.href = url
window.location.replace(url)
}, 0)
return Promise.reject()
window.location.href = url
return new Promise(() => {})
// window.location.href =
// `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appid}&redirect_uri=${encodeURIComponent(local)}&response_type=code&scope=snsapi_userinfo&state=1#wechat_redirect`;
}
let dataLogin = await login(code)
// 存入sessionStorage,解决刷新重复code获取用户问题
dataLogin.data && sessionStorage.setItem('token', dataLogin.data.access_token)
}
if (sessionStorage.token && !sessionStorage.userId) {
let dataUser = {}
try {
dataUser = await getUserInfo()
} catch (error) {
return Promise.reject()
}
try {
let corpInfo = dataUser.corpInfo
dataUser.user.weUserId && sessionStorage.setItem('userId', dataUser.user.weUserId) // 当前 登录/使用 企业员工真实姓名大驼峰 eg:QinShiHuang
commit('userId', sessionStorage.userId)
corpInfo.appId && sessionStorage.setItem('appId', corpInfo.appId) // 租户微信公众号appid
corpInfo.tenantId && sessionStorage.setItem('tenantId', corpInfo.tenantId) // 租户id
//corpInfo.secret && sessionStorage.userId = store.userId = dataUser.user.weUserId
corpInfo.corpId && sessionStorage.setItem('corpId', corpInfo.corpId) // 服务商企业id
corpInfo.agentId && sessionStorage.setItem('agentId', corpInfo.agentId) // 代开发应用agentId
// urlReplaceFirstHistory(window.location.href)
dataUser.user.companyName &&
sessionStorage.setItem('companyName', dataUser.user.companyName) // 公司名称
dataUser.user.avatar && sessionStorage.setItem('avatar', dataUser.user.avatar) // 用户头像
dataUser.user.userName && sessionStorage.setItem('userName', dataUser.user.userName) // 用户姓名
dataUser.user.nickName && sessionStorage.setItem('nickName', dataUser.user.nickName) // 用户昵称
dataUser.user.position && sessionStorage.setItem('position', dataUser.user.position) // 用户部门
} catch (error) {
alert(JSON.stringify(error))
return Promise.reject()
}
}
},
}, },
mutations: {},
actions: {},
modules: {}, modules: {},
}) })
...@@ -158,14 +158,14 @@ textarea:-ms-input-placeholder { ...@@ -158,14 +158,14 @@ textarea:-ms-input-placeholder {
::-webkit-scrollbar { ::-webkit-scrollbar {
/*滚动条整体样式*/ /*滚动条整体样式*/
width: 10px; /*高宽分别对应横竖滚动条的尺寸*/ width: 2px; /*高宽分别对应横竖滚动条的尺寸*/
height: 10px; height: 2px;
} }
::-webkit-scrollbar-thumb { ::-webkit-scrollbar-thumb {
/*滚动条里面小方块*/ /*滚动条里面小方块*/
border-radius: 10px; border-radius: 2px;
/*深色模式*/ /*深色模式*/
-webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2); /* -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2); */
background: #bbb; background: #bbb;
/*浅色模式*/ /*浅色模式*/
...@@ -176,8 +176,9 @@ textarea:-ms-input-placeholder { ...@@ -176,8 +176,9 @@ textarea:-ms-input-placeholder {
} }
::-webkit-scrollbar-track { ::-webkit-scrollbar-track {
/*滚动条里面轨道*/ /*滚动条里面轨道*/
display: none;
-webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2); -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
border-radius: 10px; border-radius: 2px;
background: #eee; background: #eee;
} }
...@@ -313,44 +314,66 @@ ais { ...@@ -313,44 +314,66 @@ ais {
.pt5 { .pt5 {
padding-top: 5px; padding-top: 5px;
} }
.pr5 { .pr5 {
padding-right: 5px; padding-right: 5px;
} }
.pb5 { .pb5 {
padding-bottom: 5px; padding-bottom: 5px;
} }
.pl5 { .pl5 {
padding-left: 5px; padding-left: 5px;
} }
.pad5 {
padding: 5px;
}
.pt10 { .pt10 {
padding-top: 10px; padding-top: 10px;
} }
.pt15 { .pr10 {
padding-top: 15px; padding-right: 10px;
}
.pb10 {
padding-bottom: 10px;
}
.pl10 {
padding-left: 10px;
} }
.pad10 {
padding: 10px;
}
.pt20 { .pt20 {
padding-top: 20px; padding-top: 20px;
} }
.pr20 {
padding-right: 20px;
}
.pb20 {
padding-bottom: 20px;
}
.pl20 {
padding-left: 20px;
}
.pad20 {
padding: 20px;
}
.mt5 { .mt5 {
margin-top: 5px; margin-top: 5px;
} }
.mr5 { .mr5 {
margin-right: 5px; margin-right: 5px;
} }
.mb5 { .mb5 {
margin-bottom: 5px; margin-bottom: 5px;
} }
.ml5 { .ml5 {
margin-left: 5px; margin-left: 5px;
} }
.mar5 {
margin: 5px;
}
.mb8 { .mb8 {
margin-bottom: 8px; margin-bottom: 8px;
...@@ -359,31 +382,31 @@ ais { ...@@ -359,31 +382,31 @@ ais {
.mt10 { .mt10 {
margin-top: 10px; margin-top: 10px;
} }
.mr10 { .mr10 {
margin-right: 10px; margin-right: 10px;
} }
.mb10 { .mb10 {
margin-bottom: 10px; margin-bottom: 10px;
} }
.ml10 { .ml10 {
margin-left: 10px; margin-left: 10px;
} }
.mar10 {
margin: 10px;
}
.mt15 { .mt15 {
margin-top: 15px; margin-top: 15px;
} }
.mr15 { .mr15 {
margin-right: 15px; margin-right: 15px;
} }
.mb15 { .mb15 {
margin-bottom: 15px; margin-bottom: 15px;
} }
.ml15 {
margin-left: 15px;
}
.ml15 { .ml15 {
margin-left: 15px; margin-left: 15px;
} }
...@@ -391,15 +414,34 @@ ais { ...@@ -391,15 +414,34 @@ ais {
.mt20 { .mt20 {
margin-top: 20px; margin-top: 20px;
} }
.mr20 { .mr20 {
margin-right: 20px; margin-right: 20px;
} }
.mb20 { .mb20 {
margin-bottom: 20px; margin-bottom: 20px;
} }
.ml20 { .ml20 {
margin-left: 20px; margin-left: 20px;
} }
.mar20 {
margin: 20px;
}
/* Dark mode */
@media (prefers-color-scheme: dark) {
body,img,video {
filter: invert(1) hue-rotate(180deg);
}
/* 不使用暗黑模式 */
.no-dark {
position: relative;
}
.no-dark::before{
content: " ";
position: absolute;
display: block;
height: 100%;
width: 100%;
backdrop-filter: invert(1) hue-rotate(180deg);
}
}
\ No newline at end of file \ No newline at end of file
@color: #42b9fd; @red: #ee0a24;
@blue: #0079de;
@orange: #ff976a;
@orange-dark: #ed6a0c;
@orange-light: #fffbe8;
@green: #07c160;
@color: @blue;
@blueLight: #4ca1e8;
@colorSub: #4ee699; @colorSub: #4ee699;
@colorSubDeep: #34b071; @colorSubDeep: #34b071;
@borderColor: #106ed2; @borderColor: #106ed2;
...@@ -42,3 +50,7 @@ ...@@ -42,3 +50,7 @@
.border(@color, @width: 1px) when (default()) { .border(@color, @width: 1px) when (default()) {
border: @width solid @color; border: @width solid @color;
} }
:export {
color: @color;
}
\ No newline at end of file \ No newline at end of file
/**
* 动态加载百度地图api函数
* @param {String} ak 百度地图AK,必传
*/
export default function loadBMap(ak) {
return new Promise(function(resolve, reject) {
if (typeof window.BMap !== 'undefined') {
resolve(window.BMap)
return true
}
window.onBMapCallback = function() {
resolve(window.BMap)
}
let script = document.createElement('script')
script.type = 'text/javascript'
script.src =
'https://api.map.baidu.com/api?v=3.0&ak=' + ak + '&callback=onBMapCallback'
script.onerror = reject
document.head.appendChild(script)
})
}
\ No newline at end of file \ No newline at end of file
import { getUserOpenid, getWechatUserInfo } from '@/api/common'
/** /**
* query请求路径参数转为对象 * query请求路径参数转为对象
* @param {*} url * @param {*} url
*/ */
export function param2Obj(url) { export function param2Obj (url) {
try {
url = url == null ? window.location.href : url url = url == null ? window.location.href : url
let search = decodeURIComponent(url)
let search = decodeURIComponent(url).split('?')[1] .split('?')
search = search && search.split('#')[0] .slice(1)
if (!search) { if (!search[0]) {
return {} return
} }
search = search.filter((e) => e.includes('=')).map((e) => e.split('#')[0])
search = search.join('&')
return JSON.parse( return JSON.parse(
'{"' + '{"' +
search search
...@@ -19,13 +21,34 @@ export function param2Obj(url) { ...@@ -19,13 +21,34 @@ export function param2Obj(url) {
.replace(/=/g, '":"') + .replace(/=/g, '":"') +
'"}' '"}'
) )
} catch (error) {
alert(error)
}
// 更完善的方案
// url = url == null ? window.location.href : url
// const search = url.substring(url.lastIndexOf('?') + 1)
// search = search && search.split('#')[0]
// if (!search) {
// return {}
// }
// const obj = {}
// const reg = /([^?&=]+)=([^?&=]*)/g
// search.replace(reg, (rs, $1, $2) => {
// const name = decodeURIComponent($1)
// let val = decodeURIComponent($2)
// val = String(val)
// obj[name] = val
// return rs
// })
// return obj
} }
/** /**
* Obj转为路径query请求参数 * Obj转为路径query请求参数
* @param {*} obj * @param {*} obj
*/ */
export function obj2query(obj) { export function obj2query (obj) {
if (!obj) return '' if (!obj) return ''
return Object.keys(obj) return Object.keys(obj)
.map((key) => { .map((key) => {
...@@ -40,70 +63,98 @@ export function obj2query(obj) { ...@@ -40,70 +63,98 @@ export function obj2query(obj) {
* 获取query请求参数中name对应的值 * 获取query请求参数中name对应的值
* @param string name * @param string name
*/ */
export function getQueryValue(name) { export function getQueryValue (name, str) {
let url = window.location.href try {
let search = decodeURIComponent(url).split('?')[1] let url = str || window.location.href
search = search && search.split('#')[0] // let search = url.split('?')[1]
if (!search) { // search = search && search.split('#')[0]
return '' // if (!search) {
} // return ''
// }
let reg = new RegExp('(^|&)' + name + '=([^&]*)(&|$)') let reg = new RegExp('(^|&|\\?)' + name + '=([^&#]*)(&|#|$)')
let r = search.match(reg) let r = url.match(reg)
if (r != null) { if (r != null) {
return r[2] return decodeURIComponent(r[2])
} }
return '' return ''
} catch (error) {
alert(error)
}
}
export function urlReplaceFirstHistory (url) {
window.history.go(-(window.history.length - 1))
window.location.replace(url)
} }
export async function getWxCode() { import { getUserOpenid, getWechatUserInfo, getWxRedirect, wxLogin } from '@/api/common'
// 微信端授权登录
export async function getWxCode () {
let userinfo = sessionStorage.getItem('userinfo') let userinfo = sessionStorage.getItem('userinfo')
//取缓存中的用户信息 //取缓存中的用户信息
if (userinfo) { if (userinfo) {
try { try {
userinfo = JSON.parse(userinfo) userinfo = JSON.parse(userinfo)
} catch (error) { } catch (error) {
alert(error) // alert(error)
} }
return userinfo return userinfo
} }
//缓存中没有用户信息,进入授权流程 //缓存中没有用户信息,进入授权流程
let appid = window.lwConfig.APPID // 公众号appid // let appId = 'wxa57479bcd3f15461'
// let appid = 'wx8bfe6bc2ca5c45ae' // 公众号appid let appId = window.lwConfig.appId // 微信公众号id
// let appId = 'wxa57479bcd3f15461' // 公众号appid
let code = getQueryValue('code') //是否存在code let code = getQueryValue('code') //是否存在code
// let query = param2Obj() //
// let { code, appId, secret } = query
let local = window.location.origin.includes('localhost') let local = window.location.origin.includes('localhost')
? 'http://h5.linkwechat.cn/test.html' ? 'http://h5.linkwechat.cn/test.html'
: window.location.href : window.location.href
// let local = 'http://h5.x*****o.com/'
if (!code) { if (!code) {
//不存在就打开上面的地址进行授权 //不存在就打开上面的地址进行授权
let url = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appid}&redirect_uri=${encodeURIComponent( let url = ''
if (appId) {
url = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appId}&redirect_uri=${encodeURIComponent(
local local
)}&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect` )}&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect`
} else {
url = (await getWxRedirect()).data
let id = getQueryValue('appid', url)
sessionStorage.setItem('weAppId', id)
}
window.location.href = url window.location.href = url
return {} // return new Promise(() => { })
// window.location.href = // window.location.href =
// `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appid}&redirect_uri=${encodeURIComponent(local)}&response_type=code&scope=snsapi_userinfo&state=1#wechat_redirect`; // `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appid}&redirect_uri=${encodeURIComponent(local)}&response_type=code&scope=snsapi_userinfo&state=1#wechat_redirect`;
} }
try { try {
let { data } = await getUserOpenid(code) if (code) {
let { data: dataUser } = await getWechatUserInfo(data.openId) let { data: dataLogin } = await wxLogin(code)
sessionStorage.setItem('token', dataLogin.access_token)
let { data: dataUser } = await getWechatUserInfo()
sessionStorage.setItem('userinfo', JSON.stringify(dataUser)) sessionStorage.setItem('userinfo', JSON.stringify(dataUser))
return dataUser return dataUser
}
} catch (error) { } catch (error) {
alert(error) // alert(JSON.stringify(error))
return Promise.reject()
} }
return {}
} }
// 日期时间格式化 // 日期时间格式化
export function dateFormat(dateString, fmt = 'yyyy-MM-dd hh:mm:ss') { export function dateFormat (dateString, fmt = 'yyyy-MM-dd hh:mm:ss') {
if (!dateString) { if (!dateString) {
return return
} }
var date = new Date(dateString.replace(/-/g, '/')) var date = dateString
if (Object.prototype.toString.call(dateString) !== '[object Date]') {
if (!dateString.includes('T')) {
dateString = dateString.replace(/-/g, '/')
}
date = new Date(dateString)
}
var o = { var o = {
'M+': date.getMonth() + 1, //月份 'M+': date.getMonth() + 1, //月份
'd+': date.getDate(), //日 'd+': date.getDate(), //日
...@@ -130,3 +181,74 @@ export function dateFormat(dateString, fmt = 'yyyy-MM-dd hh:mm:ss') { ...@@ -130,3 +181,74 @@ export function dateFormat(dateString, fmt = 'yyyy-MM-dd hh:mm:ss') {
return fmt return fmt
} }
export function stringifyError () {
Error.prototype.toJSON = function () {
return this.toString()
}
}
export function baiduMapError (type) {
let arr = [
{ code: 0, value: '检索成功' },
{ code: 1, value: '城市列表' },
{ code: 2, value: '位置结果未知' },
{ code: 3, value: '导航结果未知' },
{ code: 4, value: '非法密钥AK' },
{ code: 5, value: '非法请求' },
{ code: 6, value: '没有权限, 请确认手机是否打开定位服务!' },
{ code: 7, value: '服务不可用' },
{ code: 8, value: '超时' },
]
let str
arr.forEach(dd => {
if (dd.code === type) {
str = dd.value
}
})
return str
}
export function splitName (str) {
if (str) {
let area = {}
let index11 = 0
let index1 = str.indexOf("省")
if (index1 == -1) {
index11 = str.indexOf("自治区")
if (index11 != -1) {
area.Province = str.substring(0, index11 + 3)
} else {
area.Province = str.substring(0, 0)
}
} else {
area.Province = str.substring(0, index1 + 1)
}
let index2 = str.indexOf("市")
if (index11 == -1) {
area.City = str.substring(index11 + 1, index2 + 1)
} else {
if (index11 == 0) {
area.City = str.substring(index1 + 1, index2 + 1)
} else {
area.City = str.substring(index11 + 3, index2 + 1)
}
}
let index3 = str.indexOf("区")
if (index3 == -1) {
index3 = str.indexOf("县")
if (index3 == -1) {
index3 = str.indexOf('旗')
area.Country = str.substring(index2 + 1, index3 + 1)
} else {
area.Country = str.substring(index2 + 1, index3 + 1)
}
} else {
area.Country = str.substring(index2 + 1, index3 + 1)
}
return [area.Province, area.City, area.Country]
} else {
return ''
}
}
\ No newline at end of file \ No newline at end of file
...@@ -4,15 +4,15 @@ import { Toast, Dialog } from 'vant' ...@@ -4,15 +4,15 @@ import { Toast, Dialog } from 'vant'
function createAxios(baseURL) { function createAxios(baseURL) {
const instance = axios.create({ const instance = axios.create({
baseURL, baseURL,
headers: {
Auth_token: '',
},
timeout: 10000, timeout: 10000,
}) })
// 请求拦截 // 请求拦截
instance.interceptors.request.use( instance.interceptors.request.use(
(config) => { (config) => {
// console.log('request config: ' + JSON.stringify(config)) // console.log('request config: ' + JSON.stringify(config))
config.headers = {
Authorization: 'Bearer ' + sessionStorage.token,
}
return config return config
}, },
(error) => { (error) => {
...@@ -27,11 +27,25 @@ function createAxios(baseURL) { ...@@ -27,11 +27,25 @@ function createAxios(baseURL) {
// code 200:成功,-1/其它:错误 // code 200:成功,-1/其它:错误
if (status === 200 && data.code === 200) { if (status === 200 && data.code === 200) {
return data return data
} else if (data.code === 401) {
let r = confirm('登录状态已过期,您可以继续留在该页面,或者重新登录')
if (r == true) {
sessionStorage.clear()
location.reload()
}
} else if (data.code == 501) { } else if (data.code == 501) {
// 红包领取相关错误 // 红包领取相关错误
return data return data
} else { }
addErrorLog(res) // else if ([-10002, -10003].includes(data.code)) {
// // 用户信息不存在
// location.replace('/#/task/state')
// location.reload()
// return new Promise(() => {})
// }
else {
alert(data.msg)
// addErrorLog(res)
} }
return Promise.reject(data) return Promise.reject(data)
...@@ -45,14 +59,13 @@ function createAxios(baseURL) { ...@@ -45,14 +59,13 @@ function createAxios(baseURL) {
if (error.response) { if (error.response) {
addErrorLog(error.response) addErrorLog(error.response)
} else { } else {
Dialog({ message: '服务器未启动或连接超时' }) alert('服务器未启动或连接超时')
console.error('服务器未启动或连接超时')
} }
return Promise.reject(error) return Promise.reject(error)
} }
) )
// 错误日志 // 错误日志
const addErrorLog = (errorInfo) => { function addErrorLog(errorInfo) {
const { const {
data, data,
statusText, statusText,
...@@ -66,10 +79,14 @@ function createAxios(baseURL) { ...@@ -66,10 +79,14 @@ function createAxios(baseURL) {
// url: responseURL // url: responseURL
// } // }
// if (!responseURL.includes('save_error_logger')) store.dispatch('addErrorLog', info) // if (!responseURL.includes('save_error_logger')) store.dispatch('addErrorLog', info)
process.env.NODE_ENV === 'development' try {
? console.error(`错误: 路径: ${responseURL}, 返回值 : ${responseText}`) // console.error(`错误: 路径: ${responseURL}, 返回值 : ${responseText}`)
: console.error(`${JSON.parse(responseText).message}`) let mes =
Dialog({ message: responseText }) process.env.ENV === 'production'
? `错误: 路径: ${responseURL}, 返回值 : ${responseText}`
: `系统繁忙,请稍后再试`
alert(mes)
} catch (error) {}
} }
return instance return instance
......
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
v-for="(item, index) in $router.options.routes" v-for="(item, index) in $router.options.routes"
:to="item.path" :to="item.path"
:key="index" :key="index"
>{{ item.meta.title }}</router-link >{{ item.meta && item.meta.title }}</router-link
> >
</template> </template>
<div v-else class="cc tips blod"> <div v-else class="cc tips blod">
......
<template> <template>
<div class="home"> <div class="home">
<div class="logo ac">linkWeCh13at</div> <div class="logo ac">linkWeChat</div>
</div> </div>
</template> </template>
...@@ -27,7 +27,7 @@ export default { ...@@ -27,7 +27,7 @@ export default {
methods: { methods: {
getWxCode() { getWxCode() {
try { try {
let appid = window.lwConfig.APPID // 公众号appid let appid = window.lwConfig.appId // 公众号appid
// let appid = 'wx8bfe6bc2ca5c45ae' // 公众号appid // let appid = 'wx8bfe6bc2ca5c45ae' // 公众号appid
alert(2) alert(2)
let code = getQueryValue('code') //是否存在code let code = getQueryValue('code') //是否存在code
......
...@@ -18,16 +18,18 @@ export default { ...@@ -18,16 +18,18 @@ export default {
type: String, type: String,
default: '0', default: '0',
}, },
keyword: { // keyword: {
type: String, // type: String,
default: '', // default: '',
}, // },
}, },
data() { data() {
return { return {
refreshing: false, refreshing: false,
loading: false, loading: false,
finished: false, finished: false,
finishedText: '暂无数据',
keyword: undefined,
error: false, error: false,
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
...@@ -45,7 +47,7 @@ export default { ...@@ -45,7 +47,7 @@ export default {
}, },
watch: { watch: {
userId() { userId() {
this.getList(1) this.sideId || this.getList(1)
}, },
}, },
computed: { computed: {
...@@ -71,14 +73,19 @@ export default { ...@@ -71,14 +73,19 @@ export default {
} }
;(this.sideId ;(this.sideId
? getMaterialList({ ? getMaterialList({
userId: this.userId, // userId: this.userId,
sideId: this.sideId, sideId: this.sideId,
mediaType: this.mediaType, mediaType: this.mediaType,
pageSize, pageSize,
pageNum, pageNum,
keyword, keyword,
}) })
: getCollectionList({ userId: this.userId, pageSize, pageNum, keyword }) : getCollectionList({
userId: this.userId,
pageSize,
pageNum,
keyword,
})
) )
.then(({ rows, total }) => { .then(({ rows, total }) => {
// 判断我的列表 // 判断我的列表
...@@ -94,13 +101,16 @@ export default { ...@@ -94,13 +101,16 @@ export default {
this.refreshing = false this.refreshing = false
// 数据全部加载完成 // 数据全部加载完成
if (this.list.length >= +total) { if (this.list.length >= +total) {
if (this.list.length == 0) {
this.pageNum = 1
this.finishedText = '暂无数据'
} else {
this.finishedText = '没有更多了'
}
this.finished = true this.finished = true
} else { } else {
this.pageNum++ this.pageNum++
} }
if (this.list.length == 0) {
this.pageNum = 1
}
}) })
.catch(() => { .catch(() => {
this.error = true this.error = true
...@@ -112,6 +122,10 @@ export default { ...@@ -112,6 +122,10 @@ export default {
// this.collectList = rows.map((d) => d.materialId) // this.collectList = rows.map((d) => d.materialId)
// }) // })
// }, // },
search(pageNum, keyword) {
this.keyword = keyword
this.getList(pageNum)
},
send(data) { send(data) {
this.$toast.loading({ this.$toast.loading({
message: '正在发送...', message: '正在发送...',
...@@ -157,14 +171,19 @@ export default { ...@@ -157,14 +171,19 @@ export default {
type: msgtype[data.mediaType], type: msgtype[data.mediaType],
name: data.materialName, name: data.materialName,
} }
try {
let resMaterialId = await getMaterialMediaId(dataMediaId) let resMaterialId = await getMaterialMediaId(dataMediaId)
if (!resMaterialId.data) { if (!resMaterialId.data) {
_this.$toast('获取素材id失败') _this.$toast('获取素材id失败')
return return
} }
mes[msgtype[data.mediaType]] = { mes[msgtype[data.mediaType]] = {
mediaid: resMaterialId.data.media_id, // mediaid: resMaterialId.data.mediaId, //
}
} catch (error) {
return
} }
break break
// case '5': // case '5':
// mes.news = { // mes.news = {
...@@ -193,7 +212,7 @@ export default { ...@@ -193,7 +212,7 @@ export default {
// if (resSend.err_msg == 'sendChatMessage:ok') { // if (resSend.err_msg == 'sendChatMessage:ok') {
// //发送成功 sdk会自动弹出成功提示,无需再加 // //发送成功 sdk会自动弹出成功提示,无需再加
// // _this.$toast('发送成功') // // _this.$toast('发送成功')
// } else // }
if ('sendChatMessage:cancel,sendChatMessage:ok'.indexOf(resSend.err_msg) < 0) { if ('sendChatMessage:cancel,sendChatMessage:ok'.indexOf(resSend.err_msg) < 0) {
//错误处理 //错误处理
_this.$dialog({ message: '发送失败:' + JSON.stringify(resSend) }) _this.$dialog({ message: '发送失败:' + JSON.stringify(resSend) })
...@@ -238,7 +257,7 @@ export default { ...@@ -238,7 +257,7 @@ export default {
<van-list <van-list
v-model="loading" v-model="loading"
:finished="finished" :finished="finished"
finished-text="没有更多了" :finished-text="finishedText"
:error.sync="error" :error.sync="error"
error-text="请求失败,点击重新加载" error-text="请求失败,点击重新加载"
@load="getList()" @load="getList()"
......
...@@ -11,19 +11,19 @@ export default { ...@@ -11,19 +11,19 @@ export default {
list: [], list: [],
loading: false, loading: false,
finished: false, finished: false,
show: false show: false,
// userId: this.$store.state.userId, // userId: this.$store.state.userId,
} }
}, },
watch: { watch: {
userId() { userId() {
this.getList() this.getList()
} },
}, },
computed: { computed: {
userId() { userId() {
return this.$store.state.userId return this.$store.state.userId
} },
}, },
beforeCreate() {}, beforeCreate() {},
created() { created() {
...@@ -37,38 +37,35 @@ export default { ...@@ -37,38 +37,35 @@ export default {
this.list = [] this.list = []
this.userId && this.userId &&
this.list.push({ this.list.push({
sideName: '我的' sideName: '我的',
}) })
rows && this.list.push(...rows) rows && this.list.push(...rows)
}) })
}, },
search(pageNum) { search(pageNum) {
this.$refs['list'][this.active].getList(pageNum) // this.$refs['list'][this.active].search(pageNum, this.keyword)
// this.$refs['list' + this.active] && this.$refs['list' + this.active][0].getList(pageNum) this.$refs['list' + this.active] &&
this.$refs['list' + this.active][0].search(pageNum, this.keyword)
}, },
cancel() { cancel() {
this.keyword = ''
this.$nextTick(() => this.search(1)) this.$nextTick(() => this.search(1))
}, },
refreshCollect() { refreshCollect() {
this.userId && this.$refs['list'][0].getList(1) this.userId && this.$refs['list'][0].getList(1)
} },
// add() {}, // add() {},
} },
} }
</script> </script>
<template> <template>
<div> <div>
<van-search <van-search v-model="keyword" show-action placeholder="请输入搜索关键词" @search="search(1)">
v-model="keyword" <template #action>
show-action <span @click="search(1)">搜索</span>
placeholder="请输入搜索关键词" <span class="ml5" @click="cancel">重置</span>
@cancel="cancel" </template>
@search="search(1)"
>
<!-- <template #action>
<van-icon name="plus" @click="add" />
</template> -->
</van-search> </van-search>
<van-tabs v-model="active"> <van-tabs v-model="active">
<!-- <van-tab v-if="!!userId" title="我的"> <!-- <van-tab v-if="!!userId" title="我的">
...@@ -76,10 +73,9 @@ export default { ...@@ -76,10 +73,9 @@ export default {
</van-tab> --> </van-tab> -->
<van-tab :title="item.sideName" v-for="(item, index) in list" :key="index"> <van-tab :title="item.sideName" v-for="(item, index) in list" :key="index">
<List <List
ref="list" :ref="'list' + index"
:sideId="item.sideId" :sideId="item.id"
:mediaType="item.mediaType" :mediaType="item.mediaType"
:keyword="keyword"
@collect="refreshCollect" @collect="refreshCollect"
></List> ></List>
</van-tab> </van-tab>
......
...@@ -111,7 +111,9 @@ export default { ...@@ -111,7 +111,9 @@ export default {
.catch(() => { .catch(() => {
this.$emit('refresh') this.$emit('refresh')
}) })
} else if ('shareToExternalContact:cancel'.indexOf(res.err_msg) < 0) { } else if (res.err_msg == 'shareToExternalContact:cancel') {
// 用户取消发送
} else {
_this.$dialog({ message: '发送失败:' + JSON.stringify(res) }) _this.$dialog({ message: '发送失败:' + JSON.stringify(res) })
} }
} }
......
...@@ -158,8 +158,10 @@ export default { ...@@ -158,8 +158,10 @@ export default {
// this.$emit('refresh') // this.$emit('refresh')
// }) // })
_this.$toast.clear() _this.$toast.clear()
_this.$emit('refresh') this.$emit('refresh')
} else if ('shareToExternalChat:cancel'.indexOf(res.err_msg) < 0) { } else if (res.err_msg == 'shareToExternalChat:cancel') {
// 用户取消发送
} else {
_this.$dialog({ message: '发送失败:' + JSON.stringify(res) }) _this.$dialog({ message: '发送失败:' + JSON.stringify(res) })
} }
_this.$toast.clear() _this.$toast.clear()
......
...@@ -35,20 +35,20 @@ ...@@ -35,20 +35,20 @@
<template v-else> <template v-else>
<template v-for="task in tasks"> <template v-for="task in tasks">
<template v-if="task.type === 1"> <template v-if="task.type === 1">
<OldCustomerPanel <OldCustomer
:key="task.taskId" :key="task.taskId"
:task="task" :task="task"
:state="isDone ? true : false" :state="isDone ? true : false"
@refresh="getTasks" @refresh="getTasks"
></OldCustomerPanel> ></OldCustomer>
</template> </template>
<template v-else> <template v-else>
<SOPPanel <Sop
:key="task.ruleId" :key="task.ruleId"
:task="task" :task="task"
:state="isDone ? true : false" :state="isDone ? true : false"
@refresh="getTasks" @refresh="getTasks"
></SOPPanel> ></Sop>
</template> </template>
</template> </template>
</template> </template>
...@@ -61,11 +61,11 @@ ...@@ -61,11 +61,11 @@
<script> <script>
import { getTasks } from '@/api/community' import { getTasks } from '@/api/community'
import OldCustomerPanel from '../oldCustomer/panel' import OldCustomer from './OldCustomer'
import SOPPanel from '../SOP/panel' import Sop from './Sop'
export default { export default {
components: { OldCustomerPanel, SOPPanel }, components: { OldCustomer, Sop },
data() { data() {
return { return {
...@@ -73,7 +73,7 @@ export default { ...@@ -73,7 +73,7 @@ export default {
taskType: 0, // 任务类型 0:全部 1:老客标签建群 2:群SOP taskType: 0, // 任务类型 0:全部 1:老客标签建群 2:群SOP
loading: false, // 加载状态 loading: false, // 加载状态
todo: [], // 待处理数据 todo: [], // 待处理数据
done: [] // 已处理数据 done: [], // 已处理数据
} }
}, },
...@@ -82,18 +82,15 @@ export default { ...@@ -82,18 +82,15 @@ export default {
getTasks() { getTasks() {
this.loading = true this.loading = true
getTasks(this.$store.state.userId, this.taskType) getTasks(this.$store.state.userId, this.taskType)
.then((res) => { .then(({ data }) => {
if (res.code === 200) { this.todo = data.todo || []
this.todo = res.todo || [] this.done = data.done || []
this.done = res.done || []
} else {
}
this.loading = false this.loading = false
}) })
.catch((error) => { .catch((error) => {
this.loading = false this.loading = false
}) })
} },
}, },
computed: { computed: {
...@@ -104,7 +101,7 @@ export default { ...@@ -104,7 +101,7 @@ export default {
tasks() { tasks() {
if (this.isDone === 1) return this.done if (this.isDone === 1) return this.done
return this.todo return this.todo
} },
}, },
watch: { watch: {
...@@ -116,13 +113,12 @@ export default { ...@@ -116,13 +113,12 @@ export default {
if (val) { if (val) {
this.getTasks() this.getTasks()
} }
} },
}, },
created() { created() {
document.title = '消息群发'
this.taskType = parseInt(this.$route.query.type) this.taskType = parseInt(this.$route.query.type)
} },
} }
</script> </script>
......
<script>
import { setFissionComplete } from '@/api/task'
export default {
name: '',
components: {},
data() {
return {
qrcode: '',
errMsg: '',
}
},
computed: {},
watch: {},
created() {
this.$toast.loading({
duration: 0,
forbidClick: true,
})
getWxCode()
.then(({ openId, unionId, nickName, headImgUrl }) => {
if (openId) {
const fissionId = getUrlParam('fissionId')
const recordId = getUrlParam('recordId')
if (!(fissionId && recordId && openId)) {
this.errMsg = '缺失必要数据, 请联系管理员'
return
}
setFissionComplete(fissionId, recordId, {
name: nickName,
unionid: unionId,
userid: openId,
avatar: headImgUrl,
})
.then(({ data }) => {
this.qrcode = data
this.$toast.clear()
})
.catch(() => {
this.errMsg = '未获取到可用的二维码'
this.$toast.clear()
})
} else {
this.errMsg = '获取用户信息失败'
this.$toast.clear()
}
})
.catch(() => {
this.errMsg = '获取用户信息失败'
this.$toast('授权异常,请刷新重试')
})
},
mounted() {},
methods: {},
}
</script>
<template>
<div class="container">
<div id="qrcode" class="qrcode" v-if="qrcode">
<div class="qrcode-tip">长按识别进入群组</div>
<div class="qrcode-content">
<img id="qrcodeImg" :src="qrcode" />
</div>
</div>
<div v-else id="error" class="error-content">
<div id="message">{{ errMsg }}</div>
</div>
</div>
</template>
<style lang="less" scoped>
.container {
height: 100%;
background-color: rgb(239, 239, 244);
display: flex;
align-items: center;
}
.qrcode {
width: 100%;
display: flex;
justify-content: center;
flex-direction: column;
}
.qrcode-tip {
text-align: left;
font-size: 40px;
padding: 20px;
text-indent: 15%;
}
.qrcode-content {
width: 100%;
text-align: center;
}
.qrcode-content > img {
width: 70%;
}
.error-content {
text-align: center;
font-size: 40px;
width: 100%;
display: none;
}
</style>
<template> <template>
<div> <div v-loading="loading">
<div v-if="!code || !code.actualQRCode"> <div v-if="!code || !code.codeUrl">
<van-empty :description="message" /> <van-empty :description="message" />
</div> </div>
<div v-else class="code-wrapper"> <div v-else class="code-wrapper">
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
</div> </div>
<div class="code-image"> <div class="code-image">
<van-image width="300" :src="code.actualQRCode"></van-image> <van-image width="300" :src="code.codeUrl"></van-image>
</div> </div>
<div class="service" v-if="code.isOpenTip === '1'"> <div class="service" v-if="code.isOpenTip === '1'">
...@@ -54,18 +54,19 @@ import { getDetail } from '@/api/groupCode' ...@@ -54,18 +54,19 @@ import { getDetail } from '@/api/groupCode'
export default { export default {
data() { data() {
return { return {
loading: false,
groupCodeUUID: '', // 群活码ID groupCodeUUID: '', // 群活码ID
code: { code: {
activityName: '', // 活码名称 activityName: '', // 活码名称
guide: '', // 加群引导语 guide: '', // 加群引导语
actualQRCode: '', // 实际群码 codeUrl: '', // 实际群码
isOpenTip: '', // 是否显示无法加群提示 isOpenTip: '', // 是否显示无法加群提示
tipMsg: '', // 无法加群提示语 tipMsg: '', // 无法加群提示语
serviceQrCode: '', // 客服二维码 serviceQrCode: '', // 客服二维码
groupName: '' // 实际群名称 groupName: '', // 实际群名称
}, },
dialog: false, dialog: false,
message: '抱歉,暂无可用实际群码' message: '抱歉,暂无可用实际群码',
} }
}, },
...@@ -73,23 +74,23 @@ export default { ...@@ -73,23 +74,23 @@ export default {
// 获取群活码详情 // 获取群活码详情
getDetail() { getDetail() {
if (!this.groupCodeUUID) return if (!this.groupCodeUUID) return
this.loading = true
getDetail(this.groupCodeUUID) getDetail(this.groupCodeUUID)
.then(({ data, msg }) => { .then(({ data, msg }) => {
this.code = Object.assign(this.code, data) this.code = Object.assign(this.code, data)
document.title = data.activityName document.title = data.activityName
this.loading = false
if (msg) this.message = msg if (msg) this.message = msg
}) })
.catch(() => {}) .catch(() => {})
} },
}, },
created() { created() {
this.groupCodeUUID = this.$route.query.id this.groupCodeUUID = this.$route.query.id
this.getDetail() this.getDetail()
} },
} }
</script> </script>
......
...@@ -6,12 +6,14 @@ ...@@ -6,12 +6,14 @@
<van-cell> <van-cell>
<template v-for="(unit, key) in list"> <template v-for="(unit, key) in list">
<div class="content" :key="key"> <div class="content" :key="key">
<div>{{unit.phone}}</div> <div>{{ unit.phone }}</div>
<div> <div>
{{unit.customerName}} {{ unit.customerName }}
</div> </div>
<div> <div>
<van-button plain round type="info" @click="copyFn($event, unit.phone)">复制</van-button> <van-button plain round type="info" @click="copyFn($event, unit.phone)"
>复制</van-button
>
</div> </div>
</div> </div>
</template> </template>
...@@ -37,9 +39,9 @@ ...@@ -37,9 +39,9 @@
<van-cell> <van-cell>
<template v-for="(unit, key) in list1"> <template v-for="(unit, key) in list1">
<div class="content" :key="key"> <div class="content" :key="key">
<div>{{unit.phone}}</div> <div>{{ unit.phone }}</div>
<div> <div>
{{unit.customerName}} {{ unit.customerName }}
</div> </div>
</div> </div>
</template> </template>
...@@ -49,90 +51,83 @@ ...@@ -49,90 +51,83 @@
</van-tabs> </van-tabs>
</div> </div>
</template> </template>
<script src="https://open.work.weixin.qq.com/wwopen/js/jwxwork-1.0.0.js"></script> <script src="https://open.work.weixin.qq.com/wwopen/js/jwxwork-1.0.0.js"></script>
<script> <script>
import ClipboardJS from 'clipboard' import ClipboardJS from 'clipboard'
import { getTypeList, setState } from '@/api/seas.js' import { getTypeList, setState } from '@/api/seas.js'
export default { export default {
name: 'highSeas-index', name: 'highSeas-index',
data () { data() {
return { return {
active: 0, active: 0,
query: { query: {
pageSize: 500, pageSize: 500,
pageNum: 1, pageNum: 1,
addState: 0, // 0:待添加;1:已添加;3:待通过 addState: 0, // 0:待添加;1:已添加;3:待通过
userId: '' userId: '',
}, },
list: [], list: [],
total: 0, total: 0,
total1: 0, total1: 0,
total2: 0, total2: 0,
list1: [], list1: [],
list2: [] list2: [],
}
},
watch: {
'$store.state.agentConfigStatus'(val) {
val && this.init()
} }
}, },
watch: {},
methods: { methods: {
init() { init() {
this.getData() this.getData()
this.getData1() this.getData1()
}, },
getData () { getData() {
let obj = { let obj = {
pageSize: 500, pageSize: 500,
pageNum: 1, pageNum: 1,
addState: 0, // 0:待添加;1:已添加;3:待通过 addState: 0, // 0:待添加;1:已添加;3:待通过
userId: this.userId userId: this.userId,
} }
getTypeList(obj).then(res => { getTypeList(obj).then((res) => {
this.total = res.total this.total = res.total
this.list = res.rows this.list = res.rows
}) })
}, },
getData1 () { getData1() {
let obj = { let obj = {
pageSize: 500, pageSize: 500,
pageNum: 1, pageNum: 1,
addState: 1, // 0:待添加;1:已添加;3:待通过 addState: 1, // 0:待添加;1:已添加;3:待通过
userId: this.userId userId: this.userId,
} }
getTypeList(obj).then(res => { getTypeList(obj).then((res) => {
this.total1 = res.total this.total1 = res.total
this.list1 = res.rows this.list1 = res.rows
}) })
}, },
getData2 () { getData2() {
let obj = { let obj = {
pageSize: 500, pageSize: 500,
pageNum: 1, pageNum: 1,
addState: 3, // 0:待添加;1:已添加;3:待通过 addState: 3, // 0:待添加;1:已添加;3:待通过
userId: this.userId userId: this.userId,
} }
getTypeList(obj).then(res => { getTypeList(obj).then((res) => {
this.total2 = res.total this.total2 = res.total
this.list3 = res.rows this.list3 = res.rows
}) })
}, },
setGoto (text) { setGoto(text) {
setState({ phone: text }).then(res => { setState({ phone: text }).then((res) => {
this.getData() this.getData()
this.getData1() this.getData1()
wx.invoke('navigateToAddCustomer', wx.invoke('navigateToAddCustomer', {}, function(res) {})
{},
function (res) {
});
}) })
}, },
copyFn (e, text) { copyFn(e, text) {
const clipboard = new ClipboardJS(e.target, { text: () => text }) const clipboard = new ClipboardJS(e.target, { text: () => text })
clipboard.on('success', e => { clipboard.on('success', (e) => {
this.setGoto(text) this.setGoto(text)
this.$toast({ type: 'success', message: '复制成功' }) this.$toast({ type: 'success', message: '复制成功' })
// 释放内存 // 释放内存
...@@ -140,7 +135,7 @@ ...@@ -140,7 +135,7 @@
clipboard.off('success') clipboard.off('success')
clipboard.destroy() clipboard.destroy()
}) })
clipboard.on('error', e => { clipboard.on('error', (e) => {
// 不支持复制 // 不支持复制
this.$toast({ type: 'fail', message: '该浏览器不支持自动复制', icon: 'none' }) this.$toast({ type: 'fail', message: '该浏览器不支持自动复制', icon: 'none' })
// 释放内存 // 释放内存
...@@ -149,36 +144,34 @@ ...@@ -149,36 +144,34 @@
clipboard.destroy() clipboard.destroy()
}) })
clipboard.onClick(e) clipboard.onClick(e)
}
}, },
mounted () { },
// this.init() mounted() {
this.init()
}, },
computed: { computed: {
userId() { userId() {
return this.$store.state.userId // 员工Id return this.$store.state.userId // 员工Id
}
}, },
created () { },
created() {},
} }
}
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.page { .page {
height: 100vh; height: 100vh;
background: #f6f6f6; background: #f6f6f6;
} }
.content { .content {
font-size: 15px; font-size: 15px;
font-weight: 500; font-weight: 500;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
line-height: 60px; line-height: 60px;
} }
/deep/ .van-button--info { /deep/ .van-button--info {
border: none; border: none;
} }
</style> </style>
<template> <template>
<div> <div>
<!-- 头部 -->
<div class="header"> <div class="header">
<span class="title"> 社群关系 </span> <span class="title"> 社群关系 </span>
<van-icon name="cross" color="#9c9c9c" size="16" @click="$router.back()" /> <van-icon name="cross" color="#9c9c9c" size="16" @click="$router.back()" />
</div> </div>
<van-divider />
<!-- 标签页 --> <!-- 标签页 -->
<div class="labelPge"> <div class="labelPge">
<van-tabs <van-tabs
v-model="active" v-model="active"
sticky
color="#2C8CF0" color="#2C8CF0"
line-width="50%"
line-height="1.4px" line-height="1.4px"
title-active-color="#2C8CF0" title-active-color="#2C8CF0"
> >
<van-tab :title="'添加的员工(' + staff.length + ')'"> <van-tab :title="'添加的员工(' + staff.length + ')'">
<van-list v-model="loading" :finished="finished" @load="onLoad"> <van-list>
<template v-if="staff.length"> <van-cell-group v-if="staff.length">
<van-cell v-for="(item, index) in staff" :key="index"> <van-cell v-for="(item, index) in staff" :key="index">
<div class="details"> <!-- <div class="li">
<div class="detail">
<div class="left">
<div class="img"> <div class="img">
<img :src="item.headImageUrl" alt="" /> <img :src="item.headImageUrl" alt="" />
</div> </div>
<div class="right"> </div> -->
<div> <div class="li">
<span>{{ item.userName }} &nbsp; &nbsp;</span> <div class="name">
<span>{{ item.userName }}</span>
</div> </div>
<div class="c9"> <div class="c9">
<span>添加时间:</span> <span>添加时间:</span>
<span>{{ getTime(item.createTime) }}</span> <span>{{ getTime(item.createTime) }}</span>
</div> </div>
</div> </div>
</div>
</div>
</div>
</van-cell> </van-cell>
</template> </van-cell-group>
<van-empty v-else image-size="50" description="暂无数据" /> <van-empty v-else image-size="50" description="暂无数据" />
</van-list> </van-list>
</van-tab> </van-tab>
<van-tab :title="'添加的群聊(' + groupChat.length + ')'"> <van-tab :title="'添加的群聊(' + groupChat.length + ')'">
<van-list v-model="loading" :finished="finished" @load="onLoad"> <div class="ar">
<template v-if="groupChat.length"> <div :class="commonActive && 'active'" class="common mar10" @click="conGroup">
<van-button 只看与我共同的群聊
size="mini"
:type="commonActive ? 'info' : 'default'"
class="ml20 mt10"
@click="conGroup"
>只看与我共同的群聊</van-button
>
<van-cell v-for="(item, index) in groupChat" :key="index">
<div class="details">
<div class="detail">
<div class="left">
<div class="img">
<img src="@/assets/avatar.jpg" alt="" />
</div> </div>
<div class="right"> </div>
<div> <van-list>
<van-cell-group v-if="groupChat.length">
<van-cell v-for="(item, index) in groupChat" :key="index">
<div class="li">
<div class="fxbw aic name">
<div class="">
{{ item.groupName + '(' + item.groupMemberNum + ')' }} {{ item.groupName + '(' + item.groupMemberNum + ')' }}
</div> </div>
<div class="common active" v-if="!item.commonGroup">
共同群聊
</div>
</div>
<div class="fxbw">
<div> <div>
<span class="c9">群主:</span> <span class="c9">群主:</span>
<span class="c9">{{ item.ownerName }}</span> <span class="c9">{{ item.ownerName }}</span>
...@@ -72,13 +64,8 @@ ...@@ -72,13 +64,8 @@
</div> </div>
</div> </div>
</div> </div>
<div class="groupchat2" v-if="!item.commonGroup">
共同群聊
</div>
</div>
</div>
</van-cell> </van-cell>
</template> </van-cell-group>
<van-empty v-else image-size="50" description="暂无数据" /> <van-empty v-else image-size="50" description="暂无数据" />
</van-list> </van-list>
</van-tab> </van-tab>
...@@ -89,27 +76,28 @@ ...@@ -89,27 +76,28 @@
<script> <script>
import { findAddaddEmployes, findAddGroupNum } from '@/api/portrait' import { findAddaddEmployes, findAddGroupNum } from '@/api/portrait'
import { dateFormat } from '@/utils'
export default { export default {
data() { data() {
return { return {
active: 0, active: 0,
// 添加员工 // 添加员工
list: [], list: [],
loading: false, // loading: false,
finished: false, // finished: false,
staff: [], // 添加的员工 staff: [], // 添加的员工
allGroup: [], // 添加的群聊 allGroup: [], // 添加的群聊
groupChat: [], // 添加的群聊 groupChat: [], // 添加的群聊
commonGroup: [], // 共同的群聊 commonGroup: [], // 共同的群聊
commonActive: false, commonActive: false,
// externalUserid: "wmiGuBCgAAIH-T9ekaE-Q52N2lKWeInw", // externalUserid: "wmiGuBCgAAIH-T9ekaE-Q52N2lKWeInw",
externalUserid: '' externalUserid: '',
} }
}, },
computed: { computed: {
userId() { userId() {
return this.$store.state.userId // 员工Id return this.$store.state.userId // 员工Id
} },
}, },
created() { created() {
this.externalUserid = this.$route.query.customerId this.externalUserid = this.$route.query.customerId
...@@ -120,44 +108,28 @@ export default { ...@@ -120,44 +108,28 @@ export default {
conGroup() { conGroup() {
this.commonActive = !this.commonActive this.commonActive = !this.commonActive
this.groupChat = this.commonActive ? this.commonGroup : this.allGroup this.groupChat = this.commonActive ? this.commonGroup : this.allGroup
// console.log(123);
},
onLoad() {
setTimeout(() => {
for (let i = 0; i < 2; i++) {
this.list.push(this.list.length + 1)
}
// 加载状态结束
this.loading = false
// 数据全部加载完成
if (this.list.length >= 2) {
this.finished = true
}
}, 1000)
}, },
findAddaddEmployes() { findAddaddEmployes() {
this.$toast.loading()
findAddaddEmployes(this.externalUserid) findAddaddEmployes(this.externalUserid)
.then(({ data }) => { .then(({ data }) => {
// console.log(data);
this.staff = data this.staff = data
}) })
.catch((err) => { .catch((err) => {
console.log(err) console.log(err)
}) })
.finally(() => {
this.$toast.clear()
})
}, },
findAddGroupNum() { findAddGroupNum() {
findAddGroupNum({ findAddGroupNum({
externalUserid: this.externalUserid, externalUserid: this.externalUserid,
userId: this.userId userId: this.userId,
}) })
.then(({ data }) => { .then(({ data }) => {
// console.log(data);
// debugger
this.groupChat = this.allGroup = data this.groupChat = this.allGroup = data
this.commonGroup = data.filter((ele) => { this.commonGroup = data.filter((ele) => {
// debugger
return ele.groupMemberNum == 1 return ele.groupMemberNum == 1
}) })
}) })
...@@ -165,35 +137,25 @@ export default { ...@@ -165,35 +137,25 @@ export default {
console.log(err) console.log(err)
}) })
}, },
// 时间处理器
getTime(data) { getTime(data) {
const date = new Date(data) return dateFormat(data, 'yyyy-MM-dd hh:mm')
// console.log(timer.getFullYear()); },
var Y = date.getFullYear() + '-' },
var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-'
var D = date.getDate() < 10 ? '0' + date.getDate() : date.getDate() + ' '
var h = (date.getHours() < 10 ? '0' + date.getHours() : date.getHours()) + ':'
var m = date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()
return Y + M + D + h + m
}
}
} }
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
/deep/body {
width: 100%;
height: 600px;
}
.labelPge { .labelPge {
width: 100%; width: 100%;
height: 100%; height: 100%;
// background-color: #f2f2f2; // background-color: #f2f2f2;
} }
.header { .header {
margin: 20px 20px 10px; padding: 20px 20px 10px;
vertical-align: center; vertical-align: center;
text-align: left; text-align: left;
background: #fff;
border-bottom: 1px solid #fafafa;
} }
.van-icon-cross { .van-icon-cross {
float: right; float: right;
...@@ -209,14 +171,17 @@ export default { ...@@ -209,14 +171,17 @@ export default {
.detail { .detail {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
.c9 {
color: #9c9c9c;
font-size: 12px;
}
} }
.left { .van-cell {
display: flex; padding: 16px 16px 13px;
margin-bottom: 20px; }
.li {
.name {
color: #222;
font-size: 14px;
font-weight: 500;
margin-bottom: 8px;
}
.img { .img {
width: 50px; width: 50px;
height: 50px; height: 50px;
...@@ -225,24 +190,24 @@ export default { ...@@ -225,24 +190,24 @@ export default {
border-radius: 25px; border-radius: 25px;
vertical-align: bottom; vertical-align: bottom;
} }
.right { .c9 {
display: flex; color: #9c9c9c;
flex-direction: column; font-size: 12px;
justify-content: space-between;
} }
} }
// 添加的群聊 // 添加的群聊
.common {
.groupchat2 { display: inline-block;
width: 60px; min-width: 57px;
height: 20px; font-size: 10px;
font-size: 12px; padding: 4px 10px 3px;
background-color: #9fc9f7; border-radius: 8px;
border-radius: 5px; background: #eee;
text-align: center; text-align: center;
line-height: 20px; line-height: 22px;
margin: 10px 0px; }
color: #2c8cf0; .active {
border: 1px solid #2c8cf0; color: @color;
background: #ecf5ff;
} }
</style> </style>
<template>
<div>
<!-- 头部 -->
<div class="header">
<div style="display:inline-flex;align-items: center;">
<van-icon name="arrow-left" color="#9c9c9c" size="16" @click="$router.back()" />
<span class="title ml5">客户资料</span>
</div>
<div class="data" v-if="flage" @click="edit">编辑</div>
<div class="data" v-else @click="saveUserInformation">保存</div>
</div>
<van-divider />
<!-- 详细资料 -->
<van-form @submit="saveUserInformation" :disabled="flage">
<div class="details">
<div class="detail">
<div class="left">
<div class="img"><img :src="form.avatar" alt="" /></div>
<div class="right">
<div>
<p>
{{ user.name || '' }}
</p>
<div class="flex aic">
<van-icon
name="manager"
:class="['gender', { 1: 'man', 2: 'woman' }[form.gender]]"
></van-icon>
<span
:style="{
color: form.customerType === 1 ? '#4bde03' : '#f9a90b',
'font-size': '12px'
}"
>
{{ { 1: '@微信', 2: '@企业微信' }[form.customerType] }}
</span>
</div>
<!-- <span class="icon iconfont icon-man" v-if="user.gender == 1"> </span>
<span class="icon iconfont icon-xingbie" v-else-if="user.gender == 2"></span>
<van-icon name="manager" color="#9c9c9c" v-else /> -->
</div>
<!-- <div class="c9">
<span>昵称:</span><span>{{ user.name }}</span>
</div> -->
</div>
</div>
</div>
</div>
<van-field
v-model="form.remarkMobiles"
name="手机号"
label="手机号"
placeholder="手机号"
input-align="right"
/>
<van-field
v-if="flage"
v-model="form.age"
name="年龄"
label="年龄"
placeholder="年龄"
input-align="right"
disabled
/>
<van-field
v-model="form.birthday"
name="生日"
label="生日"
placeholder="生日"
input-align="right"
@click="!flage ? (show = true) : ''"
/>
<van-popup v-model="show" position="bottom" round :style="{ height: '60%' }">
<van-datetime-picker
v-model="currentDate"
type="date"
title="选择年月日"
:min-date="minDate"
:max-date="maxDate"
@confirm="confirm"
@cancel="cancel"
/></van-popup>
<!-- -------------------------- -->
<van-field
v-model="form.email"
name="邮箱"
label="邮箱"
placeholder="邮箱"
input-align="right"
/>
<van-field
v-model="form.address"
name="地址"
label="地址"
placeholder="地址"
input-align="right"
/>
<van-field v-model="form.qq" name="QQ" label="QQ" placeholder="QQ" input-align="right" />
<van-field
v-model="form.position"
name="职业"
label="职业"
placeholder="职业"
input-align="right"
/>
<van-field
v-model="form.remarkCorpName"
name="公司"
label="公司"
placeholder="公司"
input-align="right"
/>
<van-field
v-model="form.description"
name="其他描述"
label="其他描述"
placeholder="其他描述"
input-align="left"
type="textarea"
class="others"
/>
</van-form>
</div>
</template>
<script>
import { getCustomerInfo, getWeCustomerInfo } from '@/api/portrait'
export default {
data() {
return {
flage: true,
// 选择生日
show: false,
minDate: new Date(1940, 0, 1),
maxDate: new Date(),
currentDate: new Date(2000, 0, 17),
// 接口开始
// 表单数据
user: {},
form: {
externalUserid: '', // 客户Id
userId: '', // 员工Id
name: '', // 昵称
remarkMobiles: '', // 手机号
birthday: '', // 客户生日
age: '', // 年龄
email: '', // 邮箱
address: '', // 地址
qq: '', // qq
position: '', // 职业
remarkCorpName: '', // 公司
description: '' // 其他描述
}
}
},
computed: {
userId() {
return this.$store.state.userId // 员工Id
}
},
created() {
this.form.externalUserid = this.$route.query.customerId
// 获取客户详细信息
getCustomerInfo({
externalUserid: this.form.externalUserid,
userId: this.userId
})
.then(({ data }) => {
this.form = data
this.user = Object.assign({}, data)
})
.catch((err) => {
console.log(err)
})
},
methods: {
// 选择生日
confirm(val) {
this.show = false
this.form.birthday = this.getTime(val)
console.log(val)
},
cancel() {
this.show = false
},
edit() {
this.flage = !this.flage
},
// 时间处理器
getTime(data) {
const date = new Date(data)
// console.log(timer.getFullYear());
var Y = date.getFullYear() + '-'
var M = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1) + '-'
var D = date.getDate() < 10 ? '0' + date.getDate() : date.getDate() + ' '
// var h =
// (date.getHours() < 10 ? '0' + date.getHours() : date.getHours()) + ':'
// var m =
// date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes()
return Y + M + D
},
// 点击保存按钮提交表单
saveUserInformation() {
this.$toast.loading({
message: 'loading...',
duration: 0,
forbidClick: true
})
this.flage = !this.flage
this.form.userId = this.userId
getWeCustomerInfo(this.form)
.then((data) => {
this.$toast('操作成功')
})
.catch((err) => {
console.log(err)
})
}
}
}
</script>
<style lang="less" scoped>
.gender {
color: #9c9c9c;
}
.man {
color: #2c8cf0;
}
.woman {
color: pink;
}
.header {
margin: 20px 10px 10px;
vertical-align: center;
// text-align: center;
}
.van-icon-cross {
position: absolute;
left: 10px;
}
.title {
text-align: center;
font-size: 14px;
vertical-align: middle;
}
// 详细资料
.details {
margin: 10px 16px;
}
.detail {
display: flex;
justify-content: space-between;
.c9 {
color: #c8c9cc;
}
}
.left {
display: flex;
margin-bottom: 20px;
.img {
width: 40px;
height: 40px;
background-color: #f2f2f2;
margin-right: 10px;
}
.right {
display: flex;
flex-direction: column;
justify-content: space-between;
}
}
.data {
font-size: 12px;
color: #5fa7f3;
float: right;
}
.divider {
width: 100%;
height: 10px;
background-color: #f2f2f2;
}
/deep/.others {
line-height: 40px;
flex-direction: column;
.van-field__control--left {
float: left;
line-height: 20px;
.textarea {
margin-top: 20px;
}
}
}
</style>
No preview for this file type
No preview for this file type

41.7 KB | W: | H:

2.51 KB | W: | H:

linkwe-pc/src/assets/image/profile.jpg
linkwe-pc/src/assets/image/profile.jpg
linkwe-pc/src/assets/image/profile.jpg
linkwe-pc/src/assets/image/profile.jpg
  • 2-up
  • Swipe
  • Onion skin
This diff could not be displayed because it is too large.
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!