Explorar o código

fix: 修复bug

liangan hai 3 semanas
pai
achega
826af19a5d

+ 3 - 3
manifest.config.ts

@@ -24,8 +24,8 @@ export default defineManifestConfig({
   'name': VITE_APP_TITLE,
   'appid': VITE_UNI_APPID,
   'description': '',
-  'versionName': '1.1.3',
-  'versionCode': '113',
+  'versionName': '1.1.5',
+  'versionCode': '115',
   'transformPx': false,
   'locale': VITE_FALLBACK_LOCALE === 'bn' ? 'bn' : 'en', // 此app需默认英文
   'fallbackLocale': 'en',
@@ -47,7 +47,7 @@ export default defineManifestConfig({
     },
     splashscreen: {
       alwaysShowBeforeRender: true,
-      waiting: true,
+      waiting: false,
       autoclose: true,
       delay: 0,
     },

+ 49 - 47
src/App.vue

@@ -3,6 +3,7 @@ import { onHide, onLaunch, onShow } from '@dcloudio/uni-app'
 import { usePageAuth } from '@/hooks/usePageAuth'
 import { t } from '@/locale'
 import { useUserStore } from '@/store'
+import checkUpdate from '@/uni_modules/uni-upgrade-center-app/utils/check-update'
 import 'abortcontroller-polyfill/dist/abortcontroller-polyfill-only'
 
 const mtpushModule = uni.requireNativePlugin('EL-MTPush')
@@ -16,6 +17,7 @@ onLaunch(() => {
   if (isLoggedIn.value) {
     userStore.getUserInfo()
   }
+
   if (uni.getSystemInfoSync().platform === 'ios') {
     mtpushModule.requestNotificationAuthorization((result) => {
       const status = result.status
@@ -39,55 +41,55 @@ onLaunch(() => {
     uni.$emit('connectStatusChange', connectEnable)
   })
 
-  mtpushModule.addNotificationListener((result) => {
-    const notificationEventType = result.notificationEventType
-    const messageID = result.messageID
-    const title = result.title
-    const content = result.content
-    const extras = result.extras
-
-    uni.showToast({
-      icon: 'none',
-      title: JSON.stringify(result),
-      duration: 3000,
-    })
-  })
-
-  mtpushModule.addCustomMessageListener((result) => {
-    const type = result.type
-    const messageType = result.messageType
-    const content = result.content
-    uni.showToast({
-      icon: 'none',
-      title: JSON.stringify(result),
-      duration: 3000,
-    })
-  })
-
-  mtpushModule.addTagAliasListener((result) => {
-    uni.showToast({
-      icon: 'none',
-      title: JSON.stringify(result),
-      duration: 3000,
-    })
-  })
-
-  if (uni.getSystemInfoSync().platform === 'ios') {
-    mtpushModule.addLocalNotificationListener((result) => {
-      const messageID = result.messageID
-      const title = result.title
-      const content = result.content
-      const extras = result.extras
-      uni.showToast({
-        icon: 'none',
-        title: JSON.stringify(result),
-        duration: 3000,
-      })
-    })
-  }
-  // app更新
+  // mtpushModule.addNotificationListener((result) => {
+  //   const notificationEventType = result.notificationEventType
+  //   const messageID = result.messageID
+  //   const title = result.title
+  //   const content = result.content
+  //   const extras = result.extras
+
+  //   uni.showToast({
+  //     icon: 'none',
+  //     title: JSON.stringify(result),
+  //     duration: 3000,
+  //   })
+  // })
+
+  // mtpushModule.addCustomMessageListener((result) => {
+  //   const type = result.type
+  //   const messageType = result.messageType
+  //   const content = result.content
+  //   uni.showToast({
+  //     icon: 'none',
+  //     title: JSON.stringify(result),
+  //     duration: 3000,
+  //   })
+  // })
+
+  // mtpushModule.addTagAliasListener((result) => {
+  //   uni.showToast({
+  //     icon: 'none',
+  //     title: JSON.stringify(result),
+  //     duration: 3000,
+  //   })
+  // })
+
+  // if (uni.getSystemInfoSync().platform === 'ios') {
+  //   mtpushModule.addLocalNotificationListener((result) => {
+  //     const messageID = result.messageID
+  //     const title = result.title
+  //     const content = result.content
+  //     const extras = result.extras
+  //     uni.showToast({
+  //       icon: 'none',
+  //       title: JSON.stringify(result),
+  //       duration: 3000,
+  //     })
+  //   })
+  // }
 })
 onShow(() => {
+  checkUpdate()
   console.log('App Show')
 })
 onHide(() => {

+ 0 - 1
src/locale/bn.json

@@ -21,7 +21,6 @@
   "addressBook.operate.error.emptyPhone": "ফোন নম্বর লিখুন",
   "addressBook.operate.error.emptyDistrict": "প্রদেশ/জেলা নির্বাচন করুন",
   "addressBook.operate.error.emptyStreet": "বিস্তারিত ঠিকানা লিখুন",
-  "addressBook.operate.error.emptyPostcode": "পোস্টকোড লিখুন",
   "addressBook.operate.success.update": "ঠিকানা সফলভাবে আপডেট করা হয়েছে",
   "addressBook.operate.success.save": "ঠিকানা সফলভাবে সংরক্ষিত হয়েছে",
   "addressBook.operate.error.saveFailed": "সংরক্ষণ ব্যর্থ, আবার চেষ্টা করুন",

+ 0 - 1
src/locale/en.json

@@ -21,7 +21,6 @@
   "addressBook.operate.error.emptyPhone": "Please enter phone number",
   "addressBook.operate.error.emptyDistrict": "Please select province/district",
   "addressBook.operate.error.emptyStreet": "Please enter detailed address",
-  "addressBook.operate.error.emptyPostcode": "Please enter postcode",
   "addressBook.operate.success.update": "Address updated successfully",
   "addressBook.operate.success.save": "Address saved successfully",
   "addressBook.operate.error.saveFailed": "Save failed, please try again",

+ 0 - 1
src/locale/zh-Hans.json

@@ -21,7 +21,6 @@
   "addressBook.operate.error.emptyPhone": "请输入手机号码",
   "addressBook.operate.error.emptyDistrict": "请选择省/区",
   "addressBook.operate.error.emptyStreet": "请输入详细地址",
-  "addressBook.operate.error.emptyPostcode": "请输入邮编",
   "addressBook.operate.success.update": "地址更新成功",
   "addressBook.operate.success.save": "地址保存成功",
   "addressBook.operate.error.saveFailed": "保存失败,请重试",

+ 3 - 3
src/manifest.json

@@ -2,8 +2,8 @@
   "name": "BandhuBuy",
   "appid": "__UNI__D38110B",
   "description": "",
-  "versionName": "1.1.3",
-  "versionCode": "113",
+  "versionName": "1.1.5",
+  "versionCode": "115",
   "transformPx": false,
   "app-plus": {
     "usingComponents": true,
@@ -11,7 +11,7 @@
     "compilerVersion": 3,
     "splashscreen": {
       "alwaysShowBeforeRender": true,
-      "waiting": true,
+      "waiting": false,
       "autoclose": true,
       "delay": 0
     },

+ 8 - 15
src/pages/index/index.vue

@@ -16,7 +16,6 @@ import { onPageScroll, onReachBottom } from '@dcloudio/uni-app'
 import useZPaging from 'z-paging/components/z-paging/js/hooks/useZPaging.js'
 import { bannerList, noticeUnread } from '@/api/common'
 import { getList } from '@/api/product'
-import checkUpdate from '@/uni_modules/uni-upgrade-center-app/utils/check-update'
 import { parseQs } from '@/utils'
 import { toPage } from '@/utils/page'
 
@@ -91,37 +90,37 @@ async function getNewList() {
 }
 
 //  商品列表
-const priceTab = ref<number>(300)
+const priceTab = ref<string>('300')
 
 // 300Spot    500Spot    1000Spot    2000Spot
 const priceTabList = ref([
   {
     title: 'home.priceTab.300spot',
-    value: 300,
+    value: '300',
     minPrice: 0,
     maxPrice: 300,
   },
   {
     title: 'home.priceTab.500spot',
-    value: 500,
+    value: '500',
     minPrice: 300,
     maxPrice: 500,
   },
   {
     title: 'home.priceTab.1000spot',
-    value: 1000,
+    value: '1000',
     minPrice: 500,
     maxPrice: 1000,
   },
   {
     title: 'home.priceTab.2000spot',
-    value: 2000,
+    value: '2000',
     minPrice: 1000,
     maxPrice: 2000,
   },
   {
     title: 'home.priceTab.3000spot',
-    value: 3000,
+    value: '3000',
     minPrice: 2000,
     maxPrice: 3000,
   },
@@ -151,10 +150,6 @@ async function getBannerList() {
   swiperList.value = res.data.list
 }
 
-// 价格tab切换事件
-function onPriceTabChange() {
-  paging.value.reload()
-}
 const unread = ref(0)
 async function getUnread() {
   try {
@@ -165,9 +160,7 @@ async function getUnread() {
   }
   catch {}
 }
-onLoad(() => {
-  checkUpdate()
-})
+
 onShow(() => {
   getUnread()
   getNewList()
@@ -241,7 +234,7 @@ onShow(() => {
         </scroll-view>
       </view>
       <view class="productList">
-        <wd-tabs v-model="priceTab" slidable="always" :line-width="0" :line-height="0" @change="onPriceTabChange">
+        <wd-tabs v-model="priceTab" slidable="always" :line-width="0" :line-height="0" @click="() => queryList(1, 20)">
           <template v-for="item in priceTabList" :key="item">
             <wd-tab :title="$t(item.title)" :name="item.value" />
           </template>

+ 0 - 5
src/pages/mine/addressBookOperate.vue

@@ -165,11 +165,6 @@ async function save() {
       return
     }
 
-    if (!model.value.postCode?.trim()) {
-      toast.info(t('addressBook.operate.error.emptyPostcode'))
-      return
-    }
-
     // 显示加载提示
     await uni.showLoading({
       title: t('addressBook.operate.saving'),

BIN=BIN
src/static/app/start/start-1080.png