支持多语言
parent
c371322b07
commit
17e1984eb8
4
App.vue
4
App.vue
|
|
@ -7,10 +7,10 @@
|
|||
data: {
|
||||
// 基础配置
|
||||
// 数据接口请求地址
|
||||
request_url: 'https://d1.shopxo.vip/',
|
||||
request_url: 'http://shopxo.com/',
|
||||
|
||||
// 静态资源地址(如系统根目录不在public目录下面请在静态地址后面加public目录、如:https://d1.shopxo.vip/public/)
|
||||
static_url: 'https://d1.shopxo.vip/',
|
||||
static_url: 'http://shopxo.com/',
|
||||
|
||||
// 系统类型(默认default、如额外独立小程序、可与程序分身插件实现不同主体小程序及支付独立)
|
||||
system_type: 'default',
|
||||
|
|
|
|||
|
|
@ -72,22 +72,35 @@
|
|||
type: [String, Object],
|
||||
default: null,
|
||||
},
|
||||
propDataList: {
|
||||
type: Array,
|
||||
default: () => [],
|
||||
},
|
||||
propData: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {};
|
||||
},
|
||||
}
|
||||
},
|
||||
// 属性值改变监听
|
||||
watch: {},
|
||||
watch: {
|
||||
// 数据
|
||||
propData(value, old_value) {
|
||||
this.init();
|
||||
}
|
||||
},
|
||||
// 页面被展示
|
||||
created: function (e) {
|
||||
var config = ((this.propConfig || null) == null ? app.globalData.get_config('plugins_base.binding.data') : this.propConfig) || {};
|
||||
this.setData({
|
||||
config: config,
|
||||
data_list: this.propDataList,
|
||||
});
|
||||
created: function(e) {
|
||||
this.init();
|
||||
},
|
||||
methods: {
|
||||
// 初始化
|
||||
init() {
|
||||
var config = ((this.propConfig || null) == null ? app.globalData.get_config('plugins_base.binding.data') : this.propConfig) || {};
|
||||
var data_list = ((this.propData || null) == null || (this.propData.data || null) == null || this.propData.data.length == 0) ? [] : this.propData.data;
|
||||
this.setData({
|
||||
config: config,
|
||||
data_list: data_list,
|
||||
});
|
||||
},
|
||||
|
||||
// url事件
|
||||
url_event(e) {
|
||||
app.globalData.url_event(e);
|
||||
|
|
|
|||
|
|
@ -1,11 +1,11 @@
|
|||
<template>
|
||||
<view :class="theme_view">
|
||||
<view v-if="propData.length > 0" class="icon-nav-list" :class="propData.length > 5 ? 'swiper-height-max' : 'swiper-height-min'">
|
||||
<uni-swiper-dot class="uni-swiper-dot-box" mode="default" :dots-styles="dotsStyles" @clickItem="click_item" :info="swiperData" :current="current">
|
||||
<swiper class="swiper-box" :autoplay="autoplay" :duration="duration" @change="swiper_change" :current="swiperDotIndex">
|
||||
<swiper-item v-for="(swiperItemData, i) in swiperData" :key="i">
|
||||
<view v-if="(propData || null) != null && (propData.data || null) != null && propData.data.length > 0 && swiper_data.length > 0" class="icon-nav-list" :class="propData.data.length > 5 ? 'swiper-height-max' : 'swiper-height-min'">
|
||||
<uni-swiper-dot class="uni-swiper-dot-box" mode="default" :dots-styles="dots_styles" @clickItem="click_item" :info="swiper_data" :current="current">
|
||||
<swiper class="swiper-box" :autoplay="autoplay" :duration="duration" @change="swiper_change" :current="swiper_dot_index">
|
||||
<swiper-item v-for="(swiper_item_data, i) in swiper_data" :key="i">
|
||||
<view class="swiper-item flex-row flex-warp" :class="'swiper-item' + i">
|
||||
<view v-for="(item, j) in swiperItemData" :key="j" class="swiper-item item">
|
||||
<view v-for="(item, j) in swiper_item_data" :key="j" class="swiper-item item">
|
||||
<view :class="'item-content ' + ((item.bg_color || null) == null ? 'item-exposed' : '')" :data-value="item.event_value" :data-type="item.event_type" @tap="navigation_event" :style="(item.bg_color || null) == null ? '' : 'background-color:' + item.bg_color + ';'">
|
||||
<image :src="item.images_url" mode="aspectFit"></image>
|
||||
</view>
|
||||
|
|
@ -24,13 +24,13 @@
|
|||
data() {
|
||||
return {
|
||||
theme_view: app.globalData.get_theme_value_view(),
|
||||
swiperData: [],
|
||||
swiper_data: [],
|
||||
autoplay: false,
|
||||
duration: 500,
|
||||
styleIndex: -1,
|
||||
current: 0,
|
||||
swiperDotIndex: 0,
|
||||
dotsStyles: {
|
||||
swiper_dot_index: 0,
|
||||
dots_styles: {
|
||||
backgroundColor: '#eee',
|
||||
bottom: '0',
|
||||
border: '0',
|
||||
|
|
@ -42,7 +42,17 @@
|
|||
},
|
||||
components: {},
|
||||
props: {
|
||||
propData: Array,
|
||||
propData: {
|
||||
type: [Array, Object],
|
||||
default: [],
|
||||
},
|
||||
},
|
||||
// 属性值改变监听
|
||||
watch: {
|
||||
// 数据
|
||||
propData(value, old_value) {
|
||||
this.handle_data();
|
||||
}
|
||||
},
|
||||
beforeMount() {
|
||||
this.handle_data();
|
||||
|
|
@ -52,14 +62,16 @@
|
|||
app.globalData.operation_event(e);
|
||||
},
|
||||
// 数据处理
|
||||
handle_data() {
|
||||
this.swiperData = app.globalData.group_arry(this.propData, 10);
|
||||
handle_data() {
|
||||
if((this.propData || null) != null && (this.propData.data || null) != null && this.propData.data.length > 0) {
|
||||
this.swiper_data = app.globalData.group_arry(this.propData.data, 10);
|
||||
}
|
||||
},
|
||||
swiper_change(e) {
|
||||
this.current = e.detail.current;
|
||||
},
|
||||
click_item(e) {
|
||||
this.swiperDotIndex = e;
|
||||
this.swiper_dot_index = e;
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
|
|||
|
|
@ -17,7 +17,7 @@
|
|||
</block>
|
||||
</view>
|
||||
</view>
|
||||
<view :class="'text-size-xs margin-top-xs cr-'+(((item.is_text_white || 0) == 1) ? 'white' : 'grey-9')">{{ items.describe }}</view>
|
||||
<view :class="'single-text text-size-xs margin-top-xs cr-'+(((item.is_text_white || 0) == 1) ? 'white' : 'grey-9')">{{ items.describe }}</view>
|
||||
<swiper class="swiper-list border-radius-main oh" circular :autoplay="(items.rolling_time || null) !== null ? true : false" :vertical="propVertical" :interval="(items.rolling_time || null) !== null ? Number(items.rolling_time) * 1000 : '6000'" :duration="propDuration">
|
||||
<swiper-item v-for="(itemss, indexss) in items.data" :key="indexss">
|
||||
<view class="swiper-item">
|
||||
|
|
|
|||
|
|
@ -64,9 +64,11 @@ export default {
|
|||
type: Boolean,
|
||||
default: true,
|
||||
},
|
||||
propDataList: {
|
||||
type: Array,
|
||||
default: () => [],
|
||||
propData: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {};
|
||||
},
|
||||
},
|
||||
propFavorUser: {
|
||||
type: Array,
|
||||
|
|
@ -79,23 +81,26 @@ export default {
|
|||
},
|
||||
// 属性值改变监听
|
||||
watch: {
|
||||
// 数据列表
|
||||
propDataList(value, old_value) {
|
||||
this.setData({
|
||||
data_list: value,
|
||||
});
|
||||
this.data_list_handle();
|
||||
},
|
||||
// 数据
|
||||
propData(value, old_value) {
|
||||
this.init();
|
||||
}
|
||||
},
|
||||
// 页面被展示
|
||||
created: function (e) {
|
||||
this.setData({
|
||||
data_list: this.propDataList,
|
||||
favor_user: this.propFavorUser,
|
||||
});
|
||||
this.data_list_handle();
|
||||
this.init();
|
||||
},
|
||||
methods: {
|
||||
// 初始化
|
||||
init() {
|
||||
var data_list = ((this.propData || null) == null || (this.propData.data || null) == null || this.propData.data.length == 0) ? [] : this.propData.data;
|
||||
this.setData({
|
||||
data_list: data_list,
|
||||
favor_user: this.propFavorUser,
|
||||
});
|
||||
this.data_list_handle();
|
||||
},
|
||||
|
||||
// 数据列表处理
|
||||
data_list_handle() {
|
||||
var temp_data_list = this.data_list;
|
||||
|
|
|
|||
|
|
@ -52,24 +52,35 @@
|
|||
type: [String, Object],
|
||||
default: null
|
||||
},
|
||||
propDataList: {
|
||||
type: Array,
|
||||
default: () => []
|
||||
propData: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {};
|
||||
},
|
||||
}
|
||||
},
|
||||
// 属性值改变监听
|
||||
watch: {
|
||||
|
||||
// 数据
|
||||
propData(value, old_value) {
|
||||
this.init();
|
||||
}
|
||||
},
|
||||
// 页面被展示
|
||||
created: function(e) {
|
||||
var config = ((this.propConfig || null) == null ? app.globalData.get_config('plugins_base.shop.data') : this.propConfig) || {};
|
||||
this.setData({
|
||||
config: config,
|
||||
data_list: this.propDataList
|
||||
});
|
||||
this.init();
|
||||
},
|
||||
methods: {
|
||||
// 初始化
|
||||
init() {
|
||||
var config = ((this.propConfig || null) == null ? app.globalData.get_config('plugins_base.shop.data') : this.propConfig) || {};
|
||||
var data_list = ((this.propData || null) == null || (this.propData.data || null) == null || this.propData.data.length == 0) ? [] : this.propData.data;
|
||||
this.setData({
|
||||
config: config,
|
||||
data_list: data_list
|
||||
});
|
||||
},
|
||||
|
||||
// url事件
|
||||
url_event(e) {
|
||||
app.globalData.url_event(e);
|
||||
|
|
|
|||
|
|
@ -56,6 +56,7 @@
|
|||
"user": "User Center",
|
||||
"cart-page": "shopping cart",
|
||||
"buy": "acknowledgement of order",
|
||||
"web-view": "loading",
|
||||
"login": "Login",
|
||||
"paytips": "Secure payment",
|
||||
"goods-search": "Product search",
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@
|
|||
"user": "用户中心",
|
||||
"cart-page": "购物车",
|
||||
"buy": "订单确认",
|
||||
"web-view": "",
|
||||
"web-view": "加载中",
|
||||
"login": "登录",
|
||||
"paytips": "安全支付",
|
||||
"goods-search": "商品搜索",
|
||||
|
|
|
|||
|
|
@ -287,12 +287,12 @@
|
|||
<text class="text-wrapper title-left-border single-text flex-1 flex-width padding-right-main">{{$t('goods-detail.goods-detail.317jp2')}}</text>
|
||||
<text data-value="/pages/plugins/realstore/index/index" @tap="url_event" class="arrow-right padding-right cr-grey cp">{{$t('common.more')}}</text>
|
||||
</view>
|
||||
<component-realstore-list :propDataList="plugins_realstore_data.data" :propRealstoreDetailQuery="'&source_goods_id='+goods.id" :propIsFavor="false"></component-realstore-list>
|
||||
<component-realstore-list :propData="{...{data: plugins_realstore_data.data}, ...{random: random_value}}" :propRealstoreDetailQuery="'&source_goods_id='+goods.id" :propIsFavor="false"></component-realstore-list>
|
||||
</view>
|
||||
|
||||
<!-- 多商户 -->
|
||||
<block v-if="plugins_shop_data != null">
|
||||
<component-shop-list :propDataList="[plugins_shop_data]"></component-shop-list>
|
||||
<component-shop-list :propData="{...{data: [plugins_shop_data]}, ...{random: random_value}}"></component-shop-list>
|
||||
</block>
|
||||
|
||||
<!-- 商品评价 -->
|
||||
|
|
@ -653,6 +653,8 @@
|
|||
goods_spec_selected_text: this.$t('goods-detail.goods-detail.6brk57'),
|
||||
show_field_price_text: null,
|
||||
goods_video_is_autoplay: false,
|
||||
// 增加随机数,避免无法监听数据列表内部数据更新
|
||||
random_value: 0,
|
||||
// 底部导航展示状态、如果已开启多门店默认展示、则先展示加载
|
||||
goods_bottom_opt_nav_status: app.globalData.get_config('plugins_base.realstore', null) == null,
|
||||
// 更多导航
|
||||
|
|
@ -905,6 +907,7 @@
|
|||
// 基础数据
|
||||
var plugins_seckill_data = data.plugins_seckill_data || null;
|
||||
var upd_data = {
|
||||
random_value: Math.random(),
|
||||
data_loading_status: 1,
|
||||
goods_bottom_opt_nav_status: true,
|
||||
guess_you_like: data.guess_you_like || [],
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@
|
|||
<view v-if="navigation.length > 0" class="spacing-mt" :class="load_status == 1 && (common_shop_notice || null) != null ? '' : ' spacing-mb'">
|
||||
<view class="padding-horizontal-main">
|
||||
<view class="bg-white border-radius-main">
|
||||
<component-icon-nav :propData="navigation"></component-icon-nav>
|
||||
<component-icon-nav :propData="{...{data: navigation}, ...{random: random_value}}"></component-icon-nav>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -134,7 +134,7 @@
|
|||
<text class="text-wrapper title-left-border single-text flex-1 flex-width padding-right-main">{{ plugins_realstore_data.base.home_data_list_title }}</text>
|
||||
<text data-value="/pages/plugins/realstore/search/search" @tap="url_event" class="arrow-right padding-right cr-grey cp">{{$t('common.more')}}</text>
|
||||
</view>
|
||||
<component-realstore-list :propDataList="plugins_realstore_data.data"></component-realstore-list>
|
||||
<component-realstore-list :propData="{...{data: plugins_realstore_data.data}, ...{random: random_value}}"></component-realstore-list>
|
||||
</view>
|
||||
|
||||
<!-- 多商户 - 插件 -->
|
||||
|
|
@ -143,7 +143,7 @@
|
|||
<text class="text-wrapper title-left-border single-text flex-1 flex-width padding-right-main">{{ plugins_shop_data.base.home_data_list_title }}</text>
|
||||
<text data-value="/pages/plugins/shop/index/index" @tap="url_event" class="arrow-right padding-right cr-grey cp">{{$t('common.more')}}</text>
|
||||
</view>
|
||||
<component-shop-list :propConfig="plugins_shop_data.base" :propDataList="plugins_shop_data.data"></component-shop-list>
|
||||
<component-shop-list :propConfig="plugins_shop_data.base" :propData="{...{data: plugins_shop_data.data}, ...{random: random_value}}"></component-shop-list>
|
||||
</view>
|
||||
|
||||
<!-- 组合搭配 - 插件 -->
|
||||
|
|
@ -152,7 +152,7 @@
|
|||
<text class="text-wrapper title-left-border single-text flex-1 flex-width padding-right-main">{{ plugins_binding_data.base.home_data_list_title }}</text>
|
||||
<text data-value="/pages/plugins/binding/index/index" @tap="url_event" class="arrow-right padding-right cr-grey cp">{{$t('common.more')}}</text>
|
||||
</view>
|
||||
<component-binding-list :propConfig="plugins_binding_data.base" :propDataList="plugins_binding_data.data" :propCurrencySymbol="currency_symbol"></component-binding-list>
|
||||
<component-binding-list :propConfig="plugins_binding_data.base" :propData="{...{data: plugins_binding_data.data}, ...{random: random_value}}" :propCurrencySymbol="currency_symbol"></component-binding-list>
|
||||
</view>
|
||||
|
||||
<!-- 博客-楼层顶部 - 插件 -->
|
||||
|
|
@ -539,6 +539,7 @@
|
|||
var data = res.data.data;
|
||||
if (res.data.code == 0) {
|
||||
var upd_data = {
|
||||
random_value: Math.random(),
|
||||
data_bottom_line_status: true,
|
||||
banner_list: data.banner_list || [],
|
||||
navigation: data.navigation || [],
|
||||
|
|
@ -547,7 +548,6 @@
|
|||
cart_total: data.cart_total.buy_number || 0,
|
||||
message_total: parseInt(data.message_total || 0),
|
||||
right_icon_list: data.right_icon_list || [],
|
||||
random_value: Math.random(),
|
||||
data_list_loding_status: data.data_list.length == 0 ? 0 : 3,
|
||||
plugins_sort_list: data.plugins_sort_list || [],
|
||||
plugins_seckill_data: data.plugins_seckill_data || null,
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
<!-- 绑定手机 -->
|
||||
<view v-if="current_opt_form == 'bind_verify'" class="form-content">
|
||||
<form @submit="formBindMobile">
|
||||
<form @submit="form_submit_bind_mobile">
|
||||
<view class="tc">
|
||||
<image class="icon circle auto dis-block margin-bottom-xxl br" :src="(user.avatar || null) == null ? '/static/images/default-user.png' : user.avatar" mode="widthFix"></image>
|
||||
<view v-if="(user.user_name_view || null) != null" class="cr-base">{{ user.user_name_view }}</view>
|
||||
|
|
@ -38,7 +38,7 @@
|
|||
</form>
|
||||
</view>
|
||||
<view v-if="current_opt_form == 'bind_email'" class="form-content">
|
||||
<form @submit="formBindEmail">
|
||||
<form @submit="form_submit_bind_email">
|
||||
<view class="tc">
|
||||
<image class="icon circle auto dis-block margin-bottom-xxl br" :src="(user.avatar || null) == null ? '/static/images/default-user.png' : user.avatar" mode="widthFix"></image>
|
||||
<view v-if="(user.user_name_view || null) != null" class="cr-base">{{ user.user_name_view }}</view>
|
||||
|
|
@ -119,7 +119,7 @@
|
|||
|
||||
<!-- 登录 -->
|
||||
<view v-if="current_opt_form == 'login'" class="form-content">
|
||||
<form @submit="formLogin">
|
||||
<form @submit="form_submit_login">
|
||||
<!-- form表单距离去除顶部沾满整个空间的高度 -->
|
||||
<view class="flex-col jc-sb">
|
||||
<view>
|
||||
|
|
@ -186,7 +186,7 @@
|
|||
|
||||
<!-- 注册 -->
|
||||
<view v-else-if="current_opt_form == 'reg'" class="form-content">
|
||||
<form @submit="formReg">
|
||||
<form @submit="form_submit_reg">
|
||||
<!-- form表单距离去除顶部沾满整个空间的高度 -->
|
||||
<view class="flex-col jc-sb">
|
||||
<view>
|
||||
|
|
@ -254,7 +254,7 @@
|
|||
|
||||
<!-- 找回密码 -->
|
||||
<view v-else-if="current_opt_form == 'forget'" class="form-content">
|
||||
<form @submit="formForget">
|
||||
<form @submit="form_submit_forget">
|
||||
<!-- form表单距离去除顶部沾满整个空间的高度 -->
|
||||
<view class="flex-col jc-sb">
|
||||
<view class="margin-bottom-xxxl">
|
||||
|
|
@ -986,7 +986,7 @@
|
|||
},
|
||||
});
|
||||
},
|
||||
formBindMobile(e) {
|
||||
form_submit_bind_mobile(e) {
|
||||
// 数据验证
|
||||
var validation = [
|
||||
{ fields: 'mobile', msg: this.$t('login.login.4c5n8o') },
|
||||
|
|
@ -995,7 +995,7 @@
|
|||
this.formBind(e, validation, app.globalData.get_request_url('appmobilebind', 'user'));
|
||||
},
|
||||
// 绑定手机表单提交
|
||||
formBindEmail(e) {
|
||||
form_submit_bind_email(e) {
|
||||
// 数据验证
|
||||
var validation = [
|
||||
{ fields: 'email', msg: this.$t('login.login.xak8g1') },
|
||||
|
|
@ -1101,7 +1101,7 @@
|
|||
},
|
||||
|
||||
// 登录表单提交
|
||||
formLogin(e) {
|
||||
form_submit_login(e) {
|
||||
// 是否已同意协议
|
||||
if (!this.agreement_status) {
|
||||
app.globalData.showToast(this.$t('login.login.btu2c1'));
|
||||
|
|
@ -1169,7 +1169,7 @@
|
|||
},
|
||||
|
||||
// 注册表单提交
|
||||
formReg(e) {
|
||||
form_submit_reg(e) {
|
||||
// 是否已同意协议
|
||||
if (!this.agreement_status) {
|
||||
app.globalData.showToast(this.$t('login.login.btu2c1'));
|
||||
|
|
@ -1238,7 +1238,7 @@
|
|||
},
|
||||
|
||||
// 密码找回表单提交
|
||||
formForget(e) {
|
||||
form_submit_forget(e) {
|
||||
// 数据验证
|
||||
var validation = [
|
||||
{ fields: 'accounts', msg: this.$t('login.login.h0515x') },
|
||||
|
|
@ -1694,6 +1694,8 @@
|
|||
});
|
||||
// 重新设置当前页面标题
|
||||
this.set_navigation_bar_title();
|
||||
// 重新读取数据配置
|
||||
app.globalData.init_config();
|
||||
},
|
||||
|
||||
// 多语言切换
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
<block v-if="data_list_loding_status == 3">
|
||||
<view class="password">
|
||||
<view class="padding-main">
|
||||
<form @submit="formBindPwd">
|
||||
<form @submit="form_bind_pwd">
|
||||
<view class="margin-top-xxxl">
|
||||
<view class="pr">
|
||||
<input type="text" :placeholder="$t('password.password.4e24j1')" minlength="6" maxlength="18" name="my_pwd" :password="!eyes1" class="form-item margin-bottom-main" />
|
||||
|
|
@ -91,7 +91,8 @@
|
|||
}
|
||||
},
|
||||
|
||||
formBindPwd(e) {
|
||||
// 绑定表单
|
||||
form_bind_pwd(e) {
|
||||
// 数据验证
|
||||
var validation = [
|
||||
{ fields: 'my_pwd', msg: this.$t('login.login.277w03') },
|
||||
|
|
|
|||
|
|
@ -119,7 +119,7 @@
|
|||
uni.request({
|
||||
url: app.globalData.get_request_url('index', 'personal'),
|
||||
method: 'POST',
|
||||
data: {},
|
||||
data: {lang_can_key: 'gender_list'},
|
||||
dataType: 'json',
|
||||
success: (res) => {
|
||||
if (res.data.code == 0) {
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
<view :class="'padding-main ' + ((shop || null) != null ? 'page-bottom-fixed' : '')">
|
||||
<block v-if="(data_list || null) != null && data_list.length > 0">
|
||||
<!-- 组合搭配组件 -->
|
||||
<component-binding-list :propConfig="data_base" :propDataList="data_list" :propCurrencySymbol="currency_symbol"></component-binding-list>
|
||||
<component-binding-list :propConfig="data_base" :propData="{data: data_list}" :propCurrencySymbol="currency_symbol"></component-binding-list>
|
||||
</block>
|
||||
<block v-else>
|
||||
<!-- 提示信息 -->
|
||||
|
|
@ -172,10 +172,10 @@
|
|||
this.setData({ data_is_loading: 1 });
|
||||
|
||||
// 加载loding
|
||||
if(this.data_page > 1) {
|
||||
uni.showLoading({
|
||||
title: this.$t('common.loading_in_text'),
|
||||
});
|
||||
if(this.data_page > 1) {
|
||||
uni.showLoading({
|
||||
title: this.$t('common.loading_in_text'),
|
||||
});
|
||||
}
|
||||
|
||||
// 获取数据
|
||||
|
|
@ -188,8 +188,8 @@
|
|||
},
|
||||
dataType: 'json',
|
||||
success: (res) => {
|
||||
if(this.data_page > 1) {
|
||||
uni.hideLoading();
|
||||
if(this.data_page > 1) {
|
||||
uni.hideLoading();
|
||||
}
|
||||
uni.stopPullDownRefresh();
|
||||
if (res.data.code == 0) {
|
||||
|
|
@ -238,8 +238,8 @@
|
|||
}
|
||||
},
|
||||
fail: () => {
|
||||
if(this.data_page > 1) {
|
||||
uni.hideLoading();
|
||||
if(this.data_page > 1) {
|
||||
uni.hideLoading();
|
||||
}
|
||||
uni.stopPullDownRefresh();
|
||||
this.setData({
|
||||
|
|
|
|||
|
|
@ -98,6 +98,7 @@
|
|||
<button class="cr-white bg-main round text-size wh-auto" type="default" form-type="submit" hover-class="none" :loading="form_submit_loading" :disabled="form_submit_loading">{{$t('form.form.4yd066')}}</button>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 分类选择 -->
|
||||
<component-popup :propShow="popup_status" propPosition="bottom" @onclose="popup_close_event">
|
||||
<view class="p-title flex-row jc-sb align-c padding-main br-b-e">
|
||||
<view class="text-size-lg fw-b">{{$t('form.form.4vku7u')}}</view>
|
||||
|
|
@ -132,7 +133,7 @@
|
|||
return {
|
||||
theme_view: app.globalData.get_theme_value_view(),
|
||||
theme_color: app.globalData.get_theme_color(),
|
||||
blog_id: '',
|
||||
params: {},
|
||||
data_list_loding_status: 1,
|
||||
data: {},
|
||||
index: 0,
|
||||
|
|
@ -168,11 +169,10 @@
|
|||
app.globalData.page_event_onload_handle(params);
|
||||
|
||||
// 设置参数
|
||||
if (params !== null && params.id) {
|
||||
this.setData({
|
||||
blog_id: params.id,
|
||||
});
|
||||
}
|
||||
this.setData({
|
||||
params: params || {},
|
||||
});
|
||||
|
||||
// 数据加载
|
||||
this.init();
|
||||
},
|
||||
|
|
@ -211,26 +211,39 @@
|
|||
uni.request({
|
||||
url: app.globalData.get_request_url('saveinfo', 'blog', 'blog'),
|
||||
method: 'POST',
|
||||
data: { id: this.blog_id },
|
||||
data: {...this.params, ...{lang_can_key: 'blog_category_list'}},
|
||||
success: (res) => {
|
||||
uni.stopPullDownRefresh();
|
||||
if (res.data.code == 0) {
|
||||
var blog_category_list = res.data.data.blog_category_list || [];
|
||||
if (res.data.data.data) {
|
||||
var data = res.data.data.data || {};
|
||||
// 封面列表
|
||||
var img_list = [];
|
||||
if (res.data.data.data.cover.length > 0) {
|
||||
img_list.push(res.data.data.data.cover);
|
||||
if ((data.cover || null) != null && data.cover.length > 0) {
|
||||
img_list.push(data.cover);
|
||||
}
|
||||
// 分类名称匹配重新匹配赋值
|
||||
var blog_category_name = '';
|
||||
for(var i in blog_category_list) {
|
||||
if(blog_category_list[i]['id'] == data.blog_category_id) {
|
||||
blog_category_name = blog_category_list[i]['name'];
|
||||
break;
|
||||
}
|
||||
}
|
||||
data['blog_category_name'] = blog_category_name;
|
||||
// 设置数据
|
||||
this.setData({
|
||||
data: res.data.data.data || {},
|
||||
blog_category_list: res.data.data.blog_category_list,
|
||||
data: data,
|
||||
blog_category_list: blog_category_list,
|
||||
image_list: img_list,
|
||||
more_height: res.data.data.data.describe || res.data.data.data.seo_title || res.data.data.data.seo_keywords || res.data.data.data.seo_desc ? '708rpx' : '0',
|
||||
is_more: res.data.data.data.describe || res.data.data.data.seo_title || res.data.data.data.seo_keywords || res.data.data.data.seo_desc ? 'true' : 'false',
|
||||
more_height: data.describe || data.seo_title || data.seo_keywords || data.seo_desc ? '708rpx' : '0',
|
||||
is_more: data.describe || data.seo_title || data.seo_keywords || data.seo_desc ? 'true' : 'false',
|
||||
data_list_loding_status: 3,
|
||||
});
|
||||
} else {
|
||||
this.setData({
|
||||
blog_category_list: res.data.data.blog_category_list,
|
||||
blog_category_list: blog_category_list,
|
||||
data_list_loding_status: 3,
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@
|
|||
return {
|
||||
theme_view: app.globalData.get_theme_value_view(),
|
||||
common_static_url: common_static_url,
|
||||
params: null,
|
||||
params: {},
|
||||
data_list_loding_status: 1,
|
||||
data_list_loding_msg: '',
|
||||
extraction_data: {},
|
||||
|
|
@ -118,7 +118,7 @@
|
|||
|
||||
// 设置参数
|
||||
this.setData({
|
||||
params: params,
|
||||
params: params || {},
|
||||
});
|
||||
|
||||
// 清除位置缓存信息
|
||||
|
|
@ -166,7 +166,7 @@
|
|||
uni.request({
|
||||
url: app.globalData.get_request_url('applyinfo', 'extraction', 'distribution'),
|
||||
method: 'POST',
|
||||
data: {},
|
||||
data: {is_lang: 0},
|
||||
dataType: 'json',
|
||||
success: (res) => {
|
||||
if (res.data.code == 0) {
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@
|
|||
height: 90rpx;
|
||||
}
|
||||
.popup-goods-choice-container .nav-search .item {
|
||||
width: calc(50% - 124rpx);
|
||||
width: calc(50% - 140rpx);
|
||||
height: 60rpx;
|
||||
line-height: 60rpx;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@
|
|||
<view class="form-gorup-title">{{$t('recommend-form.recommend-form.5ws7m3')}}<text class="form-group-tips-must">*</text></view>
|
||||
<view v-if="(recommend_data.detail_list || null) != null && recommend_data.detail_list.length > 0" class="margin-top-lg view-goods-list">
|
||||
<block v-for="(item, index) in recommend_data.detail_list" :key="index">
|
||||
<view :class="'item oh pr ' + (index > 0 ? 'br-t-dashed padding-top-lg margin-top-lg' : '')">
|
||||
<view v-if="(item.goods || null) != null" :class="'item oh pr ' + (index > 0 ? 'br-t-dashed padding-top-lg margin-top-lg' : '')">
|
||||
<view :data-value="item.goods.goods_url" @tap="url_event" class="cp br dis-block fl radius oh">
|
||||
<image :src="item.goods.images" mode="aspectFill" class="dis-block"></image>
|
||||
</view>
|
||||
|
|
@ -132,7 +132,7 @@
|
|||
return {
|
||||
theme_view: app.globalData.get_theme_value_view(),
|
||||
common_static_url: common_static_url,
|
||||
params: null,
|
||||
params: {},
|
||||
data_list_loding_status: 1,
|
||||
data_list_loding_msg: '',
|
||||
recommend_data: {},
|
||||
|
|
@ -162,7 +162,7 @@
|
|||
|
||||
// 设置参数
|
||||
this.setData({
|
||||
params: params,
|
||||
params: params || {},
|
||||
});
|
||||
},
|
||||
|
||||
|
|
@ -199,7 +199,7 @@
|
|||
uni.request({
|
||||
url: app.globalData.get_request_url('savedata', 'recommend', 'distribution'),
|
||||
method: 'POST',
|
||||
data: { id: this.params.id || 0 },
|
||||
data: {...this.params, ...{lang_can_key: 'goods_category_list'}},
|
||||
dataType: 'json',
|
||||
success: (res) => {
|
||||
uni.stopPullDownRefresh();
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ export default {
|
|||
common_static_url: common_static_url,
|
||||
data_list_loding_status: 1,
|
||||
data_list_loding_msg: '',
|
||||
params: null,
|
||||
params: {},
|
||||
search_input_keywords_value: '',
|
||||
data: {},
|
||||
form_images_list: [],
|
||||
|
|
@ -98,7 +98,7 @@ export default {
|
|||
|
||||
// 设置参数
|
||||
this.setData({
|
||||
params: params,
|
||||
params: params || {},
|
||||
});
|
||||
|
||||
this.init();
|
||||
|
|
@ -135,7 +135,7 @@ export default {
|
|||
uni.request({
|
||||
url: app.globalData.get_request_url("saveinfo", "visit", "distribution"),
|
||||
method: "POST",
|
||||
data: this.params,
|
||||
data: {...this.params, ...{is_lang: 0}},
|
||||
dataType: "json",
|
||||
success: (res) => {
|
||||
uni.stopPullDownRefresh();
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
<view :class="theme_view">
|
||||
<view class="page-bottom-fixed">
|
||||
<view v-if="save_base_data != null && save_base_data.total_price > 0">
|
||||
<form @submit="formSubmit" class="form-container">
|
||||
<form @submit="form_submit" class="form-container">
|
||||
<view class="padding-main oh">
|
||||
<view class="padding-main border-radius-main bg-white spacing-mb">
|
||||
<view>
|
||||
|
|
@ -191,7 +191,7 @@
|
|||
uni.request({
|
||||
url: app.globalData.get_request_url('saveinfo', 'user', 'invoice'),
|
||||
method: 'POST',
|
||||
data: this.params,
|
||||
data: {...this.params, ...{lang_can_key: 'apply_type_list,can_invoice_type_list'}},
|
||||
dataType: 'json',
|
||||
success: (res) => {
|
||||
uni.stopPullDownRefresh();
|
||||
|
|
@ -332,7 +332,7 @@
|
|||
},
|
||||
|
||||
// 表单提交
|
||||
formSubmit(e) {
|
||||
form_submit(e) {
|
||||
var data = e.detail.value;
|
||||
if ((this.data || null) == null || (this.data.id || null) == null) {
|
||||
data['ids'] = this.params.ids || '';
|
||||
|
|
|
|||
|
|
@ -30,7 +30,7 @@
|
|||
<!-- 图标 -->
|
||||
<view v-if="icon_list.length > 0" class="padding-horizontal-main spacing-mb">
|
||||
<view class="bg-white border-radius-main">
|
||||
<component-icon-nav :propData="icon_list"></component-icon-nav>
|
||||
<component-icon-nav :propData="{...{data: icon_list}, ...{random: random_value}}"></component-icon-nav>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
|
|
@ -40,7 +40,7 @@
|
|||
<!-- 导航 -->
|
||||
<component-title :propTitle="data_base.home_data_list_title || $t('index.index.1vf378')" propMoreUrl="/pages/plugins/realstore/search/search"></component-title>
|
||||
<!-- 数据列表 -->
|
||||
<component-realstore-list :propDataList="data_list" :propFavorUser="favor_user"></component-realstore-list>
|
||||
<component-realstore-list :propData="{data: data_list}" :propFavorUser="favor_user"></component-realstore-list>
|
||||
</view>
|
||||
<!-- 结尾 -->
|
||||
<component-bottom-line :propStatus="data_bottom_line_status"></component-bottom-line>
|
||||
|
|
@ -100,6 +100,8 @@
|
|||
location_tips_close_status: false,
|
||||
// 自定义分享信息
|
||||
share_info: {},
|
||||
// 增加随机数,避免无法监听数据列表内部数据更新
|
||||
random_value: 0,
|
||||
};
|
||||
},
|
||||
|
||||
|
|
@ -200,6 +202,7 @@
|
|||
var data = res.data.data;
|
||||
var data_list = data.data_list || [];
|
||||
this.setData({
|
||||
random_value: Math.random(),
|
||||
data_base: data.base || null,
|
||||
favor_user: data.favor_user || [],
|
||||
slider_list: data.slider_list || [],
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
<!-- 列表 -->
|
||||
<scroll-view :scroll-y="true" class="scroll-box scroll-box-ece-nav" @scrolltolower="scroll_lower" lower-threshold="60">
|
||||
<view v-if="(data_list || null) != null && data_list.length > 0" class="padding-top-main padding-horizontal-main">
|
||||
<component-realstore-list :propDataList="data_list" :propFavorUser="favor_user"></component-realstore-list>
|
||||
<component-realstore-list :propData="{data: data_list}" :propFavorUser="favor_user"></component-realstore-list>
|
||||
</view>
|
||||
<view v-else>
|
||||
<!-- 提示信息 -->
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
<view :class="theme_view">
|
||||
<view class="page-bottom-fixed">
|
||||
<view v-if="data_base != null">
|
||||
<form @submit="formSubmit" class="form-container">
|
||||
<form @submit="form_submit" class="form-container">
|
||||
<view class="padding-main oh">
|
||||
<view class="padding-main border-radius-main bg-white spacing-mb">
|
||||
<view>
|
||||
|
|
@ -58,7 +58,7 @@
|
|||
data() {
|
||||
return {
|
||||
theme_view: app.globalData.get_theme_value_view(),
|
||||
params: null,
|
||||
params: {},
|
||||
form_submit_loading: false,
|
||||
data_list_loding_status: 1,
|
||||
data_list_loding_msg: '',
|
||||
|
|
@ -78,7 +78,7 @@
|
|||
|
||||
// 设置参数
|
||||
this.setData({
|
||||
params: params,
|
||||
params: params || {},
|
||||
});
|
||||
|
||||
// 设置标题
|
||||
|
|
@ -112,7 +112,7 @@
|
|||
uni.request({
|
||||
url: app.globalData.get_request_url('saveinfo', 'userqrcode', 'signin'),
|
||||
method: 'POST',
|
||||
data: this.params,
|
||||
data: {...this.params, ...{is_lang: 0}},
|
||||
dataType: 'json',
|
||||
success: (res) => {
|
||||
uni.stopPullDownRefresh();
|
||||
|
|
@ -145,7 +145,7 @@
|
|||
},
|
||||
|
||||
// 表单提交
|
||||
formSubmit(e) {
|
||||
form_submit(e) {
|
||||
var data = e.detail.value;
|
||||
if ((this.data || null) != null) {
|
||||
data['id'] = this.data.id || 0;
|
||||
|
|
|
|||
|
|
@ -310,6 +310,8 @@
|
|||
});
|
||||
// 重新设置当前页面导航标题
|
||||
app.globalData.set_pages_navigation_bar_title();
|
||||
// 重新读取数据配置
|
||||
app.globalData.init_config();
|
||||
},
|
||||
|
||||
// 多语言切换
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@
|
|||
<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>
|
||||
</view>
|
||||
<view class="code-search oh pr">
|
||||
<input type="text" :value="address_data.last_code || ''" maxlength="30" placeholder-class="cr-grey-9" class="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" />
|
||||
<input type="text" :value="address_data.address_last_code || ''" maxlength="30" placeholder-class="cr-grey-9" class="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" />
|
||||
<button type="default" size="mini" class="bg-black br-black cr-white text-size-xs pa" @tap="region_code_event" :disabled="form_submit_disabled_status">{{$t('user-address-save.user-address-save.mb7cjx')}}</button>
|
||||
</view>
|
||||
</view>
|
||||
|
|
@ -171,7 +171,7 @@
|
|||
theme_view: app.globalData.get_theme_value_view(),
|
||||
common_static_url: common_static_url,
|
||||
theme_color: app.globalData.get_theme_color(),
|
||||
params: null,
|
||||
params: {},
|
||||
data_list_loding_status: 1,
|
||||
data_list_loding_msg: '',
|
||||
editor_path_type: '',
|
||||
|
|
@ -219,7 +219,7 @@
|
|||
|
||||
// 设置参数
|
||||
this.setData({
|
||||
params: params,
|
||||
params: params || {},
|
||||
});
|
||||
|
||||
// 设置标题
|
||||
|
|
@ -285,7 +285,7 @@
|
|||
uni.request({
|
||||
url: app.globalData.get_request_url('detail', 'useraddress'),
|
||||
method: 'POST',
|
||||
data: this.params,
|
||||
data: {...this.params, ...{is_lang: 0}},
|
||||
dataType: 'json',
|
||||
success: (res) => {
|
||||
if (res.data.code == 0) {
|
||||
|
|
@ -302,7 +302,7 @@
|
|||
this.setData({
|
||||
address_data: ads_data || {},
|
||||
idcard_images_data: idcard_images,
|
||||
editor_path_type: data.editor_path_type || '',
|
||||
editor_path_type: data.editor_path_type || '',
|
||||
data_list_loding_status: 3,
|
||||
});
|
||||
if (this.alias_list.indexOf(alias) === -1) {
|
||||
|
|
@ -718,15 +718,15 @@
|
|||
region_picker_show: false,
|
||||
});
|
||||
},
|
||||
region_event(address1, address2, address3) {
|
||||
if((address1 || null) == null) {
|
||||
address1 = {};
|
||||
}
|
||||
if((address2 || null) == null) {
|
||||
address2 = {};
|
||||
}
|
||||
if((address3 || null) == null) {
|
||||
address3 = {};
|
||||
region_event(address1, address2, address3) {
|
||||
if((address1 || null) == null) {
|
||||
address1 = {};
|
||||
}
|
||||
if((address2 || null) == null) {
|
||||
address2 = {};
|
||||
}
|
||||
if((address3 || null) == null) {
|
||||
address3 = {};
|
||||
}
|
||||
this.setData({
|
||||
province_id: address1.id || null,
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
<view :class="theme_view">
|
||||
<view class="padding-main">
|
||||
<view v-if="detail != null">
|
||||
<form @submit="formSubmit" class="form-container">
|
||||
<form @submit="form_submit" class="form-container">
|
||||
<view v-for="(item, index) in detail.items" :key="index" class="form-gorup oh">
|
||||
<view class="oh">
|
||||
<view :data-value="item.goods_url" @tap="url_event" class="cp">
|
||||
|
|
@ -307,7 +307,7 @@ export default {
|
|||
},
|
||||
|
||||
// 表单
|
||||
formSubmit(e) {
|
||||
form_submit(e) {
|
||||
// 商品数量
|
||||
var length = this.detail.items.length;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue