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

+ 2 - 2
Strides-APP/android/app/version.properties

@@ -1,2 +1,2 @@
-#Wed Nov 01 11:18:22 CST 2023
-VERSION_CODE=349
+#Thu Nov 09 10:03:46 CST 2023
+VERSION_CODE=351

+ 1 - 0
Strides-APP/app.json

@@ -13,6 +13,7 @@
     "membership": true,
     "membership": true,
     "nationally": false,
     "nationally": false,
     "notifications": true,
     "notifications": true,
+    "topup_payment_type": false,
     "support": {
     "support": {
       "phone": "+6564775355",
       "phone": "+6564775355",
       "whatsapp": "https://wa.me/6597285916"
       "whatsapp": "https://wa.me/6597285916"

+ 3 - 3
Strides-APP/app/i18n/locales/en.js

@@ -360,7 +360,7 @@ export default {
     tipsLowCredits: "This charging session will end if there is insufficient credits.\n",
     tipsLowCredits: "This charging session will end if there is insufficient credits.\n",
     tipsReceipt: "A Receipt Will Be Sent To Your Email",
     tipsReceipt: "A Receipt Will Be Sent To Your Email",
     titleChooseCreditValue: "Choose Credit Value",
     titleChooseCreditValue: "Choose Credit Value",
-    titleChoosePaymentType: "Choose Payment Type",
+    titleChoosePaymentType: "Choose Payment Method",
     titleLowCredits: "Low Credits",
     titleLowCredits: "Low Credits",
     topUp: "Top Up",
     topUp: "Top Up",
     viewHistory: "View History"
     viewHistory: "View History"
@@ -478,8 +478,8 @@ export default {
   },
   },
   notification: {
   notification: {
     tabAlerts: "Alerts",
     tabAlerts: "Alerts",
-    tabCampaign: "Campaign",
-    tabPromotions: "News",
+    tabCampaign: "Campaigns",
+    tabPromotions: "Articles",
     viewMessage: "View Message",
     viewMessage: "View Message",
     deleteMessage: "Delete",
     deleteMessage: "Delete",
     confirmDelete: "Are you sure you want to delete this message?",
     confirmDelete: "Are you sure you want to delete this message?",

+ 5 - 5
Strides-APP/app/pages/alert/Notification.js

@@ -24,17 +24,17 @@ export default class Notification extends Component {
       countInfo: {}
       countInfo: {}
     };
     };
     this.pageAdapter = [{
     this.pageAdapter = [{
-      title: $t('notification.tabPromotions'),
-      name: "News",
-      component: ListNews
-    }, {
       title: $t('notification.tabCampaign'),
       title: $t('notification.tabCampaign'),
-      name: "Campaign",
+      name: "Campaigns",
       component: ListCampaign
       component: ListCampaign
     }, {
     }, {
       title: $t('notification.tabAlerts'),
       title: $t('notification.tabAlerts'),
       name: "Alerts",
       name: "Alerts",
       component: ListAlerts
       component: ListAlerts
+    }, {
+      title: $t('notification.tabPromotions'),
+      name: "News",
+      component: ListNews
     }]
     }]
     this.tabBarStyle = {
     this.tabBarStyle = {
       tabBarStyle: styles.tabStyle,
       tabBarStyle: styles.tabStyle,

+ 89 - 83
Strides-APP/app/pages/wallet/TopupNew.js

@@ -3,7 +3,7 @@
  * @邠心vbe on 2023/02/02
  * @邠心vbe on 2023/02/02
  */
  */
 import React, { Component } from 'react';
 import React, { Component } from 'react';
-import { View, Text, StyleSheet, Switch, AppState, Linking } from 'react-native';
+import { View, Text, StyleSheet, ScrollView, AppState, Linking } from 'react-native';
 import apiWallet from '../../api/apiWallet';
 import apiWallet from '../../api/apiWallet';
 import BadgeSelectItem from '../../components/BadgeSelectItem';
 import BadgeSelectItem from '../../components/BadgeSelectItem';
 import Button, { ElevationObject } from '../../components/Button';
 import Button, { ElevationObject } from '../../components/Button';
@@ -86,6 +86,10 @@ export default class TopupNew extends Component {
       currency: topup?.currency,
       currency: topup?.currency,
       payAmount: topup?.amount
       payAmount: topup?.amount
     }
     }
+    if (this.state.payType?.fomoPayType) {
+      params.payTypeSelection = this.state.payType.fomoPayType
+    }
+    //console.log('充值请求参数', params);
     apiWallet.doPaymentV2(params).then(res => {
     apiWallet.doPaymentV2(params).then(res => {
       Dialog.dismissLoading();
       Dialog.dismissLoading();
       if (res.data.webPaymentUrl) {
       if (res.data.webPaymentUrl) {
@@ -107,7 +111,7 @@ export default class TopupNew extends Component {
     const params = {
     const params = {
       currency: topup?.currency,
       currency: topup?.currency,
       payAmount: topup?.amount,
       payAmount: topup?.amount,
-      fomoPayType: this.state.payType.fomoPayType
+      fomoPayType: this.state.payType?.fomoPayType
     }
     }
     //console.log('params',params);
     //console.log('params',params);
     if (params.payAmount) {
     if (params.payAmount) {
@@ -149,89 +153,90 @@ export default class TopupNew extends Component {
   render() {
   render() {
     return (
     return (
       <View style={styles.container}>
       <View style={styles.container}>
-        <View style={styles.headerView}>
-          <Balance balanceText={this.state.balance}/>
-        </View>
-        <View style={styles.contentView}>
-          <View style={styles.topupView}>
-            <WalletTitle>{$t('wallet.titleChooseCreditValue')}</WalletTitle>
-            { app.modules.nationally
-            ? <View style={styles.topupItems2}>
-                { this.state.topupList.map((item, index) => {
-                    return (
-                      <BadgeSelectItem
-                        key={index}
-                        style={[styles.topupItem2]}
-                        checked={index == this.state.selectIndex}
-                        onPress={() => {
-                          this.setState({
-                            selectIndex: index
-                          })
-                        }}>
-                        <Text style={[styles.topupText, index == this.state.selectIndex && {color: colorAccent}]}>
-                          <Text style={{fontSize: 16}}>{item.currencySymbol} </Text>
-                          {item.amount}
-                          {/* <Text style={{fontSize: 16}}> {item.currency}</Text> */}
-                        </Text>
-                      </BadgeSelectItem>
-                    );
-                  })
-                }
-              </View>
-            : <View style={styles.topupItems}>
-                { this.state.topupList.map((item, index) => {
-                    return (
-                      <BadgeSelectItem
-                        key={index}
-                        style={[styles.topupItem, index > 0 && styles.right]}
-                        checked={index == this.state.selectIndex}
-                        onPress={() => {
-                          this.setState({
-                            selectIndex: index
-                          })
-                        }}>
-                        <Text style={[styles.topupText, index == this.state.selectIndex && {color: colorAccent}]}>
-                          <Text style={{fontSize: 16}}>{item.currencySymbol} </Text>
-                          {item.amount}
-                          {/* <Text style={{fontSize: 16}}> {item.currency}</Text> */}
-                        </Text>
-                      </BadgeSelectItem>
-                    );
-                  })
-                }
-              </View>
-            }
+        <ScrollView style={ui.flex1}>
+          <View style={styles.headerView}>
+            <Balance balanceText={this.state.balance}/>
           </View>
           </View>
-          { !PaymentDefault.is2c2p &&
+          <View style={styles.contentView}>
             <View style={styles.topupView}>
             <View style={styles.topupView}>
-              <WalletTitle>{$t('wallet.titleChoosePaymentType')}</WalletTitle>
-              <TopupPaythod
-                onChange={type => {
-                  this.setState({
-                    payType: type
-                  });
-                }}/>
-            </View>
-          }
-        </View>
-        <View style={ui.flex1}></View>
-        { utils.isNotEmpty(app.storeUrl.refundUrl) &&
-          <View style={styles.agreeView}>
-            <CheckBox
-              value={this.state.agree}
-              onTintColor={colorAccent}
-              onCheckColor={colorAccent}
-              onValueChange={v => this.changeAgree(v)}
-            />
-            <View style={styles.agreeTextRow}>
-              <TextView style={styles.agreeText} onPress={() => this.changeAgree(!this.state.agree)}>
-                {$t('sign.iHaveReadAndAgree')}
-              </TextView>
-              <TextView style={styles.agreeLink} onPress={() => this.toPolicy()}>Refund Policy</TextView>
+              <WalletTitle>{$t('wallet.titleChooseCreditValue')}</WalletTitle>
+              { app.modules.nationally
+              ? <View style={styles.topupItems2}>
+                  { this.state.topupList.map((item, index) => {
+                      return (
+                        <BadgeSelectItem
+                          key={index}
+                          style={[styles.topupItem2]}
+                          checked={index == this.state.selectIndex}
+                          onPress={() => {
+                            this.setState({
+                              selectIndex: index
+                            })
+                          }}>
+                          <Text style={[styles.topupText, index == this.state.selectIndex && {color: colorAccent}]}>
+                            <Text style={{fontSize: 16}}>{item.currencySymbol} </Text>
+                            {item.amount}
+                            {/* <Text style={{fontSize: 16}}> {item.currency}</Text> */}
+                          </Text>
+                        </BadgeSelectItem>
+                      );
+                    })
+                  }
+                </View>
+              : <View style={styles.topupItems}>
+                  { this.state.topupList.map((item, index) => {
+                      return (
+                        <BadgeSelectItem
+                          key={index}
+                          style={[styles.topupItem, index > 0 && styles.right]}
+                          checked={index == this.state.selectIndex}
+                          onPress={() => {
+                            this.setState({
+                              selectIndex: index
+                            })
+                          }}>
+                          <Text style={[styles.topupText, index == this.state.selectIndex && {color: colorAccent}]}>
+                            <Text style={{fontSize: 16}}>{item.currencySymbol} </Text>
+                            {item.amount}
+                            {/* <Text style={{fontSize: 16}}> {item.currency}</Text> */}
+                          </Text>
+                        </BadgeSelectItem>
+                      );
+                    })
+                  }
+                </View>
+              }
             </View>
             </View>
+            { (!PaymentDefault.is2c2p || app.modules.topup_payment_type) &&
+              <View style={styles.topupView}>
+                <WalletTitle>{$t('wallet.titleChoosePaymentType')}</WalletTitle>
+                <TopupPaythod
+                  onChange={type => {
+                    this.setState({
+                      payType: type
+                    });
+                  }}/>
+              </View>
+            }
           </View>
           </View>
-        }
+        </ScrollView>
         <View style={styles.buttonView}>
         <View style={styles.buttonView}>
+          { utils.isNotEmpty(app.storeUrl.refundUrl) &&
+            <View style={styles.agreeView}>
+              <CheckBox
+                value={this.state.agree}
+                onTintColor={colorAccent}
+                onCheckColor={colorAccent}
+                onValueChange={v => this.changeAgree(v)}
+              />
+              <View style={styles.agreeTextRow}>
+                <TextView style={styles.agreeText} onPress={() => this.changeAgree(!this.state.agree)}>
+                  {$t('sign.iHaveReadAndAgree')}
+                </TextView>
+                <TextView style={styles.agreeLink} onPress={() => this.toPolicy()}>Refund Policy</TextView>
+              </View>
+            </View>
+          }
           <Button
           <Button
             text={$t('wallet.btnPurchase')}
             text={$t('wallet.btnPurchase')}
             elevation={1.5}
             elevation={1.5}
@@ -334,6 +339,7 @@ const styles = StyleSheet.create({
   topupText: {
   topupText: {
     fontSize: 18,
     fontSize: 18,
     color: textPrimary,
     color: textPrimary,
+    fontWeight: 'bold',
     ...$padding(20, 0)
     ...$padding(20, 0)
   },
   },
   right: {
   right: {
@@ -352,13 +358,13 @@ const styles = StyleSheet.create({
   },
   },
   buttonView: {
   buttonView: {
     padding: 16,
     padding: 16,
-    marginTop: 0,
+    marginTop: 2,
     marginBottom: 16
     marginBottom: 16
   },
   },
   agreeView: {
   agreeView: {
-    margin: 16,
-    flexDirection: 'row',
+    marginBottom: 16,
     alignItems: 'center',
     alignItems: 'center',
+    flexDirection: 'row'
   },
   },
   agreeTextRow: {
   agreeTextRow: {
     flex: 1,
     flex: 1,

+ 12 - 10
Strides-APP/app/pages/wallet/TopupPaythod.js

@@ -75,11 +75,13 @@ export default class TopupPaythod extends Component {
                 ]}
                 ]}
                 checked={index == this.state.cIndex}
                 checked={index == this.state.cIndex}
                 onPress={() => this.changePayType(index)}>
                 onPress={() => this.changePayType(index)}>
-                <View style={$padding(12, 8, 8)}>
-                  <PaymentIcon method={item.fomoPayType} checked={index == this.state.cIndex}/>
-                </View>
+                { this.props.showIcon &&
+                  <View style={$padding(12, 8, 8)}>
+                    <PaymentIcon method={item.fomoPayType} checked={index == this.state.cIndex}/>
+                  </View>
+                }
                 <TextView style={[styles.paytypeText, (index == this.state.cIndex && {color: colorAccent})]}>{item.payName}</TextView>
                 <TextView style={[styles.paytypeText, (index == this.state.cIndex && {color: colorAccent})]}>{item.payName}</TextView>
-                <TextView style={styles.cardText}>{this.getSecuryNumber(item.payName, item.cardPk)}</TextView>
+                {/* <TextView style={styles.cardText}>{this.getSecuryNumber(item.payName, item.cardPk)}</TextView> */}
               </BadgeSelectItem>
               </BadgeSelectItem>
             );
             );
           })
           })
@@ -91,11 +93,11 @@ export default class TopupPaythod extends Component {
 
 
 const styles = StyleSheet.create({
 const styles = StyleSheet.create({
   listView: {
   listView: {
-    flexWrap: 'wrap',
-    flexDirection: 'row'
+    /*flexWrap: 'wrap',
+    flexDirection: 'row'*/
   },
   },
   paytypeView: {
   paytypeView: {
-    flex: 1,
+    //flex: 1,
     alignItems: 'center',
     alignItems: 'center',
     backgroundColor: colorLight,
     backgroundColor: colorLight,
     ...ElevationObject(5)
     ...ElevationObject(5)
@@ -104,13 +106,13 @@ const styles = StyleSheet.create({
     borderColor: colorPrimary
     borderColor: colorPrimary
   },
   },
   next: {
   next: {
-    marginLeft: 16,
+    marginTop: 16,
   },
   },
   paytypeText: {
   paytypeText: {
     color: textPrimary,
     color: textPrimary,
-    fontSize: 14,
+    fontSize: 16,
     fontWeight: 'bold',
     fontWeight: 'bold',
-    paddingBottom: 14
+    padding: 18
   },
   },
   cardText: {
   cardText: {
     color: "#666",
     color: "#666",