Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
Litemall
Commits
6fec6b58
"vscode:/vscode.git/clone" did not exist on "bbb787204731480ac24eea0d2fa6d1e96b753f68"
Unverified
Commit
6fec6b58
authored
Oct 09, 2019
by
beaver383
Committed by
GitHub
Oct 09, 2019
Browse files
Merge pull request #1 from linlinjava/master
同步
parents
c04bf486
5238b74e
Changes
25
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
6fec6b58
...
@@ -219,7 +219,13 @@ V 3.0.0 完成以下目标:
...
@@ -219,7 +219,13 @@ V 3.0.0 完成以下目标:
项目介绍:基于有赞 vant 组件库的移动商城。
项目介绍:基于有赞 vant 组件库的移动商城。
项目参考:litemall项目的litemall-vue模块基于vant--mobile-mall项目开发。
项目参考:litemall项目的litemall-vue模块基于vant--mobile-mall项目开发。
## 推荐
1.
[
Flutter_Mall
](
https://github.com/youxinLu/mall
)
项目介绍:Flutter_Mall是一款Flutter开源在线商城应用程序。
## 问题
## 问题


...
...
deploy/db/.gitkeep
0 → 100644
View file @
6fec6b58
deploy/litemall/application.yml
View file @
6fec6b58
spring
:
spring
:
profiles
:
active
:
none
message
:
message
:
encoding
:
UTF-8
encoding
:
UTF-8
datasource
:
datasource
:
...
@@ -138,4 +140,10 @@ litemall:
...
@@ -138,4 +140,10 @@ litemall:
secretId
:
111111
secretId
:
111111
secretKey
:
xxxxxx
secretKey
:
xxxxxx
region
:
xxxxxx
region
:
xxxxxx
bucketName
:
xxxxxx
bucketName
:
xxxxxx
\ No newline at end of file
# 七牛云对象存储配置信息
qiniu
:
endpoint
:
http://pd5cb6ulu.bkt.clouddn.com
accessKey
:
111111
secretKey
:
xxxxxx
bucketName
:
litemall
\ No newline at end of file
doc/project.md
View file @
6fec6b58
...
@@ -460,24 +460,21 @@ flush privilege
...
@@ -460,24 +460,21 @@ flush privilege
#### 1.4.5.1 日志配置
#### 1.4.5.1 日志配置
如果开发者启动litemall-all模块,则需要配置该模块的`
application.y
ml`文件
如果开发者启动litemall-all模块,则需要配置该模块的`
logback-spring.x
ml`文件
```
```
logging:
<logger name="org.mybatis" level="ERROR" />
level:
<logger name="org.springframework" level="ERROR" />
root: ERROR
<logger name="org.linlinjava.litemall.core" level="DEBUG" />
org.springframework: ERROR
<logger name="org.linlinjava.litemall.db" level="DEBUG" />
org.mybatis: ERROR
<logger name="org.linlinjava.litemall.admin" level="DEBUG" />
org.linlinjava.litemall.core: ERROR
<logger name="org.linlinjava.litemall.wx" level="DEBUG" />
org.linlinjava.litemall.db: ERROR
<logger name="org.linlinjava.litemall" level="DEBUG" />
org.linlinjava.litemall.admin: ERROR
org.linlinjava.litemall.wx: ERROR
org.linlinjava.litemall: ERROR
```
```
具体如何配置,请自行学习Spring Boot的日志配置。
具体如何配置,请自行学习Spring Boot的日志配置
和logback日志配置
。
`org.linlinjava.litemall.core`定义litemall-core模块的日志级别
`org.linlinjava.litemall.core`定义litemall-core模块的日志级别
`org.linlinjava.litemall.db`定义litemall-
core
模块的日志级别
`org.linlinjava.litemall.db`定义litemall-
db
模块的日志级别
`org.linlinjava.litemall.wx`定义litemall-wx-api模块的日志级别
`org.linlinjava.litemall.wx`定义litemall-wx-api模块的日志级别
`org.linlinjava.litemall.admin`定义litemall-admin-api模块的日志级别
`org.linlinjava.litemall.admin`定义litemall-admin-api模块的日志级别
`org.linlinjava.litemall`而定义litemall所有后端模块的日志级别
`org.linlinjava.litemall`而定义litemall所有后端模块的日志级别
...
@@ -487,7 +484,7 @@ logging:
...
@@ -487,7 +484,7 @@ logging:
注意:
注意:
> 如果开发者独立启动litemall-wx-api模块,那么则需要配置litemall-wx-api模块的
> 如果开发者独立启动litemall-wx-api模块,那么则需要配置litemall-wx-api模块的
>
`application.yml`文件来设置日志
>
日志配置方式。
#### 1.4.5.2 数据库连接配置
#### 1.4.5.2 数据库连接配置
...
...
litemall-admin/src/main.js
View file @
6fec6b58
...
@@ -20,6 +20,10 @@ import * as filters from './filters' // global filters
...
@@ -20,6 +20,10 @@ import * as filters from './filters' // global filters
import
permission
from
'
@/directive/permission/index.js
'
// 权限判断指令
import
permission
from
'
@/directive/permission/index.js
'
// 权限判断指令
import
Print
from
'
@/utils/print
'
// 打印
Vue
.
use
(
Print
)
Vue
.
use
(
Element
,
{
Vue
.
use
(
Element
,
{
size
:
Cookies
.
get
(
'
size
'
)
||
'
medium
'
// set element-ui default size
size
:
Cookies
.
get
(
'
size
'
)
||
'
medium
'
// set element-ui default size
})
})
...
...
litemall-admin/src/utils/print.js
0 → 100644
View file @
6fec6b58
// 打印类属性、方法定义
/* eslint-disable */
const
Print
=
function
(
dom
,
options
)
{
if
(
!
(
this
instanceof
Print
))
return
new
Print
(
dom
,
options
);
this
.
options
=
this
.
extend
({
'
noPrint
'
:
'
.no-print
'
},
options
);
if
((
typeof
dom
)
===
"
string
"
)
{
this
.
dom
=
document
.
querySelector
(
dom
);
}
else
{
this
.
isDOM
(
dom
)
this
.
dom
=
this
.
isDOM
(
dom
)
?
dom
:
dom
.
$el
;
}
this
.
init
();
};
Print
.
prototype
=
{
init
:
function
()
{
var
content
=
this
.
getStyle
()
+
this
.
getHtml
();
this
.
writeIframe
(
content
);
},
extend
:
function
(
obj
,
obj2
)
{
for
(
var
k
in
obj2
)
{
obj
[
k
]
=
obj2
[
k
];
}
return
obj
;
},
getStyle
:
function
()
{
var
str
=
""
,
styles
=
document
.
querySelectorAll
(
'
style,link
'
);
for
(
var
i
=
0
;
i
<
styles
.
length
;
i
++
)
{
str
+=
styles
[
i
].
outerHTML
;
}
str
+=
"
<style>
"
+
(
this
.
options
.
noPrint
?
this
.
options
.
noPrint
:
'
.no-print
'
)
+
"
{display:none;}</style>
"
;
return
str
;
},
getHtml
:
function
()
{
var
inputs
=
document
.
querySelectorAll
(
'
input
'
);
var
textareas
=
document
.
querySelectorAll
(
'
textarea
'
);
var
selects
=
document
.
querySelectorAll
(
'
select
'
);
for
(
var
k
=
0
;
k
<
inputs
.
length
;
k
++
)
{
if
(
inputs
[
k
].
type
==
"
checkbox
"
||
inputs
[
k
].
type
==
"
radio
"
)
{
if
(
inputs
[
k
].
checked
==
true
)
{
inputs
[
k
].
setAttribute
(
'
checked
'
,
"
checked
"
)
}
else
{
inputs
[
k
].
removeAttribute
(
'
checked
'
)
}
}
else
if
(
inputs
[
k
].
type
==
"
text
"
)
{
inputs
[
k
].
setAttribute
(
'
value
'
,
inputs
[
k
].
value
)
}
else
{
inputs
[
k
].
setAttribute
(
'
value
'
,
inputs
[
k
].
value
)
}
}
for
(
var
k2
=
0
;
k2
<
textareas
.
length
;
k2
++
)
{
if
(
textareas
[
k2
].
type
==
'
textarea
'
)
{
textareas
[
k2
].
innerHTML
=
textareas
[
k2
].
value
}
}
for
(
var
k3
=
0
;
k3
<
selects
.
length
;
k3
++
)
{
if
(
selects
[
k3
].
type
==
'
select-one
'
)
{
var
child
=
selects
[
k3
].
children
;
for
(
var
i
in
child
)
{
if
(
child
[
i
].
tagName
==
'
OPTION
'
)
{
if
(
child
[
i
].
selected
==
true
)
{
child
[
i
].
setAttribute
(
'
selected
'
,
"
selected
"
)
}
else
{
child
[
i
].
removeAttribute
(
'
selected
'
)
}
}
}
}
}
return
this
.
dom
.
outerHTML
;
},
writeIframe
:
function
(
content
)
{
var
w
,
doc
,
iframe
=
document
.
createElement
(
'
iframe
'
),
f
=
document
.
body
.
appendChild
(
iframe
);
iframe
.
id
=
"
myIframe
"
;
//iframe.style = "position:absolute;width:0;height:0;top:-10px;left:-10px;";
iframe
.
setAttribute
(
'
style
'
,
'
position:absolute;width:0;height:0;top:-10px;left:-10px;
'
);
w
=
f
.
contentWindow
||
f
.
contentDocument
;
doc
=
f
.
contentDocument
||
f
.
contentWindow
.
document
;
doc
.
open
();
doc
.
write
(
content
);
doc
.
close
();
var
_this
=
this
iframe
.
onload
=
function
(){
_this
.
toPrint
(
w
);
setTimeout
(
function
()
{
document
.
body
.
removeChild
(
iframe
)
},
100
)
}
},
toPrint
:
function
(
frameWindow
)
{
try
{
setTimeout
(
function
()
{
frameWindow
.
focus
();
try
{
if
(
!
frameWindow
.
document
.
execCommand
(
'
print
'
,
false
,
null
))
{
frameWindow
.
print
();
}
}
catch
(
e
)
{
frameWindow
.
print
();
}
frameWindow
.
close
();
},
10
);
}
catch
(
err
)
{
console
.
log
(
'
err
'
,
err
);
}
},
isDOM
:
(
typeof
HTMLElement
===
'
object
'
)
?
function
(
obj
)
{
return
obj
instanceof
HTMLElement
;
}
:
function
(
obj
)
{
return
obj
&&
typeof
obj
===
'
object
'
&&
obj
.
nodeType
===
1
&&
typeof
obj
.
nodeName
===
'
string
'
;
}
};
const
MyPlugin
=
{}
MyPlugin
.
install
=
function
(
Vue
,
options
)
{
// 4. 添加实例方法
Vue
.
prototype
.
$print
=
Print
}
export
default
MyPlugin
litemall-admin/src/views/mall/order.vue
View file @
6fec6b58
...
@@ -48,61 +48,66 @@
...
@@ -48,61 +48,66 @@
<!-- 订单详情对话框 -->
<!-- 订单详情对话框 -->
<el-dialog
:visible.sync=
"orderDialogVisible"
title=
"订单详情"
width=
"800"
>
<el-dialog
:visible.sync=
"orderDialogVisible"
title=
"订单详情"
width=
"800"
>
<section
ref=
"print"
>
<el-form
:data=
"orderDetail"
label-position=
"left"
>
<el-form
:data=
"orderDetail"
label-position=
"left"
>
<el-form-item
label=
"订单编号"
>
<el-form-item
label=
"订单编号"
>
<span>
{{ orderDetail.order.orderSn }}
</span>
<span>
{{ orderDetail.order.orderSn }}
</span>
</el-form-item>
</el-form-item>
<el-form-item
label=
"订单状态"
>
<el-form-item
label=
"订单状态"
>
<el-tag>
{{ orderDetail.order.orderStatus | orderStatusFilter }}
</el-tag>
<el-tag>
{{ orderDetail.order.orderStatus | orderStatusFilter }}
</el-tag>
</el-form-item>
</el-form-item>
<el-form-item
label=
"订单用户"
>
<el-form-item
label=
"订单用户"
>
<span>
{{ orderDetail.user.nickname }}
</span>
<span>
{{ orderDetail.user.nickname }}
</span>
</el-form-item>
</el-form-item>
<el-form-item
label=
"用户留言"
>
<el-form-item
label=
"用户留言"
>
<span>
{{ orderDetail.order.message }}
</span>
<span>
{{ orderDetail.order.message }}
</span>
</el-form-item>
</el-form-item>
<el-form-item
label=
"收货信息"
>
<el-form-item
label=
"收货信息"
>
<span>
(收货人){{ orderDetail.order.consignee }}
</span>
<span>
(收货人){{ orderDetail.order.consignee }}
</span>
<span>
(手机号){{ orderDetail.order.mobile }}
</span>
<span>
(手机号){{ orderDetail.order.mobile }}
</span>
<span>
(地址){{ orderDetail.order.address }}
</span>
<span>
(地址){{ orderDetail.order.address }}
</span>
</el-form-item>
</el-form-item>
<el-form-item
label=
"商品信息"
>
<el-form-item
label=
"商品信息"
>
<el-table
:data=
"orderDetail.orderGoods"
border
fit
highlight-current-row
>
<el-table
:data=
"orderDetail.orderGoods"
border
fit
highlight-current-row
>
<el-table-column
align=
"center"
label=
"商品名称"
prop=
"goodsName"
/>
<el-table-column
align=
"center"
label=
"商品名称"
prop=
"goodsName"
/>
<el-table-column
align=
"center"
label=
"商品编号"
prop=
"goodsSn"
/>
<el-table-column
align=
"center"
label=
"商品编号"
prop=
"goodsSn"
/>
<el-table-column
align=
"center"
label=
"货品规格"
prop=
"specifications"
/>
<el-table-column
align=
"center"
label=
"货品规格"
prop=
"specifications"
/>
<el-table-column
align=
"center"
label=
"货品价格"
prop=
"price"
/>
<el-table-column
align=
"center"
label=
"货品价格"
prop=
"price"
/>
<el-table-column
align=
"center"
label=
"货品数量"
prop=
"number"
/>
<el-table-column
align=
"center"
label=
"货品数量"
prop=
"number"
/>
<el-table-column
align=
"center"
label=
"货品图片"
prop=
"picUrl"
>
<el-table-column
align=
"center"
label=
"货品图片"
prop=
"picUrl"
>
<
template
slot-scope=
"scope"
>
<
template
slot-scope=
"scope"
>
<img
:src=
"scope.row.picUrl"
width=
"40"
>
<img
:src=
"scope.row.picUrl"
width=
"40"
>
</
template
>
</
template
>
</el-table-column>
</el-table-column>
</el-table>
</el-table>
</el-form-item>
</el-form-item>
<el-form-item
label=
"费用信息"
>
<el-form-item
label=
"费用信息"
>
<span>
<span>
(实际费用){{ orderDetail.order.actualPrice }}元 =
(实际费用){{ orderDetail.order.actualPrice }}元 =
(商品总价){{ orderDetail.order.goodsPrice }}元 +
(商品总价){{ orderDetail.order.goodsPrice }}元 +
(快递费用){{ orderDetail.order.freightPrice }}元 -
(快递费用){{ orderDetail.order.freightPrice }}元 -
(优惠减免){{ orderDetail.order.couponPrice }}元 -
(优惠减免){{ orderDetail.order.couponPrice }}元 -
(积分减免){{ orderDetail.order.integralPrice }}元
(积分减免){{ orderDetail.order.integralPrice }}元
</span>
</span>
</el-form-item>
</el-form-item>
<el-form-item
label=
"支付信息"
>
<el-form-item
label=
"支付信息"
>
<span>
(支付渠道)微信支付
</span>
<span>
(支付渠道)微信支付
</span>
<span>
(支付时间){{ orderDetail.order.payTime }}
</span>
<span>
(支付时间){{ orderDetail.order.payTime }}
</span>
</el-form-item>
</el-form-item>
<el-form-item
label=
"快递信息"
>
<el-form-item
label=
"快递信息"
>
<span>
(快递公司){{ orderDetail.order.shipChannel }}
</span>
<span>
(快递公司){{ orderDetail.order.shipChannel }}
</span>
<span>
(快递单号){{ orderDetail.order.shipSn }}
</span>
<span>
(快递单号){{ orderDetail.order.shipSn }}
</span>
<span>
(发货时间){{ orderDetail.order.shipTime }}
</span>
<span>
(发货时间){{ orderDetail.order.shipTime }}
</span>
</el-form-item>
</el-form-item>
<el-form-item
label=
"收货信息"
>
<el-form-item
label=
"收货信息"
>
<span>
(确认收货时间){{ orderDetail.order.confirmTime }}
</span>
<span>
(确认收货时间){{ orderDetail.order.confirmTime }}
</span>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
</section>
<span
slot=
"footer"
class=
"dialog-footer"
>
<el-button
@
click=
"orderDialogVisible = false"
>
取 消
</el-button>
<el-button
type=
"primary"
@
click=
"printOrder"
>
打 印
</el-button>
</span>
</el-dialog>
</el-dialog>
<!-- 发货对话框 -->
<!-- 发货对话框 -->
...
@@ -138,7 +143,7 @@
...
@@ -138,7 +143,7 @@
</template>
</template>
<
script
>
<
script
>
import
{
list
Order
,
ship
Order
,
refundOrder
,
detail
Order
}
from
'
@/api/order
'
import
{
detail
Order
,
list
Order
,
refundOrder
,
ship
Order
}
from
'
@/api/order
'
import
Pagination
from
'
@/components/Pagination
'
// Secondary package based on el-pagination
import
Pagination
from
'
@/components/Pagination
'
// Secondary package based on el-pagination
import
checkPermission
from
'
@/utils/permission
'
// 权限判断函数
import
checkPermission
from
'
@/utils/permission
'
// 权限判断函数
...
@@ -289,6 +294,10 @@ export default {
...
@@ -289,6 +294,10 @@ export default {
excel
.
export_json_to_excel2
(
tHeader
,
this
.
list
,
filterVal
,
'
订单信息
'
)
excel
.
export_json_to_excel2
(
tHeader
,
this
.
list
,
filterVal
,
'
订单信息
'
)
this
.
downloadLoading
=
false
this
.
downloadLoading
=
false
})
})
},
printOrder
()
{
this
.
$print
(
this
.
$refs
.
print
)
this
.
orderDialogVisible
=
false
}
}
}
}
}
}
...
...
litemall-admin/src/views/user/address.vue
View file @
6fec6b58
...
@@ -86,7 +86,7 @@ export default {
...
@@ -86,7 +86,7 @@ export default {
handleDownload
()
{
handleDownload
()
{
this
.
downloadLoading
=
true
this
.
downloadLoading
=
true
import
(
'
@/vendor/Export2Excel
'
).
then
(
excel
=>
{
import
(
'
@/vendor/Export2Excel
'
).
then
(
excel
=>
{
const
tHeader
=
[
'
地址ID
'
,
'
用户ID
'
,
'
收
获
人
'
,
'
手机号
'
,
'
省
'
,
'
市
'
,
'
区
'
,
'
地址
'
,
'
是否默认
'
]
const
tHeader
=
[
'
地址ID
'
,
'
用户ID
'
,
'
收
货
人
'
,
'
手机号
'
,
'
省
'
,
'
市
'
,
'
区
'
,
'
地址
'
,
'
是否默认
'
]
const
filterVal
=
[
'
id
'
,
'
userId
'
,
'
name
'
,
'
tel
'
,
'
province
'
,
'
city
'
,
'
county
'
,
'
addressDetail
'
,
'
isDefault
'
]
const
filterVal
=
[
'
id
'
,
'
userId
'
,
'
name
'
,
'
tel
'
,
'
province
'
,
'
city
'
,
'
county
'
,
'
addressDetail
'
,
'
isDefault
'
]
excel
.
export_json_to_excel2
(
tHeader
,
this
.
list
,
filterVal
,
'
用户地址信息
'
)
excel
.
export_json_to_excel2
(
tHeader
,
this
.
list
,
filterVal
,
'
用户地址信息
'
)
this
.
downloadLoading
=
false
this
.
downloadLoading
=
false
...
...
litemall-all/src/main/resources/logback-spring.xml
View file @
6fec6b58
...
@@ -51,7 +51,7 @@
...
@@ -51,7 +51,7 @@
<logger
name=
"org.mybatis"
level=
"ERROR"
/>
<logger
name=
"org.mybatis"
level=
"ERROR"
/>
<logger
name=
"org.springframework"
level=
"ERROR"
/>
<logger
name=
"org.springframework"
level=
"ERROR"
/>
<logger
name=
"org.linlinjava.litemall.core"
level=
"DEBUG"
/>
<logger
name=
"org.linlinjava.litemall.core"
level=
"DEBUG"
/>
<logger
name=
"org.linlinjava.litemall.db"
level=
"DEBUG"
/>
<logger
name=
"org.linlinjava.litemall.db"
level=
"DEBUG"
/>
<logger
name=
"org.linlinjava.litemall.admin"
level=
"DEBUG"
/>
<logger
name=
"org.linlinjava.litemall.admin"
level=
"DEBUG"
/>
<logger
name=
"org.linlinjava.litemall.wx"
level=
"DEBUG"
/>
<logger
name=
"org.linlinjava.litemall.wx"
level=
"DEBUG"
/>
<logger
name=
"org.linlinjava.litemall"
level=
"DEBUG"
/>
<logger
name=
"org.linlinjava.litemall"
level=
"DEBUG"
/>
...
...
litemall-db/src/main/java/org/linlinjava/litemall/db/util/OrderUtil.java
View file @
6fec6b58
...
@@ -11,7 +11,7 @@ import java.util.List;
...
@@ -11,7 +11,7 @@ import java.util.List;
* 101 订单生成,未支付;102,下单未支付用户取消;103,下单未支付超期系统自动取消
* 101 订单生成,未支付;102,下单未支付用户取消;103,下单未支付超期系统自动取消
* 201 支付完成,商家未发货;202,订单生产,已付款未发货,用户申请退款;203,管理员执行退款操作,确认退款成功;
* 201 支付完成,商家未发货;202,订单生产,已付款未发货,用户申请退款;203,管理员执行退款操作,确认退款成功;
* 301 商家发货,用户未确认;
* 301 商家发货,用户未确认;
* 401 用户确认收货,订单结束; 402 用户没有确认收货,但是快递反馈已收
获
后,超过一定时间,系统自动确认收货,订单结束。
* 401 用户确认收货,订单结束; 402 用户没有确认收货,但是快递反馈已收
货
后,超过一定时间,系统自动确认收货,订单结束。
*
*
* 当101用户未付款时,此时用户可以进行的操作是取消或者付款
* 当101用户未付款时,此时用户可以进行的操作是取消或者付款
* 当201支付完成而商家未发货时,此时用户可以退款
* 当201支付完成而商家未发货时,此时用户可以退款
...
@@ -144,6 +144,12 @@ public class OrderUtil {
...
@@ -144,6 +144,12 @@ public class OrderUtil {
return
OrderUtil
.
STATUS_CREATE
==
litemallOrder
.
getOrderStatus
().
shortValue
();
return
OrderUtil
.
STATUS_CREATE
==
litemallOrder
.
getOrderStatus
().
shortValue
();
}
}
public
static
boolean
hasPayed
(
LitemallOrder
order
)
{
return
OrderUtil
.
STATUS_CREATE
!=
order
.
getOrderStatus
().
shortValue
()
&&
OrderUtil
.
STATUS_CANCEL
!=
order
.
getOrderStatus
().
shortValue
()
&&
OrderUtil
.
STATUS_AUTO_CANCEL
!=
order
.
getOrderStatus
().
shortValue
();
}
public
static
boolean
isPayStatus
(
LitemallOrder
litemallOrder
)
{
public
static
boolean
isPayStatus
(
LitemallOrder
litemallOrder
)
{
return
OrderUtil
.
STATUS_PAY
==
litemallOrder
.
getOrderStatus
().
shortValue
();
return
OrderUtil
.
STATUS_PAY
==
litemallOrder
.
getOrderStatus
().
shortValue
();
}
}
...
...
litemall-vue/src/api/api.js
View file @
6fec6b58
...
@@ -161,7 +161,7 @@ export function cartFastAdd(data) {
...
@@ -161,7 +161,7 @@ export function cartFastAdd(data) {
const
CartUpdate
=
'
wx/cart/update
'
;
// 更新购物车的商品
const
CartUpdate
=
'
wx/cart/update
'
;
// 更新购物车的商品
export
function
cartUpdate
(
data
)
{
export
function
cartUpdate
(
data
)
{
return
request
({
return
request
({
url
:
c
artUpdate
,
url
:
C
artUpdate
,
method
:
'
post
'
,
method
:
'
post
'
,
data
data
})
})
...
@@ -437,4 +437,4 @@ export function getList(api, query) {
...
@@ -437,4 +437,4 @@ export function getList(api, query) {
})
})
}
}
export
const
REFUND_LIST
=
''
;
export
const
REFUND_LIST
=
''
;
\ No newline at end of file
litemall-vue/src/views/items/category/index.vue
View file @
6fec6b58
...
@@ -64,7 +64,7 @@ export default {
...
@@ -64,7 +64,7 @@ export default {
handleTabClick
(
index
)
{
handleTabClick
(
index
)
{
this
.
categoryId
=
this
.
navList
[
index
].
id
;
this
.
categoryId
=
this
.
navList
[
index
].
id
;
this
.
$router
.
replace
({
this
.
$router
.
replace
({
name
:
'
list
'
,
name
:
'
category
'
,
query
:
{
itemClass
:
this
.
categoryId
}
query
:
{
itemClass
:
this
.
categoryId
}
});
});
this
.
init
();
this
.
init
();
...
...
litemall-vue/src/views/login/forget/index.vue
View file @
6fec6b58
...
@@ -11,7 +11,7 @@
...
@@ -11,7 +11,7 @@
placeholder=
"请输入短信验证码"
placeholder=
"请输入短信验证码"
>
>
<div
slot=
"rightIcon"
@
click=
"getCode"
class=
"getCode red"
>
<div
slot=
"rightIcon"
@
click=
"getCode"
class=
"getCode red"
>
<countdown
v-if=
"counting"
:time=
"60000"
@
countdown
end=
"countdownend"
>
<countdown
v-if=
"counting"
:time=
"60000"
@
end=
"countdownend"
>
<template
slot-scope=
"props"
>
{{
+
props
.
seconds
||
60
}}
秒后获取
</
template
>
<template
slot-scope=
"props"
>
{{
+
props
.
seconds
||
60
}}
秒后获取
</
template
>
</countdown>
</countdown>
<span
v-else
>
获取验证码
</span>
<span
v-else
>
获取验证码
</span>
...
...
litemall-vue/src/views/login/register-submit/index.vue
View file @
6fec6b58
...
@@ -2,7 +2,7 @@
...
@@ -2,7 +2,7 @@
<md-field-group
class=
"register_submit"
>
<md-field-group
class=
"register_submit"
>
<md-field
v-model=
"code"
icon=
"mobile"
placeholder=
"请输入验证码"
>
<md-field
v-model=
"code"
icon=
"mobile"
placeholder=
"请输入验证码"
>
<div
slot=
"rightIcon"
@
click=
"getCode"
class=
"getCode red"
>
<div
slot=
"rightIcon"
@
click=
"getCode"
class=
"getCode red"
>
<countdown
v-if=
"counting"
:time=
"60000"
@
countdown
end=
"countdownend"
>
<countdown
v-if=
"counting"
:time=
"60000"
@
end=
"countdownend"
>
<template
slot-scope=
"props"
>
{{
+
props
.
seconds
||
60
}}
秒后获取
</
template
>
<template
slot-scope=
"props"
>
{{
+
props
.
seconds
||
60
}}
秒后获取
</
template
>
</countdown>
</countdown>
<span
v-else
>
获取验证码
</span>
<span
v-else
>
获取验证码
</span>
...
...
litemall-vue/src/views/order/tabbar-cart.vue
View file @
6fec6b58
...
@@ -37,7 +37,7 @@
...
@@ -37,7 +37,7 @@
label=
"总计"
label=
"总计"
@
submit=
"cartSubmit"
@
submit=
"cartSubmit"
>
>
<van-checkbox
v-model=
"
allC
hecked
Status"
@
change
=
"setCheckAll"
style=
"padding: 0 10px;"
>
全选
</van-checkbox>
<van-checkbox
v-model=
"
c
hecked
All"
@
click
=
"setCheckAll"
style=
"padding: 0 10px;"
>
全选
</van-checkbox>
</van-submit-bar>
</van-submit-bar>
</div>
</div>
</
template
>
</
template
>
...
@@ -57,25 +57,16 @@ export default {
...
@@ -57,25 +57,16 @@ export default {
checkedAll
:
false
,
checkedAll
:
false
,
isSubmit
:
false
,
isSubmit
:
false
,
checkedGoods
:
[],
checkedGoods
:
[],
AllGoods
:
[],
allGoods
:
[],
allCheckedStatus
:
false
,
goods
:
[]
goods
:
[],
count
:
0
};
};
},
},
activated
()
{
this
.
checkedAll
=
false
;
this
.
isEditor
=
false
;
this
.
isSubmit
=
false
;
},
created
()
{
created
()
{
this
.
init
();
this
.
init
();
},
},
computed
:
{
computed
:
{
submitBarText
()
{
submitBarText
()
{
const
count
=
this
.
count
;
return
this
.
isEditor
?
'
删除
'
:
'
结算
'
;
return
this
.
isEditor
?
'
删除
'
:
`结算
${
count
?
`(
${
count
}
)`
:
''
}
`
;
},
},
totalPrice
()
{
totalPrice
()
{
return
this
.
goods
.
reduce
(
return
this
.
goods
.
reduce
(
...
@@ -102,9 +93,8 @@ export default {
...
@@ -102,9 +93,8 @@ export default {
init
()
{
init
()
{
cartList
().
then
(
res
=>
{
cartList
().
then
(
res
=>
{
this
.
goods
=
res
.
data
.
data
.
cartList
;
this
.
goods
=
res
.
data
.
data
.
cartList
;
this
.
A
llGoods
=
this
.
getAllList
();
this
.
a
llGoods
=
this
.
getAllList
();
this
.
checkedGoods
=
this
.
getCheckedList
(
this
.
goods
);
this
.
checkedGoods
=
this
.
getCheckedList
(
this
.
goods
);
this
.
count
=
this
.
checkedGoods
.
length
;
});
});
},
},
getAllList
()
{
getAllList
()
{
...
@@ -149,10 +139,10 @@ export default {
...
@@ -149,10 +139,10 @@ export default {
}
}
},
},
setCheckAll
(
val
)
{
setCheckAll
(
val
)
{
if
(
this
.
checkedGoods
.
length
===
this
.
A
llGoods
.
length
)
{
if
(
this
.
checkedGoods
.
length
===
this
.
a
llGoods
.
length
)
{
this
.
checkedGoods
=
[];
this
.
checkedGoods
=
[];
}
else
{
}
else
{
this
.
checkedGoods
=
this
.
A
llGoods
;
this
.
checkedGoods
=
this
.
a
llGoods
;
}
}
},
},
deleteCart
(
o
)
{
deleteCart
(
o
)
{
...
@@ -175,19 +165,25 @@ export default {
...
@@ -175,19 +165,25 @@ export default {
});
});
let
delProductIds
=
[];
let
delProductIds
=
[];
_
.
each
(
_
.
difference
(
this
.
A
llGoods
,
index
),
v
=>
{
_
.
each
(
_
.
difference
(
this
.
a
llGoods
,
index
),
v
=>
{
let
productId
=
_
.
find
(
this
.
goods
,
result
=>
{
let
productId
=
_
.
find
(
this
.
goods
,
result
=>
{
return
result
.
id
===
v
;
return
result
.
id
===
v
;
}).
productId
;
}).
productId
;
delProductIds
.
push
(
productId
);
delProductIds
.
push
(
productId
);
});
});
//没选中的不掉接口
if
(
delProductIds
.
length
>
0
)
{
if
(
delProductIds
.
length
>
0
)
{
cartChecked
({
productIds
:
delProductIds
,
isChecked
:
0
});
cartChecked
({
productIds
:
delProductIds
,
isChecked
:
0
});
}
}
if
(
addProductIds
.
length
>
0
)
{
if
(
addProductIds
.
length
>
0
)
{
cartChecked
({
productIds
:
addProductIds
,
isChecked
:
1
});
cartChecked
({
productIds
:
addProductIds
,
isChecked
:
1
});
}
}
if
(
index
.
length
===
this
.
allGoods
.
length
){
this
.
checkedAll
=
true
}
else
{
this
.
checkedAll
=
false
}
},
},
deleteNext
(
o
)
{
deleteNext
(
o
)
{
let
productIds
=
[];
let
productIds
=
[];
...
@@ -199,9 +195,8 @@ export default {
...
@@ -199,9 +195,8 @@ export default {
cartDelete
({
productIds
:
productIds
}).
then
(
res
=>
{
cartDelete
({
productIds
:
productIds
}).
then
(
res
=>
{
this
.
goods
=
res
.
data
.
data
.
cartList
;
this
.
goods
=
res
.
data
.
data
.
cartList
;
this
.
A
llGoods
=
this
.
getAllList
();
this
.
a
llGoods
=
this
.
getAllList
();
this
.
checkedGoods
=
this
.
getCheckedList
(
this
.
goods
);
this
.
checkedGoods
=
this
.
getCheckedList
(
this
.
goods
);
this
.
count
=
this
.
checkedGoods
.
length
;
});
});
}
}
},
},
...
...
litemall-vue/src/views/user/order-list/index.vue
View file @
6fec6b58
...
@@ -38,25 +38,25 @@
...
@@ -38,25 +38,25 @@
class=
"footer_btn"
>
class=
"footer_btn"
>
<van-button
size=
"small"
<van-button
size=
"small"
v-if=
"el.handleOption.cancel"
v-if=
"el.handleOption.cancel"
@
click=
"cancelOrder(el.id)"
>
取消订单
</van-button>
@
click
.stop
=
"cancelOrder(el.id)"
>
取消订单
</van-button>
<van-button
size=
"small"
<van-button
size=
"small"
v-if=
"el.handleOption.pay"
v-if=
"el.handleOption.pay"
type=
"danger"
type=
"danger"
@
click=
"toPay(el.id)"
>
去支付
</van-button>
@
click
.stop
=
"toPay(el.id)"
>
去支付
</van-button>
<van-button
size=
"small"
<van-button
size=
"small"
v-if=
"el.handleOption.refund"
v-if=
"el.handleOption.refund"
type=
"danger"
type=
"danger"
@
click=
"refundOrder(el.id)"
>
退款
</van-button>
@
click
.stop
=
"refundOrder(el.id)"
>
退款
</van-button>
<van-button
size=
"small"
<van-button
size=
"small"
v-if=
"el.handleOption.confirm"
v-if=
"el.handleOption.confirm"
type=
"danger"
type=
"danger"
@
click=
"confirmOrder(el.id)"
>
确认收货
</van-button>
@
click
.stop
=
"confirmOrder(el.id)"
>
确认收货
</van-button>
<van-button
size=
"small"
<van-button
size=
"small"
v-if=
"el.handleOption.delete"
v-if=
"el.handleOption.delete"
@
click=
"delOrder(el.id)"
>
删除订单
</van-button>
@
click
.stop
=
"delOrder(el.id)"
>
删除订单
</van-button>
<van-button
size=
"small"
<van-button
size=
"small"
v-if=
"el.handleOption.comment"
v-if=
"el.handleOption.comment"
@
click=
"commentOrder(el.id)"
>
去评价
</van-button>
@
click
.stop
=
"commentOrder(el.id)"
>
去评价
</van-button>
</div>
</div>
</van-panel>
</van-panel>
...
@@ -131,7 +131,7 @@ export default {
...
@@ -131,7 +131,7 @@ export default {
this
.
$dialog
this
.
$dialog
.
confirm
({
message
:
'
确定要取消该订单吗?
'
})
.
confirm
({
message
:
'
确定要取消该订单吗?
'
})
.
then
(()
=>
{
.
then
(()
=>
{
order
Delete
({
orderId
:
id
}).
then
(()
=>
{
order
Cancel
({
orderId
:
id
}).
then
(()
=>
{
this
.
init
();
this
.
init
();
this
.
$toast
(
'
已取消该订单
'
);
this
.
$toast
(
'
已取消该订单
'
);
});
});
...
...
litemall-vue/src/views/user/user-information-set/set-mobile/index.vue
View file @
6fec6b58
...
@@ -24,7 +24,7 @@
...
@@ -24,7 +24,7 @@
class=
"verifi_code red"
class=
"verifi_code red"
:class=
"
{verifi_code_counting: counting}"
:class=
"
{verifi_code_counting: counting}"
@click="getCode">
@click="getCode">
<countdown
v-if=
"counting"
:time=
"60000"
@
countdown
end=
"countdownend"
>
<countdown
v-if=
"counting"
:time=
"60000"
@
end=
"countdownend"
>
<template
slot-scope=
"props"
>
{{
+
props
.
seconds
||
60
}}
秒后获取
</
template
>
<template
slot-scope=
"props"
>
{{
+
props
.
seconds
||
60
}}
秒后获取
</
template
>
</countdown>
</countdown>
<span
v-else
>
获取验证码
</span>
<span
v-else
>
获取验证码
</span>
...
...
litemall-vue/src/views/user/user-information-set/set-password/index.vue
View file @
6fec6b58
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
class=
"verifi_code red"
class=
"verifi_code red"
:class=
"
{verifi_code_counting: counting}"
:class=
"
{verifi_code_counting: counting}"
@click="getCode">
@click="getCode">
<countdown
v-if=
"counting"
:time=
"60000"
@
countdown
end=
"countdownend"
>
<countdown
v-if=
"counting"
:time=
"60000"
@
end=
"countdownend"
>
<template
slot-scope=
"props"
>
{{
+
props
.
seconds
||
60
}}
秒后获取
</
template
>
<template
slot-scope=
"props"
>
{{
+
props
.
seconds
||
60
}}
秒后获取
</
template
>
</countdown>
</countdown>
<span
v-else
>
获取验证码
</span>
<span
v-else
>
获取验证码
</span>
...
...
litemall-wx-api/src/main/java/org/linlinjava/litemall/wx/service/WxOrderService.java
View file @
6fec6b58
...
@@ -152,6 +152,7 @@ public class WxOrderService {
...
@@ -152,6 +152,7 @@ public class WxOrderService {
orderGoodsVo
.
put
(
"number"
,
orderGoods
.
getNumber
());
orderGoodsVo
.
put
(
"number"
,
orderGoods
.
getNumber
());
orderGoodsVo
.
put
(
"picUrl"
,
orderGoods
.
getPicUrl
());
orderGoodsVo
.
put
(
"picUrl"
,
orderGoods
.
getPicUrl
());
orderGoodsVo
.
put
(
"specifications"
,
orderGoods
.
getSpecifications
());
orderGoodsVo
.
put
(
"specifications"
,
orderGoods
.
getSpecifications
());
orderGoodsVo
.
put
(
"price"
,
orderGoods
.
getPrice
());
orderGoodsVoList
.
add
(
orderGoodsVo
);
orderGoodsVoList
.
add
(
orderGoodsVo
);
}
}
orderVo
.
put
(
"goodsList"
,
orderGoodsVoList
);
orderVo
.
put
(
"goodsList"
,
orderGoodsVoList
);
...
@@ -612,7 +613,7 @@ public class WxOrderService {
...
@@ -612,7 +613,7 @@ public class WxOrderService {
}
}
// 检查这个订单是否已经处理过
// 检查这个订单是否已经处理过
if
(
OrderUtil
.
i
sPay
Status
(
order
)
&&
order
.
getPayId
()
!=
null
)
{
if
(
OrderUtil
.
ha
sPay
ed
(
order
))
{
return
WxPayNotifyResponse
.
success
(
"订单已经处理成功!"
);
return
WxPayNotifyResponse
.
success
(
"订单已经处理成功!"
);
}
}
...
...
litemall-wx-api/src/main/java/org/linlinjava/litemall/wx/web/WxAddressController.java
View file @
6fec6b58
...
@@ -134,7 +134,7 @@ public class WxAddressController extends GetRegionService {
...
@@ -134,7 +134,7 @@ public class WxAddressController extends GetRegionService {
}
}
if
(
address
.
getIsDefault
())
{
if
(
address
.
getIsDefault
())
{
// 重置其他收
获
地址的默认选项
// 重置其他收
货
地址的默认选项
addressService
.
resetDefault
(
userId
);
addressService
.
resetDefault
(
userId
);
}
}
...
...
Prev
1
2
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment