完成全部会员接口

main
RogerWork 4 weeks ago
parent e0d6c2c19c
commit 56b2eabb24
  1. 38
      src/components/ec_api/TabArea.vue

@ -74,7 +74,8 @@ const priceType = ref({
goods_quan_num: 0,
goods_quan_value: "0.00",
goods_quan_type: "兑换券",
}
},
card_num: null,
})
//
@ -292,6 +293,16 @@ async function get_suggest(options = {sale_type: saleType.value, pay_type: payTy
const cid = UserApiData.value.base_info['cinema']
const pid = UserApiData.value.base_info['channel']
if (api_type === 'member') {
UserApiData.value.api[activeTab.value]['params'].forEach(p => {
if (p['param'] === 'card') {
const reg = /^\d*?$/
const result = reg.test(p['value'])
console.log('正则结果', result)
if (result) {
priceType.value['card_num'] = p['value']
}
}
})
options['pay_type'] = JSON.stringify(priceType.value)
console.log('options.pay_type', options.pay_type)
console.log('priceType.value', priceType.value)
@ -331,6 +342,21 @@ async function get_timestamp(options = {sale_type: saleType.value, pay_type: pay
const env = UserApiData.value.base_info['env']
const cid = UserApiData.value.base_info['cinema']
const pid = UserApiData.value.base_info['channel']
if (api_type === 'member') {
UserApiData.value.api[activeTab.value]['params'].forEach(p => {
if (p['param'] === 'card') {
const reg = /^\d*?$/
const result = reg.test(p['value'])
console.log('正则结果', result)
if (result) {
priceType.value['card_num'] = p['value']
}
}
})
options['pay_type'] = JSON.stringify(priceType.value)
console.log('options.pay_type', options.pay_type)
console.log('priceType.value', priceType.value)
}
await ec_api_get_suggest_timestamp(api_type, api, env, cid, pid, options).then(
res => {
console.log('get_timestamp', res['timestamp'])
@ -463,7 +489,7 @@ function setup_sale_type() {
console.log('saleType.value', saleType.value)
if (UserApiData.value.api[activeTab.value].path === "order/buy-goods")
console.log('UserApiData.value.api[activeTab.value].path === "order/buy-goods"')
saleType.value = 'goods'
saleType.value = 'goods'
}
function get_sale_type_member(sale_type) {
@ -818,10 +844,12 @@ const ace_options = {
:base_info="UserApiData.base_info"/>
<CinemaGoods v-if="goodsList.length > 0" :goods="goodsList" :data="UserApiData.api[activeTab]"
:base_info="UserApiData.base_info"/>
<EcardLevel v-if="levelList.length > 0 && api['path'] === 'ecard/ecard-levels'" :level="levelList" :data="UserApiData.api[activeTab]"
:base_info="UserApiData.base_info"/>
<CardLevel v-if="levelList.length > 0 && api['path'] === 'cinema/card-level-rule'" :level="levelList" :data="UserApiData.api[activeTab]"
<EcardLevel v-if="levelList.length > 0 && api['path'] === 'ecard/ecard-levels'" :level="levelList"
:data="UserApiData.api[activeTab]"
:base_info="UserApiData.base_info"/>
<CardLevel v-if="levelList.length > 0 && api['path'] === 'cinema/card-level-rule'" :level="levelList"
:data="UserApiData.api[activeTab]"
:base_info="UserApiData.base_info"/>
</el-tab-pane>
</el-tabs>
<el-backtop :right="300" :bottom="100" :visibility-height="100"/>

Loading…
Cancel
Save