liangan 1 месяц назад
Родитель
Сommit
ecf92bf9d0

+ 0 - 2
pages.config.ts

@@ -94,7 +94,6 @@ export default defineUniPages({
       path: 'pages/income/income',
       path: 'pages/income/income',
       type: 'page',
       type: 'page',
       layout: 'tabbar',
       layout: 'tabbar',
-      needLogin: true,
       style: {
       style: {
         navigationBarTitleText: '%income.title%',
         navigationBarTitleText: '%income.title%',
         navigationBarBackgroundColor: '#fff',
         navigationBarBackgroundColor: '#fff',
@@ -130,7 +129,6 @@ export default defineUniPages({
       path: 'pages/mine/mine',
       path: 'pages/mine/mine',
       type: 'page',
       type: 'page',
       layout: 'tabbar',
       layout: 'tabbar',
-      needLogin: true,
       style: {
       style: {
         navigationStyle: 'custom',
         navigationStyle: 'custom',
       },
       },

+ 166 - 0
src/components/CustomerServiceFab.vue

@@ -0,0 +1,166 @@
+<script lang="ts" setup>
+import { onShow } from '@dcloudio/uni-app'
+import { getConfigByCode } from '@/api/common'
+import { openH5WhatsApp } from '@/utils/social'
+import { toast } from '@/utils/toast'
+
+const props = defineProps<{
+  bottomOffset?: number
+}>()
+
+const STORAGE_KEY = 'customer_service_fab_position_v1'
+
+const x = ref<number>(0)
+const y = ref<number>(0)
+
+function rpxToPx(rpx: number) {
+  const sys = uni.getSystemInfoSync()
+  const windowWidth = sys.windowWidth || 375
+  return (rpx * windowWidth) / 750
+}
+
+function getBottomLimitPx() {
+  const sys = uni.getSystemInfoSync() as any
+  const bottomOffsetPx = rpxToPx(props.bottomOffset ?? 0)
+  const safeBottomPx = Number(sys?.safeAreaInsets?.bottom) || 0
+  return bottomOffsetPx + safeBottomPx
+}
+
+function initDefaultPosition() {
+  const sys = uni.getSystemInfoSync()
+  const windowWidth = sys.windowWidth || 375
+  const windowHeight = sys.windowHeight || 667
+  const sizePx = rpxToPx(80)
+  const bottomOffsetPx = getBottomLimitPx()
+  x.value = Math.max(0, windowWidth - sizePx)
+  y.value = Math.max(0, windowHeight - sizePx - bottomOffsetPx)
+}
+
+function clampPosition() {
+  const sys = uni.getSystemInfoSync()
+  const windowWidth = sys.windowWidth || 375
+  const windowHeight = sys.windowHeight || 667
+  const sizePx = rpxToPx(80)
+  const bottomOffsetPx = getBottomLimitPx()
+  const maxX = Math.max(0, windowWidth - sizePx)
+  const maxY = Math.max(0, windowHeight - sizePx - bottomOffsetPx)
+  x.value = Math.min(Math.max(0, x.value), maxX)
+  y.value = Math.min(Math.max(0, y.value), maxY)
+}
+
+function restorePosition() {
+  try {
+    const raw = uni.getStorageSync(STORAGE_KEY)
+    if (!raw) {
+      initDefaultPosition()
+      return
+    }
+    const parsed = typeof raw === 'string' ? JSON.parse(raw) : raw
+    const nx = Number(parsed?.x)
+    const ny = Number(parsed?.y)
+    if (Number.isFinite(nx) && Number.isFinite(ny)) {
+      x.value = nx
+      y.value = ny
+      clampPosition()
+      return
+    }
+    initDefaultPosition()
+  }
+  catch {
+    initDefaultPosition()
+  }
+}
+
+function persistPosition() {
+  try {
+    uni.setStorageSync(STORAGE_KEY, JSON.stringify({ x: x.value, y: y.value }))
+  }
+  catch {
+  }
+}
+
+function persistPositionClamped() {
+  clampPosition()
+  persistPosition()
+}
+
+onShow(() => {
+  restorePosition()
+})
+
+function handleMoveChange(e: any) {
+  const detail = e?.detail
+  const nx = Number(detail?.x)
+  const ny = Number(detail?.y)
+  if (Number.isFinite(nx))
+    x.value = nx
+  if (Number.isFinite(ny))
+    y.value = ny
+  clampPosition()
+}
+
+async function openCustomerService() {
+  try {
+    const res = await getConfigByCode({ code: 'live_chat' })
+    const value = res?.data?.valueInfo
+    if (!value) {
+      toast.info('客服暂不可用')
+      return
+    }
+    openH5WhatsApp('live_chat', value)
+  }
+  catch {
+    toast.info('客服暂不可用')
+  }
+}
+</script>
+
+<template>
+  <movable-area class="customer-fab-area">
+    <movable-view
+      :x="x"
+      :y="y"
+      direction="all"
+      :inertia="false"
+      :animation="false"
+      :out-of-bounds="false"
+      class="customer-fab-movable"
+      @change="handleMoveChange"
+      @touchend="persistPositionClamped"
+      @touchcancel="persistPositionClamped"
+    >
+      <image
+        src="/static/icons/whatsapp.png"
+        class="customer-fab-trigger__icon"
+        mode="heightFix"
+        @click="openCustomerService"
+      />
+    </movable-view>
+  </movable-area>
+</template>
+
+<style lang="scss" scoped>
+.customer-fab-area {
+  position: fixed;
+  left: 0;
+  top: 0;
+  width: 100vw;
+  height: 100vh;
+  pointer-events: none;
+  z-index: 999;
+}
+
+.customer-fab-movable {
+  pointer-events: auto;
+  transition: none;
+  width: 80rpx;
+  height: 80rpx;
+}
+
+.customer-fab-trigger__icon {
+  box-shadow: 0 12rpx 30rpx rgba(0, 0, 0, 0.16);
+  height: 80rpx;
+  width: 80rpx;
+  border-radius: 50%;
+}
+</style>

+ 5 - 0
src/layouts/default.vue

@@ -1,6 +1,8 @@
 <script lang="ts" setup>
 <script lang="ts" setup>
 import type { ConfigProviderThemeVars } from 'wot-design-uni'
 import type { ConfigProviderThemeVars } from 'wot-design-uni'
 
 
+import CustomerServiceFab from '@/components/CustomerServiceFab.vue'
+
 const themeVars: ConfigProviderThemeVars = {
 const themeVars: ConfigProviderThemeVars = {
   // colorTheme: 'red',
   // colorTheme: 'red',
   // buttonPrimaryBgColor: '#07c160',
   // buttonPrimaryBgColor: '#07c160',
@@ -11,6 +13,9 @@ const themeVars: ConfigProviderThemeVars = {
 <template>
 <template>
   <wd-config-provider :theme-vars="themeVars">
   <wd-config-provider :theme-vars="themeVars">
     <slot />
     <slot />
+    <!-- #ifdef H5 -->
+    <CustomerServiceFab :bottom-offset="120" />
+    <!-- #endif -->
     <wd-toast />
     <wd-toast />
     <wd-message-box />
     <wd-message-box />
   </wd-config-provider>
   </wd-config-provider>

+ 5 - 0
src/layouts/tabbar.vue

@@ -1,5 +1,7 @@
 <script lang="ts" setup>
 <script lang="ts" setup>
 import type { ConfigProviderThemeVars } from 'wot-design-uni'
 import type { ConfigProviderThemeVars } from 'wot-design-uni'
+import CustomerServiceFab from '@/components/CustomerServiceFab.vue'
+
 import FgTabbar from './fg-tabbar/fg-tabbar.vue'
 import FgTabbar from './fg-tabbar/fg-tabbar.vue'
 
 
 const themeVars: ConfigProviderThemeVars = {
 const themeVars: ConfigProviderThemeVars = {
@@ -12,6 +14,9 @@ const themeVars: ConfigProviderThemeVars = {
 <template>
 <template>
   <wd-config-provider :theme-vars="themeVars">
   <wd-config-provider :theme-vars="themeVars">
     <slot />
     <slot />
+    <!-- #ifdef H5 -->
+    <CustomerServiceFab :bottom-offset="180" />
+    <!-- #endif -->
     <FgTabbar />
     <FgTabbar />
     <wd-toast />
     <wd-toast />
     <wd-message-box />
     <wd-message-box />

+ 12 - 2
src/pages.json

@@ -80,7 +80,6 @@
       "path": "pages/income/income",
       "path": "pages/income/income",
       "type": "page",
       "type": "page",
       "layout": "tabbar",
       "layout": "tabbar",
-      "needLogin": true,
       "style": {
       "style": {
         "navigationBarTitleText": "%income.title%",
         "navigationBarTitleText": "%income.title%",
         "navigationBarBackgroundColor": "#fff"
         "navigationBarBackgroundColor": "#fff"
@@ -98,6 +97,7 @@
       "path": "pages/mine/addressBook",
       "path": "pages/mine/addressBook",
       "type": "page",
       "type": "page",
       "layout": "default",
       "layout": "default",
+      "needLogin": true,
       "style": {
       "style": {
         "navigationBarTitleText": "%addressBook.title%",
         "navigationBarTitleText": "%addressBook.title%",
         "navigationBarBackgroundColor": "#fff"
         "navigationBarBackgroundColor": "#fff"
@@ -107,6 +107,7 @@
       "path": "pages/mine/addressBookOperate",
       "path": "pages/mine/addressBookOperate",
       "type": "page",
       "type": "page",
       "layout": "default",
       "layout": "default",
+      "needLogin": true,
       "style": {
       "style": {
         "navigationBarTitleText": "%addressBook.title%",
         "navigationBarTitleText": "%addressBook.title%",
         "navigationBarBackgroundColor": "#fff"
         "navigationBarBackgroundColor": "#fff"
@@ -116,7 +117,6 @@
       "path": "pages/mine/mine",
       "path": "pages/mine/mine",
       "type": "page",
       "type": "page",
       "layout": "tabbar",
       "layout": "tabbar",
-      "needLogin": true,
       "style": {
       "style": {
         "navigationStyle": "custom"
         "navigationStyle": "custom"
       }
       }
@@ -125,6 +125,7 @@
       "path": "pages/mine/myFavorite",
       "path": "pages/mine/myFavorite",
       "type": "page",
       "type": "page",
       "layout": "default",
       "layout": "default",
+      "needLogin": true,
       "style": {
       "style": {
         "navigationBarTitleText": "%mine.pages.myFavorite.title%",
         "navigationBarTitleText": "%mine.pages.myFavorite.title%",
         "navigationBarBackgroundColor": "#fff"
         "navigationBarBackgroundColor": "#fff"
@@ -134,6 +135,7 @@
       "path": "pages/mine/myProfile",
       "path": "pages/mine/myProfile",
       "type": "page",
       "type": "page",
       "layout": "default",
       "layout": "default",
+      "needLogin": true,
       "style": {
       "style": {
         "navigationBarTitleText": "%myProfile.title%",
         "navigationBarTitleText": "%myProfile.title%",
         "navigationBarBackgroundColor": "#fff"
         "navigationBarBackgroundColor": "#fff"
@@ -152,6 +154,7 @@
       "path": "pages/mine/share",
       "path": "pages/mine/share",
       "type": "page",
       "type": "page",
       "layout": "default",
       "layout": "default",
+      "needLogin": true,
       "style": {
       "style": {
         "navigationStyle": "custom",
         "navigationStyle": "custom",
         "navigationBarTitleText": "%mine.pages.share.title%"
         "navigationBarTitleText": "%mine.pages.share.title%"
@@ -171,6 +174,7 @@
       "path": "pages/myOrders/myOrders",
       "path": "pages/myOrders/myOrders",
       "type": "page",
       "type": "page",
       "layout": "default",
       "layout": "default",
+      "needLogin": true,
       "style": {
       "style": {
         "navigationBarTitleText": "%myOrders.title%",
         "navigationBarTitleText": "%myOrders.title%",
         "navigationBarBackgroundColor": "#fff"
         "navigationBarBackgroundColor": "#fff"
@@ -180,6 +184,7 @@
       "path": "pages/myOrders/orderDetail",
       "path": "pages/myOrders/orderDetail",
       "type": "page",
       "type": "page",
       "layout": "default",
       "layout": "default",
+      "needLogin": true,
       "style": {
       "style": {
         "navigationBarTitleText": "%orderDetail.title%",
         "navigationBarTitleText": "%orderDetail.title%",
         "navigationBarBackgroundColor": "#fff"
         "navigationBarBackgroundColor": "#fff"
@@ -259,6 +264,7 @@
       "path": "pages/wallet/frozenRecord",
       "path": "pages/wallet/frozenRecord",
       "type": "page",
       "type": "page",
       "layout": "default",
       "layout": "default",
+      "needLogin": true,
       "style": {
       "style": {
         "navigationBarTitleText": "%wallet.frozenRecord.title%",
         "navigationBarTitleText": "%wallet.frozenRecord.title%",
         "navigationBarBackgroundColor": "#fff"
         "navigationBarBackgroundColor": "#fff"
@@ -278,6 +284,7 @@
       "path": "pages/wallet/recharge",
       "path": "pages/wallet/recharge",
       "type": "page",
       "type": "page",
       "layout": "default",
       "layout": "default",
+      "needLogin": true,
       "style": {
       "style": {
         "navigationBarTitleText": "%wallet.recharge.title%",
         "navigationBarTitleText": "%wallet.recharge.title%",
         "navigationBarBackgroundColor": "#fff",
         "navigationBarBackgroundColor": "#fff",
@@ -298,6 +305,7 @@
       "path": "pages/wallet/rechargeRecord",
       "path": "pages/wallet/rechargeRecord",
       "type": "page",
       "type": "page",
       "layout": "default",
       "layout": "default",
+      "needLogin": true,
       "style": {
       "style": {
         "navigationBarTitleText": "%wallet.rechargeRecord.title%",
         "navigationBarTitleText": "%wallet.rechargeRecord.title%",
         "navigationBarBackgroundColor": "#fff"
         "navigationBarBackgroundColor": "#fff"
@@ -307,6 +315,7 @@
       "path": "pages/wallet/withdraw",
       "path": "pages/wallet/withdraw",
       "type": "page",
       "type": "page",
       "layout": "default",
       "layout": "default",
+      "needLogin": true,
       "style": {
       "style": {
         "navigationStyle": "custom",
         "navigationStyle": "custom",
         "navigationBarTitleText": "%wallet.withdraw.title%"
         "navigationBarTitleText": "%wallet.withdraw.title%"
@@ -316,6 +325,7 @@
       "path": "pages/wallet/withdrawRecord",
       "path": "pages/wallet/withdrawRecord",
       "type": "page",
       "type": "page",
       "layout": "default",
       "layout": "default",
+      "needLogin": true,
       "style": {
       "style": {
         "navigationBarTitleText": "%wallet.withdrawRecord.title%",
         "navigationBarTitleText": "%wallet.withdrawRecord.title%",
         "navigationBarBackgroundColor": "#fff"
         "navigationBarBackgroundColor": "#fff"

+ 17 - 2
src/pages/income/income.vue

@@ -1,7 +1,6 @@
 <route lang="json5">
 <route lang="json5">
   {
   {
     layout: 'tabbar',
     layout: 'tabbar',
-    needLogin: true,
     style: {
     style: {
       navigationBarTitleText: '%income.title%',
       navigationBarTitleText: '%income.title%',
       navigationBarBackgroundColor: '#fff',
       navigationBarBackgroundColor: '#fff',
@@ -16,6 +15,7 @@ import useZPaging from 'z-paging/components/z-paging/js/hooks/useZPaging.js'
 
 
 import { getEnum as _getEnum } from '@/api/common'
 import { getEnum as _getEnum } from '@/api/common'
 import { getAccountInfo as _getAccountInfo, envelopeList } from '@/api/wallet'
 import { getAccountInfo as _getAccountInfo, envelopeList } from '@/api/wallet'
+import { useUserStore } from '@/store/user'
 import { formatNumber } from '@/utils'
 import { formatNumber } from '@/utils'
 import { toPage } from '@/utils/page'
 import { toPage } from '@/utils/page'
 
 
@@ -30,6 +30,9 @@ useZPaging(paging)
 
 
 const dayType = ref(1)
 const dayType = ref(1)
 
 
+const userStore = useUserStore()
+const isLoggedIn = computed(() => !!userStore.token)
+
 // 搜索结果
 // 搜索结果
 const statusEnum = ref<any[]>([])
 const statusEnum = ref<any[]>([])
 const typeEnum = ref<any[]>([])
 const typeEnum = ref<any[]>([])
@@ -45,6 +48,8 @@ async function getEnum(id: number) {
   }
   }
 }
 }
 async function getAccountInfo() {
 async function getAccountInfo() {
+  if (!isLoggedIn.value)
+    return
   const res = await _getAccountInfo()
   const res = await _getAccountInfo()
   console.log(res)
   console.log(res)
   if (res.code === '200') {
   if (res.code === '200') {
@@ -52,6 +57,10 @@ async function getAccountInfo() {
   }
   }
 }
 }
 async function queryList(pageNo: number, pageSize: number) {
 async function queryList(pageNo: number, pageSize: number) {
+  if (!isLoggedIn.value) {
+    paging.value.complete([])
+    return
+  }
   const data = {
   const data = {
     page: pageNo,
     page: pageNo,
     size: pageSize,
     size: pageSize,
@@ -68,7 +77,13 @@ async function queryList(pageNo: number, pageSize: number) {
 onShow(() => {
 onShow(() => {
   getEnum(4)
   getEnum(4)
   getEnum(5)
   getEnum(5)
-  getAccountInfo()
+  if (isLoggedIn.value) {
+    getAccountInfo()
+  }
+  else {
+    walletInfo.value = {}
+    paging.value?.complete([])
+  }
 })
 })
 </script>
 </script>
 
 

+ 5 - 1
src/pages/index/index.vue

@@ -126,6 +126,10 @@ const priceTabList = ref([
 const dataList = ref<any>([])
 const dataList = ref<any>([])
 const isProductListLoading = ref(false) // 商品列表加载状态
 const isProductListLoading = ref(false) // 商品列表加载状态
 
 
+function handlePriceTabChange() {
+  paging.value?.reload()
+}
+
 async function queryList(pageNo: number, pageSize: number) {
 async function queryList(pageNo: number, pageSize: number) {
   // 如果是第一页,显示骨架屏
   // 如果是第一页,显示骨架屏
   if (pageNo === 1) {
   if (pageNo === 1) {
@@ -374,7 +378,7 @@ onShow(() => {
           </scroll-view>
           </scroll-view>
         </view>
         </view>
         <view class="productList">
         <view class="productList">
-          <wd-tabs v-model="priceTab" slidable="always" :line-width="0" :line-height="0" @click="() => queryList(1, 20)">
+          <wd-tabs v-model="priceTab" slidable="always" :line-width="0" :line-height="0" @click="handlePriceTabChange">
             <template v-for="item in priceTabList" :key="item">
             <template v-for="item in priceTabList" :key="item">
               <wd-tab :title="$t(item.title)" :name="item.value" />
               <wd-tab :title="$t(item.title)" :name="item.value" />
             </template>
             </template>

+ 1 - 0
src/pages/mine/addressBook.vue

@@ -1,6 +1,7 @@
 <route lang="json5" type="page">
 <route lang="json5" type="page">
 {
 {
   layout: 'default',
   layout: 'default',
+  needLogin: true,
   style: {
   style: {
     navigationBarTitleText: '%addressBook.title%',
     navigationBarTitleText: '%addressBook.title%',
     navigationBarBackgroundColor: '#fff',
     navigationBarBackgroundColor: '#fff',

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

@@ -1,6 +1,7 @@
 <route lang="json5" type="page">
 <route lang="json5" type="page">
 {
 {
   layout: 'default',
   layout: 'default',
+  needLogin: true,
   style: {
   style: {
     navigationBarTitleText: '%addressBook.title%',
     navigationBarTitleText: '%addressBook.title%',
     navigationBarBackgroundColor: '#fff',
     navigationBarBackgroundColor: '#fff',

+ 21 - 6
src/pages/mine/mine.vue

@@ -1,7 +1,6 @@
 <route lang="json5">
 <route lang="json5">
   {
   {
     layout: 'tabbar',
     layout: 'tabbar',
-    needLogin: true,
     style: {
     style: {
       navigationStyle: 'custom',
       navigationStyle: 'custom',
     },
     },
@@ -104,7 +103,7 @@ const menuList = computed(() => {
     { name: t('mine.menu.share'), url: '/pages/mine/share', icon: '/static/icons/share.png' },
     { name: t('mine.menu.share'), url: '/pages/mine/share', icon: '/static/icons/share.png' },
     { name: t('mine.menu.favorite'), url: '/pages/mine/myFavorite', icon: '/static/icons/my-favorite.png' },
     { name: t('mine.menu.favorite'), url: '/pages/mine/myFavorite', icon: '/static/icons/my-favorite.png' },
     { name: t('mine.menu.chat'), config: 'live_chat', icon: '/static/icons/live-chat.png' },
     { name: t('mine.menu.chat'), config: 'live_chat', icon: '/static/icons/live-chat.png' },
-    { name: t('mine.menu.activity'), config: 'activity_group', icon: '/static/icons/activity-group.png' },
+    // { name: t('mine.menu.activity'), config: 'activity_group', icon: '/static/icons/activity-group.png' },
   ]
   ]
 })
 })
 
 
@@ -146,6 +145,8 @@ async function menuClick(item: any) {
 }
 }
 const walletInfo = ref<any>({})
 const walletInfo = ref<any>({})
 async function getWalletInfo() {
 async function getWalletInfo() {
+  if (!isLoggedIn.value)
+    return
   // 获取钱包信息-查询余额
   // 获取钱包信息-查询余额
   const res = await getWalletAccountInfo()
   const res = await getWalletAccountInfo()
   console.log(res)
   console.log(res)
@@ -154,6 +155,8 @@ async function getWalletInfo() {
 
 
 const pendingRedDotsData = ref<any>({})
 const pendingRedDotsData = ref<any>({})
 async function getPendingRedDots() {
 async function getPendingRedDots() {
+  if (!isLoggedIn.value)
+    return
   try {
   try {
     const res = await pendingRedDots()
     const res = await pendingRedDots()
     if (res.code === '200') {
     if (res.code === '200') {
@@ -166,6 +169,12 @@ async function getPendingRedDots() {
 
 
 // 下拉刷新时调用
 // 下拉刷新时调用
 async function handleRefresh() {
 async function handleRefresh() {
+  if (!isLoggedIn.value) {
+    walletInfo.value = {}
+    pendingRedDotsData.value = {}
+    paging.value?.complete()
+    return
+  }
   await Promise.all([
   await Promise.all([
     getWalletInfo(),
     getWalletInfo(),
     getPendingRedDots(),
     getPendingRedDots(),
@@ -175,14 +184,20 @@ async function handleRefresh() {
 }
 }
 
 
 onShow(() => {
 onShow(() => {
-  getWalletInfo()
-  getPendingRedDots()
-  userStore.getUserInfo()
+  if (isLoggedIn.value) {
+    getWalletInfo()
+    getPendingRedDots()
+    userStore.getUserInfo()
+  }
+  else {
+    walletInfo.value = {}
+    pendingRedDotsData.value = {}
+  }
 })
 })
 </script>
 </script>
 
 
 <template>
 <template>
-  <z-paging ref="paging" refresher-only use-page-scroll @refresh="handleRefresh">
+  <z-paging ref="paging" use-page-scroll refresher-only @refresh="handleRefresh">
     <view
     <view
       class="flex items-center justify-between bg-[rgba(var(--wot-color-theme-rgb),0.3)] pb-72rpx pl-24rpx pr-54rpx"
       class="flex items-center justify-between bg-[rgba(var(--wot-color-theme-rgb),0.3)] pb-72rpx pl-24rpx pr-54rpx"
       :style="{ paddingTop: `${safeAreaInsets?.top + 24}px` }"
       :style="{ paddingTop: `${safeAreaInsets?.top + 24}px` }"

+ 1 - 0
src/pages/mine/myFavorite.vue

@@ -1,6 +1,7 @@
 <route lang="json5">
 <route lang="json5">
 {
 {
   layout: 'default',
   layout: 'default',
+  needLogin: true,
   style: {
   style: {
     navigationBarTitleText: '%mine.pages.myFavorite.title%',
     navigationBarTitleText: '%mine.pages.myFavorite.title%',
     navigationBarBackgroundColor: '#fff'
     navigationBarBackgroundColor: '#fff'

+ 1 - 0
src/pages/mine/myProfile.vue

@@ -1,6 +1,7 @@
 <route lang="json5" type="page">
 <route lang="json5" type="page">
 {
 {
   layout: 'default',
   layout: 'default',
+  needLogin: true,
   style: {
   style: {
     navigationBarTitleText: '%myProfile.title%',
     navigationBarTitleText: '%myProfile.title%',
     navigationBarBackgroundColor: '#fff',
     navigationBarBackgroundColor: '#fff',

+ 1 - 0
src/pages/mine/share.vue

@@ -1,6 +1,7 @@
 <route lang="json5">
 <route lang="json5">
 {
 {
   layout: 'default',
   layout: 'default',
+  needLogin: true,
   style: {
   style: {
     navigationStyle: 'custom',
     navigationStyle: 'custom',
     navigationBarTitleText: '%mine.pages.share.title%'
     navigationBarTitleText: '%mine.pages.share.title%'

+ 1 - 0
src/pages/myOrders/myOrders.vue

@@ -1,6 +1,7 @@
 <route lang="json5" type="page">
 <route lang="json5" type="page">
 {
 {
   layout: 'default',
   layout: 'default',
+  needLogin: true,
   style: {
   style: {
     navigationBarTitleText: '%myOrders.title%',
     navigationBarTitleText: '%myOrders.title%',
     navigationBarBackgroundColor: '#fff',
     navigationBarBackgroundColor: '#fff',

+ 1 - 0
src/pages/myOrders/orderDetail.vue

@@ -1,6 +1,7 @@
 <route lang="json5" type="page">
 <route lang="json5" type="page">
 {
 {
   layout: 'default',
   layout: 'default',
+  needLogin: true,
   style: {
   style: {
     navigationBarTitleText: '%orderDetail.title%',
     navigationBarTitleText: '%orderDetail.title%',
     navigationBarBackgroundColor: '#fff',
     navigationBarBackgroundColor: '#fff',

+ 9 - 4
src/pages/search/search.vue

@@ -103,6 +103,11 @@ async function getCategoryList() {
 
 
 // 搜索结果
 // 搜索结果
 const dataList = ref([])
 const dataList = ref([])
+
+function reloadList() {
+  paging.value?.reload()
+}
+
 async function queryList(pageNo: number, pageSize: number) {
 async function queryList(pageNo: number, pageSize: number) {
   try {
   try {
     // const currentTab = option1.value.find((i: any) => i.value === formData.value.price) || option1.value[0]
     // const currentTab = option1.value.find((i: any) => i.value === formData.value.price) || option1.value[0]
@@ -143,16 +148,16 @@ onLoad(() => {
               <view class="back">
               <view class="back">
                 <wd-icon name="thin-arrow-left" size="32rpx" @click="() => goBack()" />
                 <wd-icon name="thin-arrow-left" size="32rpx" @click="() => goBack()" />
               </view>
               </view>
-              <input v-model.trim="formData.storeName" class="search-input" type="text" :placeholder="$t('search.placeholder')" @confirm="queryList(1, 20)">
+              <input v-model.trim="formData.storeName" class="search-input" type="text" :placeholder="$t('search.placeholder')" @confirm="reloadList">
               <wd-icon name="search" custom-class="search-icon" color="#999" size="32rpx" />
               <wd-icon name="search" custom-class="search-icon" color="#999" size="32rpx" />
             </view>
             </view>
           </template>
           </template>
         </wd-navbar>
         </wd-navbar>
         <view class="bg-white text-center">
         <view class="bg-white text-center">
           <wd-drop-menu>
           <wd-drop-menu>
-            <wd-drop-menu-item v-model="formData.price" :options="option1" @change="queryList(1, 20)" />
-            <wd-drop-menu-item v-model="formData.cateId" :options="option2" @change="queryList(1, 20)" />
-            <wd-drop-menu-item v-model="formData.sort" :options="option3" @change="queryList(1, 20)" />
+            <wd-drop-menu-item v-model="formData.price" :options="option1" @change="reloadList" />
+            <wd-drop-menu-item v-model="formData.cateId" :options="option2" @change="reloadList" />
+            <wd-drop-menu-item v-model="formData.sort" :options="option3" @change="reloadList" />
           </wd-drop-menu>
           </wd-drop-menu>
         </view>
         </view>
       </view>
       </view>

+ 1 - 0
src/pages/wallet/frozenRecord.vue

@@ -1,6 +1,7 @@
 <route lang="json5" type="page">
 <route lang="json5" type="page">
 {
 {
   layout: 'default',
   layout: 'default',
+  needLogin: true,
   style: {
   style: {
     navigationBarTitleText: '%wallet.frozenRecord.title%',
     navigationBarTitleText: '%wallet.frozenRecord.title%',
     navigationBarBackgroundColor: '#fff',
     navigationBarBackgroundColor: '#fff',

+ 1 - 0
src/pages/wallet/recharge.vue

@@ -1,6 +1,7 @@
 <route lang="json5" type="page">
 <route lang="json5" type="page">
 {
 {
   layout: 'default',
   layout: 'default',
+  needLogin: true,
   style: {
   style: {
     navigationBarTitleText: '%wallet.recharge.title%',
     navigationBarTitleText: '%wallet.recharge.title%',
     navigationBarBackgroundColor: '#fff',
     navigationBarBackgroundColor: '#fff',

+ 1 - 0
src/pages/wallet/rechargeRecord.vue

@@ -1,6 +1,7 @@
 <route lang="json5" type="page">
 <route lang="json5" type="page">
 {
 {
   layout: 'default',
   layout: 'default',
+  needLogin: true,
   style: {
   style: {
     navigationBarTitleText: '%wallet.rechargeRecord.title%',
     navigationBarTitleText: '%wallet.rechargeRecord.title%',
     navigationBarBackgroundColor: '#fff',
     navigationBarBackgroundColor: '#fff',

+ 1 - 0
src/pages/wallet/withdraw.vue

@@ -1,6 +1,7 @@
 <route lang="json5" type="page">
 <route lang="json5" type="page">
 {
 {
   layout: 'default',
   layout: 'default',
+  needLogin: true,
   style: {
   style: {
     navigationStyle: 'custom',
     navigationStyle: 'custom',
     navigationBarTitleText: '%wallet.withdraw.title%',
     navigationBarTitleText: '%wallet.withdraw.title%',

+ 1 - 0
src/pages/wallet/withdrawRecord.vue

@@ -1,6 +1,7 @@
 <route lang="json5" type="page">
 <route lang="json5" type="page">
 {
 {
   layout: 'default',
   layout: 'default',
+  needLogin: true,
   style: {
   style: {
     navigationBarTitleText: '%wallet.withdrawRecord.title%',
     navigationBarTitleText: '%wallet.withdrawRecord.title%',
     navigationBarBackgroundColor: '#fff',
     navigationBarBackgroundColor: '#fff',

+ 1 - 1
src/utils/social.ts

@@ -118,7 +118,7 @@ export function openH5WhatsApp(type: 'live_chat' | 'activity_group', value: stri
   const phone = (value || '').replace(/\s+/g, '')
   const phone = (value || '').replace(/\s+/g, '')
   const url = type === 'activity_group'
   const url = type === 'activity_group'
     ? `https://chat.whatsapp.com/${encodeURIComponent(value || '')}`
     ? `https://chat.whatsapp.com/${encodeURIComponent(value || '')}`
-    : `https://wa.me/${encodeURIComponent(phone)}`
+    : `https://wa.me/message/${encodeURIComponent(phone)}`
 
 
   if (typeof window !== 'undefined' && typeof window.open === 'function')
   if (typeof window !== 'undefined' && typeof window.open === 'function')
     window.open(url, '_blank')
     window.open(url, '_blank')