|
@@ -665,7 +665,7 @@ var _utils = __webpack_require__(/*! @/utils */ 44);function _toConsumableArray(
|
|
|
//
|
|
|
var that;var backTop = function backTop() {__webpack_require__.e(/*! require.ensure | components/back-top/back-top */ "components/back-top/back-top").then((function () {return resolve(__webpack_require__(/*! @/components/back-top/back-top.vue */ 248));}).bind(null, __webpack_require__)).catch(__webpack_require__.oe);};var wmWatermark = function wmWatermark() {__webpack_require__.e(/*! require.ensure | components/wm-watermark/wm-watermark */ "components/wm-watermark/wm-watermark").then((function () {return resolve(__webpack_require__(/*! @/components/wm-watermark/wm-watermark.vue */ 168));}).bind(null, __webpack_require__)).catch(__webpack_require__.oe);};var _default = { components: { backTop: backTop, wmWatermark: wmWatermark }, filters: { filtersRichText: function filtersRichText(html) {//控制小程序中图片大小
|
|
|
var newContent = html.replace(/<img[^>]*>/gi, function (match, capture) {match = match.replace(/style="[^"]+"/gi, '').replace(/style='[^']+'/gi, '');match = match.replace(/width="[^"]+"/gi, '').replace(/width='[^']+'/gi, '');match = match.replace(/height="[^"]+"/gi, '').replace(/height='[^']+'/gi, '');return match;});newContent = newContent.replace(/style="[^"]+"/gi, function (match, capture) {match = match.replace(/width:[^;]+;/gi, 'max-width:100%;').replace(/width:[^;]+;/gi, 'max-width:100%;');return match;});newContent = newContent.replace(/<br[^>]*\/>/gi, '');newContent = newContent.replace(/\<img/gi, '<img style="max-width:100%;height:auto;display:inline-block;margin:10rpx auto;"');return newContent;} }, data: function data() {// 页面数据变量
|
|
|
- return { isOneRow: false, curHtml: '', backTop: { src: '../../static/back-top/top.png', scrollTop: 0 }, userInfo: {}, skeletonLoading: true, agentTypeList: ['', '自由经纪人', '渠道经纪人', '老业主'], propertyList: [{ estate_name: '在售项目1', pri_image: 'https://zdcdn.2bwin.cn/uploads/20220501/af6eb9c2a5d462be10a15c2302e5e6b5.jpg', sale_tag: '刚需好盘', rulesInfo: { des: '内容加载中1....', des_content: '内容加载中2....' } }], commonRulesShow: false, propertyPopupShow: false, currentPropertyIndex: 0, // init请求返回的数据
|
|
|
+ return { isOneRow: false, curHtml: '', backTop: { src: '../../static/back-top/top.png', scrollTop: 0 }, userInfo: {}, skeletonLoading: true, agentTypeList: ['', '自由经纪人', '渠道经纪人', '老业主'], propertyList: [{ estate_name: '在售项目1', pri_image: 'https://zdcdn.2bwin.cn/uploads/20220501/af6eb9c2a5d462be10a15c2302e5e6b5.jpg', sale_tag: '刚需好盘', rulesInfo: { des: '内容加载中1....', des_content: '内容加载中2....' } }], commonRulesShow: false, propertyPopupShow: false, currentPropertyIndex: 0, currentPropertyObj: {}, // init请求返回的数据
|
|
|
data: {}, // 表单请求数据
|
|
|
form1: {}, scrollTop: 0, reportStepCountObj: {}, areaTypeObj: {}, twoObj: {} };}, onPageScroll: function onPageScroll(e) {this.scrollTop = e.scrollTop;this.backTop.scrollTop = e.scrollTop;}, // 监听 - 页面每次【加载时】执行(如:前进)
|
|
|
onLoad: function onLoad() {// that = this;
|
|
@@ -673,7 +673,7 @@ var that;var backTop = function backTop() {__webpack_require__.e(/*! require.ens
|
|
|
// this.init(options);
|
|
|
var options = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};}, // 监听 - 页面【首次渲染完成时】执行。注意如果渲染速度快,会在页面进入动画完成前触发
|
|
|
onReady: function onReady() {}, // 监听 - 页面每次【显示时】执行(如:前进和返回) (页面每次出现在屏幕上都触发,包括从下级页面点返回露出当前页面)
|
|
|
- onShow: function onShow() {this.init(); // const dictObj = uni.getStorageSync('MD_dict')
|
|
|
+ onShow: function onShow() {this.init();this.checkUpdate(); // const dictObj = uni.getStorageSync('MD_dict')
|
|
|
// this.areaTypeObj = arrToObj(dictObj.area_type)
|
|
|
}, // 监听 - 页面每次【隐藏时】执行(如:返回)
|
|
|
onHide: function onHide() {}, // 监听 - 页面触底部
|
|
@@ -681,7 +681,8 @@ var that;var backTop = function backTop() {__webpack_require__.e(/*! require.ens
|
|
|
onResize: function onResize() {}, // 监听 - 点击右上角转发时
|
|
|
onShareAppMessage: function onShareAppMessage(options) {}, // 监听 - 页面创建时
|
|
|
created: function created() {}, // 函数
|
|
|
- methods: { oneImgHandle: function oneImgHandle(item) {uni.api.estate.apiestateinfodetail({ id: item.id }).then(function (res) {var curImgUrl = res.info_img || '';if (!curImgUrl) {uni.$msg('该楼盘暂未设置一页纸楼盘简介~');return;}uni.previewImage({ current: curImgUrl, urls: [curImgUrl] });});}, scanHandle: function scanHandle() {uni.scanCode({ success: function success(res) {uni.navigateTo({ url: "/pages/agent/recommend/detail2?id=".concat(res.result) });} });}, // 页面数据初始化函数
|
|
|
+ methods: { checkUpdate: function checkUpdate() {var updateManager = uni.getUpdateManager();updateManager.onUpdateReady(function (res) {uni.showModal({ title: '更新提示', content: '新版本已经准备好,是否重启应用?', success: function success(res) {if (res.confirm) {// 新的版本已经下载好,调用 applyUpdate 应用新版本并重启
|
|
|
+ updateManager.applyUpdate();}} });});}, oneImgHandle: function oneImgHandle(item) {uni.api.estate.apiestateinfodetail({ id: item.id }).then(function (res) {var curImgUrl = res.info_img || '';if (!curImgUrl) {uni.$msg('该楼盘暂未设置一页纸楼盘简介~');return;}uni.previewImage({ current: curImgUrl, urls: [curImgUrl] });});}, scanHandle: function scanHandle() {uni.scanCode({ success: function success(res) {uni.navigateTo({ url: "/pages/agent/recommend/detail2?id=".concat(res.result) });} });}, // 页面数据初始化函数
|
|
|
init: function init(options) {var _this = this;var userInfo2 = uni.getStorageSync('MD_userInfo2');this.userInfo = userInfo2 || {};uni.api.estate.apireportcount().then(function (res) {var reportStepCount = res.report_step_count || [];var reportStepCountObj = {};reportStepCount.forEach(function (item) {reportStepCountObj[item.report_step] = item.total || 0;});_this.reportStepCountObj = _objectSpread({}, reportStepCountObj);});uni.api.estate.apiestatelist({ page_size: 100 }).then(function (res) {var list = res.list || [];var dictObj = uni.getStorageSync('MD_dict');var areaTypeObj = (0, _utils.arrToObj)(dictObj.area_type);var twoObj = {};list.forEach(function (item) {if (twoObj[item.area_type]) {twoObj[item.area_type].list.push(item);} else {twoObj[item.area_type] = { list: [item], str: areaTypeObj[item.area_type] };}});_this.twoObj = _objectSpread({}, twoObj); // console.log(twoObj)
|
|
|
// let oneObj = list[0] || {}
|
|
|
_this.propertyList = _toConsumableArray(list); // this.propertyList = [list[0], list[1], list[2]]
|
|
@@ -772,7 +773,7 @@ var that;var backTop = function backTop() {__webpack_require__.e(/*! require.ens
|
|
|
// that.skeletonLoading = false;
|
|
|
// });
|
|
|
}, pageTo: function pageTo(path) {if (path === 'dev') {uni.$msg('开发中~');return;}uni.navigateTo({ url: path });}, // 弹窗展示项目佣金详情
|
|
|
- showDetail: function showDetail(index, item) {var _this2 = this;if (this.userInfo && this.userInfo.auth_state == 1) {this.currentPropertyIndex = index;this.propertyPopupShow = true;uni.api.estate.apiestatecontentdetail({ id: item.id }).then(function (res) {_this2.curHtml = res.content || '';});} else {uni.$msgConfirm('请点击首页右上角设置,进行实名认证,实名认证后可查看详细信息');}} }, // 监听器
|
|
|
+ showDetail: function showDetail(index, item) {var _this2 = this;if (this.userInfo && this.userInfo.auth_state == 1) {this.currentPropertyIndex = index;this.currentPropertyObj = item;this.propertyPopupShow = true;uni.api.estate.apiestatecontentdetail({ id: item.id }).then(function (res) {_this2.curHtml = res.content || '';});} else {uni.$msgConfirm('请点击首页右上角设置,进行实名认证,实名认证后可查看详细信息');}} }, // 监听器
|
|
|
watch: {}, // 计算属性
|
|
|
computed: {} };exports.default = _default;
|
|
|
/* WEBPACK VAR INJECTION */}.call(this, __webpack_require__(/*! ./node_modules/@dcloudio/uni-mp-weixin/dist/index.js */ 1)["default"]))
|