Commit fc76171047ba661b7699fe89c90158e5785d7771
1 parent
1558aa37
Exists in
develop
and in
1 other branch
feat:修改问题、增加登录验证码,记住密码功能
Showing
27 changed files
with
324 additions
and
80 deletions
Show diff stats
api/address.js
@@ -1,15 +0,0 @@ | @@ -1,15 +0,0 @@ | ||
1 | -//请求工具参考https://ext.dcloud.net.cn/plugin?id=392 | ||
2 | -const { http } = uni.$u | ||
3 | - | ||
4 | -//获得用户收件地址列表 | ||
5 | -export const getAddressList = params => http.get('/member/address/list', params) | ||
6 | -//创建用户收件地址 | ||
7 | -export const createAddress = data => http.post('/member/address/create', data) | ||
8 | -//通过ID获得用户收件地址 | ||
9 | -export const getAddressById = params => http.get('/member/address/get', { params }) | ||
10 | -//获得默认的用户收件地址 | ||
11 | -export const getDefaultUserAddress = params => http.get('/member/address/get-default', { params }) | ||
12 | -//更新用户收件地址 | ||
13 | -export const updateAddress = params => http.put('/member/address/update', params) | ||
14 | -//删除用户收件地址 | ||
15 | -export const deleteAddress = params => http.delete('/member/address/delete', {}, { params }) |
api/auth.js
1 | -import code from "../uni_modules/uview-ui/libs/config/props/code" | ||
2 | - | 1 | +import { encrypt } from "@/utils/encrypt.js"; |
2 | +import request from '@/utils/request' | ||
3 | //请求工具参考https://ext.dcloud.net.cn/plugin?id=392 | 3 | //请求工具参考https://ext.dcloud.net.cn/plugin?id=392 |
4 | -const { http } = uni.$u | 4 | +const { |
5 | + http | ||
6 | +} = uni.$u | ||
5 | 7 | ||
6 | //使用手机 + 密码登录 | 8 | //使用手机 + 密码登录 |
7 | -export const passwordLogin = data => http.post('/auth/login', data) | 9 | +export const passwordLogin = data => { |
10 | + data.password = encrypt(data.password); | ||
11 | + return http.post('/auth/login', data) | ||
12 | +} | ||
13 | + | ||
14 | +// export function passwordLogin(username, password, code, uuid) { | ||
15 | +// const data = { | ||
16 | +// username, | ||
17 | +// password: encrypt(password), | ||
18 | +// code, | ||
19 | +// uuid | ||
20 | +// } | ||
21 | +// return request({ | ||
22 | +// 'url': '/auth/login', | ||
23 | +// headers: { | ||
24 | +// isToken: false | ||
25 | +// }, | ||
26 | +// 'method': 'post', | ||
27 | +// 'data': data | ||
28 | +// }) | ||
29 | +// } | ||
30 | + | ||
8 | //钉钉登录 | 31 | //钉钉登录 |
9 | -export const dingLogin = code => http.post('/auth/dingding/login?code='+code) | 32 | +export const dingLogin = code => http.post('/auth/dingding/login?code=' + code) |
10 | //发送手机验证码 | 33 | //发送手机验证码 |
11 | export const sendSmsCode = data => http.post('/member/auth/send-sms-code', data) | 34 | export const sendSmsCode = data => http.post('/member/auth/send-sms-code', data) |
12 | //使用手机 + 验证码登录 | 35 | //使用手机 + 验证码登录 |
13 | export const smsLogin = data => http.post('/member/auth/sms-login', data) | 36 | export const smsLogin = data => http.post('/member/auth/sms-login', data) |
14 | //微信小程序的一键登录 | 37 | //微信小程序的一键登录 |
15 | export const weixinMiniAppLogin = data => http.post('/member/auth/weixin-mini-app-login', data) | 38 | export const weixinMiniAppLogin = data => http.post('/member/auth/weixin-mini-app-login', data) |
39 | +// 获取验证码 | ||
40 | +export const getCodeImg = params => http.get('/captchaImage') | ||
16 | //刷新令牌 | 41 | //刷新令牌 |
17 | -export const refreshToken = data => http.post('/member/auth/refresh-token', {data}) | 42 | +export const refreshToken = data => http.post('/member/auth/refresh-token', { |
43 | + data | ||
44 | +}) | ||
18 | //退出登录 | 45 | //退出登录 |
19 | export const logout = data => http.delete('/auth/logout', data) | 46 | export const logout = data => http.delete('/auth/logout', data) |
api/cart.js
api/category.js
api/order.js
api/product.js
@@ -1,8 +0,0 @@ | @@ -1,8 +0,0 @@ | ||
1 | -//请求工具参考https://ext.dcloud.net.cn/plugin?id=392 | ||
2 | -const { http } = uni.$u | ||
3 | - | ||
4 | -// 查询商品spu列表 | ||
5 | -export const productSpuPage = params => http.get('product/spu/page', { params }) | ||
6 | - | ||
7 | -// 查询商品 | ||
8 | -export const getSpuDetail = id => http.get('product/spu/get-detail?id=' + id, { }) |
api/total.js
@@ -4,10 +4,10 @@ const { http } = uni.$u | @@ -4,10 +4,10 @@ const { http } = uni.$u | ||
4 | export const getStatisticsReport = id => http.get('/insight/statistics/report/'+id) | 4 | export const getStatisticsReport = id => http.get('/insight/statistics/report/'+id) |
5 | 5 | ||
6 | // 待开发用户池数据分析 | 6 | // 待开发用户池数据分析 |
7 | -export const getStatisticsPool = params => http.get('/insight/statistics/pool',params) | 7 | +export const getStatisticsPool = params => http.get('/insight/statistics/pool',{params}) |
8 | // /statistics/pool | 8 | // /statistics/pool |
9 | 9 | ||
10 | -export const getStatisticsLogin = params => http.get('/insight/statistics/login',params) | 10 | +export const getStatisticsLogin = params => http.get('/insight/statistics/login',{params}) |
11 | // 访问量和浏览量 | 11 | // 访问量和浏览量 |
12 | // /statistics/login | 12 | // /statistics/login |
13 | 13 |
common/config.js
1 | module.exports = { | 1 | module.exports = { |
2 | //后端接口地址 | 2 | //后端接口地址 |
3 | // baseUrl: 'http://10.11.38.240:9001', //内网开发环境 | 3 | // baseUrl: 'http://10.11.38.240:9001', //内网开发环境 |
4 | - // baseUrl: 'http://172.17.56.37:18082/api', //测试环境 | 4 | + baseUrl: 'http://172.17.56.37:18082/api', //测试环境 |
5 | // baseUrl: 'http://172.17.56.16:18082/api', //ip正式环境 | 5 | // baseUrl: 'http://172.17.56.16:18082/api', //ip正式环境 |
6 | - baseUrl: 'https://scdcapp.chinagasholdings.com/api', //域名正式环境 | 6 | + // baseUrl: 'https://scdcapp.chinagasholdings.com/api', //域名正式环境 |
7 | // 超时 | 7 | // 超时 |
8 | timeout: 30000, | 8 | timeout: 30000, |
9 | // 禁用 Cookie 等信息 | 9 | // 禁用 Cookie 等信息 |
package-lock.json
@@ -10,6 +10,11 @@ | @@ -10,6 +10,11 @@ | ||
10 | "promise-polyfill": "^7.1.0" | 10 | "promise-polyfill": "^7.1.0" |
11 | } | 11 | } |
12 | }, | 12 | }, |
13 | + "jsencrypt": { | ||
14 | + "version": "3.3.2", | ||
15 | + "resolved": "https://registry.npmmirror.com/jsencrypt/-/jsencrypt-3.3.2.tgz", | ||
16 | + "integrity": "sha512-arQR1R1ESGdAxY7ZheWr12wCaF2yF47v5qpB76TtV64H1pyGudk9Hvw8Y9tb/FiTIaaTRUyaSnm5T/Y53Ghm/A==" | ||
17 | + }, | ||
13 | "promise-polyfill": { | 18 | "promise-polyfill": { |
14 | "version": "7.1.2", | 19 | "version": "7.1.2", |
15 | "resolved": "https://registry.npmmirror.com/promise-polyfill/-/promise-polyfill-7.1.2.tgz", | 20 | "resolved": "https://registry.npmmirror.com/promise-polyfill/-/promise-polyfill-7.1.2.tgz", |
package.json
pages.json
@@ -7,6 +7,7 @@ | @@ -7,6 +7,7 @@ | ||
7 | "path": "pages/market/index", | 7 | "path": "pages/market/index", |
8 | "style": { | 8 | "style": { |
9 | "navigationBarTitleText": "市场资讯", | 9 | "navigationBarTitleText": "市场资讯", |
10 | + "navigationStyle": "custom", | ||
10 | "enablePullDownRefresh": true | 11 | "enablePullDownRefresh": true |
11 | } | 12 | } |
12 | }, { | 13 | }, { |
@@ -18,35 +19,41 @@ | @@ -18,35 +19,41 @@ | ||
18 | }, { | 19 | }, { |
19 | "path": "pages/market/total", | 20 | "path": "pages/market/total", |
20 | "style": { | 21 | "style": { |
21 | - "navigationBarTitleText": "数据统计" | 22 | + "navigationBarTitleText": "数据统计", |
23 | + "navigationStyle": "custom" | ||
22 | } | 24 | } |
23 | }, { | 25 | }, { |
24 | "path": "pages/market/insight", | 26 | "path": "pages/market/insight", |
25 | "style": { | 27 | "style": { |
26 | "enablePullDownRefresh": true, | 28 | "enablePullDownRefresh": true, |
27 | - "navigationBarTitleText": "市场洞察" | 29 | + "navigationBarTitleText": "市场洞察", |
30 | + "navigationStyle": "custom" | ||
28 | } | 31 | } |
29 | }, { | 32 | }, { |
30 | "path": "pages/market/researchReport", | 33 | "path": "pages/market/researchReport", |
31 | "style": { | 34 | "style": { |
32 | - "navigationBarTitleText": "研究报告" | 35 | + "navigationBarTitleText": "研究报告", |
36 | + "navigationStyle": "custom" | ||
33 | } | 37 | } |
34 | }, { | 38 | }, { |
35 | "path": "pages/market/knowledgeBase", | 39 | "path": "pages/market/knowledgeBase", |
36 | "style": { | 40 | "style": { |
37 | - "navigationBarTitleText": "知识库" | 41 | + "navigationBarTitleText": "知识库", |
42 | + "navigationStyle": "custom" | ||
38 | } | 43 | } |
39 | }, | 44 | }, |
40 | { | 45 | { |
41 | "path": "pages/market/userDetails", | 46 | "path": "pages/market/userDetails", |
42 | "style": { | 47 | "style": { |
43 | - "navigationBarTitleText": "居民用户详情" | 48 | + "navigationBarTitleText": "居民用户详情", |
49 | + "navigationStyle": "custom" | ||
44 | } | 50 | } |
45 | }, | 51 | }, |
46 | { | 52 | { |
47 | "path": "pages/market/reportDetails", | 53 | "path": "pages/market/reportDetails", |
48 | "style": { | 54 | "style": { |
49 | - "navigationBarTitleText": "报告详情" | 55 | + "navigationBarTitleText": "报告详情", |
56 | + "navigationStyle": "custom" | ||
50 | } | 57 | } |
51 | } | 58 | } |
52 | ], | 59 | ], |
pages/login/mobile.vue
@@ -14,20 +14,15 @@ | @@ -14,20 +14,15 @@ | ||
14 | </view> | 14 | </view> |
15 | 15 | ||
16 | <view class="auth-box"> | 16 | <view class="auth-box"> |
17 | - <!-- 登录方式选择 --> | ||
18 | - | ||
19 | - | ||
20 | - <!-- 登录表单 --> | ||
21 | <u--form labelPosition="left" :model="formData" :rules="rules" ref="form"> | 17 | <u--form labelPosition="left" :model="formData" :rules="rules" ref="form"> |
22 | <u-form-item prop="username" ref="item-mobile"> | 18 | <u-form-item prop="username" ref="item-mobile"> |
23 | <u-input type="text" maxlength="11" border="surround" shape="circle" v-model="formData.username" clearable | 19 | <u-input type="text" maxlength="11" border="surround" shape="circle" v-model="formData.username" clearable |
24 | placeholder="请输入您的用户名" style="width: 610rpx;"> | 20 | placeholder="请输入您的用户名" style="width: 610rpx;"> |
25 | <u-icon slot="prefix" size="20" style="margin-right: 48rpx;" name="/static/images/icon/user.png"></u-icon> | 21 | <u-icon slot="prefix" size="20" style="margin-right: 48rpx;" name="/static/images/icon/user.png"></u-icon> |
26 | - <!-- <u--text text="http://" slot="prefix" margin="0 3px 0 0" type="tips"></u--text> --> | ||
27 | </u-input> | 22 | </u-input> |
28 | </u-form-item> | 23 | </u-form-item> |
29 | 24 | ||
30 | - <u-gap height="20"></u-gap> | 25 | + <u-gap height="10"></u-gap> |
31 | 26 | ||
32 | <u-form-item prop="password" ref="item-password"> | 27 | <u-form-item prop="password" ref="item-password"> |
33 | <u-input :type="inputType" prefixIcon="lock" maxlength="16" border="surround" shape="circle" | 28 | <u-input :type="inputType" prefixIcon="lock" maxlength="16" border="surround" shape="circle" |
@@ -42,20 +37,34 @@ | @@ -42,20 +37,34 @@ | ||
42 | </u-input> | 37 | </u-input> |
43 | </u-form-item> | 38 | </u-form-item> |
44 | 39 | ||
40 | + <u-gap height="10"></u-gap> | ||
41 | + | ||
42 | + <u-form-item prop="code" ref="item-code"> | ||
43 | + <u--input v-model="formData.code" placeholder="请输入验证码" shape="circle" type="text" class="input"> | ||
44 | + <template slot="prefix"> | ||
45 | + <img class="prefix-icon" src='/static/images/login/code.png' /> | ||
46 | + </template> | ||
47 | + </u--input> | ||
48 | + <image :src="codeUrl" @click="getCode" class="login-code-img"></image> | ||
49 | + </u-form-item> | ||
50 | + <view class="remember-box" @click="rememberMe = !rememberMe"> | ||
51 | + <img class="suffix-icon" | ||
52 | + :src="rememberMe ? '/static/images/login/remember.png' : '/static/images/login/not-remember.svg'" /> | ||
53 | + <view class="text" :class="rememberMe ? 'remember-text' : ''">记住密码</view> | ||
54 | + </view> | ||
45 | <view class="btn-group"> | 55 | <view class="btn-group"> |
46 | <u-button class="auth-btn" customStyle="margin-top: 50px" @click="handleSubmit">登录</u-button> | 56 | <u-button class="auth-btn" customStyle="margin-top: 50px" @click="handleSubmit">登录</u-button> |
47 | </view> | 57 | </view> |
48 | </u--form> | 58 | </u--form> |
49 | </view> | 59 | </view> |
50 | - <u-loading-page v-if="isDing" :loading="isDing" iconSize="50" loadingMode="spinner" image="/static/images/empty/loding-logo.gif" | ||
51 | - loadingText="检测为钉钉环境\n自动登录中..." bg-color="#e8e8e8"></u-loading-page> | 60 | + <u-loading-page v-if="isDing" :loading="isDing" iconSize="50" loadingMode="spinner" |
61 | + image="/static/images/empty/loding-logo.gif" loadingText="检测为钉钉环境\n自动登录中..." bg-color="#e8e8e8"></u-loading-page> | ||
52 | </view> | 62 | </view> |
53 | </template> | 63 | </template> |
54 | 64 | ||
55 | <script> | 65 | <script> |
56 | - import { | ||
57 | - passwordLogin | ||
58 | - } from '@/api/auth' | 66 | + import {passwordLogin,getCodeImg,} from '@/api/auth' |
67 | + import { encrypt, decrypt } from "@/utils/jsencrypt"; | ||
59 | import * as dd from 'dingtalk-jsapi' | 68 | import * as dd from 'dingtalk-jsapi' |
60 | export default { | 69 | export default { |
61 | data() { | 70 | data() { |
@@ -65,9 +74,15 @@ | @@ -65,9 +74,15 @@ | ||
65 | codeDisabled: false, | 74 | codeDisabled: false, |
66 | codeTips: '', | 75 | codeTips: '', |
67 | formData: { | 76 | formData: { |
77 | + // username: 'xucfa', | ||
78 | + // password: 'qkOzF!liEfd', | ||
68 | username: '', | 79 | username: '', |
69 | password: '', | 80 | password: '', |
81 | + code: '', | ||
82 | + uuid: '' | ||
70 | }, | 83 | }, |
84 | + rememberMe: false, | ||
85 | + codeUrl: "", | ||
71 | rules: { | 86 | rules: { |
72 | username: { | 87 | username: { |
73 | type: 'string', | 88 | type: 'string', |
@@ -81,13 +96,21 @@ | @@ -81,13 +96,21 @@ | ||
81 | message: '请填写登录密码', | 96 | message: '请填写登录密码', |
82 | trigger: ['blur', 'change'] | 97 | trigger: ['blur', 'change'] |
83 | }, | 98 | }, |
99 | + code: { | ||
100 | + type: 'string', | ||
101 | + required: true, | ||
102 | + message: '请填写验证码', | ||
103 | + trigger: ['blur', 'change'] | ||
104 | + }, | ||
84 | }, | 105 | }, |
85 | isDing: false | 106 | isDing: false |
86 | } | 107 | } |
87 | }, | 108 | }, |
88 | onLoad() {}, | 109 | onLoad() {}, |
89 | onShow() { | 110 | onShow() { |
90 | - this.detectionEnvironment() | 111 | + this.getCode(); |
112 | + this.detectionEnvironment(); | ||
113 | + this.getLocalCache() | ||
91 | // console.log(this.$isDing); | 114 | // console.log(this.$isDing); |
92 | // this.isDing = true; | 115 | // this.isDing = true; |
93 | }, | 116 | }, |
@@ -121,9 +144,9 @@ | @@ -121,9 +144,9 @@ | ||
121 | // alert(JSON.stringify(err)) | 144 | // alert(JSON.stringify(err)) |
122 | console.log(err); | 145 | console.log(err); |
123 | // uni.$u.toast('非钉钉内部账号'); | 146 | // uni.$u.toast('非钉钉内部账号'); |
124 | - setTimeout(()=>{ | 147 | + setTimeout(() => { |
125 | that.isDing = false; | 148 | that.isDing = false; |
126 | - },500) | 149 | + }, 500) |
127 | }) | 150 | }) |
128 | }, | 151 | }, |
129 | onFail: (err) => { | 152 | onFail: (err) => { |
@@ -134,6 +157,31 @@ | @@ -134,6 +157,31 @@ | ||
134 | }) | 157 | }) |
135 | } | 158 | } |
136 | }, | 159 | }, |
160 | + //记住账号密码 | ||
161 | + getLocalCache() { | ||
162 | + // uni.setStorageSync('roleId', roleIdString) | ||
163 | + const rememberMe = uni.getStorageSync('rememberMe'); | ||
164 | + console.log("是否记住密码", Boolean(rememberMe)); | ||
165 | + if (!rememberMe) return; | ||
166 | + const username = uni.getStorageSync('username') | ||
167 | + const password = uni.getStorageSync('password') | ||
168 | + console.log("密码缓存",password); | ||
169 | + this.formData = { | ||
170 | + username: username === undefined ? this.formData.username : username, | ||
171 | + password: password === undefined ? this.formData.password : decrypt(password), | ||
172 | + }; | ||
173 | + console.log(this.formData); | ||
174 | + this.rememberMe = rememberMe === undefined ? false : true; | ||
175 | + }, | ||
176 | + getCode() { | ||
177 | + getCodeImg().then(res => { | ||
178 | + this.captchaEnabled = res.captchaEnabled === undefined ? true : res.captchaEnabled | ||
179 | + if (this.captchaEnabled) { | ||
180 | + this.codeUrl = 'data:image/gif;base64,' + res.img | ||
181 | + this.formData.uuid = res.uuid | ||
182 | + } | ||
183 | + }) | ||
184 | + }, | ||
137 | 185 | ||
138 | handleSubmit() { | 186 | handleSubmit() { |
139 | this.$refs.form.validate().then(res => { | 187 | this.$refs.form.validate().then(res => { |
@@ -155,7 +203,20 @@ | @@ -155,7 +203,20 @@ | ||
155 | // }) | 203 | // }) |
156 | }) | 204 | }) |
157 | }, | 205 | }, |
206 | + rememberPassword() { | ||
207 | + if (this.rememberMe) { | ||
208 | + uni.setStorageSync('username', this.formData.username); | ||
209 | + uni.setStorageSync('password', encrypt(this.formData.password)); | ||
210 | + uni.setStorageSync('rememberMe', this.rememberMe); | ||
211 | + } else { | ||
212 | + uni.removeStorageSync('username'); | ||
213 | + uni.removeStorageSync('password'); | ||
214 | + uni.removeStorageSync('rememberMe'); | ||
215 | + } | ||
216 | + }, | ||
158 | mobileLogin(data) { | 217 | mobileLogin(data) { |
218 | + // return | ||
219 | + this.rememberPassword() | ||
159 | this.$store.dispatch('Login', { | 220 | this.$store.dispatch('Login', { |
160 | type: 0, | 221 | type: 0, |
161 | data: data | 222 | data: data |
@@ -247,6 +308,38 @@ | @@ -247,6 +308,38 @@ | ||
247 | } | 308 | } |
248 | } | 309 | } |
249 | 310 | ||
311 | + .remember-box { | ||
312 | + height: 37rpx; | ||
313 | + margin: 33rpx 0 42rpx 0; | ||
314 | + display: flex; | ||
315 | + align-items: center; | ||
316 | + | ||
317 | + img { | ||
318 | + width: 30rpx; | ||
319 | + height: 30rpx; | ||
320 | + margin-right: 12rpx; | ||
321 | + } | ||
322 | + | ||
323 | + .text { | ||
324 | + font-size: 26rpx; | ||
325 | + font-family: '苹方 中等', '苹方', sans-serif; | ||
326 | + color: #666666; | ||
327 | + text-align: left; | ||
328 | + line-height: normal; | ||
329 | + } | ||
330 | + | ||
331 | + .remember-text { | ||
332 | + color: #333; | ||
333 | + } | ||
334 | + } | ||
335 | + | ||
336 | + .login-code-img { | ||
337 | + width: 33%; | ||
338 | + height: 98rpx; | ||
339 | + cursor: pointer; | ||
340 | + vertical-align: middle; | ||
341 | + } | ||
342 | + | ||
250 | .u-input { | 343 | .u-input { |
251 | height: 60rpx; | 344 | height: 60rpx; |
252 | background: #f5f7f7; | 345 | background: #f5f7f7; |
pages/market/components/reportModule1.vue
@@ -49,11 +49,11 @@ | @@ -49,11 +49,11 @@ | ||
49 | <!-- </u-collapse> --> | 49 | <!-- </u-collapse> --> |
50 | </view> | 50 | </view> |
51 | 51 | ||
52 | - <view class="cardCss" v-if="isShowUrl"> | 52 | + <view class="cardCss"> |
53 | <!-- <u-collapse :border="false" :value="['3']"> --> | 53 | <!-- <u-collapse :border="false" :value="['3']"> --> |
54 | <!-- <u-collapse-item name="3"> --> | 54 | <!-- <u-collapse-item name="3"> --> |
55 | <text class="slot-title">预算主体附件</text> | 55 | <text class="slot-title">预算主体附件</text> |
56 | - <view class="attachmentCss"> | 56 | + <view class="attachmentCss" v-if="this.isShowUrl"> |
57 | <view class="flexCss" v-for="(item,index) in reportData.attachmentsUrl" :key="index"> | 57 | <view class="flexCss" v-for="(item,index) in reportData.attachmentsUrl" :key="index"> |
58 | <view class="leftCss overflow-one-lines"> | 58 | <view class="leftCss overflow-one-lines"> |
59 | <u-icon size="18" :name="calcIcon(item.extension)"></u-icon> | 59 | <u-icon size="18" :name="calcIcon(item.extension)"></u-icon> |
@@ -106,7 +106,7 @@ | @@ -106,7 +106,7 @@ | ||
106 | this.isShowUrl = true | 106 | this.isShowUrl = true |
107 | }else{ | 107 | }else{ |
108 | this.reportData.attachmentsUrl = JSON.parse(this.reportData.attachmentsUrl); | 108 | this.reportData.attachmentsUrl = JSON.parse(this.reportData.attachmentsUrl); |
109 | - if(this.reportData.attachmentsUrl.length){ | 109 | + if(this.reportData.attachmentsUrl.length && this.reportData.attachmentsUrl != '[]'){ |
110 | this.isShowUrl = true | 110 | this.isShowUrl = true |
111 | }else{ | 111 | }else{ |
112 | this.isShowUrl = false | 112 | this.isShowUrl = false |
pages/market/total.vue
1 | <template> | 1 | <template> |
2 | <view class="ComCss"> | 2 | <view class="ComCss"> |
3 | - <u-navbar v-if="!$isDing" class="navBarCss" title="数据统计" leftIconSize="0" | ||
4 | - :titleStyle="{'fontSize':'36rpx','color':'#333333','fontWeight':'700'}" safeAreaInsetTop placeholder /> | 3 | + <!-- <u-navbar v-if="!$isDing" class="navBarCss" title="数据统计" leftIconSize="0" |
4 | + :titleStyle="{'fontSize':'36rpx','color':'#333333','fontWeight':'700'}" safeAreaInsetTop placeholder /> --> | ||
5 | <view class="bigCardCss"> | 5 | <view class="bigCardCss"> |
6 | <view class="titleCss"> | 6 | <view class="titleCss"> |
7 | 本财年报告已上报数 | 7 | 本财年报告已上报数 |
@@ -134,7 +134,11 @@ | @@ -134,7 +134,11 @@ | ||
134 | console.log("报告", this.data1); | 134 | console.log("报告", this.data1); |
135 | } | 135 | } |
136 | }) | 136 | }) |
137 | - await getStatisticsPool().then(res => { | 137 | + let query = { |
138 | + roleIds: uni.getStorageSync('roleId') || null, | ||
139 | + entity: uni.getStorageSync("entity") || null, | ||
140 | + } | ||
141 | + await getStatisticsPool(query).then(res => { | ||
138 | if (res.code === 200) { | 142 | if (res.code === 200) { |
139 | let data = res.data; | 143 | let data = res.data; |
140 | this.statistics.resident = data.resident; | 144 | this.statistics.resident = data.resident; |
@@ -227,7 +231,7 @@ | @@ -227,7 +231,7 @@ | ||
227 | align: 'left', | 231 | align: 'left', |
228 | data: this.data2.map(item => item.name) | 232 | data: this.data2.map(item => item.name) |
229 | }, | 233 | }, |
230 | - color: ['#15C2C3', '#5875EB', '#E74C3C' ], | 234 | + color: ['#15C2C3', '#5875EB', '#E74C3C'], |
231 | series: [{ | 235 | series: [{ |
232 | name: '待开发用户池数据分析', | 236 | name: '待开发用户池数据分析', |
233 | type: 'pie', | 237 | type: 'pie', |
@@ -0,0 +1,90 @@ | @@ -0,0 +1,90 @@ | ||
1 | +@font-face { | ||
2 | + font-family: "iconfont"; | ||
3 | + src: url('@/static/font/iconfont.ttf') format('truetype'); | ||
4 | +} | ||
5 | + | ||
6 | +.iconfont { | ||
7 | + font-family: "iconfont" !important; | ||
8 | + font-size: 16px; | ||
9 | + display: inline-block; | ||
10 | + font-style: normal; | ||
11 | + -webkit-font-smoothing: antialiased; | ||
12 | + -moz-osx-font-smoothing: grayscale; | ||
13 | +} | ||
14 | + | ||
15 | +.icon-user:before { | ||
16 | + content: "\e7ae"; | ||
17 | +} | ||
18 | + | ||
19 | +.icon-password:before { | ||
20 | + content: "\e8b2"; | ||
21 | +} | ||
22 | + | ||
23 | +.icon-code:before { | ||
24 | + content: "\e699"; | ||
25 | +} | ||
26 | + | ||
27 | +.icon-setting:before { | ||
28 | + content: "\e6cc"; | ||
29 | +} | ||
30 | + | ||
31 | +.icon-share:before { | ||
32 | + content: "\e739"; | ||
33 | +} | ||
34 | + | ||
35 | +.icon-edit:before { | ||
36 | + content: "\e60c"; | ||
37 | +} | ||
38 | + | ||
39 | +.icon-version:before { | ||
40 | + content: "\e63f"; | ||
41 | +} | ||
42 | + | ||
43 | +.icon-service:before { | ||
44 | + content: "\e6ff"; | ||
45 | +} | ||
46 | + | ||
47 | +.icon-friendfill:before { | ||
48 | + content: "\e726"; | ||
49 | +} | ||
50 | + | ||
51 | +.icon-community:before { | ||
52 | + content: "\e741"; | ||
53 | +} | ||
54 | + | ||
55 | +.icon-people:before { | ||
56 | + content: "\e736"; | ||
57 | +} | ||
58 | + | ||
59 | +.icon-dianzan:before { | ||
60 | + content: "\ec7f"; | ||
61 | +} | ||
62 | + | ||
63 | +.icon-right:before { | ||
64 | + content: "\e7eb"; | ||
65 | +} | ||
66 | + | ||
67 | +.icon-logout:before { | ||
68 | + content: "\e61d"; | ||
69 | +} | ||
70 | + | ||
71 | +.icon-help:before { | ||
72 | + content: "\e616"; | ||
73 | +} | ||
74 | + | ||
75 | +.icon-github:before { | ||
76 | + content: "\e628"; | ||
77 | +} | ||
78 | + | ||
79 | +.icon-aixin:before { | ||
80 | + content: "\e601"; | ||
81 | +} | ||
82 | + | ||
83 | +.icon-clean:before { | ||
84 | + content: "\e607"; | ||
85 | +} | ||
86 | + | ||
87 | +.icon-refresh:before { | ||
88 | + content: "\e604"; | ||
89 | +} | ||
90 | + |
No preview for this file type
1.42 KB
1.44 KB
1.25 KB
@@ -0,0 +1,7 @@ | @@ -0,0 +1,7 @@ | ||
1 | +<?xml version="1.0" encoding="utf-8"?> | ||
2 | +<svg version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" width="30px" height="30px" xmlns="http://www.w3.org/2000/svg"> | ||
3 | + <g transform="matrix(1 0 0 1 0 -4 )"> | ||
4 | + <path d="M 15 4 C 23.400000000000002 4 30 10.6 30 19 C 30 27.400000000000002 23.400000000000002 34 15 34 C 6.6 34 0 27.400000000000002 0 19 C 0 10.6 6.6 4 15 4 Z " fill-rule="nonzero" fill="#ffffff" stroke="none" /> | ||
5 | + <path d="M 15 4.5 C 23.12 4.5 29.5 10.879999999999999 29.5 19 C 29.5 27.12 23.12 33.5 15 33.5 C 6.879999999999999 33.5 0.5 27.12 0.5 19 C 0.5 10.879999999999999 6.879999999999999 4.5 15 4.5 Z " stroke-width="1" stroke="#c8c8c8" fill="none" /> | ||
6 | + </g> | ||
7 | +</svg> | ||
0 | \ No newline at end of file | 8 | \ No newline at end of file |
907 Bytes
1.05 KB
2 KB
store/index.js
@@ -2,7 +2,6 @@ import Vue from 'vue' | @@ -2,7 +2,6 @@ import Vue from 'vue' | ||
2 | import Vuex from 'vuex' | 2 | import Vuex from 'vuex' |
3 | import user from './mudules/user' | 3 | import user from './mudules/user' |
4 | import dict from './mudules/dict' | 4 | import dict from './mudules/dict' |
5 | -import cart from './mudules/cart' | ||
6 | import getters from './getters' | 5 | import getters from './getters' |
7 | 6 | ||
8 | Vue.use(Vuex) // vue的插件机制 | 7 | Vue.use(Vuex) // vue的插件机制 |
@@ -11,7 +10,6 @@ Vue.use(Vuex) // vue的插件机制 | @@ -11,7 +10,6 @@ Vue.use(Vuex) // vue的插件机制 | ||
11 | const store = new Vuex.Store({ | 10 | const store = new Vuex.Store({ |
12 | modules: { | 11 | modules: { |
13 | user, | 12 | user, |
14 | - cart, | ||
15 | dict | 13 | dict |
16 | }, | 14 | }, |
17 | getters | 15 | getters |
store/mudules/user.js
@@ -0,0 +1,22 @@ | @@ -0,0 +1,22 @@ | ||
1 | +import { JSEncrypt } from 'jsencrypt' | ||
2 | + | ||
3 | +// 密钥对生成 http://web.chacuo.net/netrsakeypair | ||
4 | + | ||
5 | +const publicKey = "MIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA2ctpEL5c4wlQskegcl2M\n" + | ||
6 | + "OJzPbdt+CZ+Enn/8IpH1Kz1H4nFbaqwyLQl1pjyfbqJqjxyUwVzuC2EfgPLkdDl1\n" + | ||
7 | + "PDiidaVmKoZgKhuilWSOr6loXrwOLHGFTRH9Pbw/CZE8oS1kOz2eR5qz8fjcA4VN\n" + | ||
8 | + "+2z61hPkkSnLalUfWca+UqkDJJhEn8de9iZC4+c7RO5uwNlWqb3ZVBU9zyh+IXny\n" + | ||
9 | + "J3asSUYpqs4WdNROUiliWOw18SdbksPlcDbMVjMXaFLS6U2JxbVVkXo1ojPVRpnK\n" + | ||
10 | + "P4GKT63NiLltid8meimtJ7wxfdf5T+v29gufTrMHgJE9WzZr0ASwonWaGtxDM+oh\n" + | ||
11 | + "SQIDAQAB"; | ||
12 | + | ||
13 | +// 加密 | ||
14 | +export function encrypt(txt) { | ||
15 | + const encryptor = new JSEncrypt() | ||
16 | + encryptor.setPublicKey(publicKey) // 设置公钥 | ||
17 | + return encryptor.encrypt(txt) // 对数据进行加密 | ||
18 | +} | ||
19 | + | ||
20 | + | ||
21 | + | ||
22 | + |
@@ -0,0 +1,29 @@ | @@ -0,0 +1,29 @@ | ||
1 | +import JSEncrypt from 'jsencrypt/bin/jsencrypt.min' | ||
2 | + | ||
3 | + | ||
4 | +const publicKey = 'MFwwDQYJKoZIhvcNAQEBBQADSwAwSAJBAKoR8mX0rGKLqzcWmOzbfj64K8ZIgOdH\n' + | ||
5 | + 'nzkXSOVOZbFu/TJhZ7rFAN+eaGkl3C4buccQd/EjEsj9ir7ijT7h96MCAwEAAQ==' | ||
6 | + | ||
7 | +const privateKey = 'MIIBVAIBADANBgkqhkiG9w0BAQEFAASCAT4wggE6AgEAAkEAqhHyZfSsYourNxaY\n' + | ||
8 | + '7Nt+PrgrxkiA50efORdI5U5lsW79MmFnusUA355oaSXcLhu5xxB38SMSyP2KvuKN\n' + | ||
9 | + 'PuH3owIDAQABAkAfoiLyL+Z4lf4Myxk6xUDgLaWGximj20CUf+5BKKnlrK+Ed8gA\n' + | ||
10 | + 'kM0HqoTt2UZwA5E2MzS4EI2gjfQhz5X28uqxAiEA3wNFxfrCZlSZHb0gn2zDpWow\n' + | ||
11 | + 'cSxQAgiCstxGUoOqlW8CIQDDOerGKH5OmCJ4Z21v+F25WaHYPxCFMvwxpcw99Ecv\n' + | ||
12 | + 'DQIgIdhDTIqD2jfYjPTY8Jj3EDGPbH2HHuffvflECt3Ek60CIQCFRlCkHpi7hthh\n' + | ||
13 | + 'YhovyloRYsM+IS9h/0BzlEAuO0ktMQIgSPT3aFAgJYwKpqRYKlLDVcflZFCKY7u3\n' + | ||
14 | + 'UP8iWi1Qw0Y=' | ||
15 | + | ||
16 | +// 加密 | ||
17 | +export function encrypt(txt) { | ||
18 | + const encryptor = new JSEncrypt() | ||
19 | + encryptor.setPublicKey(publicKey) // 设置公钥 | ||
20 | + return encryptor.encrypt(txt) // 对数据进行加密 | ||
21 | +} | ||
22 | + | ||
23 | +// 解密 | ||
24 | +export function decrypt(txt) { | ||
25 | + const encryptor = new JSEncrypt() | ||
26 | + encryptor.setPrivateKey(privateKey) // 设置私钥 | ||
27 | + return encryptor.decrypt(txt) // 对数据进行解密 | ||
28 | +} | ||
29 | + |