Commit e5167d02 by xinla

v4.0开源

1 parent 44e0e3e2
Showing 397 changed files with 0 additions and 5024 deletions
.DS_Store
node_modules
/saas
# local env files
.env.local
.env.*.local
# Log files
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
# link-wechat-mobile
## Project setup
```
npm install
```
### Compiles and hot-reloads for development
```
npm run serve
```
### Compiles and minifies for production
```
npm run build
```
### Lints and fixes files
```
npm run lint
```
### Customize configuration
See [Configuration Reference](https://cli.vuejs.org/config/).
module.exports = {
presets: ["@vue/cli-plugin-babel/preset"]
};
const envs = {
development: {
BASE_URL: '/', // 路由基础路径
BASE_API: 'https://demo.linkwechat.net/saas-dev-api',
},
test: {
BASE_URL: '/mobile/', // 路由基础路径
BASE_API: 'https://demo.linkwechat.net/linkwechat-api',
},
production: {
BASE_URL: '/mobile/', // 路由基础路径
BASE_API: 'https://demo.linkwechat.net/linkwechat-api',
},
}
let env = envs[process.env.VUE_APP_ENV]
module.exports = env
{
"compilerOptions": {
"baseUrl": "./",
"paths": {
"@/*": ["src/*"]
}
},
// "include": ["src/**/*"],
"exclude": ["node_modules", "dist"]
}
This diff could not be displayed because it is too large.
{
"name": "link-wechat-mobile",
"version": "0.1.0",
"description": "LinkWeChat mobile",
"license": "GPL-3.0",
"scripts": {
"serve": "vue-cli-service serve",
"develop": "vue-cli-service build --ENV=development",
"build": "vue-cli-service build",
"test": "vue-cli-service build --ENV=test",
"lint": "vue-cli-service lint"
},
"dependencies": {
"axios": "^0.21.1",
"clipboard": "^2.0.8",
"core-js": "^3.6.5",
"normalize.css": "^8.0.1",
"vant": "^2.12.2",
"vconsole": "^3.9.1",
"vue": "^2.6.11",
"vue-router": "^3.2.0",
"vuex": "^3.4.0"
},
"devDependencies": {
"@vue/cli-plugin-babel": "~4.5.0",
"@vue/cli-plugin-eslint": "~4.5.0",
"@vue/cli-plugin-router": "~4.5.0",
"@vue/cli-plugin-vuex": "~4.5.0",
"@vue/cli-service": "~4.5.0",
"@vue/eslint-config-prettier": "^6.0.0",
"babel-eslint": "^10.1.0",
"eslint": "^6.7.2",
"eslint-plugin-prettier": "^3.1.3",
"eslint-plugin-vue": "^6.2.2",
"html-webpack-plugin": "^4.5.1",
"less": "^3.0.4",
"less-loader": "^5.0.0",
"prettier": "^1.19.1",
"script-ext-html-webpack-plugin": "^2.1.5",
"style-resources-loader": "^1.3.2",
"svg-sprite-loader": "^6.0.11",
"vue-cli-plugin-style-resources-loader": "~0.1.4",
"vue-template-compiler": "^2.6.11"
},
"eslintConfig": {
"root": true,
"env": {
"node": true
},
"extends": [
"plugin:vue/essential",
"eslint:recommended",
"@vue/prettier"
],
"parserOptions": {
"parser": "babel-eslint"
},
"rules": {}
},
"browserslist": [
"> 1%",
"last 2 versions",
"not dead"
]
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="renderer" content="webkit">
<meta name="viewport"
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>
<script src="https://hm.baidu.com/hm.js?8f5214f3a0f80a33eb32a0f890167cc1"></script>
<script src="./static/config.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>
</head>
<body>
<noscript>
<strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled.
Please enable it to continue.</strong>
</noscript>
<div id="app"></div>
<!-- built files will be auto injected -->
</body>
</html>
\ No newline at end of file
// 用于无打包配置,会覆盖系统相关配置
window.lwConfig = {
// BASE_URL: '/', // 路由基础路径
// BASE_API: 'http://demo.linkwechat.cn/prod-api',
// IS_VCONSOLE: true,
}
<script>
export default {
name: 'App',
provide() {
return {
reload: this.reload,
}
},
data() {
return {}
},
created() {},
methods: {
reload() {
this.$store.state.reload = false
this.$nextTick(() => {
this.$store.state.reload = true
})
},
},
}
</script>
<template>
<div id="app">
<router-view class="page" v-if="$store.state.reload" />
</div>
</template>
<style lang="less">
.page {
height: 100vh;
background: #fafafa;
overflow: auto;
}
</style>
import request from '@/utils/request'
const wecom = window.lwConfig.services.wecom
const service = wecom + '/chat'
const serviceMaterial = wecom + '/material'
/**
* 侧边栏列表
* @param {*} params
*/
export function getTypeList() {
return request({
url: service + '/side/h5List',
})
}
/**
* 素材列表
* @param {*} sideId
*/
export function getMaterialList(params) {
return request({
url: service + '/item/list',
params,
})
}
/**
* 收藏列表(h5我的)
* @param {*} userId
*/
export function getCollectionList(params) {
return request({
url: service + '/collection/list',
params,
})
}
/**
* 添加收藏
* @param {*} data
* {
materialId:素材id
userId:用户id
}
*/
export function addCollection(data) {
return request({
url: service + '/collection/addCollection',
method: 'post',
// headers: {
// 'Content-Type': 'application/x-www-form-urlencoded',
// },
data,
})
}
/**
* 取消收藏
* @param {*} data
* {
materialId:素材id
userId:用户id
}
*/
export function cancleCollection(data) {
return request({
url: service + '/collection/cancleCollection',
method: 'post',
data,
})
}
/**
* 获取企业微信素材media_id
* @param {*} params
* url [string] 是 素材路径
type [string] 是 素材类型
name [string] 是 文件名称
*/
export function getMaterialMediaId(params) {
return request({
url: serviceMaterial + '/temporaryMaterialMediaId',
params,
})
}
import request from '@/utils/request'
const service = window.lwConfig.services.wecom
const weChat = window.lwConfig.services.weChat
/**
* 获取应用的jsapi_ticket
* @param {*} url 页面url
*/
export function getAgentTicket (url) {
return request({
url: service + '/ticket/getAgentTicket',
params: {
url,
appType: 1,
},
})
}
export function getWxTicket (data) {
return request({
url: weChat + '/ticket/getWxTicket',
params: {
url: data,
},
})
}
// /**
// * 获取企业的jsapi_ticket
// * @param {*} url 页面url
// */
// export function getAppTicket(url) {
// return request({
// url: service + '/ticket/getAppTicket',
// params: {
// url,
// appType: 1,
// },
// })
// }
/**
* 企业微信端登录 / 获取token接口
* @param {*} auth_code
*/
export function login (auth_code) {
return request({
url: '/auth/linkLogin',
method: 'get',
params: {
auth_code,
},
})
}
/**
* 企微端获取登录用户信息
*/
export function getUserInfo () {
return request({
url: '/system/user/getInfo',
})
}
/**
* 获取微信授权链接
* @param {*} redirectUrl 回调跳转地址
* @returns
*/
export function getWxRedirect (redirectUrl = location.href) {
return request({
url: '/auth/wxRedirect',
method: 'get',
params: {
redirectUrl,
},
})
}
/**
* 获取企业授权链接
* @param {*} redirectUrl 回调跳转地址
* @returns
*/
export function getWcRedirect (redirectUrl = location.href) {
return request({
url: '/auth/wcRedirect',
method: 'get',
params: {
redirectUrl,
},
})
}
/**
* 微信获取token接口
* @param {*} code 是 code码 必填
* @param {*} openId 否 微信用户ID 非必填
* @returns
*/
export function wxLogin (code, openId) {
return request({
url: '/auth/wxLogin',
method: 'get',
params: {
code,
openId,
},
})
}
/**
* 获取微信授权用户信息
* @param {*} openId
*/
export function getWechatUserInfo () {
return request({
url: `/system/user/getWxInfo`,
})
}
/**
* 行政区划
* @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'
const wecom = window.lwConfig.services.wecom
const service = wecom + '/community/h5'
/**
* 获取用户相关的所有任务
* @param {*} userId 用户ID
* @param {*} taskType 0: 全部 1: 老客标签建群 2: 群SOP
* @returns
*/
export function getTasks(userId, taskType) {
return request({
url: service + '/' + userId,
params: {
type: taskType,
},
})
}
/**
* 获取任务相关员工及完成情况
* @param {*} taskId 任务ID
* @param {*} taskType 1: 老客标签建群 2: 群SOP
* @returns
*/
export function getState(taskId, taskType) {
return request({
url: service + '/scope/' + taskId,
params: {
type: taskType,
},
})
}
/**
* 更新任务状态
* @param {*} userId 用户ID
* @param {*} taskId 任务ID
* @param {*} taskType 0: 老客标签建群 1: 群SOP
* @returns
*/
export function changeStatus(userId, taskId, taskType) {
return request({
url: service + '/changeStatus',
params: {
emplId: userId,
taskId: taskId,
type: taskType,
},
})
}
/**
* 获取用户相关的所有关键词任务任务
* @param {*} word 搜索的关键词或活码名称
* @returns
*/
export function getKeywordTasks(word) {
return request({
url: service + '/filter',
params: {
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'
const wecom = window.lwConfig.services.wecom
const service = wecom + '/groupCode'
// 通过群活码UUID获取群活码详情及可用的实际群码
export function getDetail (uuid) {
return request({
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
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'
const wecom = window.lwConfig.services.wecom
const service = wecom + '/portrait'
// 客户画像
// 根据客户id和当前企业员工id获取客户详细信息
export function getCustomerInfo(params) {
return request({
url: service + '/findWeCustomerInfo',
params,
})
}
// 客户画像资料更新
export function updateWeCustomerInfo(data) {
return request({
url: service + '/updateWeCustomerInfo',
method: 'post',
data: {
externalUserid: data.externalUserid, // 客户Id
userId: data.userId, // 员工Id
remarkMobiles: data.remarkMobiles, // 手机号
birthday: data.birthday, // 客户生日
email: data.email, // 邮箱
address: data.address, // 地址
qq: data.qq, // qq
position: data.position, // 职业
remarkCorpName: data.remarkCorpName, // 公司
provinceId: data.provinceId, // 省
cityId: data.cityId, // 市
areaId: data.areaId, // 区
area: data.area, // 区
},
})
}
//
/**
* 获取当前系统所有可用标签
* @param {*} params
* groupTagType 是 1:企业客户标签;3:个人标签
userId 员工的id 当groupTagType为3的时候需要传该字段
* @returns
*/
export function getAllTags(params) {
return request({
url: service + '/findAllTags',
params,
})
}
//
/**
* 更新客户画像标签
* @param {*} data
* {
"externalUserid": "wmiGuBCgAApTcSW-3caqljFmKhm0r-bQ",//客户id
"userId": "ShengXiYong",//当前员工id
"isCompanyTag": false,//是否是企业标签true是;false:不是
"addTag": [
{
"tagId": "1471332704915922947"//标签id
}
]
}
* @returns
*/
export function updateWeCustomerPorTraitTag(data) {
return request({
url: service + '/updateWeCustomerPorTraitTag',
method: 'post',
data,
})
}
// 查看客户添加的员工
export function findAddaddEmployes(params) {
return request({
url: service + '/findAddaddEmployes/' + params,
})
}
// 获取用户添加的群
export function findAddGroupNum(params) {
return request({
url: service + '/findAddGroupNum',
params,
})
}
// 获取轨迹信息
/**
*
* @param {*}
{
pageNum:
pageSize:
trajectoryType: 轨迹类型(1:客户动态;2:员工动态;3:互动动态;4:跟进动态)
userId: 员工的id
externalUserid: 客户id
}
* @returns
*/
export function findTrajectory(params) {
return request({
url: wecom + '/trajectory/findTrajectory',
params,
})
}
/**
* 编辑跟进动态
* @param {*} data
* {
"externalUserid":"客户id",
"trackState":1,//1:待跟进;2:跟进中;3:已成交;4:无意向;5:已流失
"content":"根据内容",
"userId":"员工id"
}
* @returns
*/
export function addOrEditWaitHandle(data) {
return request({
url: service + '/addOrEditWaitHandle',
method: 'post',
data,
})
}
// 删除轨迹
export function removeTrajectory(params) {
return request({
url: service + '/removeTrajectory/' + params,
method: 'delete',
})
}
// 完成待办
export function handleWait(params) {
return request({
url: service + '/handleWait/' + params,
method: 'delete',
})
}
/**
* 客户画像个人标签新增或更新
* @param {*} params
{
"weTags": [
{
"name": "个人标签4",//标签名
"tagId": "1471327409208647681",//标签id,新增不存在则不传,更新则传
"owner":"shengxiyong"//标签所属人id
}
]
}
* @returns
*/
export function addOrUpdatePersonTags(data) {
return request({
url: service + '/addOrUpdatePersonTags',
method: 'post',
data,
})
}
/**
* 删除个人标签
* @ids {*} ids 标签id,多个用逗号隔开
* @returns
*/
export function deletePersonTag(ids) {
return request({
url: service + '/deletePersonTag/' + ids,
method: 'delete',
})
}
/**
* 同步轨迹动态
* @param {*} userId
* @returns
*/
export function sync(userId) {
return request({
url: service + '/synchMomentsInteracte/' + userId,
method: 'get',
})
}
import request from '@/utils/request'
const wecom = window.lwConfig.services.wecom
const service = wecom + '/RedEnvelopes'
/**
* 获取企业红包模版列表
* @param {*} sceneType 1:客户 2:客群
* @returns
*/
export function getList(sceneType) {
return request({
url: service + '/findCompanyRedEnvelopes',
params: {
sceneType,
},
})
}
/**
* 为客户发送个人红包
* @param {*} data
* {
"redEnvelopeAmount": "2.00",
"redEnvelopeName": "个人客户红包",
"sendUserId": "45DuXiangShangQingXie",
"externalUserId": "wmiGuBCgAA-3Xa7nUo7-8q492q0nmZ5A"
}
* @returns
*/
export function sendCustomerPersonalRedPacket(data) {
return request({
url: service + '/sendReEnvelopesToCustomer',
method: 'post',
data: data,
})
}
/**
* 为客户发送企业红包
* @param {*} data
{
"redenvelopesId": "1494182309006471169",
"sendUserId": "45DuXiangShangQingXie",
"externalUserId": "wmiGuBCgAA-3Xa7nUo7-8q492q0nmZ5A"
}
* @returns
*/
export function sendCustomerEnterpriseRedPacket(data) {
return request({
url: service + '/sendCompanyEnvelopesToCustomer',
method: 'post',
data: data,
})
}
/**
* 为客户群发送个人红包
* @param {*} data
{
"redEnvelopeAmount": "28", // 红包金额
"redEnvelopeName": "队起单元", // 红包名
"redEnvelopeNum": 45, // 红包数量
"sendUserId": "31", // 发送人id
"redEnvelopesType":1, // 2, 红包类型 1: 普通红包 2:拼手气红包
"chatId": "59" // 群id
}
* @returns
*/
export function sendCustomerGroupPersonalRedPacket(data) {
return request({
url: service + '/sendPersonReEnvelopesToGroup',
method: 'post',
data: data,
})
}
/**
* 为客户群发送企业红包
* @param {*} data
{
"redenvelopesId": "1494182309006471169", // 红包id
"redEnvelopeNum": 17,
"chatId": "88",
"sendUserId": "76",
"redEnvelopesType": 25
}
* @returns
*/
export function sendCustomerGroupEnterpriseRedPacket(data) {
return request({
url: service + '/sendCompanyEnvelopesToGroup',
method: 'post',
data: data,
})
}
/**
* 获取红包封面信息 (公司名,logo)
* @returns
*/
export function getRedPacketInfo() {
return request({
url: service + '/findRedEnvelopesInfo',
})
}
/**
* 红包领取接口
* @param {*} params
{
"orderNo": "1494182309006471169", // 订单id
"openId": 17, // 客户公众号id
"appId": "88", // 微信公众号id
"externalUserid": "76", // 客户企微id
}
* @returns
*/
export function receiveRedPacket(params) {
return request({
url: service + '/receiveRedEnvelopes',
params,
})
}
/**
* 校验客户是否已领取过红包
* @param {*}
{
"orderNo": "1494182309006471169", // 订单id
"openId": "76", // 客户公众号id
}
* @returns 返回true的时候客户已领取过红包,false客户未领取红包
*/
export function getReceiveStatus(params) {
return request({
url: service + '/checkRecevieRedEnvelopes',
params,
})
}
/**
* 红包领取列表
* @param {*}
{
"orderNo": "1494182309006471169", // 订单id
"openId": "76", // 客户公众号id
"appld": 17, // 微信公众号id
receiveName: 领取人姓名
avalar: 领取人头像
"chatId": 17, // 群id
}
* @returns
*/
export function getReceiveList(params) {
return request({
url: service + '/receiveRedEnvelopesLists',
params,
})
}
import request from '@/utils/request'
const service = window.lwConfig.services.wecom + '/seas'
export function getTypeList(data) {
return request({
url: service + '/findEmployeeCustomer',
params: data,
})
}
export function setState(data) {
return request({
url: service + '/setState',
method: 'post',
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')
}
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
<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
<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
<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
<?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
<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
<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
# 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'
No preview for this file type
<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
<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
<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
<template>
<div>
<van-pull-refresh v-model="refreshing" success-text="刷新成功" @refresh="getList(1)">
<van-list
v-model="loading"
:finished="finished"
:finished-text="finishedText"
:error.sync="error"
error-text="请求失败,点击重新加载"
@load="getList()"
>
<van-cell v-for="(item, index) in list" :key="index">
<!-- 时间 -->
<p class="f12" style="position:relative; ">
{{ dateFormat(item[0].createTime, 'yyyy-MM-dd w') }}
<!-- {{item1.trajectoryType}} -->
</p>
<!-- <van-cell> -->
<van-steps
direction="vertical"
:inactive-color="color"
:active-color="color"
:active="item.length"
>
<van-step class="msg" v-for="(item1, index) in item" :key="index">
<span class="f12 po"> {{ dateFormat(item1.createTime, 'hh:mm') }}</span>
<span class="fs14">{{ item1.title }}</span>
<!-- <span class="finish-box">
<span
class="finish"
v-if="item1.trajectoryType == 4 && item1.status != 3"
@click="finDynamic(item1.id)"
>
完成
</span>
<span class="deldynamic" @click="delDynamic(item1.id)">删除</span>
</span> -->
<p class="fs14 con ">{{ item1.content }}</p>
</van-step>
<!-- <van-step>
<span class="f12 po"> 12:40</span>
<span class="fs14">社交动态</span>
<span class="deldynamic">删除</span>
<p class="fs14 con ">编辑编辑</p>
</van-step> -->
</van-steps>
</van-cell>
</van-list>
</van-pull-refresh>
</div>
</template>
<script>
import { color } from '@/styles/varibles.less'
// import { removeTrajectory, handleWait } from '@/api/portrait'
import { dateFormat } from '@/utils'
export default {
props: {
load: Function,
},
data() {
return {
query: {
pageNum: 1,
pageSize: 10,
},
content: '',
type: 0,
// 轨迹外层按时间
list: [],
loading: false,
finished: false,
refreshing: false,
dateFormat,
color,
}
},
watch: {},
methods: {
getList(page) {
this.loading = true
this.finished = false
page && (this.query.pageNum = page)
if (this.query.pageNum == 1) {
this.list = []
}
if (this.refreshing) {
this.list = []
this.refreshing = false
}
this.load(this.query)
.then(({ rows, total }) => {
rows = rows || []
let dayList = []
rows.forEach((ele) => {
let date = dateFormat(ele.createTime, 'yyyyMMdd')
dayList.includes(date) || dayList.push(date)
})
dayList.sort((a, b) => b - a)
for (let i = 0; i < dayList.length; i++) {
let timeList = []
for (let j = 0; j < rows.length; j++) {
// console.log(rows[j].createTime);
if (dayList[i] == dateFormat(rows[j].createTime, 'yyyyMMdd')) {
timeList.push(rows[j])
}
}
this.list.push(timeList)
}
this.loading = false
this.refreshing = false
// 判断加载状态
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++
}
// 数据全部加载完成
// if (this.list.length >= +total) {
// if (this.list.length == 0) {
// this.query.pageNum = 1
// this.finishedText = '暂无数据'
// } else {
// this.finishedText = '没有更多了'
// }
// this.finished = true
// } else {
// this.query.pageNum++
// }
})
.catch((error) => {
this.loading = false
this.finished = true
this.error = true
alert(error)
})
},
// 删除轨迹
// delDynamic(id) {
// this.$dialog
// .confirm({
// title: '警告',
// message: '确定要删除吗?'
// })
// .then(() => {
// return removeTrajectory(id)
// })
// .then((data) => {
// this.$toast.success('删除成功')
// // 重新获取全部数据
// this.$emit('reload')
// })
// .catch(() => {
// // on cancel
// })
// },
// 点击完成
// finDynamic(id) {
// handleWait(id)
// .then((data) => {
// this.$emit('reload')
// })
// .catch((err) => {
// console.log(err)
// })
// }
},
}
</script>
<style lang="less" scoped>
.f12 {
color: #9c9c9c;
font-size: 12px;
font-weight: 600;
}
/deep/.msg {
&::after {
border: none;
}
.po {
position: relative;
}
}
.fs14 {
color: #333;
font-size: 14px;
position: relative;
margin-left: 20px;
}
.con {
margin-left: 51px;
margin-top: 20px;
color: #666;
}
/deep/.van-step__circle {
width: 8px;
height: 8px;
margin-left: 110px;
}
/deep/.van-step__line {
margin-left: 54px;
width: 2px;
transform: scaleX(0.5);
}
.van-step--vertical:not(:last-child)::after {
border-width: 1px;
}
</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
import env from '../env'
// 系统常量
const common = {
SYSTEM_NAME: '仟微助手',
// SYSTEM_NAME_ALL: '仟微科技 企业微信SCRM',
// COMPANY_NAME: '仟微科技',
// COMPANY_NAME_ALL: '仟微科技',
// COPYRIGHT: 'Copyright © 2018-2022 LinkWeChat All Rights Reserved.',
// LOGO_DARK: env.BASE_URL + 'static/LOGO_DARK.png',
// LOGO_LIGHT: env.BASE_URL + 'static/LOGO_LIGHT.png',
// LOGO_TEXT_DARK: env.BASE_URL + 'static/LOGO_TEXT_DARK.png',
// LOGO_TEXT_LIGHT: env.BASE_URL + 'static/LOGO_TEXT_LIGHT.png',
// QRCODE_CONTACT_US: env.BASE_URL + 'static/QRCODE_CONTACT_US.png',
// QRCODE_CUSTOMER_SERVICE: env.BASE_URL + 'static/QRCODE_CUSTOMER_SERVICE.png',
// IS_PUBLISH_DIALOG: true, // 是否显示发布弹窗
TOKEN: '',
IS_VCONSOLE: process.env.VUE_APP_ENV !== 'production', // 是否显示VCONSOLE
}
let config = {
// cookieExpires: 1, //token在Cookie中存储的天数,默认1天
services: {
wecom: '/open',
weChat: '/wx-api',
},
}
window.lwConfig = Object.assign(env, common, window.lwConfig || {}, config)
document.title = window.lwConfig.SYSTEM_NAME
import Vue from 'vue'
import '@/assets/icons' // icon
import 'normalize.css/normalize.css'
import Vant, { Dialog, Toast } from 'vant'
import 'vant/lib/index.less'
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 './config'
import { stringifyError } from '@/utils/index'
stringifyError()
import App from './App.vue'
import router from './router'
import store from './store'
import VConsole from 'vconsole'
window.lwConfig.IS_VCONSOLE && new VConsole()
Vue.config.productionTip = false
new Vue({
router,
store,
render: (h) => h(App),
}).$mount('#app')
import Vue from 'vue'
import VueRouter from 'vue-router'
import Home from '../views/Home.vue'
import { getAgentTicket } from '@/api/common'
import store from '@/store'
import { Toast } from 'vant'
Vue.use(VueRouter)
let noAuth = process.env.NODE_ENV === 'development'
const routes = [
{
path: '/',
name: 'Home',
component: Home,
meta: {
title: '首页',
noAuth: true,
},
},
// 聊天素材
{
path: '/chat',
name: 'chat',
component: () => import('../views/chat'),
meta: {
title: '聊天素材',
},
},
// 用户画像
{
path: '/portrait',
name: 'portrait',
component: () => import('../views/portrait/index'),
meta: {
title: '客户画像',
noAuth,
},
},
// 用户画像-社群关系
{
path: '/community',
name: 'community',
component: () => import('../views/portrait/community.vue'),
hidden: true,
meta: {
title: '社群关系',
noAuth,
},
},
// 客群画像
{
path: '/portraitGroup',
name: 'portraitGroup',
component: () => import('../views/portraitGroup/index.vue'),
hidden: true,
meta: {
title: '客群画像',
noAuth,
},
},
{
path: '/groupMembers',
name: 'groupMembers',
component: () => import('../views/portraitGroup/members.vue'),
hidden: true,
meta: {
title: '群成员',
noAuth,
},
},
// 群活码扫描跳转页面
{
path: '/groupCode',
name: 'groupCode',
component: () => import('../views/groupCode/index'),
hidden: true,
meta: {
title: '',
noAuth: true,
},
},
// 标签建群+群sop
{
path: '/task',
hidden: true,
meta: {
title: '消息群发',
noAuth: true,
},
component: () => import('../views/communityOperating/task/index'),
children: [
{
path: '',
component: () => import('../views/communityOperating/task/list'),
hidden: true,
meta: {
title: '消息群发',
// noAuth: true
},
},
{
path: 'state',
name: 'taskState',
component: () => import('../views/communityOperating/task/state.vue'),
hidden: true,
meta: {
title: '消息群发',
noAuth: true,
},
},
],
},
// 关键词群
{
path: '/keywords',
name: 'keywords',
component: () => import('../views/communityOperating/keywords/index'),
hidden: true,
meta: {
title: '关键词群',
},
},
// 客户公海
{
path: '/highSeas',
name: 'highSeas',
component: () => import('../views/highSeas/index'),
meta: {
title: '公海分配',
},
},
// 红包
{
path: '/redPacket',
name: 'redPacket',
component: () => import('../views/redPacket/index'),
meta: {
title: '红包',
},
},
// 领取红包
{
path: '/redPacketReceive',
name: 'redPacketReceive',
component: () => import('../views/redPacket/receive'),
meta: {
title: '领取红包',
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({
// mode: 'history', window.lwConfig
base: window.lwConfig.BASE_URL,
routes,
})
let init = true
router.beforeEach(async (to, from, next) => {
Toast.clear()
/* 路由发生变化修改页面title */
if (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')
await wxConfig()
init = false
Toast.clear()
}
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
import Vue from 'vue'
import Vuex from 'vuex'
import router from '@/router/index'
import { getUserInfo, login, getWcRedirect } from '@/api/common'
import { param2Obj, getQueryValue } from '@/utils/index'
Vue.use(Vuex)
let count = 0
export default new Vuex.Store({
state: {
userId: sessionStorage.userId,
reload: true,
},
mutations: {
userId(state, userId) {
state.userId = userId
},
reload(state, reload) {
state.reload = false
setTimeout(() => {
state.reload = true
}, 0)
},
},
actions: {
// 企业微信端授权登录
async login({ commit }) {
//取缓存中的用户信息
if (!sessionStorage.token) {
// 解决授权重定向返回问题
let indexRoute = router.getRoutes().find((e) => e.path == '')
indexRoute && (indexRoute.redirect = window.location.hash.slice(1))
//缓存中没有用户信息,进入授权流程
let code = getQueryValue('code') //是否存在code
if (!code) {
count++
let url = (await getWcRedirect()).data
window.location.replace(url)
return Promise.reject()
}
// 第三方授权重定向回来手动刷新页面
if (code && count === 1) {
commit('reload')
}
if (code) {
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
dataUser.user.userId && sessionStorage.setItem('sysId', dataUser.user.userId) // 当前系统的userId
commit('userId', sessionStorage.userId)
corpInfo.appId && sessionStorage.setItem('appId', corpInfo.appId) // 微信公众号appid
sessionStorage.setItem('corpId', corpInfo.corpId) // 企业id
sessionStorage.setItem('agentId', corpInfo.agentId) // 自建应用agentId
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()
}
}
},
},
modules: {},
})
@charset "utf-8";
* {
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
/**,*:before,*:after{-moz-box-sizing: border-box;-webkit-box-sizing: border-box;box-sizing: border-box;-webkit-tap-highlight-color: rgba(0,0,0,0);-webkit-tap-highlight-color: transparent;max-height: 100000px;}*/
body,
h1,
h2,
h3,
h4,
h5,
h6,
hr,
p,
blockquote,
dl,
dt,
dd,
ul,
ol,
li,
pre,
form,
fieldset,
legend,
button,
input,
textarea,
th,
td {
margin: 0;
padding: 0;
}
body,input, select, textarea /* for ie */ {
font: 14px "PingFang SC", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Helvetica, Arial, "Hiragino Sans GB", "Source Han Sans", "Noto Sans CJK Sc", "Microsoft YaHei", "Microsoft Jhenghei", sans-serif;
line-height: 1.15;
color: #333; /*touch-action: none*/
background: #fff;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
} /** 设置默认字体 **/
header,
section,
footer,
aside,
nav,
article,
figure {
display: block;
}
input,
button,
select,
textarea {
outline: none;
vertical-align: middle; /*解决父级底部多余空白*/
-webkit-appearance: none; /*去掉webkit默认的表单样式*/
font-size: 100%; /* 使得表单元素在 ie 下能继承字体大小 */
border: none;
background: none;
color: inherit;
}
address,
cite,
dfn,
em,
var {
font-style: normal;
} /* 将斜体扶正 , 注:optgroup 无法扶正 */
h1,
h2,
h3,
h4,
h5,
h6 {
font-size: 100%;
background: none;
}
code,
kbd,
pre,
samp {
font-family: courier new, courier, monospace;
} /* 统一等宽字体 */
object,
embed,
video {
max-width: 100%;
}
a:link,
a:active,
a:visited,
a:hover {
text-decoration: none;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
img {
border: 0;
max-width: 100%;
vertical-align: middle;
} /*解决父级底部多余空白*/
small {
font-size: 12px;
} /* 小于 12px 的中文很难阅读,让 small 正常化 */
legend {
color: #000;
} /*for ie6*/
fieldset {
border: 0;
}
li {
list-style: none;
}
a {
color: inherit;
}
/*click outline for firefox*/
button::-moz-focus-inner,
input[type='reset']::-moz-focus-inner,
input[type='button']::-moz-focus-inner,
input[type='submit']::-moz-focus-inner,
input[type='file'] > input[type='button']::-moz-focus-inner {
border: none;
}
/*click outline for IE and other browser*/
button:focus,
input[type='reset']:focus,
input[type='button']:focus,
input[type='submit']:focus,
input[type='file'] > input[type='button']:focus {
outline: none;
}
/* 注意此处合并写法无效 */
input::-webkit-input-placeholder,
textarea::-webkit-input-placeholder {
color: #fff;
font-size: 16px;
}
input::-moz-placeholder,
textarea::-moz-placeholder {
color: #fff;
font-size: 16px;
}
input:-ms-input-placeholder,
textarea:-ms-input-placeholder {
color: #fff;
font-size: 16px;
}
*:not(input, select, textarea) {
-webkit-user-select: none;
} /*禁止选中文本内容*/
::-webkit-scrollbar {
/*滚动条整体样式*/
width: 2px; /*高宽分别对应横竖滚动条的尺寸*/
height: 2px;
}
::-webkit-scrollbar-thumb {
/*滚动条里面小方块*/
border-radius: 2px;
/*深色模式*/
/* -webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2); */
background: #bbb;
/*浅色模式*/
/*-webkit-box-shadow: 0 0 3px rgba(0, 0, 0, 0.2);
background: rgb(245, 245, 245);
border: 1px solid #333;
border-bottom-width: 2px;*/
}
::-webkit-scrollbar-track {
/*滚动条里面轨道*/
display: none;
-webkit-box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
border-radius: 2px;
background: #eee;
}
/* common class */
/*bfc model*/
.bfc-o {
overflow: hidden;
position: relative;
}
.bfc-d {
display: inline-block;
vertical-align: top;
position: relative;
}
.bfc-p {
position: absolute;
}
.fl {
float: left;
position: relative;
}
.fr {
float: right;
position: relative;
}
.flex {
display: flex;
}
.fxbw {
display: flex;
align-items: flex-start;
justify-content: space-between;
}
ais {
align-items: stretch;
}
.aic {
align-items: center;
}
.al {
text-align: left;
}
.ac {
text-align: center;
}
.ar {
text-align: right;
}
.hide {
display: none;
}
.blod {
font-weight: bold;
}
/*top-fixed and bottom-fixed*/
.tf,
.bf {
position: fixed;
width: 100%;
height: 50px;
z-index: 999;
}
.tf {
top: 0;
}
.bf {
bottom: 0;
}
/*mask*/
.mask {
position: fixed;
width: 100%;
height: 100%;
background: rgba(39, 39, 39, 0.76);
left: 0;
bottom: 0;
margin: auto;
z-index: 9;
}
/*center-center*/
.cc {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
}
/*t-o-h-e*/
.toe {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.line2-toe {
text-overflow: -o-ellipsis-lastline;
overflow: hidden;
text-overflow: ellipsis;
word-break: break-all;
display: -webkit-box;
white-space: pre-wrap;
-webkit-line-clamp: 2;
line-clamp: 2;
-webkit-box-orient: vertical;
}
/*close*/
.close {
position: relative;
float: right;
width: 20px;
height: 20px;
line-height: 20px;
background: #f8f8f8;
text-align: center;
cursor: pointer;
}
/* pc frame */
.wrapper {
position: relative;
max-width: 1920px;
min-width: 1020px;
margin: 0 auto;
padding: 0 15px;
overflow: hidden;
}
.cp {
cursor: pointer;
}
.pt5 {
padding-top: 5px;
}
.pr5 {
padding-right: 5px;
}
.pb5 {
padding-bottom: 5px;
}
.pl5 {
padding-left: 5px;
}
.pad5 {
padding: 5px;
}
.pt10 {
padding-top: 10px;
}
.pr10 {
padding-right: 10px;
}
.pb10 {
padding-bottom: 10px;
}
.pl10 {
padding-left: 10px;
}
.pad10 {
padding: 10px;
}
.pt20 {
padding-top: 20px;
}
.pr20 {
padding-right: 20px;
}
.pb20 {
padding-bottom: 20px;
}
.pl20 {
padding-left: 20px;
}
.pad20 {
padding: 20px;
}
.mt5 {
margin-top: 5px;
}
.mr5 {
margin-right: 5px;
}
.mb5 {
margin-bottom: 5px;
}
.ml5 {
margin-left: 5px;
}
.mar5 {
margin: 5px;
}
.mb8 {
margin-bottom: 8px;
}
.mt10 {
margin-top: 10px;
}
.mr10 {
margin-right: 10px;
}
.mb10 {
margin-bottom: 10px;
}
.ml10 {
margin-left: 10px;
}
.mar10 {
margin: 10px;
}
.mt15 {
margin-top: 15px;
}
.mr15 {
margin-right: 15px;
}
.mb15 {
margin-bottom: 15px;
}
.ml15 {
margin-left: 15px;
}
.ml15 {
margin-left: 15px;
}
.mt20 {
margin-top: 20px;
}
.mr20 {
margin-right: 20px;
}
.mb20 {
margin-bottom: 20px;
}
.ml20 {
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
@import './common.css';
@import './transition.less';
\ No newline at end of file
// 全屏转场动画
.slide-left-enter-active,
.slide-right-enter-active {
transition: all 0.2s ease;
}
.slide-left-leave-active,
.slide-right-leave-active {
transition: all 0.2s cubic-bezier(1, 0.5, 0.8, 1);
}
.slide-left-enter,
.slide-right-leave-to {
transform: translateX(10px);
opacity: 0;
}
.slide-left-leave-to,
.slide-right-enter {
transform: translateX(-10px);
opacity: 0;
}
// 内页转场动画
.slide-inside-enter-active {
transition: all 0.3s ease;
}
.slide-inside-leave-active {
transition: all 0.3s cubic-bezier(1, 0.5, 0.8, 1);
}
.slide-inside-enter,
.slide-inside-leave-to
/* .slide-down-leave-active for below version 2.1.8 */
{
// position: absolute;
transform: translateY(-10px);
opacity: 0;
}
\ No newline at end of file
@red: #ee0a24;
@blue: #0079de;
@orange: #ff976a;
@orange-dark: #ed6a0c;
@orange-light: #fffbe8;
@green: #07c160;
@color: @blue;
@blueLight: #4ca1e8;
@colorSub: #4ee699;
@colorSubDeep: #34b071;
@borderColor: #106ed2;
@inputBgColor: #14344b;
@fontColor: #999;
// 画三角形
.triangle(@_, @wwww, @ccccc) {
width: 0px;
height: 0px;
overflow: hidden;
}
.triangle(L, @w, @c) {
border-width: @w;
border-style: dashed solid dashed dashed;
border-color: transparent @c transparent transparent;
}
.triangle(R, @w, @c) {
border-width: @w;
border-style: dashed dashed dashed solid;
border-color: transparent transparent transparent @c;
}
.triangle(T, @w, @c) {
border-width: @w;
border-style: dashed dashed solid dashed;
border-color: transparent transparent @c transparent;
}
.triangle(B, @w, @c) {
border-width: @w;
border-style: solid dashed dashed dashed;
border-color: @c transparent transparent transparent;
}
// 单边框
.border(single, @position: bottom, @color, @width: 1px) {
border-@{position}: @width solid @color;
}
// 全边框
.border(@color, @width: 1px) when (default()) {
border: @width solid @color;
}
:export {
color: @color;
}
\ 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
/**
* query请求路径参数转为对象
* @param {*} url
*/
export function param2Obj (url) {
try {
url = url == null ? window.location.href : url
let search = decodeURIComponent(url)
.split('?')
.slice(1)
if (!search[0]) {
return
}
search = search.filter((e) => e.includes('=')).map((e) => e.split('#')[0])
search = search.join('&')
return JSON.parse(
'{"' +
search
.replace(/"/g, '\\"')
.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请求参数
* @param {*} obj
*/
export function obj2query (obj) {
if (!obj) return ''
return Object.keys(obj)
.map((key) => {
if (obj[key] === undefined) return ''
return key + '=' + obj[key]
})
.filter((e) => !!e)
.join('&')
}
/**
* 获取query请求参数中name对应的值
* @param string name
*/
export function getQueryValue (name, str) {
try {
let url = str || window.location.href
// let search = url.split('?')[1]
// search = search && search.split('#')[0]
// if (!search) {
// return ''
// }
let reg = new RegExp('(^|&|\\?)' + name + '=([^&#]*)(&|#|$)')
let r = url.match(reg)
if (r != null) {
return decodeURIComponent(r[2])
}
return ''
} catch (error) {
alert(error)
}
}
export function urlReplaceFirstHistory (url) {
window.history.go(-(window.history.length - 1))
window.location.replace(url)
}
import { getUserOpenid, getWechatUserInfo, getWxRedirect, wxLogin } from '@/api/common'
// 微信端授权登录
export async function getWxCode () {
let userinfo = sessionStorage.getItem('userinfo')
//取缓存中的用户信息
if (userinfo) {
try {
userinfo = JSON.parse(userinfo)
} catch (error) {
// alert(error)
}
return userinfo
}
let code = getQueryValue('code') //是否存在code
if (!code) {
let url = (await getWxRedirect()).data
let id = getQueryValue('appid', url)
sessionStorage.setItem('weAppId', id)
window.location.href = url
}
try {
if (code) {
let { data: dataLogin } = await wxLogin(code)
sessionStorage.setItem('token', dataLogin.access_token)
let { data: dataUser } = await getWechatUserInfo()
sessionStorage.setItem('userinfo', JSON.stringify(dataUser))
return dataUser
}
} catch (error) {
return Promise.reject()
}
}
// 日期时间格式化
export function dateFormat (dateString, fmt = 'yyyy-MM-dd hh:mm:ss') {
if (!dateString) {
return
}
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 = {
'M+': date.getMonth() + 1, //月份
'd+': date.getDate(), //日
'h+': date.getHours(), //小时
'm+': date.getMinutes(), //分
's+': date.getSeconds(), //秒
'q+': Math.floor((date.getMonth() + 3) / 3), //季度
'S+': date.getMilliseconds(), //毫秒
'w+': '星期' + '日一二三四五六'.charAt(date.getDay()), //星期
}
if (/(y+)/.test(fmt)) {
fmt = fmt.replace(RegExp.$1, (date.getFullYear() + '').substr(4 - RegExp.$1.length))
}
for (var k in o) {
if (new RegExp('(' + k + ')').test(fmt)) {
fmt = fmt.replace(
RegExp.$1,
RegExp.$1.length == 1 || String(o[k]).length > 1 ? o[k] : '0' + o[k]
)
}
}
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
import axios from 'axios'
import { Toast, Dialog } from 'vant'
function createAxios(baseURL) {
const instance = axios.create({
baseURL,
timeout: 10000,
})
// 请求拦截
instance.interceptors.request.use(
(config) => {
// console.log('request config: ' + JSON.stringify(config))
config.headers = {
Authorization: 'Bearer ' + sessionStorage.token,
}
return config
},
(error) => {
return Promise.reject(error)
}
)
// 响应拦截
instance.interceptors.response.use(
(res) => {
// console.log('res: ' + res)
const { data, status } = res
// code 200:成功,-1/其它:错误
if (status === 200 && data.code === 200) {
return data
} else if (data.code === 401) {
let r = confirm('登录状态已过期,您可以继续留在该页面,或者重新登录')
if (r == true) {
sessionStorage.clear()
location.reload()
}
} else if (data.code == 501) {
// 红包领取相关错误
return data
}
// 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)
// if (process.env.NODE_ENV === 'development') {
// return Promise.reject(res) // 这样控制台会显示报错日志
// } else {
// return new Promise(() => {}) // 中断promise
// }
},
(error) => {
if (error.response) {
addErrorLog(error.response)
} else {
alert('服务器未启动或连接超时')
}
return Promise.reject(error)
}
)
// 错误日志
function addErrorLog(errorInfo) {
const {
data,
statusText,
status,
request: { responseText, responseURL },
} = errorInfo
// let info = {
// type: 'ajax',
// code: status,
// mes: statusText,
// url: responseURL
// }
// if (!responseURL.includes('save_error_logger')) store.dispatch('addErrorLog', info)
try {
// console.error(`错误: 路径: ${responseURL}, 返回值 : ${responseText}`)
let mes =
process.env.ENV === 'production'
? `错误: 路径: ${responseURL}, 返回值 : ${responseText}`
: `系统繁忙,请稍后再试`
alert(mes)
} catch (error) {}
}
return instance
}
// const httpRequest = createAxios()
export default createAxios(
process.env.NODE_ENV === 'development' ? '/api' : window.lwConfig.BASE_API
)
<template>
<div class="home">
<div class="logo ac">linkWeChat</div>
<template v-if="isShow">
<router-link
class="router-link"
v-for="(item, index) in $router.options.routes"
:to="item.path"
:key="index"
>{{ item.meta && item.meta.title }}</router-link
>
</template>
<div v-else class="cc tips blod">
{{ tips }}
</div>
</div>
</template>
<script>
// @ is an alias to /src
export default {
name: 'Home',
components: {},
data() {
return {
isShow: process.env.NODE_ENV === 'development',
tips: '',
}
},
created() {
if (location.href.includes('redPacketReceive') && !navigator.userAgent.includes('Mobile')) {
this.tips = '该业务仅支持手机微信用户,请在手机微信端打开'
} else {
}
},
}
</script>
<style lang="less" scoped>
.logo {
margin: 0 auto;
width: 150px;
height: 50px;
line-height: 50px;
border: 2px solid #6582ff;
border-radius: 50px;
}
.router-link {
display: block;
text-align: center;
line-height: 40px;
}
.tips {
width: 90%;
text-align: center;
line-height: 1.5;
}
</style>
<template>
<div class="home">
<div class="logo ac">linkWeChat</div>
</div>
</template>
<script>
import { getQueryValue } from '@/utils/index'
import { getWechatUserInfo } from '@/api/common'
export default {
name: 'authCallback',
data() {
return {
keyword: '',
active: 0,
list: [],
loading: false,
finished: false,
show: false,
// userId: this.$store.state.userId,
}
},
created() {
alert(1)
this.getWxCode()
},
methods: {
getWxCode() {
try {
let appid = window.lwConfig.appId // 公众号appid
// let appid = 'wx8bfe6bc2ca5c45ae' // 公众号appid
alert(2)
let code = getQueryValue('code') //是否存在code
alert(3)
let local = window.location.origin.includes('localhost')
? 'http://h5.linkwechat.cn/test.html'
: window.location.href
// let local = 'http://h5.x*****o.com/'
alert(code)
if (!code) {
//不存在就打开上面的地址进行授权
window.location.href = `https://open.weixin.qq.com/connect/oauth2/authorize?appid=${appid}&redirect_uri=${encodeURIComponent(
local
)}&response_type=code&scope=snsapi_userinfo&state=STATE#wechat_redirect`
// 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`;
} else {
this.getUserInfo(code)
}
} catch (error) {
alert(error)
this.$toast(JSON.stringify(error))
}
},
getUserInfo(code) {
getWechatUserInfo(code).then(({ data }) => {
if (data && data.openId) {
localStorage.setItem('userinfo', JSON.stringify(data))
alert(data.openId)
}
})
},
},
}
</script>
<style lang="less" scoped>
.logo {
margin: 0 auto;
width: 150px;
height: 50px;
line-height: 50px;
border: 2px solid #6582ff;
border-radius: 50px;
}
.router-link {
display: block;
text-align: center;
line-height: 40px;
}
</style>
<script>
import {
getMaterialList,
getCollectionList,
addCollection,
cancleCollection,
getMaterialMediaId,
} from '@/api/chat'
export default {
components: {},
props: {
sideId: {
type: String,
default: '',
},
// mediaType 0 图片(image)、1 语音(voice)、2 视频(video),3 普通文件(file) 4 文本 5 海报
mediaType: {
type: String,
default: '0',
},
// keyword: {
// type: String,
// default: '',
// },
},
data() {
return {
refreshing: false,
loading: false,
finished: false,
finishedText: '暂无数据',
keyword: undefined,
error: false,
pageNum: 1,
pageSize: 10,
list: [],
collectList: [],
mediaTypeObj: {
'0': '图片',
'1': '语音',
'2': '视频',
'3': '普通文件',
'4': '文本',
'5': '海报',
},
}
},
watch: {
userId() {
this.sideId || this.getList(1)
},
},
computed: {
userId() {
return this.$store.state.userId
},
},
created() {
this.getList()
// this.userId && this.getCollectionList()
},
mounted() {},
methods: {
getList(page) {
this.loading = true
this.finished = false
let pageNum = page || this.pageNum
let pageSize = this.pageSize
let keyword = this.keyword
if (pageNum == 1) {
this.list = []
this.pageNum = 1
}
;(this.sideId
? getMaterialList({
// userId: this.userId,
sideId: this.sideId,
mediaType: this.mediaType,
pageSize,
pageNum,
keyword,
})
: getCollectionList({
userId: this.userId,
pageSize,
pageNum,
keyword,
})
)
.then(({ rows, total }) => {
// 判断我的列表
if (!this.sideId) {
rows.forEach((element) => {
element.collection = 1
})
}
this.list.push(...rows)
this.loading = false
this.refreshing = false
// 数据全部加载完成
if (this.list.length >= +total) {
if (this.list.length == 0) {
this.pageNum = 1
this.finishedText = '暂无数据'
} else {
this.finishedText = '没有更多了'
}
this.finished = true
} else {
this.pageNum++
}
})
.catch(() => {
this.error = true
})
},
// getCollectionList() {
// let data = { userId: this.userId, pageSize: 1000, pageNum: 1 }
// getCollectionList(data).then(({ rows, total }) => {
// this.collectList = rows.map((d) => d.materialId)
// })
// },
search(pageNum, keyword) {
this.keyword = keyword
this.getList(pageNum)
},
send(data) {
this.$toast.loading({
message: '正在发送...',
duration: 0,
forbidClick: true,
})
let entry = undefined
let _this = this
wx.invoke('getContext', {}, async function(res) {
if (res.err_msg == 'getContext:ok') {
entry = res.entry //返回进入H5页面的入口类型,目前 contact_profile、single_chat_tools、group_chat_tools
let mes = {}
try {
if (!['single_chat_tools', 'group_chat_tools', 'normal'].includes(entry)) {
// _this.$toast.clear()
_this.$toast('入口错误:' + entry)
return
}
// mediaType 0 图片(image)、1 语音(voice)、2 视频(video),3 普通文件(file) 4 文本 5 海报
// msgtype 文本(“text”),图片(“image”),视频(“video”),文件(“file”),H5(“news”)和小程序(“miniprogram”)
let msgtype = {
0: 'image',
2: 'video',
3: 'file',
4: 'text',
5: 'image',
}
switch (data.mediaType) {
case '4':
default:
mes.text = {
content: data.content, //文本内容
}
break
case '0':
case '2':
case '3':
case '5':
let dataMediaId = {
url: data.materialUrl,
type: msgtype[data.mediaType],
name: data.materialName,
}
try {
let resMaterialId = await getMaterialMediaId(dataMediaId)
if (!resMaterialId.data) {
_this.$toast('获取素材id失败')
return
}
mes[msgtype[data.mediaType]] = {
mediaid: resMaterialId.data.mediaId, //
}
} catch (error) {
return
}
break
// case '5':
// mes.news = {
// link: '', //H5消息页面url 必填
// title: '', //H5消息标题
// desc: '', //H5消息摘要
// imgUrl: '' //H5消息封面图片URL
// }
// break
// case '6':
// mes.miniprogram = {
// appid: 'wx8bd80126147df384', //小程序的appid
// title: '_this is title', //小程序消息的title
// imgUrl:
// 'https://search-operate.cdn.bcebos.com/d054b8892a7ab572cb296d62ec7f97b6.png', //小程序消息的封面图。必须带http或者https协议头,否则报错 $apiName$:fail invalid imgUrl
// page: '/index/page.html', //小程序消息打开后的路径,注意要以.html作为后缀,否则在微信端打开会提示找不到页面
// }
// break
}
mes.msgtype = msgtype[data.mediaType]
// _this.$dialog({ message: 'mes:' + JSON.stringify(mes) })
} catch (err) {
_this.$dialog({ message: 'err' + JSON.stringify(err) })
}
wx.invoke('sendChatMessage', mes, function(resSend) {
// if (resSend.err_msg == 'sendChatMessage:ok') {
// //发送成功 sdk会自动弹出成功提示,无需再加
// // _this.$toast('发送成功')
// }
if ('sendChatMessage:cancel,sendChatMessage:ok'.indexOf(resSend.err_msg) < 0) {
//错误处理
_this.$dialog({ message: '发送失败:' + JSON.stringify(resSend) })
}
})
_this.$toast.clear()
} else {
_this.$toast.clear()
//错误处理
_this.$dialog({ message: '进入失败:' + JSON.stringify(res) })
}
})
},
collect(data) {
this.$toast.loading({
message: 'loading...',
duration: 0,
forbidClick: true,
})
// collection 是否收藏 0未收藏 1 已收藏
;(data.collection == 1 ? cancleCollection : addCollection)({
userId: this.userId,
materialId: data.materialId,
})
.then(() => {
data.collection = [1, 0][data.collection]
this.$toast('操作成功')
this.$emit('collect')
})
.catch((err) => {
this.$toast('操作失败')
console.log(err)
})
},
},
}
</script>
<template>
<div>
<van-pull-refresh v-model="refreshing" success-text="刷新成功" @refresh="getList(1)">
<van-list
v-model="loading"
:finished="finished"
:finished-text="finishedText"
:error.sync="error"
error-text="请求失败,点击重新加载"
@load="getList()"
>
<div v-for="(item, index) in list" class="list" :key="index">
<div class="content bfc-o">
<!-- 图片 -->
<van-image
v-if="[0, 5].includes(+item.mediaType)"
width="80"
height="80"
:src="item.materialUrl"
/>
<!-- 视频 -->
<video
v-if="item.mediaType == 2"
class="video"
controls
webkit-playsinline="true"
playsinline="true"
:autoplay="false"
preload="auto"
:poster="item.coverUrl"
>
<source :src="item.materialUrl" type="video/mp4" />
</video>
<!-- <van-image v-if="item.mediaType == 2" width="80" height="80" :src="item.coverUrl" /> -->
<span class="title">
{{ item.mediaType == 4 ? item.content : item.materialName }}
</span>
</div>
<div class="info">
{{ mediaTypeObj[item.mediaType] }}类型
<span class="time">{{ item.createTime }}</span>
<div class="fr flex">
<div class="action" @click="send(item)">发送</div>
<div v-if="!!userId" class="action" @click="collect(item)">
{{ item.collection == 1 ? '取消' : '' }}收藏
</div>
</div>
</div>
</div>
</van-list>
</van-pull-refresh>
</div>
</template>
<style lang="less" scoped>
.content {
// display: flex;
.van-image,
.video {
float: left;
width: 80px;
height: 80px;
margin: 0 10px 5px 0;
border: 1px solid #eee;
}
.title {
word-break: break-all;
}
}
.time {
margin-left: 5px;
}
</style>
<script>
import { getTypeList } from '@/api/chat'
import List from './List'
export default {
components: { List },
props: {},
data() {
return {
keyword: '',
active: 0,
list: [],
loading: false,
finished: false,
show: false,
// userId: this.$store.state.userId,
}
},
watch: {
userId() {
this.getList()
},
},
computed: {
userId() {
return this.$store.state.userId
},
},
beforeCreate() {},
created() {
// this.$toast('userId:' + this.$store.state.userId)
this.userId && this.getList()
},
mounted() {},
methods: {
getList() {
getTypeList().then(({ rows, total }) => {
this.list = []
this.userId &&
this.list.push({
sideName: '我的',
})
rows && this.list.push(...rows)
})
},
search(pageNum) {
// this.$refs['list'][this.active].search(pageNum, this.keyword)
this.$refs['list' + this.active] &&
this.$refs['list' + this.active][0].search(pageNum, this.keyword)
},
cancel() {
this.keyword = ''
this.$nextTick(() => this.search(1))
},
refreshCollect() {
this.userId && this.$refs['list'][0].getList(1)
},
// add() {},
},
}
</script>
<template>
<div>
<van-search v-model="keyword" show-action placeholder="请输入搜索关键词" @search="search(1)">
<template #action>
<span @click="search(1)">搜索</span>
<span class="ml5" @click="cancel">重置</span>
</template>
</van-search>
<van-tabs v-model="active">
<!-- <van-tab v-if="!!userId" title="我的">
<List ref="list0" :userId="userId" :keyword="keyword"></List>
</van-tab> -->
<van-tab :title="item.sideName" v-for="(item, index) in list" :key="index">
<List
:ref="'list' + index"
:sideId="item.id"
:mediaType="item.mediaType"
@collect="refreshCollect"
></List>
</van-tab>
</van-tabs>
<!-- <van-dialog
v-model="show"
:title="`添加&quot;我的&quot;${radio}`"
show-cancel-button
>
<van-form @submit="onSubmit">
<van-field name="radio" label="添加类型">
<template #input>
<van-radio-group v-model="radio" direction="horizontal">
<van-radio name="1">文本</van-radio>
<van-radio name="2">分类</van-radio>
</van-radio-group>
</template>
</van-field>
<van-field
v-model="username"
name="分类名称"
label="分类名称"
placeholder="分类名称"
:rules="[{ required: true, message: '请填写分类名称' }]"
/>
<template>
<van-field
readonly
clickable
name="picker"
:value="value"
label="文本分类"
placeholder="点击选择文本分类"
@click="showPicker = true"
/>
<van-popup v-model="showPicker" position="bottom">
<van-picker
show-toolbar
:columns="columns"
@confirm="onConfirm"
@cancel="showPicker = false"
/>
</van-popup>
<van-field
v-model="message"
rows="5"
autosize
label="文本信息"
type="textarea"
maxlength="150"
placeholder="请输入文本信息"
show-word-limit
/>
</template>
</van-form>
</van-dialog> -->
</div>
</template>
<style lang="less" scoped>
.page {
height: 100vh;
background: #f6f6f6;
}
/deep/ .list {
padding: 10px;
background: #fff;
border-top: 1px solid #eee;
.info {
padding-top: 10px;
}
.action {
padding-left: 5px;
}
}
</style>
<template>
<div>
<div>
<van-search v-model="keyword" placeholder="搜索活码名或关键词" shape="round" @search="onSearch" @clear="clear">
</van-search>
</div>
<div class="history-wrapper">
<template v-for="k of history">
<van-tag :key="k" size="large" closeable @click="search(k)" @close="removeHistory(k)"> {{ k }} </van-tag>
</template>
</div>
<div class="bottom-line"></div>
<div>
<template v-if="!tasks || tasks.length === 0">
<van-empty description="暂无数据" />
</template>
<template v-else>
<template v-for="task of tasks">
<KeywordPanel :key="task.taskId" :task="task" :state="false"></KeywordPanel>
</template>
</template>
</div>
<van-overlay :show="loading" class-name="overlay">
<van-loading type="spinner"></van-loading>
</van-overlay>
</div>
</template>
<script>
import KeywordPanel from './panel'
import { getKeywordTasks } from '@/api/community'
export default {
components: { KeywordPanel },
data() {
return {
keyword: '',
storageKey: 'keywords',
history: [],
tasks: [],
loading: false,
focus: false
}
},
methods: {
getTasks() {
this.loading = true
getKeywordTasks(this.keyword)
.then((res) => {
if (res.code === 200) {
let timeStamp = (dateString) => (dateString ? +new Date(dateString.replace(/-/g, '/')) : 0)
this.tasks = res.rows.sort((a, b) => timeStamp(b.updateTime) - timeStamp(a.updateTime))
}
this.loading = false
})
.catch(() => {
this.loading = false
})
},
setHistory(keyword) {
if (!keyword) return
if (!this.history.includes(keyword)) {
this.history.push(keyword)
localStorage.setItem(this.storageKey, JSON.stringify(this.history))
}
},
removeHistory(keyword) {
if (this.history.includes(keyword)) {
this.history.splice(this.history.indexOf(keyword), 1)
localStorage.setItem(this.storageKey, JSON.stringify(this.history))
}
},
getHistory() {
this.history = JSON.parse(localStorage.getItem(this.storageKey)) || []
},
onSearch() {
this.setHistory(this.keyword)
this.getTasks()
},
search(keyword) {
this.keyword = keyword
this.getTasks()
},
clear() {
this.keyword = ''
this.getTasks()
}
},
computed: {
url() {
return window.location.href
}
},
created() {
this.getHistory()
this.getTasks()
}
}
</script>
<style lang="less" scoped>
.history-wrapper {
padding: 0 20px 20px;
.van-tag {
margin: 10px 10px 0 0;
}
}
.bottom-line {
background-color: #f2f2f2;
height: 15px;
}
.overlay {
display: flex;
align-items: center;
.van-loading {
margin: auto;
}
}
</style>
<template>
<div>
<div class="task-wrapper">
<div class="header">
<span> {{ task.taskName }} </span>
</div>
<div class="keywords">
<template v-for="keyword of keywords">
<van-tag size="medium" :key="keyword"> {{ keyword }} </van-tag>
</template>
</div>
<div class="guide" v-if="task.welcomeMsg">
<div @touchstart.prevent="touchStart" @touchend="touchEnd">
{{ task.welcomeMsg }}
</div>
<div class="copy-wrapper" v-show="showCopy">
<van-button :class="'copy-btn_' + task.taskId" :data-clipboard-text="task.welcomeMsg">
复制
</van-button>
</div>
</div>
<div class="content">
<div v-if="task.groupCodeInfo && task.groupCodeInfo.codeUrl">
<van-image width="50" :src="task.groupCodeInfo.codeUrl"></van-image>
</div>
<div class="group">
<span> {{ task.taskName }} </span>
</div>
</div>
<div class="bottom-area">
<span class="time"> {{ task.createTime }} </span>
<van-button type="info" size="mini" @click="send">发送</van-button>
</div>
</div>
<div class="bottom-line"></div>
</div>
</template>
<script>
import ClipboardJS from 'clipboard'
export default {
name: 'KeywordPanel',
props: {
task: {
type: Object,
required: true,
},
},
data() {
return {
showCopy: false, // 展示复制按钮
touchDelay: 750, // 触发显示按钮的长按时常
copyEvent: null,
touch: false,
}
},
methods: {
send() {
let _this = this
this.$toast.loading({
message: '正在发送...',
duration: 0,
forbidClick: true,
})
try {
let news = {
link: this.groupCodeUrl,
title: this.task.taskName,
desc: this.task.welcomeMsg,
imgUrl: this.imgUrl,
}
wx.invoke(
'sendChatMessage',
{
msgtype: 'news',
news,
},
function(res) {
if ('sendChatMessage:cancel,sendChatMessage:ok'.indexOf(res.err_msg) < 0) {
_this.$dialog({ message: '发送失败:' + JSON.stringify(res) })
}
_this.$toast.clear()
}
)
} catch (err) {
_this.$toast.clear()
_this.$dialog({ message: 'err:' + err.name + ',' + err.message })
}
},
touchStart() {
clearTimeout(this.copyEvent)
this.copyEvent = setTimeout(() => {
this.touch = true
}, this.touchDelay)
},
touchEnd() {
clearTimeout(this.copyEvent)
if (this.touch) this.showCopy = true
this.touch = false
},
},
computed: {
keywords() {
if (!this.task || !this.task.keywordList) return []
const keywords = this.task.keywordList.map((k) => k.keyword)
return keywords
},
groupCodeUrl() {
let groupCodeInfo = this.task.groupCodeInfo
if (window.location.hash[0] === '#') {
return (
window.location.origin +
window.location.pathname +
'#/groupCode?id=' +
(groupCodeInfo && groupCodeInfo.id)
)
}
return (
window.location.origin +
window.location.pathname +
'#/groupCode?id=' +
(groupCodeInfo && groupCodeInfo.id)
)
},
imgUrl() {
let groupCodeInfo = this.task.groupCodeInfo
return groupCodeInfo && groupCodeInfo.codeUrl ? groupCodeInfo.codeUrl : ''
},
},
mounted() {
this.clipboard = new ClipboardJS('.copy-btn_' + this.task.taskId)
this.clipboard.on('success', (e) => {
this.showCopy = false
})
this.clipboard.on('error', (e) => {
this.showCopy = false
})
},
}
</script>
<style lang="less" scoped>
.task-wrapper {
padding: 10px 8px;
.header {
display: flex;
justify-content: space-between;
align-items: center;
margin: 5px 0 12px;
span {
font-size: 18px;
font-weight: bold;
}
}
.keywords {
margin-bottom: 15px;
.van-tag {
margin-right: 10px;
background-color: #f2f2f2;
color: rgba(0, 0, 0, 0.6);
}
}
.guide {
padding: 15px;
background-color: #f2f2f2;
font-size: 16px;
line-height: 20px;
color: #999999;
margin-bottom: 15px;
min-height: 30px;
position: relative;
.copy-wrapper {
position: absolute;
width: 100%;
height: 100%;
left: 0;
top: 0;
background-color: rgba(0, 0, 0, 0.4);
display: flex;
align-items: center;
justify-content: space-around;
}
}
.content {
padding: 10px;
background-color: #f2f2f2;
display: flex;
.group {
padding: 0 10px;
display: flex;
flex-direction: column;
justify-content: space-between;
.group-name {
color: #999999;
}
}
}
.van-cell {
padding: 10px 6px;
}
.bottom-area {
padding: 10px 5px 5px;
display: flex;
justify-content: space-between;
align-items: center;
.time {
color: rgba(0, 0, 0, 0.3);
}
.van-button {
padding: 0 12px;
margin-right: 12px;
border-radius: 4px;
font-size: 12px;
}
}
}
.bottom-line {
background-color: #f2f2f2;
height: 15px;
}
</style>
<template>
<div>
<div class="task-wrapper">
<div class="header">
<span> 标签建群 </span>
<div>{{ task.createTime }}</div>
</div>
<div class="guide" v-if="task.welcomeMsg">
<div @touchstart.prevent="touchStart" @touchend="touchEnd">
{{ task.welcomeMsg }}
</div>
<div class="copy-wrapper" v-show="showCopy">
<van-button :class="'copy-btn_' + task.taskId" :data-clipboard-text="task.welcomeMsg">
复制
</van-button>
</div>
</div>
<div class="content">
<div>
<van-image width="50" :src="task.groupCodeInfo.codeUrl"></van-image>
</div>
<div class="group">
<span> {{ task.taskName }} </span>
<!-- <span class="group-name"> 测试群 </span> -->
</div>
</div>
<div>
<van-cell title="发送给" is-link :value="showMembers"></van-cell>
<van-cell title="已完成成员" is-link :value="showDone" @click="goState(1)"></van-cell>
<van-cell title="未完成成员" is-link :value="showTodo" @click="goState"></van-cell>
</div>
<div class="send-button" v-if="!state">
<van-button type="info" size="mini" @click="send">发送</van-button>
</div>
</div>
<div class="bottom-line"></div>
</div>
</template>
<script>
import ClipboardJS from 'clipboard'
import { changeStatus } from '@/api/community'
export default {
name: 'OldCustomerPanel',
props: {
task: {
type: Object,
required: true,
},
// true: 已处理 false: 未处理
state: {
type: Boolean,
required: true,
},
isAdmin: {
type: Boolean,
default: true,
},
},
data() {
return {
showCopy: false, // 展示复制按钮
touchDelay: 750, // 触发显示按钮的长按时常
copyEvent: null,
touch: false,
}
},
methods: {
goState(active) {
if (!this.isAdmin) return
this.$router.push({
name: 'taskState',
query: {
taskId: this.task.taskId,
active: active === 1 ? 1 : 0,
taskType: 1,
},
})
},
send() {
const userId = this.$store.state.userId
const taskId = this.task.taskId
wx.invoke(
'shareToExternalContact',
{
title: this.task.taskName,
desc: this.task.welcomeMsg,
link: this.groupCodeUrl,
imgUrl: this.task.groupCodeInfo && this.task.groupCodeInfo.codeUrl,
},
function(res) {
if (res.err_msg == 'shareToExternalContact:ok') {
changeStatus(userId, taskId, 0)
.then((res) => {
this.$emit('refresh')
})
.catch(() => {
this.$emit('refresh')
})
} else if (res.err_msg == 'shareToExternalContact:cancel') {
// 用户取消发送
} else {
_this.$dialog({ message: '发送失败:' + JSON.stringify(res) })
}
}
)
},
touchStart() {
clearTimeout(this.copyEvent)
this.copyEvent = setTimeout(() => {
this.touch = true
}, this.touchDelay)
},
touchEnd() {
clearTimeout(this.copyEvent)
if (this.touch) this.showCopy = true
this.touch = false
},
},
computed: {
todoMembers() {
if (!(this.task && this.task.scopeList && this.task.scopeList.length > 0)) return []
const members = []
for (let member of this.task.scopeList) {
if (!member.done) members.push(member)
}
return members
},
showTodo() {
if (this.todoMembers.length === 0) return '无'
const names = this.todoMembers.map((m) => m.name)
if (this.todoMembers.length <= 2) return names.join('、')
return names[0] + '、' + names[1] + '等' + this.todoMembers.length + '人'
},
doneMembers() {
if (!this.task || !this.task.scopeList || this.task.scopeList.length === 0) return []
const members = []
for (let member of this.task.scopeList) {
if (member.done) members.push(member)
}
return members
},
showDone() {
if (this.doneMembers.length === 0) return '无'
const names = this.doneMembers.map((m) => m.name)
if (this.doneMembers.length <= 2) return names.join('、')
return names[0] + '、' + names[1] + '等' + this.doneMembers.length + '人'
},
showMembers() {
if (!(this.task && this.task.scopeList && this.task.scopeList.length > 0)) return '无'
if (this.task.scopeList.length === 0) return '无'
const names = this.task.scopeList.map((m) => m.name)
if (this.task.scopeList.length <= 2) return names.join('、')
return names[0] + '、' + names[1] + '等' + this.task.scopeList.length + '人'
},
groupCodeUrl() {
let groupCodeInfo = this.task.groupCodeInfo
if (window.location.hash[0] === '#') {
return (
window.location.origin +
window.location.pathname +
'#/groupCode?id=' +
(groupCodeInfo && groupCodeInfo.id)
)
}
return (
window.location.origin +
window.location.pathname +
'groupCode?id=' +
(groupCodeInfo && groupCodeInfo.id)
)
},
},
mounted() {
this.clipboard = new ClipboardJS('.copy-btn_' + this.task.taskId)
this.clipboard.on('success', (e) => {
this.showCopy = false
})
this.clipboard.on('error', (e) => {
this.showCopy = false
})
},
}
</script>
<style lang="less" scoped>
.task-wrapper {
padding: 10px 8px;
.header {
display: flex;
justify-content: space-between;
align-items: center;
margin: 5px 0 12px;
span {
font-size: 18px;
font-weight: bold;
}
}
.guide {
padding: 15px;
background-color: #f2f2f2;
font-size: 16px;
line-height: 20px;
color: #999999;
margin-bottom: 15px;
min-height: 30px;
position: relative;
.copy-wrapper {
position: absolute;
width: 100%;
height: 100%;
left: 0;
top: 0;
background-color: rgba(0, 0, 0, 0.4);
display: flex;
align-items: center;
justify-content: space-around;
}
}
.content {
padding: 10px;
background-color: #f2f2f2;
display: flex;
.group {
padding: 0 10px;
display: flex;
flex-direction: column;
justify-content: space-between;
.group-name {
color: #999999;
}
}
}
.van-cell {
padding: 10px 6px;
}
.send-button {
padding: 10px 5px 5px;
display: flex;
flex-direction: row-reverse;
.van-button {
padding: 0 12px;
margin-right: 12px;
border-radius: 4px;
font-size: 12px;
}
}
}
.bottom-line {
background-color: #f2f2f2;
height: 15px;
}
</style>
<template>
<div>
<div class="task-wrapper">
<div class="header">
<span> 群SOP </span>
<div>{{ task.createTime }}</div>
</div>
<div class="group">
<van-cell class="group-tags" title="发送给客户群">
<template #default>
<!-- <template v-for="group of task.groupList.slice(0, 2)">
<van-tag :key="group.chatId" size="large"> {{ group.groupName }} </van-tag>
</template> -->
<template v-if="task.groupList && task.groupList.length > 0">
<van-tag v-for="group of task.groupList.slice(0, 2)" :key="group.chatId" size="large">
{{ group.groupName }}
</van-tag>
</template>
<template v-if="task.groupList && task.groupList.length > 2">
<van-tag size="large"> ... </van-tag>
</template>
</template>
</van-cell>
<van-cell title="发送时间" :value="sendRange"></van-cell>
</div>
<div class="content">
<!-- <div @touchstart.prevent="touchStart" @touchend="touchEnd"> -->
<div>
{{ task.content }}
</div>
<div class="copy-wrapper">
<van-button :class="'copy-btn_' + task.ruleId" :data-clipboard-text="task.content">
复制
</van-button>
</div>
</div>
<div class="image-list">
<template v-for="material of task.materialList">
<!-- mediaType: 0 图片(image)、1 语音(voice)、2 视频(video),3 普通文件(file) 4 文本 5 海报 6 海报字体 -->
<van-image
v-if="material.mediaType === 0"
width="80"
:key="material.id"
:src="material.materialUrl"
></van-image>
</template>
<template v-for="pic of task.picList">
<van-image width="80" :key="pic" :src="pic"></van-image>
</template>
</div>
<div>
<!-- <van-cell title="发送给" is-link value="张三、李四、王五等11人"></van-cell> -->
<van-cell title="已完成成员" is-link :value="showDone" @click="goState(1)"></van-cell>
<van-cell title="未完成成员" is-link :value="showTodo" @click="goState"></van-cell>
</div>
<div class="send-button" v-if="!state">
<van-button type="info" size="mini" @click="send()">发送</van-button>
</div>
</div>
<div class="bottom-line"></div>
</div>
</template>
<script>
import ClipboardJS from 'clipboard'
import { changeStatus } from '@/api/community'
export default {
name: 'SOPPanel',
props: {
task: {
type: Object,
required: true,
},
// true: 已处理 false: 未处理
state: {
type: Boolean,
required: true,
},
isAdmin: {
type: Boolean,
default: true,
},
},
data() {
return {
// showCopy: false, // 展示复制按钮
// touchDelay: 750, // 触发显示按钮的长按时常
// copyEvent: null,
// touch: false
}
},
methods: {
goState(active) {
if (!this.isAdmin) return
this.$router.push({
name: 'taskState',
query: {
taskId: this.task.ruleId,
active: active === 1 ? 1 : 0,
taskType: 2,
},
})
},
send() {
try {
const userId = this.$store.state && this.$store.state.userId
const taskId = this.task.ruleId
let _this = this
this.$toast.loading({
message: '正在发送...',
duration: 0,
forbidClick: true,
})
// mes.link || delete mes.link
// mes.imgUrl || delete mes.imgUrl
wx.invoke(
'shareToExternalChat',
{
title: this.task.title,
desc: this.task.content,
link:
(this.task.materialList &&
this.task.materialList[0] &&
this.task.materialList[0].materialUrl) ||
' ', // 消息链接
imgUrl:
(this.task.materialList &&
this.task.materialList[0] &&
this.task.materialList[0].materialUrl) ||
' ', // 封面
},
async function(res) {
if (res.err_msg == 'shareToExternalChat:ok') {
try {
await changeStatus(userId, taskId, 1)
} catch (error) {
_this.$toast.clear()
_this.$dialog({ message: '接口失败:' + JSON.stringify(error) })
return
}
// .then((res) => {
// }).catch(() => {
// this.$emit('refresh')
// })
_this.$toast.clear()
this.$emit('refresh')
} else if (res.err_msg == 'shareToExternalChat:cancel') {
// 用户取消发送
} else {
_this.$dialog({ message: '发送失败:' + JSON.stringify(res) })
}
_this.$toast.clear()
}
)
} catch (error) {
this.$dialog({ message: '代码错误:' + JSON.stringify(error.message) })
}
},
// touchStart() {
// clearTimeout(this.copyEvent)
// this.copyEvent = setTimeout(() => {
// this.touch = true
// }, this.touchDelay)
// },
// touchEnd() {
// clearTimeout(this.copyEvent)
// if (this.touch) this.showCopy = true
// this.touch = false
// }
},
computed: {
sendRange() {
if (!this.task.startExeTime || !this.task.stopExeTime) return ''
return this.task.startExeTime + ' - ' + this.task.stopExeTime
},
todoMembers() {
if (!(this.task && this.task.scopeList && this.task.scopeList.length > 0)) return []
const members = []
for (let member of this.task.scopeList) {
if (!member.done) members.push(member)
}
return members
},
showTodo() {
if (this.todoMembers.length === 0) return '无'
const namesMap = this.todoMembers.map((m) => m.name || '')
const names = namesMap.filter((m) => m !== '')
if (this.todoMembers.length <= 2) return names.join('、')
return names[0] + '、' + names[1] + '等' + this.todoMembers.length + '人'
},
doneMembers() {
if (!this.task || !this.task.scopeList || this.task.scopeList.length === 0) return []
const members = []
for (let member of this.task.scopeList) {
if (member.done) members.push(member)
}
return members
},
showDone() {
if (this.doneMembers.length === 0) return '无'
const namesMap = this.doneMembers.map((m) => m.name || '')
const names = namesMap.filter((m) => m !== '')
if (this.doneMembers.length <= 2) return names.join('、')
return names[0] + '、' + names[1] + '等' + this.doneMembers.length + '人'
},
},
mounted() {
this.clipboard = new ClipboardJS('.copy-btn_' + this.task.ruleId)
this.clipboard.on('success', (e) => {
this.showCopy = false
})
this.clipboard.on('error', (e) => {
this.showCopy = false
})
},
}
</script>
<style lang="less" scoped>
.task-wrapper {
padding: 10px 8px;
.header {
display: flex;
justify-content: space-between;
align-items: center;
margin: 5px 0 12px;
span {
font-size: 18px;
font-weight: bold;
}
}
.group {
.group-tags {
:nth-child(n + 2) {
margin-left: 5px;
}
.van-tag {
background-color: #f2f2f2;
color: black;
padding: 6px 10px;
}
}
}
.content {
padding: 15px;
background-color: #f2f2f2;
font-size: 16px;
line-height: 20px;
color: #999999;
// margin-bottom: 15px;
min-height: 30px;
position: relative;
.copy-wrapper {
position: absolute;
width: 100%;
height: 100%;
left: 0;
top: 0;
background-color: rgba(0, 0, 0, 0.4);
display: flex;
align-items: center;
justify-content: space-around;
}
}
.image-list {
.van-image {
padding: 10px 10px 0 0;
}
}
.van-cell {
padding: 10px 6px;
}
.send-button {
padding: 10px 5px 5px;
display: flex;
flex-direction: row-reverse;
.van-button {
padding: 0 12px;
margin-right: 12px;
border-radius: 4px;
font-size: 12px;
}
}
}
.bottom-line {
background-color: #f2f2f2;
height: 15px;
}
</style>

69.2 KB | W: | H:

77.9 KB | W: | H:

linkwe-pc/public/static/LOGO_TEXT_DARK.png
linkwe-pc/public/static/LOGO_TEXT_DARK.png
linkwe-pc/public/static/LOGO_TEXT_DARK.png
linkwe-pc/public/static/LOGO_TEXT_DARK.png
  • 2-up
  • Swipe
  • Onion skin

19.3 KB | W: | H:

40.9 KB | W: | H:

linkwe-pc/public/static/POST_QRCODE.png
linkwe-pc/public/static/POST_QRCODE.png
linkwe-pc/public/static/POST_QRCODE.png
linkwe-pc/public/static/POST_QRCODE.png
  • 2-up
  • Swipe
  • Onion skin
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!