newsee-cli 1.0.3 → 1.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.en.md +36 -36
- package/README.md +36 -36
- package/bin/init.js +1 -1
- package/micro_11111/.editorconfig +10 -0
- package/micro_11111/.eslintignore +9 -0
- package/micro_11111/.eslintrc.js +33 -0
- package/micro_11111/.postcssrc.js +21 -0
- package/micro_11111/.prettierignore +10 -0
- package/micro_11111/.prettierrc +12 -0
- package/micro_11111/.stylelintignore +8 -0
- package/micro_11111/.stylelintrc.json +303 -0
- package/micro_11111/README.md +3 -0
- package/micro_11111/babel.config.js +34 -0
- package/micro_11111/env.config.js +62 -0
- package/micro_11111/env.param.config.js +112 -0
- package/micro_11111/favicon.ico +0 -0
- package/micro_11111/index.html +28 -0
- package/micro_11111/jsconfig.json +25 -0
- package/micro_11111/package.json +60 -0
- package/micro_11111/src/App.vue +32 -0
- package/micro_11111/src/Layout/Layout.vue +28 -0
- package/micro_11111/src/UI/index.js +1 -0
- package/micro_11111/src/assets/iconfont/DIN.Alternate.Bold.ttf +0 -0
- package/micro_11111/src/assets/layout/empty.png +0 -0
- package/micro_11111/src/assets/layout/prelogin-header.png +0 -0
- package/micro_11111/src/assets/trigger/close.png +0 -0
- package/micro_11111/src/assets/trigger/company.png +0 -0
- package/micro_11111/src/assets/trigger/department.png +0 -0
- package/micro_11111/src/assets/trigger/left-arrow.png +0 -0
- package/micro_11111/src/assets/trigger/pwd.png +0 -0
- package/micro_11111/src/assets/trigger/right-arrow-gray.png +0 -0
- package/micro_11111/src/assets/trigger/search-gray.png +0 -0
- package/micro_11111/src/assets/trigger/user.png +0 -0
- package/micro_11111/src/assets/trigger/weixin-work.png +0 -0
- package/micro_11111/src/components/Selector/Selector.vue +254 -0
- package/micro_11111/src/components/Selector/components/abyss.vue +308 -0
- package/micro_11111/src/components/Selector/components/search.vue +307 -0
- package/micro_11111/src/config.js +20 -0
- package/micro_11111/src/main.js +14 -0
- package/micro_11111/src/mixins/base.js +57 -0
- package/micro_11111/src/mixins/extension/app.js +80 -0
- package/micro_11111/src/mixins/extension/cryptoPassWord.js +15 -0
- package/micro_11111/src/mixins/extension/wx-relative.js +42 -0
- package/micro_11111/src/mixins/index.js +5 -0
- package/micro_11111/src/router/index.js +12 -0
- package/micro_11111/src/router/routes.js +55 -0
- package/micro_11111/src/service/common.js +72 -0
- package/micro_11111/src/service/preload.js +19 -0
- package/micro_11111/src/service/selector.js +114 -0
- package/micro_11111/src/store/getters.js +10 -0
- package/micro_11111/src/store/index.js +18 -0
- package/micro_11111/src/store/modules/Account.js +27 -0
- package/micro_11111/src/store/modules/Base.js +38 -0
- package/micro_11111/src/style/index.scss +3 -0
- package/micro_11111/src/style/mixins/mixins.scss +11 -0
- package/micro_11111/src/style/public.scss +32 -0
- package/micro_11111/src/style/reset.scss +814 -0
- package/micro_11111/src/utils/core/create-basic.js +16 -0
- package/micro_11111/src/utils/core/create.js +13 -0
- package/micro_11111/src/utils/core/reprefix.js +8 -0
- package/micro_11111/src/utils/fetch/fetch.js +66 -0
- package/micro_11111/src/utils/fetch/fetchDataType.js +53 -0
- package/micro_11111/src/utils/index.js +0 -0
- package/micro_11111/src/utils/library/aes.js +834 -0
- package/micro_11111/src/utils/library/crypto.js +130 -0
- package/micro_11111/src/utils/library/date.js +62 -0
- package/micro_11111/src/utils/library/debounce.js +34 -0
- package/micro_11111/src/utils/library/event.js +45 -0
- package/micro_11111/src/utils/library/image.js +14 -0
- package/micro_11111/src/utils/library/stringcover.js +9 -0
- package/micro_11111/src/utils/library/urlhandle.js +14 -0
- package/micro_11111/src/utils/library/video.js +156 -0
- package/micro_11111/src/views/Home/Home.vue +23 -0
- package/micro_11111/src/views/Login/Login.vue +65 -0
- package/micro_11111/src/views/Login/LoginApp.vue +72 -0
- package/micro_11111/src/views/Login/LoginThirdApp.vue +77 -0
- package/micro_11111/src/views/Login/LoginThirdParty.vue +59 -0
- package/micro_11111/src/views/Prelogin/index.vue +199 -0
- package/micro_11111/static/loadBuffer/loadBuffer.js +19 -0
- package/micro_11111/static/loadBuffer/loading.gif +0 -0
- package/micro_11111/tag.js +19 -0
- package/package.json +46 -46
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
const path = require('path');
|
|
3
|
+
|
|
4
|
+
module.exports = {
|
|
5
|
+
dev: {
|
|
6
|
+
entry: { app: './src/main.js' },
|
|
7
|
+
templateSPA: './index.html',
|
|
8
|
+
staticPath: './static',
|
|
9
|
+
assetsPublicPath: '/',
|
|
10
|
+
port: 3000,
|
|
11
|
+
host: '0.0.0.0', //'192.168.6.205','192.168.6.182' / 192.168.0.106
|
|
12
|
+
useEslint: false,
|
|
13
|
+
prescript: [],
|
|
14
|
+
posscript: [],
|
|
15
|
+
usepxtorem: true,
|
|
16
|
+
remUnit: 18,
|
|
17
|
+
proxyTable: {
|
|
18
|
+
'/api': {
|
|
19
|
+
// target: 'http://dmv10.new-see.com/',
|
|
20
|
+
// target: 'http://neibuv10.nwcloud.cn/',
|
|
21
|
+
// target: 'http://192.168.1.52/',
|
|
22
|
+
// target: 'http://120.35.8.190:6125/',
|
|
23
|
+
// target: 'http://192.168.1.20:8902',
|
|
24
|
+
target: 'http://10.10.10.202',
|
|
25
|
+
changeOrigin: true,
|
|
26
|
+
// pathRewrite: {
|
|
27
|
+
// '^/api/service': '/',
|
|
28
|
+
// },
|
|
29
|
+
},
|
|
30
|
+
'/equipAPI/qiwei': {
|
|
31
|
+
// target: 'http://dmv10.new-see.com/',
|
|
32
|
+
target: 'http://neibuv10.nwcloud.cn/',
|
|
33
|
+
// target: 'http://192.168.1.52/',
|
|
34
|
+
// target: 'http://120.35.8.190:6125/',
|
|
35
|
+
// target: 'http://192.168.1.20:8905',
|
|
36
|
+
changeOrigin: true,
|
|
37
|
+
// pathRewrite: {
|
|
38
|
+
// '^/equipAPI': '/',
|
|
39
|
+
// },
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
},
|
|
43
|
+
|
|
44
|
+
prod: {
|
|
45
|
+
mode: 'MPA', //project mode
|
|
46
|
+
entry: { app: './src/main.js' },
|
|
47
|
+
assetsPublicPath: './',
|
|
48
|
+
cssExtractPublicPath: '../../',
|
|
49
|
+
favicon: path.resolve('./favicon.ico'),
|
|
50
|
+
splitChunks: {
|
|
51
|
+
chunks: 'all',
|
|
52
|
+
maxInitialRequests: 3,
|
|
53
|
+
cacheGroups: {
|
|
54
|
+
libs: {
|
|
55
|
+
name: 'chunk-libs',
|
|
56
|
+
test: module => {
|
|
57
|
+
if (module.resource) {
|
|
58
|
+
const include = [/[\\/]node_modules[\\/]/].every(reg => {
|
|
59
|
+
return reg.test(module.resource);
|
|
60
|
+
});
|
|
61
|
+
const exclude = [/[\\/]node_modules[\\/](vue|antv[\\/]f2|)/].some(reg => {
|
|
62
|
+
return reg.test(module.resource);
|
|
63
|
+
});
|
|
64
|
+
|
|
65
|
+
return include && !exclude;
|
|
66
|
+
}
|
|
67
|
+
return false;
|
|
68
|
+
},
|
|
69
|
+
priority: -10,
|
|
70
|
+
chunks: 'initial',
|
|
71
|
+
},
|
|
72
|
+
|
|
73
|
+
vue: {
|
|
74
|
+
name: 'chunk-vue',
|
|
75
|
+
priority: 20,
|
|
76
|
+
test: /[\\/]node_modules[\\/]vue[\\/]/,
|
|
77
|
+
},
|
|
78
|
+
f2: {
|
|
79
|
+
name: 'chunk-f2',
|
|
80
|
+
priority: 20,
|
|
81
|
+
test: /[\\/]node_modules[\\/]antv[\\/]f2[\\/]/,
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
},
|
|
85
|
+
useEslint: false,
|
|
86
|
+
prescript: ['npm run tag'],
|
|
87
|
+
usepxtorem: true,
|
|
88
|
+
remUnit: 18,
|
|
89
|
+
},
|
|
90
|
+
base: {
|
|
91
|
+
babel: {
|
|
92
|
+
priority: true,
|
|
93
|
+
include: ['src'],
|
|
94
|
+
},
|
|
95
|
+
alias: {
|
|
96
|
+
'@': path.resolve('./src'),
|
|
97
|
+
},
|
|
98
|
+
prettier: {
|
|
99
|
+
switch: false,
|
|
100
|
+
files: ['src/**/*.{vue,less,scss,css,js,jsx,ts,tsx,json}'],
|
|
101
|
+
},
|
|
102
|
+
tools: {
|
|
103
|
+
npmUpgradeList: [
|
|
104
|
+
{
|
|
105
|
+
module: 'cx-builder',
|
|
106
|
+
edition: 'latest', //beta / latest
|
|
107
|
+
version: null,
|
|
108
|
+
},
|
|
109
|
+
],
|
|
110
|
+
},
|
|
111
|
+
},
|
|
112
|
+
};
|
|
Binary file
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
<html manifest="index.manifest">
|
|
3
|
+
<head>
|
|
4
|
+
<meta charset="utf-8">
|
|
5
|
+
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
|
6
|
+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
7
|
+
<meta content="black" name="apple-mobile-web-app-status-bar-style">
|
|
8
|
+
<meta name="keywords" content="系统">
|
|
9
|
+
<meta name="description" content="系统">
|
|
10
|
+
<title>系统</title>
|
|
11
|
+
</head>
|
|
12
|
+
<body>
|
|
13
|
+
<script src=<%= BASE_URL %>/loadBuffer/loadBuffer.js></script>
|
|
14
|
+
<script>
|
|
15
|
+
window.applicationCache && window.applicationCache.addEventListener('updateready', function(e) {
|
|
16
|
+
if (window.applicationCache.status === window.applicationCache.UPDATEREADY) {
|
|
17
|
+
window.applicationCache.swapCache();
|
|
18
|
+
window.location.reload();
|
|
19
|
+
} else {
|
|
20
|
+
// Manifest didn't changed. Nothing new to server.
|
|
21
|
+
}
|
|
22
|
+
}, false);
|
|
23
|
+
</script>
|
|
24
|
+
<!--<script src="https://gw.alipayobjects.com/os/antv/assets/f2/3.4.2/f2.min.js"></script>-->
|
|
25
|
+
<div id="app"></div>
|
|
26
|
+
<!-- built files will be auto injected -->
|
|
27
|
+
</body>
|
|
28
|
+
</html>
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"baseUrl": "./",
|
|
4
|
+
"paths": {
|
|
5
|
+
"@/*": [
|
|
6
|
+
"src/*"
|
|
7
|
+
],
|
|
8
|
+
"@ROOT/*": [
|
|
9
|
+
"/*"
|
|
10
|
+
],
|
|
11
|
+
"@NEAP/*": [
|
|
12
|
+
"node_modules/neap-core2/lib/src/*"
|
|
13
|
+
],
|
|
14
|
+
"@RI/*": [
|
|
15
|
+
"node_modules/neap-core2/injection/repositories/*"
|
|
16
|
+
],
|
|
17
|
+
"@FETCH/*": [
|
|
18
|
+
"node_modules/neap-core2/lib/src/utils/fetch/*"
|
|
19
|
+
]
|
|
20
|
+
}
|
|
21
|
+
},
|
|
22
|
+
"exclude": [
|
|
23
|
+
"dist"
|
|
24
|
+
]
|
|
25
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "h5_11111",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "",
|
|
5
|
+
"author": "Broccoli spring( gcx )",
|
|
6
|
+
"private": true,
|
|
7
|
+
"scripts": {
|
|
8
|
+
"command": "node_modules\\cx-builder\\lib\\entry.sh developer",
|
|
9
|
+
"command:mac": "node_modules/cx-builder/lib/entry.sh developer",
|
|
10
|
+
"build": "cross-env NODE_ENV=production env_config=prod node node_modules/cx-builder/lib/run/prod/run.prod.js",
|
|
11
|
+
"upgrade:mac": "node_modules/cx-builder/lib/entry.sh root 6 3",
|
|
12
|
+
"upgrade": "node_modules\\cx-builder\\lib\\entry.sh root 6 3",
|
|
13
|
+
"reinstall": "node_modules/cx-builder/lib/entry.sh root 6 4",
|
|
14
|
+
"clean": "rimraf ./dist/",
|
|
15
|
+
"tag": "node tag.js"
|
|
16
|
+
},
|
|
17
|
+
"dependencies": {
|
|
18
|
+
"axios": "^0.16.2",
|
|
19
|
+
"babel-plugin-import": "^1.13.0",
|
|
20
|
+
"babel-register": "^6.26.0",
|
|
21
|
+
"crypto-js": "^4.1.1",
|
|
22
|
+
"dayjs": "^1.11.9",
|
|
23
|
+
"js-cookie": "^2.2.1",
|
|
24
|
+
"localforage": "^1.9.0",
|
|
25
|
+
"vant": "^2.5.5",
|
|
26
|
+
"vconsole": "^3.3.4",
|
|
27
|
+
"vue": "2.6.10",
|
|
28
|
+
"vue-gallery": "^2.0.1",
|
|
29
|
+
"vue-router": "^3.0.7",
|
|
30
|
+
"vuex": "^3.1.3",
|
|
31
|
+
"watermarkjs": "^2.1.1",
|
|
32
|
+
"weixin-js-sdk": "^1.6.0"
|
|
33
|
+
},
|
|
34
|
+
"devDependencies": {
|
|
35
|
+
"@babel/runtime-corejs3": "^7.15.4",
|
|
36
|
+
"cx-builder": "0.0.53-42",
|
|
37
|
+
"mockjs": "^1.0.1-beta3",
|
|
38
|
+
"vue-template-compiler": "2.6.10"
|
|
39
|
+
},
|
|
40
|
+
"engines": {
|
|
41
|
+
"node": ">= 6.0.0",
|
|
42
|
+
"npm": ">= 3.0.0"
|
|
43
|
+
},
|
|
44
|
+
"browserslist": [
|
|
45
|
+
"> 1%",
|
|
46
|
+
"last 2 versions",
|
|
47
|
+
"not ie <= 8"
|
|
48
|
+
],
|
|
49
|
+
"lint-staged": {
|
|
50
|
+
"src/**/*.{js,json,jsx,less,vue}": [
|
|
51
|
+
"node node_modules/cx-builder/lib/prettier/lint-prettier.js",
|
|
52
|
+
"git add"
|
|
53
|
+
]
|
|
54
|
+
},
|
|
55
|
+
"husky": {
|
|
56
|
+
"hooks": {
|
|
57
|
+
"pre-commit": "lint-staged"
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div id="app" :tag="version">
|
|
3
|
+
<router-view :key="routeKey"/>
|
|
4
|
+
</div>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script>
|
|
8
|
+
import config from '../package.json'
|
|
9
|
+
export default {
|
|
10
|
+
name: 'app',
|
|
11
|
+
|
|
12
|
+
computed: {
|
|
13
|
+
routeKey() {
|
|
14
|
+
return new Date().getTime();
|
|
15
|
+
},
|
|
16
|
+
|
|
17
|
+
version() {
|
|
18
|
+
return config.tag
|
|
19
|
+
}
|
|
20
|
+
},
|
|
21
|
+
created() {
|
|
22
|
+
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
</script>
|
|
26
|
+
|
|
27
|
+
<style rel="stylesheet/scss" lang="scss">
|
|
28
|
+
#app {
|
|
29
|
+
-webkit-font-smoothing: antialiased;
|
|
30
|
+
-moz-osx-font-smoothing: grayscale;
|
|
31
|
+
}
|
|
32
|
+
</style>
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<!--整体布局-->
|
|
2
|
+
<template>
|
|
3
|
+
<div class="layout" id="layout">
|
|
4
|
+
<transition leave-active-class="" enter-active-class="out-in">
|
|
5
|
+
<router-view :key="key"></router-view>
|
|
6
|
+
</transition>
|
|
7
|
+
</div>
|
|
8
|
+
</template>
|
|
9
|
+
|
|
10
|
+
<script>
|
|
11
|
+
export default {
|
|
12
|
+
name: 'Layout',
|
|
13
|
+
|
|
14
|
+
data() {
|
|
15
|
+
return {};
|
|
16
|
+
},
|
|
17
|
+
computed: {
|
|
18
|
+
key() {
|
|
19
|
+
return this.$route.path;
|
|
20
|
+
},
|
|
21
|
+
},
|
|
22
|
+
};
|
|
23
|
+
</script>
|
|
24
|
+
|
|
25
|
+
<style rel="stylesheet/scss" lang="scss" scoped>
|
|
26
|
+
#layout {
|
|
27
|
+
}
|
|
28
|
+
</style>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import '../style/index.scss';
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,254 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<popup v-model="selfShow" class="selector">
|
|
3
|
+
<nav-bar title="通讯录" @click-left="closePopup">
|
|
4
|
+
<template slot="left">
|
|
5
|
+
<img src="../../assets/trigger/left-arrow.png" width="13" />
|
|
6
|
+
</template>
|
|
7
|
+
</nav-bar>
|
|
8
|
+
<div class="search-trigger">
|
|
9
|
+
<div @click="searchShow = true"><img src="../../assets/trigger/search-gray.png" />搜索</div>
|
|
10
|
+
</div>
|
|
11
|
+
<div class="entry">
|
|
12
|
+
<div @click="descend(true)">
|
|
13
|
+
<div class="left"><img src="../../assets/trigger/company.png" />公司</div>
|
|
14
|
+
<img class="right-arrow" src="../../assets/trigger/right-arrow-gray.png" />
|
|
15
|
+
</div>
|
|
16
|
+
<div @click="descend(false)">
|
|
17
|
+
<div class="left"><img src="../../assets/trigger/department.png" />部门</div>
|
|
18
|
+
<img class="right-arrow" src="../../assets/trigger/right-arrow-gray.png" />
|
|
19
|
+
</div>
|
|
20
|
+
</div>
|
|
21
|
+
<div class="subtitle">常用联系人</div>
|
|
22
|
+
<div class="recent">
|
|
23
|
+
<div v-for="item in recent" :key="item.id" @click="onConfirm(item)">
|
|
24
|
+
<div class="left">
|
|
25
|
+
<div v-if="type === 'user'" class="avatar">
|
|
26
|
+
{{ item.name.slice(-2) }}
|
|
27
|
+
</div>
|
|
28
|
+
<img
|
|
29
|
+
v-else
|
|
30
|
+
:src="require(`../../assets/trigger/${item.isCompany ? 'company' : 'department'}.png`)"
|
|
31
|
+
/>
|
|
32
|
+
<div class="main">
|
|
33
|
+
<div>{{ item.name }}</div>
|
|
34
|
+
<div>{{ item.superior }}</div>
|
|
35
|
+
</div>
|
|
36
|
+
</div>
|
|
37
|
+
<div v-if="type === 'user'" class="right">{{ item.tel }}</div>
|
|
38
|
+
</div>
|
|
39
|
+
</div>
|
|
40
|
+
<search :show.sync="searchShow" :type="type" :detail="detail" @select-history="onConfirm" />
|
|
41
|
+
<abyss :show.sync="abyssShow" :type="type" :isInit="isInit" @confirm="onConfirm" />
|
|
42
|
+
</popup>
|
|
43
|
+
</template>
|
|
44
|
+
|
|
45
|
+
<script>
|
|
46
|
+
import { Popup, NavBar, Toast } from 'vant';
|
|
47
|
+
import Search from './components/search';
|
|
48
|
+
import Abyss from './components/abyss';
|
|
49
|
+
import { mapGetters } from 'vuex';
|
|
50
|
+
import { getUserDetail, addRecord, selectRecord } from '../../service/selector';
|
|
51
|
+
|
|
52
|
+
export default {
|
|
53
|
+
name: 'selector',
|
|
54
|
+
components: { Popup, NavBar, Toast, Search, Abyss },
|
|
55
|
+
props: {
|
|
56
|
+
show: {
|
|
57
|
+
type: Boolean,
|
|
58
|
+
default: false,
|
|
59
|
+
},
|
|
60
|
+
type: {
|
|
61
|
+
type: String,
|
|
62
|
+
default: 'user',
|
|
63
|
+
},
|
|
64
|
+
},
|
|
65
|
+
data() {
|
|
66
|
+
return {
|
|
67
|
+
selfShow: false,
|
|
68
|
+
searchShow: false,
|
|
69
|
+
abyssShow: false,
|
|
70
|
+
isInit: true,
|
|
71
|
+
|
|
72
|
+
recent: [],
|
|
73
|
+
detail: {},
|
|
74
|
+
};
|
|
75
|
+
},
|
|
76
|
+
computed: {
|
|
77
|
+
...mapGetters(['userId']),
|
|
78
|
+
},
|
|
79
|
+
watch: {
|
|
80
|
+
show(val) {
|
|
81
|
+
if (['user', 'dept'].indexOf(this.type) === -1) {
|
|
82
|
+
Toast('参数type输入有误');
|
|
83
|
+
this.closePopup();
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
this.selfShow = val;
|
|
87
|
+
if (val) {
|
|
88
|
+
this.getRecent();
|
|
89
|
+
}
|
|
90
|
+
},
|
|
91
|
+
},
|
|
92
|
+
created() {
|
|
93
|
+
this.selfShow = this.show;
|
|
94
|
+
this.getUserDetail();
|
|
95
|
+
},
|
|
96
|
+
methods: {
|
|
97
|
+
closePopup() {
|
|
98
|
+
this.selfShow = false;
|
|
99
|
+
this.$emit('update:show', false);
|
|
100
|
+
this.setRecent();
|
|
101
|
+
},
|
|
102
|
+
descend(val) {
|
|
103
|
+
this.isInit = val;
|
|
104
|
+
this.abyssShow = true;
|
|
105
|
+
},
|
|
106
|
+
onConfirm(obj) {
|
|
107
|
+
this.$emit('confirm', { id: obj.id, name: obj.name, tel: obj.tel || '' });
|
|
108
|
+
if (this.recent.length) {
|
|
109
|
+
let sameIndex = this.recent.findIndex(i => i.id === obj.id);
|
|
110
|
+
if (sameIndex > -1) {
|
|
111
|
+
this.recent.splice(sameIndex, 1);
|
|
112
|
+
} else {
|
|
113
|
+
this.recent.length === 5 && this.recent.shift();
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
this.recent.push(obj);
|
|
117
|
+
this.closePopup();
|
|
118
|
+
},
|
|
119
|
+
setRecent() {
|
|
120
|
+
addRecord(
|
|
121
|
+
{ userid: this.detail.userId, enterpriseid: this.detail.enterpriseId },
|
|
122
|
+
{ controlId: 'wx-recent-' + this.type, content: JSON.stringify(this.recent) }
|
|
123
|
+
).then(res => {
|
|
124
|
+
// console.log(res);
|
|
125
|
+
});
|
|
126
|
+
},
|
|
127
|
+
getRecent() {
|
|
128
|
+
selectRecord(
|
|
129
|
+
{ userid: this.detail.userId, enterpriseid: this.detail.enterpriseId },
|
|
130
|
+
{ controlId: 'wx-recent-' + this.type }
|
|
131
|
+
).then(res => {
|
|
132
|
+
if (res) {
|
|
133
|
+
this.recent = JSON.parse(res.content) || [];
|
|
134
|
+
}
|
|
135
|
+
});
|
|
136
|
+
},
|
|
137
|
+
getUserDetail() {
|
|
138
|
+
getUserDetail({ userId: this.userId }).then(res => {
|
|
139
|
+
if (res) {
|
|
140
|
+
this.detail = res;
|
|
141
|
+
}
|
|
142
|
+
});
|
|
143
|
+
},
|
|
144
|
+
},
|
|
145
|
+
};
|
|
146
|
+
</script>
|
|
147
|
+
|
|
148
|
+
<style lang="scss" scoped>
|
|
149
|
+
.selector {
|
|
150
|
+
width: 100%;
|
|
151
|
+
height: 100%;
|
|
152
|
+
/deep/ .van-nav-bar {
|
|
153
|
+
&__title {
|
|
154
|
+
font-weight: bold;
|
|
155
|
+
font-size: 17px;
|
|
156
|
+
color: #333;
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
.right-arrow {
|
|
160
|
+
width: 10px;
|
|
161
|
+
}
|
|
162
|
+
.subtitle {
|
|
163
|
+
padding-left: 16px;
|
|
164
|
+
font-size: 11px;
|
|
165
|
+
line-height: 24px;
|
|
166
|
+
color: #999;
|
|
167
|
+
background: #f3f3f3;
|
|
168
|
+
}
|
|
169
|
+
.search-trigger {
|
|
170
|
+
padding: 10px 12px;
|
|
171
|
+
background: #f3f3f3;
|
|
172
|
+
div {
|
|
173
|
+
display: flex;
|
|
174
|
+
justify-content: center;
|
|
175
|
+
align-items: center;
|
|
176
|
+
height: 36px;
|
|
177
|
+
font-size: 16px;
|
|
178
|
+
color: #bbb;
|
|
179
|
+
background: #fff;
|
|
180
|
+
border-radius: 3px;
|
|
181
|
+
img {
|
|
182
|
+
width: 16px;
|
|
183
|
+
margin-right: 7px;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
.entry,
|
|
188
|
+
.recent {
|
|
189
|
+
> div {
|
|
190
|
+
position: relative;
|
|
191
|
+
display: flex;
|
|
192
|
+
justify-content: space-between;
|
|
193
|
+
align-items: center;
|
|
194
|
+
height: 64px;
|
|
195
|
+
padding: 0 16px;
|
|
196
|
+
border-bottom: 1px solid transparent;
|
|
197
|
+
&:after {
|
|
198
|
+
content: '';
|
|
199
|
+
position: absolute;
|
|
200
|
+
bottom: -1px;
|
|
201
|
+
width: calc(100% - 16px);
|
|
202
|
+
height: 1px;
|
|
203
|
+
background: #f1f1f1;
|
|
204
|
+
}
|
|
205
|
+
.left {
|
|
206
|
+
display: flex;
|
|
207
|
+
align-items: center;
|
|
208
|
+
overflow: hidden;
|
|
209
|
+
font-size: 16px;
|
|
210
|
+
color: #333;
|
|
211
|
+
img,
|
|
212
|
+
.avatar {
|
|
213
|
+
width: 40px;
|
|
214
|
+
margin-right: 10px;
|
|
215
|
+
}
|
|
216
|
+
.avatar {
|
|
217
|
+
display: flex;
|
|
218
|
+
justify-content: center;
|
|
219
|
+
align-items: center;
|
|
220
|
+
flex-shrink: 0;
|
|
221
|
+
height: 40px;
|
|
222
|
+
font-size: 11px;
|
|
223
|
+
color: #fff;
|
|
224
|
+
background: #4ccf89;
|
|
225
|
+
border-radius: 50%;
|
|
226
|
+
}
|
|
227
|
+
.main {
|
|
228
|
+
display: flex;
|
|
229
|
+
flex-direction: column;
|
|
230
|
+
justify-content: space-between;
|
|
231
|
+
overflow: hidden;
|
|
232
|
+
div {
|
|
233
|
+
overflow: hidden;
|
|
234
|
+
white-space: nowrap;
|
|
235
|
+
text-overflow: ellipsis;
|
|
236
|
+
& + div {
|
|
237
|
+
font-size: 12px;
|
|
238
|
+
color: #999;
|
|
239
|
+
}
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
}
|
|
243
|
+
.right {
|
|
244
|
+
font-size: 14px;
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
.entry {
|
|
249
|
+
> div:last-child:after {
|
|
250
|
+
display: none;
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
</style>
|