mirror of
https://gitee.com/niucloud-team/niucloud.git
synced 2025-12-14 02:22:48 +00:00
up
This commit is contained in:
parent
568269b6a7
commit
680441cecc
@ -254,7 +254,7 @@ const refresh = () => {
|
|||||||
handleData()
|
handleData()
|
||||||
const query = uni.createSelectorQuery().in(instance);
|
const query = uni.createSelectorQuery().in(instance);
|
||||||
query.select('.diy-graphic-nav').boundingClientRect((data: any) => {
|
query.select('.diy-graphic-nav').boundingClientRect((data: any) => {
|
||||||
height.value = data.height;
|
if(data) height.value = data.height;
|
||||||
}).exec();
|
}).exec();
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,33 +1,33 @@
|
|||||||
{
|
{
|
||||||
"cashOutNow": "立即提现",
|
"cashOutNow": "立即提现",
|
||||||
"balanceDetail": "余额明细",
|
"balanceDetail": "余额明细",
|
||||||
"cashOutTo": "提现到",
|
"cashOutTo": "提现到",
|
||||||
"cashOutTypePlaceholder": "请选择提现方式",
|
"cashOutTypePlaceholder": "请选择提现方式",
|
||||||
"wechatpay": "微信默认钱包",
|
"wechatpay": "微信默认钱包",
|
||||||
"cashOutMoneyTip": "提现金额",
|
"cashOutMoneyTip": "提现金额",
|
||||||
"money": "可提现余额",
|
"money": "可提现余额",
|
||||||
"allTx": "全部提现",
|
"allTx": "全部提现",
|
||||||
"minWithdrawal": "最小提现金额为",
|
"minWithdrawal": "最小提现金额为",
|
||||||
"commissionTo": "手续费为",
|
"commissionTo": "手续费为",
|
||||||
"cashOutList": "提现记录",
|
"cashOutList": "提现记录",
|
||||||
"cashOutToWechat": "提现至微信零钱",
|
"cashOutToWechat": "提现至微信零钱",
|
||||||
"cashOutToWechatTips": "提现至微信零钱",
|
"cashOutToWechatTips": "提现至微信零钱",
|
||||||
"cashOutToAlipay": "提现至支付宝",
|
"cashOutToAlipay": "提现至支付宝",
|
||||||
"cashOutToAlipayTips": "请先添加支付宝账号",
|
"cashOutToAlipayTips": "请先添加支付宝账号",
|
||||||
"cashOutToBank": "提现至银行卡",
|
"cashOutToBank": "提现至银行卡",
|
||||||
"cashOutToBankTips": "请先添加银行卡",
|
"cashOutToBankTips": "请先添加银行卡",
|
||||||
"cashOutToWechatCode": "提现至微信",
|
"cashOutToWechatCode": "提现至微信",
|
||||||
"cashOutToWechatCodeTips": "请先添加微信号",
|
"cashOutToWechatCodeTips": "请先添加微信号",
|
||||||
"alipayAccountNo": "支付宝账号",
|
"alipayAccountNo": "支付宝账号",
|
||||||
"wechatCodeAccountNo": "微信号",
|
"wechatCodeAccountNo": "微信号",
|
||||||
"debitCard": "储蓄卡",
|
"debitCard": "储蓄卡",
|
||||||
"abnormalOperation": "异常操作",
|
"abnormalOperation": "异常操作",
|
||||||
"noAvailableCashOutType": "没有可用的提现方式",
|
"noAvailableCashOutType": "没有可用的提现方式",
|
||||||
"applyMoneyPlaceholder": "请输入提现金额",
|
"applyMoneyPlaceholder": "请输入提现金额",
|
||||||
"moneyformatError": "提现金额格式错误",
|
"moneyformatError": "提现金额格式错误",
|
||||||
"applyMoneyExceed": "提现金额超出可提现金额",
|
"applyMoneyExceed": "提现金额超出可提现金额",
|
||||||
"applyMoneyBelow": "提现金额小于最低提现金额",
|
"applyMoneyBelow": "提现金额小于最低提现金额",
|
||||||
"replace": "更换",
|
"replace": "更换",
|
||||||
"isOpenApply": "提现设置未开启",
|
"isOpenApply": "提现设置未开启",
|
||||||
"toAdd": "添加"
|
"toAdd": "添加"
|
||||||
}
|
}
|
||||||
221
uni-app/src/app/pages/index/tabbar.vue
Normal file
221
uni-app/src/app/pages/index/tabbar.vue
Normal file
@ -0,0 +1,221 @@
|
|||||||
|
<template>
|
||||||
|
<view class="w-screen h-screen flex flex-col">
|
||||||
|
<top-tabbar v-if="navbar" :data="navbar.data" :is-back="false"/>
|
||||||
|
|
||||||
|
<view class="hidden">{{ tag }}</view>
|
||||||
|
|
||||||
|
<template v-if="tabbar && Object.keys(tabbar).length">
|
||||||
|
<u-tabbar :value="page" zIndex="9999" :fixed="true" :placeholder="true" :safeAreaInsetBottom="true"
|
||||||
|
:inactive-color="tabbar.value.textColor" :active-color="tabbar.value.textHoverColor">
|
||||||
|
<block v-for="item in tabbar.value.list">
|
||||||
|
<u-tabbar-item class="py-[5rpx]" :style="{'background-color': tabbar.value.backgroundColor}" :text="item.text"
|
||||||
|
:icon="img(page == item.link.url ? item.iconSelectPath : item.iconPath)" :name="item.link"
|
||||||
|
v-if="tabbar.value.type == 1" @click="itemBtn(item.link.url)"></u-tabbar-item>
|
||||||
|
<u-tabbar-item class="py-[5rpx]" :style="{'background-color': tabbar.value.backgroundColor}"
|
||||||
|
:icon="img(page == item.link.url ? item.iconSelectPath : item.iconPath)" :name="item.link"
|
||||||
|
v-if="tabbar.value.type == 2" @click="itemBtn(item.link.url)"></u-tabbar-item>
|
||||||
|
<u-tabbar-item class="py-[5rpx]" :style="{'background-color': tabbar.value.backgroundColor}" :text="item.text" :name="item.link.url"
|
||||||
|
v-if="tabbar.value.type == 3" @click="itemBtn(item.link.url)"></u-tabbar-item>
|
||||||
|
</block>
|
||||||
|
</u-tabbar>
|
||||||
|
<view class="tab-bar-placeholder"></view>
|
||||||
|
</template>
|
||||||
|
</view>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup lang="ts">
|
||||||
|
import { ref, reactive, watch, computed } from 'vue'
|
||||||
|
import { img, redirect, urlDeconstruction } from '@/utils/common'
|
||||||
|
import { getCustomNavigationPages } from '@/utils/pages'
|
||||||
|
import useConfigStore from '@/stores/config'
|
||||||
|
import { cloneDeep } from 'lodash-es'
|
||||||
|
import useSystemStore from '@/stores/system'
|
||||||
|
import tabbarJson from '@/tabbar.json'
|
||||||
|
import zh from '@/locale/zh-Hans.json'
|
||||||
|
import en from '@/locale/en.json'
|
||||||
|
import {onPageScroll} from "@dcloudio/uni-app";
|
||||||
|
import TopTabbar from "@/components/top-tabbar/top-tabbar.vue";
|
||||||
|
import { language } from '@/locale'
|
||||||
|
|
||||||
|
uni.hideTabBar()
|
||||||
|
|
||||||
|
const customNavigationPages = getCustomNavigationPages()
|
||||||
|
const tag = ref(0)
|
||||||
|
const scrollTop = ref({})
|
||||||
|
const scrollRecord = ref({})
|
||||||
|
const systemStore = useSystemStore()
|
||||||
|
const page = computed(() => {
|
||||||
|
return systemStore.currTabbar.path
|
||||||
|
})
|
||||||
|
const tabbar:any = reactive({})
|
||||||
|
const addon = computed(() => {
|
||||||
|
if (systemStore.currTabbar.path) {
|
||||||
|
let pathArr = systemStore.currTabbar.path.split('/')
|
||||||
|
let index = !pathArr[0] ? 1 : 0;
|
||||||
|
let app = pathArr[index] == 'addon' ? pathArr[(index+1)] : 'app';
|
||||||
|
return app
|
||||||
|
}
|
||||||
|
return ''
|
||||||
|
})
|
||||||
|
const pagesRefs = ref({})
|
||||||
|
const navbar = ref(null)
|
||||||
|
const loadRecord = ref([])
|
||||||
|
|
||||||
|
const setTabbar = ()=> {
|
||||||
|
let list = cloneDeep(useConfigStore().tabbarList);
|
||||||
|
if (list.length == 1) {
|
||||||
|
Object.assign(tabbar, list[0]);
|
||||||
|
} else {
|
||||||
|
let isExist = false;
|
||||||
|
for (let i = 0; i < list.length; i++) {
|
||||||
|
if (list[i].key == addon.value) {
|
||||||
|
Object.assign(tabbar, list[i]);
|
||||||
|
isExist = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!isExist) {
|
||||||
|
|
||||||
|
// 检测是否单应用
|
||||||
|
let count = 0;
|
||||||
|
let singleTabbar = {}
|
||||||
|
try {
|
||||||
|
if (list) {
|
||||||
|
list.forEach((item: any) => {
|
||||||
|
if (item.info.type == 'app') {
|
||||||
|
count++;
|
||||||
|
singleTabbar = item;
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
if (count == 1) {
|
||||||
|
Object.assign(tabbar, singleTabbar);
|
||||||
|
}
|
||||||
|
|
||||||
|
} catch (e) {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const pagesLoad = () => {
|
||||||
|
if (systemStore.currTabbar.path) {
|
||||||
|
if (!loadRecord.value.includes(systemStore.currTabbar.path)) loadRecord.value.push(systemStore.currTabbar.path)
|
||||||
|
|
||||||
|
if (pagesRefs.value[systemStore.currTabbar.path] && pagesRefs.value[systemStore.currTabbar.path].$) {
|
||||||
|
// #ifdef MP
|
||||||
|
systemStore.currTabbar.path.indexOf('addon') != -1 && language.loadAllLocaleMessages('addon', uni.getLocale())
|
||||||
|
// #endif
|
||||||
|
|
||||||
|
// 执行页面onshow onload事件
|
||||||
|
pagesRefs.value[systemStore.currTabbar.path].$.root.onLoad.forEach(el => {
|
||||||
|
el(systemStore.currTabbar.query || {})
|
||||||
|
})
|
||||||
|
pagesRefs.value[systemStore.currTabbar.path].$.root.onShow.forEach(el => {
|
||||||
|
el()
|
||||||
|
})
|
||||||
|
// 设置页面滚动条高度
|
||||||
|
scrollTop.value[systemStore.currTabbar.path] = scrollRecord.value[systemStore.currTabbar.path] || 0
|
||||||
|
// 处理页面navbar
|
||||||
|
// 页面没有自定义navbar
|
||||||
|
if (!customNavigationPages[systemStore.currTabbar.path]) {
|
||||||
|
let key = systemStore.currTabbar.path.replace('/app/', '').replace('/addon/', '').replaceAll('/', '.')
|
||||||
|
|
||||||
|
switch (uni.getLocale()) {
|
||||||
|
case 'zh-Hans':
|
||||||
|
zh[key] && (key = zh[key])
|
||||||
|
break;
|
||||||
|
case 'en':
|
||||||
|
en[key] && (key = en[key])
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
navbar.value = {
|
||||||
|
data: {
|
||||||
|
title: key,
|
||||||
|
topStatusBar: {
|
||||||
|
"bgColor": "#ffffff",
|
||||||
|
"rollBgColor": "#ffffff",
|
||||||
|
"style": "style-1",
|
||||||
|
"textColor": "#333333",
|
||||||
|
"rollTextColor": "#333333",
|
||||||
|
"textAlign": "center",
|
||||||
|
"imgUrl": "",
|
||||||
|
"link": {
|
||||||
|
"name": ""
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
navbar.value = null
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
setTimeout(() => {
|
||||||
|
tag.value++
|
||||||
|
pagesLoad()
|
||||||
|
}, 300)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => useConfigStore().tabbarList,
|
||||||
|
(newValue, oldValue) => {
|
||||||
|
if (newValue) {
|
||||||
|
setTabbar()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
, { deep: true, immediate: true }
|
||||||
|
)
|
||||||
|
|
||||||
|
watch(() => addon, (newValue, oldValue) => {
|
||||||
|
if (newValue) {
|
||||||
|
setTabbar()
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{ deep: true, immediate: true }
|
||||||
|
)
|
||||||
|
|
||||||
|
const setPagesRefs = (el, key) => {
|
||||||
|
if (!pagesRefs.value[key]) {
|
||||||
|
pagesRefs.value[key] = el
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
const itemBtn = (url: string)=>{
|
||||||
|
const route = urlDeconstruction(url)
|
||||||
|
if (tabbarJson.includes(route.path)) {
|
||||||
|
useSystemStore().$patch((state) => {
|
||||||
|
state.currTabbar = route
|
||||||
|
})
|
||||||
|
} else {
|
||||||
|
redirect({ url, mode: 'navigateTo' })
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
watch(() => systemStore.currTabbar, (newValue, oldValue) => {
|
||||||
|
pagesLoad()
|
||||||
|
}, { deep: true, immediate: true })
|
||||||
|
|
||||||
|
const scrollListen = (e: any, key: string) => {
|
||||||
|
scrollRecord.value[key] = e.detail.scrollTop
|
||||||
|
|
||||||
|
try {
|
||||||
|
pagesRefs.value[systemStore.currTabbar.path].$.root.onPageScroll.forEach(el => {
|
||||||
|
el(e.detail)
|
||||||
|
})
|
||||||
|
} catch (e) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
:deep(.u-tabbar) {
|
||||||
|
flex: unset!important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@ -54,7 +54,7 @@
|
|||||||
</button>
|
</button>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<area-select ref="areaRef" @complete="areaSelectComplete" :area-id="formData.district_id" />
|
<area-select ref="areaRef" @complete="areaSelectComplete" :area-id="formData.district_id || formData.city_id" />
|
||||||
<!-- #ifdef MP-WEIXIN -->
|
<!-- #ifdef MP-WEIXIN -->
|
||||||
<!-- 小程序隐私协议 -->
|
<!-- 小程序隐私协议 -->
|
||||||
<wx-privacy-popup ref="wxPrivacyPopupRef"></wx-privacy-popup>
|
<wx-privacy-popup ref="wxPrivacyPopupRef"></wx-privacy-popup>
|
||||||
@ -181,14 +181,14 @@ const selectArea = () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const areaSelectComplete = (event: any) => {
|
const areaSelectComplete = (event: any) => {
|
||||||
if (isSelectAddress.value && (formData.value.province_id == event.province.id || formData.value.city_id != event.city.id || formData.value.district_id != event.district.id)) {
|
if (isSelectAddress.value && (formData.value.province_id == event.province?.id || formData.value.city_id != event.city?.id || formData.value.district_id != event.district?.id)) {
|
||||||
formData.value.lat = '';
|
formData.value.lat = '';
|
||||||
formData.value.lng = '';
|
formData.value.lng = '';
|
||||||
}
|
}
|
||||||
formData.value.province_id = event.province.id || 0
|
formData.value.province_id = event.province?.id || 0
|
||||||
formData.value.city_id = event.city.id || 0
|
formData.value.city_id = event.city?.id || 0
|
||||||
formData.value.district_id = event.district.id || 0
|
formData.value.district_id = event.district?.id || 0
|
||||||
formData.value.area = `${ event.province.name || '' }${ event.city.name || '' }${ event.district.name || '' }`
|
formData.value.area = `${ event.province?.name || '' }${ event.city?.name || '' }${ event.district?.name || '' }`
|
||||||
isSelectAddress.value = false;
|
isSelectAddress.value = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -3,12 +3,12 @@
|
|||||||
<scroll-view :scroll-y="true" class="w-screen h-screen bg-[var(--page-bg-color)]" v-if="!pageLoading && config.is_open == 1">
|
<scroll-view :scroll-y="true" class="w-screen h-screen bg-[var(--page-bg-color)]" v-if="!pageLoading && config.is_open == 1">
|
||||||
<view class="sidebar-margin pt-[var(--top-m)]">
|
<view class="sidebar-margin pt-[var(--top-m)]">
|
||||||
<view class="card-template">
|
<view class="card-template">
|
||||||
<view class="font-500 text-[30rpx] text-[#333] leading-[42rpx]">{{ t('cashOutMoneyTip') }}</view>
|
<view class="font-500 text-[30rpx] text-[#333] leading-[42rpx]">最小提现金额为</view>
|
||||||
<view class="flex pt-[30rpx] pb-[8rpx] items-center border-0 border-b-[2rpx] border-solid border-[#F1F2F5]">
|
<view class="flex pt-[30rpx] pb-[8rpx] items-center border-0 border-b-[2rpx] border-solid border-[#F1F2F5]">
|
||||||
<text class="pt-[4rpx] text-[44rpx] text-[#333] iconfont iconrenminbiV6xx price-font "></text>
|
<text class="pt-[4rpx] text-[44rpx] text-[#333] iconfont iconrenminbiV6xx price-font "></text>
|
||||||
<input type="digit" class="h-[76rpx] leading-[76rpx] pl-[10rpx] flex-1 font-500 text-[54rpx] bg-[#fff]"
|
<input type="digit" class="h-[76rpx] leading-[76rpx] pl-[10rpx] flex-1 font-500 text-[54rpx] bg-[#fff]"
|
||||||
v-model="applyData.apply_money" maxlength="7"
|
v-model="applyData.apply_money" maxlength="7"
|
||||||
:placeholder="applyData.apply_money?'':(t('minWithdrawal') + t('currency') + moneyFormat(config.min))"
|
:placeholder="applyData.apply_money?'':('最小提现金额为' + t('currency') + moneyFormat(config.min))"
|
||||||
placeholder-class="apply-price" :adjust-position="false" />
|
placeholder-class="apply-price" :adjust-position="false" />
|
||||||
<text v-if="Number(serviceMoney)" class="text-[24rpx] text-[var(--text-color-light6)] mr-[20rpx]">手续费{{ serviceMoney }}
|
<text v-if="Number(serviceMoney)" class="text-[24rpx] text-[var(--text-color-light6)] mr-[20rpx]">手续费{{ serviceMoney }}
|
||||||
</text>
|
</text>
|
||||||
@ -16,10 +16,10 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="pt-[16rpx] flex items-center justify-between px-[4rpx]">
|
<view class="pt-[16rpx] flex items-center justify-between px-[4rpx]">
|
||||||
<view class="text-[24rpx] text-[var(--text-color-light6)] leading-[36rpx]">
|
<view class="text-[24rpx] text-[var(--text-color-light6)] leading-[36rpx]">
|
||||||
<text>{{ t('money') }}:{{ t('currency') }}{{ moneyFormat(cashOutMoney) }}</text>
|
<text>可提现余额:{{ t('currency') }}{{ moneyFormat(cashOutMoney) }}</text>
|
||||||
<text>,{{ t('commissionTo') }}{{ config.rate + '%' }}</text>
|
<text>,手续费为{{ config.rate + '%' }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="text-[24rpx] text-primary leading-[36rpx]" @click="allMoney">{{ t('allTx') }}</view>
|
<view class="text-[24rpx] text-primary leading-[36rpx]" @click="allMoney">全部提现</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@ -34,8 +34,8 @@
|
|||||||
<image class="h-[60rpx] w-[60rpx] align-middle" :src="img('static/resource/images/member/apply_withdrawal/wechat.png')" mode="widthFix" />
|
<image class="h-[60rpx] w-[60rpx] align-middle" :src="img('static/resource/images/member/apply_withdrawal/wechat.png')" mode="widthFix" />
|
||||||
</view>
|
</view>
|
||||||
<view class="flex-1 px-[20rpx]">
|
<view class="flex-1 px-[20rpx]">
|
||||||
<view class="text-[28rpx] text-[#333] leading-[40rpx] mb-[6rpx]">{{ t('cashOutToWechat') }}</view>
|
<view class="text-[28rpx] text-[#333] leading-[40rpx] mb-[6rpx]">提现至微信零钱</view>
|
||||||
<view class="text-[var(--text-color-light9)] text-[24rpx] leading-[34rpx]">{{ t('cashOutToWechatTips') }}</view>
|
<view class="text-[var(--text-color-light9)] text-[24rpx] leading-[34rpx]">提现至微信零钱</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@ -47,19 +47,19 @@
|
|||||||
<image class="h-[60rpx] w-[60rpx] align-middle" :src="img('static/resource/images/member/apply_withdrawal/wechat_code.png')" mode="widthFix" />
|
<image class="h-[60rpx] w-[60rpx] align-middle" :src="img('static/resource/images/member/apply_withdrawal/wechat_code.png')" mode="widthFix" />
|
||||||
</view>
|
</view>
|
||||||
<view class="flex-1 px-[22rpx]" @click="transferWechatCode">
|
<view class="flex-1 px-[22rpx]" @click="transferWechatCode">
|
||||||
<view class="text-[28rpx] text-[#333] leading-[40rpx] mb-[6rpx]">{{ t('cashOutToWechatCode') }}</view>
|
<view class="text-[28rpx] text-[#333] leading-[40rpx] mb-[6rpx]">提现至微信</view>
|
||||||
<view class="text-[var(--text-color-light9)] text-[24rpx] leading-[34rpx]">
|
<view class="text-[var(--text-color-light9)] text-[24rpx] leading-[34rpx]">
|
||||||
<view v-if="wechatCodeInfo" class="truncate max-w-[440rpx]">
|
<view v-if="wechatCodeInfo" class="truncate max-w-[440rpx]">
|
||||||
<text>{{ t('cashOutTo') }}{{ t('wechatCodeAccountNo') }}</text>
|
<text>提现到微信号</text>
|
||||||
<text class="text-[#333]">{{ wechatCodeInfo.account_no }}</text>
|
<text class="text-[#333]">{{ wechatCodeInfo.account_no }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view v-else>{{ t('cashOutToWechatCodeTips') }}</view>
|
<view v-else>请先添加微信号</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex items-center">
|
<view class="flex items-center">
|
||||||
<button v-if="!wechatCodeInfo && !wechatCodeLoading" hover-class="none"
|
<button v-if="!wechatCodeInfo && !wechatCodeLoading" hover-class="none"
|
||||||
class="w-[110rpx] h-[54rpx] flex-center rounded-full p-[0] text-[var(--primary-color)] bg-transparent border-[2rpx] border-solid border-[var(--primary-color)] text-[22rpx]"
|
class="w-[110rpx] h-[54rpx] flex-center rounded-full p-[0] text-[var(--primary-color)] bg-transparent border-[2rpx] border-solid border-[var(--primary-color)] text-[22rpx]"
|
||||||
@click="redirect({ url: '/app/pages/member/account', param: { type: 'wechat_code', mode: 'select' } , mode: 'redirectTo'})">{{ t('toAdd') }}</button>
|
@click="redirect({ url: '/app/pages/member/account', param: { type: 'wechat_code', mode: 'select' } , mode: 'redirectTo'})">添加</button>
|
||||||
<text v-else class="nc-iconfont nc-icon-youV6xx text-[28rpx] text-[var(--text-color-light9)] p-[10rpx]"
|
<text v-else class="nc-iconfont nc-icon-youV6xx text-[28rpx] text-[var(--text-color-light9)] p-[10rpx]"
|
||||||
@click.stop="redirect({ url: '/app/pages/member/account', param: { type: 'wechat_code', mode: 'select' } , mode: 'redirectTo'})"></text>
|
@click.stop="redirect({ url: '/app/pages/member/account', param: { type: 'wechat_code', mode: 'select' } , mode: 'redirectTo'})"></text>
|
||||||
</view>
|
</view>
|
||||||
@ -73,19 +73,19 @@
|
|||||||
<image class="h-[60rpx] w-[60rpx] align-middle" :src="img('static/resource/images/member/apply_withdrawal/alipay-icon.png')" mode="widthFix" />
|
<image class="h-[60rpx] w-[60rpx] align-middle" :src="img('static/resource/images/member/apply_withdrawal/alipay-icon.png')" mode="widthFix" />
|
||||||
</view>
|
</view>
|
||||||
<view class="flex-1 px-[22rpx]" @click="transferAlipay">
|
<view class="flex-1 px-[22rpx]" @click="transferAlipay">
|
||||||
<view class="text-[28rpx] text-[#333] leading-[40rpx] mb-[6rpx]">{{ t('cashOutToAlipay') }}</view>
|
<view class="text-[28rpx] text-[#333] leading-[40rpx] mb-[6rpx]">提现至支付宝</view>
|
||||||
<view class="text-[var(--text-color-light9)] text-[24rpx] leading-[34rpx]">
|
<view class="text-[var(--text-color-light9)] text-[24rpx] leading-[34rpx]">
|
||||||
<view v-if="alipayAccountInfo" class="truncate max-w-[440rpx]">
|
<view v-if="alipayAccountInfo" class="truncate max-w-[440rpx]">
|
||||||
<text>{{ t('cashOutTo') }}{{ t('alipayAccountNo') }}</text>
|
<text>提现到支付宝账号</text>
|
||||||
<text class="text-[#333]">{{ alipayAccountInfo.account_no }}</text>
|
<text class="text-[#333]">{{ alipayAccountInfo.account_no }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view v-else>{{ t('cashOutToAlipayTips') }}</view>
|
<view v-else>请先添加支付宝账号</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex items-center">
|
<view class="flex items-center">
|
||||||
<button v-if="!alipayAccountInfo && !alipayLoading" hover-class="none"
|
<button v-if="!alipayAccountInfo && !alipayLoading" hover-class="none"
|
||||||
class="w-[110rpx] h-[54rpx] flex-center rounded-full p-[0] text-[var(--primary-color)] bg-transparent border-[2rpx] border-solid border-[var(--primary-color)] text-[22rpx]"
|
class="w-[110rpx] h-[54rpx] flex-center rounded-full p-[0] text-[var(--primary-color)] bg-transparent border-[2rpx] border-solid border-[var(--primary-color)] text-[22rpx]"
|
||||||
@click="redirect({ url: '/app/pages/member/account', param: { type: 'alipay', mode: 'select' } , mode: 'redirectTo'})">{{ t('toAdd') }}</button>
|
@click="redirect({ url: '/app/pages/member/account', param: { type: 'alipay', mode: 'select' } , mode: 'redirectTo'})">添加</button>
|
||||||
<text v-else class="nc-iconfont nc-icon-youV6xx text-[28rpx] text-[var(--text-color-light9)] p-[10rpx]"
|
<text v-else class="nc-iconfont nc-icon-youV6xx text-[28rpx] text-[var(--text-color-light9)] p-[10rpx]"
|
||||||
@click.stop="redirect({ url: '/app/pages/member/account', param: { type: 'alipay', mode: 'select' } , mode: 'redirectTo'})"></text>
|
@click.stop="redirect({ url: '/app/pages/member/account', param: { type: 'alipay', mode: 'select' } , mode: 'redirectTo'})"></text>
|
||||||
</view>
|
</view>
|
||||||
@ -99,19 +99,19 @@
|
|||||||
<image class="h-[42rpx] w-[60rpx] align-middle" :src="img('static/resource/images/member/apply_withdrawal/bank-icon.png')" mode="widthFix" />
|
<image class="h-[42rpx] w-[60rpx] align-middle" :src="img('static/resource/images/member/apply_withdrawal/bank-icon.png')" mode="widthFix" />
|
||||||
</view>
|
</view>
|
||||||
<view class="flex-1 px-[20rpx]" @click="transferBank">
|
<view class="flex-1 px-[20rpx]" @click="transferBank">
|
||||||
<view class="text-[28rpx] text-[#333] leading-[40rpx] mb-[6rpx]">{{ t('cashOutToBank') }}</view>
|
<view class="text-[28rpx] text-[#333] leading-[40rpx] mb-[6rpx]">提现至银行卡</view>
|
||||||
<view class="text-[var(--text-color-light9)] text-[24rpx] leading-[34rpx]">
|
<view class="text-[var(--text-color-light9)] text-[24rpx] leading-[34rpx]">
|
||||||
<view v-if="bankAccountInfo" class="truncate max-w-[440rpx]">
|
<view v-if="bankAccountInfo" class="truncate max-w-[440rpx]">
|
||||||
<text>{{ t('cashOutTo') }}{{ bankAccountInfo.bank_name }}{{ t('debitCard') }}</text>
|
<text>提现到{{ bankAccountInfo.bank_name }}储蓄卡</text>
|
||||||
<text class="text-[#333]">{{ bankAccountInfo.account_no.substring(bankAccountInfo.account_no.length - 4) }}</text>
|
<text class="text-[#333]">{{ bankAccountInfo.account_no.substring(bankAccountInfo.account_no.length - 4) }}</text>
|
||||||
</view>
|
</view>
|
||||||
<view v-else>{{ t('cashOutToBankTips') }}</view>
|
<view v-else>请先添加银行卡</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="flex items-center">
|
<view class="flex items-center">
|
||||||
<button hover-class="none" class="h-[54rpx] flex-center rounded-full p-[0] w-[110rpx] text-[var(--primary-color)] bg-transparent border-[2rpx] border-solid border-[var(--primary-color)] text-[22rpx]"
|
<button hover-class="none" class="h-[54rpx] flex-center rounded-full p-[0] w-[110rpx] text-[var(--primary-color)] bg-transparent border-[2rpx] border-solid border-[var(--primary-color)] text-[22rpx]"
|
||||||
v-if="!bankAccountInfo && !bankLoading"
|
v-if="!bankAccountInfo && !bankLoading"
|
||||||
@click="redirect({ url: '/app/pages/member/account', param: { type: 'bank', mode: 'select' }, mode: 'redirectTo' })">{{ t('toAdd') }}</button>
|
@click="redirect({ url: '/app/pages/member/account', param: { type: 'bank', mode: 'select' }, mode: 'redirectTo' })">添加</button>
|
||||||
<text v-else class="nc-iconfont nc-icon-youV6xx text-[28rpx] text-[var(--text-color-light9)] p-[10rpx]"
|
<text v-else class="nc-iconfont nc-icon-youV6xx text-[28rpx] text-[var(--text-color-light9)] p-[10rpx]"
|
||||||
@click.stop="redirect({ url: '/app/pages/member/account', param: { type: 'bank', mode: 'select' }, mode: 'redirectTo' })"></text>
|
@click.stop="redirect({ url: '/app/pages/member/account', param: { type: 'bank', mode: 'select' }, mode: 'redirectTo' })"></text>
|
||||||
</view>
|
</view>
|
||||||
@ -120,9 +120,9 @@
|
|||||||
|
|
||||||
<view class="tab-bar-placeholder"></view>
|
<view class="tab-bar-placeholder"></view>
|
||||||
<view class="fixed bottom-[0] tab-bar left-0 right-0 px-[var(--sidebar-m)] bg-[var(--page-bg-color)]">
|
<view class="fixed bottom-[0] tab-bar left-0 right-0 px-[var(--sidebar-m)] bg-[var(--page-bg-color)]">
|
||||||
<button class="h-[80rpx] !text-[#fff] leading-[80rpx] primary-btn-bg rounded-[50rpx] text-[26rpx]" :disabled="applyData.apply_money == '' || applyData.apply_money == 0" :loading="loading" @click="cashOut">{{ t('cashOutNow') }}</button>
|
<button class="h-[80rpx] !text-[#fff] leading-[80rpx] primary-btn-bg rounded-[50rpx] text-[26rpx]" :disabled="applyData.apply_money == '' || applyData.apply_money == 0" :loading="loading" @click="cashOut">立即提现</button>
|
||||||
<view class="mt-[30rpx] text-center text-[26rpx] text-primary"
|
<view class="mt-[30rpx] text-center text-[26rpx] text-primary"
|
||||||
@click.stop="redirect({ url: '/app/pages/member/cash_out'})">{{ t('cashOutList') }}</view>
|
@click.stop="redirect({ url: '/app/pages/member/cash_out'})">提现记录</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
@ -130,7 +130,7 @@
|
|||||||
<view class="h-[100vh] w-[100vw] bg-[var(--page-bg-color)] overflow-hidden" v-if="config.is_open == 0 && !pageLoading">
|
<view class="h-[100vh] w-[100vw] bg-[var(--page-bg-color)] overflow-hidden" v-if="config.is_open == 0 && !pageLoading">
|
||||||
<view class="empty-page">
|
<view class="empty-page">
|
||||||
<image class="img" :src="img('addon/shop/cart-empty.png')" model="aspectFit" />
|
<image class="img" :src="img('addon/shop/cart-empty.png')" model="aspectFit" />
|
||||||
<view class="desc">{{ t('isOpenApply') }}</view>
|
<view class="desc">提现设置未开启</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<loading-page :loading="pageLoading"></loading-page>
|
<loading-page :loading="pageLoading"></loading-page>
|
||||||
@ -200,7 +200,7 @@ onLoad(async(data) => {
|
|||||||
|
|
||||||
if (!['money', 'commission'].includes(applyData.account_type)) {
|
if (!['money', 'commission'].includes(applyData.account_type)) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: t('abnormalOperation'),
|
title: '异常操作',
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
success() {
|
success() {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
@ -267,23 +267,23 @@ const clearMoney = () => {
|
|||||||
|
|
||||||
const verify = () => {
|
const verify = () => {
|
||||||
if (!applyData.transfer_type) {
|
if (!applyData.transfer_type) {
|
||||||
uni.showToast({ title: t('noAvailableCashOutType'), icon: 'none' })
|
uni.showToast({ title: '没有可用的提现方式', icon: 'none' })
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
if (uni.$u.test.isEmpty(applyData.apply_money)) {
|
if (uni.$u.test.isEmpty(applyData.apply_money)) {
|
||||||
uni.showToast({ title: t('applyMoneyPlaceholder'), icon: 'none' })
|
uni.showToast({ title: '请输入提现金额', icon: 'none' })
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
if (!uni.$u.test.amount(applyData.apply_money)) {
|
if (!uni.$u.test.amount(applyData.apply_money)) {
|
||||||
uni.showToast({ title: t('moneyformatError'), icon: 'none' })
|
uni.showToast({ title: '提现金额格式错误', icon: 'none' })
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
if (parseFloat(applyData.apply_money) > parseFloat(cashOutMoney.value)) {
|
if (parseFloat(applyData.apply_money) > parseFloat(cashOutMoney.value)) {
|
||||||
uni.showToast({ title: t('applyMoneyExceed'), icon: 'none' })
|
uni.showToast({ title: '提现金额超出可提现金额', icon: 'none' })
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
if (parseFloat(applyData.apply_money) < parseFloat(config.min)) {
|
if (parseFloat(applyData.apply_money) < parseFloat(config.min)) {
|
||||||
uni.showToast({ title: t('applyMoneyBelow'), icon: 'none' })
|
uni.showToast({ title: '提现金额小于最低提现金额', icon: 'none' })
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
@ -391,7 +391,7 @@ const cashOut = () => {
|
|||||||
// 选中提现到支付宝
|
// 选中提现到支付宝
|
||||||
const transferAlipay = () => {
|
const transferAlipay = () => {
|
||||||
if (!alipayAccountInfo.value) {
|
if (!alipayAccountInfo.value) {
|
||||||
uni.showToast({ title: t('cashOutToAlipayTips'), icon: 'none' })
|
uni.showToast({ title: '请先添加支付宝账号', icon: 'none' })
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
applyData.transfer_type = 'alipay'
|
applyData.transfer_type = 'alipay'
|
||||||
@ -399,7 +399,7 @@ const transferAlipay = () => {
|
|||||||
// 选中提现到银行卡
|
// 选中提现到银行卡
|
||||||
const transferBank = () => {
|
const transferBank = () => {
|
||||||
if (!bankAccountInfo.value) {
|
if (!bankAccountInfo.value) {
|
||||||
uni.showToast({ title: t('cashOutToBankTips'), icon: 'none' })
|
uni.showToast({ title: '请先添加银行卡', icon: 'none' })
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
applyData.transfer_type = 'bank'
|
applyData.transfer_type = 'bank'
|
||||||
@ -417,7 +417,7 @@ const transferWeixin = () => {
|
|||||||
// 选中提现到微信收款码
|
// 选中提现到微信收款码
|
||||||
const transferWechatCode = () => {
|
const transferWechatCode = () => {
|
||||||
if (!wechatCodeInfo.value) {
|
if (!wechatCodeInfo.value) {
|
||||||
uni.showToast({ title: t('cashOutToWechatCodeTips'), icon: 'none' })
|
uni.showToast({ title: '请先添加微信号', icon: 'none' })
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
applyData.transfer_type = 'wechat_code'
|
applyData.transfer_type = 'wechat_code'
|
||||||
|
|||||||
@ -137,7 +137,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="flex-1 mx-[20rpx]">
|
<view class="flex-1 mx-[20rpx]">
|
||||||
<view class="font-400 text-[28rpx] text-[#303133] leading-[38rpx] mb-[10rpx]">连续签到{{ item.continue_sign }}天</view>
|
<view class="font-400 text-[28rpx] text-[#303133] leading-[38rpx] mb-[10rpx]">连续签到{{ item.continue_sign }}天</view>
|
||||||
<view class="flex flex-wrap" v-if="item.gift">
|
<view class="flex flex-wrap" v-if="item.gift && item.gift.total">
|
||||||
<view class="flex">
|
<view class="flex">
|
||||||
<image :src="img(item.gift.total.icon)" class="w-[30rpx] h-[30rpx] flex-shrink-0"/>
|
<image :src="img(item.gift.total.icon)" class="w-[30rpx] h-[30rpx] flex-shrink-0"/>
|
||||||
<view class="text-[24rpx] ml-[8rpx] text-[#FF9000] leading-[34rpx] max-w-[330rpx]">{{ item.gift.total.text }}</view>
|
<view class="text-[24rpx] ml-[8rpx] text-[#FF9000] leading-[34rpx] max-w-[330rpx]">{{ item.gift.total.text }}</view>
|
||||||
|
|||||||
@ -118,6 +118,11 @@ watch(() => selected.city, (nval) => {
|
|||||||
selected.district = null
|
selected.district = null
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (!data.length) {
|
||||||
|
emits('complete', selected)
|
||||||
|
show.value = false
|
||||||
|
}
|
||||||
|
|
||||||
}).catch()
|
}).catch()
|
||||||
} else {
|
} else {
|
||||||
areaList.district = []
|
areaList.district = []
|
||||||
|
|||||||
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<template v-if="tabbar && Object.keys(tabbar).length">
|
<template v-if="tabbarShow && tabbar && Object.keys(tabbar).length">
|
||||||
<u-tabbar :value="value" zIndex="9999" :fixed="true" :placeholder="true" :safeAreaInsetBottom="true" :inactive-color="tabbar.value.textColor" :active-color="tabbar.value.textHoverColor" :border="props.border" class="custom-tabbar">
|
<u-tabbar :value="value" zIndex="9999" :fixed="true" :placeholder="true" :safeAreaInsetBottom="true" :inactive-color="tabbar.value.textColor" :active-color="tabbar.value.textHoverColor" :border="props.border" class="custom-tabbar">
|
||||||
<template v-for="item in tabbar.value.list">
|
<template v-for="item in tabbar.value.list">
|
||||||
<u-tabbar-item class="py-[5rpx]" :custom-style="{'background-color': tabbar.value.backgroundColor}" :text="item.text" :icon="img(value == item.link.url ? item.iconSelectPath : item.iconPath)" :name="item.link.url" v-if="tabbar.value.type == 1" @click="itemBtn(item.link.url)"></u-tabbar-item>
|
<u-tabbar-item class="py-[5rpx]" :custom-style="{'background-color': tabbar.value.backgroundColor}" :text="item.text" :icon="img(value == item.link.url ? item.iconSelectPath : item.iconPath)" :name="item.link.url" v-if="tabbar.value.type == 1" @click="itemBtn(item.link.url)"></u-tabbar-item>
|
||||||
@ -15,6 +15,7 @@
|
|||||||
import { reactive, computed, watch, nextTick, getCurrentInstance } from 'vue'
|
import { reactive, computed, watch, nextTick, getCurrentInstance } from 'vue'
|
||||||
import { redirect, currRoute, currShareRoute, img } from '@/utils/common'
|
import { redirect, currRoute, currShareRoute, img } from '@/utils/common'
|
||||||
import useConfigStore from '@/stores/config'
|
import useConfigStore from '@/stores/config'
|
||||||
|
import useSystemStore from '@/stores/system'
|
||||||
import { cloneDeep } from 'lodash-es'
|
import { cloneDeep } from 'lodash-es'
|
||||||
|
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
@ -47,6 +48,10 @@ if (!addon && configStore.addon) {
|
|||||||
|
|
||||||
const tabbar: any = reactive({})
|
const tabbar: any = reactive({})
|
||||||
|
|
||||||
|
const tabbarShow = computed(() => {
|
||||||
|
return currRoute() != '/app/pages/index/tabbar'
|
||||||
|
})
|
||||||
|
|
||||||
const setTabbar = () => {
|
const setTabbar = () => {
|
||||||
let list = cloneDeep(useConfigStore().tabbarList);
|
let list = cloneDeep(useConfigStore().tabbarList);
|
||||||
if (list.length == 1) {
|
if (list.length == 1) {
|
||||||
|
|||||||
@ -244,7 +244,9 @@ const navbarPlaceholderHeight = () => {
|
|||||||
const query = uni.createSelectorQuery().in(instance);
|
const query = uni.createSelectorQuery().in(instance);
|
||||||
query.select('.ns-navbar-wrap .u-navbar .content-wrap').boundingClientRect(data => {
|
query.select('.ns-navbar-wrap .u-navbar .content-wrap').boundingClientRect(data => {
|
||||||
placeholderHeight.value = data ? data.height : 0;
|
placeholderHeight.value = data ? data.height : 0;
|
||||||
diyStore.topTabarHeight = placeholderHeight.value;
|
diyStore.$patch((state) => {
|
||||||
|
state.topTabarHeight = placeholderHeight.value
|
||||||
|
})
|
||||||
}).exec();
|
}).exec();
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<view @touchmove.prevent.stop>
|
<view @touchmove.prevent.stop>
|
||||||
<u-popup :show="showPop" type="bottom" @close="disPopUp">
|
<u-popup :show="showPop" type="bottom" @close="disPopUp">
|
||||||
<view>
|
<view class="privacy-popup-wrap">
|
||||||
<view class="p-[30rpx]">
|
<view class="p-[30rpx]">
|
||||||
<view class="privacy-title">用户隐私保护提示</view>
|
<view class="privacy-title">用户隐私保护提示</view>
|
||||||
<view class="privacy-desc">感谢您使用本小程序,在使用前您应当阅读并同意<text class="privacy-link" @tap="openPrivacyContract">{{ privacyContractName }}</text>, 当点击同意并继续时,即表示您已理解并同意该条款内容,该条款将对您产生法律约束力;如您不同意,将无法继续使用小程序相关功能。</view>
|
<view class="privacy-desc">感谢您使用本小程序,在使用前您应当阅读并同意<text class="privacy-link" @tap="openPrivacyContract">{{ privacyContractName }}</text>, 当点击同意并继续时,即表示您已理解并同意该条款内容,该条款将对您产生法律约束力;如您不同意,将无法继续使用小程序相关功能。</view>
|
||||||
@ -235,4 +235,10 @@ defineExpose({
|
|||||||
.bg-agree {
|
.bg-agree {
|
||||||
margin-right: 0rpx;
|
margin-right: 0rpx;
|
||||||
}
|
}
|
||||||
|
.privacy-popup-wrap {
|
||||||
|
padding-bottom: constant(safe-area-inset-bottom);
|
||||||
|
/*兼容 IOS<11.2*/
|
||||||
|
padding-bottom: env(safe-area-inset-bottom);
|
||||||
|
}
|
||||||
|
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@ -144,7 +144,7 @@ export function useDiyForm(params: any = {}) {
|
|||||||
let diyFormStorage = uni.getStorageSync('diyFormStorage_' + diyStore.id)
|
let diyFormStorage = uni.getStorageSync('diyFormStorage_' + diyStore.id)
|
||||||
if (diyFormStorage) {
|
if (diyFormStorage) {
|
||||||
var date = new Date();
|
var date = new Date();
|
||||||
let currentTime: any = parseInt(date.getTime() / 1000); // 定位信息 5分钟内有效,过期后将重新获取定位信息
|
let currentTime: any = parseInt(date.getTime() / 1000); // 存储信息 5分钟内有效,过期后将重新获取定位信息
|
||||||
if (diyFormStorage.validTime > currentTime) {
|
if (diyFormStorage.validTime > currentTime) {
|
||||||
if (diyFormStorage.components) {
|
if (diyFormStorage.components) {
|
||||||
diyFormStorage.components.forEach((item: any) => {
|
diyFormStorage.components.forEach((item: any) => {
|
||||||
|
|||||||
@ -9,6 +9,9 @@ const t = (message: string) => {
|
|||||||
// #endif
|
// #endif
|
||||||
// #ifdef MP
|
// #ifdef MP
|
||||||
route = '/' + (getCurrentInstance()?.root.ctx.$scope.__route__ || useSystemStore().currRoute)
|
route = '/' + (getCurrentInstance()?.root.ctx.$scope.__route__ || useSystemStore().currRoute)
|
||||||
|
if (route == '/app/pages/index/tabbar' && useSystemStore().currTabbar && useSystemStore().currTabbar.path) {
|
||||||
|
route = useSystemStore().currTabbar.path
|
||||||
|
}
|
||||||
// #endif
|
// #endif
|
||||||
const file = language.getFileKey(route)
|
const file = language.getFileKey(route)
|
||||||
const key = `${ file.fileKey }.${ message }`
|
const key = `${ file.fileKey }.${ message }`
|
||||||
|
|||||||
@ -44,7 +44,6 @@ class Language {
|
|||||||
this.setI18nLanguage(locale, file)
|
this.setI18nLanguage(locale, file)
|
||||||
return nextTick()
|
return nextTick()
|
||||||
}
|
}
|
||||||
this.loadLocale.push(`${fileKey}.${locale}`)
|
|
||||||
|
|
||||||
// 引入语言包文件
|
// 引入语言包文件
|
||||||
const messages = await import(route == 'app' ? `../${route}/locale/${locale}/${file}.json` : `../addon/${route}/locale/${locale}/${file}.json`)
|
const messages = await import(route == 'app' ? `../${route}/locale/${locale}/${file}.json` : `../addon/${route}/locale/${locale}/${file}.json`)
|
||||||
@ -56,6 +55,8 @@ class Language {
|
|||||||
this.i18n.global.mergeLocaleMessage(locale, data)
|
this.i18n.global.mergeLocaleMessage(locale, data)
|
||||||
this.setI18nLanguage(locale, file)
|
this.setI18nLanguage(locale, file)
|
||||||
|
|
||||||
|
this.loadLocale.push(`${fileKey}.${locale}`)
|
||||||
|
|
||||||
return nextTick()
|
return nextTick()
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
// console.log(e)
|
// console.log(e)
|
||||||
|
|||||||
@ -16,6 +16,12 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"path": "app/pages/index/tabbar",
|
||||||
|
"style": {
|
||||||
|
"navigationStyle": "custom"
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"path": "app/pages/auth/index",
|
"path": "app/pages/auth/index",
|
||||||
"style": {
|
"style": {
|
||||||
@ -379,6 +385,9 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"pagePath": "app/pages/index/nosite"
|
"pagePath": "app/pages/index/nosite"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"pagePath": "app/pages/index/tabbar"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|||||||
@ -16,6 +16,10 @@ interface System {
|
|||||||
shareCallback: any, // 分享回调
|
shareCallback: any, // 分享回调
|
||||||
defaultPositionAddress: any,
|
defaultPositionAddress: any,
|
||||||
diyAddressInfo: any // 定位信息
|
diyAddressInfo: any // 定位信息
|
||||||
|
currTabbar: {
|
||||||
|
path: string,
|
||||||
|
query: object
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const useSystemStore = defineStore('system', {
|
const useSystemStore = defineStore('system', {
|
||||||
@ -38,7 +42,11 @@ const useSystemStore = defineStore('system', {
|
|||||||
},
|
},
|
||||||
shareCallback: null,
|
shareCallback: null,
|
||||||
defaultPositionAddress: '定位中',
|
defaultPositionAddress: '定位中',
|
||||||
diyAddressInfo: null
|
diyAddressInfo: null,
|
||||||
|
currTabbar: {
|
||||||
|
path: '/app/pages/index/index',
|
||||||
|
query: {}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
actions: {
|
actions: {
|
||||||
|
|||||||
2
uni-app/src/tabbar.json
Normal file
2
uni-app/src/tabbar.json
Normal file
@ -0,0 +1,2 @@
|
|||||||
|
[
|
||||||
|
]
|
||||||
@ -4,6 +4,8 @@ import { redirect, getToken, getSiteId,currRoute, setThemeColor } from '@/utils/
|
|||||||
import { memberLog } from '@/app/api/auth'
|
import { memberLog } from '@/app/api/auth'
|
||||||
import useConfigStore from "@/stores/config";
|
import useConfigStore from "@/stores/config";
|
||||||
import { useShare } from '@/hooks/useShare'
|
import { useShare } from '@/hooks/useShare'
|
||||||
|
import tabbarJson from '@/tabbar.json'
|
||||||
|
import useSystemStore from '@/stores/system'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 页面跳转拦截器
|
* 页面跳转拦截器
|
||||||
@ -39,6 +41,10 @@ export const redirectInterceptor = (route: { path: string, query: object }) => {
|
|||||||
params: JSON.stringify(route.query),
|
params: JSON.stringify(route.query),
|
||||||
pre_route: getCurrentPages()[0]?.route
|
pre_route: getCurrentPages()[0]?.route
|
||||||
})
|
})
|
||||||
|
|
||||||
|
// #ifdef MP
|
||||||
|
toTabbar(route)
|
||||||
|
// #endif
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -88,6 +94,10 @@ export const launchInterceptor = () => {
|
|||||||
|
|
||||||
// 添加会员访问日志
|
// 添加会员访问日志
|
||||||
if (getToken()) memberLog({ route: launch.path, params: JSON.stringify(launch.query || {}), pre_route: '' })
|
if (getToken()) memberLog({ route: launch.path, params: JSON.stringify(launch.query || {}), pre_route: '' })
|
||||||
|
|
||||||
|
// #ifdef MP
|
||||||
|
toTabbar(launch)
|
||||||
|
// #endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -113,3 +123,17 @@ const loadShare = () => {
|
|||||||
if (!shareWhiteList.includes(currRoute() || '')) setShare()
|
if (!shareWhiteList.includes(currRoute() || '')) setShare()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 跳转到tabbar
|
||||||
|
*/
|
||||||
|
const toTabbar = (route: { path: string, query: object }) => {
|
||||||
|
if (tabbarJson.includes(route.path)) {
|
||||||
|
useSystemStore().$patch((state) => {
|
||||||
|
state.currTabbar = route
|
||||||
|
})
|
||||||
|
uni.switchTab({
|
||||||
|
url: '/app/pages/index/tabbar'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
@ -64,3 +64,29 @@ export function getTabbarPages() {
|
|||||||
export function getFirstPage() {
|
export function getFirstPage() {
|
||||||
return '/' + pagesJson.pages[0].path
|
return '/' + pagesJson.pages[0].path
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取自定义navbar的页面
|
||||||
|
*/
|
||||||
|
export function getCustomNavigationPages() {
|
||||||
|
const pages: any = {}
|
||||||
|
// 获取主包中的
|
||||||
|
pagesJson.pages.forEach(item => {
|
||||||
|
if (item.style && item.style.navigationStyle && item.style.navigationStyle == 'custom') {
|
||||||
|
pages[`/${ item.path }`] = item
|
||||||
|
}
|
||||||
|
})
|
||||||
|
// 获取分包中的
|
||||||
|
if (pagesJson.subPackages) {
|
||||||
|
pagesJson.subPackages.forEach(subPackages => {
|
||||||
|
if(subPackages.pages) {
|
||||||
|
subPackages.pages.forEach(item => {
|
||||||
|
if (item.style && item.style.navigationStyle && item.style.navigationStyle == 'custom') {
|
||||||
|
pages[`/${ subPackages.root }/${ item.path }`] = item
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
return pages
|
||||||
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user