Skip to content

Commit ad300cc

Browse files
committed
mall + pay:
1、调整微信支付,修复 v2 传递的时间不正确 2、调整 mp js ticket 接口到 system 模块
1 parent f8044e6 commit ad300cc

File tree

2 files changed

+61
-75
lines changed

2 files changed

+61
-75
lines changed

src/views/mall/promotion/seckill/seckillActivity/index.vue

Lines changed: 51 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
</el-form-item>
1818
<el-form-item label="参与场次" prop="timeId">
1919
<el-select v-model="queryParams.timeId" placeholder="请选择参与场次" clearable size="small">
20-
<el-option v-for="item in SeckillConfigList" :key="item.id" :label="item.name" :value="item.id"/>
20+
<el-option v-for="item in seckillTimeList" :key="item.id" :label="item.name" :value="item.id" />
2121
</el-select>
2222
</el-form-item>
2323
<el-form-item label="创建时间" prop="createTime">
@@ -38,9 +38,8 @@
3838
v-hasPermi="['promotion:seckill-activity:create']">新增秒杀活动</el-button>
3939
</el-col>
4040
<el-col :span="1.5">
41-
<el-button v-hasPermi="['promotion:seckill-activity:create']" icon="el-icon-menu" plain size="mini" type="primary"
42-
@click="openSeckillConfig">管理参与场次
43-
</el-button>
41+
<el-button type="primary" plain icon="el-icon-menu" size="mini" @click="openSeckillTime"
42+
v-hasPermi="['promotion:seckill-activity:create']">管理参与场次</el-button>
4443
</el-col>
4544
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
4645
</el-row>
@@ -55,8 +54,8 @@
5554
</el-table-column>
5655
<el-table-column label="参与场次" prop="timeIds" width="250">
5756
<template v-slot="scope">
58-
<span v-for="item in SeckillConfigList" v-if="scope.row.timeIds.includes(item.id)"
59-
:key="item.id">
57+
<span v-for="item in seckillTimeList" :key="item.id"
58+
v-if="scope.row.timeIds.includes(item.id)">
6059
<el-tag style="margin:4px;" size="small">{{ item.name }}</el-tag>
6160
</span>
6261
</template>
@@ -111,13 +110,12 @@
111110
<el-form-item label="场次选择">
112111
<el-select v-model="form.timeIds" placeholder="请选择参与场次" clearable size="small" multiple filterable
113112
style="width: 880px">
114-
<el-option v-for="item in SeckillConfigList" :key="item.id" :label="item.name" :value="item.id">
115-
<span style="float: left">{{ item.name + ': { ' }} {{ item.startTime }} -- {{
116-
item.endTime +
117-
' }'
118-
}}</span>
119-
<span style="float: right; color: #8492a6; font-size: 13px"></span>
120-
</el-option>
113+
<el-option v-for="item in seckillTimeList" :key="item.id" :label="item.name" :value="item.id">
114+
<span style="float: left">{{ item.name + ': { ' }} {{ item.startTime }} -- {{ item.endTime +
115+
' }'
116+
}}</span>
117+
<span style="float: right; color: #8492a6; font-size: 13px"></span>
118+
</el-option>
121119
</el-select>
122120
</el-form-item>
123121
<el-form-item label="商品选择">
@@ -188,44 +186,37 @@
188186
</template>
189187

190188
<script>
191-
import {getSkuOptionList} from "@/api/mall/product/sku";
192-
import {
193-
closeSeckillActivity,
194-
createSeckillActivity,
195-
deleteSeckillActivity,
196-
getSeckillActivity,
197-
getSeckillActivityPage,
198-
updateSeckillActivity
199-
} from "@/api/mall/promotion/seckillActivity";
200-
import {getSeckillConfigList} from "@/api/mall/promotion/SeckillConfig";
201-
import {deepClone} from "@/utils";
189+
import { getSkuOptionList } from "@/api/mall/product/sku";
190+
import { createSeckillActivity, updateSeckillActivity, closeSeckillActivity, deleteSeckillActivity, getSeckillActivity, getSeckillActivityPage, exportSeckillActivityExcel } from "@/api/mall/promotion/seckillActivity";
191+
import { getSeckillTimeList } from "@/api/mall/promotion/seckillTime";
192+
import { deepClone } from "@/utils";
202193
203194
export default {
204195
name: "PromotionSeckillActivity",
205196
components: {
206197
},
207198
data() {
208199
return {
209-
// 遮罩层
210-
loading: true,
211-
// 显示搜索条件
212-
showSearch: true,
213-
// 总条数
214-
total: 0,
215-
// 秒杀活动列表
216-
list: [],
217-
// 秒杀场次列表
218-
SeckillConfigList: [],
219-
// 弹出层标题
220-
title: "",
221-
// 是否显示弹出层
222-
open: false,
223-
// 查询参数
224-
queryParams: {
225-
pageNo: 1,
226-
pageSize: 10,
227-
name: null,
228-
status: null,
200+
// 遮罩层
201+
loading: true,
202+
// 显示搜索条件
203+
showSearch: true,
204+
// 总条数
205+
total: 0,
206+
// 秒杀活动列表
207+
list: [],
208+
// 秒杀场次列表
209+
seckillTimeList: [],
210+
// 弹出层标题
211+
title: "",
212+
// 是否显示弹出层
213+
open: false,
214+
// 查询参数
215+
queryParams: {
216+
pageNo: 1,
217+
pageSize: 10,
218+
name: null,
219+
status: null,
229220
timeId: null,
230221
createTime: [],
231222
},
@@ -270,18 +261,18 @@ export default {
270261
this.total = response.data.total;
271262
this.loading = false;
272263
});
273-
if (timeId) {
274-
//查询完成后设置为空
275-
this.$route.params.timeId = undefined
276-
}
277-
// 获得 SKU 商品列表
278-
getSkuOptionList().then(response => {
279-
this.productSkus = response.data;
280-
});
281-
// 获取参与场次列表
282-
getSeckillConfigList().then(response => {
283-
this.SeckillConfigList = response.data;
284-
});
264+
if (timeId) {
265+
//查询完成后设置为空
266+
this.$route.params.timeId = undefined
267+
}
268+
// 获得 SKU 商品列表
269+
getSkuOptionList().then(response => {
270+
this.productSkus = response.data;
271+
});
272+
// 获取参与场次列表
273+
getSeckillTimeList().then(response => {
274+
this.seckillTimeList = response.data;
275+
});
285276
},
286277
/** 取消按钮 */
287278
cancel() {
@@ -315,10 +306,10 @@ export default {
315306
this.resetForm("queryForm");
316307
this.handleQuery();
317308
},
318-
/**打开秒杀场次管理页面 */
319-
openSeckillConfig() {
320-
this.$tab.openPage("秒杀场次管理", "/promotion/seckill-time");
321-
},
309+
/**打开秒杀场次管理页面 */
310+
openSeckillTime() {
311+
this.$tab.openPage("秒杀场次管理", "/promotion/seckill-time");
312+
},
322313
/** 新增按钮操作 */
323314
handleAdd() {
324315
this.reset();

src/views/mall/promotion/seckill/seckillTime/index.vue

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -63,19 +63,14 @@
6363
</template>
6464

6565
<script>
66-
import {
67-
createSeckillConfig,
68-
deleteSeckillConfig,
69-
getSeckillConfig,
70-
getSeckillConfigList,
71-
updateSeckillConfig
72-
} from "@/api/mall/promotion/SeckillConfig";
66+
import { createSeckillTime, updateSeckillTime, deleteSeckillTime, getSeckillTime, getSeckillTimePage, exportSeckillTimeExcel, getSeckillTimeList } from "@/api/mall/promotion/seckillTime";
7367
import router from "@/router";
74-
import {deepClone} from "@/utils";
68+
import { deepClone } from "@/utils";
7569
7670
export default {
77-
name: "PromotionSeckillConfig",
78-
components: {},
71+
name: "PromotionSeckillTime",
72+
components: {
73+
},
7974
data() {
8075
return {
8176
// 遮罩层
@@ -109,7 +104,7 @@ export default {
109104
getList() {
110105
this.loading = true;
111106
// 执行查询
112-
getSeckillConfigList().then(response => {
107+
getSeckillTimeList().then(response => {
113108
this.list = response.data;
114109
this.loading = false;
115110
});
@@ -153,7 +148,7 @@ export default {
153148
handleUpdate(row) {
154149
this.reset();
155150
const id = row.id;
156-
getSeckillConfig(id).then(response => {
151+
getSeckillTime(id).then(response => {
157152
response.data.startAndEndTime = [response.data.startTime, response.data.endTime]
158153
this.form = response.data;
159154
this.open = true;
@@ -173,15 +168,15 @@ export default {
173168
data.endTime = this.form.startAndEndTime[1];
174169
// 修改的提交
175170
if (this.form.id != null) {
176-
updateSeckillConfig(data).then(response => {
171+
updateSeckillTime(data).then(response => {
177172
this.$modal.msgSuccess("修改成功");
178173
this.open = false;
179174
this.getList();
180175
});
181176
return;
182177
}
183178
// 添加的提交
184-
createSeckillConfig(data).then(response => {
179+
createSeckillTime(data).then(response => {
185180
this.$modal.msgSuccess("新增成功");
186181
this.open = false;
187182
this.getList();
@@ -192,7 +187,7 @@ export default {
192187
handleDelete(row) {
193188
const id = row.id;
194189
this.$modal.confirm('是否确认删除秒杀时段编号为"' + id + '"的数据项?').then(function () {
195-
return deleteSeckillConfig(id);
190+
return deleteSeckillTime(id);
196191
}).then(() => {
197192
this.getList();
198193
this.$modal.msgSuccess("删除成功");

0 commit comments

Comments
 (0)