vbea 2 лет назад
Родитель
Сommit
c76d18252a

+ 8 - 4
Strides-APP/app.json

@@ -1,16 +1,20 @@
 {
   "name": "JuicePlus",
   "displayName": "ChargEco",
-  "versionCode": 270,
-  "versionName": "V2.4.5",
-  "product": true,
+  "versionCode": 280,
+  "versionName": "V2.4.6",
+  "product": false,
   "debug": true,
   "isWhitelabel": true,
   "modules": {
     "i18n": false,
     "bookmarks": true,
     "codePush": false,
-    "notifications": false
+    "notifications": false,
+    "support": {
+      "phone": "006597285916",
+      "whatsapp": false
+    }
   },
   "storeUrl": {
     "android": "market://details?id=com.strides.chargeco",

+ 9 - 0
Strides-APP/app/i18n/locales/en.js

@@ -172,6 +172,7 @@ export default {
     debugOnly: "Debug Mode Options Only",
     noChargingSession: "No charging session found",
     members: "Members",
+    contactSupport: "Contact Support"
   },
   profile: {
     address: "Address",
@@ -452,5 +453,13 @@ export default {
     labelTransactionID: "Transaction ID:",
     receipt: "Receipt",
     successful: "Successful! "
+  },
+  support: {
+    supportHotline: "Support Hotline",
+    labelOpenTime: "Our Support Hours:",
+    timeAllDay: "Monday to Sunday - 24 Hours",
+    timeWeekDay: "Monday to Friday - 24 Hours",
+    btnCallSupport: "Call Support Hotline",
+    btnWhatsapp: "Whatsapp Us"
   }
 }

+ 9 - 0
Strides-APP/app/i18n/locales/zh-TW.js

@@ -172,6 +172,7 @@
     debugOnly: "以下爲調試模式獨有項",
     noChargingSession: "您未在充電",
     members: "我的會員",
+    contactSupport: "聯繫客服"
   },
   profile: {
     address: "地區",
@@ -452,5 +453,13 @@
     labelTransactionID: "交易編號:",
     receipt: "發票",
     successful: "交易成功!"
+  },
+  support: {
+    supportHotline: "客戶服務",
+    labelOpenTime: "服務時間:",
+    timeAllDay: "周一至周日 - 24小時",
+    timeWeekDay: "工作日 - 24小時",
+    btnCallSupport: "電話咨詢",
+    btnWhatsapp: "Whatsapp"
   }
 }

+ 9 - 0
Strides-APP/app/i18n/locales/zh.js

@@ -172,6 +172,7 @@ export default {
     debugOnly: "以下为调试模式独有项",
     noChargingSession: "您未在充电",
     members: "我的会员",
+    contactSupport: "联系客服"
   },
   profile: {
     address: "地址",
@@ -452,5 +453,13 @@ export default {
     labelTransactionID: "交易编号:",
     receipt: "发票",
     successful: "交易成功!"
+  },
+  support: {
+    supportHotline: "客户服务",
+    labelOpenTime: "服务时间:",
+    timeAllDay: "周一至周日 - 24小时",
+    timeWeekDay: "工作日 - 24小时",
+    btnCallSupport: "拨打电话",
+    btnWhatsapp: "Whatsapp"
   }
 }

+ 7 - 1
Strides-APP/app/pages/Router.js

@@ -9,7 +9,7 @@ import { createStackNavigator, TransitionPresets } from '@react-navigation/stack
 import { enableScreens } from 'react-native-screens';
 import { Styles } from '../components/Toolbar';
 import app from '../../app.json';
-import About from './About';
+import About from './about/About';
 import Launcher from './Launch';
 import Login from './sign/Login';
 import Regist from './sign/RegisterV2';
@@ -55,6 +55,7 @@ import HeaderTitle from '../components/HeaderTitle';
 import Bookmarks from './bookmark/Bookmarks';
 import MembersList from './member/MembersList';
 import ApplyMember from './member/ApplyMember';
+import Contact from './about/Contact';
 
 export var PageList = {
   'splash': {
@@ -120,6 +121,11 @@ export var PageList = {
     titleScope: 'route.about',
     component: About
   },
+  'supportContact': {
+    title: 'Support Hotline',
+    titleScope: 'support.supportHotline',
+    component: Contact
+  },
   'privacy': {
     title: 'Privacy Policy',
     titleScope: 'route.privacyPolicy',

+ 3 - 3
Strides-APP/app/pages/About.js → Strides-APP/app/pages/about/About.js

@@ -4,8 +4,8 @@
  */
 import React from 'react';
 import { View, Text, Image, StyleSheet } from 'react-native';
-import app from '../../app.json';
-import { PageList } from './Router';
+import app from '../../../app.json';
+import { PageList } from '../Router';
 
 const author = 2023;
 
@@ -15,7 +15,7 @@ export default About = () => {
       <Image
         style={styles.logo}
         resizeMode='contain'
-        source={require('../images/about-logo.png')}/>
+        source={require('../../images/about-logo.png')}/>
       {/* <Text style={styles.appName}>{app.displayName}</Text> */}
       <Text style={styles.versionName}>{app.versionName}</Text>
       <Text style={ui.flex1}></Text>

+ 76 - 0
Strides-APP/app/pages/about/Contact.js

@@ -0,0 +1,76 @@
+import React, { Component } from 'react';
+import { View, Text, StyleSheet, Image, Linking } from 'react-native';
+import Button from '../../components/Button';
+import app from '../../../app.json';
+
+export default class Contact extends Component {
+  constructor(props) {
+    super(props);
+    this.state = {
+    };
+  }
+
+  callPhone() {
+    Linking.openURL("tel:" + app.modules.support.phone)
+  }
+
+  callWhatapp() {
+    Linking.openURL(app.modules.support.whatsapp)
+  }
+
+  render() {
+    return (
+      <View style={styles.container}>
+        <View style={ui.center}>
+          <Image
+            style={styles.logo}
+            resizeMode='contain'
+            source={require('../../images/about-logo.png')}/>
+        </View>
+        <Text style={styles.labelText}>{$t("support.labelOpenTime")}</Text>
+        <Text style={styles.contentText}>{$t("support.timeAllDay")}</Text>
+        <View style={ui.flex1}></View>
+        <Button
+          text={$t("support.btnCallSupport")}
+          style={styles.buttonPrimary}
+          onClick={() => this.callPhone()}
+          disabled={!app.modules.support.phone}
+        />
+        <Button
+          text={$t("support.btnWhatsapp")}
+          disabled={!app.modules.support.whatsapp}
+          onClick={() => this.callWhatapp()}
+        />
+      </View>
+    );
+  }
+}
+
+const styles = StyleSheet.create({
+  container: {
+    flex: 1,
+    padding: 16,
+    backgroundColor: colorLight
+  },
+  logo: {
+    width: 215,
+    height: 70,
+    marginTop: 16,
+    marginBottom: 12
+  },
+  labelText: {
+    color: textPrimary,
+    fontSize: 18,
+    fontWeight: 'bold',
+    paddingTop: 16,
+    paddingBottom: 8
+  },
+  contentText: {
+    color: textSecondary,
+    fontSize: 16
+  },
+  buttonPrimary: {
+    marginBottom: 16,
+    backgroundColor: colorPrimary
+  }
+})

+ 16 - 0
Strides-APP/app/pages/home/Drawer.js

@@ -403,6 +403,22 @@ const DrawerContent = ({isLogin, userInfo, onLogout, navigation}) => {
         />
         <Text style={styles.label}>{$t('drawer.settings')}</Text>
       </Button>
+      { app.modules.support &&
+        <Button
+          style={styles.itemButton}
+          viewStyle={styles.itemView}
+          onClick={() => {
+            startPage(PageList.supportContact);
+          }}>
+          <MaterialCommunityIcons
+            style={styles.icon}
+            name="face-agent"
+            color="#333"
+            size={26}
+          />
+          <Text style={styles.label}>{$t('drawer.contactSupport')}</Text>
+        </Button>
+      }
       <Button
         style={styles.itemButton}
         viewStyle={styles.itemView}