li.shaoyi 3 роки тому
батько
коміт
7e1a0138bc

+ 5 - 2
src/filters/index.ts

@@ -130,8 +130,11 @@ export function formatAmount(value: number, decimal = 2) {
  * @param format 
  * @returns 
  */
-export function formatDate(date: string, format = 'YYYY-MM-DD HH:mm:ss') {
-    return moment(date).format(format)
+export function formatDate(date?: string, format = 'YYYY-MM-DD HH:mm:ss') {
+    if (date) {
+        return moment(date).format(format)
+    }
+    return moment(new Date()).format(format)
 }
 
 /**

+ 2 - 2
src/packages/mobile/views/bank/wallet/components/deposit/index.vue

@@ -2,7 +2,7 @@
     <app-view class="g-form">
         <Form ref="formRef" class="g-form__container" @submit="formSubmit">
             <CellGroup inset>
-                <Field type="digit" v-model="formData.Amount" label="充值金额" placeholder="请填写充值金额"
+                <Field type="number" v-model="formData.Amount" label="充值金额" placeholder="请填写充值金额"
                     :rules="formRules.Amount" />
                 <Field label="凭证">
                     <template #input>
@@ -13,7 +13,7 @@
             </CellGroup>
         </Form>
         <div class="g-form__time">
-            <label>充值提现时间:{{start}}-{{end}}</label>
+            <label>充值提现时间:{{ start }}-{{ end }}</label>
         </div>
         <template #footer>
             <div class="g-form__footer">

+ 3 - 2
src/packages/mobile/views/bank/wallet/components/withdraw/index.vue

@@ -2,7 +2,8 @@
     <app-view class="g-form bank-wallet-withdraw">
         <Form ref="formRef" class="g-form__container" @submit="formSubmit">
             <CellGroup inset>
-                <Field class="form-field" type="digit" label="提现金额" v-model="formData.Amount" :rules="formRules.Amount">
+                <Field class="form-field" type="number" label="提现金额" v-model="formData.Amount"
+                    :rules="formRules.Amount">
                     <template #input>
                         <input v-model="formData.Amount" placeholder="请填写提现金额" />
                         <span class="form-field__tips">可出金额:{{ fund.AvailableOutMoney }}</span>
@@ -31,7 +32,7 @@
             </CellGroup>
         </Form>
         <div class="g-form__time">
-            <label>充值提现时间:{{start}}-{{end}}</label>
+            <label>充值提现时间:{{ start }}-{{ end }}</label>
         </div>
         <template #footer>
             <div class="g-form__footer">

+ 5 - 11
src/packages/mobile/views/home/components/main/index.less

@@ -1,11 +1,6 @@
 @import '@mobile/assets/themes/base/mixin.less';
 
 .home-main {
-    .app-view__body {
-        display       : flex;
-        flex-direction: column;
-    }
-
     &__container {
         flex      : 1;
         overflow-y: auto;
@@ -39,8 +34,7 @@
         }
 
         &--body {
-            padding    : .24rem;
-            padding-top: 0;
+            padding: .24rem;
 
             .van-swipe {
                 min-height   : 1.5rem;
@@ -80,7 +74,7 @@
         align-items     : center;
         background-color: #fff;
         padding         : .16rem;
-        margin-top      : .2rem;
+        margin          : .2rem 0;
 
         .left {
             display        : flex;
@@ -104,7 +98,7 @@
         .right {
             flex   : 1;
             padding: 0 .24rem;
-            
+
             table {
                 width    : 100%;
                 font-size: .24rem;
@@ -112,8 +106,8 @@
                 tr {
                     td {
                         line-height: .4rem;
-                        width: 25%;
-                        text-align: center;
+                        width      : 25%;
+                        text-align : center;
                     }
                 }
             }

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

@@ -1,5 +1,5 @@
 <template>
-  <app-view class="home-main">
+  <app-view class="home-main" flex>
     <template #header>
       <app-navbar title="铁合金掌上行" :show-back-button="false" />
     </template>
@@ -35,10 +35,10 @@
           </li>
         </ul>
       </div>
-      <div class="home-main__market">
+      <div class="home-main__market" v-if="false">
         <div class="left">
           <h2>合金指数</h2>
-          <span>{{ formatDate(marketRun.tradedate ?? Date(), "YYYY-MM-DD") }}</span>
+          <span>{{ formatDate(marketRun.tradedate, "YYYY-MM-DD") }}</span>
         </div>
         <div class="right">
           <table cellspacing="0" cellpadding="0">
@@ -93,7 +93,7 @@ const bodyBanners = shallowRef<Model.ImageConfigsRsp[]>([])  // 轮播图列表
 const newsList = shallowRef<Model.SiteColumnDetailRsp[]>([]) // 资讯列表
 const marketRun = shallowRef<Partial<Model.MarketRunRsp>>({})         // 市场
 
-const {dataList, getQuerySpotGoodsPriceLists} = useQuerySpotGoodsPriceLists()
+const { dataList, getQuerySpotGoodsPriceLists } = useQuerySpotGoodsPriceLists()
 getQuerySpotGoodsPriceLists()
 
 // 下拉刷新

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

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

+ 27 - 28
src/packages/mobile/views/mine/generalize/index.vue

@@ -1,37 +1,35 @@
 <template>
-    <app-view class="mine-generalize">
+    <app-view class="mine-generalize" flex>
         <template #header>
             <app-navbar title="我的推广" />
         </template>
-        <div class="mine-generalize__header">
-            <div class="info">
-                <span>{{ userAccount.refercount }}</span>
-                <h4>推广人数</h4>
-            </div>
-            <div class="block">
-                <div class="block-left">
-                    <h4>当日新增</h4>
-                    <span>{{ userAccount.todayrefercount }}</span>
-                </div>
-                <div class="block-right">
-                    <h4>推广编号</h4>
-                    <span @click="showQRCode = false">{{ userAccount.refernum }}</span>
-                </div>
-            </div>
-        </div>
-        <Tabs class="mine-generalize__tabs">
-            <Tab title="交易数据">
-                <Empty v-if="dataList.length === 0"/>
-            </Tab>
-            <Tab title="推广收益">
-                <Empty />
-            </Tab>
-        </Tabs>
-        <app-qrcode v-model:show="showQRCode" :content="userAccount.refernum" />
-      
         <app-pull-refresh class="tradeData__container" v-model:pageIndex="pageIndex" :page-count="pageCount"
             :updateList="dataList" @refresh="onRefresh" @updated="onRefreshUpdated">
             <template #header>
+                <div class="mine-generalize__header">
+                    <div class="info">
+                        <span>{{ userAccount.refercount }}</span>
+                        <h4>推广人数</h4>
+                    </div>
+                    <div class="block">
+                        <div class="block-left">
+                            <h4>当日新增</h4>
+                            <span>{{ userAccount.todayrefercount }}</span>
+                        </div>
+                        <div class="block-right">
+                            <h4>推广编号</h4>
+                            <span @click="showQRCode = false">{{ userAccount.refernum }}</span>
+                        </div>
+                    </div>
+                </div>
+                <Tabs class="mine-generalize__tabs">
+                    <Tab title="交易数据">
+                        <Empty v-if="dataList.length === 0" />
+                    </Tab>
+                    <Tab title="推广收益">
+                        <Empty />
+                    </Tab>
+                </Tabs>
                 <ul class="list list-row" v-if="showHeader">
                     <li class="list-column">
                         <span>日期</span>
@@ -64,8 +62,9 @@
                     <li class="list-column">{{ item.marketid == 64201 ? item.buytradeqty : item.selltradeqty }}</li>
                     <li class="list-column">{{ item.selltradelot }}</li>
                 </ul>
-            </template>  
+            </template>
         </app-pull-refresh>
+        <app-qrcode v-model:show="showQRCode" :content="userAccount.refernum" />
     </app-view>
 </template>
 

+ 1 - 1
src/packages/mobile/views/user/login/index.less

@@ -9,7 +9,7 @@
         font-weight: bold;
         text-align : center;
         color      : #00577C;
-        padding    : 2.2rem 0 2rem 0;
+        padding    : 2.2rem 0 1.6rem 0;
     }
 
     &-form {