@@ -260,3 +260,10 @@ export function getJiaLouNewsList(params) {
|
||||
export function getShareHousekeeper(id) {
|
||||
return request.get('/travel/steward/poster/' + id, {login: true})
|
||||
}
|
||||
|
||||
/**
|
||||
* 管家详情
|
||||
*/
|
||||
export function getJiaLouStewardDetail(id) {
|
||||
return request.get('/travel/steward/' + id, {}, {login: true})
|
||||
}
|
||||
|
||||
@@ -839,6 +839,7 @@ export default {
|
||||
onLoad(options) {
|
||||
const id = options.id || ''
|
||||
this.id = id
|
||||
|
||||
if (id) {
|
||||
this.partnerId = options.partnerId || null
|
||||
} else {
|
||||
@@ -847,6 +848,7 @@ export default {
|
||||
const query = options ? decodeURIComponent(options.scene) : decodeURIComponent(obj.query.scene)
|
||||
this.partnerId = getUrlParam(query, 'partnerId') || null
|
||||
this.id = getUrlParam(query, 'id') || null
|
||||
|
||||
}
|
||||
}
|
||||
if (this.partnerId) cookie.set('spread', this.partnerId)
|
||||
|
||||
@@ -75,8 +75,9 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getShareHousekeeper } from '@/api/qianxian.js'
|
||||
import { getShareHousekeeper, getJiaLouStewardDetail } from '@/api/qianxian.js'
|
||||
import sharePopup from '@/components/sharePopup.vue'
|
||||
import {getUrlParam} from '@/utils/common.js'
|
||||
export default {
|
||||
name: 'HousekeeperDetail',
|
||||
components: {
|
||||
@@ -90,12 +91,33 @@ export default {
|
||||
},
|
||||
|
||||
onLoad(options) {
|
||||
this.record = JSON.parse(decodeURIComponent(options.obj))
|
||||
console.log(this.record);
|
||||
// this.record = JSON.parse(decodeURIComponent(options.obj))
|
||||
// console.log(this.record);
|
||||
const id = options.id || ''
|
||||
this.id = id
|
||||
|
||||
if (id) {
|
||||
// this.partnerId = options.partnerId || null
|
||||
} else {
|
||||
let obj = uni.getEnterOptionsSync()
|
||||
if (options.scene || obj.query.scene) {
|
||||
const query = options ? decodeURIComponent(options.scene + '') : decodeURIComponent(obj.query.scene)
|
||||
this.id = getUrlParam(query, 'id') || null
|
||||
}
|
||||
}
|
||||
this.getJiaLouStewardDetail()
|
||||
},
|
||||
|
||||
methods: {
|
||||
getJiaLouStewardDetail() {
|
||||
uni.showLoading()
|
||||
getJiaLouStewardDetail(this.id).then(res => {
|
||||
uni.hideLoading()
|
||||
if(res.status === 200) {
|
||||
this.record = res.data || {}
|
||||
}
|
||||
})
|
||||
},
|
||||
shareHousekeeper() {
|
||||
uni.showLoading()
|
||||
getShareHousekeeper(this.record.id).then(res => {
|
||||
|
||||
@@ -342,6 +342,7 @@ import {
|
||||
postJiaLouZan,
|
||||
postJiaLouShare
|
||||
} from '@/api/qianxian'
|
||||
import {getUrlParam} from '@/utils/common.js'
|
||||
import imgBox from '@/components/imageTypeSet/imagebox.vue'
|
||||
export default {
|
||||
components: {
|
||||
@@ -375,8 +376,20 @@ export default {
|
||||
onPageScroll(e) {
|
||||
this.scrollData = e
|
||||
},
|
||||
onLoad(opts) {
|
||||
this.id = opts.id
|
||||
onLoad(options) {
|
||||
const id = options.id || ''
|
||||
this.id = id
|
||||
|
||||
if (id) {
|
||||
// this.partnerId = options.partnerId || null
|
||||
} else {
|
||||
let obj = uni.getEnterOptionsSync()
|
||||
if (options.scene || obj.query.scene) {
|
||||
const query = options ? decodeURIComponent(options.scene + '') : decodeURIComponent(obj.query.scene)
|
||||
this.id = getUrlParam(query, 'id') || null
|
||||
|
||||
}
|
||||
}
|
||||
this.getFarmerData()
|
||||
},
|
||||
methods: {
|
||||
|
||||
@@ -355,6 +355,7 @@ import {
|
||||
getJiaLouStewardList,
|
||||
getJiaLouNewsList
|
||||
} from '@/api/qianxian'
|
||||
import {getUrlParam} from '@/utils/common.js'
|
||||
import imgBox from '@/components/imageTypeSet/imagebox.vue'
|
||||
export default {
|
||||
components: {
|
||||
@@ -397,8 +398,20 @@ export default {
|
||||
onPageScroll(e) {
|
||||
this.scrollData = e
|
||||
},
|
||||
onLoad(opts) {
|
||||
this.id = opts.id
|
||||
onLoad(options) {
|
||||
const id = options.id || ''
|
||||
this.id = id
|
||||
|
||||
if (id) {
|
||||
// this.partnerId = options.partnerId || null
|
||||
} else {
|
||||
let obj = uni.getEnterOptionsSync()
|
||||
if (options.scene || obj.query.scene) {
|
||||
const query = options ? decodeURIComponent(options.scene + '') : decodeURIComponent(obj.query.scene)
|
||||
this.id = getUrlParam(query, 'id') || null
|
||||
|
||||
}
|
||||
}
|
||||
this.getFarmerData()
|
||||
},
|
||||
watch: {
|
||||
@@ -432,7 +445,7 @@ export default {
|
||||
// 跳转管家详情
|
||||
goHousekeeperDetail(item) {
|
||||
uni.navigateTo({
|
||||
url: '/pkg_product/views/housekeeperDetail?obj=' +JSON.stringify(item)
|
||||
url: '/pkg_product/views/housekeeperDetail?id=' + item.id
|
||||
})
|
||||
},
|
||||
getJiaLouStewardList() {
|
||||
|
||||
@@ -73,8 +73,10 @@ module.exports = {
|
||||
},
|
||||
|
||||
getUrlParam(url, name) {
|
||||
url = decodeURIComponent(url)
|
||||
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
|
||||
var r = url.match(reg);
|
||||
console.log(r);
|
||||
if (r != null) return (r[2]);
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user