Commit 3ac38113 authored by 任国军's avatar 任国军

add paySign

parent 26742971
Pipeline #24468 passed with stage
in 4 seconds
...@@ -406,14 +406,15 @@ class UserService extends Service { ...@@ -406,14 +406,15 @@ class UserService extends Service {
const appId = await this.service.course.v5.wechat.getAppId(); const appId = await this.service.course.v5.wechat.getAppId();
const timeStamp = moment().unix(); const timeStamp = moment().unix();
const arr = [ `appId=${appId}`, `timeStamp=${timeStamp}`, `nonceStr=${response.nonce_str[0]}`, `package=prepay_id=${response.prepay_id[0]}` ]; const arr = [ `appId=${appId}`, `timeStamp=${timeStamp}`, `nonceStr=${response.nonce_str[0]}`, `package=prepay_id=${response.prepay_id[0]}` ];
const signType = await this.service.course.v5.wechat.sign(arr); const paySign = await this.service.course.v5.wechat.sign(arr);
const ret = { const ret = {
appId, appId,
timeStamp, timeStamp,
nonceStr: response.nonce_str[0], nonceStr: response.nonce_str[0],
package: `prepay_id=${response.prepay_id[0]}`, package: `prepay_id=${response.prepay_id[0]}`,
signType, signType: 'MD5',
paySign,
}; };
return ret; return ret;
...@@ -423,7 +424,9 @@ class UserService extends Service { ...@@ -423,7 +424,9 @@ class UserService extends Service {
// 我的订单列表 // 我的订单列表
async getUserOrderList() { async getUserOrderList() {
const { ctx } = this; const { ctx } = this;
const userUuid = ctx.userUuid;
const orderList = await ctx.classModel.V5.findAll({ where: { user_uuid: userUuid, status: 1, is_deleted: 0 } });
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment