li.shaoyi 3 년 전
부모
커밋
85cf5e246f

+ 5 - 0
src/packages/mobile/components/layouts/view/index.less

@@ -7,5 +7,10 @@
     &__body {
         flex      : 1;
         overflow-y: auto;
+
+        &.flex {
+            display       : flex;
+            flex-direction: column;
+        }
     }
 }

+ 5 - 1
src/packages/mobile/components/layouts/view/index.vue

@@ -1,7 +1,7 @@
 <template>
     <div class="app-view">
         <slot name="header"></slot>
-        <app-scroll-view class="app-view__body">
+        <app-scroll-view :class="['app-view__body', flex && 'flex']">
             <slot></slot>
         </app-scroll-view>
         <slot name="footer"></slot>
@@ -22,6 +22,10 @@ const props = defineProps({
         type: Boolean,
         default: true
     },
+    flex: {
+        type: Boolean,
+        default: false
+    }
 })
 
 const emit = defineEmits(['update:animationend'])

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

@@ -1,5 +1,5 @@
 <template>
-    <app-view class="bank-sign">
+    <app-view class="bank-sign g-form">
         <template #header>
             <app-navbar title="签约账户管理" />
         </template>
@@ -11,13 +11,17 @@
                 <Cell title="支行名称" :value="bankInfo.branchbankname" />
                 <Cell title="状态" :value="getSignStatusName(bankInfo.signstatus)" />
             </CellGroup>
-            <Button type="primary" round @click="formSubmit">解约</Button>
-            <Button type="primary" round @click="routerTo('add-banksign')">修改</Button>
         </div>
         <div class="bank-sign__empty" v-else>
             <Empty description="您还未添加签约账户" />
             <Button type="primary" @click="$router.push({ name: 'add-banksign' })" round>添加签约账户</Button>
         </div>
+        <template #footer>
+            <div class="g-form__footer">
+                <Button type="warning" round block @click="formSubmit">解约</Button>
+                <Button type="primary" round block @click="routerTo('add-banksign')">修改</Button>
+            </div>
+        </template>
     </app-view>
 </template>
 
@@ -28,18 +32,22 @@ import { getSignStatusName } from '@/constants/bank'
 import { useDoCancelBankSign } from '@/business/bank'
 import { useNavigation } from '@/hooks/navigation'
 
-const { cancelSubmit, bankInfo} = useDoCancelBankSign()
+const { cancelSubmit, bankInfo } = useDoCancelBankSign()
 const { router, routerTo } = useNavigation()
 
 const formSubmit = () => {
-    fullloading((hideLoading) => {
-        cancelSubmit().then(() => {
-            hideLoading()
-            dialog('签约提交成功,请耐心等待审核。').then(() => {
-                router.back()
+    dialog('确认解约?', {
+        showCancelButton: true
+    }).then(() => {
+        fullloading((hideLoading) => {
+            cancelSubmit().then(() => {
+                hideLoading()
+                dialog('签约提交成功,请耐心等待审核。').then(() => {
+                    router.back()
+                })
+            }).catch((err) => {
+                Toast.fail(err)
             })
-        }).catch((err) => {
-            Toast.fail(err)
         })
     })
 }

+ 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
   }
 }

+ 9 - 29
src/packages/mobile/views/news/list/index.less

@@ -1,37 +1,17 @@
 @import '@mobile/assets/themes/base/mixin.less';
 
-.news-list-main {
+.news-list {
     &__container {
-        flex      : 1;
-        overflow-y: auto;
-    }
-
-    &__news {
-        .titlebar {
-            &-title {
-                font-size  : .36rem;
-                font-weight: bold;
-            }
-
-            &-more {
-                font-size: .28rem;
-                color    : #00577C;
-            }
-        }
-
-        .article {
-            &-item {
-                &__title {
-                    span {
-                        .mixin-text-overflow()
-                    }
-
+        .article-item {
+            &__title {
+                span {
+                    .mixin-text-overflow()
                 }
+            }
 
-                &__time {
-                    flex       : initial;
-                    margin-left: .48rem;
-                }
+            &__time {
+                flex       : initial;
+                margin-left: .48rem;
             }
         }
     }

+ 44 - 44
src/packages/mobile/views/news/list/index.vue

@@ -1,52 +1,52 @@
 <template>
-    <app-view class="news-list-main">
-      <template #header>
-        <app-navbar title="市场资讯" />
+  <app-view class="news-list" flex>
+    <template #header>
+      <app-navbar title="市场资讯" />
+    </template>
+    <Tabs v-model:active="active" @click-tab="onClickTab">
+      <Tab title="宏观新闻">
+        <Empty v-if="dataList.length === 0" />
+      </Tab>
+      <Tab title="行业动态">
+        <Empty v-if="dataList.length === 0" />
+      </Tab>
+      <Tab title="厂家信息">
+        <Empty v-if="dataList.length === 0" />
+      </Tab>
+    </Tabs>
+    <app-pull-refresh class="news-list__container" v-model:pageIndex="pageIndex" :page-count="pageCount"
+      :updateList="dataList" @refresh="onRefresh">
+      <template #default="{ item }">
+        <Cell class="article-item" title-class="article-item__title" value-class="article-item__time"
+          :title="item.title" :value="formatDate(item.creaedate, 'MM/DD')"
+          :to="{ name: 'news-details', params: { details: JSON.stringify(item) } }" />
       </template>
-      <Tabs class="mine-generalize__tabs" v-model:active="active" @click-tab="onClickTab" sticky>
-            <Tab title="宏观新闻">
-              <Empty v-if="dataList.length===0" />
-            </Tab>
-            <Tab title="行业动态">
-              <Empty v-if="dataList.length===0" />
-            </Tab>
-            <Tab title="厂家信息">
-              <Empty v-if="dataList.length===0" />
-            </Tab>
-        </Tabs>
-      <app-pull-refresh class="news-list__container" v-model:pageIndex="pageIndex" :page-count="pageCount"
-            :updateList="dataList" @refresh="onRefresh">
-            <template #default="{ item }">
-              <Cell class="article-item" title-class="article-item__title" value-class="article-item__time"
-                :title="item.title" :value="formatDate(item.creaedate, 'MM/DD')"
-                :to="{ name: 'news-details', params: { details: JSON.stringify(item) } }" />
-            </template>
-      </app-pull-refresh>
-    </app-view>
-  </template>
+    </app-pull-refresh>
+  </app-view>
+</template>
   
-  <script lang="ts" setup>
+<script lang="ts" setup>
 
-  import {  ref } from 'vue'
-  import { Cell, Tab, Tabs, Empty } from 'vant'
-  import { formatDate } from '@/filters'
-  import { useSiteColumnDetail } from '@/business/news'
-  import AppPullRefresh from '@mobile/components/base/pull-refresh/index.vue'
+import { ref } from 'vue'
+import { Cell, Tab, Tabs, Empty } from 'vant'
+import { formatDate } from '@/filters'
+import { useSiteColumnDetail } from '@/business/news'
+import AppPullRefresh from '@mobile/components/base/pull-refresh/index.vue'
 
-  /// tab激活项
-  const active = ref(0);
+/// tab激活项
+const active = ref(0);
 
-  const { dataList, pageIndex, pageCount, getSiteColumnDetail } = useSiteColumnDetail()
-  /// Tab触发
-  const onClickTab = (e => {
-    active.value = e.name
-  })
+const { dataList, pageIndex, pageCount, getSiteColumnDetail } = useSiteColumnDetail()
+/// Tab触发
+const onClickTab = (e) => {
+  active.value = e.name
+}
 
-  const onRefresh = (callback: () => void) => {
-    getSiteColumnDetail(active.value).finally(() => callback())
-  }
-  </script>
+const onRefresh = (callback: () => void) => {
+  getSiteColumnDetail(active.value).finally(() => callback())
+}
+</script>
   
-  <style lang="less">
-  @import './index.less';
-  </style>
+<style lang="less">
+@import './index.less';
+</style>