chore(多语言): 部分多语言采用 isEnEnv 变量了判断,后面移植到语言包中

This commit is contained in:
2025-12-29 10:56:04 +08:00
parent f9973d9546
commit 74c7eaf497
7 changed files with 303 additions and 278 deletions

View File

@@ -334,7 +334,11 @@ export default {
let diyDataValue = res.data; let diyDataValue = res.data;
if (diyDataValue.value) { if (diyDataValue.value) {
this.diyData = JSON.parse(diyDataValue.value); this.diyData = JSON.parse(diyDataValue.value);
this.$langConfig.title(this.diyData.global.title);
// 导航栏标题要根据语言环境切换
const title = this.isEnEnv ? this.diyData?.global?.en_title : this.diyData?.global?.title;
if (title) this.$langConfig.title(title);
this.mpCollect = this.diyData.global.mpCollect; this.mpCollect = this.diyData.global.mpCollect;
this.setPublicShare(); this.setPublicShare();
/* if (this.diyData.global.popWindow && this.diyData.global.popWindow.imageUrl) { /* if (this.diyData.global.popWindow && this.diyData.global.popWindow.imageUrl) {

View File

@@ -92,6 +92,8 @@ export default {
} }
} }
if (value == undefined || (value == 'title' && field == 'title')) value = ''; // field if (value == undefined || (value == 'title' && field == 'title')) value = ''; // field
console.log(`字段: ${field}, 值: ${value}`)
return value; return value;
}, },
/** /**

View File

@@ -26,99 +26,101 @@
</template> </template>
<script> <script>
import nsLogin from '@/components/ns-login/ns-login.vue'; import nsLogin from '@/components/ns-login/ns-login.vue';
import loadingCover from '@/components/loading-cover/loading-cover.vue'; import loadingCover from '@/components/loading-cover/loading-cover.vue';
// #ifdef MP-WEIXIN // #ifdef MP-WEIXIN
import privacyPopup from '@/components/wx-privacy-popup/privacy-popup.vue'; import privacyPopup from '@/components/wx-privacy-popup/privacy-popup.vue';
// #endif // #endif
export default { export default {
components: { components: {
nsLogin, nsLogin,
loadingCover, loadingCover,
// #ifdef MP-WEIXIN // #ifdef MP-WEIXIN
privacyPopup privacyPopup
// #endif // #endif
}, },
data() { data() {
return { return {
diyData: null diyData: null
}; };
}, },
onLoad() { onLoad() {
//刷新多语言 //刷新多语言
this.$langConfig.refresh(); this.$langConfig.refresh();
uni.hideTabBar();
this.getDiyInfo(); uni.hideTabBar();
}, this.getDiyInfo();
onShow() { },
if (this.$refs.category) this.$refs.category[0].pageShow(); onShow() {
}, if (this.$refs.category) this.$refs.category[0].pageShow();
onUnload() { },
if (!this.storeToken && this.$refs.login) this.$refs.login.cancelCompleteInfo(); onUnload() {
}, if (!this.storeToken && this.$refs.login) this.$refs.login.cancelCompleteInfo();
methods: { },
getDiyInfo() { methods: {
this.$api.sendRequest({ getDiyInfo() {
url: '/api/diyview/info', this.$api.sendRequest({
data: { url: '/api/diyview/info',
name: 'DIY_VIEW_GOODS_CATEGORY' data: {
}, name: 'DIY_VIEW_GOODS_CATEGORY'
success: res => { },
if (res.code == 0 && res.data) { success: res => {
this.diyData = res.data; if (res.code == 0 && res.data) {
if (this.diyData.value) { this.diyData = res.data;
this.diyData = JSON.parse(this.diyData.value); if (this.diyData.value) {
if (this.$refs.loadingCover) this.$refs.loadingCover.hide(); this.diyData = JSON.parse(this.diyData.value);
} if (this.$refs.loadingCover) this.$refs.loadingCover.hide();
uni.stopPullDownRefresh();
} }
uni.stopPullDownRefresh();
} }
}); }
}, });
toLogin() {
this.$refs.login.open('/pages/goods/category')
}
}, },
onPullDownRefresh() { toLogin() {
uni.hideTabBar(); this.$refs.login.open('/pages/goods/category')
this.getDiyInfo();
} }
}; },
onPullDownRefresh() {
uni.hideTabBar();
this.getDiyInfo();
}
};
</script> </script>
<style lang="scss"> <style lang="scss">
/deep/ .uni-popup__wrapper.uni-center { /deep/ .uni-popup__wrapper.uni-center {
background: rgba(0, 0, 0, 0.6); background: rgba(0, 0, 0, 0.6);
} }
/deep/ .uni-popup__wrapper-box { /deep/ .uni-popup__wrapper-box {
border-radius: 0 !important; border-radius: 0 !important;
} }
/deep/ .uni-popup__wrapper.uni-custom.center .uni-popup__wrapper-box { /deep/ .uni-popup__wrapper.uni-custom.center .uni-popup__wrapper-box {
overflow-y: visible; overflow-y: visible;
} }
/deep/ .loading-layer { /deep/ .loading-layer {
background: #fff !important; background: #fff !important;
} }
// 分类四一级展开 // 分类四一级展开
/deep/ .category-template-4 .template-four .uni-popup__wrapper-box { /deep/ .category-template-4 .template-four .uni-popup__wrapper-box {
border-radius: 0px 0px 14px 14px !important; border-radius: 0px 0px 14px 14px !important;
overflow: hidden; overflow: hidden;
} }
/deep/ .category-template-4 .content-wrap .categoty-goods-wrap .goods-list { /deep/ .category-template-4 .content-wrap .categoty-goods-wrap .goods-list {
margin-top: 30rpx; margin-top: 30rpx;
} }
/deep/ .category-template-4 .content-wrap .goods-list .goods-item .footer-wrap .right-wrap .num-action { /deep/ .category-template-4 .content-wrap .goods-list .goods-item .footer-wrap .right-wrap .num-action {
width: 46rpx; width: 46rpx;
height: 46rpx; height: 46rpx;
} }
/deep/ .uni-page-refresh-inner .uni-page-refresh__path { /deep/ .uni-page-refresh-inner .uni-page-refresh__path {
stroke: rgb(1, 1, 1) !important; stroke: rgb(1, 1, 1) !important;
} }
</style> </style>

View File

@@ -1,7 +1,8 @@
<template> <template>
<page-meta :page-style="themeColor"></page-meta> <page-meta :page-style="themeColor"></page-meta>
<view :style="{ backgroundColor: bgColor, minHeight: openBottomNav ? 'calc(100vh - 55px)' : '' }" class="page-img"> <view :style="{ backgroundColor: bgColor, minHeight: openBottomNav ? 'calc(100vh - 55px)' : '' }" class="page-img">
<view class="site-info-box" v-if="$util.isWeiXin() && followOfficialAccount && followOfficialAccount.isShow && wechatQrcode"> <view class="site-info-box"
v-if="$util.isWeiXin() && followOfficialAccount && followOfficialAccount.isShow && wechatQrcode">
<view class="site-info"> <view class="site-info">
<view class="img-box" v-if="siteInfo.logo_square"> <view class="img-box" v-if="siteInfo.logo_square">
<image :src="$util.img(siteInfo.logo_square)" mode="aspectFill"></image> <image :src="$util.img(siteInfo.logo_square)" mode="aspectFill"></image>
@@ -11,49 +12,55 @@
<text>{{ followOfficialAccount.welcomeMsg }}</text> <text>{{ followOfficialAccount.welcomeMsg }}</text>
</view> </view>
</view> </view>
<view class="dite-button" @click="officialAccountsOpen">关注公众号</view> <view class="dite-button" @click="officialAccountsOpen">{{ isEnEnv ? 'Follow Official Account' : '关注公众号' }}</view>
</view> </view>
<!-- <view class="page-header" v-if="diyData.global && diyData.global.navBarSwitch" :style="{ backgroundImage: bgImg }"> <!-- <view class="page-header" v-if="diyData.global && diyData.global.navBarSwitch" :style="{ backgroundImage: bgImg }">
<ns-navbar :title-color="textNavColor" :data="diyData.global" :scrollTop="scrollTop" :isBack="false"/> <ns-navbar :title-color="textNavColor" :data="diyData.global" :scrollTop="scrollTop" :isBack="false"/>
</view> --> </view> -->
<diy-index-page v-if="topIndexValue" ref="indexPage" :value="topIndexValue" :bgUrl="bgUrl" :scrollTop="scrollTop" :diyGlobal="diyData.global" class="diy-index-page"> <diy-index-page v-if="topIndexValue" ref="indexPage" :value="topIndexValue" :bgUrl="bgUrl"
:scrollTop="scrollTop" :diyGlobal="diyData.global" class="diy-index-page">
<template v-slot:components> <template v-slot:components>
<diy-group ref="diyGroup" v-if="diyData.value" :diyData="diyData" :scrollTop="scrollTop" :haveTopCategory="true" :followOfficialAccount="followOfficialAccount"/> <diy-group ref="diyGroup" v-if="diyData.value" :diyData="diyData" :scrollTop="scrollTop"
:haveTopCategory="true" :followOfficialAccount="followOfficialAccount" />
</template> </template>
<template v-slot:default> <template v-slot:default>
<ns-copyright v-show="isShowCopyRight"/> <ns-copyright v-show="isShowCopyRight" />
</template> </template>
</diy-index-page> </diy-index-page>
<view v-else class="bg-index" :style="{ backgroundImage: backgroundUrl, paddingTop: paddingTop, marginTop: marginTop }"> <view v-else class="bg-index"
<diy-group ref="diyGroup" v-if="diyData.value" :diyData="diyData" :scrollTop="scrollTop" :followOfficialAccount="followOfficialAccount"/> :style="{ backgroundImage: backgroundUrl, paddingTop: paddingTop, marginTop: marginTop }">
<ns-copyright v-show="isShowCopyRight"/> <diy-group ref="diyGroup" v-if="diyData.value" :diyData="diyData" :scrollTop="scrollTop"
:followOfficialAccount="followOfficialAccount" />
<ns-copyright v-show="isShowCopyRight" />
</view> </view>
<template v-if="adv.advshow != -1"> <template v-if="adv.advshow != -1">
<view @touchmove.prevent.stop> <view @touchmove.prevent.stop>
<uni-popup ref="uniPopupWindow" type="center" class="wap-floating" :maskClick="false"> <uni-popup ref="uniPopupWindow" type="center" class="wap-floating" :maskClick="false">
<view class="small-bot"> <view class="small-bot">
<!-- <view class="adver-time" wx:if="{{startadv.params.style=='default'&&startadv.params.canclose==1}}"> <!-- <view class="adver-time" wx:if="{{startadv.params.style=='default'&&startadv.params.canclose==1}}">
<view bindtap="adverclose">跳过</view> <view bindtap="adverclose">跳过</view>
<view class="time">{{clock}}s</view> <view class="time">{{clock}}s</view>
</view> </view>
<view class="adver-time" wx:if="{{startadv.params.style=='default'&&startadv.params.canclose==0}}"> <view class="adver-time" wx:if="{{startadv.params.style=='default'&&startadv.params.canclose==0}}">
<view class="time" style="line-height: 64rpx;">{{clock}}s</view> <view class="time" style="line-height: 64rpx;">{{clock}}s</view>
</view> --> </view> -->
<swiper autoplay="true" :circular="true" indicator-active-color="#fff" indicator-color="rgba(255,255,255,0.6)" :indicator-dots="true" interval="3000"> <swiper autoplay="true" :circular="true" indicator-active-color="#fff"
indicator-color="rgba(255,255,255,0.6)" :indicator-dots="true" interval="3000">
<swiper-item v-for="(item, index) in adv.list" :key="index"> <swiper-item v-for="(item, index) in adv.list" :key="index">
<image class="slide-image" @click="$util.diyRedirectTo(item.link)" height="100%" :src="$util.img(item.imageUrl)" width="100%"></image> <image class="slide-image" @click="$util.diyRedirectTo(item.link)" height="100%"
<!-- <image bindtap="adverclose" class="slide-image" height="100%" src="{{item.imgurl}}" width="100%" wx:if="{{item.click==1}}"></image> --> :src="$util.img(item.imageUrl)" width="100%"></image>
<!-- <image bindtap="adverclose" class="slide-image" height="100%" src="{{item.imgurl}}" width="100%" wx:if="{{item.click==1}}"></image> -->
</swiper-item> </swiper-item>
</swiper> </swiper>
<view bindtap="adverclose" class="small-bot-close" @click="closePopupWindow"> <view bindtap="adverclose" class="small-bot-close" @click="closePopupWindow">
<i class="iconfont icon-round-close" style="color:#fff"></i> <i class="iconfont icon-round-close" style="color:#fff"></i>
</view> </view>
</view> </view>
<!-- <view class="image-wrap"> <!-- <view class="image-wrap">
<swiper class="swiper" style="width:100%;height: 1200rpx;" :autoplay="true" interval="3000" circular="true" :indicator-dots="true" indicator-color="#000" indicator-active-color="red"> <swiper class="swiper" style="width:100%;height: 1200rpx;" :autoplay="true" interval="3000" circular="true" :indicator-dots="true" indicator-color="#000" indicator-active-color="red">
<swiper-item class="swiper-item" v-for="(item, index) in adv.list" :key="index" v-if="item.imageUrl" @click="$util.diyRedirectTo(item.link)"> <swiper-item class="swiper-item" v-for="(item, index) in adv.list" :key="index" v-if="item.imageUrl" @click="$util.diyRedirectTo(item.link)">
<view class="item"> <view class="item">
@@ -69,7 +76,7 @@
<!-- 底部tabBar --> <!-- 底部tabBar -->
<view class="page-bottom" v-if="openBottomNav"> <view class="page-bottom" v-if="openBottomNav">
<diy-bottom-nav @callback="callback" :name="name"/> <diy-bottom-nav @callback="callback" :name="name" />
</view> </view>
<!-- 关注公众号弹窗 --> <!-- 关注公众号弹窗 -->
@@ -85,8 +92,9 @@
<!-- 收藏 --> <!-- 收藏 -->
<uni-popup ref="collectPopupWindow" type="top" class="wap-floating wap-floating-collect"> <uni-popup ref="collectPopupWindow" type="top" class="wap-floating wap-floating-collect">
<view v-if="showTip" class="collectPopupWindow" :style="{ marginTop: (collectTop + statusBarHeight) * 2 + 'rpx' }"> <view v-if="showTip" class="collectPopupWindow"
<image :src="$util.img('public/uniapp/index/collect2.png')" mode="aspectFit"/> :style="{ marginTop: (collectTop + statusBarHeight) * 2 + 'rpx' }">
<image :src="$util.img('public/uniapp/index/collect2.png')" mode="aspectFit" />
<text @click="closeCollectPopupWindow">我知道了</text> <text @click="closeCollectPopupWindow">我知道了</text>
</view> </view>
</uni-popup> </uni-popup>
@@ -99,7 +107,8 @@
<view class="position-wrap"> <view class="position-wrap">
<text class="iconfont icon-dizhi"></text> <text class="iconfont icon-dizhi"></text>
<text class="address">{{ currentPosition }}</text> <text class="address">{{ currentPosition }}</text>
<view class="reposition" @click="reposition" v-if="globalStoreConfig && globalStoreConfig.is_allow_change == 1"> <view class="reposition" @click="reposition"
v-if="globalStoreConfig && globalStoreConfig.is_allow_change == 1">
<text class="iconfont icon-dingwei"></text> <text class="iconfont icon-dingwei"></text>
<text>重新定位</text> <text>重新定位</text>
</view> </view>
@@ -110,11 +119,14 @@
<view class="address">{{ nearestStore.show_address }}</view> <view class="address">{{ nearestStore.show_address }}</view>
<view class="distance" v-if="nearestStore.distance"> <view class="distance" v-if="nearestStore.distance">
<text class="iconfont icon-dizhi"></text> <text class="iconfont icon-dizhi"></text>
<text>{{ nearestStore.distance > 1 ? nearestStore.distance + 'km' : nearestStore.distance * 1000 + 'm' }}</text> <text>{{ nearestStore.distance > 1 ? nearestStore.distance + 'km' : nearestStore.distance *
1000 +
'm' }}</text>
</view> </view>
</view> </view>
<button type="primary" @click="enterStore">确认进入</button> <button type="primary" @click="enterStore">确认进入</button>
<view class="other-store" @click="chooseOtherStore" v-if="globalStoreConfig && globalStoreConfig.is_allow_change == 1"> <view class="other-store" @click="chooseOtherStore"
v-if="globalStoreConfig && globalStoreConfig.is_allow_change == 1">
<text>选择其他门店</text> <text>选择其他门店</text>
<text class="iconfont icon-right"></text> <text class="iconfont icon-right"></text>
</view> </view>
@@ -126,123 +138,122 @@
<!-- 小程序隐私协议 --> <!-- 小程序隐私协议 -->
<privacy-popup ref="privacyPopup"></privacy-popup> <privacy-popup ref="privacyPopup"></privacy-popup>
<!-- #endif --> <!-- #endif -->
<to-top v-if="showTop" @toTop="scrollToTopNative()"></to-top> <to-top v-if="showTop" @toTop="scrollToTopNative()"></to-top>
<ns-login ref="login"></ns-login> <ns-login ref="login"></ns-login>
</view> </view>
</template> </template>
<script> <script>
import uniPopup from '@/components/uni-popup/uni-popup.vue'; import uniPopup from '@/components/uni-popup/uni-popup.vue';
import nsNavbar from '@/components/ns-navbar/ns-navbar.vue'; import nsNavbar from '@/components/ns-navbar/ns-navbar.vue';
import nsLogin from '@/components/ns-login/ns-login.vue'; import nsLogin from '@/components/ns-login/ns-login.vue';
// #ifdef MP-WEIXIN // #ifdef MP-WEIXIN
import privacyPopup from '@/components/wx-privacy-popup/privacy-popup.vue'; import privacyPopup from '@/components/wx-privacy-popup/privacy-popup.vue';
// #endif // #endif
import diyJs from '@/common/js/diy.js'; import diyJs from '@/common/js/diy.js';
import indexJs from './public/js/index.js'; import toTop from '@/components/toTop/toTop.vue';
import toTop from '@/components/toTop/toTop.vue'; import scroll from '@/common/js/scroll-view.js';
import scroll from '@/common/js/scroll-view.js';
import indexJs from './public/js/index.js';
export default { export default {
components: { components: {
uniPopup, uniPopup,
nsNavbar, nsNavbar,
toTop, toTop,
nsLogin, nsLogin,
// #ifdef MP-WEIXIN // #ifdef MP-WEIXIN
privacyPopup privacyPopup
// #endif // #endif
}, },
mixins: [diyJs, scroll, indexJs] mixins: [diyJs, scroll, indexJs]
}; };
</script> </script>
<style lang="scss"> <style lang="scss">
@import '@/common/css/diy.scss'; @import '@/common/css/diy.scss';
@import './public/css/index.scss'; @import './public/css/index.scss';
.small-bot { .small-bot {
width: 100%; width: 100%;
height: 100%; height: 100%;
position: fixed; position: fixed;
top: 0; top: 0;
bottom: 0; bottom: 0;
left: 0; left: 0;
right: 0; right: 0;
z-index: 122; z-index: 122;
} }
.small-bot swiper { .small-bot swiper {
width: 560rpx; width: 560rpx;
height: 784rpx; height: 784rpx;
margin: 120rpx auto 0; margin: 120rpx auto 0;
border-radius: 10rpx; border-radius: 10rpx;
overflow: hidden; overflow: hidden;
} }
.small-bot swiper .slide-image { .small-bot swiper .slide-image {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
.small-bot-close { .small-bot-close {
width: 66rpx; width: 66rpx;
height: 66rpx; height: 66rpx;
border-radius: 50%; border-radius: 50%;
text-align: center; text-align: center;
line-height: 64rpx; line-height: 64rpx;
font-size: 64rpx; font-size: 64rpx;
color: #fff; color: #fff;
margin: 30rpx auto 0; margin: 30rpx auto 0;
} }
.small-bot-close i {
font-size: 60rpx;
}
.small-bot-close i {
font-size: 60rpx;
}
</style> </style>
<style scoped> <style scoped>
.swiper /deep/ .uni-swiper-dots-horizontal { .swiper /deep/ .uni-swiper-dots-horizontal {
left: 40%; left: 40%;
bottom:40px bottom: 40px
} }
.wap-floating>>>.uni-popup__wrapper.uni-custom .uni-popup__wrapper-box {
background: none !important;
}
.choose-store>>>.goodslist-uni-popup-box { .wap-floating>>>.uni-popup__wrapper.uni-custom .uni-popup__wrapper-box {
width: 80%; background: none !important;
} }
/deep/.diy-index-page .uni-popup .uni-popup__wrapper-box { .choose-store>>>.goodslist-uni-popup-box {
border-radius: 0; width: 80%;
} }
/deep/ .placeholder { /deep/.diy-index-page .uni-popup .uni-popup__wrapper-box {
height: 0; border-radius: 0;
} }
/deep/::-webkit-scrollbar { /deep/ .placeholder {
width: 0; height: 0;
height: 0; }
background-color: transparent;
display: none;
}
/deep/ .sku-layer .uni-popup__wrapper.uni-custom .uni-popup__wrapper-box { /deep/::-webkit-scrollbar {
max-height: unset !important; width: 0;
} height: 0;
background-color: transparent;
display: none;
}
/deep/ .mescroll-totop { /deep/ .sku-layer .uni-popup__wrapper.uni-custom .uni-popup__wrapper-box {
/* #ifdef H5 */ max-height: unset !important;
right: 28rpx!important; }
bottom: 200rpx!important;
/* #endif */
/* #ifdef MP-WEIXIN */
right: 27rpx!important;
bottom: 180rpx!important;
/* #endif */
}
/deep/ .mescroll-totop {
/* #ifdef H5 */
right: 28rpx !important;
bottom: 200rpx !important;
/* #endif */
/* #ifdef MP-WEIXIN */
right: 27rpx !important;
bottom: 180rpx !important;
/* #endif */
}
</style> </style>

View File

@@ -1,30 +1,36 @@
<template> <template>
<page-meta :page-style="themeColor"></page-meta> <page-meta :page-style="themeColor"></page-meta>
<view :style="{ backgroundColor: bgColor, minHeight: openBottomNav ? 'calc(100vh - 55px)' : '' }" class="page-img"> <view :style="{ backgroundColor: bgColor, minHeight: openBottomNav ? 'calc(100vh - 55px)' : '' }" class="page-img">
<view class="page-header" v-if="diyData.global && diyData.global.navBarSwitch" :style="{ backgroundImage: bgImg }"> <view class="page-header" v-if="diyData.global && diyData.global.navBarSwitch"
<ns-navbar :title-color="textNavColor" :data="diyData.global" :scrollTop="scrollTop" :isBack="true"/> :style="{ backgroundImage: bgImg }">
<ns-navbar :title-color="textNavColor" :data="diyData.global" :scrollTop="scrollTop" :isBack="true" />
</view> </view>
<diy-index-page v-if="topIndexValue" ref="indexPage" :value="topIndexValue" :bgUrl="bgUrl" :scrollTop="scrollTop" :diyGlobal="diyData.global" class="diy-index-page"> <diy-index-page v-if="topIndexValue" ref="indexPage" :value="topIndexValue" :bgUrl="bgUrl"
<diy-group ref="diyGroup" v-if="diyData.value" :diyData="diyData" :scrollTop="scrollTop" :haveTopCategory="true"/> :scrollTop="scrollTop" :diyGlobal="diyData.global" class="diy-index-page">
<ns-copyright v-show="isShowCopyRight"/> <diy-group ref="diyGroup" v-if="diyData.value" :diyData="diyData" :scrollTop="scrollTop"
:haveTopCategory="true" />
<ns-copyright v-show="isShowCopyRight" />
</diy-index-page> </diy-index-page>
<view v-else class="bg-index" :style="{ backgroundImage: backgroundUrl, paddingTop: paddingTop, marginTop: marginTop }"> <view v-else class="bg-index"
<diy-group ref="diyGroup" v-if="diyData.value" :diyData="diyData" :scrollTop="scrollTop"/> :style="{ backgroundImage: backgroundUrl, paddingTop: paddingTop, marginTop: marginTop }">
<ns-copyright v-show="isShowCopyRight"/> <diy-group ref="diyGroup" v-if="diyData.value" :diyData="diyData" :scrollTop="scrollTop" />
<ns-copyright v-show="isShowCopyRight" />
<view class="foot"> <view class="foot">
<view class="item" @click="tourl('/pages_tool/agreement/contenr?type=0')">隐私协议</view> <view class="item" @click="tourl('/pages_tool/agreement/contenr?type=0')">{{ isEnEnv ? 'Privacy Policy' : '隐私协议'}}</view>
<view class="item" @click="tourl('/pages_tool/agreement/contenr?type=1')">注册协议</view> <view class="item" @click="tourl('/pages_tool/agreement/contenr?type=1')">{{ isEnEnv ? 'Registration Agreement' : '注册协议'}}</view>
</view> </view>
</view> </view>
<template v-if="diyData.global && diyData.global.popWindow && diyData.global.popWindow.count != -1 && diyData.global.popWindow.imageUrl"> <template
v-if="diyData.global && diyData.global.popWindow && diyData.global.popWindow.count != -1 && diyData.global.popWindow.imageUrl">
<view @touchmove.prevent.stop> <view @touchmove.prevent.stop>
<uni-popup ref="uniPopupWindow" type="center" class="wap-floating" :maskClick="false"> <uni-popup ref="uniPopupWindow" type="center" class="wap-floating" :maskClick="false">
<view class="image-wrap"> <view class="image-wrap">
<image :src="$util.img(diyData.global.popWindow.imageUrl)" :style="popWindowStyle" @click="uniPopupWindowFn()" mode="aspectFit"/> <image :src="$util.img(diyData.global.popWindow.imageUrl)" :style="popWindowStyle"
@click="uniPopupWindowFn()" mode="aspectFit" />
</view> </view>
<text class="iconfont icon-round-close" @click="closePopupWindow"></text> <text class="iconfont icon-round-close" @click="closePopupWindow"></text>
</uni-popup> </uni-popup>
@@ -33,13 +39,14 @@
<!-- 底部tabBar --> <!-- 底部tabBar -->
<view id="tab-bar" :class="{ hide: bottomNavHidden }" v-if="openBottomNav"> <view id="tab-bar" :class="{ hide: bottomNavHidden }" v-if="openBottomNav">
<diy-bottom-nav @callback="callback"/> <diy-bottom-nav @callback="callback" />
</view> </view>
<!-- 收藏 --> <!-- 收藏 -->
<uni-popup ref="collectPopupWindow" type="top" class="wap-floating wap-floating-collect"> <uni-popup ref="collectPopupWindow" type="top" class="wap-floating wap-floating-collect">
<view v-if="showTip" class="collectPopupWindow" :style="{ marginTop: (collectTop + statusBarHeight) * 2 + 'rpx' }"> <view v-if="showTip" class="collectPopupWindow"
<image :src="$util.img('public/uniapp/index/collect2.png')" mode="aspectFit"/> :style="{ marginTop: (collectTop + statusBarHeight) * 2 + 'rpx' }">
<image :src="$util.img('public/uniapp/index/collect2.png')" mode="aspectFit" />
<text @click="closeCollectPopupWindow">我知道了</text> <text @click="closeCollectPopupWindow">我知道了</text>
</view> </view>
</uni-popup> </uni-popup>
@@ -57,71 +64,73 @@
</template> </template>
<script> <script>
import uniPopup from '@/components/uni-popup/uni-popup.vue'; import uniPopup from '@/components/uni-popup/uni-popup.vue';
import nsNavbar from '@/components/ns-navbar/ns-navbar.vue'; import nsNavbar from '@/components/ns-navbar/ns-navbar.vue';
import diyJs from '@/common/js/diy.js'; import diyJs from '@/common/js/diy.js';
import indexJs from './public/js/index.js'; import indexJs from './public/js/index.js';
export default { export default {
components: { components: {
uniPopup, uniPopup,
nsNavbar nsNavbar
}, },
mixins: [diyJs, indexJs], mixins: [diyJs, indexJs],
methods:{ methods: {
tourl(url){
this.$util.redirectTo(url);
}
tourl(url) {
this.$util.redirectTo(url);
} }
};
}
};
</script> </script>
<style lang="scss"> <style lang="scss">
@import '@/common/css/diy.scss'; @import '@/common/css/diy.scss';
.foot{
display: flex; .foot {
// position: absolute; display: flex;
width: 100%; // position: absolute;
margin-bottom: 40rpx; width: 100%;
.item{ margin-bottom: 40rpx;
width: 50%;
text-align: center; .item {
color:#F4391c width: 50%;
} text-align: center;
color: #F4391c
} }
}
</style> </style>
<style scoped> <style scoped>
.wap-floating>>>.uni-popup__wrapper.uni-custom .uni-popup__wrapper-box { .wap-floating>>>.uni-popup__wrapper.uni-custom .uni-popup__wrapper-box {
background: none !important; background: none !important;
} }
/deep/.diy-index-page .uni-popup .uni-popup__wrapper-box { /deep/.diy-index-page .uni-popup .uni-popup__wrapper-box {
border-radius: 0; border-radius: 0;
} }
.choose-store>>>.goodslist-uni-popup-box { .choose-store>>>.goodslist-uni-popup-box {
width: 80%; width: 80%;
} }
/deep/ .placeholder { /deep/ .placeholder {
height: 0; height: 0;
} }
/deep/::-webkit-scrollbar { /deep/::-webkit-scrollbar {
width: 0; width: 0;
height: 0; height: 0;
background-color: transparent; background-color: transparent;
display: none; display: none;
} }
.hide { .hide {
display: none; display: none;
} }
/deep/ .sku-layer .uni-popup__wrapper.uni-custom .uni-popup__wrapper-box { /deep/ .sku-layer .uni-popup__wrapper.uni-custom .uni-popup__wrapper-box {
max-height: unset !important; max-height: unset !important;
} }
</style> </style>

View File

@@ -15,9 +15,6 @@ export default {
} }
}, },
onLoad(data) { onLoad(data) {
//刷新多语言
this.$langConfig.refresh();
uni.hideTabBar(); uni.hideTabBar();
this.name = 'DIY_VIEW_MEMBER_INDEX'; this.name = 'DIY_VIEW_MEMBER_INDEX';
if (data.code) { if (data.code) {

View File

@@ -217,19 +217,19 @@
<uni-popup ref="pointPopup" type="bottom"> <uni-popup ref="pointPopup" type="bottom">
<view class="tips-layer"> <view class="tips-layer">
<view class="head" @click="closePointPopup()"> <view class="head" @click="closePointPopup()">
<view class="title">积分说明</view> <view class="title">{{ isEnEnv ? 'Integral Description' : '积分说明'}}</view>
<text class="iconfont icon-close"></text> <text class="iconfont icon-close"></text>
</view> </view>
<view class="body"> <view class="body">
<view class="detail margin-bottom"> <view class="detail margin-bottom">
<view class="tip">积分的获取</view> <view class="tip">{{ isEnEnv ? 'Integral Acquisition' : '积分的获取'}}</view>
<view class="font-size-base">1积分可在注册签到分享消费充值时获得</view> <view class="font-size-base">1积分可在注册签到分享消费充值时获得</view>
<view class="font-size-base">2在购买部分商品时可获得积分</view> <view class="font-size-base">2在购买部分商品时可获得积分</view>
<view class="tip">积分的使用</view> <view class="tip">{{ isEnEnv ? 'Integral Use' : '积分的使用'}}</view>
<view class="font-size-base">1积分可用于兑换积分中心的商品</view> <view class="font-size-base">1积分可用于兑换积分中心的商品</view>
<view class="font-size-base">2积分可在参与某些活动时使用</view> <view class="font-size-base">2积分可在参与某些活动时使用</view>
<view class="font-size-base">3积分不得转让出售不设有效期</view> <view class="font-size-base">3积分不得转让出售不设有效期</view>
<view class="tip">积分的查询</view> <view class="tip">{{ isEnEnv ? 'Integral Query' : '积分的查询'}}</view>
<view class="font-size-base">1积分可在会员中心中查询具体数额以及明细</view> <view class="font-size-base">1积分可在会员中心中查询具体数额以及明细</view>
</view> </view>
</view> </view>