diff --git a/uni-app/src/App.vue b/uni-app/src/App.vue
index a32f12251..40acd9300 100644
--- a/uni-app/src/App.vue
+++ b/uni-app/src/App.vue
@@ -1,14 +1,14 @@
-
+
diff --git a/uni-app/src/app/pages/auth/bind.vue b/uni-app/src/app/pages/auth/bind.vue
index ebb5fec72..a5eac8305 100644
--- a/uni-app/src/app/pages/auth/bind.vue
+++ b/uni-app/src/app/pages/auth/bind.vue
@@ -1,70 +1,72 @@
-
-
-
-
-
- {{ t('bindMobile') }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ t('agreeTips') }}
-
- 《{{ t('userAgreement') }}》
-
-
- 《{{ t('privacyAgreement') }}》
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+ {{t('bindMobile')}}
+ {{t('bindMobileTip')}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ t('agreeTips') }}
+ 《{{t('privacyAgreement')}}》
+ {{ t('and') }}
+ 《{{t('userAgreement')}}》
+
+
+
+
+
-
diff --git a/uni-app/src/app/pages/auth/index.vue b/uni-app/src/app/pages/auth/index.vue
new file mode 100644
index 000000000..40741aa9f
--- /dev/null
+++ b/uni-app/src/app/pages/auth/index.vue
@@ -0,0 +1,285 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/uni-app/src/app/pages/auth/login.vue b/uni-app/src/app/pages/auth/login.vue
index c1eead3e0..4010db5bb 100644
--- a/uni-app/src/app/pages/auth/login.vue
+++ b/uni-app/src/app/pages/auth/login.vue
@@ -1,102 +1,171 @@
-
-
-
-
-
-
- {{ t('login') }}
-
-
-
- {{ item.title }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ t('noAccount') }}
- {{ t('toRegister') }}
-
- {{ t('resetpwd') }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ t('agreeTips') }}
-
- {{ t('userAgreement') }}
-
- {{ t('and') }}
-
- {{ t('privacyAgreement') }}
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+ {{ type == 'username' ? t('accountLogin') : t('mobileLogin') }}
+ {{ type == 'username' ? t('accountLoginTip') : t('mobileLoginTip') }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{t('resetpwd')}}
+
+
+
+
+
+
+ {{ t('agreeTips') }}
+ 《{{t('privacyAgreement')}}》
+ {{ t('and') }}
+ 《{{t('userAgreement')}}》
+
+
+
+
+
+ {{ type == 'username' ? t('mobileLogin') : t('accountLogin') }}
+
+
+ {{ t('noAccount') }},
+ {{ t('toRegister') }}
+
+
+
+
+
+
-
-
-
+ :deep(.u-checkbox){
+ margin: 0 !important;
+ }
+ :deep(.u-form-item){
+ flex:1;
+ .u-line{
+ display:none;
+ }
+ }
+ .footer{
+ margin-top:200rpx;
+ padding-bottom:calc(151rpx + constant(safe-area-inset-bottom));
+ padding-bottom:calc(151rpx + env(safe-area-inset-bottom));
+ }
+
\ No newline at end of file
diff --git a/uni-app/src/app/pages/auth/register.vue b/uni-app/src/app/pages/auth/register.vue
index 179dd55f1..8379be765 100644
--- a/uni-app/src/app/pages/auth/register.vue
+++ b/uni-app/src/app/pages/auth/register.vue
@@ -1,84 +1,82 @@
-
-
-
-
-
-
- {{ t('register') }}
-
-
-
- {{ item.title }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {{ t('haveAccount') }},{{ t('toLogin') }}
-
-
-
-
-
-
-
-
-
- {{ t('registerAgreeTips') }}
-
- {{ t('userAgreement') }}
-
- {{ t('and') }}
-
- {{ t('privacyAgreement') }}
-
-
+
+
+
+
+
+
+
+ {{ type == 'username' ? t('usernameRegister') : t('mobileRegister') }}
+ {{ type == 'username' ? t('usernameRegisterTip') : t('mobileRegisterTip') }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ t('agreeTips') }}
+ 《{{t('privacyAgreement')}}》
+ {{ t('and') }}
+ 《{{t('userAgreement')}}》
+
+
+
+
+ {{ type == 'username' ? t('mobileRegister') : t('usernameRegister') }}
+
+ {{ t('haveAccount') }},
+ {{ t('toLogin') }}
+
+
+
+
@@ -90,9 +88,22 @@
import { useLogin } from '@/hooks/useLogin'
import { useCaptcha } from '@/hooks/useCaptcha'
import { t } from '@/locale'
- import { redirect, getToken } from '@/utils/common'
+ import { redirect, getToken,pxToRpx } from '@/utils/common'
import { onLoad } from '@dcloudio/uni-app';
-
+ import { topTabar } from '@/utils/topTabbar'
+
+ let menuButtonInfo: any = {};
+ // 如果是小程序,获取右上角胶囊的尺寸信息,避免导航栏右侧内容与胶囊重叠(支付宝小程序非本API,尚未兼容)
+ // #ifdef MP-WEIXIN || MP-BAIDU || MP-TOUTIAO || MP-QQ
+ menuButtonInfo = uni.getMenuButtonBoundingClientRect();
+ // #endif
+ /********* 自定义头部 - start ***********/
+ const topTabarObj = topTabar()
+ let param = topTabarObj.setTopTabbarParam({title:'',topStatusBar:{bgColor: '#fff',textColor: '#333'}})
+ /********* 自定义头部 - end ***********/
+ const headerHeight = computed(()=>{
+ return Object.keys(menuButtonInfo).length ? pxToRpx(Number(menuButtonInfo.height)) + pxToRpx(menuButtonInfo.top) + pxToRpx(8)+'rpx':'auto'
+ })
const formData = reactive({
username: '',
password: '',
@@ -114,20 +125,25 @@
const memberStore = useMemberStore()
const configStore = useConfigStore()
+ const loginType=ref('')
- onLoad(async() =>{
- await configStore.getLoginConfig()
- if (!uni.getStorageSync('autoLoginLock')) {
- uni.getStorageSync('openid') && (Object.assign(formData, {openid: uni.getStorageSync('openid')}))
- uni.getStorageSync('pid') && (Object.assign(formData, {pid: uni.getStorageSync('pid')}))
- }
- uni.getStorageSync('unionid') && (Object.assign(formData, { unionid: uni.getStorageSync('unionid') }))
- if(!getToken() && !configStore.login.is_username && !configStore.login.is_mobile && !configStore.login.is_bind_mobile){
- uni.showToast({ title: '商家未开启普通账号登录注册', icon: 'none' })
- setTimeout(() => {
- redirect({ url: '/app/pages/index/index', mode: 'reLaunch' })
- }, 100)
- }
+ onLoad(async (option: any) => {
+ await configStore.getLoginConfig()
+ if (!getToken() && !configStore.login.is_username && !configStore.login.is_mobile && !configStore.login.is_bind_mobile) {
+ uni.showToast({ title: '商家未开启普通账号注册', icon: 'none' })
+ setTimeout(() => {
+ redirect({ url: '/app/pages/index/index', mode: 'reLaunch' })
+ }, 100)
+ }
+ uni.getStorageSync('openid') && (Object.assign(formData, { openid: uni.getStorageSync('openid') }))
+ uni.getStorageSync('pid') && (Object.assign(formData, { pid: uni.getStorageSync('pid') }))
+
+ if (configStore.login.is_username) {
+ type.value = 'username'
+ } else if ((configStore.login.is_mobile || configStore.login.is_bind_mobile)) {
+ type.value = 'mobile'
+ }
+ loginType.value = option.type
})
const captcha = useCaptcha(formData)
@@ -136,12 +152,13 @@
const loading = ref(false)
const type = ref('')
-
+ const agreeChange = () => {
+ isAgree.value = !isAgree.value
+ }
const registerType = computed(()=> {
const value = []
configStore.login.is_username && (value.push({ type: 'username', title: t('usernameRegister') }))
configStore.login.is_mobile && !configStore.login.is_bind_mobile && (value.push({ type: 'mobile', title: t('mobileRegister') }))
- type.value = value[0] ? value[0].type : ''
return value
})
@@ -167,7 +184,7 @@
trigger: ['blur', 'change']
},
{
- validator(rule, value){
+ validator(rule: any, value: any){
return value == formData.password
},
message: t('confirmPasswordError'),
@@ -182,7 +199,7 @@
trigger: ['blur', 'change'],
},
{
- validator(rule, value){
+ validator(rule: any, value: any){
if (type.value != 'mobile' && !configStore.login.is_bind_mobile) return true
else return uni.$u.test.mobile(value)
},
@@ -207,7 +224,7 @@
const isAgree = ref(false)
- const formRef = ref(null)
+ const formRef: any = ref(null)
const handleRegister = () => {
formRef.value.validate().then(() => {
@@ -220,7 +237,7 @@
const register = type.value == 'username' ? usernameRegister : mobileRegister
- register(formData).then((res: responseResult) => {
+ register(formData).then((res: any) => {
memberStore.setToken(res.data.token)
useLogin().handleLoginBack()
}).catch(() => {
@@ -229,10 +246,40 @@
})
})
}
+ const toLink = ()=> {
+ const pages = getCurrentPages(); // 获取页面栈
+ if (pages.length > 1) {
+ const currentPage = pages[pages.length - 2].route;
+ if (currentPage == 'app/pages/auth/login') {
+ // 返回上一页
+ uni.navigateBack({
+ delta: 1 // 默认值是1,表示返回的页面层数
+ });
+ }else{
+ redirect({ url: '/app/pages/auth/login',mode:'redirectTo' })
+ }
+ }else{
+ redirect({ url: '/app/pages/auth/login',mode:'redirectTo' })
+ }
+
+ }
-
diff --git a/uni-app/src/app/pages/auth/resetpwd.vue b/uni-app/src/app/pages/auth/resetpwd.vue
index 17bf4c252..9a8a3c603 100644
--- a/uni-app/src/app/pages/auth/resetpwd.vue
+++ b/uni-app/src/app/pages/auth/resetpwd.vue
@@ -1,54 +1,65 @@
-
-
-
-
-
- {{ t('findPassword') }}
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+ {{t('findPassword')}}
+ {{t('findPasswordTip')}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
\ No newline at end of file
diff --git a/uni-app/src/app/pages/index/close.vue b/uni-app/src/app/pages/index/close.vue
index 058971b59..8827fc89e 100644
--- a/uni-app/src/app/pages/index/close.vue
+++ b/uni-app/src/app/pages/index/close.vue
@@ -1,12 +1,27 @@
-
-
+
+
+
+ {{t('siteClose')}}
+
\ No newline at end of file
diff --git a/uni-app/src/app/pages/index/diy.vue b/uni-app/src/app/pages/index/diy.vue
index 0c1b24b43..3180cdc89 100644
--- a/uni-app/src/app/pages/index/diy.vue
+++ b/uni-app/src/app/pages/index/diy.vue
@@ -1,7 +1,7 @@
-
+
@@ -30,7 +30,7 @@
\ No newline at end of file
diff --git a/uni-app/src/app/pages/member/account.vue b/uni-app/src/app/pages/member/account.vue
index 9f87b9397..8507884a0 100644
--- a/uni-app/src/app/pages/member/account.vue
+++ b/uni-app/src/app/pages/member/account.vue
@@ -1,30 +1,30 @@
-
+
-
-
-
+
@@ -32,7 +32,7 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/uni-app/src/app/pages/member/account_edit.vue b/uni-app/src/app/pages/member/account_edit.vue
index 250c04919..c623ffca4 100644
--- a/uni-app/src/app/pages/member/account_edit.vue
+++ b/uni-app/src/app/pages/member/account_edit.vue
@@ -1,26 +1,24 @@
-
-
-
-
diff --git a/uni-app/src/app/pages/member/address_edit.vue b/uni-app/src/app/pages/member/address_edit.vue
index 520edacf9..aac20e320 100644
--- a/uni-app/src/app/pages/member/address_edit.vue
+++ b/uni-app/src/app/pages/member/address_edit.vue
@@ -1,50 +1,55 @@
-
+
+
+
+
+
+
+
+
+
@@ -55,7 +60,7 @@
\ No newline at end of file
diff --git a/uni-app/src/app/pages/member/apply_cash_out.vue b/uni-app/src/app/pages/member/apply_cash_out.vue
index 462b594e1..e2f570764 100644
--- a/uni-app/src/app/pages/member/apply_cash_out.vue
+++ b/uni-app/src/app/pages/member/apply_cash_out.vue
@@ -1,46 +1,44 @@
-
-
@@ -140,7 +143,7 @@
transfer_type: [] // 提现方式
})
- let query:AnyObject | undefined = {}
+ let query:any = {}
onLoad(async (data) => {
query = data
@@ -237,7 +240,7 @@
data.account_id = query.account_id
}
alipayLoading.value = true
- request(data).then(res => {
+ request(data).then((res: any) => {
if (res.data && res.data.account_id) {
alipayAccountInfo.value = res.data
// 初始化赋值
@@ -253,7 +256,7 @@
* 获取银行卡提现账号信息
*/
const bankLoading = ref(false)
- const bankAccountInfo = ref(null)
+ const bankAccountInfo: any = ref(null)
const getBankAccountInfo = () => {
const data = { account_type: 'bank', account_id: 0 }
let request = getFirstCashoutAccountInfo
@@ -263,7 +266,7 @@
data.account_id = query.account_id
}
bankLoading.value = true
- request(data).then(res => {
+ request(data).then((res: any) => {
if (res.data && res.data.account_id) {
bankAccountInfo.value = res.data
// 初始化赋值
@@ -312,9 +315,17 @@
diff --git a/uni-app/src/app/pages/member/balance.vue b/uni-app/src/app/pages/member/balance.vue
index 70238ec7a..ae044d105 100644
--- a/uni-app/src/app/pages/member/balance.vue
+++ b/uni-app/src/app/pages/member/balance.vue
@@ -1,75 +1,68 @@
-
-
-
+
+
+
- {{t('accountBalance')}}
-
- ¥
- {{ memberStore.info ? moneyFormat((parseFloat(memberStore.info.balance) + parseFloat(memberStore.info.money)).toString()) : '0.00' }}
+ {{t('accountBalance')}}
+
+ ¥
+ {{ memberStore.info ? moneyFormat((parseFloat(memberStore.info.balance) + parseFloat(memberStore.info.money)).toString()).split('.')[0] : '0' }}.
+ {{ memberStore.info ? moneyFormat((parseFloat(memberStore.info.balance) + parseFloat(memberStore.info.money)).toString()).split('.')[1] : '00' }}
-