feat(M08-A): 接入顾客端权益明细
This commit is contained in:
@@ -13,6 +13,7 @@ for (const page of [
|
||||
'pages/orders/list',
|
||||
'pages/orders/detail',
|
||||
'pages/profile/index',
|
||||
'pages/benefits/index',
|
||||
'pages/recharge/index'
|
||||
]) {
|
||||
assert.ok(appJson.pages.includes(page), `${page} must be registered`);
|
||||
@@ -25,6 +26,7 @@ assert.doesNotMatch(env, /localhost|127\.0\.0\.1|http:\/\//);
|
||||
const api = read('miniapp/utils/api.js');
|
||||
assert.match(api, /\/auth\/wechat-login/);
|
||||
assert.match(api, /authorization: `Bearer \$\{token\}`/);
|
||||
assert.match(api, /wx\.requestPayment/);
|
||||
|
||||
const index = read('miniapp/pages/index/index.js');
|
||||
assert.match(index, /\/stores\?\$\{query\}/);
|
||||
@@ -40,10 +42,12 @@ for (const route of [
|
||||
'/pricing/quote',
|
||||
'/orders/reserve',
|
||||
'/payments',
|
||||
'/pay/wechat/prepay',
|
||||
'/test-complete'
|
||||
]) {
|
||||
assert.match(room, new RegExp(route.replace('/', '\\/')));
|
||||
}
|
||||
assert.match(room, /requestWechatPayment/);
|
||||
|
||||
const orders = read('miniapp/pages/orders/list.js')
|
||||
+ read('miniapp/pages/orders/detail.js');
|
||||
@@ -73,6 +77,18 @@ for (const pattern of [
|
||||
assert.match(profile, new RegExp(pattern.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')));
|
||||
}
|
||||
|
||||
const benefits = read('miniapp/pages/benefits/index.js')
|
||||
+ read('miniapp/pages/benefits/index.wxml');
|
||||
for (const pattern of [
|
||||
'/profile/benefits',
|
||||
'coupons',
|
||||
'packages',
|
||||
'couponGrantId',
|
||||
'packageHoldingId'
|
||||
]) {
|
||||
assert.match(benefits, new RegExp(pattern.replace(/[.*+?^${}()|[\]\\]/g, '\\$&')));
|
||||
}
|
||||
|
||||
const recharge = read('miniapp/pages/recharge/index.js')
|
||||
+ read('miniapp/pages/recharge/index.wxml');
|
||||
for (const pattern of [
|
||||
|
||||
Reference in New Issue
Block a user