时间选择组件分包

master
gongfuxiang 2025-04-27 14:07:10 +08:00
parent 15128a58f4
commit 8bbeac6fc8
7 changed files with 49 additions and 37 deletions

View File

@ -168,9 +168,12 @@
// key
cache_userlocation_key: 'cache_userlocation_key',
// key
// key
cache_region_picker_choice_key: 'cache_region_picker_choice_key',
// key
cache_time_select_choice_key: 'cache_time_select_choice_key',
// key
cache_page_pay_key: 'cache_page_pay_key',

View File

@ -186,19 +186,18 @@
}
},
"__usePrivacyCheck__" : true,
"plugins" : {
// 线->->线 https://mp.weixin.qq.com/wxopen/plugindevdoc?appid=wx50b5593e81dd937a
// "routePlan" : {
// "version" : "1.0.19",
// "provider" : "wx50b5593e81dd937a"
// },
// ->-> https://mp.weixin.qq.com/wxopen/pluginbasicprofile?action=intro&appid=wx2b03c6e691cd7370
// "live-player-plugin" : {
// "version" : "1.3.5",
// "provider" : "wx2b03c6e691cd7370"
// }
}
"plugins" : {}
},
// 线->->线 https://mp.weixin.qq.com/wxopen/plugindevdoc?appid=wx50b5593e81dd937a
// "routePlan" : {
// "version" : "1.0.19",
// "provider" : "wx50b5593e81dd937a"
// },
// ->-> https://mp.weixin.qq.com/wxopen/pluginbasicprofile?action=intro&appid=wx2b03c6e691cd7370
// "live-player-plugin" : {
// "version" : "1.3.5",
// "provider" : "wx2b03c6e691cd7370"
// }
"mp-alipay" : {
"usingComponents" : true,
"appid" : "2021001173639600"

View File

@ -673,7 +673,13 @@
"path": "buy/buy",
"style": {
"enablePullDownRefresh": true,
"navigationBarTitleText": ""
"navigationBarTitleText": "",
"usingComponents": {
"component-time-select": "/pages/common/components/time-select/time-select"
},
"componentPlaceholder": {
"component-time-select": "view"
}
}
},
{

View File

@ -360,7 +360,7 @@
import componentCommon from '@/components/common/common';
import componentPopup from '@/components/popup/popup';
import componentNoData from '@/components/no-data/no-data';
import componentTimeSelect from '@/components/time-select/time-select';
import componentTimeSelect from '@/pages/common/components/time-select/time-select';
import componentPayment from '@/components/payment/payment';
import componentBuyOrdergoodsform from '@/pages/plugins/ordergoodsform/components/buy-ordergoodsform/buy-ordergoodsform';
@ -1201,11 +1201,12 @@
},
//
buy_datetime_event(e) {
var temp = this.buy_datetime_info;
buy_datetime_event() {
let data = uni.getStorageSync(app.globalData.data.cache_time_select_choice_key) || '';
let temp = this.buy_datetime_info;
temp['status'] = !temp.status;
if (e != 'open' && e != 'close') {
temp['value'] = ((e || null) != null ? e.value : '') || '';
if (data != 'open' && data != 'close') {
temp['value'] = ((data || null) != null ? data.value : '') || '';
}
this.setData({
buy_datetime_info: temp,

View File

@ -201,7 +201,7 @@ export default {
this.$emit("onclose", false);
},
//
sub_ragion_event(e) {
sub_ragion_event() {
let province = this.columns[0][this.columns_index[0]];
let city = this.columns[1][this.columns_index[1]];
let areal = this.columns[2][this.columns_index[2]];
@ -211,8 +211,8 @@ export default {
areal: areal
});
this.popup_close_event();
this.$emit("call-back");
},
this.$emit("callBackEvent");
}
},
};
</script>

View File

@ -33,6 +33,21 @@
<script>
const app = getApp();
export default {
data() {
return {
theme_view: app.globalData.get_theme_value_view(),
timeList: [],
selectDateStr: '',
select_dateStr: '',
selectTime: '',
selectEndime: '',
activeTimeArr: [],
day_active_index: 0,
time_active_index: '',
// key
cache_key: app.globalData.data.cache_time_select_choice_key,
};
},
props: {
propTitle: {
type: String,
@ -101,19 +116,6 @@
default: () => [],
},
},
data() {
return {
theme_view: app.globalData.get_theme_value_view(),
timeList: [],
selectDateStr: '',
select_dateStr: '',
selectTime: '',
selectEndime: '',
activeTimeArr: [],
day_active_index: 0,
time_active_index: '',
};
},
beforeMount() {
this._initDay();
},
@ -139,7 +141,8 @@
}
},
_selectEvent(data = '') {
this.$emit('selectEvent', data);
uni.setStorageSync(this.cache_key, data);
this.$emit('selectEvent');
},
_changeDay(e) {
let _ind = e - 0;

View File

@ -35,7 +35,7 @@
<text v-if="province_name"> {{ province_name }}{{ city_name ? '-' + city_name : '' }}{{ county_name ? '-' + county_name : '' }} </text>
<text v-else class="cr-grey-9">{{$t('extraction-apply.extraction-apply.cy87k6')}}</text>
</view>
<component-region-picker :propProvinceId="province_id" :propCityId="city_id" :propCountyId="county_id" :propShow="region_picker_show" @onclose="close_event" @call-back="region_event"></component-region-picker>
<component-region-picker :propProvinceId="province_id" :propCityId="city_id" :propCountyId="county_id" :propShow="region_picker_show" @onclose="close_event" @callBackEvent="region_event"></component-region-picker>
</view>
<view class="code-search oh pr">
<input type="text" :value="address_data.address_last_code || ''" maxlength="30" placeholder-class="cr-grey-9" class="code-input cr-base dis-inline-block bg-base text-size-xs padding-left-sm va-m" :placeholder="$t('user-address-save.user-address-save.he685s')" @input="region_code_value_event" />