Skip to content

Commit 0c1def4

Browse files
YunaiVgitee-org
authored andcommitted
!208 合并部分小程序 0.000000000000000000000000000001 版本
Merge pull request !208 from 芋道源码/feature/1.8.0-uniapp
2 parents 25a9c75 + 5a21839 commit 0c1def4

File tree

14 files changed

+2265
-67
lines changed

14 files changed

+2265
-67
lines changed

src/api/login.js

Lines changed: 7 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,15 @@ import {getRefreshToken} from "@/utils/auth";
33
import service from "@/utils/request";
44

55
// 登录方法
6-
export function login(username, password, code, uuid) {
6+
export function login(username, password, code, uuid,
7+
socialType, socialCode, socialState) {
78
const data = {
89
username,
910
password,
1011
code,
11-
uuid
12+
uuid,
13+
// 社交相关
14+
socialType, socialCode, socialState
1215
}
1316
return request({
1417
url: '/system/auth/login',
@@ -51,9 +54,9 @@ export function socialAuthRedirect(type, redirectUri) {
5154
}
5255

5356
// 社交快捷登录,使用 code 授权码
54-
export function socialQuickLogin(type, code, state) {
57+
export function socialLogin(type, code, state) {
5558
return request({
56-
url: '/system/auth/social-quick-login',
59+
url: '/system/auth/social-login',
5760
method: 'post',
5861
data: {
5962
type,
@@ -63,21 +66,6 @@ export function socialQuickLogin(type, code, state) {
6366
})
6467
}
6568

66-
// 社交绑定登录,使用 code 授权码 + + 账号密码
67-
export function socialBindLogin(type, code, state, username, password) {
68-
return request({
69-
url: '/system/auth/social-bind-login',
70-
method: 'post',
71-
data: {
72-
type,
73-
code,
74-
state,
75-
username,
76-
password
77-
}
78-
})
79-
}
80-
8169
// 获取登录验证码
8270
export function sendSmsCode(mobile, scene) {
8371
return request({

src/api/mall/market/banner.js

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+
// 创建Banner
4+
export function createBanner(data) {
5+
return request({
6+
url: '/market/banner/create',
7+
method: 'post',
8+
data: data
9+
})
10+
}
11+
12+
// 更新Banner
13+
export function updateBanner(data) {
14+
return request({
15+
url: '/market/banner/update',
16+
method: 'put',
17+
data: data
18+
})
19+
}
20+
21+
// 删除Banner
22+
export function deleteBanner(id) {
23+
return request({
24+
url: '/market/banner/delete?id=' + id,
25+
method: 'delete'
26+
})
27+
}
28+
29+
// 获得Banner
30+
export function getBanner(id) {
31+
return request({
32+
url: '/market/banner/get?id=' + id,
33+
method: 'get'
34+
})
35+
}
36+
37+
// 获得Banner分页
38+
export function getBannerPage(query) {
39+
return request({
40+
url: '/market/banner/page',
41+
method: 'get',
42+
params: query
43+
})
44+
}
45+
46+
// 导出Banner Excel
47+
export function exportBannerExcel(query) {
48+
return request({
49+
url: '/market/banner/export-excel',
50+
method: 'get',
51+
params: query,
52+
responseType: 'blob'
53+
})
54+
}

src/api/mall/product/brand.js

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 createBrand(data) {
5+
return request({
6+
url: '/product/brand/create',
7+
method: 'post',
8+
data: data
9+
})
10+
}
11+
12+
// 更新品牌
13+
export function updateBrand(data) {
14+
return request({
15+
url: '/product/brand/update',
16+
method: 'put',
17+
data: data
18+
})
19+
}
20+
21+
// 删除品牌
22+
export function deleteBrand(id) {
23+
return request({
24+
url: '/product/brand/delete?id=' + id,
25+
method: 'delete'
26+
})
27+
}
28+
29+
// 获得品牌
30+
export function getBrand(id) {
31+
return request({
32+
url: '/product/brand/get?id=' + id,
33+
method: 'get'
34+
})
35+
}
36+
37+
// 获得品牌分页
38+
export function getBrandPage(query) {
39+
return request({
40+
url: '/product/brand/page',
41+
method: 'get',
42+
params: query
43+
})
44+
}
45+
46+
// 导出品牌 Excel
47+
export function exportBrandExcel(query) {
48+
return request({
49+
url: '/product/brand/export-excel',
50+
method: 'get',
51+
params: query,
52+
responseType: 'blob'
53+
})
54+
}

src/api/mall/product/category.js

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
import request from '@/utils/request'
2+
3+
// 创建商品分类
4+
export function createCategory(data) {
5+
return request({
6+
url: '/product/category/create',
7+
method: 'post',
8+
data: data
9+
})
10+
}
11+
12+
// 更新商品分类
13+
export function updateCategory(data) {
14+
return request({
15+
url: '/product/category/update',
16+
method: 'put',
17+
data: data
18+
})
19+
}
20+
21+
// 删除商品分类
22+
export function deleteCategory(id) {
23+
return request({
24+
url: '/product/category/delete?id=' + id,
25+
method: 'delete'
26+
})
27+
}
28+
29+
// 获得商品分类
30+
export function getCategory(id) {
31+
return request({
32+
url: '/product/category/get?id=' + id,
33+
method: 'get'
34+
})
35+
}
36+
37+
// 获得商品分类
38+
export function listCategory(query) {
39+
return request({
40+
url: '/product/category/listByQuery',
41+
method: 'get',
42+
params: query
43+
})
44+
}
45+
46+
// 获得商品分类分页
47+
export function getCategoryPage(query) {
48+
return request({
49+
url: '/product/category/page',
50+
method: 'get',
51+
params: query
52+
})
53+
}
54+
55+
// 导出商品分类 Excel
56+
export function exportCategoryExcel(query) {
57+
return request({
58+
url: '/product/category/export-excel',
59+
method: 'get',
60+
params: query,
61+
responseType: 'blob'
62+
})
63+
}

src/api/mall/product/property.js

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 createProperty(data) {
5+
return request({
6+
url: '/product/property/create',
7+
method: 'post',
8+
data: data
9+
})
10+
}
11+
12+
// 更新规格名称
13+
export function updateProperty(data) {
14+
return request({
15+
url: '/product/property/update',
16+
method: 'put',
17+
data: data
18+
})
19+
}
20+
21+
// 删除规格名称
22+
export function deleteProperty(id) {
23+
return request({
24+
url: '/product/property/delete?id=' + id,
25+
method: 'delete'
26+
})
27+
}
28+
29+
// 获得规格名称
30+
export function getProperty(id) {
31+
return request({
32+
url: '/product/property/get?id=' + id,
33+
method: 'get'
34+
})
35+
}
36+
37+
// 获得规格名称分页
38+
export function getPropertyPage(query) {
39+
return request({
40+
url: '/product/property/page',
41+
method: 'get',
42+
params: query
43+
})
44+
}
45+
46+
// 导出规格名称 Excel
47+
export function exportPropertyExcel(query) {
48+
return request({
49+
url: '/product/property/export-excel',
50+
method: 'get',
51+
params: query,
52+
responseType: 'blob'
53+
})
54+
}

src/api/mall/product/spu.js

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+
// 创建商品spu
4+
export function createSpu(data) {
5+
return request({
6+
url: '/product/spu/create',
7+
method: 'post',
8+
data: data
9+
})
10+
}
11+
12+
// 更新商品spu
13+
export function updateSpu(data) {
14+
return request({
15+
url: '/product/spu/update',
16+
method: 'put',
17+
data: data
18+
})
19+
}
20+
21+
// 删除商品spu
22+
export function deleteSpu(id) {
23+
return request({
24+
url: '/product/spu/delete?id=' + id,
25+
method: 'delete'
26+
})
27+
}
28+
29+
// 获得商品spu
30+
export function getSpu(id) {
31+
return request({
32+
url: '/product/spu/get?id=' + id,
33+
method: 'get'
34+
})
35+
}
36+
37+
// 获得商品spu分页
38+
export function getSpuPage(query) {
39+
return request({
40+
url: '/product/spu/page',
41+
method: 'get',
42+
params: query
43+
})
44+
}
45+
46+
// 导出商品spu Excel
47+
export function exportSpuExcel(query) {
48+
return request({
49+
url: '/product/spu/export-excel',
50+
method: 'get',
51+
params: query,
52+
responseType: 'blob'
53+
})
54+
}

src/components/ImageUpload/index.vue

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
<template>
22
<div class="component-upload-image">
33
<el-upload
4-
multiple
5-
:action="uploadFileUrl"
6-
list-type="picture-card"
7-
:on-success="handleUploadSuccess"
8-
:before-upload="handleBeforeUpload"
9-
:limit="limit"
10-
:on-error="handleUploadError"
11-
:on-exceed="handleExceed"
12-
name="file"
13-
:on-remove="handleRemove"
14-
:show-file-list="true"
15-
:headers="headers"
16-
:file-list="fileList"
17-
:on-preview="handlePictureCardPreview"
18-
:class="{hide: this.fileList.length >= this.limit}"
4+
multiple
5+
:action="uploadFileUrl"
6+
list-type="picture-card"
7+
:on-success="handleUploadSuccess"
8+
:before-upload="handleBeforeUpload"
9+
:limit="limit"
10+
:on-error="handleUploadError"
11+
:on-exceed="handleExceed"
12+
name="file"
13+
:on-remove="handleRemove"
14+
:show-file-list="true"
15+
:headers="headers"
16+
:file-list="fileList"
17+
:on-preview="handlePictureCardPreview"
18+
:class="{hide: this.fileList.length >= this.limit}"
1919
>
2020
<i class="el-icon-plus"></i>
2121
</el-upload>
@@ -29,14 +29,14 @@
2929
</div>
3030

3131
<el-dialog
32-
:visible.sync="dialogVisible"
33-
title="预览"
34-
width="800"
35-
append-to-body
32+
:visible.sync="dialogVisible"
33+
title="预览"
34+
width="800"
35+
append-to-body
3636
>
3737
<img
38-
:src="dialogImageUrl"
39-
style="display: block; max-width: 100%; margin: 0 auto"
38+
:src="dialogImageUrl"
39+
style="display: block; max-width: 100%; margin: 0 auto"
4040
/>
4141
</el-dialog>
4242
</div>

0 commit comments

Comments
 (0)