li.shaoyi 2 years ago
parent
commit
5c9281a8c3

+ 2 - 2
src/business/login/index.ts

@@ -25,7 +25,7 @@ export function useLogin(persist = false) {
     const { logining, token, clientType } = loginStore.$toRefs()
 
     const formData = reactive<Model.LoginReq>({
-        userName: localStorage.getItem('hnsh_loginId') ?? '',
+        userName: localStorage.getItem('muchinfo_loginId') ?? '',
         password: '',
         clientType: clientType.value,
     })
@@ -70,7 +70,7 @@ export function useLogin(persist = false) {
             await login({ data: payload }).then(async (res) => {
                 loginStore.setLoginInfo(res.data, persist)
                 loginStore.setAutoLoginData(payload)
-                localStorage.setItem('hnsh_loginId', formData.userName) // 记住登录ID
+                localStorage.setItem('muchinfo_loginId', formData.userName) // 记住登录ID
                 await loadUserData()
                 eventBus.$emit('LoginNotify') // 登录成功通知
             })

File diff suppressed because it is too large
+ 0 - 0
src/packages/mobile/assets/iconfont/iconfont.js


+ 3 - 3
src/packages/mobile/assets/themes/default/default.less

@@ -23,7 +23,7 @@
 
     /* 标签栏 */
     --tabbar-background: #fff;
-    --tabbar-icon: #777;
+    --tabbar-icon: #999;
     --tabbar-icon-active: #c30d23;
 
     /* 内容边距 */
@@ -31,8 +31,8 @@
 
     /* Vant-Button */
     --van-button-border-width: 0;
-    // --van-button-primary-background: linear-gradient(31deg, #C30D23 0%, #DD364A 100%);
-    // --van-button-danger-background: linear-gradient(31deg, #C30D23 0%, #DD364A 100%);
+    --van-button-primary-background: #1e78b9;
+    --van-button-danger-background: #d82d42;
 
     /* Vant-Checkbox */
     --van-checkbox-checked-icon-color: #DD364A !important;

+ 0 - 1
src/packages/mobile/components/modules/quote/chart/index.vue

@@ -45,7 +45,6 @@ const actions = [
     { text: '5分钟', },
     { text: '30分钟', },
     { text: '60分钟', },
-    { text: '2小时', },
     { text: '4小时', }
 ]
 

+ 2 - 2
src/packages/mobile/components/modules/quote/chart/kline/index.vue

@@ -5,10 +5,10 @@
         <template v-else>
             <div class="app-echats-kline__container">
                 <ul class="legend">
-                    <li class="legend-item">开: {{ selectedItem.open }}</li>
+                    <!-- <li class="legend-item">开: {{ selectedItem.open }}</li>
                     <li class="legend-item">收: {{ selectedItem.close }}</li>
                     <li class="legend-item">高: {{ selectedItem.highest }}</li>
-                    <li class="legend-item">低: {{ selectedItem.lowest }}</li>
+                    <li class="legend-item">低: {{ selectedItem.lowest }}</li> -->
                     <li class="legend-item">MA5: {{ selectedItem.ma5 }}</li>
                     <li class="legend-item">MA10: {{ selectedItem.ma10 }}</li>
                     <li class="legend-item">MA15: {{ selectedItem.ma15 }}</li>

+ 5 - 0
src/packages/mobile/router/index.ts

@@ -211,6 +211,11 @@ const routes: Array<RouteRecordRaw> = [
         component: () => import('../views/transfer/detail/Index.vue'),
       },
       {
+        path: 'detail2',
+        name: 'transfer-detail2',
+        component: () => import('../views/transfer/detail2/index.vue'),
+      },
+      {
         path: 'delisting',
         name: 'transfer-delisting',
         component: () => import('../views/transfer/delisting/Index.vue'),

+ 2 - 2
src/packages/mobile/views/boot/Index.vue

@@ -30,7 +30,7 @@ const countdown = 1  // 倒计时秒数
 
 const state = reactive({
   showGuide: false,
-  //showGuide: (!plus.hasPlus() || localStorage.getItem('hnsh_app_showguide') === 'false') ? false : true, // 是否显示引导页
+  //showGuide: (!plus.hasPlus() || localStorage.getItem('muchinfo_app_showguide') === 'false') ? false : true, // 是否显示引导页
   second: countdown, // 剩余秒数
   currentRate: 100, // 当前进度
   rate: 100, // 目标进度
@@ -59,7 +59,7 @@ const skip = (promise: Promise<void>) => {
 
   promise.then(() => {
     plus.exitFullSreen()
-    localStorage.setItem('hnsh_app_showguide', 'false')
+    localStorage.setItem('muchinfo_app_showguide', 'false')
     const redirect = route.query.redirect
     if (redirect) {
       router.replace(redirect.toString())

+ 1 - 1
src/packages/mobile/views/goods/detail/Index.vue

@@ -1,5 +1,5 @@
 <template>
-    <app-view class="goods-detail">
+    <app-view class="goods-detail g-form">
         <template #header>
             <app-navbar :title="quote ? quote.goodscode + '/' + quote.goodsname : '挂牌大厅'" />
         </template>

+ 13 - 13
src/packages/mobile/views/home/Index.vue

@@ -34,32 +34,32 @@ const tabList: Tabbar[] = [
   {
     name: 'home-index',
     label: '首页',
-    icon: 'icon-shouye-1',
-    activeIcon: 'icon-shouye',
+    icon: 'icon-a-zu826',
+    activeIcon: 'icon-a-zu753',
   },
   {
     name: 'home-presale',
-    label: '预售',
-    icon: 'icon-purchase',
-    activeIcon: 'icon-purchase-active',
+    label: '预售竞拍',
+    icon: 'icon-a-zu820',
+    activeIcon: 'icon-a-zu825',
   },
   {
     name: 'home-transfer',
-    label: '转让',
-    icon: 'icon-supply-demand',
-    activeIcon: 'icon-supply-demand-active',
+    label: '定金转让',
+    icon: 'icon-a-zu8201',
+    activeIcon: 'icon-a-zu824',
   },
   {
     name: 'home-goods',
-    label: '订单',
-    icon: 'icon-gongqiu-1',
-    activeIcon: 'icon-gongqiu',
+    label: '订单挂牌',
+    icon: 'icon-a-zu821',
+    activeIcon: 'icon-a-zu818',
   },
   {
     name: 'home-mine',
     label: '我的',
-    icon: 'icon-mine',
-    activeIcon: 'icon-mine-active',
+    icon: 'icon-a-zu823',
+    activeIcon: 'icon-a-zu819',
   }
 ]
 

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

@@ -17,7 +17,7 @@
 
             .app-iconfont {
                 &__icon {
-                    font-size: .56rem;
+                    font-size: .48rem;
                 }
 
                 &__label {

+ 2 - 2
src/packages/mobile/views/mine/address/components/edit/Index.vue

@@ -22,9 +22,9 @@
                     </CellGroup>
                 </Form>
                 <template #footer>
-                    <div class="g-form__footer">
+                    <div class="g-form__footer inset">
                         <Button type="warning" @click="formDelete" round block v-if="selectedRow.autoid">删除</Button>
-                        <Button type="primary" @click="formRef?.submit" round block>保存</Button>
+                        <Button type="danger" @click="formRef?.submit" round block>保存</Button>
                     </div>
                 </template>
             </app-view>

+ 1 - 1
src/packages/mobile/views/order/position/components/spot/listing/Index.vue

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

+ 1 - 1
src/packages/mobile/views/order/position/components/spot/pickup/Index.vue

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

+ 1 - 4
src/packages/mobile/views/order/position/components/transfer/delivery/Index.vue

@@ -12,6 +12,7 @@
                         <div class="g-order-list__titlebar">
                             <div class="left">
                                 <h4>{{ item.username }}</h4>
+                                <span>{{ item.warehousename }}</span>
                             </div>
                         </div>
                         <div class="g-order-list__content">
@@ -21,10 +22,6 @@
                                     <span>{{ item.wrstandardname }}</span>
                                 </li>
                                 <li>
-                                    <span>仓库</span>
-                                    <span>{{ item.warehousename }}</span>
-                                </li>
-                                <li>
                                     <span>升贴水</span>
                                     <span>{{ item.pricemove }}</span>
                                 </li>

+ 2 - 2
src/packages/mobile/views/order/position/components/transfer/delivery/trade/Index.vue

@@ -6,7 +6,7 @@
             </template>
             <Form ref="formRef" class="g-form__container" @submit="onSubmit">
                 <CellGroup inset>
-                    <Cell title="商品代码/名称" :value="detail.wrstandardname" />
+                    <Cell title="商品代码/名称" :value="detail.wrstandardcode + '/' + detail.wrstandardname" />
                     <Cell title="仓库" :value="detail.warehousename" />
                     <Cell title="升贴水" :value="discount.toFixed(2)" />
                     <Cell title="数量" :value="detail.avalidqty" />
@@ -23,7 +23,7 @@
             </Form>
             <template #footer>
                 <div class="g-form__footer">
-                    <Button block round type="primary" @click="formRef?.submit">提交</Button>
+                    <Button block square type="danger" @click="formRef?.submit">提交</Button>
                 </div>
             </template>
         </app-view>

+ 1 - 1
src/packages/mobile/views/order/position/components/transfer/detail/Index.vue

@@ -7,7 +7,7 @@
             </template>
             <div class="g-form__container">
                 <CellGroup title="转让持仓信息">
-                    <Cell title="商品代码/名称" :value="selectedRow.goodsname" />
+                    <Cell title="商品代码/名称" :value="selectedRow.goodscode + '/' + selectedRow.goodsname" />
                     <Cell title="持仓金额" :value="selectedRow.buycurholderamount" />
                     <Cell title="持仓数量" :value="selectedRow.buycurpositionqty" />
                     <Cell title="冻结数量" :value="selectedRow.buyfrozenqty" />

+ 1 - 1
src/packages/mobile/views/order/position/components/transfer/listing/Index.vue

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

+ 1 - 1
src/packages/mobile/views/transfer/delisting/components/delisting/index.vue

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

+ 41 - 0
src/packages/mobile/views/transfer/detail2/index.less

@@ -0,0 +1,41 @@
+.transfer-detail {
+    &__forex {
+        background-color: #fff;
+        margin-top: .2rem;
+
+        dl {
+            padding: .32rem;
+
+            dt {
+                display: flex;
+                justify-content: space-between;
+                padding-bottom: .24rem;
+
+                span {
+                    &:last-child {
+                        font-size: .24rem;
+                        color: #999;
+                    }
+                }
+            }
+
+            dd {
+                display: flex;
+                text-align: center;
+                padding: .1rem 0;
+
+                span {
+                    flex: 1;
+
+                    &:first-child {
+                        text-align: left;
+                    }
+
+                    &:last-child {
+                        text-align: right;
+                    }
+                }
+            }
+        }
+    }
+}

+ 119 - 0
src/packages/mobile/views/transfer/detail2/index.vue

@@ -0,0 +1,119 @@
+<template>
+    <app-view class="transfer-detail g-form g-detail">
+        <template #header>
+            <app-navbar title="转让详情" />
+        </template>
+        <component :is="Price" v-bind="{ goodsCode }" />
+        <component :is="Chart" v-bind="{ goodsCode }" />
+        <div class="transfer-detail__forex">
+            <dl>
+                <dt>
+                    <span>转让挂牌</span>
+                    <span @click="navigateTo">更多
+                        <Icon name="arrow" />
+                    </span>
+                </dt>
+                <dd>
+                    <span>卖一</span>
+                    <span :class="quote?.askColor">{{ handleNumberValue(quote?.ask) }}</span>
+                    <span>{{ handleNumberValue(quote?.askvolume) }}</span>
+                </dd>
+                <dd>
+                    <span>卖二</span>
+                    <span :class="quote?.ask2Color">{{ handleNumberValue(quote?.ask2) }}</span>
+                    <span>{{ handleNumberValue(quote?.askvolume2) }}</span>
+                </dd>
+                <dd>
+                    <span>卖三</span>
+                    <span :class="quote?.ask3Color">{{ handleNumberValue(quote?.ask3) }}</span>
+                    <span>{{ handleNumberValue(quote?.askvolume3) }}</span>
+                </dd>
+                <dd>
+                    <span>卖四</span>
+                    <span :class="quote?.ask4Color">{{ handleNumberValue(quote?.ask4) }}</span>
+                    <span>{{ handleNumberValue(quote?.askvolume4) }}</span>
+                </dd>
+                <dd>
+                    <span>卖五</span>
+                    <span :class="quote?.ask5Color">{{ handleNumberValue(quote?.ask5) }}</span>
+                    <span>{{ handleNumberValue(quote?.askvolume5) }}</span>
+                </dd>
+            </dl>
+        </div>
+        <div class="g-detail__desc">
+            <template v-for="(url, index) in detailImages" :key="index">
+                <img :src="url" alt="" />
+            </template>
+        </div>
+        <template #footer>
+            <div class="g-form__footer">
+                <Button block type="danger" square @click="navigateTo">买入</Button>
+                <Button block type="primary" square @click="openComponent('listing')" v-if="dataList.length">转让</Button>
+            </div>
+            <component ref="componentRef" :is="componentMap.get(componentId)" v-bind="{ selectedRow: dataList[0] }"
+                @closed="closeComponent" v-if="componentId" />
+        </template>
+    </app-view>
+</template>
+
+<script lang="ts" setup>
+import { computed, defineAsyncComponent } from 'vue'
+import { Button, Icon } from 'vant'
+import { getFileUrl, handleNumberValue } from '@/filters'
+import { useRequest } from '@/hooks/request'
+import { queryPresaleDefault, queryMineTradePositionExs } from '@/services/api/transfer'
+import { useComponent } from '@/hooks/component'
+import { useNavigation } from '@/hooks/navigation'
+import { useFuturesStore } from '@/stores'
+
+const Price = defineAsyncComponent(() => import('@mobile/components/modules/quote/price/index.vue'))
+const Chart = defineAsyncComponent(() => import('@mobile/components/modules/quote/chart/index.vue'))
+
+const componentMap = new Map<string, unknown>([
+    ['listing', defineAsyncComponent(() => import('@mobile/views/order/position/components/transfer/listing/Index.vue'))], // 挂牌
+])
+
+const { router, getQueryStringToNumber } = useNavigation()
+const { getQuoteInfo } = useFuturesStore()
+const goodsid = getQueryStringToNumber('goodsid')
+const quote = getQuoteInfo(goodsid)
+const goodsCode = computed(() => quote.value?.goodscode ?? '')
+
+const { componentRef, componentId, openComponent, closeComponent } = useComponent(() => {
+    getPresaleDefault()
+    getMineTradePositionExs()
+})
+
+// 获取转让详情
+const { data: detail, run: getPresaleDefault } = useRequest(queryPresaleDefault, {
+    params: {
+        goodsid,
+    }
+})
+
+// 获取转让持仓
+const { dataList, run: getMineTradePositionExs } = useRequest(queryMineTradePositionExs, {
+    params: {
+        goodsid,
+    }
+})
+
+// 商品图片列表
+const detailImages = computed(() => {
+    const pictureurls = detail.value?.pictureurls ?? ''
+    return pictureurls.split(',').map((path) => getFileUrl(path))
+})
+
+const navigateTo = () => {
+    router.push({
+        name: 'transfer-delisting',
+        query: {
+            goodsid,
+        }
+    })
+}
+</script>
+
+<style lang="less">
+@import './index.less';
+</style>

+ 1 - 1
src/packages/mobile/views/transfer/list/Index.vue

@@ -48,7 +48,7 @@ const columns: Model.TableColumn[] = [
 
 const rowClick = ({ goodsid }: Model.Futures) => {
     router.push({
-        name: 'transfer-detail',
+        name: 'transfer-detail2',
         query: {
             goodsid
         }

+ 2 - 2
src/stores/storage.ts

@@ -20,5 +20,5 @@ function createSessionData() {
     }
 }
 
-export const localData = new WebStorage(localStorage, createLocalData(), 'hnsh@')
-export const sessionData = new WebStorage(sessionStorage, createSessionData(), 'hnsh@')
+export const localData = new WebStorage(localStorage, createLocalData(), 'muchinfo@')
+export const sessionData = new WebStorage(sessionStorage, createSessionData(), 'muchinfo@')

Some files were not shown because too many files changed in this diff