Fix:旅居分享问题

This commit is contained in:
linxi
2025-12-10 18:23:12 +08:00
parent eaa36dcf44
commit 1f4ea5c0c8
6 changed files with 67 additions and 8 deletions
+25 -3
View File
@@ -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 => {