li.shaoyi 2 gadi atpakaļ
vecāks
revīzija
477fbc97fa
30 mainītis faili ar 110 papildinājumiem un 80 dzēšanām
  1. 2 2
      src/filters/index.ts
  2. 1 1
      src/packages/mobile/views/mine/Index.vue
  3. 10 0
      src/packages/mobile/views/mine/index.less
  4. BIN
      src/packages/sbyj/assets/app_logo/1024x1024.png
  5. BIN
      src/packages/sbyj/assets/favicon.ico
  6. BIN
      src/packages/sbyj/assets/images/boot-1080p.png
  7. BIN
      src/packages/sbyj/assets/images/boot-480p.png
  8. BIN
      src/packages/sbyj/assets/images/boot-720p.png
  9. BIN
      src/packages/sbyj/assets/images/login-logo.png
  10. BIN
      src/packages/sbyj/assets/images/market-title-bg.jpg
  11. BIN
      src/packages/sbyj/assets/logo.png
  12. 0 0
      src/packages/sbyj/assets/logo.svg
  13. 2 2
      src/packages/sbyj/views/bank/sign/Index.vue
  14. 1 1
      src/packages/sbyj/views/bank/sign/components/edit/Index.vue
  15. 1 1
      src/packages/sbyj/views/bank/wallet/components/withdraw/Index.vue
  16. 8 0
      src/packages/sbyj/views/market/list/index.less
  17. 16 26
      src/packages/sbyj/views/market/list/index.vue
  18. 1 1
      src/packages/sbyj/views/mine/address/Index.vue
  19. 1 1
      src/packages/sbyj/views/mine/address/components/edit/Index.vue
  20. 20 3
      src/packages/sbyj/views/mine/index.less
  21. 7 5
      src/packages/sbyj/views/mine/index.vue
  22. 1 1
      src/packages/sbyj/views/mine/invoice/Index.vue
  23. 1 1
      src/packages/sbyj/views/mine/invoice/components/edit/Index.vue
  24. 1 1
      src/packages/sbyj/views/user/avatar/Index.vue
  25. 1 1
      src/packages/sbyj/views/user/cancel/Index.vue
  26. 1 1
      src/packages/sbyj/views/user/forget/Index.vue
  27. 6 5
      src/packages/sbyj/views/user/login/Index.vue
  28. 27 25
      src/packages/sbyj/views/user/login/index.less
  29. 1 1
      src/packages/sbyj/views/user/password/Index.vue
  30. 1 1
      src/packages/sbyj/views/user/register/Index.vue

+ 2 - 2
src/filters/index.ts

@@ -73,9 +73,9 @@ export function handlePriceColor(curValue: number, preValue: number) {
     if (!curValue || curValue === preValue) {
         return ''
     } else if (curValue > preValue) {
-        return 'g-color--up'
+        return 'g-price-up'
     } else {
-        return 'g-color--down'
+        return 'g-price-down'
     }
 }
 

+ 1 - 1
src/packages/mobile/views/mine/Index.vue

@@ -12,7 +12,7 @@
                         </div>
                         <div class="profile-user__info">
                             <div class="top">
-                                <span>{{ accountInfo.accountname }}</span>
+                                <span>{{ userStore.accountName }}</span>
                                 <Icon name="checked" color="var(--van-tag-success-color)" v-if="authStatus" />
                                 <Icon name="warning" color="var(--van-tag-warning-color)" v-else />
                             </div>

+ 10 - 0
src/packages/mobile/views/mine/index.less

@@ -1,3 +1,5 @@
+@import '@mobile/assets/themes/base/mixin.less';
+
 .mine {
     @backgroundImage: linear-gradient(var(--navbar-background), var(--navbar-background) 3rem, transparent 3rem);
 
@@ -41,12 +43,20 @@
 
                 &__info {
                     flex: 1;
+                    padding-right: .32rem;
 
                     .top {
+                        display: flex;
+                        align-items: center;
                         font-size: .24rem;
                         color: #A1B1C5;
 
+                        span {
+                            .mixin-text-overflow()
+                        }
+
                         .van-icon {
+                            line-height: normal;
                             margin-left: .04rem;
                         }
                     }

BIN
src/packages/sbyj/assets/app_logo/1024x1024.png


BIN
src/packages/sbyj/assets/favicon.ico


BIN
src/packages/sbyj/assets/images/boot-1080p.png


BIN
src/packages/sbyj/assets/images/boot-480p.png


BIN
src/packages/sbyj/assets/images/boot-720p.png


BIN
src/packages/sbyj/assets/images/login-logo.png


BIN
src/packages/sbyj/assets/images/market-title-bg.jpg


BIN
src/packages/sbyj/assets/logo.png


Failā izmaiņas netiks attēlotas, jo tās ir par lielu
+ 0 - 0
src/packages/sbyj/assets/logo.svg


+ 2 - 2
src/packages/sbyj/views/bank/sign/Index.vue

@@ -14,13 +14,13 @@
         </div>
         <div class="bank-sign__empty" v-else>
             <Empty description="您还未添加签约账户" />
-            <Button type="danger" @click="openComponent('edit')" round>添加签约账户</Button>
+            <Button type="primary" @click="openComponent('edit')" round>添加签约账户</Button>
         </div>
         <template #footer>
             <div class="g-form__footer" v-if="bankInfo">
                 <Button type="warning" round block @click="formSubmit"
                     v-if="bankInfo.signstatus === SignStatus.Signed">解约</Button>
-                <Button type="danger" round block @click="openComponent('edit')"
+                <Button type="primary" round block @click="openComponent('edit')"
                     v-if="[SignStatus.Unsigned, SignStatus.Refuse, SignStatus.Signed].includes(bankInfo.signstatus)">修改</Button>
             </div>
         </template>

+ 1 - 1
src/packages/sbyj/views/bank/sign/components/edit/Index.vue

@@ -22,7 +22,7 @@
             </Form>
             <template #footer>
                 <div class="g-form__footer inset">
-                    <Button type="danger" round block @click="formRef?.submit()">{{ bankInfo ? '修改' : '提交' }}</Button>
+                    <Button type="primary" round block @click="formRef?.submit()">{{ bankInfo ? '修改' : '提交' }}</Button>
                 </div>
             </template>
         </app-view>

+ 1 - 1
src/packages/sbyj/views/bank/wallet/components/withdraw/Index.vue

@@ -35,7 +35,7 @@
         </div>
         <template #footer>
             <div class="g-form__footer inset">
-                <Button round block type="danger" @click="formRef?.submit()">确定</Button>
+                <Button round block type="primary" @click="formRef?.submit()">确定</Button>
             </div>
         </template>
     </app-view>

+ 8 - 0
src/packages/sbyj/views/market/list/index.less

@@ -1,4 +1,12 @@
 .market {
+    &-header {
+        .app-statusbar {
+            height: 2.94rem;
+            background: url('@/packages/sbyj/assets/images/market-title-bg.jpg') no-repeat center top;
+            background-size: 100% auto;
+        }
+    }
+
     &-title {
         color: #999;
         font-size: .26rem;

+ 16 - 26
src/packages/sbyj/views/market/list/index.vue

@@ -1,37 +1,37 @@
 <template>
     <app-view class="market">
         <template #header>
-            <app-navbar title="行情" :show-back-button="false" />
+            <app-navbar class="market-header" title="行情" :show-back-button="false" />
         </template>
         <app-list :columns="columns" :data-list="touristTradeGoodsList" @row-click="rowClick">
             <!-- 回购 -->
             <template #ask="{ row }">
-                <span :class="row.bidColor">{{ handleNumberValue(row.bid) }}</span>
+                <span :class="row.bidColor">{{ handleNumberValue(formatDecimal(row.bid, row.decimalplace)) }}</span>
             </template>
             <!-- 销售 -->
             <template #bid="{ row }">
-                <span :class="row.askColor">{{ handleNumberValue(row.ask) }}</span>
+                <span :class="row.askColor">{{ handleNumberValue(formatDecimal(row.ask, row.decimalplace)) }}</span>
             </template>
             <!-- 高/低 -->
             <template #hl="{ row }">
-                <span :class="row.highestColor">{{ handleNumberValue(row.highest) }}</span>
-                <span :class="row.lowestColor">{{ handleNumberValue(row.lowest) }}</span>
+                <span :class="row.highestColor">{{ handleNumberValue(formatDecimal(row.highest, row.decimalplace)) }}</span>
+                <span :class="row.lowestColor">{{ handleNumberValue(formatDecimal(row.lowest, row.decimalplace)) }}</span>
             </template>
         </app-list>
         <div class="market-title" v-if="touristRefGoodsList.length">参考商品</div>
         <app-list :show-header="false" :columns="columns" :data-list="touristRefGoodsList">
             <!-- 回购 -->
             <template #ask="{ row }">
-                <span :class="row.bidColor">{{ handleNumberValue(row.bid) }}</span>
+                <span :class="row.bidColor">{{ handleNumberValue(formatDecimal(row.bid, row.decimalplace)) }}</span>
             </template>
             <!-- 销售 -->
             <template #bid="{ row }">
-                <span :class="row.askColor">{{ handleNumberValue(row.ask) }}</span>
+                <span :class="row.askColor">{{ handleNumberValue(formatDecimal(row.ask, row.decimalplace)) }}</span>
             </template>
             <!-- 高/低 -->
             <template #hl="{ row }">
-                <span :class="row.highestColor">{{ handleNumberValue(row.highest) }}</span>
-                <span :class="row.lowestColor">{{ handleNumberValue(row.lowest) }}</span>
+                <span :class="row.highestColor">{{ handleNumberValue(formatDecimal(row.highest, row.decimalplace)) }}</span>
+                <span :class="row.lowestColor">{{ handleNumberValue(formatDecimal(row.lowest, row.decimalplace)) }}</span>
             </template>
         </app-list>
     </app-view>
@@ -39,7 +39,7 @@
 
 <script lang="ts" setup>
 import { computed, onActivated, onDeactivated, nextTick } from 'vue'
-import { handleNumberValue } from '@/filters'
+import { handleNumberValue, formatDecimal, handlePriceColor } from '@/filters'
 import { useNavigation } from '@/packages/sbyj/router/navigation'
 import { useFuturesStore, useLoginStore } from '@/stores'
 import quoteSocket from '@/services/websocket/quote'
@@ -81,14 +81,15 @@ const touristQuoteDayList = computed(() => {
                 goodsid: item.goodsid,
                 goodscode: item.goodscode,
                 goodsname: item.goodsname,
+                decimalplace: item.decimalplace,
                 ask: t.ask,
                 bid: t.bid,
                 highest: t.highest,
                 lowest: t.lowest,
-                askColor: handleColor(t.ask, t.presettle),
-                bidColor: handleColor(t.bid, t.presettle),
-                highestColor: handleColor(t.highest, t.presettle),
-                lowestColor: handleColor(t.lowest, t.presettle),
+                askColor: handlePriceColor(t.ask, t.presettle),
+                bidColor: handlePriceColor(t.bid, t.presettle),
+                highestColor: handlePriceColor(t.highest, t.presettle),
+                lowestColor: handlePriceColor(t.lowest, t.presettle),
                 trademode: item.trademode,
             })
         }
@@ -118,6 +119,7 @@ const dataList = computed(() => {
     return list.map((e) => ({
         goodscode: e.goodscode,
         goodsname: e.goodsname,
+        decimalplace: e.decimalplace,
         askColor: e.askColor,
         bidColor: e.bidColor,
         lowestColor: e.lowestColor,
@@ -130,18 +132,6 @@ const dataList = computed(() => {
     }))
 })
 
-// 处理行情价格颜色
-const handleColor = (value: number, presettle: number) => {
-    if (value === 0 || value === presettle) {
-        return ''
-    } else if (value > presettle) {
-        return 'g-price-up'
-    } else {
-        return 'g-price-down'
-    }
-}
-
-
 const subscribe = quoteSocket.createSubscribe()
 
 const columns: Model.TableColumn[] = [

+ 1 - 1
src/packages/sbyj/views/mine/address/Index.vue

@@ -29,7 +29,7 @@
         <Empty v-else />
         <template #footer>
             <div class="g-form__footer inset">
-                <Button type="danger" @click="onEdit" round block>新增地址</Button>
+                <Button type="primary" @click="onEdit" round block>新增地址</Button>
             </div>
             <component ref="componentRef" v-bind="{ selectedRow }" :is="componentMap.get(componentId)"
                 @closed="closeComponent" v-if="componentId" />

+ 1 - 1
src/packages/sbyj/views/mine/address/components/edit/Index.vue

@@ -27,7 +27,7 @@
                 </Form>
                 <template #footer>
                     <div class="g-form__footer inset">
-                        <Button type="danger" @click="formRef?.submit" round block>保存</Button>
+                        <Button type="primary" @click="formRef?.submit" round block>保存</Button>
                     </div>
                 </template>
             </app-view>

+ 20 - 3
src/packages/sbyj/views/mine/index.less

@@ -1,3 +1,5 @@
+@import '@/packages/sbyj/assets/themes/base/mixin.less';
+
 .mine {
     @backgroundImage: linear-gradient(var(--navbar-background), var(--navbar-background) 3rem, transparent 3rem);
 
@@ -41,10 +43,25 @@
 
                 &__info {
                     flex: 1;
-                    display: flex;
-                    flex-direction: column;
+                    padding-right: .32rem;
+
+                    .top {
+                        display: flex;
+                        align-items: center;
+                        font-size: .24rem;
+                        color: #A1B1C5;
+
+                        span {
+                            .mixin-text-overflow()
+                        }
+
+                        .van-icon {
+                            line-height: normal;
+                            margin-left: .04rem;
+                        }
+                    }
 
-                    >span {
+                    .bottom {
                         line-height: .4rem;
                         font-size: .3rem;
                         font-weight: bold;

+ 7 - 5
src/packages/sbyj/views/mine/index.vue

@@ -11,10 +11,12 @@
                             <img class="g-image--avatar" :src="userStore.userAvatar" />
                         </div>
                         <div class="profile-user__info">
-                            <div>
-                                <Tag :type="authStatus ? 'success' : 'primary'">{{ getAuthStatusName(authStatus) }}</Tag>
+                            <div class="top">
+                                <span>{{ userStore.accountName }}</span>
+                                <Icon name="checked" color="var(--van-tag-success-color)" v-if="authStatus" />
+                                <Icon name="warning" color="var(--van-tag-warning-color)" v-else />
                             </div>
-                            <span>{{ loginStore.loginId }}</span>
+                            <div class="bottom">{{ loginStore.loginId }}</div>
                         </div>
                     </div>
                     <div class="profile-account">
@@ -111,10 +113,10 @@
 
 <script lang="ts" setup>
 import { shallowRef, onActivated } from 'vue'
-import { Cell, CellGroup, Button, Tag } from 'vant'
+import { Cell, CellGroup, Button, Icon } from 'vant'
 import { fullloading, dialog } from '@/utils/vant'
 import { useNavigation } from '@/packages/sbyj/router/navigation'
-import { AuthStatus, getAuthStatusName } from '@/constants/account'
+import { AuthStatus } from '@/constants/account'
 import { queryBankAccountSign } from '@/services/api/bank'
 import { queryUserAccount } from '@/services/api/account'
 import { useLoginStore, useAccountStore, useUserStore } from '@/stores'

+ 1 - 1
src/packages/sbyj/views/mine/invoice/Index.vue

@@ -25,7 +25,7 @@
         <Empty v-else />
         <template #footer>
             <div class="g-form__footer inset">
-                <Button type="danger" @click="onEdit" round block>新增发票</Button>
+                <Button type="primary" @click="onEdit" round block>新增发票</Button>
             </div>
             <component ref="componentRef" v-bind="{ selectedRow }" :is="componentMap.get(componentId)"
                 @closed="closeComponent" v-if="componentId" />

+ 1 - 1
src/packages/sbyj/views/mine/invoice/components/edit/Index.vue

@@ -35,7 +35,7 @@
             </Form>
             <template #footer>
                 <div class="g-form__footer inset">
-                    <Button type="danger" @click="formRef?.submit" round block>保存</Button>
+                    <Button type="primary" @click="formRef?.submit" round block>保存</Button>
                 </div>
             </template>
         </app-view>

+ 1 - 1
src/packages/sbyj/views/user/avatar/Index.vue

@@ -14,7 +14,7 @@
         </Form>
         <template #footer>
             <div class="g-form__footer inset">
-                <Button round block type="danger" @click="formRef?.submit">确定</Button>
+                <Button round block type="primary" @click="formRef?.submit">确定</Button>
             </div>
         </template>
     </app-view>

+ 1 - 1
src/packages/sbyj/views/user/cancel/Index.vue

@@ -15,7 +15,7 @@
         </section>
         <template #footer>
             <div class="g-form__footer inset">
-                <Button type="danger" @click="onSubmit" round block>确认注销</Button>
+                <Button type="primary" @click="onSubmit" round block>确认注销</Button>
             </div>
         </template>
     </app-view>

+ 1 - 1
src/packages/sbyj/views/user/forget/Index.vue

@@ -24,7 +24,7 @@
         </Form>
         <template #footer>
             <div class="g-form__footer inset">
-                <Button type="danger" @click="formRef?.submit()" round block>重置密码</Button>
+                <Button type="primary" @click="formRef?.submit()" round block>重置密码</Button>
             </div>
         </template>
     </app-view>

+ 6 - 5
src/packages/sbyj/views/user/login/Index.vue

@@ -4,21 +4,21 @@
     <div class="login-logo">
       <img src="@/packages/sbyj/assets/images/login-logo.png" />
     </div>
-    <Form class="login-form" @submit="formSubmit">
+    <Form ref="formRef" class="login-form" @submit="formSubmit">
       <CellGroup inset>
         <Field v-model="formData.userName" name="account" label="用户名" label-align="top" size="large" placeholder="请输入用户名"
           :rules="[{ required: true, message: '请输入用户名' }]" />
         <Field v-model="formData.password" name="password" type="password" label="密码" label-align="top" size="large"
           placeholder="请输入密码" :rules="[{ required: true, message: '请输入密码' }]" autocomplete="off" />
       </CellGroup>
-      <div class="button-submit">
-        <Button type="primary" native-type="submit" round block>登录</Button>
-      </div>
     </Form>
     <div class="login-link">
       <span @click="navigationTo('user-register')">用户注册</span>
       <span @click="navigationTo('user-forget')">忘记密码</span>
     </div>
+    <div class="login-submit">
+      <Button type="primary" native-type="submit" @click="formRef?.submit" round block>登录</Button>
+    </div>
     <div class="login-footer">
       <div class="login-footer__trem">
         <Checkbox shape="square" icon-size=".32rem" v-model="checked">我已阅读并同意</Checkbox>
@@ -37,7 +37,7 @@
 
 <script lang="ts" setup>
 import { shallowRef, onMounted, onUnmounted } from 'vue'
-import { Button, Field, CellGroup, Form, Checkbox, showFailToast, showSuccessToast, showToast } from 'vant'
+import { FormInstance, Button, Field, CellGroup, Form, Checkbox, showFailToast, showSuccessToast, showToast } from 'vant'
 import { fullloading } from '@/utils/vant'
 import { useLogin } from '@/business/login'
 import { useNavigation } from '@/packages/sbyj/router/navigation'
@@ -46,6 +46,7 @@ import plus from '@/utils/h5plus'
 
 const { routerBack, routerTo } = useNavigation()
 const { formData, userLogin } = useLogin()
+const formRef = shallowRef<FormInstance>()
 const checked = shallowRef(false) // 是否同意协议管理
 const appVersion = plus.getSystemInfo('version') // 应用版本号
 

+ 27 - 25
src/packages/sbyj/views/user/login/index.less

@@ -1,25 +1,35 @@
 .login {
     display: flex;
     flex-direction: column;
-    background: linear-gradient(35deg, #a5d9f4, #fff 65%, #f8e7e7);
+    background-color: #fff;
 
-    &-navback {
-        >.van-icon {
-            color: #333;
-        }
+    &::before {
+        content: '';
+        position: absolute;
+        top: 0;
+        left: -20%;
+        width: 140%;
+        height: 4rem;
+        border-radius: 0 0 50% 50%;
+        background: linear-gradient(35deg, #243862, #3e5ea2);
     }
 
     &-logo {
+        position: relative;
+        z-index: 0;
         text-align: center;
         padding: 1rem 0;
 
         img {
-            height: 1.2rem;
+            height: .48rem;
         }
     }
 
     &-form {
+        position: relative;
+        z-index: 0;
         background-color: #fff;
+        box-shadow: 0 0 .72rem 0 rgba(15, 42, 95, .15);
         border-radius: .32rem;
         padding: .32rem;
         margin: 0 .36rem;
@@ -41,35 +51,27 @@
                 padding: .12rem .2rem;
             }
         }
-
-        .button {
-            &-link {
-                display: flex;
-                justify-content: space-between;
-                padding: .32rem 0;
-
-                a {
-                    color: #333;
-                }
-            }
-
-            &-submit {
-                --van-button-primary-background: #00577c;
-                //--van-button-primary-background: linear-gradient(to right, #dc364a, #1973e1);
-                padding: .24rem;
-                padding-top: .48rem;
-            }
-        }
     }
 
     &-link {
         display: flex;
         justify-content: space-between;
+        color: #888;
         font-size: .26rem;
         padding: .28rem .48rem;
         margin: 0 .48rem;
     }
 
+    &-submit {
+        text-align: center;
+        margin-top: .48rem;
+
+        .van-button {
+            display: inline-block;
+            width: 75%;
+        }
+    }
+
     &-footer {
         padding: .36rem;
         margin-top: auto;

+ 1 - 1
src/packages/sbyj/views/user/password/Index.vue

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

+ 1 - 1
src/packages/sbyj/views/user/register/Index.vue

@@ -41,7 +41,7 @@
     </Form>
     <template #footer>
       <div class="g-form__footer inset">
-        <Button type="danger" @click="formRef?.submit" round block>免费注册</Button>
+        <Button type="primary" @click="formRef?.submit" round block>免费注册</Button>
       </div>
       <app-reward :show="showReward" :value="redEnvelope" title="注册成功!" @click="router.back()" />
     </template>

Daži faili netika attēloti, jo izmaiņu fails ir pārāk liels