li.shaoyi 3 лет назад
Родитель
Сommit
a71c91f999

+ 7 - 1
fxgl.txt

@@ -1,3 +1,9 @@
 Store Password : muchinfo
 key Alias : fxgl
-key Password : muchinfo
+key Password : muchinfo
+
+cn.muchinfo.thj_debug_v1.0.0.apk
+cn.muchinfo.thj_release_v1.0.0.apk
+
+Go服务:http://101.133.236.116:8280/cfg?key=mtp_20
+升级检测:http://47.116.5.81:8012/PhoneService/GetUpdateInfo

+ 18 - 9
src/business/bank/index.ts

@@ -104,15 +104,18 @@ export function getCusBankSignBankList() {
 }
 
 // 查询当前已经签约信息列表
-export function getBankAccountList() {
-    const { dataList, total, pageIndex, pageSize, pageCount } = useDataTable<Model.BankAccountSignRsp>()
+export function useBankAccountSign() {
+    const { getUserId } = useLoginStore()
+    const { dataList } = useDataTable<Model.BankAccountSignRsp>()
     const loading = shallowRef(false)
 
     const getBankAccountList = () => {
         loading.value = true
         return queryBankAccountSign({
+            data: {
+                userid: getUserId()
+            },
             success: (res) => {
-                total.value = res.total
                 dataList.value = res.data
             },
             complete: () => {
@@ -121,13 +124,14 @@ export function getBankAccountList() {
         })
     }
 
+    const bankInfo = computed(() => {
+        return dataList.value[0]
+    })
+
     return {
         loading,
         dataList,
-        total,
-        pageIndex,
-        pageSize,
-        pageCount,
+        bankInfo,
         getBankAccountList
     }
 }
@@ -294,6 +298,11 @@ export function doBankSign() {
         }
     })
 
+    /// 银行列表
+    const banklist = computed(() => {
+        return (cusSignBank.value?.Banklst ?? []).filter(e => e.status == 0)
+    })
+
     const onSubmit = async () => {
         await request
         loading.value = true
@@ -303,7 +312,7 @@ export function doBankSign() {
                 ...formData,
                 ExtOperatorID: new Date().getTime(),
                 AccountName: formData.BankAccountName,
-                ExBankName: cusSignBank.value?.Banklst.find(obj => obj.bankid === formData.OpenBankAccId)?.bankname
+                ExBankName: banklist.value.find(obj => obj.bankid === formData.OpenBankAccId)?.bankname
             },
             complete: () => {
                 loading.value = false
@@ -314,7 +323,7 @@ export function doBankSign() {
     return {
         loading,
         formData,
-        cusSignBank,
+        banklist,
         onSubmit
     }
 }

+ 29 - 0
src/constants/bank.ts

@@ -3,6 +3,35 @@ import { useEnumStore } from '@/stores'
 const { getEnumTypeList, getEnumTypeName } = useEnumStore()
 
 /**
+ * 签约状态
+ */
+export enum SignStatus {
+    Unsigned = 1,  // 未签约
+    Audit = 2,  // 签约待审核
+    Signing = 3,  // 签约中
+    Signed = 4,  // 已签约
+    Rescinded = 7,  // 已解约
+    Refuse = 10, // 审核拒绝
+}
+
+/**
+ * 获取签约状态列表
+ * @returns 
+ */
+export function getSignStatusList() {
+    return getEnumTypeList('signstatus')
+}
+
+/**
+ * 获取签约状态名称
+ * @returns 
+ */
+export function getSignStatusName(value: number) {
+    const enums = getSignStatusList()
+    return getEnumTypeName(enums, value)
+}
+
+/**
  * 获取资金流水操作类型列表
  * @returns 
  */

+ 3 - 3
src/hooks/navigation/index.ts

@@ -1,4 +1,4 @@
-import { useRoute, useRouter, RouteParamsRaw, onBeforeRouteLeave } from 'vue-router'
+import { useRoute, useRouter, onBeforeRouteLeave } from 'vue-router'
 import animateRouter from '@mobile/router/animateRouter'
 
 export function useNavigation() {
@@ -52,8 +52,8 @@ export function useNavigation() {
     }
 
     // 路由跳转
-    const routerTo = (to: string, params?: RouteParamsRaw) => {
-        router.push({ name: to, params })
+    const routerTo = (to: string) => {
+        router.push({ name: to })
     }
 
     // 导航守卫

+ 8 - 0
src/packages/mobile/assets/themes/global/global.less

@@ -71,4 +71,12 @@
             margin-right: .24rem;
         }
     }
+}
+
+.van {
+    &-dialog {
+        &__message {
+            font-size: .28rem;
+        }
+    }
 }

+ 12 - 9
src/packages/mobile/views/account/certification/index.vue

@@ -5,17 +5,20 @@
         </template>
         <Form ref="formRef" class="g-form__container" @submit="onSubmit">
             <CellGroup inset>
-                <Field v-model="formData.username" name="username" label="姓名" placeholder="请输入用户姓名" :rules="formRules.username"/>
-                <app-select v-model="formData.cardtype" name="cardtype" label="证件类型" placeholder="请选择证件类型" :rules="formRules.cardtype" :options="enums" />
-                <Field v-model="formData.cardnum" name="cardnum" label="证件号码" placeholder="请输入证件号码" :rules="formRules.cardnum"/>
+                <Field v-model="formData.username" name="username" label="姓名" placeholder="请输入用户姓名"
+                    :rules="formRules.username" />
+                <app-select v-model="formData.cardtype" name="cardtype" label="证件类型" placeholder="请选择证件类型"
+                    :rules="formRules.cardtype" :options="enums" />
+                <Field v-model="formData.cardnum" name="cardnum" label="证件号码" placeholder="请输入证件号码"
+                    :rules="formRules.cardnum" />
                 <Field name="cardbackphotourl" label="证件正面照片" :rules="formRules.cardbackphotourl">
                     <template #input>
-                        <Uploader v-model="backList" max-count="1" :after-read="b_afterRead"/>
+                        <Uploader v-model="frontList" max-count="1" :after-read="b_afterRead" />
                     </template>
                 </Field>
                 <Field name="cardfrontphotourl" label="证件反面照片" :rules="formRules.cardfrontphotourl">
                     <template #input>
-                        <Uploader v-model="frontList" max-count="1" :after-read="f_afterRead"/>
+                        <Uploader v-model="backList" max-count="1" :after-read="f_afterRead" />
                     </template>
                 </Field>
             </CellGroup>
@@ -41,14 +44,14 @@ import { getServiceUrl } from '@/services/http';
 
 const formRef = shallowRef<FormInstance>()
 const { formData, formSubmit } = addAuthReq()
-const { router }=useNavigation()
+const { router } = useNavigation()
 
 /// 证件正面地址
 const backList = ref([]);
 /// 证件背面地址
 const frontList = ref([]);
 /// 获取对应的证件枚举类型
-const enums = computed(() => { return getCertificateTypeList().map(obj=>{ return {label: obj.label, value: obj.value} }) }) 
+const enums = computed(() => { return getCertificateTypeList().map(obj => { return { label: obj.label, value: obj.value } }) })
 
 
 const b_afterRead = (file: any) => {
@@ -101,7 +104,7 @@ const formRules: { [key in keyof Model.AddAuthReq]?: FieldRule[] } = {
     }],
     cardtype: [{
         message: '请选择证件类型',
-        validator:()=>{
+        validator: () => {
             return !!formData.cardtype
         }
     }],
@@ -123,7 +126,7 @@ const onSubmit = () => {
     fullloading((hideLoading) => {
         formSubmit().then(() => {
             hideLoading()
-            dialog('实名认证提交请求成功').then(()=>{
+            dialog('实名认证提交请求成功').then(() => {
                 router.back()
             })
         }).catch((err) => {

+ 14 - 16
src/packages/mobile/views/bank/sign/components/edit/index.vue

@@ -1,14 +1,19 @@
 <template>
-    <app-view>
+    <app-view class="g-form">
         <template #header>
             <app-navbar title="添加签约用户" />
         </template>
         <Form ref="formRef" class="g-form__container" @submit="formSubmit">
             <CellGroup inset>
-                <app-select v-model="formData.OpenBankAccId" name="BankName" label="开户银行" placeholder="请选择开户银行" :rules="formRules.OpenBankAccId" :options="banklist" />
-                <Field name="BankNo" label="银行卡号" v-model="formData.BankAccountNo" placeholder="请输入银行卡账号" :rules="formRules.BankAccountNo" />
-                <Field name="AccountName" label="姓名" v-model="formData.BankAccountName" placeholder="请输入银行卡账户名" :rules="formRules.BankAccountName" />
-                <Field name="BranchBankName" label="支行名称" v-model="formData.OpenBankName" placeholder="请输入银行卡支行名称" :rules="formRules.OpenBankName" />
+                <app-select v-model="formData.OpenBankAccId" name="BankName" label="开户银行" placeholder="请选择开户银行"
+                    :rules="formRules.OpenBankAccId" :options="banklist"
+                    :optionProps="{ label: 'bankname', value: 'bankid' }" />
+                <Field name="BankNo" label="银行卡号" v-model="formData.BankAccountNo" placeholder="请输入银行卡账号"
+                    :rules="formRules.BankAccountNo" />
+                <Field name="AccountName" label="姓名" v-model="formData.BankAccountName" placeholder="请输入银行卡账户名"
+                    :rules="formRules.BankAccountName" />
+                <Field name="BranchBankName" label="支行名称" v-model="formData.OpenBankName" placeholder="请输入银行卡支行名称"
+                    :rules="formRules.OpenBankName" />
                 <Field v-if="false" name="SignStatus" label="签约状态" readonly model-value="签约中" />
             </CellGroup>
         </Form>
@@ -22,7 +27,7 @@
 
 <script lang="ts" setup>
 
-import { shallowRef, computed } from 'vue'
+import { shallowRef } from 'vue'
 import { CellGroup, Button, Field, Form, FormInstance, FieldRule, Toast } from 'vant'
 import { fullloading, dialog } from '@/utils/vant'
 import { doBankSign, } from '@/business/bank'
@@ -30,22 +35,15 @@ import { useNavigation } from '@/hooks/navigation'
 import AppSelect from '@mobile/components/base/select/index.vue'
 import { validateRules } from '@/constants/regex'
 
-const {router}=useNavigation()
-const { formData, onSubmit, cusSignBank } = doBankSign()
+const { router } = useNavigation()
+const { formData, onSubmit, banklist } = doBankSign()
 const formRef = shallowRef<FormInstance>()
 
-/// 银行列表
-const banklist=computed(()=> {
-    return (cusSignBank.value?.Banklst ?? []).filter(obj=>{
-        return obj.status == 0
-    }).map((e)=>({label:e.bankname, value:e.bankid}))
-})
-
 // 表单验证规则
 const formRules: { [key in keyof Proto.t2bBankSignReq]?: FieldRule[] } = {
     OpenBankAccId: [{
         message: '请选择银行信息',
-        validator:()=>{
+        validator: () => {
             return !!formData.OpenBankAccId
         }
     }],

+ 8 - 0
src/packages/mobile/views/bank/sign/index.less

@@ -1,4 +1,12 @@
 .bank-sign {
+    &__container {
+        .van-cell {
+            &__title {
+                flex: initial;
+            }
+        }
+    }
+
     &__empty {
         text-align: center;
 

+ 19 - 6
src/packages/mobile/views/bank/sign/index.vue

@@ -3,20 +3,33 @@
         <template #header>
             <app-navbar title="签约账户管理" />
         </template>
-        <div class="bank-sign__empty">
+        <div class="bank-sign__container" v-if="bankInfo">
+            <CellGroup>
+                <Cell title="开户银行" :value="bankInfo.bankname" />
+                <Cell title="银行卡号" :value="bankInfo.bankaccountno" />
+                <Cell title="姓名" :value="bankInfo.bankaccountname" />
+                <Cell title="支行名称" :value="bankInfo.branchbankname" />
+                <Cell title="状态" :value="getSignStatusName(bankInfo.signstatus)" />
+            </CellGroup>
+        </div>
+        <div class="bank-sign__empty" v-else>
             <Empty description="您还未添加签约账户" />
-            <Button type="primary" @click="routerTo('add-banksign')" round>添加签约账户</Button>
+            <Button type="primary" @click="$router.push({ name: 'add-banksign' })" round>添加签约账户</Button>
         </div>
     </app-view>
 </template>
 
 <script lang="ts" setup>
-import { Button, Empty } from 'vant'
-import { useNavigation } from '@/hooks/navigation'
+import { onActivated } from 'vue'
+import { CellGroup, Cell, Button, Empty } from 'vant'
+import { getSignStatusName } from '@/constants/bank'
+import { useBankAccountSign } from '@/business/bank'
+
+const { getBankAccountList, bankInfo } = useBankAccountSign()
 
-const { routerTo } = useNavigation()
+onActivated(() => getBankAccountList())
 </script>
 
-<style lang="less" scoped>
+<style lang="less">
 @import './index.less';
 </style>

+ 5 - 1
src/packages/mobile/views/bank/wallet/index.vue

@@ -3,7 +3,7 @@
         <template #header>
             <app-navbar title="充值提现" />
         </template>
-        <Tabs>
+        <Tabs v-model:active="active">
             <Tab title="充值">
                 <app-deposit />
             </Tab>
@@ -15,11 +15,15 @@
 </template>
 
 <script lang="ts" setup>
+import { shallowRef } from 'vue'
 import { Tab, Tabs } from 'vant'
+import { useNavigation } from '@/hooks/navigation'
 import AppDeposit from './components/deposit/index.vue'
 import AppWithdraw from './components/withdraw/index.vue'
 
+const { getQueryStringToNumber } = useNavigation()
 
+const active = shallowRef(getQueryStringToNumber('tab'))
 </script>
 
 <style lang="less">

+ 14 - 5
src/packages/mobile/views/goods/details/index.vue

@@ -8,10 +8,11 @@
                 <app-select v-model="formData.THJDeliveryMode" name="THJDeliveryMode" label="交割方式"
                     :rules="formRules.THJDeliveryMode" :options="details?.deliverymodes"
                     :optionProps="{ label: 'enumdicname', value: 'enumitemname' }" />
-                <Field v-model="formData.PresaleApplyID" name="loginpwd" label="交割月份" :rules="formRules.PresaleApplyID">
+                <Field label="交割月份">
                     <template #input>
-                        <app-select v-model="selectedMonth" placeholder="开始月份" :options="months" :is-link="false" />
-                        <app-select placeholder="结束日期" :options="months"
+                        <app-select v-model="selectedMonth" placeholder="开始月份" :options="months" :is-link="false"
+                            @confirm="monthChange" />
+                        <app-select v-model="formData.PresaleApplyID" placeholder="结束日期" :options="days"
                             :optionProps="{ label: 'enddate', value: 'presaleapplyid' }" :is-link="false" />
                     </template>
                 </Field>
@@ -56,7 +57,6 @@ const formRules: { [key in keyof Proto.SpotPresaleDestingOrderReq]?: FieldRule[]
 const months = computed(() => {
     const deliveryMonths = details.value?.deliverymonth ?? []
     const monthMap = new Map<string, { label: string, value: string; }>()
-
     deliveryMonths.forEach(({ endmonth }) => {
         if (!monthMap.has(endmonth)) {
             monthMap.set(endmonth, {
@@ -65,10 +65,19 @@ const months = computed(() => {
             })
         }
     })
-
     return [...monthMap.values()]
 })
 
+// 交割日期
+const days = computed(() => {
+    const deliveryMonths = details.value?.deliverymonth ?? []
+    return deliveryMonths.filter((e) => e.endmonth === selectedMonth.value)
+})
+
+const monthChange = (value: string) => {
+    console.log(value)
+}
+
 const onSubmit = () => {
     fullloading(() => {
         formSubmit().then(() => {

+ 1 - 1
src/packages/mobile/views/home/components/main/index.vue

@@ -66,7 +66,7 @@
           <template v-for="(item, index) in newsList" :key="index">
             <Cell class="article-item" title-class="article-item__title" value-class="article-item__time"
               :title="item.title" :value="formatDate(item.creaedate, 'MM/DD')"
-              @click="routerTo('news-details', { details: JSON.stringify(item) })" />
+              :to="{ name: 'news-details', params: { details: JSON.stringify(item) } }" />
           </template>
         </CellGroup>
       </div>

+ 22 - 22
src/packages/mobile/views/home/components/mine/index.vue

@@ -41,8 +41,9 @@
           </div>
         </div>
         <div class="button">
-          <Button size="small" @click="routerTo('bank-wallet')" round>提现</Button>
-          <Button type="primary" size="small" color="#00577C" @click="routerTo('bank-wallet')" round>充值</Button>
+          <Button size="small" @click="router.push({ name: 'bank-wallet', query: { tab: '0' } })" round>提现</Button>
+          <Button type="primary" size="small" color="#00577C"
+            @click="router.push({ name: 'bank-wallet', query: { tab: '1' } })" round>充值</Button>
         </div>
       </div>
     </div>
@@ -67,7 +68,7 @@
     </div>
     <div class="g-navmenu">
       <CellGroup>
-        <Cell is-link  @click="hasAuth">
+        <Cell is-link @click="hasAuth">
           <template #title>
             <app-iconfont icon="icon-shimingrenzheng">实名认证</app-iconfont>
           </template>
@@ -118,46 +119,45 @@
 <script lang="ts" setup>
 import { shallowRef } from 'vue'
 import { Cell, CellGroup, Button, Toast } from 'vant'
-import { dialog } from '@/utils/vant'
+import { fullloading, dialog } from '@/utils/vant'
 import { useNavigation } from '@/hooks/navigation'
 import { useLoginStore, useAccountStore } from '@/stores'
 import { useAuth } from '@/business/auth'
 import AppIconfont from '@mobile/components/base/iconfont/index.vue'
 import { queryUserAccount } from '@/services/api/account'
 
-const { routerTo } = useNavigation()
+const { router, routerTo } = useNavigation()
 const { getLoginId, getUserId, getFirstAccountId } = useLoginStore()
 const { logout } = useAuth()
 const { accountInfo } = useAccountStore()
 const headerRef = shallowRef<HTMLDivElement>()
-const userAccount = shallowRef<Partial<Model.UserAccount>>({})
-
 
 const onReady = (el: HTMLDivElement) => {
   // 设置背景图位置
   headerRef.value?.style.setProperty('background-position', `0 -${el.clientHeight}px`)
 }
 
+// 检查是否已实名认证
 const hasAuth = () => {
-  /// 当前已实名
-  if (userAccount.value.hasauth === 1) {
-    Toast('当前已实名');
-    return
-  } 
-  routerTo('account-certification')
-}
-
-const getUserAccount = () => {
+  fullloading((hideLoading) => {
     queryUserAccount({
-        data: {
-            userID: getUserId()
-        },
-        success: (res) => {
-            userAccount.value = res.data
+      data: {
+        userID: getUserId()
+      },
+      success: (res) => {
+        hideLoading()
+        if (res.data.hasauth) {
+          dialog('当前已实名')
+        } else {
+          routerTo('account-certification')
         }
+      },
+      fail: (err) => {
+        Toast.fail('加载失败')
+      }
     })
+  }, '正在加载...')
 }
-getUserAccount()
 
 const userLogout = () => {
   dialog('是否退出当前账号?', {

+ 1 - 1
src/packages/mobile/views/home/index.vue

@@ -59,7 +59,7 @@ const tabList: Tabbar[] = [
 ]
 
 const onChange = (index: number) => {
-  if (![1, 2].includes(index)) {
+  if (![2].includes(index)) {
     componentId.value = tabList[index].name
   }
 }

+ 1 - 1
src/stores/modules/enum.ts

@@ -17,7 +17,7 @@ interface StoreState {
     allEnums: ShallowRef<Model.EnumRsp[]>;
 }
 
-const enumKeys = ['clientType', 'scoreConfigType', 'accountBusinessCode', 'certificatetype'] as const
+const enumKeys = ['clientType', 'scoreConfigType', 'accountBusinessCode', 'certificatetype', 'signstatus'] as const
 
 /**
  * 枚举存储类