diff --git a/common/css/page.css b/common/css/page.css index 9fbf1174..8925d214 100644 --- a/common/css/page.css +++ b/common/css/page.css @@ -327,10 +327,7 @@ button:before { * 页面底部浮动、增加底部边距 */ .page-bottom-fixed { - padding-bottom: calc(172rpx + env(safe-area-inset-bottom) - 40rpx) !important; - /* #ifdef H5 */ padding-bottom: 172rpx !important; - /* #endif */ } /** diff --git a/pages.json b/pages.json index 457ee481..eb5119dc 100644 --- a/pages.json +++ b/pages.json @@ -546,6 +546,20 @@ "enablePullDownRefresh": true, "navigationBarTitleText": "推广订单" } + }, + { + "path": "visit-list/visit-list", + "style": { + "enablePullDownRefresh": true, + "navigationBarTitleText": "拜访客户" + } + }, + { + "path": "visit-form/visit-form", + "style": { + "enablePullDownRefresh": true, + "navigationBarTitleText": "新增拜访客户" + } } ] }, diff --git a/pages/common/open-setting-location/open-setting-location.vue b/pages/common/open-setting-location/open-setting-location.vue index 7a975890..4ebc6e72 100644 --- a/pages/common/open-setting-location/open-setting-location.vue +++ b/pages/common/open-setting-location/open-setting-location.vue @@ -84,23 +84,42 @@ export default { }, // 打开位置服务 - choose_location() { + choose_location() { + // app先返回当前页面再调用位置选择组件 + // #ifdef APP + uni.navigateBack(); + // #endif + + // 调用位置选择组件 uni.chooseLocation({ - success: (res) => { - uni.setStorageSync(this.cache_key, res); + success: (res) => { + // 位置数据存储缓存中 + uni.setStorageSync(this.cache_key, res); + + // 触发自定义事件并传递参数给上一页 + uni.$emit('refresh', { location_success: true }); + + // app则不执行返回操作、上面已经返回过了 + // #ifndef APP setTimeout(function () { uni.navigateBack(); - }, 500); + }, 500); + // #endif }, - fail: (res) => { - // 取消则自动返回、则显示错误 - if (res.errMsg.indexOf("cancel") != -1) { - uni.navigateBack(); - } else { - this.setData({ error_msg: res.errMsg }); - app.globalData.showToast(res.errMsg); + fail: (res) => { + // 取消则自动返回、则显示错误 + // error=11 支付宝取消、msg包含cancel则其他平台 + var msg = res.errorMessage || res.chooseLocation || res.errMsg || '位置选择失败'; + if(res.error == 11 || msg.indexOf('cancel') != -1) { + // app则不执行返回操作、上面已经返回过了 + // #ifndef APP + uni.navigateBack(); + // #endif + } else { + this.setData({ error_msg: res.errMsg }); + app.globalData.showToast(res.errMsg); } - }, + } }); }, }, diff --git a/pages/extraction-address/extraction-address.vue b/pages/extraction-address/extraction-address.vue index 52ccfa3a..2a421f46 100644 --- a/pages/extraction-address/extraction-address.vue +++ b/pages/extraction-address/extraction-address.vue @@ -98,7 +98,17 @@ export default { if (this.home_extraction_address_position == 1) { // 首次不请求数据 if (this.is_first == 0) { - this.user_location_init(); + // 先解绑自定义事件 + uni.$off('refresh'); + // 监听自定义事件并进行页面刷新操作 +     uni.$on('refresh', (data) => { + // 初始位置数据 +         if((data.location_success || false) == true) { + this.user_location_init(); +         } +     }); + + // 初始化数据 this.init(); } } else { diff --git a/pages/plugins/ask/detail/detail.vue b/pages/plugins/ask/detail/detail.vue index ffe27fa5..fc01fc65 100644 --- a/pages/plugins/ask/detail/detail.vue +++ b/pages/plugins/ask/detail/detail.vue @@ -4,7 +4,7 @@ - {{ info.title }} + {{ info.title }} 留言时间: {{ info.add_time_date }} · @@ -93,7 +93,7 @@ logo_square: app.globalData.get_application_logo_square(), data_list_loding_status: 1, data_bottom_line_status: true, - data: null, + info: null, data_base: null, emoji_list: [], // 基础配置 @@ -181,8 +181,8 @@ goods_is_loading: 0, }); - // 基础自定义分享 if(info != null) { + // 基础自定义分享 this.setData({ share_info: { title: info.title, @@ -191,6 +191,9 @@ query: 'id=' + info.id } }); + + // 标题 + uni.setNavigationBarTitle({ title: info.title || info.content }); } } else { this.setData({ diff --git a/pages/plugins/ask/index/index.css b/pages/plugins/ask/index/index.css index 7efed02c..a32bacbc 100644 --- a/pages/plugins/ask/index/index.css +++ b/pages/plugins/ask/index/index.css @@ -4,9 +4,9 @@ } .scroll-box { - height: calc(100vh - 194rpx - var(--status-bar-height) - 5px); + height: calc(100vh - 174rpx - var(--status-bar-height)); /* #ifdef H5 */ - height: calc(100vh - 170rpx); + height: calc(100vh - 174rpx); /* #endif */ } diff --git a/pages/plugins/ask/index/index.vue b/pages/plugins/ask/index/index.vue index 99ec8e92..3f2092c9 100644 --- a/pages/plugins/ask/index/index.vue +++ b/pages/plugins/ask/index/index.vue @@ -1,8 +1,8 @@