diff --git a/src/apis/ec_api.js b/src/apis/ec_api.js
index d880cb3..00b3265 100644
--- a/src/apis/ec_api.js
+++ b/src/apis/ec_api.js
@@ -84,15 +84,20 @@ export const ec_api_send_request = (req_data) => {
env: req_data.env,
member_type: req_data.type,
api: req_data.api,
+ cid: req_data.cid,
+ pid: req_data.pid,
params: req_data.params,
}
})
}
-export const ec_api_get_suggest = (api_type, api, options) => {
- let req_params = {
+export const ec_api_get_suggest = (api_type, api, env, cid, pid, options) => {
+ let req_params = {
member_type: api_type,
- api: api
+ api: api,
+ env: env,
+ cid: cid,
+ pid: pid,
}
console.log('ec_api_get_suggest -- options', options)
if (options) {
@@ -105,10 +110,13 @@ export const ec_api_get_suggest = (api_type, api, options) => {
})
}
-export const ec_api_get_suggest_timestamp = (api_type, api, options=null) => {
- let req_params = {
+export const ec_api_get_suggest_timestamp = (api_type, api, env, cid, pid, options = null) => {
+ let req_params = {
member_type: api_type,
- api: api
+ api: api,
+ env: env,
+ cid: cid,
+ pid: pid,
}
if (options !== null) {
req_params['options'] = options
@@ -128,7 +136,10 @@ export const ec_api_set_user_data = (req_data) => {
api: req_data.api,
member_type: req_data.member_type,
format: req_data.format,
- user_data: req_data.user_data
+ user_data: req_data.user_data,
+ env: req_data.env,
+ cid: req_data.cid,
+ pid: req_data.pid,
}
})
}
@@ -138,8 +149,11 @@ export const ec_api_clear_user_data = (req_data) => {
url: 'ec/clear_user_data',
method: 'post',
data: {
- api: req_data['api'],
- member_type: req_data['member_type'],
+ api: req_data.api,
+ member_type: req_data.member_type,
+ env: req_data.env,
+ cid: req_data.cid,
+ pid: req_data.pid,
}
})
}
diff --git a/src/components/ec_api/CinemaGoods.vue b/src/components/ec_api/CinemaGoods.vue
index b03015a..ccad5fb 100644
--- a/src/components/ec_api/CinemaGoods.vue
+++ b/src/components/ec_api/CinemaGoods.vue
@@ -6,7 +6,7 @@ import PackageSelector from "@/components/ec_api/PackageSelector.vue";
import GoodsDiscount from "@/components/ec_api/GoodsDiscount.vue";
// 接收TabArea组件传递的参数
-const props = defineProps(['goods', 'data'])
+const props = defineProps(['goods', 'data', 'base_info'])
// 定义用户选择的场次变量
const selectGoods = ref([])
@@ -35,7 +35,10 @@ async function handle_set_user_data() {
api: props.data.path,
member_type: props.data.type,
format: props.data.format,
- user_data: JSON.stringify(selectGoodsData)
+ user_data: JSON.stringify(selectGoodsData),
+ env: props.base_info.env,
+ cid: props.base_info.cinema,
+ pid: props.base_info.channel,
}
console.log('handle_set_user_data', req_data)
await ec_api_set_user_data(req_data).then(
@@ -59,6 +62,9 @@ async function handle_clear_user_data() {
const req_data = {
api: props.data.path,
member_type: props.data.type,
+ env: props.base_info.env,
+ cid: props.base_info.cinema,
+ pid: props.base_info.channel,
}
console.log('handle_clear_user_data', req_data)
await ec_api_clear_user_data(req_data).then(
diff --git a/src/components/ec_api/EcardLevel.vue b/src/components/ec_api/EcardLevel.vue
index c1d30aa..a6a0196 100644
--- a/src/components/ec_api/EcardLevel.vue
+++ b/src/components/ec_api/EcardLevel.vue
@@ -4,7 +4,7 @@ import {ec_api_set_user_data, ec_api_clear_user_data} from '@/apis/ec_api.js'
import {ElMessage} from "element-plus";
// 接收TabArea组件传递的参数
-const props = defineProps(['level', 'data'])
+const props = defineProps(['level', 'data', 'base_info'])
// 定义用户选择的场次变量
const selectLevel = ref('')
@@ -22,7 +22,10 @@ async function handle_set_user_data() {
api: props.data.path,
member_type: props.data.type,
format: props.data.format,
- user_data: JSON.stringify(selectLevelData)
+ user_data: JSON.stringify(selectLevelData),
+ env: props.base_info.env,
+ cid: props.base_info.cinema,
+ pid: props.base_info.channel,
}
console.log('handle_set_user_data', req_data)
await ec_api_set_user_data(req_data).then(
@@ -45,6 +48,9 @@ async function handle_clear_user_data() {
const req_data = {
api: props.data.path,
member_type: props.data.type,
+ env: props.base_info.env,
+ cid: props.base_info.cinema,
+ pid: props.base_info.channel,
}
console.log('handle_clear_user_data', req_data)
await ec_api_clear_user_data(req_data).then(
diff --git a/src/components/ec_api/MovieShow.vue b/src/components/ec_api/MovieShow.vue
index 6e95659..df6fad8 100644
--- a/src/components/ec_api/MovieShow.vue
+++ b/src/components/ec_api/MovieShow.vue
@@ -4,7 +4,7 @@ import {ec_api_set_user_data, ec_api_clear_user_data} from '@/apis/ec_api.js'
import {ElMessage} from "element-plus";
// 接收TabArea组件传递的参数
-const props = defineProps(['show', 'data'])
+const props = defineProps(['show', 'data', 'base_info'])
// 定义用户选择的场次变量
const selectShow = ref('')
@@ -22,7 +22,10 @@ async function handle_set_user_data() {
api: props.data.path,
member_type: props.data.type,
format: props.data.format,
- user_data: JSON.stringify(selectShowData)
+ user_data: JSON.stringify(selectShowData),
+ env: props.base_info.env,
+ cid: props.base_info.cinema,
+ pid: props.base_info.channel,
}
console.log('handle_set_user_data', req_data)
await ec_api_set_user_data(req_data).then(
@@ -45,6 +48,9 @@ async function handle_clear_user_data() {
const req_data = {
api: props.data.path,
member_type: props.data.type,
+ env: props.base_info.env,
+ cid: props.base_info.cinema,
+ pid: props.base_info.channel,
}
console.log('handle_clear_user_data', req_data)
await ec_api_clear_user_data(req_data).then(
diff --git a/src/components/ec_api/SeatStatus.vue b/src/components/ec_api/SeatStatus.vue
index d8da9cb..520dd2a 100644
--- a/src/components/ec_api/SeatStatus.vue
+++ b/src/components/ec_api/SeatStatus.vue
@@ -5,7 +5,7 @@ import {ElMessage} from "element-plus";
import TicketDiscount from "@/components/ec_api/TicketDiscount.vue";
// 接收TabArea组件传递的参数
-const props = defineProps(['seat', 'data'])
+const props = defineProps(['seat', 'data', 'base_info'])
// 定义用户选择的场次变量
const selectSeats = ref([])
@@ -32,7 +32,10 @@ async function handle_set_user_data() {
api: props.data.path,
member_type: props.data.type,
format: props.data.format,
- user_data: JSON.stringify(selectSeatData)
+ user_data: JSON.stringify(selectSeatData),
+ env: props.base_info.env,
+ cid: props.base_info.cinema,
+ pid: props.base_info.channel,
}
console.log('handle_set_user_data', req_data)
await ec_api_set_user_data(req_data).then(
@@ -64,6 +67,9 @@ async function handle_clear_user_data() {
const req_data = {
api: props.data.path,
member_type: props.data.type,
+ env: props.base_info.env,
+ cid: props.base_info.cinema,
+ pid: props.base_info.channel,
}
console.log('handle_clear_user_data', req_data)
await ec_api_clear_user_data(req_data).then(
diff --git a/src/components/ec_api/TabArea.vue b/src/components/ec_api/TabArea.vue
index c3a38ec..d07ccfe 100644
--- a/src/components/ec_api/TabArea.vue
+++ b/src/components/ec_api/TabArea.vue
@@ -191,6 +191,8 @@ function handle_request_data() {
data['env'] = UserApiData.value.base_info['env']
data['type'] = UserApiData.value.api[activeTab.value]['type']
data['api'] = UserApiData.value.api[activeTab.value]['path']
+ data['pid'] = UserApiData.value.base_info['channel']
+ data['cid'] = UserApiData.value.base_info['cinema']
data['params'] = JSON.stringify(req_data)
return data
}
@@ -253,7 +255,11 @@ async function get_suggest(options = {sale_type: saleType.value}) {
if (UserApiData.value.api[activeTab.value].reload === true) {
const api_type = UserApiData.value.api[activeTab.value].type
const api = UserApiData.value.api[activeTab.value].path
- await ec_api_get_suggest(api_type, api, options).then(
+ const env = UserApiData.value.base_info['env']
+ const cid = UserApiData.value.base_info['cinema']
+ const pid = UserApiData.value.base_info['channel']
+
+ await ec_api_get_suggest(api_type, api, env, cid, pid, options).then(
(res) => {
console.log('get_suggest', api, res)
let result = true
@@ -283,7 +289,10 @@ async function get_suggest(options = {sale_type: saleType.value}) {
async function get_timestamp() {
const api_type = UserApiData.value.api[activeTab.value].type
const api = UserApiData.value.api[activeTab.value].path
- await ec_api_get_suggest_timestamp(api_type, api).then(
+ const env = UserApiData.value.base_info['env']
+ const cid = UserApiData.value.base_info['cinema']
+ const pid = UserApiData.value.base_info['channel']
+ await ec_api_get_suggest_timestamp(api_type, api, env, cid, pid).then(
res => {
console.log('get_timestamp', res['timestamp'])
if (res['timestamp'] > UserApiData.value.api[activeTab.value].timestamp) {
@@ -650,10 +659,10 @@ const ace_options = {
-
-
-
-
+
+
+
+