Commit cd0da2fb by 胡悦

复制短链跳转问题

1 parent 095f643d
...@@ -42,7 +42,7 @@ Page({ ...@@ -42,7 +42,7 @@ Page({
} }
], ],
businessTypeList: [ businessTypeList: [
{ label: '延保', type: 0 }, { label: '延保/权益', type: 0 },
{ label: '精品', type: 1 } { label: '精品', type: 1 }
], ],
activeTab: -1, activeTab: -1,
......
...@@ -9,7 +9,21 @@ Component({ ...@@ -9,7 +9,21 @@ Component({
*/ */
properties: { properties: {
recordData: Object, recordData: Object,
batchId: Number, batchId: {
type: Number,
observer: function(n) {
console.log(n, '====123456')
thisPage = wx.$router.getPageInstance()
this.innerAudioContext = thisPage.qualityAudio
const data = {
batchId: n,
currentPage: 1,
pageSize: 999999,
};
this.findConversationDetailByBatchId(data)
this.findCbByBatchId(data)
}
},
autoPlayConfig: Object autoPlayConfig: Object
}, },
lifetimes: { lifetimes: {
......
// packageEquity/pages/receptionDetail/receptionDetail.js // packageEquity/pages/receptionDetail/receptionDetail.js
import reportPageTrackMixin from '~/mixins/reportPageTrackMixin' import reportPageTrackMixin from '~/mixins/reportPageTrackMixin'
import { getRecordDetailList } from "../../receptionRecordsApi"
Page({ Page({
behaviors: [reportPageTrackMixin], behaviors: [reportPageTrackMixin],
...@@ -25,13 +26,55 @@ Page({ ...@@ -25,13 +26,55 @@ Page({
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad(options) { async onLoad(options) {
console.log(options, 'onload')
// 若有参数,则是短链进入
if (Object.keys(options).length) {
// 调用接口获取详情,默认取第一条
const time = new Date(+options.receptionStartTime).format('yyyy-MM-dd')
console.log(time)
const params = {
batchId: options.batchId,
merchantNo: options.merchantNo,
startDateTime: time,
endDateTime: time
}
// this.setData({
// record: {batchId: options.batchId}
// })
const res = await getRecordDetailList(params)
let {
code,
data,
message
} = res
if (code == 0) {
const detailInfo = data.list[0] || {}
if (Object.keys(detailInfo).length) {
detailInfo.staticDate = new Date(detailInfo.staticDate).format('MM月dd日')
this.track_businessParam = {
batchId: detailInfo.batchId
} //埋点业务参数
let typeLists = [
"对话",
],
showViolationBtn = false,
autoPlayConfig = {}
this.setData({
record: detailInfo,
typeLists: typeLists,
showViolationBtn,
autoPlayConfig
}, () => {
this.setAudio()
})
}
}
}
}, },
back() { back() {
this.qualityAudio.pause() if (this.qualityAudio) this.qualityAudio.pause()
wx.$router.back() wx.$router.back()
}, },
onHandle(e) { onHandle(e) {
let { let {
...@@ -152,6 +195,7 @@ Page({ ...@@ -152,6 +195,7 @@ Page({
return `${minutes}:${remainingSeconds}`; return `${minutes}:${remainingSeconds}`;
}, },
onRoute(options) { onRoute(options) {
console.log(options, '===')
if (Object.keys(options).length) { if (Object.keys(options).length) {
options.staticDate = new Date(options.staticDate).format('MM月dd日') options.staticDate = new Date(options.staticDate).format('MM月dd日')
this.track_businessParam = { this.track_businessParam = {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!