Commit 5b52b5f5 authored by looker's avatar looker

add new page

parent ae43d2ca
{
"presets": [
["env", {
"modules": false,
"targets": {
"browsers": ["> 1%", "last 2 versions", "not ie <= 8"]
}
}],
"stage-2"
],
"plugins":["transform-vue-jsx", "transform-runtime"]
}
# http://editorconfig.org
root = true
[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
insert_final_newline = true
trim_trailing_whitespace = true
[*.md]
insert_final_newline = false
trim_trailing_whitespace = false
build/*.js
config/*.js
src/assets
module.exports = {
root: true,
parserOptions: {
parser: 'babel-eslint',
sourceType: 'module'
},
env: {
browser: true,
node: true,
es6: true,
},
extends: ['plugin:vue/recommended', 'eslint:recommended'],
// add your custom rules here
//it is base on https://github.com/vuejs/eslint-config-vue
rules: {
"vue/max-attributes-per-line": [2, {
"singleline": 10,
"multiline": {
"max": 1,
"allowFirstLine": false
}
}],
"vue/name-property-casing": ["error", "PascalCase"],
'accessor-pairs': 2,
'arrow-spacing': [2, {
'before': true,
'after': true
}],
'block-spacing': [2, 'always'],
'brace-style': [2, '1tbs', {
'allowSingleLine': true
}],
'camelcase': [0, {
'properties': 'always'
}],
'comma-dangle': [2, 'never'],
'comma-spacing': [2, {
'before': false,
'after': true
}],
'comma-style': [2, 'last'],
'constructor-super': 2,
'curly': [2, 'multi-line'],
'dot-location': [2, 'property'],
'eol-last': 2,
'eqeqeq': [2, 'allow-null'],
'generator-star-spacing': [2, {
'before': true,
'after': true
}],
'handle-callback-err': [2, '^(err|error)$'],
'indent': [2, 2, {
'SwitchCase': 1
}],
'jsx-quotes': [2, 'prefer-single'],
'key-spacing': [2, {
'beforeColon': false,
'afterColon': true
}],
'keyword-spacing': [2, {
'before': true,
'after': true
}],
'new-cap': [2, {
'newIsCap': true,
'capIsNew': false
}],
'new-parens': 2,
'no-array-constructor': 2,
'no-caller': 2,
'no-console': 'off',
'no-class-assign': 2,
'no-cond-assign': 2,
'no-const-assign': 2,
'no-control-regex': 2,
'no-delete-var': 2,
'no-dupe-args': 2,
'no-dupe-class-members': 2,
'no-dupe-keys': 2,
'no-duplicate-case': 2,
'no-empty-character-class': 2,
'no-empty-pattern': 2,
'no-eval': 2,
'no-ex-assign': 2,
'no-extend-native': 2,
'no-extra-bind': 2,
'no-extra-boolean-cast': 2,
'no-extra-parens': [2, 'functions'],
'no-fallthrough': 2,
'no-floating-decimal': 2,
'no-func-assign': 2,
'no-implied-eval': 2,
'no-inner-declarations': [2, 'functions'],
'no-invalid-regexp': 2,
'no-irregular-whitespace': 2,
'no-iterator': 2,
'no-label-var': 2,
'no-labels': [2, {
'allowLoop': false,
'allowSwitch': false
}],
'no-lone-blocks': 2,
'no-mixed-spaces-and-tabs': 2,
'no-multi-spaces': 2,
'no-multi-str': 2,
'no-multiple-empty-lines': [2, {
'max': 1
}],
'no-native-reassign': 2,
'no-negated-in-lhs': 2,
'no-new-object': 2,
'no-new-require': 2,
'no-new-symbol': 2,
'no-new-wrappers': 2,
'no-obj-calls': 2,
'no-octal': 2,
'no-octal-escape': 2,
'no-path-concat': 2,
'no-proto': 2,
'no-redeclare': 2,
'no-regex-spaces': 2,
'no-return-assign': [2, 'except-parens'],
'no-self-assign': 2,
'no-self-compare': 2,
'no-sequences': 2,
'no-shadow-restricted-names': 2,
'no-spaced-func': 2,
'no-sparse-arrays': 2,
'no-this-before-super': 2,
'no-throw-literal': 2,
'no-trailing-spaces': 2,
'no-undef': 2,
'no-undef-init': 2,
'no-unexpected-multiline': 2,
'no-unmodified-loop-condition': 2,
'no-unneeded-ternary': [2, {
'defaultAssignment': false
}],
'no-unreachable': 2,
'no-unsafe-finally': 2,
'no-unused-vars': [2, {
'vars': 'all',
'args': 'none'
}],
'no-useless-call': 2,
'no-useless-computed-key': 2,
'no-useless-constructor': 2,
'no-useless-escape': 0,
'no-whitespace-before-property': 2,
'no-with': 2,
'one-var': [2, {
'initialized': 'never'
}],
'operator-linebreak': [2, 'after', {
'overrides': {
'?': 'before',
':': 'before'
}
}],
'padded-blocks': [2, 'never'],
'quotes': [2, 'single', {
'avoidEscape': true,
'allowTemplateLiterals': true
}],
'semi': [2, 'never'],
'semi-spacing': [2, {
'before': false,
'after': true
}],
'space-before-blocks': [2, 'always'],
'space-before-function-paren': [2, 'never'],
'space-in-parens': [2, 'never'],
'space-infix-ops': 2,
'space-unary-ops': [2, {
'words': true,
'nonwords': false
}],
'spaced-comment': [2, 'always', {
'markers': ['global', 'globals', 'eslint', 'eslint-disable', '*package', '!', ',']
}],
'template-curly-spacing': [2, 'never'],
'use-isnan': 2,
'valid-typeof': 2,
'wrap-iife': [2, 'any'],
'yield-star-spacing': [2, 'both'],
'yoda': [2, 'never'],
'prefer-const': 2,
'no-debugger': process.env.NODE_ENV === 'production' ? 2 : 0,
'object-curly-spacing': [2, 'always', {
objectsInObjects: false
}],
'array-bracket-spacing': [2, 'never']
}
}
### Gitlab-runner ###
.gitlab-ci.yml
Dockerfile.back
saasdoc.yaml
ybejiadoc.yaml
.DS_Store
node_modules/
dist/
npm-debug.log*
yarn-debug.log*
yarn-error.log*
package-lock.json
# Editor directories and files
.idea
.vscode
*.suo
*.ntvs*
*.njsproj
*.sln
// https://github.com/michael-ciniawsky/postcss-load-config
module.exports = {
"plugins": {
"postcss-import": {},
"postcss-url": {},
// to edit target browsers: use "browserslist" field in package.json
"autoprefixer": {}
}
}
language: node_js
node_js: stable
script: npm run test
notifications:
email: false
theme: jekyll-theme-cayman
\ No newline at end of file
......@@ -4,7 +4,7 @@ const prodEnv = require('./prod.env')
module.exports = merge(prodEnv, {
NODE_ENV: '"development"',
API_URL:'"/api/"',
API_URL:'"/API/"',
// WX_ADDRESS: '"http://imdev.chenzhen.shop:9093/"',
WX_ADDRESS: '"172.16.22.67:9093/"',
IMG_ADDRESS:'"http://chat-x.oss-cn-beijing.aliyuncs.com/"'
......
......@@ -14,8 +14,8 @@ module.exports = {
// target: 'http://127.0.0.1:3000', //目标接口域名
// changeOrigin: true, //是否跨域
// }
'/api': {
pathRewrite: { '^/api': '' },
'/API': {
pathRewrite: { '^/API': '' },
target: 'http://172.16.22.67',
// target: 'http://imdev.chenzhen.shop/',
changeOrigin: true, //是否跨域
......@@ -23,7 +23,7 @@ module.exports = {
},
// Various Dev Server settings
host: 'localhost', // can be overwritten by process.env.HOST
port: 8889, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
port: 8888, // can be overwritten by process.env.PORT, if port is in use, a free one will be determined
autoOpenBrowser: true,
errorOverlay: true,
notifyOnErrors: false,
......
No preview for this file type
......@@ -7,6 +7,12 @@
<link rel="stylesheet" href="static/css/reset.css">
<script src="static/socket.js"></script>
</head>
<style>
html,body{
height:100%;
width:100%;
}
</style>
<body>
<div id="app"></div>
<!-- built files will be auto injected -->
......
......@@ -13,6 +13,10 @@ export default {
}
</script>
<style rel="stylesheet/scss" lang="scss" scoped>
#app{
height:100%;
width:100%;
}
body .el-table th.gutter{
display: table-cell!important;
}
......
......@@ -30,6 +30,11 @@
import { mapState, mapActions ,mapGetters } from 'vuex'
import { panelStatus } from '@/utils/common'
export default {
data(){
return {
fd:false
}
},
computed: {
panelStatus(){
return panelStatus
......@@ -47,8 +52,20 @@ export default {
])
},
mounted() {
let obj = this.chartings[0]
obj&&this.selectSession(obj)
this.fd = true
// let obj = this.chartings[0]
// obj&&this.selectSession(obj)
},
watch:{
chartings(val){
if(this.fd){
this.fd = false
if(val.lenght!=0){
let obj = val[0]
this.selectSession(obj)
}
}
}
},
filters: {
time (date) {
......
......@@ -151,6 +151,9 @@ export default {
// }
},
imgUrl(img){
if(!img){
return ''
}
if(img.indexOf("http") >= 0){
return img
}else{
......
......@@ -3,16 +3,32 @@
<div class="mycard">
<header>
<img :src="user.img" class="avatar">
<span v-if="user.onLineStatus==10" class="paopao" @click="chageFlag=!chageFlag" style="background:#00dc41"></span>
<span v-if="user.onLineStatus==20" class="paopao" @click="chageFlag=!chageFlag" style="background:#d8bf0c"></span>
<span v-if="user.onLineStatus==30" class="paopao" @click="chageFlag=!chageFlag" style="background:#b70277"></span>
<span v-if="user.onLineStatus==90" class="paopao" @click="chageFlag=!chageFlag" style="background:#737273"></span>
</header>
<div class="status-panel" style=" position: absolute;z-index: 100;top: 0px;left: -100px;" v-if="chageFlag">
<div @click="chengeStatus(10)"><span class="paopaod" style="background:#00dc41"></span><span class="sdsd">在线</span></div>
<div @click="chengeStatus(20)"><span class="paopaod" style="background:#d8bf0c"></span><span class="sdsd">休息</span></div>
<div @click="chengeStatus(30)"><span class="paopaod" style="background:#b70277"></span><span class="sdsd">忙碌</span></div>
<div @click="chengeStatus(90)"><span class="paopaod" style="background:#737273"></span><span class="sdsd">离线</span></div>
</div>
<div v-if="chageFlag" style="width: 100%;height: 100%;position: fixed;top: 0;right: 0;" @click="chageFlag=!chageFlag"></div>
<div class="navbar" @click="clearSearch">
<router-link to="/main/chat" class="icon iconfont icon-msg" ></router-link>
<span style="color:#00dc41;font-weight: 800;">{{user.customerConversationNum}}</span>
<router-link to="/main/chat" class="icon iconfont icon-msg" >
<span class="pipao" v-if="user.noshowMassageTotal!=0">{{user.noshowMassageTotal}}</span>
</router-link>
<!-- <router-link to="/main/my" class="icon iconfont icon-collection"></router-link> -->
</div>
<footer>
<i class="icon iconfont icon-more" @click="accountFlag=!accountFlag"></i>
</footer>
<div v-if="accountFlag" style="width: 100%;height: 100%;position: fixed;top: 0;right: 0;" @click="accountFlag=!accountFlag"></div>
<div class="tool-panel" v-if="accountFlag">
<div v-if="accountFlag" style="width: 100%;height: 100%;position: fixed; top: 0;right: 0;" @click="accountFlag=!accountFlag"></div>
<div class="tool-panel" style="position:relative;bottom:-550px;" v-if="accountFlag">
<div @click="logout"><span class="sdsd">切换账号</span></div>
<div @click="logout"><span class="sdsd">退出登录</span></div>
</div>
......@@ -20,11 +36,12 @@
</template>
<script>
import { mapState } from 'vuex'
import { mapState, mapActions } from 'vuex'
export default {
data(){
return {
accountFlag:false
accountFlag:false,
chageFlag:false
}
},
computed: {
......@@ -33,6 +50,14 @@ export default {
])
},
methods: {
...mapActions('user',[
'changeCustomerStatus',
]),
chengeStatus(statusCode){
this.changeCustomerStatus(statusCode).then((data)=>{
this.chageFlag = false
})
},
clearSearch() {
this.$store.dispatch('user/search', '')
},
......@@ -72,6 +97,7 @@ export default {
.navbar
width: 100%
text-align: center
padding-top:30px;
.icon
display: inline-block
font-size: 26px
......@@ -114,4 +140,53 @@ export default {
line-height:30px;
cursor: pointer;
color:#fff;
.pipao{
position: relative;
background:red;
border-radius: 25px;
font-size: 11px;
padding: 3px 6px;
top: -15px;
left: -10px;
color:#fff;
line-height:30px;
}
.paopao{
height: 12px;
width: 12px;
border-radius: 20px;
display: block;
position: relative;
left: 36px;
top: -10px;
}
.paopaod{
height: 12px;
width: 12px;
border-radius: 20px;
display: block;
position: relative;
left: 23px;
top: 20px;
}
.status-panel
position:relative;
bottom:-600px;
height:150px;
width:100px;
right:-60px;
border-radius:5px;
padding-top:10px;
background: #000000;
div
bottom:-550px;
font-size:13px;
text-align:center;
height:30px;
line-height:30px;
cursor: pointer;
color:#fff;
</style>
......@@ -23,6 +23,9 @@ export default {
},
created () {
this.$store.dispatch('user/connect')
this.$store.dispatch('user/checkDevices')
this.$store.dispatch('user/customersessionInfo')
this.$store.dispatch('user/customerConversation')
}
}
</script>
......@@ -30,20 +33,22 @@ export default {
<style lang="stylus" scoped>
#app-main
display: flex
margin: auto
margin-top:30px
position: fixed;
top: calc(50% - 400px)
left: calc(50% - 630px)
width: 1260px
height: 800px
background-color: #fff
.sidebar
width: 60px
height: 800px
height: 100%
background: #2b2c2f
.main
flex: 1
height: 800px
height: 100%
background: #f2f2f2
.tarbar
flex: 2
width:00px;
height: 800px;
height: 100%
</style>
......@@ -28,8 +28,8 @@ export default{
return {
activeName:'second',
ruleForm2:{
account:'18310825053',
passwd:'123456'
account:'13521750803',
passwd:'baozheng0618'
}
}
},
......
......@@ -5,6 +5,10 @@ url.getTransferList = `${process.env.API_URL}o/customer/transfer`
url.toTreansfer = `${process.env.API_URL}o/customer/transfer`
url.closeTake = `${process.env.API_URL}o/customerConversation/finish`
url.upLoadImg = `${process.env.API_URL}/o/upload/image`
url.checkDevices = `${process.env.API_URL}p/api/check/devices/`
url.customersessionInfo = `${process.env.API_URL}o/customersession/info`
url.customerConversation = `${process.env.API_URL}o/customerConversation/accessNum`
url.changeCustomerStatus = `${process.env.API_URL}o/customersession/update/userstate`
const chenzhen={}
chenzhen.login = `${process.env.API_URL}nice-wechat-service/v1/login`
......
......@@ -21,8 +21,39 @@ const closeSession = (param)=>{
data: param
})
}
const checkDevices = (param)=>{
return request({
url: apiUrl.checkDevices+param,
method: 'get',
})
}
const customersessionInfo = (param)=>{
return request({
url: apiUrl.customersessionInfo,
method: 'get',
params: param
})
}
const customerConversation = (param)=>{
return request({
url: apiUrl.customerConversation,
method: 'get',
params: param
})
}
const changeCustomerStatus = (param)=>{
return request({
url: apiUrl.changeCustomerStatus,
method: 'post',
data: param
})
}
export default {
getTransfer,
customerConversation,
toTrensfer,
closeSession
changeCustomerStatus,
closeSession,
customersessionInfo,
checkDevices
}
\ No newline at end of file
This diff is collapsed.
......@@ -12,10 +12,10 @@ const service = axios.create({
// request拦截器
service.interceptors.request.use(
config => {
config.headers['Content-Type'] = 'application/json;charset=UTF-8'
if (store.getters.token) {
config.headers['Authorization'] = getToken() // 让每个请求携带自定义token 请根据实际情况自行修改
}
config.headers['Content-Type'] = 'application/json;charset=UTF-8'
config.headers['Authorization'] = getToken() // 让每个请求携带自定义token 请根据实际情况自行修改
return config
},
error => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment