Merge branch 'dev' of gitee.com:zongzhige/shopxo-uniapp into dev-sws

master
sws 2024-09-28 13:58:26 +08:00
commit 2fecf2b5ac
21 changed files with 344 additions and 223 deletions

40
App.vue
View File

@ -108,7 +108,7 @@
is_home_logo_use_text: 0,
// 0, 1logo
is_home_location_choice: 0,
is_home_location_choice: 1,
// 0, 1
is_realstore_top_nav_back: 1,
@ -1642,9 +1642,18 @@
// web
this.open_web_view(value, is_redirect);
} else if (value.substr(0, 8) == 'appid://') {
//
// appid|/pages/index/index?pv=hello|extraData|envVersion
var values = value.substr(8).split('|');
uni.navigateToMiniProgram({
appId: value.substr(8),
appId: values[0],
path: values[1] || '',
extraData: values[2] || '',
envVersion: values[3] || 'release'
});
} else if (value.substr(0, 12) == 'shortlink://') {
//
uni.navigateToMiniProgram({
shortLink: value.substr(12)
});
} else if (value.substr(0, 6) == 'map://') {
// ||lng|lat
@ -2583,6 +2592,10 @@
//
scan_handle() {
// #ifdef H5
this.showToast(i18n.t('common.not_supported_scan_tips'));
// #endif
// #ifndef H5
var self = this;
uni.scanCode({
success: function (res) {
@ -2653,6 +2666,7 @@
}
},
});
// #endif
},
//
@ -2662,6 +2676,15 @@
//
choose_user_location_event() {
//
var key = this.data.cache_userlocation_key;
var result = uni.getStorageSync(key) || null;
if(result != null) {
result['status'] = 2;
uni.setStorageSync(key, result);
}
//
uni.navigateTo({
url: '/pages/common/open-setting-location/open-setting-location',
});
@ -2674,6 +2697,7 @@
//
choice_user_location_init() {
// status 0123
var result = uni.getStorageSync(this.data.cache_userlocation_key) || null;
var user_location = { status: 0 };
if (result != null) {
@ -2684,11 +2708,17 @@
address: result.address || null,
lat: result.latitude || null,
lng: result.longitude || null,
status: 1,
status: result.status || 1,
},
};
}
user_location['text'] = user_location.status == 0 ? i18n.t('shopxo-uniapp.app.4v6q86') : (user_location.name || user_location.address || '');
//
var default_name = i18n.t('shopxo-uniapp.app.4v6q86');
//
if(user_location.status == 3 && user_location.name != default_name) {
user_location.status = 1;
}
user_location['text'] = user_location.name || user_location.address || default_name;
return user_location;
},

View File

@ -72,7 +72,7 @@ uni-page-head {
.uni-page-head-btn {
position: fixed;
left: auto;
bottom: 140rpx;
bottom: 180rpx;
background: rgba(0, 0, 0, 0.6);
box-shadow: 0 0 20rpx rgb(0 0 0 / 30%);
margin: 0 0 0 20rpx;

View File

@ -0,0 +1,94 @@
<template>
<view :class="theme_view">
<view v-if="propIsShowAddressChoice" class="choice-location padding-right-xxxl pr" @tap="choose_user_location">
<view class="dis-inline-block va-m lh">
<iconfont name="icon-location" :size="propIconLocationSize" propClass="lh" :color="propIconLocationColor"></iconfont>
</view>
<view class="va-m dis-inline-block margin-left-xs text-size-md single-text text" :style="'max-width:'+propTextMaxWidth+';'">{{ location.text || '' }}</view>
<view class="va-m lh dis-inline-block margin-left-xs">
<iconfont name="icon-arrow-bottom" :size="propIconArrowSize" propClass="lh-xs" :color="propIconArrowColor"></iconfont>
</view>
</view>
</view>
</template>
<script>
const app = getApp();
export default {
data() {
return {
theme_view: app.globalData.get_theme_value_view(),
location: {},
cloice_location_timer: null
};
},
props: {
propIsShowAddressChoice: {
type: Boolean,
default: true,
},
propTextMaxWidth: {
type: String,
default: '100%',
},
propIconLocationColor: {
type: String,
default: '#fff',
},
propIconLocationSize: {
type: String,
default: '32rpx',
},
propIconArrowColor: {
type: String,
default: '#fff',
},
propIconArrowSize: {
type: String,
default: '24rpx',
},
},
//
created: function () {
this.init();
},
methods: {
//
init() {
this.setData({
location: app.globalData.choice_user_location_init()
});
},
//
choose_user_location(e) {
//
clearInterval(this.cloice_location_timer);
var self = this;
var timer = setInterval(function () {
var result = app.globalData.choice_user_location_init() || null;
if(result != null && (result.status == 1 || result.status == 3)) {
self.setData({
location: result
});
clearInterval(self.cloice_location_timer);
//
self.$emit('onback', result);
}
}, 1000);
this.setData({
cloice_location_timer: timer
});
//
app.globalData.choose_user_location_event();
}
}
};
</script>
<style scoped>
.choice-location {
height: 56rpx;
line-height: 56rpx;
}
</style>

View File

@ -67,7 +67,7 @@
//
footer_height_value_event(value) {
this.setData({
footer_height_value: (value*2)+40
footer_height_value: (value*2)+20
});
this.$emit('footer-height', value);

View File

@ -2,7 +2,7 @@
<scroll-view :scroll-y="true" class="ht" @scroll="on_scroll_event">
<!-- 头部小程序兼容 -->
<view class="pr header">
<componentDiyHeader v-if="hackReset" :propValue="header_data.com_data"></componentDiyHeader>
<componentDiyHeader v-if="hack_reset" :propValue="header_data.com_data"></componentDiyHeader>
</view>
<view class="content flex-col" :style="'padding-top:' + temp_is_header_top ? temp_header_top : '0'">
<view v-for="(item, index) in tabs_data" :key="item.key">
@ -39,26 +39,34 @@
<componentDiyAuxiliaryBlank v-else-if="item.key == 'auxiliary-blank'" :propValue="item.com_data"></componentDiyAuxiliaryBlank>
</view>
</template>
<!-- diy底部卡槽 -->
<slot name="diy-bottom"></slot>
</template>
<template v-else>
<!-- goods九宫格数据 -->
<!-- 列表 -->
<!-- 商品九宫格列表 -->
<scroll-view :scroll-y="true" class="scroll-box" @scrolltolower="scroll_lower" lower-threshold="60">
<view v-if="goods_list.length > 0" class="padding-horizontal-main padding-top-main oh">
<component-goods-list :propData="{ style_type: goods_show_type_value, goods_list: goods_list, random: random_value }" :propLabel="plugins_label_data" :propCurrencySymbol="currency_symbol" :propIsCartParaCurve="true"></component-goods-list>
</view>
<view v-else>
<template v-else>
<!-- 提示信息 -->
<component-no-data :propStatus="goods_list_loding_status" :propMsg="goods_list_loding_msg"></component-no-data>
</view>
</template>
<!-- 结尾 -->
<component-bottom-line :propStatus="goods_bottom_line_status"></component-bottom-line>
</scroll-view>
</template>
</view>
<view v-if="is_show_footer == 1" class="footer">
<componentDiyFooter v-if="hackReset" :propValue="footer_data.com_data"></componentDiyFooter>
</view>
<!-- 当前diy页面底部菜单非公共底部菜单 -->
<block v-if="is_show_footer == 1">
<componentDiyFooter v-if="hack_reset" :propValue="footer_data.com_data" @footer-height="footer_height_value_event"></componentDiyFooter>
<view v-if="footer_height_value > 0" :style="'height:'+footer_height_value+'rpx;'"></view>
</block>
<!-- 底部卡槽 -->
<slot name="bottom"></slot>
</scroll-view>
</template>
@ -107,7 +115,7 @@
propDataId: {
type: [String, Number],
default: '',
},
}
},
components: {
componentDiyHeader,
@ -194,7 +202,10 @@
data_is_loading: 0,
// key
cache_key: app.globalData.data.cache_diy_data_key,
hackReset: false,
//
hack_reset: false,
//
footer_height_value: 0,
};
},
created() {
@ -209,7 +220,7 @@
init_config(status) {
if ((status || false) == true) {
// diy
var is_show_footer = this.propValue.header.com_data.content.bottom_navigation_show;
var is_show_footer = parseInt(this.propValue.header.com_data.content.bottom_navigation_show || 0) == 1;
var is_tabbar = app.globalData.is_tabbar_pages();
this.setData({
is_show_footer: is_show_footer && !is_tabbar,
@ -223,7 +234,7 @@
init() {
// tabs
this.setData({
hackReset: true,
hack_reset: true,
header_data: this.propValue.header,
footer_data: this.propValue.footer,
diy_data: this.propValue.diy_data,
@ -242,7 +253,7 @@
this.setData({
is_tabs_type: bool,
});
const new_params = {
let new_params = {
...params,
id: tabs_id,
};
@ -265,7 +276,7 @@
dataType: 'json',
success: (res) => {
//
const data = res.data.data.data;
let data = res.data.data.data;
if (res.data.code == 0) {
new_data = data?.config.diy_data || [];
uni.setStorageSync(this.cache_key + tabs_id, new_data);
@ -329,7 +340,7 @@
title: this.$t('common.loading_in_text'),
});
}
const new_data = {
let new_data = {
category_id: this.tabs_id,
page: this.goods_page,
};
@ -407,6 +418,8 @@
},
});
},
//
on_scroll_event(e) {
this.setData({
scroll_top: e.detail.scrollTop,
@ -430,6 +443,13 @@
}
// #endif
},
//
footer_height_value_event(value) {
this.setData({
footer_height_value: (value*2)+20
});
}
},
};
</script>

View File

@ -63,7 +63,8 @@
"service_time": "service time ",
"apply_time": "Application time",
"verification_text": "Verification code",
"verification_message": "Please enter the verification code"
"verification_message": "Please enter the verification code",
"not_supported_scan_tips": "H5 webpage does not support scanning codes"
},
"pages": {
"goods-category": "Product classification",

View File

@ -63,7 +63,8 @@
"service_time": "服务时间",
"apply_time": "申请时间",
"verification_text": "核销码",
"verification_message": "请输入核销码"
"verification_message": "请输入核销码",
"not_supported_scan_tips": "H5网页不支持扫码"
},
"pages": {
"goods-category": "商品分类",

15
node_modules/.package-lock.json generated vendored
View File

@ -1,12 +1,7 @@
{
"name": "shopxo-uniapp",
"lockfileVersion": 2,
"requires": true,
"packages": {
"node_modules/jweixin-module": {
"version": "1.6.0",
"resolved": "https://registry.npmjs.org/jweixin-module/-/jweixin-module-1.6.0.tgz",
"integrity": "sha512-dGk9cf+ipipHmtzYmKZs5B2toX+p4hLyllGLF6xuC8t+B05oYxd8fYoaRz0T30U2n3RUv8a4iwvjhA+OcYz52w=="
}
}
"name": "jin-edit—仿简书非常好用的富文本编辑器",
"version": "1.1",
"lockfileVersion": 3,
"requires": true,
"packages": {}
}

30
package-lock.json generated
View File

@ -1,24 +1,12 @@
{
"name": "shopxo-uniapp",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"dependencies": {
"jweixin-module": "^1.6.0"
}
},
"node_modules/jweixin-module": {
"version": "1.6.0",
"resolved": "https://registry.npmjs.org/jweixin-module/-/jweixin-module-1.6.0.tgz",
"integrity": "sha512-dGk9cf+ipipHmtzYmKZs5B2toX+p4hLyllGLF6xuC8t+B05oYxd8fYoaRz0T30U2n3RUv8a4iwvjhA+OcYz52w=="
"name": "jin-edit—仿简书非常好用的富文本编辑器",
"version": "1.1",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "jin-edit—仿简书非常好用的富文本编辑器",
"version": "1.1"
}
}
},
"dependencies": {
"jweixin-module": {
"version": "1.6.0",
"resolved": "https://registry.npmjs.org/jweixin-module/-/jweixin-module-1.6.0.tgz",
"integrity": "sha512-dGk9cf+ipipHmtzYmKZs5B2toX+p4hLyllGLF6xuC8t+B05oYxd8fYoaRz0T30U2n3RUv8a4iwvjhA+OcYz52w=="
}
}
}

View File

@ -103,7 +103,8 @@ export default {
//
uni.chooseLocation({
success: (res) => {
//
//
res['status'] = 1;
uni.setStorageSync(this.cache_key, res);
// 
@ -116,7 +117,11 @@ export default {
}, 500);
// #endif
},
fail: (res) => {
fail: (res) => {
//
var result = {...(uni.getStorageSync(this.cache_key) || {}), ...{status: 3}};
uni.setStorageSync(this.cache_key, result);
//
// error=11 msgcancel
var msg = res.errorMessage || res.chooseLocation || res.errMsg || this.$t('open-setting-location.open-setting-location.hwn386');

View File

@ -1,18 +1,20 @@
<template>
<view :class="theme_view">
<view v-if="(data || null) != null">
<block v-if="(data || null) != null">
<!-- diy模块 -->
<componentDiy :propValue="data.config" :propDataId="data.id"></componentDiy>
<componentDiy :propValue="data.config" :propDataId="data.id">
<template slot="diy-bottom">
<!-- 结尾 -->
<component-bottom-line :propStatus="data_bottom_line_status"></component-bottom-line>
<!-- 结尾 -->
<component-bottom-line :propStatus="data_bottom_line_status"></component-bottom-line>
</view>
<view v-else>
<!-- 公共 -->
<component-common></component-common>
</template>
</componentDiy>
</block>
<block v-else>
<component-no-data :propStatus="data_list_loding_status" :propMsg="data_list_loding_msg"></component-no-data>
</view>
<!-- 公共 -->
<component-common></component-common>
</block>
</view>
</template>
<script>

View File

@ -22,7 +22,7 @@
</block>
<view class="category-container">
<!-- 分类内容 -->
<view :class="'category-content bs-bb pr ' + (category_show_level == 0 ? 'goods-model' : '')" :style="'height:calc(100vh - ' + (search_height + window_bottom_height) + 'px);'">
<view :class="'category-content bs-bb pr ' + (category_show_level == 0 ? 'goods-model' : '')" :style="'height:calc(100vh - ' + search_height + 'px);'">
<block v-if="category_show_level == 1">
<!-- 一级模式 -->
<scroll-view scroll-y class="ht-auto" :show-scrollbar="false">
@ -452,11 +452,6 @@
popup_status: false,
//
search_height: 0,
// tab - H5
window_bottom_height: 0,
// #ifdef H5
window_bottom_height: uni.getWindowInfo().windowBottom || 50,
// #endif
//
left_content_actual_style: '',
right_content_actual_style: '',

View File

@ -14,8 +14,6 @@
}
.home-top-nav-location {
max-width: calc(100% - 200rpx);
height: 56rpx;
line-height: 56rpx;
}
.home-top-nav-logo {
text-align: left;

View File

@ -4,7 +4,18 @@
<!-- diy模式 -->
<block v-if="data_mode == 3">
<block v-if="data_list !== null">
<componentDiy :propValue="data_list.config" :propDataId="data_list.id"></componentDiy>
<componentDiy :propValue="data_list.config" :propDataId="data_list.id">
<template slot="diy-bottom">
<!-- 结尾 -->
<component-bottom-line :propStatus="data_bottom_line_status"></component-bottom-line>
<!-- 版权信息 -->
<component-copyright></component-copyright>
<!-- 公共 -->
<component-common></component-common>
</template>
</componentDiy>
</block>
</block>
<!-- 自动和手动模式 -->
@ -22,14 +33,8 @@
<view :class="'search-content-fixed-content ' + (common_app_is_enable_search == 1 ? 'nav-enable-search' : '')" :style="(common_app_is_header_nav_fixed == 1 ? top_content_style : '') + (common_app_is_header_nav_fixed == 1 ? top_content_search_content_style : '')">
<view class="home-top-nav margin-bottom-sm pr padding-right-main">
<!-- 定位 -->
<view v-if="is_home_location_choice == 1" class="home-top-nav-location dis-inline-block va-m single-text cr-white pr bs-bb padding-left-main padding-right-lg" @tap="choose_user_location_event">
<view class="dis-inline-block va-m lh">
<iconfont name="icon-location" size="32rpx" propClass="lh" color="#fff"></iconfont>
</view>
<text class="va-m margin-left-xs text-size-md">{{ user_location.text || '' }}</text>
<view class="lh pa right-0 top-xxxl">
<iconfont name="icon-arrow-bottom" size="24rpx" propClass="lh-xs" color="#fff"></iconfont>
</view>
<view v-if="is_home_location_choice == 1" class="home-top-nav-location dis-inline-block va-m single-text cr-white pr bs-bb padding-left-main padding-right-lg" >
<component-choice-location @onback="user_back_choice_location"></component-choice-location>
</view>
<block v-else>
<!-- logo/标题 -->
@ -264,41 +269,38 @@
</view>
</view>
</block>
<!-- 提示信息 -->
<block v-if="load_status == 0">
<component-no-data :propStatus="data_list_loding_status" :propMsg="data_list_loding_msg" propPage="home" :propIsHeader="true"></component-no-data>
</block>
</view>
<!-- 页面已加载 -->
<block v-if="load_status == 1">
<!-- 页面已加载模式 -->
<block v-if="load_status == 1 && data_mode != 3">
<!-- 结尾 -->
<component-bottom-line :propStatus="data_bottom_line_status"></component-bottom-line>
<!-- 版权信息 -->
<component-copyright></component-copyright>
<!-- 非diy模式 -->
<block v-if="data_mode != 3">
<!-- 在线客服 -->
<component-online-service :propIsNav="true" :propIsBar="true" :propIsGrayscale="plugins_mourning_data_is_app"></component-online-service>
<!-- 快捷导航 -->
<component-quick-nav :propIsNav="true" :propIsBar="true" :propIsGrayscale="plugins_mourning_data_is_app"></component-quick-nav>
<!-- 用户基础 -->
<component-user-base ref="user_base" :propIsGrayscale="plugins_mourning_data_is_app"></component-user-base>
<!-- app管理 -->
<component-app-admin ref="app_admin"></component-app-admin>
</block>
</block>
<!-- 在线客服 -->
<component-online-service :propIsNav="true" :propIsBar="true" :propIsGrayscale="plugins_mourning_data_is_app"></component-online-service>
<!-- 公共 -->
<component-common></component-common>
<!-- 快捷导航 -->
<component-quick-nav :propIsNav="true" :propIsBar="true" :propIsGrayscale="plugins_mourning_data_is_app"></component-quick-nav>
<!-- 用户基础 -->
<component-user-base ref="user_base" :propIsGrayscale="plugins_mourning_data_is_app"></component-user-base>
<!-- app管理 -->
<component-app-admin ref="app_admin"></component-app-admin>
<!-- 公共 -->
<component-common></component-common>
</block>
</view>
</template>
<script>
const app = getApp();
import componentCommon from '@/components/common/common';
@ -323,6 +325,7 @@
import componentMagicList from '@/components/magic-list/magic-list';
import componentAppAdmin from '@/components/app-admin/app-admin';
import componentDiy from '@/components/diy/diy';
import componentChoiceLocation from '@/components/choice-location/choice-location';
//
var bar_height = parseInt(app.globalData.get_system_info('statusBarHeight', 0, true));
@ -437,7 +440,8 @@
componentBindingList,
componentMagicList,
componentAppAdmin,
componentDiy
componentDiy,
componentChoiceLocation
},
onLoad(params) {
@ -453,20 +457,6 @@
if (this.is_home_location_choice == 1) {
//
this.user_location_init();
//
uni.$off('refresh');
// 
uni.$on('refresh', (data) => {
//
if ((data.location_success || false) == true) {
//
this.user_location_init();
//
// #ifdef APP
this.init();
// #endif
}
});
}
//
@ -667,15 +657,17 @@
}, 3000);
},
//
choose_user_location_event(e) {
app.globalData.choose_user_location_event();
//
user_back_choice_location(e) {
this.setData({
user_location: e
});
},
//
user_location_init() {
this.setData({
user_location: app.globalData.choice_user_location_init(),
user_location: app.globalData.choice_user_location_init()
});
},

View File

@ -62,8 +62,8 @@
<view class="form-gorup bg-white">
<view class="form-gorup-title">{{$t('extraction-apply.extraction-apply.47v7m0')}}<text class="form-group-tips-must">*</text></view>
<view @tap="choose_location_event" class="form-gorup-text">
<view v-if="(user_location.status || 0) == 0" class="cr-grey">{{$t('extraction-apply.extraction-apply.8831v6')}}</view>
<view v-else class="cr-base">{{ user_location.lng }}, {{ user_location.lat }}</view>
<view v-if="(user_location.status || 0) == 1" class="cr-base">{{ user_location.lng }}, {{ user_location.lat }}</view>
<view v-else class="cr-grey">{{$t('extraction-apply.extraction-apply.8831v6')}}</view>
</view>
</view>
@ -77,6 +77,9 @@
</form>
</view>
<!-- 位置选择 -->
<component-choice-location ref="choice_location" :propIsShowAddressChoice="false" @onback="user_back_choice_location"></component-choice-location>
<!-- 公共 -->
<component-common></component-common>
</view>
@ -84,6 +87,7 @@
<script>
const app = getApp();
import componentCommon from '@/components/common/common';
import componentChoiceLocation from '@/components/choice-location/choice-location';
var common_static_url = app.globalData.get_static_url('common');
export default {
data() {
@ -113,7 +117,8 @@
},
components: {
componentCommon
componentCommon,
componentChoiceLocation
},
onLoad(params) {
@ -136,15 +141,8 @@
//
app.globalData.page_event_onshow_handle();
//
uni.$off('refresh');
// 
    uni.$on('refresh', (data) => {
//
        if((data.location_success || false) == true) {
this.user_location_init();
        }
    });
//
this.user_location_init();
//
app.globalData.page_share_handle();
@ -383,7 +381,16 @@
//
choose_location_event(e) {
app.globalData.choose_user_location_event();
if ((this.$refs.choice_location || null) != null) {
this.$refs.choice_location.choose_user_location();
}
},
//
user_back_choice_location(e) {
this.setData({
user_location: e
});
},
//

View File

@ -41,6 +41,9 @@
<component-bottom-line :propStatus="data_bottom_line_status"></component-bottom-line>
</view>
<!-- 位置选择 -->
<component-choice-location ref="choice_location" :propIsShowAddressChoice="false" @onback="user_back_choice_location"></component-choice-location>
<!-- 公共 -->
<component-common></component-common>
</view>
@ -50,7 +53,7 @@ const app = getApp();
import componentCommon from '@/components/common/common';
import componentNoData from "@/components/no-data/no-data";
import componentBottomLine from "@/components/bottom-line/bottom-line";
import componentChoiceLocation from '@/components/choice-location/choice-location';
var common_static_url = app.globalData.get_static_url("common");
export default {
data() {
@ -70,7 +73,8 @@ const app = getApp();
components: {
componentCommon,
componentNoData,
componentBottomLine
componentBottomLine,
componentChoiceLocation
},
onLoad(params) {
@ -85,11 +89,6 @@ const app = getApp();
//
app.globalData.choice_user_location_remove();
//
if (this.home_extraction_address_position == 1) {
app.globalData.choose_user_location_event();
}
},
onShow() {
@ -98,21 +97,8 @@ const app = getApp();
//
if (this.home_extraction_address_position == 1) {
//
if (this.is_first == 0) {
//
uni.$off('refresh');
// 
    uni.$on('refresh', (data) => {
//
        if((data.location_success || false) == true) {
this.user_location_init();
        }
    });
//
this.init();
}
//
this.user_location_init();
} else {
this.init();
}
@ -120,6 +106,13 @@ const app = getApp();
is_first: 0,
});
//
if (this.home_extraction_address_position == 1) {
if((this.user_location || null) == null || this.user_location.status != 1) {
this.$refs.choice_location.choose_user_location();
}
}
//
app.globalData.page_share_handle();
},
@ -143,6 +136,14 @@ const app = getApp();
}
},
//
user_back_choice_location(e) {
this.setData({
user_location: e
});
this.init();
},
//
user_location_init() {
this.setData({

View File

@ -6,14 +6,8 @@
<!-- 顶部 -->
<view class="spacing-mb pr z-i cr-white">
<!-- 位置 -->
<view class="nav-location single-text dis-inline-block bs-bb pr padding-left-main padding-right-xxxxl" @tap="choose_user_location_event">
<view class="dis-inline-block va-m">
<iconfont name="icon-mendian-dingwei" size="28rpx" propClass="lh-il"></iconfont>
</view>
<text class="va-m margin-left-xs text-size-md">{{user_location.text || ''}}</text>
<view class="icon-arrow-down lh pa right-xxxxxl">
<iconfont name="icon-arrow-bottom" size="24rpx" propClass="lh-il" color="#fff"></iconfont>
</view>
<view class="nav-location single-text dis-inline-block bs-bb pr padding-left-main padding-right-xl margin-top">
<component-choice-location ref="choice_location" @onback="user_back_choice_location"></component-choice-location>
</view>
</view>
<!-- 搜索 -->
@ -80,7 +74,7 @@
import componentIconNav from '@/components/icon-nav/icon-nav';
import componentRealstoreList from '@/components/realstore-list/realstore-list';
import componentTitle from '@/components/title/title';
import componentChoiceLocation from '@/components/choice-location/choice-location';
var realstore_static_url = app.globalData.get_static_url('realstore', true);
export default {
data() {
@ -118,6 +112,7 @@
componentIconNav,
componentRealstoreList,
componentTitle,
componentChoiceLocation
},
onLoad(params) {
@ -141,20 +136,6 @@
//
this.user_location_init();
//
uni.$off('refresh');
// 
    uni.$on('refresh', (data) => {
//
        if((data.location_success || false) == true) {
//
this.user_location_init();
//
// #ifdef APP
this.get_data();
// #endif
        }
    });
//
this.get_data();
@ -262,7 +243,18 @@
//
choose_user_location_event(e) {
app.globalData.choose_user_location_event();
if ((this.$refs.choice_location || null) != null) {
this.$refs.choice_location.choose_user_location();
}
},
//
user_back_choice_location(e) {
this.setData({
user_location: e,
location_tips_close_status: e.status != 1
});
this.get_data();
},
//

View File

@ -6,6 +6,9 @@
height: 60rpx;
line-height: 60rpx;
}
.nav-search {
width: calc(100% - 260rpx);
}
/**
*

View File

@ -4,14 +4,11 @@
<!-- 顶部 -->
<view class="bg-white padding-top-main padding-horizontal-main oh flex-row jc-sb align-c cr-grey">
<!-- 位置 -->
<view class="nav-location flex-row align-c margin-right-sm" @tap="choose_user_location_event">
<view class="dis-inline-block va-m">
<iconfont name="icon-mendian-dingwei" size="28rpx" propClass="lh-md"></iconfont>
</view>
<text class="va-m margin-left-xs text-size-md single-text">{{user_location.text || ''}}</text>
<view class="nav-location flex-row align-c single-text margin-right-sm">
<component-choice-location ref="choice_location" propIconLocationColor="#999" propIconArrowColor="#999" propTextMaxWidth="180rpx" @onback="user_back_choice_location"></component-choice-location>
</view>
<!-- 搜索 -->
<view class="nav-search wh-auto">
<view class="nav-search">
<component-search @onsearch="search_button_event" :propIsOnEvent="true" :propIsRequired="false" :propDefaultValue="search_keywords_value" :propPlaceholder="$t('index.index.c5273j')" propPlaceholderClass="cr-grey-c" propBgColor="#f5f5f5"></component-search>
</view>
</view>
@ -50,7 +47,7 @@
import componentBottomLine from "@/components/bottom-line/bottom-line";
import componentSearch from "@/components/search/search";
import componentRealstoreList from "@/components/realstore-list/realstore-list";
import componentChoiceLocation from '@/components/choice-location/choice-location';
export default {
data() {
return {
@ -83,6 +80,7 @@
componentBottomLine,
componentSearch,
componentRealstoreList,
componentChoiceLocation
},
onLoad(params) {
@ -107,23 +105,6 @@
//
this.user_location_init();
//
uni.$off('refresh');
// 
    uni.$on('refresh', (data) => {
//
        if((data.location_success || false) == true) {
//
this.user_location_init();
//
this.setData({
data_page: 1,
});
this.get_data_list(1);
        }
    });
},
//
@ -328,9 +309,14 @@
this.get_data_list(1);
},
//
choose_user_location_event(e) {
app.globalData.choose_user_location_event();
//
user_back_choice_location(e) {
this.setData({
user_location: e,
data_page: 1,
});
//
this.get_data_list(1);
},
//

View File

@ -153,9 +153,12 @@
</view>
<view v-else>
<!-- 提示信息 -->
<component-no-data :propStatus="data_list_loding_status"></component-no-data>
<component-no-data :propIsShowAddressChoice="false" :propStatus="data_list_loding_status"></component-no-data>
</view>
<!-- 位置选择 -->
<component-choice-location ref="choice_location" @onback="user_back_choice_location"></component-choice-location>
<!-- 公共 -->
<component-common></component-common>
</view>
@ -165,7 +168,7 @@
import componentCommon from '@/components/common/common';
import componentNoData from '@/components/no-data/no-data';
import componentRegionPicker from '@/components/region-picker/region-picker';
import componentChoiceLocation from '@/components/choice-location/choice-location';
var common_static_url = app.globalData.get_static_url('common');
const theme_color = app.globalData.get_theme_color();
const theme_color_light = app.globalData.get_theme_color(null, true);
@ -214,7 +217,8 @@
components: {
componentCommon,
componentNoData,
componentRegionPicker
componentRegionPicker,
componentChoiceLocation
},
onLoad(params) {
@ -245,15 +249,8 @@
//
app.globalData.page_event_onshow_handle();
//
uni.$off('refresh');
// 
    uni.$on('refresh', (data) => {
//
        if((data.location_success || false) == true) {
this.user_location_init();
        }
    });
//
this.user_location_init();
//
app.globalData.page_share_handle();
@ -353,7 +350,9 @@
//
choose_user_location_event(e) {
app.globalData.choose_user_location_event();
if ((this.$refs.choice_location || null) != null) {
this.$refs.choice_location.choose_user_location();
}
},
//
@ -361,6 +360,18 @@
app.globalData.choice_user_location_remove();
},
//
user_back_choice_location(e) {
this.setData({
user_location: e
});
//
if (this.user_location.status == 1 && this.is_user_address_location_discern == 1) {
this.address_discern_handle(this.user_location, 0, 1);
}
},
//
user_location_init() {
this.setData({

View File

@ -185,7 +185,7 @@
});
});
// #endif
},
},
// H5css sticky
// sticky
checkCssStickyForH5() {