xiongzhu 2 anos atrás
pai
commit
7906d22f7e

+ 24 - 0
removeDeployments.mjs

@@ -0,0 +1,24 @@
+#!/usr/bin/env node
+import CodePush from 'code-push'
+
+const token = '064853a8cdbfb94ed9b62ce30da17f162a1444a0'
+const androidName = 'ASNFTNGFHP-Android'
+const iosName = 'ASNFTNGFHP-iOS'
+
+const codePush = new CodePush(token)
+
+codePush.getDeploymentHistory(androidName, 'Release').then(deployments => {
+    codePush.getDeploymentMetrics(androidName, 'Release').then(metrics => {
+        // console.log(deployments)
+        // console.log(metrics)
+        deployments.forEach(d => {
+            let m = metrics[d.label]
+            if (m) {
+                console.log(
+                    `${d.label} active: ${m.active}, downloaded: ${m.downloaded}, failed: ${m.failed}, installed: ${m.installed}`
+                )
+                codePush.patchRelease
+            }
+        })
+    })
+})

+ 3 - 1
src/components/ProductInfo.vue

@@ -53,7 +53,9 @@ import { useRouter } from 'vue-router'
 import { useSystemStore } from '../stores/system'
 import { accAdd, accMul } from '../plugins/calc'
 import toast from '@/utils/toast'
+import { useI18n } from 'vue-i18n'
 
+const { t } = useI18n()
 const props = defineProps({
     info: {
         type: Object,
@@ -86,7 +88,7 @@ const notStock = computed(() => {
 
 const goDetail = () => {
     if (notStock.value) {
-        toast(this.$t('common.notAvailable') + '...')
+        toast(t('common.notAvailable') + '...')
     } else {
         router.push({
             path: '/productDetail',

+ 3 - 1
src/components/ProductSmallInfo.vue

@@ -36,7 +36,9 @@ import { useRouter } from 'vue-router'
 import { useSystemStore } from '../stores/system'
 import { accAdd, accMul } from '../plugins/calc'
 import toast from '@/utils/toast'
+import { useI18n } from 'vue-i18n'
 
+const { t } = useI18n()
 const props = defineProps({
     info: {
         type: Object,
@@ -64,7 +66,7 @@ const notStock = computed(() => {
 const router = useRouter()
 const goDetail = () => {
     if (notStock.value) {
-        toast(this.$t('common.notAvailable') + '...')
+        toast(t('common.notAvailable') + '...')
     } else {
         router.push({
             path: '/productDetail',

+ 1 - 1
src/locales/en.json

@@ -82,7 +82,7 @@
         "more": "More",
         "news": "News",
         "noRecords": "No records",
-        "notAvailable": "Temporarily unavailable",
+        "notAvailable": "Unavailable",
         "open": "Open",
         "profit": "Commission",
         "pullRefresh": "Pull down to refresh",

+ 2 - 1
src/stores/user.js

@@ -18,7 +18,8 @@ async function logRegitraion(methods = 'username') {
         AppsFlyer.logEvent({
             eventName: 'af_complete_registration',
             eventValue: {
-                af_registration_method: methods
+                af_registration_method: methods,
+                af_currency: 'PHP'
             }
         })
     }

+ 4 - 8
src/views/ProductListPage.vue

@@ -43,17 +43,13 @@
                 @load="getData"
             >
                 <template v-if="listType === 'list'">
-                    <div class="product-list" v-for="(item, index) in list" :key="index">
-                        <product-info list v-model:info="list[index]" :stopOfficial="stopOfficial"></product-info>
+                    <div class="product-list" v-for="item in list" :key="item.id">
+                        <product-info list :info="item" :stopOfficial="stopOfficial"></product-info>
                     </div>
                 </template>
                 <template v-else>
-                    <div class="product" v-for="(item, index) in list" :key="index">
-                        <product-small-info
-                            list
-                            v-model:info="list[index]"
-                            :stopOfficial="stopOfficial"
-                        ></product-small-info>
+                    <div class="product" v-for="item in list" :key="item.id">
+                        <product-small-info list :info="item" :stopOfficial="stopOfficial"></product-small-info>
                     </div>
                 </template>
             </van-list>