Skip to content

Commit 424518d

Browse files
committed
优化下单及前端页面
1 parent 5efc306 commit 424518d

22 files changed

Lines changed: 188 additions & 65 deletions

File tree

gpmall-front/package-lock.json

Lines changed: 13 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

gpmall-front/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
"gitment": "0.0.3",
1919
"mockjs": "^1.0.1-beta3",
2020
"vue": "^2.6.10",
21+
"vue-area-linkage": "^5.1.0",
2122
"vue-content-placeholders": "^0.2.1",
2223
"vue-cookie": "^1.1.4",
2324
"vue-cropper": "^0.1.7",

gpmall-front/src/components/popup.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ export default {
5858
background: rgba(0, 0, 0, .5);
5959
}
6060
.content {
61-
width: 30%;
61+
width: 20%;
6262
background: #fff;
6363
border-radius: 10px;
6464
}
@@ -81,7 +81,7 @@ export default {
8181
h4 {
8282
text-align: center;
8383
font-size: 18px;
84-
font-weight: 400;
84+
font-weight: 700;
8585
color: #666;
8686
}
8787
}

gpmall-front/src/page/Checkout/checkout.vue

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -450,8 +450,8 @@
450450
margin-bottom: 15px;
451451
> input {
452452
width: 100%;
453-
height: 50px;
454-
font-size: 18px;
453+
height: 38px;
454+
font-size: 14px;
455455
padding: 10px 20px;
456456
border: 1px solid #ccc;
457457
border-radius: 6px;
@@ -464,9 +464,9 @@
464464
.btn {
465465
margin: 0;
466466
width: 100%;
467-
height: 50px;
467+
height: 43px;
468468
font-size: 14px;
469-
line-height: 48px
469+
line-height: 43px
470470
}
471471
}
472472

gpmall-front/src/page/User/children/information.vue

Lines changed: 43 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,25 @@
99
<y-button text="上传头像" classStyle="main-btn" style="margin: 0;" @btnClick="editAvatar()"></y-button>
1010
</div>
1111
</div>
12+
<div class="status-box fn-clear safe-status-warning">
13+
<div class="safe-center-title">
14+
<h3 >邮箱验证</h3>
15+
</div>
16+
<p >绑定邮箱后,可用邮箱登录。</p>
17+
<div class="safe-todo">
18+
<a >现在绑定</a>
19+
</div>
20+
</div>
1221
<div class="edit-avatar" v-if="editAvatarShow">
1322
<y-shelf title="设置头像">
1423
<span slot="right">
15-
<span class="close" @click="editAvatarShow=false">
16-
<svg t="1501234940517" class="icon" style="" viewBox="0 0 1024 1024" version="1.1"
17-
xmlns="http://www.w3.org/2000/svg" p-id="3014" xmlns:xlink="http://www.w3.org/1999/xlink"
18-
width="20" height="20"><path
19-
d="M941.576 184.248l-101.824-101.824L512 410.176 184.248 82.424 82.424 184.248 410.168 512l-327.744 327.752 101.824 101.824L512 613.824l327.752 327.752 101.824-101.824L613.832 512z"
20-
fill="#cdcdcd" p-id="3015"></path></svg>
21-
</span>
24+
<span class="close" @click="editAvatarShow=false">
25+
<svg t="1501234940517" class="icon" style="" viewBox="0 0 1024 1024" version="1.1"
26+
xmlns="http://www.w3.org/2000/svg" p-id="3014" xmlns:xlink="http://www.w3.org/1999/xlink"
27+
width="20" height="20">
28+
<path d="M941.576 184.248l-101.824-101.824L512 410.176 184.248 82.424 82.424 184.248 410.168 512l-327.744 327.752 101.824 101.824L512 613.824l327.752 327.752 101.824-101.824L613.832 512z"
29+
fill="#cdcdcd" p-id="3015"></path></svg>
30+
</span>
2231
</span>
2332
<div slot="content" class="content">
2433
<div class="edit-l">
@@ -217,6 +226,33 @@
217226
}
218227
}
219228
}
229+
.safe-status-ok {
230+
background:url("/static/images/safe-status.png") 21px 5px no-repeat;
231+
background-size: 22px;
232+
}
233+
.safe-status-warning {
234+
background:url("/static/images/safe-status-problem.png") 21px 5px no-repeat;
235+
background-size: 22px;
236+
}
237+
238+
.status-box {
239+
position: relative;
240+
height:6px;
241+
padding-bottom: 30px;
242+
margin: 0 30px 30px;
243+
border-bottom: 1px solid #dadada;
244+
line-height: 30px;
245+
}
246+
247+
.safe-center-title {
248+
margin-left: 60px;
249+
h3 {
250+
font-size: 18px;
251+
font-weight: 400;
252+
color: #333;
253+
}
254+
}
255+
220256
221257
// 修改头像
222258
.edit-avatar {

gpmall-front/src/page/User/children/order.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@
103103
this._orderList()
104104
},
105105
orderPayment (orderId) {
106-
window.open(window.location.origin + '#/order/payment?orderId=' + orderId)
106+
window.open(window.location.origin + '#/order/payment/' + orderId)
107107
},
108108
goodsDetails (id) {
109109
window.open(window.location.origin + '#/product/' + id)
2.84 KB
Loading
3.34 KB
Loading

gpmall-shopping/src/main/java/com/gpmall/shopping/controller/AddressController.java

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,13 +51,16 @@ public ResponseData addressList(HttpServletRequest request){
5151
}
5252

5353
@PostMapping("/addresses")
54-
public ResponseData addressAdd(@RequestBody AddressForm form){
54+
public ResponseData addressAdd(@RequestBody AddressForm form,HttpServletRequest servletRequest){
5555

5656
System.out.println(form.is_Default());
5757
System.out.println(form.toString() );
5858

5959
AddAddressRequest request = new AddAddressRequest();
60-
request.setUserId(form.getUserId());
60+
String userInfo=(String)servletRequest.getAttribute(TokenIntercepter.USER_INFO_KEY);
61+
JSONObject object= JSON.parseObject(userInfo);
62+
Long uid=Long.parseLong(object.get("uid").toString());
63+
request.setUserId(uid);
6164
request.setUserName(form.getUserName());
6265
request.setStreetName(form.getStreetName());
6366
request.setTel(form.getTel());
@@ -83,13 +86,16 @@ public ResponseData addressDel(@PathVariable("addressid") Long addressid){
8386
}
8487

8588
@PutMapping("/addresses")
86-
public ResponseData addressUpdate(@RequestBody AddressForm form){
89+
public ResponseData addressUpdate(@RequestBody AddressForm form,HttpServletRequest servletRequest){
8790
UpdateAddressRequest request = new UpdateAddressRequest();
91+
String userInfo=(String)servletRequest.getAttribute(TokenIntercepter.USER_INFO_KEY);
92+
JSONObject object= JSON.parseObject(userInfo);
93+
Long uid=Long.parseLong(object.get("uid").toString());
8894
request.setAddressId(form.getAddressId());
8995
request.setIsDefault(form.is_Default());
9096
request.setStreetName(form.getStreetName());
9197
request.setTel(form.getTel());
92-
request.setUserId(form.getUserId());
98+
request.setUserId(uid);
9399
request.setUserName(form.getUserName());
94100

95101
UpdateAddressResponse response = addressService.updateAddress(request);

gpmall-shopping/src/main/java/com/gpmall/shopping/controller/OrderController.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
import org.springframework.web.bind.annotation.*;
1717

1818
import javax.servlet.http.HttpServletRequest;
19+
import java.util.UUID;
1920

2021
/**
2122
* 腾讯课堂搜索【咕泡学院】
@@ -42,6 +43,7 @@ public ResponseData order(@RequestBody CreateOrderRequest request,HttpServletReq
4243
JSONObject object= JSON.parseObject(userInfo);
4344
Long uid=Long.parseLong(object.get("uid").toString());
4445
request.setUserId(uid);
46+
request.setUniqueKey(UUID.randomUUID().toString());
4547
CreateOrderResponse response=orderCoreService.createOrder(request);
4648
if(response.getCode().equals(OrderRetCode.SUCCESS.getCode())){
4749
return new ResponseUtil<>().setData(response.getOrderId());

0 commit comments

Comments
 (0)