liangan пре 1 дан
родитељ
комит
fb61d77ec5
7 измењених фајлова са 96 додато и 33 уклоњено
  1. 0 21
      LICENSE
  2. 2 2
      manifest.config.ts
  3. 2 3
      pnpm-lock.yaml
  4. 55 0
      src/main.ts
  5. 2 2
      src/manifest.json
  6. 35 5
      src/pages/mine/mine.vue
  7. 0 0
      src/uni_modules/.gitkeep

+ 0 - 21
LICENSE

@@ -1,21 +0,0 @@
-MIT License
-
-Copyright (c) 2025 菲鸽
-
-Permission is hereby granted, free of charge, to any person obtaining a copy
-of this software and associated documentation files (the "Software"), to deal
-in the Software without restriction, including without limitation the rights
-to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
-copies of the Software, and to permit persons to whom the Software is
-furnished to do so, subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
-FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
-AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
-LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
-OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
-SOFTWARE.

+ 2 - 2
manifest.config.ts

@@ -24,8 +24,8 @@ export default defineManifestConfig({
   'name': VITE_APP_TITLE,
   'appid': VITE_UNI_APPID,
   'description': '',
-  'versionName': '1.4.8',
-  'versionCode': '148',
+  'versionName': '1.0.0',
+  'versionCode': '100',
   'transformPx': false,
   'locale': VITE_FALLBACK_LOCALE === 'en' ? 'en' : 'bn', // 此app需默认孟加拉语
   'fallbackLocale': 'bn',

+ 2 - 3
pnpm-lock.yaml

@@ -246,6 +246,8 @@ importers:
         specifier: ^2.2.10
         version: 2.2.10(typescript@5.7.2)
 
+  nativeplugins/EL-MTPush: {}
+
   src/uni_modules/uni-config-center: {}
 
   src/uni_modules/uni-config-center/uniCloud/cloudfunctions/common/uni-config-center: {}
@@ -1309,7 +1311,6 @@ packages:
   '@esbuild/darwin-arm64@0.20.2':
     resolution: {integrity: sha512-4J6IRT+10J3aJH3l1yzEg9y3wkTDgDk7TSDFX+wKFiWjqWp/iCfLIYzGyasx9l0SAFPT1HwSCR+0w/h1ES/MjA==}
     engines: {node: '>=12'}
-    cpu: [arm64]
     os: [darwin]
 
   '@esbuild/darwin-arm64@0.25.5':
@@ -1321,7 +1322,6 @@ packages:
   '@esbuild/darwin-x64@0.20.2':
     resolution: {integrity: sha512-tBcXp9KNphnNH0dfhv8KYkZhjc+H3XBkF5DKtswJblV7KlT9EI2+jeA8DgBjp908WEuYll6pF+UStUCfEpdysA==}
     engines: {node: '>=12'}
-    cpu: [x64]
     os: [darwin]
 
   '@esbuild/darwin-x64@0.25.5':
@@ -2101,7 +2101,6 @@ packages:
 
   '@rollup/rollup-darwin-x64@4.41.1':
     resolution: {integrity: sha512-egpJACny8QOdHNNMZKf8xY0Is6gIMz+tuqXlusxquWu3F833DcMwmGM7WlvCO9sB3OsPjdC4U0wHw5FabzCGZg==}
-    cpu: [x64]
     os: [darwin]
 
   '@rollup/rollup-freebsd-arm64@4.41.1':

+ 55 - 0
src/main.ts

@@ -11,6 +11,61 @@ uni.$zp = {
   config: {
     // 配置分页默认pageSize为20
     'default-page-size': 20,
+    'refresher-default-text': {
+      'en': 'Pull down to refresh',
+      'zh-Hans': '继续下拉刷新',
+      'bn': 'রিফ্রেশ করতে নিচে টানুন',
+    },
+    'refresher-pulling-text': {
+      'en': 'Release to refresh',
+      'zh-Hans': '松开立即刷新',
+      'bn': 'রিফ্রেশ করতে ছেড়ে দিন',
+    },
+    'refresher-refreshing-text': {
+      'en': 'Refreshing...',
+      'zh-Hans': '正在刷新...',
+      'bn': 'রিফ্রেশ হচ্ছে...',
+    },
+    'refresher-complete-text': {
+      'en': 'Refresh succeeded',
+      'zh-Hans': '刷新成功',
+      'bn': 'রিফ্রেশ সফল হয়েছে',
+    },
+    'loading-more-default-text': {
+      'en': 'Click to load more',
+      'zh-Hans': '点击加载更多',
+      'bn': 'আরও লোড করতে ক্লিক করুন',
+    },
+    'loading-more-loading-text': {
+      'en': 'Loading...',
+      'zh-Hans': '正在加载...',
+      'bn': 'লোড হচ্ছে...',
+    },
+    'loading-more-no-more-text': {
+      'en': 'No more data',
+      'zh-Hans': '没有更多了',
+      'bn': 'আর কোনো ডেটা নেই',
+    },
+    'loading-more-fail-text': {
+      'en': 'Load failed,click to reload',
+      'zh-Hans': '加载失败,点击重新加载',
+      'bn': 'লোড ব্যর্থ, আবার লোড করতে ক্লিক করুন',
+    },
+    'empty-view-text': {
+      'en': 'No data',
+      'zh-Hans': '没有数据哦~',
+      'bn': 'কোনো ডেটা নেই',
+    },
+    'empty-view-reload-text': {
+      'en': 'Reload',
+      'zh-Hans': '重新加载',
+      'bn': 'আবার লোড করুন',
+    },
+    'empty-view-error-text': {
+      'en': 'Sorry,load failed',
+      'zh-Hans': '很抱歉,加载失败',
+      'bn': 'দুঃখিত, লোড ব্যর্থ হয়েছে',
+    },
   },
 }
 

+ 2 - 2
src/manifest.json

@@ -2,8 +2,8 @@
   "name": "BandhuBuy",
   "appid": "__UNI__D38110B",
   "description": "",
-  "versionName": "1.4.8",
-  "versionCode": "148",
+  "versionName": "1.0.0",
+  "versionCode": "100",
   "transformPx": false,
   "app-plus": {
     "usingComponents": true,

+ 35 - 5
src/pages/mine/mine.vue

@@ -21,8 +21,7 @@ import i18n from '@/locale/index'
 import { useUserStore } from '@/store/user'
 import { formatNumber } from '@/utils'
 import { toPage } from '@/utils/page'
-import { handleWhatsApp } from '@/utils/social'
-import { toast } from '@/utils/toast'
+import { checkAppInstalled, getPlusRuntime, handleWhatsApp } from '@/utils/social'
 
 defineOptions({
   name: 'Mine', // 我的
@@ -52,12 +51,38 @@ function copyReferrerCode() {
     return
   uni.setClipboardData({
     data: code,
-    success: () => {
-      toast.success(t('mine.pages.share.copySuccess'))
-    },
+    success: () => {},
   })
 }
 
+function openWhatsAppStore() {
+  const runtime = getPlusRuntime()
+  if (!runtime)
+    return
+
+  const platform = uni.getSystemInfoSync().platform
+  // Android:优先使用 market:// 拉起 Google Play,其次回退 https
+  if (platform === 'android') {
+    runtime.openURL(
+      'market://details?id=com.whatsapp',
+      () => {
+        runtime.openURL('https://play.google.com/store/apps/details?id=com.whatsapp&pli=1')
+      },
+    )
+    return
+  }
+
+  // iOS:使用 itms-apps:// 拉起 App Store,其次回退 https
+  if (platform === 'ios') {
+    runtime.openURL(
+      'itms-apps://itunes.apple.com/app/id310633997',
+      () => {
+        runtime.openURL('https://apps.apple.com/app/id310633997')
+      },
+    )
+  }
+}
+
 const groupList = computed(() => {
   // 依赖 locale,确保切换语言后这里会重新计算
   const _locale = i18n.global.locale
@@ -111,6 +136,11 @@ async function menuClick(item: any) {
   }
   else {
     const res = await getConfig(item.config)
+    const runtime = getPlusRuntime()
+    if (runtime && !checkAppInstalled('whatsapp')) {
+      openWhatsAppStore()
+      return
+    }
     handleWhatsApp(item.config as 'live_chat' | 'activity_group', res)
   }
 }

+ 0 - 0
src/uni_modules/.gitkeep