优化客户同步功能

1 parent f14fee10
Showing 435 changed files with 76 additions and 4540 deletions
package com.linkwechat.web.controller.wecom; package com.linkwechat.web.controller.wecom;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.collection.ListUtil;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.linkwechat.common.annotation.Log; import com.linkwechat.common.annotation.Log;
...@@ -11,12 +10,10 @@ import com.linkwechat.common.core.controller.BaseController; ...@@ -11,12 +10,10 @@ import com.linkwechat.common.core.controller.BaseController;
import com.linkwechat.common.core.domain.AjaxResult; import com.linkwechat.common.core.domain.AjaxResult;
import com.linkwechat.common.core.page.TableDataInfo; import com.linkwechat.common.core.page.TableDataInfo;
import com.linkwechat.common.enums.BusinessType; import com.linkwechat.common.enums.BusinessType;
import com.linkwechat.common.utils.poi.ExcelUtil;
import com.linkwechat.wecom.domain.*; import com.linkwechat.wecom.domain.*;
import com.linkwechat.wecom.domain.vo.WeMakeCustomerTag; import com.linkwechat.wecom.domain.vo.WeMakeCustomerTag;
import com.linkwechat.wecom.service.IWeCustomerService; import com.linkwechat.wecom.service.IWeCustomerService;
import com.linkwechat.wecom.service.IWeCustomerTrajectoryService; import com.linkwechat.wecom.service.IWeCustomerTrajectoryService;
import com.linkwechat.wecom.service.IWeFlowerCustomerRelService;
import com.linkwechat.wecom.service.IWeFlowerCustomerTagRelService; import com.linkwechat.wecom.service.IWeFlowerCustomerTagRelService;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -24,7 +21,6 @@ import org.springframework.context.annotation.Lazy; ...@@ -24,7 +21,6 @@ import org.springframework.context.annotation.Lazy;
import org.springframework.validation.annotation.Validated; import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import java.util.ArrayList;
import java.util.List; import java.util.List;
/** /**
...@@ -44,12 +40,6 @@ public class WeCustomerController extends BaseController ...@@ -44,12 +40,6 @@ public class WeCustomerController extends BaseController
@Autowired @Autowired
private IWeFlowerCustomerTagRelService weFlowerCustomerTagRelService;
@Autowired
private IWeFlowerCustomerRelService weFlowerCustomerRelService;
@Autowired
private IWeCustomerTrajectoryService iWeCustomerTrajectoryService; private IWeCustomerTrajectoryService iWeCustomerTrajectoryService;
...@@ -90,47 +80,23 @@ public class WeCustomerController extends BaseController ...@@ -90,47 +80,23 @@ public class WeCustomerController extends BaseController
{ {
startPage(); startPage();
List<WeCustomerList> list = weCustomerService.findWeCustomerList(weCustomerList); List<WeCustomerList> list = weCustomerService.findWeCustomerList(weCustomerList);
if(CollectionUtil.isNotEmpty(list)){
list.stream().forEach(k->{
List<WeFlowerCustomerRel> relList = weFlowerCustomerRelService.list(new LambdaQueryWrapper<WeFlowerCustomerRel>()
.eq(WeFlowerCustomerRel::getUserId, k.getFirstUserId())
.eq(WeFlowerCustomerRel::getExternalUserid, k.getExternalUserid()));
if(CollectionUtil.isNotEmpty(relList)){
WeFlowerCustomerRel customerRel = relList.stream().findFirst().get();
if(customerRel !=null){
customerRel.setWeFlowerCustomerTagRels(
weFlowerCustomerTagRelService.list(new LambdaQueryWrapper<WeFlowerCustomerTagRel>()
.eq(WeFlowerCustomerTagRel::getUserId,k.getFirstUserId())
.eq(WeFlowerCustomerTagRel::getExternalUserid,k.getExternalUserid()))
);
}
k.setWeFlowerCustomerRels(ListUtil.toList(
customerRel
));
}
});
}
return getDataTable(list); return getDataTable(list);
} }
/** // /**
* 导出企业微信客户列表 // * 导出企业微信客户列表
*/ // */
// @PreAuthorize("@ss.hasPermi('wecom:customer:export')") // // @PreAuthorize("@ss.hasPermi('wecom:customer:export')")
@Log(title = "企业微信客户", businessType = BusinessType.EXPORT) // @Log(title = "企业微信客户", businessType = BusinessType.EXPORT)
@GetMapping("/export") // @GetMapping("/export")
public AjaxResult export(WeCustomer weCustomer) // public AjaxResult export(WeCustomer weCustomer)
{ // {
List<WeCustomer> list = weCustomerService.selectWeCustomerList(weCustomer); // List<WeCustomer> list = weCustomerService.selectWeCustomerList(weCustomer);
ExcelUtil<WeCustomer> util = new ExcelUtil<WeCustomer>(WeCustomer.class); // ExcelUtil<WeCustomer> util = new ExcelUtil<WeCustomer>(WeCustomer.class);
return util.exportExcel(list, "customer"); // return util.exportExcel(list, "customer");
} // }
/** /**
* 获取企业微信客户详细信息 * 获取企业微信客户详细信息
...@@ -200,7 +166,7 @@ public class WeCustomerController extends BaseController ...@@ -200,7 +166,7 @@ public class WeCustomerController extends BaseController
@DeleteMapping("/removeLabel") @DeleteMapping("/removeLabel")
public AjaxResult removeLabel(@RequestBody WeMakeCustomerTag weMakeCustomerTag){ public AjaxResult removeLabel(@RequestBody WeMakeCustomerTag weMakeCustomerTag){
weCustomerService.removeLabel(weMakeCustomerTag); weCustomerService.makeLabel(weMakeCustomerTag);
return AjaxResult.success(); return AjaxResult.success();
......
...@@ -61,6 +61,13 @@ public class WeMsgTlpController extends BaseController ...@@ -61,6 +61,13 @@ public class WeMsgTlpController extends BaseController
} }
@PutMapping
public AjaxResult add(@RequestBody WeMsgTlp weMsgTlp){
weMsgTlpService.save(weMsgTlp);
return AjaxResult.success();
}
/** /**
* 删除欢迎语模板 * 删除欢迎语模板
*/ */
......
...@@ -215,6 +215,8 @@ mybatis-plus: ...@@ -215,6 +215,8 @@ mybatis-plus:
logic-delete-field: delFlag logic-delete-field: delFlag
logic-delete-value: 1 logic-delete-value: 1
logic-not-delete-value: 0 logic-not-delete-value: 0
mpp:
entityBasePath: com.linkwechat.**.domain
## MyBatis配置 ## MyBatis配置
#mybatis: #mybatis:
......
package com.linkwechat.framework.config; package com.linkwechat.framework.config;
import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
import com.baomidou.mybatisplus.extension.plugins.handler.TenantLineHandler;
import com.baomidou.mybatisplus.extension.plugins.inner.TenantLineInnerInterceptor;
import com.github.pagehelper.PageInterceptor; import com.github.pagehelper.PageInterceptor;
import com.linkwechat.common.config.RuoYiConfig; import com.linkwechat.common.config.RuoYiConfig;
import com.linkwechat.common.config.WeComeConfig; import com.linkwechat.common.config.WeComeConfig;
import com.linkwechat.common.core.domain.entity.WeCorpAccount;
import com.linkwechat.common.utils.SecurityUtils;
import net.sf.jsqlparser.expression.Expression;
import net.sf.jsqlparser.expression.StringValue;
import org.apache.ibatis.plugin.Interceptor; import org.apache.ibatis.plugin.Interceptor;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import java.util.Arrays;
/** /**
...@@ -35,55 +28,57 @@ public class MyBatisPlusConfig { ...@@ -35,55 +28,57 @@ public class MyBatisPlusConfig {
@Bean @Bean
public Interceptor[] plugins() { public Interceptor[] plugins() {
if(ruoYiConfig.isStartTenant()){ //多租户相关 return new Interceptor[]{new PageInterceptor()};
MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
interceptor.addInnerInterceptor(new TenantLineInnerInterceptor( // if(ruoYiConfig.isStartTenant()){ //多租户相关
new TenantLineHandler() { // MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
// 获取租户 ID 值表达式,只支持单个 ID 值 // interceptor.addInnerInterceptor(new TenantLineInnerInterceptor(
@Override // new TenantLineHandler() {
public Expression getTenantId() { // // 获取租户 ID 值表达式,只支持单个 ID 值
// @Override
try { // public Expression getTenantId() {
WeCorpAccount weCorpAccount //
= SecurityUtils.getLoginUser().getUser().getWeCorpAccount(); // try {
if(null != weCorpAccount){ // WeCorpAccount weCorpAccount
return new StringValue(weCorpAccount.getCorpId()); // = SecurityUtils.getLoginUser().getUser().getWeCorpAccount();
} // if(null != weCorpAccount){
}catch (Exception e){ // return new StringValue(weCorpAccount.getCorpId());
return null; // }
} // }catch (Exception e){
// return null;
return null; // }
} //
// 这是 default 方法,默认返回 false 表示所有表都需要拼多租户条件, // return null;
// 这里设置 role表不需要该条件 // }
@Override // // 这是 default 方法,默认返回 false 表示所有表都需要拼多租户条件,
public boolean ignoreTable(String tableName) { // // 这里设置 role表不需要该条件
// @Override
if(this.getTenantId()==null){ // public boolean ignoreTable(String tableName) {
return true; //
} // if(this.getTenantId()==null){
// return true;
// }
if (Arrays.asList(weComeConfig.getNeedTenant()) //
.contains(tableName)){ //
return false; // if (Arrays.asList(weComeConfig.getNeedTenant())
} // .contains(tableName)){
return true; // return false;
} // }
// return true;
@Override // }
public String getTenantIdColumn() { //
// @Override
return "corp_id"; // public String getTenantIdColumn() {
} //
})); // return "corp_id";
return new Interceptor[]{interceptor,new PageInterceptor() // }
}; // }));
// return new Interceptor[]{interceptor,new PageInterceptor()
}else{ // };
return new Interceptor[]{new PageInterceptor()}; //
} // }else{
// return new Interceptor[]{new PageInterceptor()};
// }
} }
} }
\ No newline at end of file \ No newline at end of file
const path = require('path')
const webpack = require('webpack')
const HtmlWebpackPlugin = require('html-webpack-plugin')
const htmlTemplateProcess = new HtmlWebpackPlugin({
template:
'html-withimg-loader!' + path.resolve(__dirname, '../src/taskProcess.html'),
hash: true,
chunks: ['common', 'taskProcess'],
inject: true,
minify: false,
filename: 'taskProcess.html'
})
const htmlTemplateIndex = new HtmlWebpackPlugin({
template:
'html-withimg-loader!' + path.resolve(__dirname, '../src/index.html'),
hash: true,
// chunks:['common','list'],
chunks: ['common', 'index'],
inject: true,
minify: false,
filename: 'index.html'
})
const htmlTemplateFission = new HtmlWebpackPlugin({
template:
'html-withimg-loader!' + path.resolve(__dirname, '../src/fission.html'),
hash: true,
// chunks:['common','list'],
chunks: ['common', 'fission'],
inject: true,
minify: false,
filename: 'fission.html'
})
var dev = {
entry: {
taskProcess: './src/js/taskProcess.js',
fission: './src/js/fission.js',
index: './src/js/index.js',
common: './src/js/common.js'
},
resolve: {
extensions: ['.ts', '.tsx', '.js', '.json']
},
module: {
rules: [
{
test: /\.js$/, // 匹配文件路径的正则表达式,通常我们都是匹配文件类型后缀
exclude: '/node_modules/',
loader: 'babel-loader' // 指定使用的 loader
},
{
test: /\.css$/,
exclude: /node_modules/,
// loader:'style-loader!css-loader?modules&localIdentName=[path][name]---[local]---[hash:base64:5]'
use: ['style-loader', 'css-loader']
},
{
test: /\.(png|jpg|gif)$/,
use: [
{
loader: 'file-loader',
options: {
esModule: false,
limit: 5 * 1024,
outputPath: 'images'
}
}
]
},
{
test: /\.(woff2?|eot|ttf|otf)(\?.*)?$/,
loader: 'url-loader',
options: {
limit: 10000
}
},
{
test: /\.html$/,
// html中的img标签
use: ['html-withimg-loader']
}
]
},
plugins: [
// 全局暴露统一入口
new webpack.ProvidePlugin({
$: 'jquery',
jQuery: 'jquery',
'window.jQuery': 'jquery'
}),
htmlTemplateIndex,
htmlTemplateProcess,
htmlTemplateFission,
new webpack.HotModuleReplacementPlugin()
]
}
module.exports = dev
const path = require('path')
const merge = require('webpack-merge');
const common = require('./webpack.common');
var dev = {
output:{
filename: '[name].bundle.js',
path:path.resolve(__dirname,'../','dist'),
// publicPath:'/',
},
devtool:'inline-source-map',
mode:"development",
devServer:{
// contentBase: path.join(__dirname, "../src"),
// publicPath:'/',
// host: "192.168.1.3",
host: "localhost",
port: "3333",
// overlay: true, // 浏览器页面上显示错误
// open: true, // 开启自动打开浏览器
// stats: "errors-only", //stats: "errors-only"表示只打印错误:
hot: true, // 开启热更新
historyApiFallback: true,
disableHostCheck:true,
// host:'0.0.0.0',
proxy: {
'/': {
// target: 'http://119.45.28.29:8090',
target: 'http://146.56.222.200:8090',
// target:'http://47.112.117.15:40001',
changeOrigin: true,
// ws: true,
pathRewrite: {
// "^/api": "/"
}
}
}
},
plugins:[
]
}
module.exports = merge(common, dev);
\ No newline at end of file \ No newline at end of file
const path = require('path');
const merge = require('webpack-merge');
const common = require('./webpack.common');
const {CleanWebpackPlugin} = require('clean-webpack-plugin')
const UglifyJSPlugin = require('uglifyjs-webpack-plugin');
module.exports = merge(common,{
output:{
filename: './js/[name].js',
path:path.resolve(__dirname,'../','dist'),
publicPath:'./',
},
mode:'production',
devtool:'none',
plugins:[
new CleanWebpackPlugin(),
new UglifyJSPlugin(),
]
})
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>扫码结果页面</title></head><body> <div class='container'> <div id="qrcode" class="qrcode"> <div class="qrcode-tip"> 长按识别进入群组 </div> <div class="qrcode-content"> <img id="qrcodeImg" src="" /> </div> </div> <div id="error" class="error-content"> <div id="message"> </div> </div> </div><script src="././js/fission.js?51a758de70d84e016a6f"></script><script src="././js/common.js?51a758de70d84e016a6f"></script></body></html>
\ No newline at end of file \ No newline at end of file
<<<<<<< HEAD
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0, initial-scale=1.0, user-scalable=no"> <title>linke-wechat</title></head><body> <div class="container"> <img src='' class='posterImg'/> <div class="footerLink"> <div class="sharePic" >分享图片</div> <div class="myTaskDetail">我的邀请任务进度</div> </div> </div><script src="././js/index.js?3b65a18ba668cfac92ab"></script><script src="././js/common.js?3b65a18ba668cfac92ab"></script></body></html>
=======
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0, initial-scale=1.0, user-scalable=no"> <title>linke-wechat</title></head><body> <div class="container"> <img src='' class='posterImg'/> <div class="footerLink"> <div class="sharePic" >分享图片</div> <div class="myTaskDetail">我的邀请任务进度</div> </div> </div><script src="././js/index.js?51a758de70d84e016a6f"></script><script src="././js/common.js?51a758de70d84e016a6f"></script></body></html>
>>>>>>> front_end_dev_1.5
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
This diff could not be displayed because it is too large.
<<<<<<< HEAD
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>任务进度查询</title></head><body> <div class='container'> <div class="title">活动兑奖</div> <div class="generalFont">任务完成后显示兑换码</div> <div class="generalContent"> <div class="generalBox"> <div class="listMsg"> <div class="generalFont">兑换链接</div> <div class="codeDetail codeLink"></div> </div> <div class="listMsg"> <div class="generalFont">兑奖图片</div> <!-- <div class="codeDetail codeImg">1024</div> --> <img class="codeDetail codeImg" src=''/> </div> <div class="listMsg"> <div class="generalFont">兑换规则</div> <div class="codeDetail codeNum"></div> </div> </div> </div> <div class="title">邀请列表</div> <div class="generalFont">您已邀请<span class="completeNum"></span>人,还差<span class="loseNum"></span>人,即可领奖</div> <div class="customersBox"> <!-- <div class='customersList'> <img src='' class='customersImg'/> <span>2020-01-03 00:00:00</span> <span class="customersSuccess">邀请成功</span> </div> --> </div> <div class="activityPoster"> <div>活动海报</div> <img src='' class='activityPosterImg'/> </div> </div><script src="././js/taskProcess.js?3b65a18ba668cfac92ab"></script><script src="././js/common.js?3b65a18ba668cfac92ab"></script></body></html>
=======
<!DOCTYPE html><html lang="en"><head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>任务进度查询</title></head><body> <div class='container'> <div class="title">活动兑奖</div> <div class="generalFont">任务完成后显示兑换码</div> <div class="generalContent"> <div class="generalBox"> <div class="listMsg"> <div class="generalFont">兑换链接</div> <div class="codeDetail codeLink"></div> </div> <div class="listMsg"> <div class="generalFont">兑奖图片</div> <!-- <div class="codeDetail codeImg">1024</div> --> <img class="codeDetail codeImg" src=''/> </div> <div class="listMsg"> <div class="generalFont">兑换规则</div> <div class="codeDetail codeNum"></div> </div> </div> </div> <div class="title">邀请列表</div> <div class="generalFont">您已邀请<span class="completeNum"></span>人,还差<span class="loseNum"></span>人,即可领奖</div> <div class="customersBox"> <!-- <div class='customersList'> <img src='' class='customersImg'/> <span>2020-01-03 00:00:00</span> <span class="customersSuccess">邀请成功</span> </div> --> </div> <div class="activityPoster"> <div>活动海报</div> <img src='' class='activityPosterImg'/> </div> </div><script src="././js/taskProcess.js?51a758de70d84e016a6f"></script><script src="././js/common.js?51a758de70d84e016a6f"></script></body></html>
>>>>>>> front_end_dev_1.5
This diff could not be displayed because it is too large.
{
"name": "dashboard-remy",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"dev": "webpack-dev-server --config config/webpack.dev.js",
"build": "webpack --config config/webpack.prod.js"
},
"author": "",
"license": "ISC",
"devDependencies": {
"@babel/core": "^7.10.3",
"@babel/preset-env": "^7.10.3",
"babel-loader": "^8.1.0",
"clean-webpack-plugin": "^3.0.0",
"cross-env": "^7.0.2",
"css-loader": "^3.6.0",
"file-loader": "^6.0.0",
"html-webpack-plugin": "^4.3.0",
"html-withimg-loader": "^0.1.16",
"style-loader": "^1.2.1",
"uglifyjs-webpack-plugin": "^2.2.0",
"url-loader": "^4.1.0",
"vconsole": "^3.4.0",
"webpack": "^4.43.0",
"webpack-cli": "^3.3.12",
"webpack-dev-server": "3.11.0",
"webpack-merge": "^4.2.2"
},
"dependencies": {
"jquery": "^3.5.1"
}
}
*{
margin:0;
padding: 0;
}
html,body{
height: 100%;
width: 100%;
}
\ No newline at end of file \ No newline at end of file
.container{
height: 100%;
background-color:rgb(239, 239, 244) ;
display: flex;
align-items: center;
}
.qrcode {
width: 100%;
display: flex;
justify-content: center;
flex-direction: column;
}
.qrcode-tip {
text-align: left;
font-size: 40px;
padding: 20px;
text-indent: 15%;
}
.qrcode-content {
width: 100%;
text-align: center;
}
.qrcode-content > img {
width: 70%;
}
.error-content {
text-align: center;
font-size: 40px;
width: 100%;
display: none;
}
.container{
height: 100%;
width: 100%;
background-color: #eeeeee;
}
.posterImg{
width: 100%;
}
.footerLink{
height: 2rem;
width: 100%;
background-color: #ffffff;
position: fixed;
left: 0;
bottom: 0;
display: flex;
justify-content: space-around;
align-items: center;
font-size: .36rem;
}
.sharePic{
background-color: cornflowerblue;
color: #ffffff;
height: 1.5rem;
line-height: 1.5rem;
text-align: center;
padding: 0 .7rem;
border-radius: 10px;
}
.myTaskDetail{
color: cornflowerblue;
}
\ No newline at end of file \ No newline at end of file
.title{
color: #000000;
font-size: 0.5rem;
padding: 1rem .5rem;
padding-bottom:.5rem;
background-color: #fff;
}
.container{
height: 100%;
background-color:rgb(239, 239, 244) ;
}
.generalFont{
color: #909399;
font-size: .3rem;
padding: 0 .5rem;
padding-bottom: .2rem;
}
.container>.generalFont{
background-color: #fff;
}
.generalBox{
background-color:rgb(246, 246, 249) ;
padding: .2rem
}
.listMsg{
display: flex;
margin-bottom: 20px;
}
.listMsg .generalFont{
width: 1.5rem;
margin-right: 30px;
text-align: right;
}
.codeDetail{
font-size: .3rem;
color: #000000;
}
.generalContent{
background-color: #fff;
padding: .5rem;
margin-bottom: .4rem;
}
.codeImg{
height: 1rem;
}
.customersList{
display: flex;
align-items: center;
font-size: .4rem;
background-color:rgb(246, 246, 249) ;
padding: .2rem;
}
.customersBox{
padding: .5rem;
background-color: #fff;
}
.customersSuccess{
flex:1;
text-align: right;
color: rgb(163, 269, 131);
}
.customersImg{
height: 1rem;
border-radius: 50%;
margin-right: .2rem;
}
.activityPoster{
padding:.5rem ;
font-size: .5rem;
background-color: #fff;
margin-top: .5rem;
}
.activityPosterImg{
width: 100%;
margin-top: .5rem;
}
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>扫码结果页面</title>
</head>
<body>
<div class='container'>
<div id="qrcode" class="qrcode">
<div class="qrcode-tip"> 长按识别进入群组 </div>
<div class="qrcode-content">
<img id="qrcodeImg" src="" />
</div>
</div>
<div id="error" class="error-content">
<div id="message">
</div>
</div>
</div>
</body>
</html>
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0, initial-scale=1.0, user-scalable=no">
<title>linke-wechat</title>
</head>
<body>
<div class="container">
<img src='' class='posterImg'/>
<div class="footerLink">
<div class="sharePic" >分享图片</div>
<div class="myTaskDetail">我的邀请任务进度</div>
</div>
</div>
</body>
</html>
\ No newline at end of file \ No newline at end of file
import request from './request'
export function getPoster(params) {
return request('/wecom/fission/poster', params, 'post')
}
export function getCustomerList(params) {
return request(
`/wecom/fission/${params.fissionId}/progress/${params.eid}`,
null,
'get'
)
}
export function getReward(params) {
return request(
`/wecom/reward/getRewardByFissionId/${params.fissionId}/${params.eid}`,
null,
'get'
)
}
export function getUserInfo(params) {
return request(`/wecom/user/getUserInfo`, params, 'get')
}
export function getToken(code) {
return request(`/weixin/auth/getToken?code=${code}`, null, 'get')
}
export function getWXUserInfo(params) {
return request(`/weixin/auth/getUserInfo`, params, 'get')
}
// export function getReward(params) {
// return request(`wecom/reward/getRewardByFissionId/${params.fissionId}/${params.eid}`,null,'get')
// }
export function setFissionComplete(fissionId, recordId, params) {
console.log('更新状态, 参数: ', params)
return request(
`/wecom/fission/complete/${fissionId}/records/${recordId}`,
params,
'post'
)
}
import vconsole from 'vconsole'
$(function(){
var dpr, rem, scale;
var docEl = document.documentElement;
var fontEl = document.createElement('style');
var metaEl = document.querySelector('meta[name="viewport"]');
dpr = window.devicePixelRatio || 1;
rem = docEl.clientWidth * dpr / 10;
scale = 1 / dpr;
// 设置viewport,进行缩放,达到高清效果
metaEl.setAttribute('content', 'width=' + dpr * docEl.clientWidth + ',initial-scale=' + scale + ',maximum-scale=' + scale + ', minimum-scale=' + scale + ',user-scalable=no');
// 设置data-dpr属性,留作的css hack之用
docEl.setAttribute('data-dpr', dpr);
// 动态写入样式
docEl.firstElementChild.appendChild(fontEl);
fontEl.innerHTML = 'html{font-size:' + rem + 'px!important;}';
window.dpr = dpr;
window.rem = rem;
var myConsole = new vconsole()
console.log('hello')
})
const config = {
code:''
}
export default config
\ No newline at end of file \ No newline at end of file
import '../css/fission.css'
import '../css/base.css'
import {getPoster,getUserInfo,getToken,getWXUserInfo, setFissionComplete} from './api'
import {getUrlParam,getWxCode} from './utils'
import config from './contant'
$(function(){
let userinfo = localStorage.getItem('userinfo')
//取缓存中的用户信息
if(userinfo){
try {
userinfo = JSON.parse(userinfo)
fissionComplete(userinfo.openId)
} catch (error) {
alert(error)
setErrorMessage('获取用户信息失败')
}
return
}
//缓存中没有用户信息,进入授权流程
getWxCode()
const code = config.code
console.log('code: ', code)
if(!code){
console.error('code获取失败')
//防止跳转前进入流程
setErrorMessage('微信授权失败')
return
}
try {
getToken(code)
.then(res=>{
let data =res.data
if(data && data.openId){
localStorage.setItem('userinfo',JSON.stringify(data))
fissionComplete(userinfo.openId)
} else {
setErrorMessage('获取用户信息失败')
}
})
} catch (error) {
alert(error)
setErrorMessage('获取用户信息失败')
}
})
function fissionComplete(openId) {
const fissionId = getUrlParam('fissionId');
const recordId = getUrlParam('recordId');
console.log('参数 fissionId: ', fissionId)
console.log('参数 recordId: ', recordId)
console.log('参数 openId: ', openId)
if (!(fissionId && recordId && openId)) {
setErrorMessage('缺失必要数据, 请联系管理员')
return
}
const wxparams = {
openId: openId,
lang: 'zh_CN'
}
getWXUserInfo(wxparams)
.then(resp=>{
let userData = resp.data;
setFissionComplete(fissionId, recordId, {
name: userData.nickName,
unionid: userData.unionId,
userid: userData.openId,
avatar: userData.headImgUrl
}).then((resp) => {
if (resp.code === 200 && resp.data) {
setQrCode(resp.data)
} else {
setErrorMessage('未获取到可用的二维码')
}
})
})
}
function setErrorMessage (message) {
$('#qrcode').css('display', 'none')
$('#error').css('display', 'block')
$('#message').html(message)
}
function setQrCode (qrcode) {
$('#qrcode').css('display', 'block')
$('#error').css('display', 'none')
$('#qrcodeImg').attr('src', qrcode)
}
import '../css/base.css'
import '../css/index.css'
import {getPoster,getUserInfo,getToken,getWXUserInfo} from './api'
import {getUrlParam,getWxCode} from './utils'
import config from './contant'
$(function(){
const taskFissionId = getUrlParam('fissionId');
$('.sharePic').click(function(){
alert('长按图片在弹出菜单中发送给朋友或者可保存图片分享至朋友圈')
});
let userinfo = localStorage.getItem('userinfo')
//取缓存中的用户信息
if(userinfo){
try {
userinfo = JSON.parse(userinfo)
getPosterFlow({openId:userinfo.openId,lang:"zh_CN"})
} catch (error) {
alert(error)
}
return
}
//缓存中没有用户信息,进入授权流程
getWxCode()
const code = config.code
if(!code){
//防止跳转前进入流程
return
}
try {
getToken(code)
.then(res=>{
let data =res.data
if(data && data.openId){
localStorage.setItem('userinfo',JSON.stringify(data))
getPosterFlow({openId:data.openId,lang:"zh_CN"})
}
})
} catch (error) {
alert(error)
}
})
//{openId:data.openId,lang:"zh_CN"}
function getPosterFlow(params){
const fissionTargetId = getUrlParam('fissionTargetId');
const posterId = getUrlParam('posterId');
const taskFissionId = getUrlParam('fissionId');
getWXUserInfo(params)
.then(resp=>{
let userData = resp.data;
let unionId = userData.unionId
getPoster({fissionTargetId,posterId,taskFissionId,unionId})
.then(res=>{
$('.posterImg').attr('src',res.data.posterUrl)
localStorage.setItem('postersUrl',res.data.posterUrl)
})
$('.myTaskDetail').click(function(){
window.location.href = `./taskProcess.html?eid=${unionId}&taskFissionId=${taskFissionId}`
});
})
}
const baseUrl = window.location.origin.includes('localhost')
? window.location.origin
: 'http://demo.linkwechat.cn:8090'
// 'http://106.13.201.219'
// const baseUrl = window.location.origin+'/mock/11'
// const baseUrl = 'http://47.112.117.15:40001/mock/11'
const request = (url, params, method = 'get') => {
url = baseUrl + url
params = method != 'get' && params ? JSON.stringify(params) : params
return new Promise((relosve, reject) => {
$.ajax({
url,
data: params,
dataType: 'JSON',
type: method,
contentType: 'application/json',
success(res) {
if (res.code !== 200) {
alert(res.msg)
}
relosve(res)
},
error(err) {
// console.log(err.status)
alert(url + err.status)
reject(err)
}
})
})
}
export default request
import '../css/taskProcess.css'
import '../css/base.css'
import { getCustomerList, getReward } from './api'
import { getUrlParam } from './utils'
// const data = {
// total:12,
// completed:9,
// customers:[
// {
// createTime:'string' ,
// updateTime:'string',
// externalUserid:'string',
// name:'string',
// avatar:'https://link-wechat-1251309172.cos.ap-nanjing.myqcloud.com/2021/03/01/77dc22bf-e483-45f0-86fa-d19a85b6e355.jpg',
// type:'number',
// gender:'number',
// isOpenChat:'number'
// }
// ]
// }
$(function () {
const postersUrl = localStorage.getItem('postersUrl')
$('.activityPosterImg').attr('src', postersUrl)
const fissionId = getUrlParam('taskFissionId')
const eid = getUrlParam('eid')
getCustomerList({ fissionId, eid }).then((res) => {
let data = res.data
let htmlStr = ''
data.customers.forEach((item) => {
htmlStr +=
"<div class='customersList'>" +
'<img src=' +
item.avatar +
" class='customersImg'/>" +
"<span class=''>" +
item.createTime +
'</span>' +
"<span class='customersSuccess'>邀请成功</span>" +
'</div>'
})
$('.completeNum').text(data.completed)
const left =
data.total - data.completed < 0 ? 0 : data.total - data.completed
$('.loseNum').text(left)
$('.customersBox').html(htmlStr)
})
getReward({ fissionId, eid }).then((res) => {
let data = res.data
$('.codeNum').text(data.rewardRule)
$('.codeLink').text(data.rewardUrl)
$('.codeImg').attr('src', data.rewardImageUrl)
})
})
import config from './contant'
export function getUrlParam (name) {
let reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)");
let r = window.location.search.substr(1).match(reg);
if (r != null) {
return unescape(r[2]);
}
return null;
}
export function getWxCode(){
let appid = "wxa57479bcd3f15461";
let code = getUrlParam("code"); //是否存在code
let local = window.location.origin.includes('localhost')?'http://h5.linkwechat.cn/test.html': window.location.href;
// let local = 'http://h5.x*****o.com/'
if (code == null || 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`
return false
// 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{
config.code = code
}
}
\ No newline at end of file \ No newline at end of file
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>任务进度查询</title>
</head>
<body>
<div class='container'>
<div class="title">活动兑奖</div>
<div class="generalFont">任务完成后显示兑换码</div>
<div class="generalContent">
<div class="generalBox">
<div class="listMsg">
<div class="generalFont">兑换链接</div>
<div class="codeDetail codeLink"></div>
</div>
<div class="listMsg">
<div class="generalFont">兑奖图片</div>
<!-- <div class="codeDetail codeImg">1024</div> -->
<img class="codeDetail codeImg" src=''/>
</div>
<div class="listMsg">
<div class="generalFont">兑换规则</div>
<div class="codeDetail codeNum"></div>
</div>
</div>
</div>
<div class="title">邀请列表</div>
<div class="generalFont">您已邀请<span class="completeNum"></span>人,还差<span class="loseNum"></span>人,即可领奖</div>
<div class="customersBox">
<!-- <div class='customersList'>
<img src='' class='customersImg'/>
<span>2020-01-03 00:00:00</span>
<span class="customersSuccess">邀请成功</span>
</div> -->
</div>
<div class="activityPoster">
<div>活动海报</div>
<img src='' class='activityPosterImg'/>
</div>
</div>
</body>
</html>
\ No newline at end of file \ No newline at end of file
## 开发
```bash
# 克隆项目
git clone https://gitee.com/LinkWeChat/link-wechat.git
# 进入项目目录
cd linkwe-ui
# 安装依赖
npm install
# 建议不要直接使用 cnpm 安装依赖,会有各种诡异的 bug。可以通过如下操作解决 npm 下载速度慢的问题
npm install --registry=https://registry.npm.taobao.org
# 启动服务
npm run serve
```
浏览器访问 http://localhost:80
## 发布
```bash
# 构建测试环境(暂未配置)
# npm run build:stage
# 构建生产环境
npm run build
```
module.exports = {
presets: [
// https://github.com/vuejs/vue-cli/tree/master/packages/@vue/babel-preset-app
'@vue/cli-plugin-babel/preset'
],
'env': {
'development': {
// babel-plugin-dynamic-import-node plugin only does one thing by converting all import() to require().
// This plugin can significantly increase the speed of hot updates, when you have a large number of pages.
'plugins': ['dynamic-import-node']
}
}
}
@echo off
echo.
echo [信息] 打包Web工程,生成dist文件。
echo.
%~d0
cd %~dp0
cd ..
npm run build:prod
pause
\ No newline at end of file \ No newline at end of file
@echo off
echo.
echo [信息] 安装Web工程,生成node_modules文件。
echo.
%~d0
cd %~dp0
cd ..
npm install --registry=https://registry.npm.taobao.org
pause
\ No newline at end of file \ No newline at end of file
@echo off
echo.
echo [Ϣ] ʹ Vue Web ̡
echo.
%~d0
cd %~dp0
cd ..
npm run dev
pause
\ No newline at end of file \ No newline at end of file
# Do not edit. File was generated by node-gyp's "configure" step
{
"target_defaults": {
"cflags": [],
"default_configuration": "Release",
"defines": [],
"include_dirs": [],
"libraries": [],
"msbuild_toolset": "v141",
"msvs_windows_target_platform_version": "10.0.17763.0"
},
"variables": {
"asan": 0,
"build_v8_with_gn": "false",
"coverage": "false",
"dcheck_always_on": 0,
"debug_nghttp2": "false",
"debug_node": "false",
"enable_lto": "false",
"enable_pgo_generate": "false",
"enable_pgo_use": "false",
"error_on_warn": "false",
"force_dynamic_crt": 0,
"host_arch": "x64",
"icu_data_in": "..\\..\\deps\\icu-tmp\\icudt67l.dat",
"icu_endianness": "l",
"icu_gyp_path": "tools/icu/icu-generic.gyp",
"icu_path": "deps/icu-small",
"icu_small": "false",
"icu_ver_major": "67",
"is_debug": 0,
"napi_build_version": "7",
"nasm_version": "2.14",
"node_byteorder": "little",
"node_debug_lib": "false",
"node_enable_d8": "false",
"node_install_npm": "true",
"node_module_version": 83,
"node_no_browser_globals": "false",
"node_prefix": "/usr/local",
"node_release_urlbase": "https://nodejs.org/download/release/",
"node_shared": "false",
"node_shared_brotli": "false",
"node_shared_cares": "false",
"node_shared_http_parser": "false",
"node_shared_libuv": "false",
"node_shared_nghttp2": "false",
"node_shared_openssl": "false",
"node_shared_zlib": "false",
"node_tag": "",
"node_target_type": "executable",
"node_use_bundled_v8": "true",
"node_use_dtrace": "false",
"node_use_etw": "true",
"node_use_node_code_cache": "true",
"node_use_node_snapshot": "true",
"node_use_openssl": "true",
"node_use_v8_platform": "true",
"node_with_ltcg": "true",
"node_without_node_options": "false",
"openssl_fips": "",
"openssl_is_fips": "false",
"ossfuzz": "false",
"shlib_suffix": "so.83",
"target_arch": "x64",
"v8_enable_31bit_smis_on_64bit_arch": 0,
"v8_enable_gdbjit": 0,
"v8_enable_i18n_support": 1,
"v8_enable_inspector": 1,
"v8_enable_lite_mode": 0,
"v8_enable_object_print": 1,
"v8_enable_pointer_compression": 0,
"v8_no_strict_aliasing": 1,
"v8_optimized_debug": 1,
"v8_promise_internal_field_count": 1,
"v8_random_seed": 0,
"v8_trace_maps": 0,
"v8_use_siphash": 1,
"want_separate_host_toolset": 0,
"nodedir": "C:\\Users\\77514\\AppData\\Local\\node-gyp\\Cache\\14.15.0",
"standalone_static_library": 1,
"msbuild_path": "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\BuildTools\\MSBuild\\15.0\\Bin\\MSBuild.exe"
}
}
const { run } = require('runjs')
const chalk = require('chalk')
const config = require('../vue.config.js')
const rawArgv = process.argv.slice(2)
const args = rawArgv.join(' ')
if (process.env.npm_config_preview || rawArgv.includes('--preview')) {
const report = rawArgv.includes('--report')
run(`vue-cli-service build ${args}`)
const port = 9526
const publicPath = config.publicPath
var connect = require('connect')
var serveStatic = require('serve-static')
const app = connect()
app.use(
publicPath,
serveStatic('./dist', {
index: ['index.html', '/']
})
)
app.listen(port, function () {
console.log(chalk.green(`> Preview at http://localhost:${port}${publicPath}`))
if (report) {
console.log(chalk.green(`> Report at http://localhost:${port}${publicPath}report.html`))
}
})
} else {
run(`vue-cli-service build ${args}`)
}
{
"compilerOptions": {
"baseUrl": "./",
"paths": {
"@/*": ["src/*"]
}
},
"exclude": ["node_modules", "dist"]
}
{
"name": "linkwechat",
"version": "0.1.0",
"description": "LinkWeChat",
"license": "GPL-3.0",
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"build:test": "vue-cli-service build --mode test",
"preview": "node build/index.js --preview",
"lint": "eslint --ext .js,.vue src",
"test:unit": "jest --clearCache && vue-cli-service test:unit",
"test:ci": "npm run lint && npm run test:unit",
"svgo": "svgo -f src/icons/svg --config=src/icons/svgo.yml",
"new": "plop"
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"src/**/*.{js,vue}": [
"eslint --fix",
"git add"
]
},
"keywords": [
"vue",
"admin",
"dashboard",
"element-ui",
"boilerplate",
"admin-wechat",
"management-system"
],
"repository": {
"type": "git",
"url": "https://gitee.com/LinkWeChat/link-wechat.git"
},
"dependencies": {
"@liripeng/vue-audio-player": "^1.2.8",
"@riophae/vue-treeselect": "0.4.0",
"awesome-qr": "^2.0.1-rc.0",
"axios": "0.18.1",
"clipboard": "2.0.4",
"core-js": "3.6.5",
"echarts": "4.2.1",
"element-resize-detector": "^1.2.2",
"element-ui": "^2.15.2",
"fabric": "^4.6.0",
"file-saver": "2.0.1",
"fuse.js": "3.4.4",
"js-beautify": "1.10.2",
"js-cookie": "2.2.0",
"jsencrypt": "3.0.0-rc.1",
"moment": "^2.29.1",
"normalize.css": "^8.0.1",
"nprogress": "0.2.0",
"path-to-regexp": "2.4.0",
"promise.prototype.finally": "^3.1.2",
"screenfull": "4.2.0",
"sortablejs": "1.8.4",
"uuid": "^8.3.2",
"video.js": "^7.11.4",
"videojs-contrib-hls": "^5.15.0",
"vue": "2.6.10",
"vue-amap": "^0.5.10",
"vue-count-to": "1.0.13",
"vue-cropper": "0.4.9",
"vue-quill-editor": "3.0.6",
"vue-router": "3.0.2",
"vue-splitpane": "1.0.4",
"vue-ueditor-wrap": "^2.4.4",
"vue-video-player": "^5.0.2",
"vuedraggable": "2.20.0",
"vuex": "3.1.0"
},
"devDependencies": {
"@vue/cli-plugin-babel": "4.4.4",
"@vue/cli-plugin-eslint": "4.4.4",
"@vue/cli-plugin-unit-jest": "4.4.4",
"@vue/cli-service": "4.4.4",
"@vue/test-utils": "1.0.0-beta.29",
"autoprefixer": "9.5.1",
"babel-eslint": "10.1.0",
"babel-jest": "23.6.0",
"babel-plugin-dynamic-import-node": "2.3.3",
"chalk": "2.4.2",
"chokidar": "2.1.5",
"connect": "3.6.6",
"eslint": "6.7.2",
"eslint-plugin-vue": "6.2.2",
"html-webpack-plugin": "3.2.0",
"husky": "1.3.1",
"lint-staged": "8.1.5",
"mockjs": "1.0.1-beta3",
"node-sass": "4.14.1",
"plop": "2.3.0",
"runjs": "4.3.2",
"sass-loader": "8.0.2",
"sass-resources-loader": "^2.1.0",
"script-ext-html-webpack-plugin": "2.1.3",
"script-loader": "0.7.2",
"serve-static": "1.13.2",
"svg-sprite-loader": "4.1.3",
"svgo": "1.2.0",
"vue-template-compiler": "2.6.10"
},
"engines": {
"node": ">=8.9",
"npm": ">= 3.0.0"
},
"browserslist": [
"> 1%",
"last 2 versions"
]
}
No preview for this file type
<!DOCTYPE html>
<html>
<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, maximum-scale=1, user-scalable=no">
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
<!-- <script type="text/javascript" src="//api.map.baidu.com/api?v=2.0&ak=wI3zLlyN01Ej3ZD6ZD4WiuoE8N6AC6Lm"></script> -->
<title>
<%= VUE_APP_TITLE %>
</title>
<style>
html,
body,
#app {
height: 100%;
margin: 0px;
padding: 0px;
}
.chromeframe {
margin: 0.2em 0;
background: #ccc;
color: #000;
padding: 0.2em 0;
}
#loader-wrapper {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 999999;
}
#loader {
display: block;
position: relative;
left: 50%;
top: 50%;
width: 150px;
height: 150px;
margin: -75px 0 0 -75px;
border-radius: 50%;
border: 3px solid transparent;
border-top-color: #FFF;
-webkit-animation: spin 2s linear infinite;
-ms-animation: spin 2s linear infinite;
-moz-animation: spin 2s linear infinite;
-o-animation: spin 2s linear infinite;
animation: spin 2s linear infinite;
z-index: 1001;
}
#loader:before {
content: "";
position: absolute;
top: 5px;
left: 5px;
right: 5px;
bottom: 5px;
border-radius: 50%;
border: 3px solid transparent;
border-top-color: #FFF;
-webkit-animation: spin 3s linear infinite;
-moz-animation: spin 3s linear infinite;
-o-animation: spin 3s linear infinite;
-ms-animation: spin 3s linear infinite;
animation: spin 3s linear infinite;
}
#loader:after {
content: "";
position: absolute;
top: 15px;
left: 15px;
right: 15px;
bottom: 15px;
border-radius: 50%;
border: 3px solid transparent;
border-top-color: #FFF;
-moz-animation: spin 1.5s linear infinite;
-o-animation: spin 1.5s linear infinite;
-ms-animation: spin 1.5s linear infinite;
-webkit-animation: spin 1.5s linear infinite;
animation: spin 1.5s linear infinite;
}
@-webkit-keyframes spin {
0% {
-webkit-transform: rotate(0deg);
-ms-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(360deg);
-ms-transform: rotate(360deg);
transform: rotate(360deg);
}
}
@keyframes spin {
0% {
-webkit-transform: rotate(0deg);
-ms-transform: rotate(0deg);
transform: rotate(0deg);
}
100% {
-webkit-transform: rotate(360deg);
-ms-transform: rotate(360deg);
transform: rotate(360deg);
}
}
#loader-wrapper .loader-section {
position: fixed;
top: 0;
width: 51%;
height: 100%;
background: #7171C6;
z-index: 1000;
-webkit-transform: translateX(0);
-ms-transform: translateX(0);
transform: translateX(0);
}
#loader-wrapper .loader-section.section-left {
left: 0;
}
#loader-wrapper .loader-section.section-right {
right: 0;
}
.loaded #loader-wrapper .loader-section.section-left {
-webkit-transform: translateX(-100%);
-ms-transform: translateX(-100%);
transform: translateX(-100%);
-webkit-transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
}
.loaded #loader-wrapper .loader-section.section-right {
-webkit-transform: translateX(100%);
-ms-transform: translateX(100%);
transform: translateX(100%);
-webkit-transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
}
.loaded #loader {
opacity: 0;
-webkit-transition: all 0.3s ease-out;
transition: all 0.3s ease-out;
}
.loaded #loader-wrapper {
visibility: hidden;
-webkit-transform: translateY(-100%);
-ms-transform: translateY(-100%);
transform: translateY(-100%);
-webkit-transition: all 0.3s 1s ease-out;
transition: all 0.3s 1s ease-out;
}
.no-js #loader-wrapper {
display: none;
}
.no-js h1 {
color: #222222;
}
#loader-wrapper .load_title {
font-family: 'Open Sans';
color: #FFF;
font-size: 19px;
width: 100%;
text-align: center;
z-index: 9999999999999;
position: absolute;
top: 60%;
opacity: 1;
line-height: 30px;
}
#loader-wrapper .load_title span {
font-weight: normal;
font-style: italic;
font-size: 13px;
color: #FFF;
opacity: 0.5;
}
</style>
</head>
<body>
<div id="app">
<div id="loader-wrapper">
<div id="loader"></div>
<div class="loader-section section-left"></div>
<div class="loader-section section-right"></div>
<div class="load_title">正在加载系统资源,请耐心等待</div>
</div>
</div>
</body>
</html>
\ No newline at end of file \ No newline at end of file
User-agent: *
Disallow: /
\ No newline at end of file \ No newline at end of file
<template>
<div id="app">
<router-view />
</div>
</template>
<script>
export default {
name: 'App'
}
</script>
import request from '@/utils/request'
const service = window.CONFIG.services.wecom + '/chat'
/**
* 侧边栏列表
* @param {*} params
*/
export function getList() {
return request({
url: service + '/side/list'
})
}
/**
* 查询素材列表
* @param {*} params
* { categoryId:类目id
search:搜索的值
mediaType: '' 0 图片(image)、1 语音(voice)、2 视频(video),3 普通文件(file), 4 文本
}
*/
export function getMaterialList(params) {
return request({ url: '/wecom/chat/item/mList', params })
}
/**
* 更新侧边栏信息
* @param {*} data
* {
"sideId": "",
"mediaType": "0 图片(image)、1 语音(voice)、2 视频(video),3 普通文件(file) 4 文本 5 海报",
"sideName": "聊天工具栏名称",
"total": "已抓取素材数量",
"using": "是否启用 0 启用 1 未启用"
}
*/
export function update(data) {
return request({
url: service + '/side',
method: 'put',
data
})
}
/**
* 侧边栏抓取素材
* @param {*} data
* {
"sideId": "",
"materialIds": "素材id列表",
"mediaType": "素材类型 0 图片(image)、1 语音(voice)、2 视频(video),3 普通文件(file) 4 文本 5 海报",
"checkAll": "是否全选 0 全选 1 非全选"
}
*/
export function getMaterial(data) {
return request({
url: service + '/item',
method: 'put',
data
})
}
import request from '@/utils/request'
const service = window.CONFIG.services.wecom + '/weapp'
/**
* 列表
* @param {*} params
*/
export function getList() {
return request({
url: service + '/list'
})
}
/**
* 更新
* @param {*} data
* {
* agentId number 非必须企业应用的id
reportLocationFlag number 非必须企业应用是否打开地理位置上报 0:不上报;1:进入会话上报;
logoMediaid number 非必须企业应用头像的mediaid,通过素材管理接口上传图片获得mediaid,上传后会自动裁剪成方形和圆形两个头像
agentName number 非必须企业应用名称,长度不超过32个utf8字符
description number 非必须企业应用详情,长度为4至120个utf8字符
redirectDomain number 非必须企业应用可信域名
isreportenter number 非必须是否上报用户进入应用事件。0:不接收;1:接收。
home_url number 非必须应用主页url。url必须以http或者https开头
id string 必须主键id
* }
*/
export function update(data) {
return request({
url: service + '/updateWeApp',
method: 'put',
data
})
}
// 添加
export function add(data) {
return request({
url: service + '/addWeApp',
method: 'post',
data
})
}
import request from '@/utils/request'
import { dataURLtoFile } from '@/utils/common'
const service = window.CONFIG.services.common
export function upload(data) {
return request({
url: service + '/uploadFile2Cos',
method: 'POST',
data,
})
}
/**
* 下载网络连接文件
* @param {*} params
{
url=文件路径&
name=文件名称,带后缀
}
*/
export function download(url, name) {
return (
process.env.VUE_APP_BASE_API +
`/common/download/url?url=${url}&name=${name}`
)
}
/**
* 上传文件
* @param {*} data
{
"dataURL": 本地文件(base64)
}
*/
export function uploadDataURL(dataURL) {
const data = new window.FormData()
const f = dataURLtoFile(dataURL)
data.append('file', f)
return request({
url: process.env.VUE_APP_BASE_API +
'/common/uploadFile2Cos',
method: 'post',
processData: false,
data,
})
}
import request from '@/utils/request'
const service = window.CONFIG.services.wecom + '/communityGroupSop'
/**
* 获取群SOP列表
* @param {*} params
*
*/
export function getList(params) {
return request({
url: service + '/list',
method: 'get',
params,
})
}
/**
* 获取群SOP详情
* @param {*} params
*
*/
export function getDetail(id) {
return request({
url: service + '/' + id,
method: 'get',
})
}
/**
* 新增群SOP
* @param {Object} data
{
"ruleName": "string",
"groupIdList": [],
"title": "string",
"content": "string",
"materialIdList": [],
"startExeTime": "string",
"stopExeTime": "string",
}
*/
export function add(data) {
return request({
url: service + '/',
method: 'post',
data,
})
}
/**
* 修改群SOP
* @param {*} data
{
"ruleName": "string",
"groupIdList": [],
"title": "string",
"content": "string",
"materialIdList": [],
"startExeTime": "string",
"stopExeTime": "string",
}
*/
export function update(id, data) {
return request({
url: service + '/' + id,
method: 'put',
data,
})
}
/**
* 删除群SOP
* @param {*} ids
*/
export function remove(ids) {
return request({
url: service + '/' + ids,
method: 'DELETE',
})
}
import request from '@/utils/request'
const service = window.CONFIG.services.wecom + '/communityKeywordGroup'
/**
* 获取关键词拉群列表
* @param {*} params
*
*/
export function getList(params) {
return request({
url: service + '/list',
method: 'get',
params,
})
}
/**
* 获取关键词拉群详情
* @param {*} params
*
*/
export function getDetail(id) {
return request({
url: service + '/' + id,
method: 'get',
})
}
/**
* 新增关键词拉群
* @param {Object} data
{
"taskName": "string",
"groupCodeId": 0,
"welcomeMsg": "string",
"keywords": "string",
}
*/
export function add(data) {
return request({
url: service + '/',
method: 'post',
data,
})
}
/**
* 修改关键词拉群
* @param {*} data
{
"taskName": "string",
"groupCodeId": 0,
"welcomeMsg": "string",
"keywords": "string",
}
*/
export function update(id, data) {
return request({
url: service + '/' + id,
method: 'put',
data,
})
}
/**
* 删除关键词拉群
* @param {*} ids
*/
export function remove(ids) {
return request({
url: service + '/' + ids,
method: 'DELETE',
})
}
import request from '@/utils/request'
const service = window.CONFIG.services.wecom + '/communityNewGroup'
/**
* 获取新客自动拉群列表
* @param {*} params
*
*/
export function getList(params) {
return request({
url: service + '/list',
method: 'get',
params,
})
}
/**
* 获取新客自动拉群详情
* @param {*} params
*
*/
export function getDetail(id) {
return request({
url: service + '/' + id,
method: 'get',
})
}
/**
* 新增新客自动拉群
* @param {Object} data
{
"codeName": "string",
"groupCodeId": 'string',
"skipVerify": true,
"tagList": [],
"emplList": [],
"welcomeMsg": "string"
}
*/
export function add(data) {
return request({
url: service + '/',
method: 'post',
data,
})
}
/**
* 修改新客自动拉群
* @param {*} data
{
"codeName": "string",
"groupCodeId": 'string',
"skipVerify": true,
"tagList": [],
"emplList": [],
"welcomeMsg": "string"
}
*/
export function update(id, data) {
return request({
url: service + '/' + id,
method: 'put',
data,
})
}
/**
* 删除新客自动拉群
* @param {*} ids
*/
export function remove(ids) {
return request({
url: service + '/' + ids,
method: 'DELETE',
})
}
/**
* 批量下载
* @param {*} 员工活码ids,多个逗号隔开
*/
export function downloadBatch(ids) {
return request({
url: service + '/downloadBatch',
params: {
ids,
},
responseType: 'blob',
})
}
export function download(id) {
return request({
url: service + '/download',
params: {
id,
},
responseType: 'blob',
})
}
import request from '@/utils/request'
const service = window.CONFIG.services.wecom + '/communityPresTagGroup'
/**
* 获取老客标签建群列表
* @param {*} params
*
*/
export function getList(params) {
return request({
url: service + '/list',
method: 'get',
params,
})
}
/**
* 获取老客标签建群详情
* @param {*} params
* id: 老客标签建群任务ID
*/
export function getDetail(id) {
return request({
url: service + '/' + id,
method: 'get',
})
}
/**
* 新增老客标签建群
* @param {Object} data
{
"taskName": "string",
"welcomeMsg": "string",
"sendType": 0,
"groupCodeId": "string",
"weOldGroupTagList": [],
"weOldGroupUseScopeList": [],
"sendScope": 0,
"sendGender": 0,
"cusBeginTime": "string",
"cusEndTime": "string",
}
*/
export function add(data) {
return request({
url: service + '/',
method: 'post',
data,
})
}
/**
* 修改老客标签建群
* @param {*} data
{
"taskName": "string",
"welcomeMsg": "string",
"sendType": 0,
"groupCodeId": "string",
"weOldGroupTagList": [],
"weOldGroupUseScopeList": [],
"sendScope": 0,
"sendGender": 0,
"cusBeginTime": "string",
"cusEndTime": "string",
}
*/
export function update(id, data) {
return request({
url: service + '/' + id,
method: 'put',
data,
})
}
/**
* 删除老客标签建群
* @param {*} ids
*/
export function remove(ids) {
return request({
url: service + '/' + ids,
method: 'DELETE',
})
}
/**
* 客户统计
* @param {*} params
* id: 老客标签建群任务ID
*/
export function getStat(id) {
return request({
url: service + '/stat/' + id,
method: 'get',
})
}
\ No newline at end of file \ No newline at end of file
import request from '@/utils/request'
// 外部联系人 会话列表
const getExternalChatList = (fromId) => {
return request({
url: '/chat/msg/selectExternalChatList/' + fromId,
method: 'get'
})
}
// 单聊 会话列表
const selectAloneChatList = (params) => {
return request({
url: '/chat/msg/selectAloneChatList',
method: 'get',
params
})
}
// 内部联系人列表
const getInternalChatList = (fromId) => {
return request({
url: '/chat/msg/selectInternalChatList/' + fromId,
method: 'get'
})
}
const getGroupChatList = (fromId) => {
return request({
url: '/chat/msg/selectGroupChatList/' + fromId,
method: 'get'
})
}
// const chatList = (params) => {
// return request({
// url: '/chat/msg/list',
// method: 'get',
// params
// })
// }
const indexTable = () => {
return request({
url: '/wecom/page/getCorpBasicData',
method: 'get'
})
}
const indexEchart = () => {
return request({
url: '/wecom/page/getCorpRealTimeData',
method: 'get'
})
}
// 全文检索 会话列表
export const getChatList = (params) => {
return request({
url: '/chat/msg/selectFullSearchChatList',
method: 'get',
params
})
}
// 全文检索 导出列表
export const exportList = (params) => {
return request({
url: '/chat/msg/selectFullSearchChatList/export',
method: 'get',
params
// responseType: 'blob'
})
}
//
export const content = {
indexEchart,
indexTable,
getExternalChatList,
selectAloneChatList,
getInternalChatList,
getGroupChatList,
// chatList,
getChatList
}
export default content
/***
* @file:
* @author: qi.yeqing
* @Date: 2021-05-25 11:19:34
*/
import request from '@/utils/request'
const service = window.CONFIG.services.wecom + '/sensitive'
/**
* 获取敏感词触发列表
* @param {*} params
*
*/
export function getSecurityList(params) {
return request({
url: service + '/hit/list',
method: 'get',
params,
})
}
/**
* 获取敏感词设置列表
* @param {*} params
*
*/
export function getSettingSensitiveList(params) {
return request({
url: service + '/list',
method: 'get',
params,
})
}
/**
* 添加敏感词设置
* @param {*} params
*
*/
export function addSettingSensitive(data) {
return request({
url: service,
method: 'post',
data: data
})
}
/**
* 修改敏感词设置
* @param {*} params
*
*/
export function modifySettingSensitive(data) {
return request({
url: service,
method: 'put',
data: data
})
}
/**
* 获取敏感词详情
* @param {*} params
*
*/
export function getSensitiveDetails(tableId) {
return request({
url: service + '/' + tableId,
method: 'get'
})
}
/**
* 删除敏感词
* @param {*} params
*
*/
export function deleteSensitive(tableId) {
return request({
url: service + '/' + tableId,
method: 'delete'
})
}
/**
* 获取敏感行为警告敏感记录列表
* @param {*} params
*
*/
export function getSensitiveRecord(params) {
return request({
url: service + '/list',
method: 'get',
params,
})
}
/**
* 获取敏感行为管理列表
* @param {*} params
*
*/
export function getSensitiveManagement(params) {
return request({
url: service + '/act/list',
method: 'get',
params,
})
}
import request from '@/utils/request'
const service = window.CONFIG.services.wecom + '/user'
/**
* 获取离职已分配员工列表
* @param {*} params
* {
pageNum:
pageSize:
beginTime:
endTime:
userName:
}
*/
export function getList(params) {
return request({
url: service + '/leaveUserAllocateList',
params
})
}
/**
* 获取离职未分配员工列表
* @param {*} params
* {
pageNum:
pageSize:
beginTime:
endTime:
userName:
}
*/
export function getListNo(params) {
return request({
url: service + '/leaveUserNoAllocateList',
params
})
}
/**
* 分配离职员工数据
* @param {*} data
{
"handoverUserid": "原跟进成员的userid",
"takeoverUserid": "接替成员的userid"
}
*/
export function allocate(data) {
return request({
url: service + '/allocateLeaveUserAboutData',
method: 'put',
data
})
}
/**
* 离职已分配客户
* @param {*} params
{
"pageNum": 0,
"pageSize": 0,
"beginTime": "",
"endTime": "",
"handoverUserId": ""
}
*/
export function getAllocateCustomers(params) {
return request({
url: service + '/getAllocateCustomers',
params
})
}
/**
* 离职已分配客户群
* @param {*} params
{
"pageNum": 0,
"pageSize": 0,
"beginTime": "",
"endTime": "",
"oldOwner": "" 原群主ID
}
*/
export function getAllocateGroups(params) {
return request({
url: service + '/getAllocateGroups',
params
})
}
import request from '@/utils/request'
const service = window.CONFIG.services.wecom + '/group'
/**
* 客户群列表
* @param {*} data
* {
* pageNum:
pageSize:
groupName:
beginTime:
endTime:}
*/
export function getList(params) {
return request({
url: service + '/chat/list',
method: 'get',
params,
})
}
/**
* 群成员列表
* @param {*} params
* {
"groupId": "群id",
"memberName": "成员名称",
"pageNum": "",
"pageSize": ""
}
*/
export function getMembers(params) {
return request({
url: service + '/chat/members',
params,
})
}
/**
* 客户群同步接口
*/
export function sync() {
return request({
url: service + '/chat/synchWeGroup',
})
}
import request from '@/utils/request'
const service = window.CONFIG.services.wecom + '/customer'
/**
* 客户列表
* @param {*} params
* {
"pageNum": "当前页",
"pageSize": "每页显示条数",
"name": "客户名称",
"userId": "添加人id",
"tagIds": "标签id,多个标签,id使用逗号隔开",
"beginTime": "开始时间",
"endTime": "结束时间"
delFlag: 0 客户状态 0正常 1删除
}
*/
export function getListNew(params) {
return request({
url: service + '/findWeCustomerList',
method: 'get',
params
})
}
/**
* 客户列表
* @param {*} params
* {
"pageNum": "当前页",
"pageSize": "每页显示条数",
"name": "客户名称",
"userId": "添加人id",
"tagIds": "标签id,多个标签,id使用逗号隔开",
"beginTime": "开始时间",
"endTime": "结束时间"
status: 0 客户状态 0正常 1删除
}
*/
export function getList(params) {
return request({
url: service + '/list',
method: 'get',
params
})
}
/**
* 客户同步接口
*/
export function sync() {
return request({
url: service + '/synchWeCustomer'
})
}
/**
* 编辑客户标签
* @param {*} data
* {
"externalUserid": "外部联系人userid",
"addTag": [{
"id": "标签id",
"groupId": "标签组id",
"name": "标签名"
}]
}
*/
export function makeLabel(data) {
return request({
url: service + '/makeLabel',
method: 'post',
data
})
}
/**
* 移除客户标签
* @param {*} data
* {
"externalUserid": "外部联系人userid",
"addTag": [{
"id": "标签id",
"groupId": "标签组id",
"name": "标签名"
}]
}
*/
export function removeLabel(data) {
return request({
url: service + '/removeLabel',
method: 'DELETE',
data
})
}
/**
* 客户生日编辑
* @param {*} data
* {
"externalUserid": "",
"birthday": ""
}
*/
export function updateBirthday(data) {
return request({
url: service,
method: 'PUT',
data
})
}
// 导出用户
export function exportCustomer(query) {
return request({
url: service + '/export',
method: 'get',
params: query
})
}
/**
*客户详情
* @param {*} externalUserid
*/
export function getDetail(externalUserid) {
return request({
url: service + '/getCustomersByUserId/' + externalUserid
})
}
/**
* 客户流失通知开关
* @param {*} status [string] 是 客户流失通知开关 0:关闭 1:开启
*/
export function lossRemind(status) {
return request({
url: window.CONFIG.services.wecom + '/corp/startCustomerChurnNoticeSwitch/' + status,
method: 'PUT'
})
}
export function getLossRemindStatus(status) {
return request({
url: window.CONFIG.services.wecom + '/corp/getCustomerChurnNoticeSwitch/'
})
}
import request from '@/utils/request'
const service = window.CONFIG.services.wecom + '/group'
// 客户标签
/**
* 标签列表获取
* {
"pageNum": "当前页",
"pageSize": "每页显示条数",
"gourpName": "标签组名"
}
*/
export function getList(params) {
return request({
url: service + '/list',
params,
})
}
/**
* 新增客户标签
* @param {Object} data
{
"gourpName": "标签组名称",
"weTags": [{
"name": "标签名"
}]
}
*/
export function add(data) {
return request({
url: service,
method: 'post',
data,
})
}
/**
* 客户标签编辑
* @param {*} data
{
"id": "主键",
"gourpName": "标签分组名",
"weTags": [{
"id": "标签id",
"groupId": "标签组id",
"name": "标签名",
"status": "标签状态,如果编辑的时候删除标签,只需要把该字段设置为1"
}]
}
*/
export function update(data) {
return request({
url: service,
method: 'put',
data,
})
}
/**
* 标签批量删除接口
* @param {*} ids
*/
export function remove(ids) {
return request({
url: service + '/' + ids,
method: 'DELETE',
})
}
/**
* 同步标签
*/
export function syncTag() {
return request({
url: service + '/synchWeTags',
})
}
import request from '@/utils/request'
const service = window.CONFIG.services.wecom + '/actual'
/**
* 获取实际群码
* @param {*} params
{
"groupCodeId": "群活码ID",
"pageNum": "当前页",
"pageSize": "每页显示条数",
"state": "状态",
}
*/
export function getList(params) {
return request({
url: service + '/list',
params
})
}
/**
* 添加实际群码
* @param {*} data
{
"groupName": 群名称,
"actualGroupQrCode": 实际群码图片,
"effectTime": 有效期,
"scanCodeTimesLimit": 扫码次数限制,
"chatId": 客户群,
"chatGroupName": 客户群名称
}
*/
export function add(data) {
return request({
url: service + '/',
method: 'post',
data
})
}
/**
* 添加实际群码
* @param {*} data
{
"id": 实际群码ID,
"groupName": 群名称,
"actualGroupQrCode": 实际群码图片,
"effectTime": 有效期,
"scanCodeTimesLimit": 扫码次数限制,
"chatId": 客户群,
"chatGroupName": 客户群名称
}
*/
export function update(data) {
return request({
url: service + '/',
method: 'put',
data
})
}
/**
* 删除实际群码
* @param {*}
* "ids": 实际群活ID,多个ID以逗号分隔
*/
export function remove(ids) {
return request({
url: service + '/' + ids,
method: 'delete',
})
}
import request from '@/utils/request'
const service = window.CONFIG.services.wecom + '/groupCode'
/**
* 获取群活码列表
* @param {*} params
{
"pageNum": "当前页",
"pageSize": "每页显示条数",
"activityName": "活码名",
"createBy": "创建人",
"beginTime": "开始时间",
"endTime": "结束时间"
}
*/
export function getList(params) {
return request({
url: service + '/list',
params
})
}
/**
* 新增群活码
* @param {*} data
{
"file": 活码头像
"activityName": 活码名称
"activityDesc": 活码描述
"guide": 引导语
"joinGroupIsTip": 进群是否提示:1:是;0:否
"tipMsg": 进群提示语
"customerServerQrCode":客服二维码
}
*/
export function add(data) {
return request({
url: service + '/',
method: 'post',
data,
})
}
/**
* 更新群活码
* @param {*} id 群活码ID
* @param {*} data
{
"file": 活码头像
"activityName": 活码名称
"activityDesc": 活码描述
"guide": 引导语
"joinGroupIsTip": 进群是否提示:1:是;0:否
"tipMsg": 进群提示语
"customerServerQrCode":客服二维码
}
*/
export function update(id, data) {
return request({
url: service + '/' + id,
method: 'put',
data,
})
}
/**
* 根据ID获取群活码数据
* @param {*} params
*/
export function getDetail(id) {
return request({
url: service + '/' + id,
})
}
/**
* 删除群活码
* @param {*}
* "ids": 群活码ID,多个ID以逗号分隔
*/
export function remove(ids) {
return request({
url: service + '/' + ids,
method: 'delete',
})
}
/**
* 批量下载群活码
* @param {*}
* "ids": 群活码ID,多个ID以逗号分隔
*/
export function downloadBatch(ids) {
return request({
url: service + '/downloadBatch',
params: {
ids,
},
responseType: 'blob'
})
}
/**
* 下载群活码
* @param {*}
* "id": 群活码ID,多个ID以逗号分隔
*/
export function download(id) {
return request({
url: service + '/download',
params: {
id,
},
responseType: 'blob'
})
}
import request from '@/utils/request'
const service = window.CONFIG.services.wecom + '/code'
/**
* 获取员工活码列表
* @param {*} params
{
"pageNum": "当前页",
"pageSize": "每页显示条数",
"useUserName": "使用员工姓名",
"mobile": "使用员工手机号",
"activityScene": "活动场景",
"createBy": "createBy",
"beginTime": "开始时间",
"endTime": "结束时间"
}
*/
export function getList(params) {
return request({
url: service + '/list',
params,
})
}
/**
* 根据id获取员工活码详情
* @param {*} params
*/
export function getDetail(id) {
return request({
url: service + '/' + id,
})
}
/**
* 编辑员工活码
* @param {*} data
{
"id": "员工活码id",
"isJoinConfirmFriends": "客户添加时无需经过确认自动成为好友",
"codeType": "活码类型:1:单人;2:多人;3:批量;",
"activityScene": "活动场景",
"welcomeMsg": "欢迎语",
"mediaId": "素材的id",
"weEmpleCodeUseScops": [{
"id": "主键",
"empleCodeId": "员工活码id",
"useUserId": "活码类型下业务使用人的id"
}],
"weEmpleCodeTags": [{
"id": "",
"tagId": "标签id",
"tagName": "标签",
"empleCodeId": "员工活码id"
}]
}
*/
export function update(data) {
return request({
url: service + '/update',
method: 'put',
data,
})
}
/**
* 新增员工活码
* @param {*} data
{
"codeType": "活码类型:1:单人;2:多人;3:批量;",
"isJoinConfirmFriends": "客户添加时无需经过确认自动成为好友:1:是;0:否",
"activityScene": "活动场景",
"welcomeMsg": "欢迎语",
"weEmpleCodeUseScops": [{
"businessId": "使用人员id或者组织架构id",
"businessName": "使用名称",
"businessIdType": "业务id类型1:组织机构id,2:成员id"
}],
"weEmpleCodeTags": [{
"tagId": "标签id",
"tagName": "标签"
}],
mediaId: ''
}
*/
export function add(data) {
return request({
url: service + '/add',
method: 'post',
data,
})
}
/**
* 批量新增员工活码
* @param {*} data
*/
export function batchAdd(data) {
return request({
url: service + '/batchAdd',
method: 'post',
data,
})
}
/**
* 删除员工活码
* @param {*} id
*/
export function remove(id) {
return request({
url: service + '/delete/' + id,
method: 'delete',
})
}
/**
*获取员工二维码
* @param {*} params
{
userIds=员工id,多个逗号隔离&
departmentIds=部门id,多个逗号隔离
}
*/
export function getQrcode(params) {
return request({
url: service + '/getQrcode',
params,
})
}
/**
* 员工活码批量下载
* @param {*} 员工活码ids,多个逗号隔开
*/
export function downloadBatch(ids) {
return request({
url: service + '/downloadBatch',
params: {
ids,
},
responseType: 'blob'
})
}
export function download(id) {
return request({
url: service + '/download',
params: {
id,
},
responseType: 'blob'
})
}
/**
* 成员添加客户统计
* @param {*} params
* userId=成员id&addWay=添加类型,二维码:1&beginTime=开始时间&endTime=结束时间
*/
export function getUserAddCustomerStat(params) {
return request({
url: service + '/getUserAddCustomerStat',
params,
})
}
import request from '@/utils/request'
const service = window.CONFIG.services.wecom + '/tlp'
/**
* 获取欢迎语列表
* @param {*} params
{
"pageNum": "当前页",
"pageSize": "每页显示条数",
"welcomeMsg": "欢迎语关键词",
"welcomeMsgTplType": " 欢迎语模板类型:1:员工欢迎语;2:部门员工欢迎语;3:客户群欢迎语"
}
*/
export function getList(params) {
return request({
url: service + '/list',
params,
})
}
/**
* 根据欢迎语模板id获取模板使用范围
* @param {*} id
*/
export function getScop(id) {
return request({
url: service + '/scop/' + id,
})
}
/**
* 编辑欢迎语模板
* @param {*} data
{
"id": "主键",
"mediaId": "素材的id",
"welcomeMsg": "欢迎语",
"welcomeMsgTplType": "欢迎语模板类型:1:员工欢迎语;2:部门员工欢迎语;3:客户群欢迎语",
"weMsgTlpScopes": [
{
"useUserId": "使用人员id"
}
]
}
*/
export function update(data) {
return request({
url: service,
method: 'put',
data,
})
}
/**
* 新增欢迎语模板
* @param {*} data
{
"welcomeMsg": "欢迎语",
"mediaId": "素材的id",
"welcomeMsgTplType": "欢迎语模板类型:1:员工欢迎语;2:部门员工欢迎语;3:客户群欢迎语 ",
"weMsgTlpScopes": {
"useUserId": "使用人的id"
}
}
*/
export function add(data) {
return request({
url: service,
method: 'POST',
data,
})
}
/**
* 删除欢迎语
* @param {*} ids
*/
export function remove(ids) {
return request({
url: service + '/' + ids,
method: 'DELETE',
})
}
import request from '@/utils/request'
const service = window.CONFIG.services.wecom + '/corp'
// 企业id
/**
* 获取企业id列表
*/
export function getList(params) {
return request({
url: service + '/list',
params,
})
}
/**
* 获取企业id相关详情
* @param {String} id
*/
export function getDetail(id) {
return request({
url: service + '/' + id,
})
}
/**
* 新增企业id
* @param {Object} data
*/
export function add(data) {
return request({
url: service,
method: 'post',
data,
})
}
/**
* 修改企业id
* @param {Object} data
* {
"companyName": "string",
"corpId": "string",
"corpSecret": "string",
"createBy": "string",
"createTime": "2020-09-08T15:29:14.206Z",
"delFlag": "string",
"id": 0,
"params": {},
"remark": "string",
"searchValue": "string",
"status": "string",
"updateBy": "string",
"updateTime": "2020-09-08T15:29:14.206Z"
}
*/
export function update(data) {
return request({
url: service,
method: 'put',
data,
})
}
/**
* 启用有效企业微信账号
* @param {*} corpId
*/
export function start(corpId) {
return request({
url: service + '/startVailWeCorpAccount/' + corpId,
method: 'put',
})
}
import request from '@/utils/request'
const service = window.CONFIG.services.wecom + '/customerMessagePush'
/**
* 新增群发
* @param {Object} data
{
"pushType": "群发类型 0 发给客户 1 发给客户群",
"pushRange": "消息范围 0 全部客户 1 指定客户",
"tag": "客户标签id列表",
"department": "部门id",
"staffId": "员工id",
"settingTime": "发送时间 为空表示立即发送 ,不为空为指定时间发送",
"messageType": "消息类型 0 文本消息 1 图片消息 2 链接消息 3 小程序消息",
"imageMessage": {
"media_id": "图片的media_id",
"pic_url": "图片的链接"
},
"linkMessage": {
"title": "图文消息标题",
"picurl": "图文消息封面的url",
"desc": "图文消息的描述,最多512个字节",
"url": "图文消息的链接"
},
"textMessage": {
"content": "消息文本内容,最多4000个字节"
},
"miniprogramMessage": {
"title": "小程序消息标题,最多64个字节",
"pic_media_id": "小程序消息封面的mediaid,封面图建议尺寸为520*416",
"appid": "小程序appid,必须是关联到企业的小程序应用",
"page": "小程序page路径"
}
}
*/
export function add(data) {
return request({
url: service + '/add',
method: 'post',
data
})
}
/**
*
* @param {*} data
* {
* sender:创建人
content:内容
pushType:群发类型 0 发给客户 1 发给客户群
beginTime:开始时间
endTime:结束时间}
*/
export function getList(params) {
return request({
url: service + '/list',
params
})
}
/**
* 群发消息详情
* @param {*} messageId:微信消息id
*/
export function getDetail(messageId) {
return request({
url: service + '/getInfo',
params: { messageId }
})
}
/**
*
* @param {*}
* messageId:微信消息id
status:发送状态 0-未发送 1-已发送 2-因客户不是好友导致发送失败 3-因客户已经收到其他群发消息导致发送失败
*/
export function getPushResult(params) {
return request({
url: service + '/pushResults',
params
})
}
/**
* 同步消息发送结果
* @param {*} data
* msgids:列表msgid
messageId:消息id
*/
export function syncMsg(data) {
return request({
url: service + '/asyncResult',
method: 'post',
data
})
}
import request from '@/utils/request';
// 登录方法
export function login(username, password, code, uuid) {
const data = {
username,
password,
code,
uuid,
};
return request({
url: '/login',
method: 'post',
data: data,
});
}
// 获取用户详细信息
export function getInfo() {
return request({
url: '/getInfo',
method: 'get',
});
}
// 退出方法
export function logout() {
return request({
url: '/logout',
method: 'post',
});
}
// 获取验证码
export function getCodeImg() {
return request({
url: '/captchaImage',
method: 'get',
});
}
/**
* 企业微信扫码回调接口
* @param {*} auth_code
*/
export function wxQrLogin(auth_code) {
return request({
url: '/wxQrLogin',
method: 'get',
params: {
auth_code,
},
});
}
/**
* 获取扫码登陆相关参数
*/
export function findWxQrLoginInfo() {
return request({
url: '/findWxQrLoginInfo',
method: 'get',
});
}
import request from '@/utils/request'
const service = window.CONFIG.services.wecom + '/material'
const serviceCategory = window.CONFIG.services.wecom + '/category'
/**
* 查询素材列表
* @param {*} params
* { categoryId:类目id
search:搜索的值
mediaType: '' 0 图片(image)、1 语音(voice)、2 视频(video),3 普通文件(file), 4 文本
}
*/
export function getList(params) {
return request({ url: service + '/list', params })
}
/**
*查询素材详细信息
* @param {*} id 素材id
*/
export function getDetail(id) {
return request({ url: service + '/' + id })
}
/**
* 添加素材信息
* @param {*} data
* {
categoryId:分类id
materialUrl:本地资源文件地址
content:文本内容、图片文案
materialName:图片名称
digest:摘要
coverUrl:封面本地资源文件
}
*/
export function add(data) {
return request({ url: service, method: 'post', data })
}
/**
* 更新素材信息
* @param {*} data
* {
* id:素材id
categoryId:分类id
materialUrl:本地资源文件地址
content:文本内容、图片文案
materialName:图片名称
digest:摘要
coverUrl:封面本地资源文件
}
*/
export function update(data) {
return request({ url: service, method: 'put', data })
}
/**
* 删除素材信息
* @param {*} id
*/
export function remove(id) {
return request({ url: service + '/' + id, method: 'DELETE' })
}
/**
* 上传素材信息
* @param {*} data
* {
* file:文件
type:0 图片(image)、1 语音(voice)、2 视频(video),3 普通文件(file)
}
*/
export function upload(data) {
return request({
url: service + '/upload',
method: 'post',
data,
})
}
/**
* 素材移动分组
* @param {*} data
* {
* categoryId 选择移动的分组类目id
* materials // 移动的素材ids,逗号分隔
* }
*/
export function moveGroup(categoryId, materials) {
return request({
url: service + '/resetCategory',
method: 'put',
data: {
categoryId,
materials,
},
})
}
/**
* 类目树
* @param {*} mediaType 0 图片(image)、1 语音(voice)、2 视频(video),3 普通文件(file), 4 文本
*/
export function getTree(mediaType) {
return request({ url: serviceCategory + '/list', params: { mediaType } })
}
/**
*通过id查询类目详细信息
* @param {*} id
*/
export function getTreeDetail(id) {
return request({ url: serviceCategory + '/' + id })
}
/**
* 添加类目
* @param {*} data
* {
"mediaType": "0 图片(image)、1 语音(voice)、2 视频(video),3 普通文件(file) 4 文本",
"name": "名称",
"parentId": "父id"
}
*/
export function addTree(data) {
return request({ url: serviceCategory, method: 'post', data })
}
/**
* 修改类目
* @param {*} data
* {
"mediaType": "0 图片(image)、1 语音(voice)、2 视频(video),3 普通文件(file) 4 文本",
"name": "名称",
"parentId": "父id"
}
*/
export function updateTree(data) {
return request({ url: serviceCategory, method: 'put', data })
}
/**
* 删除类目
* @param {*} data
*/
export function removeTree(ids) {
return request({
url: serviceCategory + '/' + ids,
method: 'DELETE',
})
}
/**
* 获取素材media_id
* @param {*} data
* url [string] 是 素材路径
type [string] 是 素材类型
name [string] 是 文件名称
*/
export function getMaterialMediaId(data) {
return request({
url: service + '/temporaryMaterialMediaIdForWeb',
method: 'POST',
data,
})
}
import request from '@/utils/request'
const service = window.CONFIG.services.wecom + '/material'
const serviceCategory = window.CONFIG.services.wecom + '/poster'
/**
* 查询海报列表
* @param {*} params
*/
export function getList(params) {
return request({ url: service + '/list', params })
}
/**
* 更新海报
* @param {*} params
*/
export function updatePoster(data) {
console.log('poster change:', JSON.stringify(data))
return request({ url: serviceCategory + '/update', method: 'put', data })
}
/**
* 添加海报
* @param {*} data
*/
export function addPoster(data) {
return request({ url: serviceCategory + '/insert', method: 'post', data })
}
/**
* 查询海报详情
* @param {*} data
*/
export function getPosterInfo(id) {
return request({ url: serviceCategory + '/entity/' + id })
}
/**
* 删除海报
* @param {*} data
*/
export function removePoster(ids) {
return request({
url: serviceCategory + '/delete/' + ids,
method: 'DELETE'
})
}
import request from '@/utils/request'
// 获取路由
export const getRouters = () => {
return request({
url: '/getRouters',
method: 'get'
})
}
\ No newline at end of file \ No newline at end of file
import request from '@/utils/request'
// 查询定时任务调度列表
export function listJob(query) {
return request({
url: '/monitor/job/list',
method: 'get',
params: query
})
}
// 查询定时任务调度详细
export function getJob(jobId) {
return request({
url: '/monitor/job/' + jobId,
method: 'get'
})
}
// 新增定时任务调度
export function addJob(data) {
return request({
url: '/monitor/job',
method: 'post',
data: data
})
}
// 修改定时任务调度
export function updateJob(data) {
return request({
url: '/monitor/job',
method: 'put',
data: data
})
}
// 删除定时任务调度
export function delJob(jobId) {
return request({
url: '/monitor/job/' + jobId,
method: 'delete'
})
}
// 导出定时任务调度
export function exportJob(query) {
return request({
url: '/monitor/job/export',
method: 'get',
params: query
})
}
// 任务状态修改
export function changeJobStatus(jobId, status) {
const data = {
jobId,
status
}
return request({
url: '/monitor/job/changeStatus',
method: 'put',
data: data
})
}
// 定时任务立即执行一次
export function runJob(jobId, jobGroup) {
const data = {
jobId,
jobGroup
}
return request({
url: '/monitor/job/run',
method: 'put',
data: data
})
}
\ No newline at end of file \ No newline at end of file
import request from '@/utils/request'
// 查询调度日志列表
export function listJobLog(query) {
return request({
url: '/monitor/jobLog/list',
method: 'get',
params: query
})
}
// 删除调度日志
export function delJobLog(jobLogId) {
return request({
url: '/monitor/jobLog/' + jobLogId,
method: 'delete'
})
}
// 清空调度日志
export function cleanJobLog() {
return request({
url: '/monitor/jobLog/clean',
method: 'delete'
})
}
// 导出调度日志
export function exportJobLog(query) {
return request({
url: '/monitor/jobLog/export',
method: 'get',
params: query
})
}
\ No newline at end of file \ No newline at end of file
import request from '@/utils/request'
// 查询登录日志列表
export function list(query) {
return request({
url: '/monitor/logininfor/list',
method: 'get',
params: query
})
}
// 删除登录日志
export function delLogininfor(infoId) {
return request({
url: '/monitor/logininfor/' + infoId,
method: 'delete'
})
}
// 清空登录日志
export function cleanLogininfor() {
return request({
url: '/monitor/logininfor/clean',
method: 'delete'
})
}
// 导出登录日志
export function exportLogininfor(query) {
return request({
url: '/monitor/logininfor/export',
method: 'get',
params: query
})
}
\ No newline at end of file \ No newline at end of file
import request from '@/utils/request'
// 查询在线用户列表
export function list(query) {
return request({
url: '/monitor/online/list',
method: 'get',
params: query
})
}
// 强退用户
export function forceLogout(tokenId) {
return request({
url: '/monitor/online/' + tokenId,
method: 'delete'
})
}
import request from '@/utils/request'
// 查询操作日志列表
export function list(query) {
return request({
url: '/monitor/operlog/list',
method: 'get',
params: query
})
}
// 删除操作日志
export function delOperlog(operId) {
return request({
url: '/monitor/operlog/' + operId,
method: 'delete'
})
}
// 清空操作日志
export function cleanOperlog() {
return request({
url: '/monitor/operlog/clean',
method: 'delete'
})
}
// 导出操作日志
export function exportOperlog(query) {
return request({
url: '/monitor/operlog/export',
method: 'get',
params: query
})
}
\ No newline at end of file \ No newline at end of file
import request from '@/utils/request'
// 查询服务器详细
export function getServer() {
return request({
url: '/monitor/server',
method: 'get'
})
}
\ No newline at end of file \ No newline at end of file
import request from '@/utils/request'
const service = window.CONFIG.services.wecom + '/department'
const serviceUser = window.CONFIG.services.wecom + '/user'
/**
* 获取所有部门
* @param {*} params
* {
"id": "部门id ",
"name": "部门名称",
"parentId": "父节点id "
}
*/
export function getTree(params) {
return request({
url: service + '/list',
params,
})
}
/**
* 更新部门
* @param {*} params
* {
"id": "部门id ",
"name": "部门名称",
"parentId": "父节点id "
}
*/
export function updateDepart(data) {
return request({
url: service,
method: 'put',
data,
})
}
/**
* 新增部门
* @param {Object} data
* * {
"name": "部门名称",
"parentId": "父节点id "
}
*/
export function addDepart(data) {
return request({
url: service,
method: 'post',
data,
})
}
export function removeDepart(ids) {
return request({
url: service + '/' + ids,
method: 'DELETE',
})
}
/**
* 获取通讯录人员列表
* @param {*} params
* {
"pageNum": "当前页",
"pageSize": "当前页显示条数",
"name": "姓名",
"userId": "账号",
"mobile": "手机号",
"beginTime": "开始时间",
"endTime": "结束时间",
"isActivate": "是否激活(1:是;2:否)该字段主要表示当前信息是否同步微信 ",
"department": "根据组织id获取,获取通讯录人员"
}
*/
export function getList(params) {
return request({
url: serviceUser + '/list',
params,
})
}
/**
* 根据ID获取通讯录人员详情
* @param {String} id
*/
export function getUserDetail(id) {
return request({
url: serviceUser + '/' + id,
})
}
/**
* 新增用户
* @param {Object} data
*/
export function addUser(data) {
return request({
url: serviceUser,
method: 'post',
data,
})
}
/**
* 更新用户
* @param {*} data
* {
"avatarMediaid": "用户头像,该值来自素材库",
"name": "姓名",
"alias": "昵称",
"userId": "账号",
"gender": "性别。(默认)1表示男性,2表示女性",
"mobile": "手机号",
"email": "邮箱",
"wxAccount": "个人微信号",
"department": "用户所属部门id,[1,2]",
"position": "职务",
"isLeaderInDept": "个数必须和参数department的个数一致,表示在所在的部门内是否为上级。1表示为上级,0表示普通成员(非上级)",
"joinTime": "入职时间",
"enable": "是否启用(1表示启用成员,0表示禁用成员)",
"idCard": "身份证号",
"qqAccount": "QQ号",
"telephone": "座机",
"address": "地址",
"birthday": "生日",
"isActivate": "是否激活(1:是;2:否)该字段主要表示当前信息是否同步微信",
"id": "主键"
}
*/
export function updateUser(data) {
return request({
url: serviceUser,
method: 'put',
data,
})
}
/**
* 启用禁用用户 true:启用 false:禁用
* @param {*} data
* {
"id": "通讯录客户ID",
"enable": "启用禁用用户 true:启用 false:禁用"
}
*/
export function startOrStop(data) {
return request({
url: serviceUser + '/startOrStop',
method: 'put',
data,
})
}
/**
* 用户删除接口
* @param {*} userId
*/
export function remove(userId) {
return request({
url: serviceUser + '/' + userId,
method: 'DELETE',
})
}
/**
* 同步成员
*/
export function syncUser() {
return request({
url: serviceUser + '/synchWeUser',
})
}
import request from '@/utils/request'
// 查询参数列表
export function listConfig(query) {
return request({
url: '/system/config/list',
method: 'get',
params: query
})
}
// 查询参数详细
export function getConfig(configId) {
return request({
url: '/system/config/' + configId,
method: 'get'
})
}
// 根据参数键名查询参数值
export function getConfigKey(configKey) {
return request({
url: '/system/config/configKey/' + configKey,
method: 'get'
})
}
// 新增参数配置
export function addConfig(data) {
return request({
url: '/system/config',
method: 'post',
data: data
})
}
// 修改参数配置
export function updateConfig(data) {
return request({
url: '/system/config',
method: 'put',
data: data
})
}
// 删除参数配置
export function delConfig(configId) {
return request({
url: '/system/config/' + configId,
method: 'delete'
})
}
// 清理参数缓存
export function clearCache() {
return request({
url: '/system/config/clearCache',
method: 'delete'
})
}
// 导出参数
export function exportConfig(query) {
return request({
url: '/system/config/export',
method: 'get',
params: query
})
}
\ No newline at end of file \ No newline at end of file
import request from '@/utils/request'
// 查询部门列表
export function listDept(query) {
return request({
url: '/system/dept/list',
method: 'get',
params: query
})
}
// 查询部门列表(排除节点)
export function listDeptExcludeChild(deptId) {
return request({
url: '/system/dept/list/exclude/' + deptId,
method: 'get'
})
}
// 查询部门详细
export function getDept(deptId) {
return request({
url: '/system/dept/' + deptId,
method: 'get'
})
}
// 查询部门下拉树结构
export function treeselect() {
return request({
url: '/system/dept/treeselect',
method: 'get'
})
}
// 根据角色ID查询部门树结构
export function roleDeptTreeselect(roleId) {
return request({
url: '/system/dept/roleDeptTreeselect/' + roleId,
method: 'get'
})
}
// 新增部门
export function addDept(data) {
return request({
url: '/system/dept',
method: 'post',
data: data
})
}
// 修改部门
export function updateDept(data) {
return request({
url: '/system/dept',
method: 'put',
data: data
})
}
// 删除部门
export function delDept(deptId) {
return request({
url: '/system/dept/' + deptId,
method: 'delete'
})
}
\ No newline at end of file \ No newline at end of file
import request from '@/utils/request'
// 查询字典数据列表
export function listData(query) {
return request({
url: '/system/dict/data/list',
method: 'get',
params: query
})
}
// 查询字典数据详细
export function getData(dictCode) {
return request({
url: '/system/dict/data/' + dictCode,
method: 'get'
})
}
// 根据字典类型查询字典数据信息
export function getDicts(dictType) {
return request({
url: '/system/dict/data/type/' + dictType,
method: 'get'
})
}
// 新增字典数据
export function addData(data) {
return request({
url: '/system/dict/data',
method: 'post',
data: data
})
}
// 修改字典数据
export function updateData(data) {
return request({
url: '/system/dict/data',
method: 'put',
data: data
})
}
// 删除字典数据
export function delData(dictCode) {
return request({
url: '/system/dict/data/' + dictCode,
method: 'delete'
})
}
// 导出字典数据
export function exportData(query) {
return request({
url: '/system/dict/data/export',
method: 'get',
params: query
})
}
\ No newline at end of file \ No newline at end of file
import request from '@/utils/request'
// 查询字典类型列表
export function listType(query) {
return request({
url: '/system/dict/type/list',
method: 'get',
params: query
})
}
// 查询字典类型详细
export function getType(dictId) {
return request({
url: '/system/dict/type/' + dictId,
method: 'get'
})
}
// 新增字典类型
export function addType(data) {
return request({
url: '/system/dict/type',
method: 'post',
data: data
})
}
// 修改字典类型
export function updateType(data) {
return request({
url: '/system/dict/type',
method: 'put',
data: data
})
}
// 删除字典类型
export function delType(dictId) {
return request({
url: '/system/dict/type/' + dictId,
method: 'delete'
})
}
// 清理参数缓存
export function clearCache() {
return request({
url: '/system/dict/type/clearCache',
method: 'delete'
})
}
// 导出字典类型
export function exportType(query) {
return request({
url: '/system/dict/type/export',
method: 'get',
params: query
})
}
// 获取字典选择框列表
export function optionselect() {
return request({
url: '/system/dict/type/optionselect',
method: 'get'
})
}
\ No newline at end of file \ No newline at end of file
import request from '@/utils/request'
// 查询菜单列表
export function listMenu(query) {
return request({
url: '/system/menu/list',
method: 'get',
params: query
})
}
// 查询菜单详细
export function getMenu(menuId) {
return request({
url: '/system/menu/' + menuId,
method: 'get'
})
}
// 查询菜单下拉树结构
export function treeselect() {
return request({
url: '/system/menu/treeselect',
method: 'get'
})
}
// 根据角色ID查询菜单下拉树结构
export function roleMenuTreeselect(roleId) {
return request({
url: '/system/menu/roleMenuTreeselect/' + roleId,
method: 'get'
})
}
// 新增菜单
export function addMenu(data) {
return request({
url: '/system/menu',
method: 'post',
data: data
})
}
// 修改菜单
export function updateMenu(data) {
return request({
url: '/system/menu',
method: 'put',
data: data
})
}
// 删除菜单
export function delMenu(menuId) {
return request({
url: '/system/menu/' + menuId,
method: 'delete'
})
}
\ No newline at end of file \ No newline at end of file
import request from '@/utils/request'
// 查询公告列表
export function listNotice(query) {
return request({
url: '/system/notice/list',
method: 'get',
params: query
})
}
// 查询公告详细
export function getNotice(noticeId) {
return request({
url: '/system/notice/' + noticeId,
method: 'get'
})
}
// 新增公告
export function addNotice(data) {
return request({
url: '/system/notice',
method: 'post',
data: data
})
}
// 修改公告
export function updateNotice(data) {
return request({
url: '/system/notice',
method: 'put',
data: data
})
}
// 删除公告
export function delNotice(noticeId) {
return request({
url: '/system/notice/' + noticeId,
method: 'delete'
})
}
\ No newline at end of file \ No newline at end of file
import request from '@/utils/request'
// 查询岗位列表
export function listPost(query) {
return request({
url: '/system/post/list',
method: 'get',
params: query
})
}
// 查询岗位详细
export function getPost(postId) {
return request({
url: '/system/post/' + postId,
method: 'get'
})
}
// 新增岗位
export function addPost(data) {
return request({
url: '/system/post',
method: 'post',
data: data
})
}
// 修改岗位
export function updatePost(data) {
return request({
url: '/system/post',
method: 'put',
data: data
})
}
// 删除岗位
export function delPost(postId) {
return request({
url: '/system/post/' + postId,
method: 'delete'
})
}
// 导出岗位
export function exportPost(query) {
return request({
url: '/system/post/export',
method: 'get',
params: query
})
}
\ No newline at end of file \ No newline at end of file
import request from '@/utils/request'
// 查询角色列表
export function listRole(query) {
return request({
url: '/system/role/list',
method: 'get',
params: query
})
}
// 查询角色详细
export function getRole(roleId) {
return request({
url: '/system/role/' + roleId,
method: 'get'
})
}
// 新增角色
export function addRole(data) {
return request({
url: '/system/role',
method: 'post',
data: data
})
}
// 修改角色
export function updateRole(data) {
return request({
url: '/system/role',
method: 'put',
data: data
})
}
// 角色数据权限
export function dataScope(data) {
return request({
url: '/system/role/dataScope',
method: 'put',
data: data
})
}
// 角色状态修改
export function changeRoleStatus(roleId, status) {
const data = {
roleId,
status
}
return request({
url: '/system/role/changeStatus',
method: 'put',
data: data
})
}
// 删除角色
export function delRole(roleId) {
return request({
url: '/system/role/' + roleId,
method: 'delete'
})
}
// 导出角色
export function exportRole(query) {
return request({
url: '/system/role/export',
method: 'get',
params: query
})
}
\ No newline at end of file \ No newline at end of file
import request from '@/utils/request'
import { praseStrEmpty } from "@/utils/common";
// 查询用户列表
export function listUser(query) {
return request({
url: '/system/user/list',
method: 'get',
params: query
})
}
// 查询用户详细
export function getUser(userId) {
return request({
url: '/system/user/' + praseStrEmpty(userId),
method: 'get'
})
}
// 新增用户
export function addUser(data) {
return request({
url: '/system/user',
method: 'post',
data: data
})
}
// 修改用户
export function updateUser(data) {
return request({
url: '/system/user',
method: 'put',
data: data
})
}
// 删除用户
export function delUser(userId) {
return request({
url: '/system/user/' + userId,
method: 'delete'
})
}
// 导出用户
export function exportUser(query) {
return request({
url: '/system/user/export',
method: 'get',
params: query
})
}
// 用户密码重置
export function resetUserPwd(userId, password) {
const data = {
userId,
password
}
return request({
url: '/system/user/resetPwd',
method: 'put',
data: data
})
}
// 用户状态修改
export function changeUserStatus(userId, status) {
const data = {
userId,
status
}
return request({
url: '/system/user/changeStatus',
method: 'put',
data: data
})
}
// 查询用户个人信息
export function getUserProfile() {
return request({
url: '/system/user/profile',
method: 'get'
})
}
// 修改用户个人信息
export function updateUserProfile(data) {
return request({
url: '/system/user/profile',
method: 'put',
data: data
})
}
// 用户密码重置
export function updateUserPwd(oldPassword, newPassword) {
const data = {
oldPassword,
newPassword
}
return request({
url: '/system/user/profile/updatePwd',
method: 'put',
params: data
})
}
// 用户头像上传
export function uploadAvatar(data) {
return request({
url: '/system/user/profile/avatar',
method: 'post',
data: data
})
}
// 下载用户导入模板
export function importTemplate() {
return request({
url: '/system/user/importTemplate',
method: 'get'
})
}
import request from '@/utils/request'
const service = window.CONFIG.services.wecom + '/fission'
export function getList(params) {
return request({
url: service + '/list',
method: 'get',
params,
})
}
export function addTask (data) {
return request({
url: service + '/add',
method: 'post',
data,
})
}
export function getTaskDetail (id,type) {
let url = type?`${service}/getInfo/${id}/${type}`:`${service}/getInfo/${id}`
return request({
url,
method: 'get',
})
}
export function sendFission (id) {
return request({
url: `${service}/send/${id}`,
method: 'get',
})
}
export function getStat(params) {
return request({
url: service + '/stat',
method: 'get',
params,
})
}
export function editTask (data) {
return request({
url: service + '/edit',
method: 'put',
data,
})
}
\ No newline at end of file \ No newline at end of file
import request from '@/utils/request'
// 查询生成表数据
export function listTable(query) {
return request({
url: '/tool/gen/list',
method: 'get',
params: query
})
}
// 查询db数据库列表
export function listDbTable(query) {
return request({
url: '/tool/gen/db/list',
method: 'get',
params: query
})
}
// 查询表详细信息
export function getGenTable(tableId) {
return request({
url: '/tool/gen/' + tableId,
method: 'get'
})
}
// 修改代码生成信息
export function updateGenTable(data) {
return request({
url: '/tool/gen',
method: 'put',
data: data
})
}
// 导入表
export function importTable(data) {
return request({
url: '/tool/gen/importTable',
method: 'post',
params: data
})
}
// 预览生成代码
export function previewTable(tableId) {
return request({
url: '/tool/gen/preview/' + tableId,
method: 'get'
})
}
// 删除表数据
export function delTable(tableId) {
return request({
url: '/tool/gen/' + tableId,
method: 'delete'
})
}
// 生成代码(自定义路径)
export function genCode(tableName) {
return request({
url: '/tool/gen/genCode/' + tableName,
method: 'get'
})
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!