li.shaoyi пре 3 година
родитељ
комит
3419db7518

+ 19 - 15
src/packages/mobile/components/base/pull-refresh/index.vue

@@ -17,7 +17,7 @@
 </template>
 
 <script lang="ts" setup>
-import { shallowRef, computed } from 'vue'
+import { shallowRef, computed, nextTick } from 'vue'
 import { List, PullRefresh } from 'vant'
 
 const props = defineProps({
@@ -59,34 +59,38 @@ const showError = computed({
     set: (val) => emit('update:error', val)
 })
 
+const currentPage = computed({
+    get: () => props.pageIndex,
+    set: (val) => emit('update:pageIndex', val)
+})
+
 // 上拉加载
 const onLoad = () => {
-    let pageIndex = props.pageIndex
-    if (refreshing.value) {
-        pageIndex = 1
-        emit('update:pageIndex', pageIndex)
-    }
-
     const callback = () => {
-        if (refreshing.value) {
+        if (refreshing.value || currentPage.value === 1) {
             dataList.value = []
             refreshing.value = false
         }
         if (!showError.value) {
-            pageIndex++
+            currentPage.value++
             dataList.value.push(...props.updateList)
-            emit('update:pageIndex', pageIndex)
             emit('updated', dataList.value)
         }
         loading.value = false
     }
 
-    if (pageIndex <= props.pageCount) {
-        emit('refresh', callback)
-    } else {
-        refreshing.value = false
-        finished.value = true
+    if (refreshing.value) {
+        currentPage.value = 1
     }
+
+    nextTick(() => {
+        if (currentPage.value <= props.pageCount) {
+            emit('refresh', callback)
+        } else {
+            refreshing.value = false
+            finished.value = true
+        }
+    })
 }
 
 // 下拉刷新

+ 1 - 1
src/packages/mobile/views/bank/statement/index.vue

@@ -45,9 +45,9 @@ import AppPullRefresh from '@mobile/components/base/pull-refresh/index.vue'
 import { useNavigation } from '@/hooks/navigation'
 import { Button } from 'vant'
 
+const { routerTo } = useNavigation()
 const { dataList, pageIndex, pageCount, getAmountStatementList } = useAmountStatementList()
 const showHeader = shallowRef(false)
-const { routerTo } = useNavigation()
 
 const onRefresh = (callback: () => void) => {
     getAmountStatementList().finally(() => callback())

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

@@ -2,7 +2,8 @@
     <app-view class="g-form">
         <Form ref="formRef" class="g-form__container" @submit="formSubmit">
             <CellGroup inset>
-                <Field v-model="formData.Amount" label="充值金额" placeholder="请填写充值金额" :rules="formRules.Amount" />
+                <Field type="digit" v-model="formData.Amount" label="充值金额" placeholder="请填写充值金额"
+                    :rules="formRules.Amount" />
                 <Field label="凭证">
                     <template #input>
                         <Uploader v-model="fileList" name="fileList" :max-size="5 * 1024 * 1024" @oversize="onOversize"

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

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

+ 9 - 0
src/packages/mobile/views/credit/signin/index.vue

@@ -59,18 +59,27 @@
                         <app-iconfont class="icon-title" icon="icon-haoyouxiadan">好友下单每次</app-iconfont>
                         <app-iconfont class="icon-score" icon="icon-jifenyue">+200</app-iconfont>
                     </div>
+                    <div class="list-item__button">
+                        <Button type="primary" round>去完成</Button>
+                    </div>
                 </dd>
                 <dd class="list-item">
                     <div class="list-item__title">
                         <app-iconfont class="icon-title" icon="icon-caigouxiadan">采购下单每次</app-iconfont>
                         <app-iconfont class="icon-score" icon="icon-jifenyue">+100</app-iconfont>
                     </div>
+                    <div class="list-item__button">
+                        <Button type="primary" round>去完成</Button>
+                    </div>
                 </dd>
                 <dd class="list-item">
                     <div class="list-item__title">
                         <app-iconfont class="icon-title" icon="icon-gongqiuxiadan">供求下单每次</app-iconfont>
                         <app-iconfont class="icon-score" icon="icon-jifenyue">+100</app-iconfont>
                     </div>
+                    <div class="list-item__button">
+                        <Button type="primary" round>去完成</Button>
+                    </div>
                 </dd>
             </dl>
         </div>

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

@@ -50,7 +50,7 @@
     </div>
     <div class="home-mine__iconbar">
       <ul>
-        <li @click="routerTo('mine-generalize')" style="align-items:flex-start">
+        <li @click="routerTo('mine-generalize')">
           <app-iconfont icon="icon-wodetuiguang" label-direction="bottom">我的推广</app-iconfont>
         </li>
         <li>

+ 0 - 8
src/packages/mobile/views/order/list/index.vue

@@ -1,8 +0,0 @@
-<template>
-    <app-view>
-
-    </app-view>
-</template>
-
-<script lang="ts" setup>
-</script>