Skip to content

Commit d7b6665

Browse files
author
shizhong
committed
� Conflicts: � yudao-ui-admin/yarn.lock
2 parents 7b25825 + dc3a17c commit d7b6665

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

102 files changed

+2776
-1140
lines changed

.env.demo1024

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,9 @@ VUE_APP_APP_NAME ='/admin-ui/'
1717
# 多租户的开关
1818
VUE_APP_TENANT_ENABLE = true
1919

20+
# 验证码的开关
21+
VUE_APP_CAPTCHA_ENABLE = true
22+
2023
# 文档的开关
2124
VUE_APP_DOC_ENABLE = true
2225

.env.dev

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ VUE_CLI_BABEL_TRANSPILE_MODULES = true
1313
# 多租户的开关
1414
VUE_APP_TENANT_ENABLE = true
1515

16+
# 验证码的开关
17+
VUE_APP_CAPTCHA_ENABLE = true
18+
1619
# 文档的开关
1720
VUE_APP_DOC_ENABLE = true
1821

.env.local

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ VUE_CLI_BABEL_TRANSPILE_MODULES = true
1414
# 多租户的开关
1515
VUE_APP_TENANT_ENABLE = true
1616

17+
# 验证码的开关
18+
VUE_APP_CAPTCHA_ENABLE = true
19+
1720
# 文档的开关
1821
VUE_APP_DOC_ENABLE = true
1922

.env.prod

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ VUE_APP_APP_NAME ='yudao-admin'
1515
# 多租户的开关
1616
VUE_APP_TENANT_ENABLE = true
1717

18+
# 验证码的开关
19+
VUE_APP_CAPTCHA_ENABLE = true
20+
1821
# 文档的开关
1922
VUE_APP_DOC_ENABLE = false
2023

.env.stage

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ PUBLIC_PATH = 'http://static.yudao.iocoder.cn/'
1515
# 多租户的开关
1616
VUE_APP_TENANT_ENABLE = true
1717

18+
# 验证码的开关
19+
VUE_APP_CAPTCHA_ENABLE = true
20+
1821
# 文档的开关
1922
VUE_APP_DOC_ENABLE = false
2023

.eslintignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ public
77
# 忽略当前目录下为js的文件的语法检查
88
*.js
99
# 忽略当前目录下为vue的文件的语法检查
10-
*.vue
10+
*.vue

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@
5151
"highlight.js": "9.18.5",
5252
"js-beautify": "1.13.0",
5353
"jsencrypt": "3.0.0-rc.1",
54+
"crypto-js": "^4.0.0",
5455
"nprogress": "0.2.0",
5556
"quill": "1.3.7",
5657
"screenfull": "5.0.2",

src/api/login.js

Lines changed: 13 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
import request from '@/utils/request'
2-
import {getRefreshToken} from "@/utils/auth";
3-
import service from "@/utils/request";
2+
import { getRefreshToken } from '@/utils/auth'
3+
import service from '@/utils/request'
44

55
// 登录方法
6-
export function login(username, password, code, uuid,
7-
socialType, socialCode, socialState) {
6+
export function login(username, password, captchaVerification, socialType, socialCode, socialState) {
87
const data = {
98
username,
109
password,
11-
code,
12-
uuid,
10+
captchaVerification,
1311
// 社交相关
14-
socialType, socialCode, socialState
12+
socialType,
13+
socialCode,
14+
socialState
1515
}
1616
return request({
1717
url: '/system/auth/login',
@@ -36,15 +36,6 @@ export function logout() {
3636
})
3737
}
3838

39-
// 获取验证码
40-
export function getCodeImg() {
41-
return request({
42-
url: '/system/captcha/get-image',
43-
method: 'get',
44-
timeout: 20000
45-
})
46-
}
47-
4839
// 社交授权的跳转
4940
export function socialAuthRedirect(type, redirectUri) {
5041
return request({
@@ -108,20 +99,20 @@ export function getAuthorize(clientId) {
10899
}
109100

110101
export function authorize(responseType, clientId, redirectUri, state,
111-
autoApprove, checkedScopes, uncheckedScopes) {
102+
autoApprove, checkedScopes, uncheckedScopes) {
112103
// 构建 scopes
113-
const scopes = {};
104+
const scopes = {}
114105
for (const scope of checkedScopes) {
115-
scopes[scope] = true;
106+
scopes[scope] = true
116107
}
117108
for (const scope of uncheckedScopes) {
118-
scopes[scope] = false;
109+
scopes[scope] = false
119110
}
120111
// 发起请求
121112
return service({
122113
url: '/system/oauth2/authorize',
123-
headers:{
124-
'Content-type': 'application/x-www-form-urlencoded',
114+
headers: {
115+
'Content-type': 'application/x-www-form-urlencoded'
125116
},
126117
params: {
127118
response_type: responseType,
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
import request from '@/utils/request'
2+
3+
// 创建优惠券模板
4+
export function create(data) {
5+
return request({
6+
url: '/coupon/template/create',
7+
method: 'post',
8+
data: data
9+
})
10+
}
11+
12+
// 更新优惠券模板
13+
export function update(data) {
14+
return request({
15+
url: '/coupon/template/update',
16+
method: 'put',
17+
data: data
18+
})
19+
}
20+
21+
// 删除优惠券模板
22+
export function deleteCouponTemplete (id) {
23+
return request({
24+
url: '/coupon/template/delete?id=' + id,
25+
method: 'delete'
26+
})
27+
}
28+
29+
// 获得优惠券模板
30+
export function get(id) {
31+
return request({
32+
url: '/coupon/template/get?id=' + id,
33+
method: 'get'
34+
})
35+
}
36+
37+
// 获得优惠券模板分页
38+
export function getPage(query) {
39+
return request({
40+
url: '/coupon/template/page',
41+
method: 'get',
42+
params: query
43+
})
44+
}
45+
46+
// 导出优惠券模板 Excel
47+
export function exportExcel(query) {
48+
return request({
49+
url: '/coupon/template/export-excel',
50+
method: 'get',
51+
params: query,
52+
responseType: 'blob'
53+
})
54+
}

src/api/mall/product/brand.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,15 @@ export function getBrand(id) {
3434
})
3535
}
3636

37+
// 获得品牌list
38+
export function getBrandList() {
39+
return request({
40+
url: '/product/brand/list',
41+
method: 'get'
42+
})
43+
}
44+
45+
3746
// 获得品牌分页
3847
export function getBrandPage(query) {
3948
return request({

0 commit comments

Comments
 (0)