li.shaoyi 2 年之前
父節點
當前提交
9a817de736

+ 6 - 1
src/packages/mobile/components/base/iconfont/index.vue

@@ -1,6 +1,6 @@
 <template>
     <div ref="iconfontRef" class="app-iconfont">
-        <svg :class="['app-iconfont__icon', active && 'is-active']" aria-hidden="true">
+        <svg :class="['app-iconfont__icon', active && 'is-active']" aria-hidden="true" :style="iconStyles">
             <use :xlink:href="activeIconName" :fill="activeColor" v-if="active" />
             <use :xlink:href="iconName" :fill="color" v-else />
         </svg>
@@ -19,6 +19,7 @@ const props = defineProps({
         required: true
     },
     color: String,
+    size: String,
     active: Boolean,
     activeIcon: String,
     activeColor: String,
@@ -33,6 +34,10 @@ const iconfontRef = shallowRef<HTMLDivElement>()
 const iconName = computed(() => '#' + props.icon)
 const activeIconName = computed(() => '#' + (props.activeIcon ?? props.icon))
 
+const iconStyles = computed(() => ({
+    fontSize: props.size
+}))
+
 onMounted(() => {
     const el = iconfontRef.value
     if (el) {

+ 1 - 1
src/packages/mobile/components/layouts/block/index.less

@@ -13,7 +13,7 @@
     }
 
     &.bg &__wrapper {
-        background: #fff url('@mobile/assets/images/block-bg.png') no-repeat center bottom;
+        //background: #fff url('@mobile/assets/images/block-bg.png') no-repeat center bottom;
         background-size: 100%;
     }
 

+ 9 - 16
src/packages/mobile/views/home/main/Index.vue

@@ -17,38 +17,30 @@
       <app-block class="home-main__iconbar bg">
         <ul>
           <li @click="switchTab(1)">
-            <img src="@mobile/assets/icons/cpjs.svg" />
-            <span>预售竞拍</span>
+            <Iconfont label-direction="bottom" icon="icon-yushoujingpai">预售竞拍</Iconfont>
           </li>
           <li @click="routerTo('ballot-list')">
-            <img src="@mobile/assets/icons/cpjs.svg" />
-            <span>预售中签</span>
+            <Iconfont label-direction="bottom" icon="icon-zhongqian">预售中签</Iconfont>
           </li>
           <li @click="switchTab(2)">
-            <img src="@mobile/assets/icons/cpjg.svg" />
-            <span>定金转让</span>
+            <Iconfont label-direction="bottom" icon="icon-dingjinzhuanrang">定金转让</Iconfont>
           </li>
           <li @click="routerTo('swap-list')">
-            <img src="@mobile/assets/icons/ptgz.svg" />
-            <span>掉期贸易</span>
+            <Iconfont label-direction="bottom" icon="icon-diaoqimaoyi">掉期贸易</Iconfont>
           </li>
         </ul>
         <ul>
           <li @click="switchTab(3)">
-            <img src="@mobile/assets/icons/wdrw.svg" />
-            <span>订单挂牌</span>
+            <Iconfont label-direction="bottom" icon="icon-a-zu771">订单挂牌</Iconfont>
           </li>
           <li @click="routerTo('pricing-list')">
-            <img src="@mobile/assets/icons/ccwl.svg" />
-            <span>挂牌点价</span>
+            <Iconfont label-direction="bottom" icon="icon-guapaidianjia">挂牌点价</Iconfont>
           </li>
           <li @click="routerTo('spot-list')">
-            <img src="@mobile/assets/icons/htzr.svg" />
-            <span>现货贸易</span>
+            <Iconfont label-direction="bottom" icon="icon-xianhuomaoyi">现货贸易</Iconfont>
           </li>
           <li @click="routerTo('market-list')">
-            <img src="@mobile/assets/icons/ccwl.svg" />
-            <span>参考行情</span>
+            <Iconfont label-direction="bottom" icon="icon-cankaohangqing">参考行情</Iconfont>
           </li>
         </ul>
       </app-block>
@@ -78,6 +70,7 @@ import { useNavigation } from "@/hooks/navigation";
 import { queryImageConfigs } from "@/services/api/common";
 import { queryNewTitles } from "@/services/api/news";
 import { useLoginStore } from '@/stores'
+import Iconfont from '@mobile/components/base/iconfont/index.vue'
 
 const loginStore = useLoginStore();
 const { routerTo, setGlobalUrlParams } = useNavigation();

+ 8 - 7
src/packages/mobile/views/home/main/index.less

@@ -41,14 +41,15 @@
                 width: calc(~'100% / 4');
                 text-align: center;
 
-                img {
-                    width: .76rem;
-                    height: .76rem;
-                }
+                .app-iconfont {
+                    &__icon {
+                        font-size: .8rem;
+                    }
 
-                span {
-                    font-size: .24rem;
-                    margin-top: .04rem;
+                    &__label {
+                        font-size: .24rem;
+                        margin-top: .1rem;
+                    }
                 }
             }
         }

+ 13 - 17
src/packages/mobile/views/mine/Index.vue

@@ -51,20 +51,16 @@
         <app-block class="mine-iconbar">
             <ul>
                 <li @click="routerTo('order-position')">
-                    <img src="@mobile/assets/icons/generalize.svg" />
-                    <span>我的持仓</span>
+                    <Iconfont label-direction="bottom" icon="icon-a-zu746">我的持仓</Iconfont>
                 </li>
                 <li @click="routerTo('order-list')">
-                    <img src="@mobile/assets/icons/order.svg" />
-                    <span>我的订单</span>
+                    <Iconfont label-direction="bottom" icon="icon-a-zu771defuben">我的订单</Iconfont>
                 </li>
                 <li @click="routerTo('order-delivery')">
-                    <img src="@mobile/assets/icons/wddj.svg" />
-                    <span>交货提货</span>
+                    <Iconfont label-direction="bottom" icon="icon-a-zu803">交货提货</Iconfont>
                 </li>
                 <li @click="routerTo('order-performance')">
-                    <img src="@mobile/assets/icons/wareorder.svg" />
-                    <span>履约信息</span>
+                    <Iconfont label-direction="bottom" icon="icon-a-zu802">履约信息</Iconfont>
                 </li>
             </ul>
         </app-block>
@@ -73,42 +69,42 @@
                 <Cell is-link :to="{ name: 'account-certification' }"
                     v-if="[AuthStatus.Uncertified, AuthStatus.Rejected].includes(authStatus)">
                     <template #title>
-                        <app-iconfont icon="icon-shimingrenzheng">实名认证</app-iconfont>
+                        <Iconfont icon="icon-shimingrenzheng">实名认证</Iconfont>
                     </template>
                 </Cell>
                 <Cell is-link :to="{ name: 'bank-sign' }" v-if="authStatus === AuthStatus.Certified">
                     <template #title>
-                        <app-iconfont icon="icon-qianyuezhanghu">签约账户</app-iconfont>
+                        <Iconfont icon="icon-qianyuezhanghu">签约账户</Iconfont>
                     </template>
                 </Cell>
                 <Cell is-link :to="{ name: 'mine-profile' }">
                     <template #title>
-                        <app-iconfont icon="icon-fapiaoshuoming">个人信息</app-iconfont>
+                        <Iconfont icon="icon-fapiaoshuoming">个人信息</Iconfont>
                     </template>
                 </Cell>
                 <Cell is-link :to="{ name: 'rules-zcxy' }">
                     <template #title>
-                        <app-iconfont icon="icon-yonghuzhucexieyi">用户注册协议</app-iconfont>
+                        <Iconfont icon="icon-yonghuzhucexieyi">用户注册协议</Iconfont>
                     </template>
                 </Cell>
                 <Cell is-link :to="{ name: 'rules-yszc' }">
                     <template #title>
-                        <app-iconfont icon="icon-guanyuzhengce">关于隐私</app-iconfont>
+                        <Iconfont icon="icon-guanyuzhengce">关于隐私</Iconfont>
                     </template>
                 </Cell>
                 <Cell is-link :to="{ name: 'rules-fwrx' }">
                     <template #title>
-                        <app-iconfont icon="icon-kefurexian">服务热线</app-iconfont>
+                        <Iconfont icon="icon-kefurexian">服务热线</Iconfont>
                     </template>
                 </Cell>
                 <Cell is-link :to="{ name: 'mine-setting' }">
                     <template #title>
-                        <app-iconfont icon="icon-shezhi">设置</app-iconfont>
+                        <Iconfont icon="icon-shezhi">设置</Iconfont>
                     </template>
                 </Cell>
                 <Cell is-link :to="{ name: 'rules-gywm' }">
                     <template #title>
-                        <app-iconfont icon="icon-guanyuwomen">关于我们</app-iconfont>
+                        <Iconfont icon="icon-guanyuwomen">关于我们</Iconfont>
                     </template>
                 </Cell>
             </CellGroup>
@@ -129,7 +125,7 @@ import { queryBankAccountSign } from '@/services/api/bank'
 import { queryUserAccount } from '@/services/api/account'
 import { useLoginStore, useAccountStore, useUserStore } from '@/stores'
 import eventBus from '@/services/bus'
-import AppIconfont from '@mobile/components/base/iconfont/index.vue'
+import Iconfont from '@mobile/components/base/iconfont/index.vue'
 
 const { router, routerTo } = useNavigation()
 const loginStore = useLoginStore()

+ 8 - 7
src/packages/mobile/views/mine/index.less

@@ -131,14 +131,15 @@
                 flex-direction: column;
                 align-items: center;
 
-                img {
-                    width: .8rem;
-                    height: .8rem;
-                }
+                .app-iconfont {
+                    &__icon {
+                        font-size: .8rem;
+                    }
 
-                span {
-                    font-size: .24rem;
-                    margin-top: .08rem;
+                    &__label {
+                        font-size: .24rem;
+                        margin-top: .1rem;
+                    }
                 }
             }
         }

+ 1 - 1
src/packages/mobile/views/spot/add/components/buy/index.vue

@@ -34,7 +34,7 @@
         </Form>
         <template #footer>
             <div class="g-form__footer">
-                <Button type="primary" @click="formRef?.submit" round block>提交</Button>
+                <Button type="danger" @click="formRef?.submit" square block>提交</Button>
             </div>
         </template>
         <component :is="WarehouseReceipt" v-model:show="showWarehouseReceipt" @change="onChange" />

+ 1 - 1
src/packages/mobile/views/spot/add/components/sell/index.vue

@@ -49,7 +49,7 @@
         </Form>
         <template #footer>
             <div class="g-form__footer">
-                <Button type="primary" @click="formRef?.submit" round block>提交</Button>
+                <Button type="danger" @click="formRef?.submit" square block>提交</Button>
             </div>
         </template>
     </app-view>