Skip to content

Commit 08f9f66

Browse files
committed
添加支付处理逻辑
1 parent 896a52f commit 08f9f66

65 files changed

Lines changed: 2463 additions & 476 deletions

Some content is hidden

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

db_scrpit/gpmall.sql

Lines changed: 339 additions & 377 deletions
Large diffs are not rendered by default.

gpmall-front/src/main.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { userInfo } from './api'
99
import { Button, Pagination, Checkbox, Icon, Autocomplete, Loading, Message, Notification, Steps, Step, Table, TableColumn, Input, Dialog, Select, Option } from 'element-ui'
1010
// import { getStore } from '/utils/storage'
1111
import VueContentPlaceholders from 'vue-content-placeholders'
12-
// import Mock from './mock/mock.js'
12+
import Mock from './mock/mock.js'
1313

1414
Vue.use(VueContentPlaceholders)
1515
Vue.use(Button)
@@ -38,7 +38,7 @@ Vue.use(VueLazyload, {
3838
// attempt: 1
3939
})
4040

41-
// Mock.bootstrap()
41+
Mock.bootstrap()
4242

4343
Vue.config.productionTip = false
4444
const whiteList = ['/home', '/goods', '/login', '/register', '/product', '/thanks', '/search', '/refreshsearch', '/refreshgoods'] // 不需要登陆的页面

gpmall-front/src/mock/cartList.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const CartListData = {
2626

2727
export default {
2828
bootstrap (mock) {
29-
mock.onPost(apis.getCartList).reply(config => {
29+
mock.onGet(apis.getCartList).reply(config => {
3030
return new Promise((resolve, reject) => {
3131
resolve([200, CartListData])
3232
})

gpmall-front/src/mock/home.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ const homeData = {
1616
'remark': '',
1717
'created': 1523766787000,
1818
'updated': 1523766787000,
19-
'panelContents': [{
19+
'panelContentItems': [{
2020
'id': 33,
2121
'panelId': 7,
2222
'type': 0,
@@ -92,7 +92,7 @@ const homeData = {
9292
'remark': '',
9393
'created': 1523790300000,
9494
'updated': 1523790300000,
95-
'panelContents': [{
95+
'panelContentItems': [{
9696
'id': 25,
9797
'panelId': 8,
9898
'type': 0,
@@ -168,7 +168,7 @@ const homeData = {
168168
'remark': '',
169169
'created': 1524066553000,
170170
'updated': 1523790316000,
171-
'panelContents': [{
171+
'panelContentItems': [{
172172
'id': 22,
173173
'panelId': 1,
174174
'type': 0,
@@ -212,7 +212,7 @@ const homeData = {
212212
'remark': '',
213213
'created': null,
214214
'updated': 1524108059000,
215-
'panelContents': [{
215+
'panelContentItems': [{
216216
'id': 29,
217217
'panelId': 2,
218218
'type': 2,
@@ -336,7 +336,7 @@ const homeData = {
336336
'remark': null,
337337
'created': 1524066632000,
338338
'updated': 1524066635000,
339-
'panelContents': [{
339+
'panelContentItems': [{
340340
'id': 40,
341341
'panelId': 10,
342342
'type': 3,
@@ -460,7 +460,7 @@ const homeData = {
460460
'remark': '',
461461
'created': 1524066559000,
462462
'updated': 1523962455000,
463-
'panelContents': [{
463+
'panelContentItems': [{
464464
'id': 30,
465465
'panelId': 3,
466466
'type': 2,
@@ -584,7 +584,7 @@ const homeData = {
584584
'remark': '',
585585
'created': null,
586586
'updated': 1524110267000,
587-
'panelContents': [{
587+
'panelContentItems': [{
588588
'id': 65,
589589
'panelId': 9,
590590
'type': 0,

gpmall-front/src/mock/mock.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import NavList from './navList'
66
import ProductDetail from './productDetail'
77
import AddCard from './addCart'
88
import Login from './login'
9-
// import CartList from './cartList'
9+
import CartList from './cartList'
1010
import QuickSearch from './quickSearch'
1111
import AllGoods from './allGoods'
1212
import LogOut from './loginOut'
@@ -25,7 +25,7 @@ export default {
2525
ProductDetail.bootstrap(mock)
2626
AddCard.bootstrap(mock)
2727
Login.bootstrap(mock)
28-
// CartList.bootstrap(mock)
28+
CartList.bootstrap(mock)
2929
QuickSearch.bootstrap(mock)
3030
AllGoods.bootstrap(mock)
3131
LogOut.bootstrap(mock)

gpmall-front/src/page/Order/payment.vue

Lines changed: 4 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,11 @@
33
<y-shelf title="支付订单">
44
<div slot="content">
55
<div class="box-inner order-info">
6-
<h3>提交订单成功,请填写捐赠信息</h3>
7-
<p class="payment-detail">请在 <span>24 小时内</span>完成支付,超时订单将自动取消。</p>
6+
<h3>提交订单成功,请选择支付方式</h3>
7+
<p class="payment-detail">请在 <span>2 小时内</span>完成支付,超时订单将自动取消。</p>
88
<p class="payment-detail">我们不会在您完成支付后的 72 小时内发货,您的支付将用作捐赠</p>
9-
<p class="payment-detail" style="color:red">请仔细填写捐赠信息,避免系统审核失败无法在捐赠名单中显示您的数据</p>
109
</div>
11-
<div class="pay-info">
10+
<!-- <div class="pay-info">
1211
<span style="color:red">*</span> 昵称:<el-input v-model="nickName" placeholder="请输入您的昵称" @change="checkValid" :maxlength="maxLength" class="input"></el-input><br>
1312
<span style="color:red">*</span> 捐赠金额:<el-select class="money-select" v-model="moneySelect" placeholder="请选择支付金额" @change="changeSelect">
1413
<el-option label="¥0.10 我是穷逼" value="0.10"></el-option>
@@ -20,7 +19,7 @@
2019
<div v-if="moneySelect === 'custom'"><span style="color:red">*</span> 输入金额:<el-input v-model="money" placeholder="请输入捐赠金额(最多2位小数,不得低于0.1元)" @change="checkValid" :maxlength="maxLength" class="input" style="margin-left:10px"></el-input><br></div>
2120
<span style="color:red">*</span> 通知邮箱:<el-input v-model="email" placeholder="支付审核结果将以邮件方式发送至您的邮箱" @change="checkValid" :maxlength="maxLength" class="input" style="margin-left:10px"></el-input><br>
2221
&nbsp;&nbsp; 留言:<el-input v-model="info" placeholder="请输入您的留言内容" :maxlength="maxLength" class="input"></el-input>
23-
</div>
22+
</div>-->
2423
<!--支付方式-->
2524
<div class="pay-type">
2625
<div class="p-title">支付方式</div>
@@ -30,7 +29,6 @@
3029
<div :class="{active:payType==3}" @click="payType=3"><img src="/static/images/qqpay.png" alt=""></div>
3130
</div>
3231
</div>
33-
3432
<div>
3533
<div class="box-inner">
3634
<div>
@@ -53,46 +51,6 @@
5351

5452
</div>
5553
</y-shelf>
56-
<!--地址信息-->
57-
<div class="p-msg w">
58-
<div class="confirm-detail">
59-
<div class="info-title">收货信息</div>
60-
<p class="info-detail">姓名:{{userName}}</p>
61-
<p class="info-detail">联系电话:{{tel}}</p>
62-
<p class="info-detail">详细地址:{{streetName}}</p></div>
63-
</div>
64-
<div class="confirm-table-title">
65-
<span class="name">商品信息</span>
66-
<div>
67-
<span class="price">单价</span>
68-
<span class="num">数量</span>
69-
<span class="subtotal">小计</span>
70-
</div>
71-
</div>
72-
<!--商品-->
73-
<div class="confirm-goods-table">
74-
<div class="cart-items" v-for="(item,i) in cartList" :key="i">
75-
<div class="name">
76-
<div class="name-cell ellipsis">
77-
<a @click="goodsDetails(item.productId)" title="" target="_blank">{{item.productName}}</a>
78-
</div>
79-
</div>
80-
<div class="n-b">
81-
<div class="price">¥ {{item.salePrice}}</div>
82-
<div class="goods-num">{{item.productNum}}</div>
83-
<div class="subtotal">
84-
<div class="subtotal-cell"> ¥ {{item.salePrice * item.productNum}}<br></div>
85-
</div>
86-
</div>
87-
</div>
88-
</div>
89-
<!--合计-->
90-
<div class="order-discount-line">
91-
<p style="font-size: 14px;font-weight: bolder;"> <span style="padding-right:47px">商品总计:</span>
92-
<span style="font-size: 16px;font-weight: 500;line-height: 32px;">¥ {{orderTotal}}</span>
93-
</p>
94-
<p><span style="padding-right:30px">运费:</span><span style="font-weight: 700;">+ ¥ 0.00</span></p>
95-
</div>
9654
</div>
9755
</template>
9856
<script>
-48.7 KB
Binary file not shown.
-202 KB
Binary file not shown.
-20.2 KB
Binary file not shown.
-20.6 KB
Binary file not shown.

0 commit comments

Comments
 (0)