newsee-cli 1.0.4 → 1.0.6
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/bin/init.js +1 -1
- package/package.json +1 -1
- package/micro_11111/.editorconfig +0 -10
- package/micro_11111/.eslintignore +0 -9
- package/micro_11111/.eslintrc.js +0 -33
- package/micro_11111/.postcssrc.js +0 -21
- package/micro_11111/.prettierignore +0 -10
- package/micro_11111/.prettierrc +0 -12
- package/micro_11111/.stylelintignore +0 -8
- package/micro_11111/.stylelintrc.json +0 -303
- package/micro_11111/README.md +0 -3
- package/micro_11111/babel.config.js +0 -34
- package/micro_11111/env.config.js +0 -62
- package/micro_11111/env.param.config.js +0 -112
- package/micro_11111/favicon.ico +0 -0
- package/micro_11111/index.html +0 -28
- package/micro_11111/jsconfig.json +0 -25
- package/micro_11111/package.json +0 -60
- package/micro_11111/src/App.vue +0 -32
- package/micro_11111/src/Layout/Layout.vue +0 -28
- package/micro_11111/src/UI/index.js +0 -1
- 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 +0 -254
- package/micro_11111/src/components/Selector/components/abyss.vue +0 -308
- package/micro_11111/src/components/Selector/components/search.vue +0 -307
- package/micro_11111/src/config.js +0 -20
- package/micro_11111/src/main.js +0 -14
- package/micro_11111/src/mixins/base.js +0 -57
- package/micro_11111/src/mixins/extension/app.js +0 -80
- package/micro_11111/src/mixins/extension/cryptoPassWord.js +0 -15
- package/micro_11111/src/mixins/extension/wx-relative.js +0 -42
- package/micro_11111/src/mixins/index.js +0 -5
- package/micro_11111/src/router/index.js +0 -12
- package/micro_11111/src/router/routes.js +0 -55
- package/micro_11111/src/service/common.js +0 -72
- package/micro_11111/src/service/preload.js +0 -19
- package/micro_11111/src/service/selector.js +0 -114
- package/micro_11111/src/store/getters.js +0 -10
- package/micro_11111/src/store/index.js +0 -18
- package/micro_11111/src/store/modules/Account.js +0 -27
- package/micro_11111/src/store/modules/Base.js +0 -38
- package/micro_11111/src/style/index.scss +0 -3
- package/micro_11111/src/style/mixins/mixins.scss +0 -11
- package/micro_11111/src/style/public.scss +0 -32
- package/micro_11111/src/style/reset.scss +0 -814
- package/micro_11111/src/utils/core/create-basic.js +0 -16
- package/micro_11111/src/utils/core/create.js +0 -13
- package/micro_11111/src/utils/core/reprefix.js +0 -8
- package/micro_11111/src/utils/fetch/fetch.js +0 -66
- package/micro_11111/src/utils/fetch/fetchDataType.js +0 -53
- package/micro_11111/src/utils/index.js +0 -0
- package/micro_11111/src/utils/library/aes.js +0 -834
- package/micro_11111/src/utils/library/crypto.js +0 -130
- package/micro_11111/src/utils/library/date.js +0 -62
- package/micro_11111/src/utils/library/debounce.js +0 -34
- package/micro_11111/src/utils/library/event.js +0 -45
- package/micro_11111/src/utils/library/image.js +0 -14
- package/micro_11111/src/utils/library/stringcover.js +0 -9
- package/micro_11111/src/utils/library/urlhandle.js +0 -14
- package/micro_11111/src/utils/library/video.js +0 -156
- package/micro_11111/src/views/Home/Home.vue +0 -23
- package/micro_11111/src/views/Login/Login.vue +0 -65
- package/micro_11111/src/views/Login/LoginApp.vue +0 -72
- package/micro_11111/src/views/Login/LoginThirdApp.vue +0 -77
- package/micro_11111/src/views/Login/LoginThirdParty.vue +0 -59
- package/micro_11111/src/views/Prelogin/index.vue +0 -199
- package/micro_11111/static/loadBuffer/loadBuffer.js +0 -19
- package/micro_11111/static/loadBuffer/loading.gif +0 -0
- package/micro_11111/tag.js +0 -19
|
@@ -1,77 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<span></span>
|
|
3
|
-
</template>
|
|
4
|
-
|
|
5
|
-
<script>
|
|
6
|
-
import mixins from '../../mixins';
|
|
7
|
-
import { Toast } from 'vant';
|
|
8
|
-
import { mapGetters } from 'vuex';
|
|
9
|
-
import { login, decryptUserId } from '../../service/common';
|
|
10
|
-
import { encrypt } from '../../utils/library/aes';
|
|
11
|
-
import { getUrlParam } from '../../utils/library/urlhandle';
|
|
12
|
-
import Cookie from 'js-cookie';
|
|
13
|
-
|
|
14
|
-
export default {
|
|
15
|
-
name: 'Login',
|
|
16
|
-
mixins: [mixins],
|
|
17
|
-
computed: {
|
|
18
|
-
...mapGetters(['token', 'account']),
|
|
19
|
-
},
|
|
20
|
-
|
|
21
|
-
methods: {
|
|
22
|
-
//获取登录信息
|
|
23
|
-
login() {
|
|
24
|
-
decryptUserId({ userInfo: getUrlParam('userId') }).then((newRes) => {
|
|
25
|
-
login(
|
|
26
|
-
encrypt(
|
|
27
|
-
JSON.stringify({
|
|
28
|
-
Request: {
|
|
29
|
-
Head: { NWVersion: '1', NWCode: '1SR', NWGUID: '', NWExID: '' },
|
|
30
|
-
Data: { account: newRes },
|
|
31
|
-
},
|
|
32
|
-
})
|
|
33
|
-
)
|
|
34
|
-
).then(async (res) => {
|
|
35
|
-
this.$store.dispatch('setUserInfo', {
|
|
36
|
-
...res,
|
|
37
|
-
token: res.userToken,
|
|
38
|
-
});
|
|
39
|
-
Cookie.set('token', res.userToken, { expires: 3 });
|
|
40
|
-
Cookie.set('app-id', '4ce19ca8fcd150a4', { expires: 3 });
|
|
41
|
-
Cookie.set('app-client-type', 'mb', { expires: 3 });
|
|
42
|
-
|
|
43
|
-
this.redirect();
|
|
44
|
-
});
|
|
45
|
-
});
|
|
46
|
-
},
|
|
47
|
-
//重定向
|
|
48
|
-
redirect() {
|
|
49
|
-
localStorage.setItem('source', 'fyapp');
|
|
50
|
-
this.$router.replace({ path: 'home', query: { timestamp: Date.now() } });
|
|
51
|
-
},
|
|
52
|
-
},
|
|
53
|
-
|
|
54
|
-
created() {
|
|
55
|
-
//进入页面前先清空一下localStorage
|
|
56
|
-
localStorage.clear();
|
|
57
|
-
|
|
58
|
-
const precinctId = getUrlParam('precinctId');
|
|
59
|
-
if (precinctId) this.$store.dispatch('setPrecinctId', { precinctId });
|
|
60
|
-
//在线时
|
|
61
|
-
if (navigator.onLine) {
|
|
62
|
-
if (getUrlParam('userId')) {
|
|
63
|
-
this.login();
|
|
64
|
-
return;
|
|
65
|
-
}
|
|
66
|
-
Toast('登录信息缺失');
|
|
67
|
-
} else {
|
|
68
|
-
//缓存登录
|
|
69
|
-
if (this.token) {
|
|
70
|
-
this.redirect();
|
|
71
|
-
} else {
|
|
72
|
-
Toast.fail('网络状态不佳,请先去有网的地方加载数据');
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
},
|
|
76
|
-
};
|
|
77
|
-
</script>
|
|
@@ -1,59 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<span></span>
|
|
3
|
-
</template>
|
|
4
|
-
|
|
5
|
-
<script>
|
|
6
|
-
import mixins from '../../mixins';
|
|
7
|
-
import { Toast } from 'vant';
|
|
8
|
-
import { mapGetters } from 'vuex';
|
|
9
|
-
import { login } from '../../service/common';
|
|
10
|
-
import { encrypt } from '../../utils/library/aes';
|
|
11
|
-
import { getUrlParam } from '../../utils/library/urlhandle';
|
|
12
|
-
|
|
13
|
-
export default {
|
|
14
|
-
name: 'Login',
|
|
15
|
-
mixins: [mixins],
|
|
16
|
-
computed: {
|
|
17
|
-
...mapGetters(['token', 'account']),
|
|
18
|
-
},
|
|
19
|
-
created() {
|
|
20
|
-
//进入页面前先清空一下localStorage
|
|
21
|
-
localStorage.clear();
|
|
22
|
-
|
|
23
|
-
//在线时
|
|
24
|
-
if (navigator.onLine) {
|
|
25
|
-
this.$store.dispatch('setAccount', getUrlParam('userId'));
|
|
26
|
-
this.login();
|
|
27
|
-
} else {
|
|
28
|
-
//缓存登录
|
|
29
|
-
if (this.token) {
|
|
30
|
-
this.$router.replace({ path: 'home', query: { timestamp: Date.now() } });
|
|
31
|
-
} else {
|
|
32
|
-
Toast.fail('网络状态不佳,请先去有网的地方加载数据');
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
},
|
|
36
|
-
methods: {
|
|
37
|
-
//获取登录信息
|
|
38
|
-
login() {
|
|
39
|
-
login(
|
|
40
|
-
encrypt(
|
|
41
|
-
JSON.stringify({
|
|
42
|
-
Request: {
|
|
43
|
-
Head: { NWVersion: '1', NWCode: '1SR', NWGUID: '', NWExID: '' },
|
|
44
|
-
Data: { account: this.account },
|
|
45
|
-
},
|
|
46
|
-
})
|
|
47
|
-
)
|
|
48
|
-
).then(async (res) => {
|
|
49
|
-
this.$store.dispatch('setUserInfo', {
|
|
50
|
-
...res,
|
|
51
|
-
token: res.userToken,
|
|
52
|
-
});
|
|
53
|
-
|
|
54
|
-
this.$router.replace({ path: 'home', query: { timestamp: Date.now() } });
|
|
55
|
-
});
|
|
56
|
-
},
|
|
57
|
-
},
|
|
58
|
-
};
|
|
59
|
-
</script>
|
|
@@ -1,199 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="prelogin" v-if="needLogin">
|
|
3
|
-
<div class="center-area">
|
|
4
|
-
<van-form>
|
|
5
|
-
<field v-model="account" type="text" placeholder="请输入用户名">
|
|
6
|
-
<template slot="left-icon">
|
|
7
|
-
<img src="@/assets/trigger/user.png" alt="" />
|
|
8
|
-
</template>
|
|
9
|
-
</field>
|
|
10
|
-
<field v-model="pwd" type="password" placeholder="请输入密码" autocomplete>
|
|
11
|
-
<template slot="left-icon">
|
|
12
|
-
<img src="@/assets/trigger/pwd.png" alt="" />
|
|
13
|
-
</template>
|
|
14
|
-
</field>
|
|
15
|
-
<button @click="login">登 录</button>
|
|
16
|
-
</van-form>
|
|
17
|
-
</div>
|
|
18
|
-
<div class="bottom-area">
|
|
19
|
-
<div class="bottom-line">
|
|
20
|
-
<span>第三方账号登录</span>
|
|
21
|
-
</div>
|
|
22
|
-
<div class="quick-login" @click="quickLogin">
|
|
23
|
-
<div><img src="@/assets/trigger/weixin-work.png" alt="" />企业微信快速登录</div>
|
|
24
|
-
</div>
|
|
25
|
-
</div>
|
|
26
|
-
<popup v-model="popupShow" :close-on-click-overlay="false">
|
|
27
|
-
<loading size="40" />
|
|
28
|
-
</popup>
|
|
29
|
-
</div>
|
|
30
|
-
</template>
|
|
31
|
-
|
|
32
|
-
<script>
|
|
33
|
-
import mixins from '@/mixins';
|
|
34
|
-
import { Form, Field, Toast, Popup, Loading } from 'vant';
|
|
35
|
-
import cryptoPassWord from '@/mixins/extension/cryptoPassWord';
|
|
36
|
-
import { login } from '@/service/preload';
|
|
37
|
-
|
|
38
|
-
export default {
|
|
39
|
-
mixins: [mixins, cryptoPassWord],
|
|
40
|
-
components: {
|
|
41
|
-
VanForm: Form,
|
|
42
|
-
Popup,
|
|
43
|
-
Loading,
|
|
44
|
-
Field,
|
|
45
|
-
},
|
|
46
|
-
data() {
|
|
47
|
-
return {
|
|
48
|
-
account: '',
|
|
49
|
-
pwd: '',
|
|
50
|
-
needLogin: false,
|
|
51
|
-
popupShow: false,
|
|
52
|
-
};
|
|
53
|
-
},
|
|
54
|
-
created() {
|
|
55
|
-
const userInfo = JSON.parse(localStorage.getItem('userInfo'));
|
|
56
|
-
if (userInfo && userInfo.userId) {
|
|
57
|
-
this.$router.replace({ name: 'login', query: { userId: userInfo.account } });
|
|
58
|
-
} else {
|
|
59
|
-
//进入页面前先清空一下localStorage
|
|
60
|
-
localStorage.clear();
|
|
61
|
-
|
|
62
|
-
this.needLogin = true;
|
|
63
|
-
}
|
|
64
|
-
},
|
|
65
|
-
methods: {
|
|
66
|
-
login() {
|
|
67
|
-
if (this.account.trim() === '' || this.pwd.trim() === '') {
|
|
68
|
-
Toast('账号或密码不能为空');
|
|
69
|
-
return;
|
|
70
|
-
}
|
|
71
|
-
this.popupShow = true;
|
|
72
|
-
login({
|
|
73
|
-
username: this.account,
|
|
74
|
-
userAccount: this.account,
|
|
75
|
-
password: this.getCryptoBybase64(this.pwd),
|
|
76
|
-
})
|
|
77
|
-
.then(async (res) => {
|
|
78
|
-
this.popupShow = false;
|
|
79
|
-
if (!res) return;
|
|
80
|
-
this.$store.dispatch('setUserInfo', {
|
|
81
|
-
...res,
|
|
82
|
-
account: res.userAccount,
|
|
83
|
-
});
|
|
84
|
-
this.$store.dispatch('setAccount', res.userAccount);
|
|
85
|
-
|
|
86
|
-
this.redirect();
|
|
87
|
-
})
|
|
88
|
-
.catch((err) => {
|
|
89
|
-
this.popupShow = false;
|
|
90
|
-
Toast(err.toString());
|
|
91
|
-
});
|
|
92
|
-
},
|
|
93
|
-
quickLogin() {
|
|
94
|
-
this.$router.replace('/login');
|
|
95
|
-
},
|
|
96
|
-
redirect() {
|
|
97
|
-
localStorage.setItem('source', 'wx');
|
|
98
|
-
this.$router.replace({ path: 'home', query: { timestamp: Date.now() } });
|
|
99
|
-
},
|
|
100
|
-
},
|
|
101
|
-
};
|
|
102
|
-
</script>
|
|
103
|
-
|
|
104
|
-
<style lang="scss" scoped>
|
|
105
|
-
.prelogin {
|
|
106
|
-
position: relative;
|
|
107
|
-
height: 100vh;
|
|
108
|
-
background: #fff url('~@/assets/layout/prelogin-header.png') no-repeat;
|
|
109
|
-
background-size: 100%;
|
|
110
|
-
.center-area {
|
|
111
|
-
position: absolute;
|
|
112
|
-
top: 50%;
|
|
113
|
-
width: 100%;
|
|
114
|
-
padding: 0 36px;
|
|
115
|
-
transform: translateY(-50%);
|
|
116
|
-
box-sizing: border-box;
|
|
117
|
-
/deep/ .van-cell {
|
|
118
|
-
padding-left: 0;
|
|
119
|
-
padding-right: 0;
|
|
120
|
-
&::after {
|
|
121
|
-
left: 0;
|
|
122
|
-
right: 0;
|
|
123
|
-
border-color: #ccc;
|
|
124
|
-
}
|
|
125
|
-
input {
|
|
126
|
-
font-size: 15px;
|
|
127
|
-
}
|
|
128
|
-
.van-field__left-icon {
|
|
129
|
-
display: flex;
|
|
130
|
-
align-items: flex-start;
|
|
131
|
-
margin-top: 2px;
|
|
132
|
-
margin-right: 20px;
|
|
133
|
-
img {
|
|
134
|
-
width: 20px;
|
|
135
|
-
}
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
button {
|
|
139
|
-
width: 100%;
|
|
140
|
-
height: 50px;
|
|
141
|
-
margin-top: 30px;
|
|
142
|
-
font-size: 18px;
|
|
143
|
-
color: #fff;
|
|
144
|
-
background: #307dcd;
|
|
145
|
-
border: none;
|
|
146
|
-
border-radius: 4px;
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
.bottom-area {
|
|
150
|
-
position: absolute;
|
|
151
|
-
bottom: 80px;
|
|
152
|
-
width: 100%;
|
|
153
|
-
text-align: center;
|
|
154
|
-
.bottom-line {
|
|
155
|
-
position: relative;
|
|
156
|
-
margin: 0 36px;
|
|
157
|
-
font-size: 10px;
|
|
158
|
-
color: #999;
|
|
159
|
-
span {
|
|
160
|
-
position: relative;
|
|
161
|
-
z-index: 99;
|
|
162
|
-
padding: 0 6px;
|
|
163
|
-
background: #fff;
|
|
164
|
-
}
|
|
165
|
-
&::after {
|
|
166
|
-
content: '';
|
|
167
|
-
position: absolute;
|
|
168
|
-
display: block;
|
|
169
|
-
top: 50%;
|
|
170
|
-
width: 100%;
|
|
171
|
-
height: 1px;
|
|
172
|
-
background: #ddd;
|
|
173
|
-
transform: translateY(-50%);
|
|
174
|
-
}
|
|
175
|
-
}
|
|
176
|
-
.quick-login {
|
|
177
|
-
margin: 40px auto 0;
|
|
178
|
-
display: inline-block;
|
|
179
|
-
padding: 10px 20px;
|
|
180
|
-
background: #f1f1f1;
|
|
181
|
-
border-radius: 39px;
|
|
182
|
-
> div {
|
|
183
|
-
display: flex;
|
|
184
|
-
align-items: center;
|
|
185
|
-
img {
|
|
186
|
-
width: 22px;
|
|
187
|
-
margin-right: 8px;
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
}
|
|
192
|
-
}
|
|
193
|
-
/deep/ .van-popup {
|
|
194
|
-
background: transparent;
|
|
195
|
-
.van-loading {
|
|
196
|
-
overflow: hidden;
|
|
197
|
-
}
|
|
198
|
-
}
|
|
199
|
-
</style>
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* create Loading before loading
|
|
3
|
-
*/
|
|
4
|
-
function createLoading() {
|
|
5
|
-
var loadingDom = document.createElement('div');
|
|
6
|
-
loadingDom.setAttribute('id', 'loadingBuffer');
|
|
7
|
-
loadingDom.style.cssText = `
|
|
8
|
-
position: fixed;z-index: 99; width: 100%;height: 100%;top: 0;left: 0;
|
|
9
|
-
background: rgba(0, 0, 0, 0.3) url(static/loadBuffer/loading.gif) center center / 80px 80px no-repeat;
|
|
10
|
-
`;
|
|
11
|
-
document.body.appendChild(loadingDom);
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
//init
|
|
15
|
-
createLoading();
|
|
16
|
-
|
|
17
|
-
window.onload = function() {
|
|
18
|
-
document.body.removeChild(document.getElementById('loadingBuffer'));
|
|
19
|
-
};
|
|
Binary file
|
package/micro_11111/tag.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
const fs = require('fs');
|
|
2
|
-
const dayjs = require("dayjs")
|
|
3
|
-
const data = require('./package.json');
|
|
4
|
-
const execSync = require('child_process').execSync;
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
const getGitBranch = () => {
|
|
8
|
-
let gitBranch = execSync('git name-rev --name-only HEAD');
|
|
9
|
-
return String(gitBranch).trim()
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
const nowTime = dayjs().format('YYYY-MM-DD HH:mm:ss')
|
|
13
|
-
const branch = getGitBranch()
|
|
14
|
-
const tag = branch + '__' + nowTime
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
data['tag'] = tag;
|
|
18
|
-
|
|
19
|
-
fs.writeFileSync(`./package.json`, JSON.stringify(data, null, 2));
|