Selaa lähdekoodia

fix: 链接跳转

liangan 2 viikkoa sitten
vanhempi
sitoutus
6da261c584

+ 1 - 1
src/components/product/product.vue

@@ -76,7 +76,7 @@ function handleClick() {
           ৳ {{ formatNumber(item.price) }}
         </view>
         <view class="text-16rpx text-#898989">
-          {{ item.sales }} Sold
+          {{ item.ficti }} Sold
         </view>
       </view>
     </view>

+ 4 - 3
src/locale/bn.json

@@ -89,9 +89,9 @@
   "setting.title": "সেটিং",
   "setting.changePassword": "পাসওয়ার্ড পরিবর্তন",
   "setting.language": "ভাষা",
-  "setting.policies": "নীতিমালা",
-  "setting.help": "সহায়তা",
-  "setting.feedback": "প্রতিক্রিয়া",
+  "setting.policies": "গোপনীয়তা নীতি",
+  "setting.termsOfService": "পরিষেবার শর্তাবলী",
+  "setting.refund": "রিটার্ন ও ফেরত নীতি",
   "setting.logout": "লগ আউট",
   "setting.version": "ভার্সন {0}",
   "setting.lang.en": "ইংরেজি",
@@ -365,6 +365,7 @@
   "productDetail.sold": "{0} বিক্রি হয়েছে",
   "productDetail.groupRules": "গ্রুপ নিয়ম",
   "productDetail.viewRules": "নিয়ম দেখুন",
+  "productDetail.viewRulesLinkTitle": "গ্রুপ ক্রয় নিয়ম",
   "productDetail.ongoingGroup": "চলমান গ্রুপ",
   "productDetail.need": "প্রয়োজন",
   "productDetail.more": "আরও",

+ 4 - 3
src/locale/en.json

@@ -89,9 +89,9 @@
   "setting.title": "Setting",
   "setting.changePassword": "Change Password",
   "setting.language": "Language",
-  "setting.policies": "Policies",
-  "setting.help": "Help",
-  "setting.feedback": "Feedback",
+  "setting.policies": "Privacy Policy",
+  "setting.termsOfService": "Terms of Service",
+  "setting.refund": "Return & Refund Policy",
   "setting.logout": "Logout",
   "setting.version": "Version {0}",
   "setting.lang.en": "English",
@@ -366,6 +366,7 @@
   "productDetail.sold": "{0} sold",
   "productDetail.groupRules": "Group Rules",
   "productDetail.viewRules": "View Rules",
+  "productDetail.viewRulesLinkTitle": "Group Buying Rules",
   "productDetail.ongoingGroup": "Ongoing Group",
   "productDetail.need": "Need",
   "productDetail.more": "More",

+ 4 - 3
src/locale/zh-Hans.json

@@ -89,9 +89,9 @@
   "setting.title": "设置",
   "setting.changePassword": "修改密码",
   "setting.language": "语言",
-  "setting.policies": "政策条款",
-  "setting.help": "帮助",
-  "setting.feedback": "反馈",
+  "setting.policies": "隐私政策",
+  "setting.termsOfService": "用户服务协议",
+  "setting.refund": "退货退款政策",
   "setting.logout": "退出登录",
   "setting.version": "版本 {0}",
   "setting.lang.en": "英语",
@@ -365,6 +365,7 @@
   "productDetail.sold": "已售 {0}",
   "productDetail.groupRules": "拼团规则",
   "productDetail.viewRules": "查看规则",
+  "productDetail.viewRulesLinkTitle": "拼团规则",
   "productDetail.ongoingGroup": "进行中的拼团",
   "productDetail.need": "还需",
   "productDetail.more": "人",

+ 2 - 2
src/pages.json

@@ -309,11 +309,11 @@
       "path": "pages/webLink/webLink",
       "type": "page",
       "layout": "default",
-      "needLogin": true,
       "style": {
         "navigationBarTitleText": "",
         "navigationBarBackgroundColor": "#fff"
-      }
+      },
+      "needLogin": true
     },
     {
       "path": "uni_modules/uni-upgrade-center-app/pages/upgrade-popup",

+ 39 - 12
src/pages/mine/mine.vue

@@ -9,6 +9,7 @@
   </route>
 
 <script lang="ts" setup>
+import { getConfigByCode } from '@/api/common'
 import { pendingRedDots } from '@/api/order'
 import { getWalletAccountInfo } from '@/api/wallet'
 import { t } from '@/locale'
@@ -45,38 +46,64 @@ const menuList = ref([
   { name: t('mine.menu.address'), url: '/pages/mine/addressBook', icon: '/static/icons/address-book.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.chat'), icon: '/static/icons/live-chat.png' },
-  { name: t('mine.menu.activity'), url: '/pages/referEarn/referEarn', icon: '/static/icons/activity-group.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' },
 ])
-function menuClick(item: any) {
+async function getConfig(code: string) {
+  try {
+    let value = ''
+    const res = await getConfigByCode({ code })
+    if (res.code === '200') {
+      switch (code) {
+        case 'live_chat':
+          value = res.data.valueInfo
+          break
+        case 'activity_group':
+          value = res.data.valueInfo
+          break
+        default:
+          break
+      }
+    }
+    return value
+  }
+  catch {
+
+  }
+}
+async function menuClick(item: any) {
   if (item.url) {
     toPage({ url: item.url })
   }
   else {
-    openWhatsApp()
+    const res = await getConfig(item.config)
+    openWhatsApp(item.config, res)
   }
 }
 // 跳转whatsapp
-function openWhatsApp() {
+function openWhatsApp(config: string, value: string = '') {
   // 判断手机是否安装whatsapp
   // pname:Android 需要查询的包名  action:ios 需要查询的 URL Scheme
+  const pname = 'com.whatsapp'
+
   // installed ture:安装  false:未安装
   const installed = plus.runtime.isApplicationExist({
-    pname: 'com.whatsapp',
+    pname,
     action: 'whatsapp://',
   })
-  // 电话号码
-  const phoneNumber = '+8615058371889'
-  // whatsapp 联系人聊天页面链接
-  const whatsappUrl = `whatsapp://send?phone=${phoneNumber}`
+
   // whatsapp包名
-  const pname = 'com.whatsapp'
 
   // 判断手机系统,走不同方法
   if (plus.os.name === 'Android') {
     if (installed) {
       // 手机已安装 直接跳转
-      plus.runtime.openURL(whatsappUrl)
+      if (config === 'live_chat') {
+        plus.runtime.openURL(`whatsapp://send?phone=${value}`)
+      }
+      else if (config === 'activity_group') {
+        plus.runtime.openURL(`https://chat.whatsapp.com/${value}`)
+      }
     }
     else {
       // 手机未安装,跳转到手机商城并搜索whatsapp (国内目前搜不到)

+ 3 - 3
src/pages/mine/setting.vue

@@ -50,9 +50,9 @@ onLoad(() => {
       <wd-picker v-model="language" :columns="columns" use-default-slot @confirm="changeLanguage">
         <wd-cell :title="$t('setting.language')" custom-title-class="text-32rpx" custom-value-class="text-#838383! text-32rpx!" :value="columns.find(item => item.value === language)?.label" is-link />
       </wd-picker>
-      <wd-cell :title="$t('setting.policies')" custom-title-class="text-32rpx" is-link />
-      <wd-cell :title="$t('setting.help')" custom-title-class="text-32rpx" is-link />
-      <wd-cell :title="$t('setting.feedback')" custom-title-class="text-32rpx" is-link />
+      <wd-cell :title="$t('setting.policies')" custom-title-class="text-32rpx" is-link @click="toPage({ url: '/pages/webLink/webLink', params: { title: t('setting.policies'), link: 'https://www.aisoco.net/privacy.html' } })" />
+      <wd-cell :title="$t('setting.termsOfService')" custom-title-class="text-32rpx" is-link @click="toPage({ url: '/pages/webLink/webLink', params: { title: t('setting.termsOfService'), link: 'https://www.aisoco.net/terms.html' } })" />
+      <wd-cell :title="$t('setting.refund')" custom-title-class="text-32rpx" title-width="400rpx" is-link @click="toPage({ url: '/pages/webLink/webLink', params: { title: t('setting.refund'), link: 'https://www.aisoco.net/refund.html' } })" />
     </wd-cell-group>
 
     <!-- Logout -->

+ 1 - 1
src/pages/productDetail/productDetail.vue

@@ -514,7 +514,7 @@ onShow(async () => {
               {{ $t('productDetail.groupRules') }}
             </text>
           </view>
-          <view class="flex items-center" @click="toPage({ url: '/pages/webLink/webLink', params: { title: $t('productDetail.viewRules'), link: 'http://' } })">
+          <view class="flex items-center" @click="toPage({ url: '/pages/webLink/webLink', params: { title: t('productDetail.viewRulesLinkTitle'), link: 'https://www.aisoco.net/groupRules.html' } })">
             <text class="mr-8rpx text-24rpx text-#3A444C">
               {{ $t('productDetail.viewRules') }}
             </text>

+ 12 - 4
src/pages/register/register.vue

@@ -284,13 +284,21 @@ onUnmounted(() => {
           {{ $t('auth.register.loginNow') }}
         </text>
       </view>
-      <view class="mt-130rpx w-full text-center" :style="{ paddingBottom: `${safeAreaInsets?.bottom + 20}px` }">
+      <view class="mt-80rpx w-full text-center" :style="{ paddingBottom: `${safeAreaInsets?.bottom + 20}px` }">
         <text class="text-28rpx text-#5C5C5C">
           By regstration,you agree to our
         </text>
-        <text class="ml-10rpx text-28rpx text-[var(--wot-color-theme)]">
-          Security Privacy
-        </text>
+        <view>
+          <text class="ml-10rpx text-28rpx text-#007aff" @click="toPage({ url: '/pages/webLink/webLink', params: { title: t('setting.policies'), link: 'https://www.aisoco.net/privacy.html' } })">
+            {{ t('setting.policies') }}
+          </text>
+          <text class="ml-10rpx text-28rpx text-#5C5C5C">
+            and
+          </text>
+          <text class="ml-10rpx text-28rpx text-#007aff" @click="toPage({ url: '/pages/webLink/webLink', params: { title: t('setting.termsOfService'), link: 'https://www.aisoco.net/terms.html' } })">
+            {{ t('setting.termsOfService') }}
+          </text>
+        </view>
       </view>
     </view>
   </view>

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

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