xiongzhu 3 gadi atpakaļ
vecāks
revīzija
010bf24446

BIN
android/app/src/main/assets/cdvasset.manifest


+ 1 - 1
android/capacitor.settings.gradle

@@ -57,4 +57,4 @@ include ':appsflyer-capacitor-plugin'
 project(':appsflyer-capacitor-plugin').projectDir = new File('../node_modules/appsflyer-capacitor-plugin/android')
 
 include ':capacitor-codepush'
-project(':capacitor-codepush').projectDir = new File('../node_modules/capacitor-codepush/android')
+project(':capacitor-codepush').projectDir = new File('../../../capacitor/capacitor-codepush/android')

+ 0 - 2
capacitor.config.json

@@ -19,9 +19,7 @@
         },
         "CodePush": {
             "IOS_DEPLOY_KEY": "eAdEIJJkMhuRwBKVpDXvbay6Ay0yEJAbzi0Ur",
-            "IOS_PUBLIC_KEY": "APP_SECRET_KEY",
             "ANDROID_DEPLOY_KEY": "ZrEsHcngd89oYtHZYQxLRUSMJ8trafzoNUVDN",
-            "ANDROID_PUBLIC_KEY": "APP_SECRET_KEY",
             "SERVER_URL": "https://codepush.appcenter.ms/"
         }
     }

+ 2 - 1
ios/App/Podfile

@@ -20,6 +20,7 @@ def capacitor_pods
   pod 'CapacitorCamera', :path => '../../node_modules/@capacitor/camera'
   pod 'CapacitorClipboard', :path => '../../node_modules/@capacitor/clipboard'
   pod 'CapacitorDevice', :path => '../../node_modules/@capacitor/device'
+  pod 'CapacitorDialog', :path => '../../node_modules/@capacitor/dialog'
   pod 'CapacitorFilesystem', :path => '../../node_modules/@capacitor/filesystem'
   pod 'CapacitorHaptics', :path => '../../node_modules/@capacitor/haptics'
   pod 'CapacitorKeyboard', :path => '../../node_modules/@capacitor/keyboard'
@@ -28,7 +29,7 @@ def capacitor_pods
   pod 'CapacitorSplashScreen', :path => '../../node_modules/@capacitor/splash-screen'
   pod 'CapacitorStatusBar', :path => '../../node_modules/@capacitor/status-bar'
   pod 'AppsflyerCapacitorPlugin', :path => '../../node_modules/appsflyer-capacitor-plugin'
-  pod 'CapacitorCodepush', :path => '../../node_modules/capacitor-codepush'
+  pod 'CapacitorCodepush', :path => '../../../../capacitor/capacitor-codepush'
 end
 
 target 'App' do

+ 1 - 1
jsconfig.json

@@ -1 +1 @@
-{}
+{}

+ 1 - 1
package.json

@@ -38,7 +38,7 @@
     "@vueuse/core": "^9.6.0",
     "appsflyer-capacitor-plugin": "^6.9.2",
     "axios": "^1.2.0",
-    "capacitor-codepush": "https://github.com/mapiacompany/capacitor-codepush",
+    "capacitor-codepush": "link:/Users/drew/Projects/capacitor/capacitor-codepush",
     "cordova-plugin-android-notch": "^1.0.3",
     "date-fns": "^2.29.3",
     "eruda": "^2.6.1",

+ 3 - 0
pushIOS.sh

@@ -0,0 +1,3 @@
+yarn build --mode=app
+npx cap sync ios
+appcenter codepush release -a  da736134-gmail.com/ASNFTNGFHP-iOS -c ios/App/App/public/ -t '~1.0.0' -d Release

+ 0 - 589
src/components/OrderInfo.vue

@@ -1,589 +0,0 @@
-<template>
-    <div class="order-info">
-        <div class="order-top">
-            <div class="order-no">订单编号:{{ info.id }}</div>
-            <div class="order-staus">
-                {{ info.locked && info.status === 'SELLING' ? '暂停出售' : orderStatus[info.status] }}
-            </div>
-        </div>
-
-        <div class="order-content" @click="goDetail">
-            <van-image class="suk-img" width="80" height="80" fit="fill" :src="pic" />
-
-            <div class="order-text">
-                <div class="van-ellipsis text1">{{ productInfo.name }}</div>
-
-                <div class="text2" v-if="productInfo.user">当前所有人为:{{ productInfo.user.nickname }}</div>
-
-                <div class="text3">
-                    <div class="price">¥{{ info.totalPrice }}</div>
-                    <div class="num">×1</div>
-                </div>
-            </div>
-        </div>
-
-        <div class="order-price">
-            <div class="price">
-                <span>实际支付:</span>
-                <span>¥{{ info.totalPrice }}</span>
-            </div>
-
-            <div class="order-tips" v-if="info.status == 'NOT_PAID'">付款倒计时过期自动取消订单 {{ times }}</div>
-        </div>
-
-        <div class="order-button">
-            <span class="problem" @click="problem">遇到问题?</span>
-            <template v-if="info.status == 'NOT_PAID'">
-                <!-- <van-button color="#FF8F00" round plain size="small" @click="confirmPayment">我已付款</van-button> -->
-                <van-button type="primary" round size="small" @click="pay">立即支付</van-button>
-            </template>
-
-            <template v-else-if="info.status == 'NOT_CONFIRMED'">
-                <van-button color="#AAACAD" round plain size="small" @click="goDetail">查看订单</van-button>
-            </template>
-
-            <template v-else-if="info.status == 'SOLD_NOT_CONFIRMED'">
-                <!-- <van-button color="#AAACAD" round plain size="small" @click="confirmPayment">未收到款</van-button> -->
-                <!-- <van-button type="primary" round size="small" @click="confirmReceipt">确认收款</van-button> -->
-            </template>
-
-            <template v-else-if="info.status == 'SELLING'">
-                <!-- <van-button color="#AAACAD" round plain size="small" @click="confirmPayment">未收到款</van-button> -->
-                <!-- <van-button type="primary" round size="small" @click="confirmReceipt">确认收款</van-button> -->
-                <van-button color="#AAACAD" round plain size="small" @click="applyShip">申请发货</van-button>
-                <van-button color="#AAACAD" round plain size="small" @click="goDetail">查看订单</van-button>
-            </template>
-
-            <template v-else-if="info.status == 'CONFIRMED'">
-                <van-button color="#AAACAD" round plain size="small" @click="applyShip">申请发货</van-button>
-                <van-button type="primary" round size="small" @click="show = true" v-if="delegationActive">
-                    委托代卖</van-button
-                >
-                <van-button color="#aaacad" round @click="showTip" v-else>委托代卖 </van-button>
-            </template>
-
-            <template v-else-if="info.status == 'SOLD'">
-                <van-button color="#AAACAD" round plain size="small" @click="goDetail">查看订单</van-button>
-            </template>
-            <template v-else-if="info.status == 'NOT_SHIPPED'">
-                <van-button color="#AAACAD" round plain size="small" @click="goDetail">查看订单</van-button>
-            </template>
-            <template v-else-if="info.status == 'RECEIVED'">
-                <van-button color="#AAACAD" round plain size="small" @click="goDetail">查看订单</van-button>
-            </template>
-            <template v-else-if="info.status == 'SHIPPED'">
-                <van-button type="primary" round size="small" @click="receive"> 确认收货</van-button>
-            </template>
-        </div>
-        <van-popup v-model="show" class="getsold">
-            <div class="title">委托代卖</div>
-            <div class="sold-list">
-                <div class="sold-item">
-                    <div class="name">原价</div>
-                    <div class="val">¥{{ info.totalPrice }}</div>
-                </div>
-                <div class="sold-item">
-                    <div class="name">加价</div>
-                    <van-stepper v-model="value" input-width="60px" step="1" integer min="1" :max="maxRiseRate" />
-                </div>
-                <div class="sold-item">
-                    <div class="name">卖价</div>
-                    <div class="val bold">¥{{ soldValue }}</div>
-                </div>
-            </div>
-            <div class="tips">
-                注:委托平台代卖服务,每次最高可将商品价格提高{{ maxRiseRate }}%,平台会收取{{
-                    serviceValue
-                }}%的托管服务费用
-            </div>
-
-            <van-button class="button" block type="primary" :disabled="loading" round @click="sale">
-                支付手续费 ¥{{ serviceCharge }}
-            </van-button>
-        </van-popup>
-    </div>
-</template>
-<script>
-import { mapState } from 'pinia'
-import { useUserStore } from '@/stores/user'
-import { orderStatus } from '../status'
-import { differenceInSeconds, addMinutes, parse } from 'date-fns'
-export default {
-    name: 'orderInfo',
-    props: {
-        info: {
-            type: Object,
-            default: () => {
-                return {}
-            }
-        },
-        delegationActive: {
-            type: Boolean,
-            default: true
-        },
-        delegationTime: {
-            type: String,
-            default: ''
-        }
-    },
-    data() {
-        return {
-            orderStatus,
-            times: 0,
-            show: false,
-            value: 6,
-            platformCommission: 0.02,
-            maxRiseRate: 6,
-            loading: false,
-            payType: 'balance'
-        }
-    },
-    computed: {
-        ...mapState(useUserStore, ['user']),
-        productInfo() {
-            return this.info.productInfo || {}
-        },
-        pic() {
-            if (this.productInfo.pic && this.productInfo.pic.length > 0) {
-                return this.productInfo.pic[0]
-            } else {
-                return ''
-            }
-        },
-        fromUserInfo() {
-            return this.info.fromUserInfo || {}
-        },
-        soldValue() {
-            var price = Number(this.info.totalPrice)
-            if (this.value) {
-                var more = this.mul(this.value, price)
-                more = this.mul(more, 0.01)
-                price = this.addNum(more, price)
-            }
-            return price.toFixed(2)
-        },
-        serviceCharge() {
-            let totalPrice = this.info ? this.info.totalPrice || 0 : 0
-            return (totalPrice * this.platformCommission).toFixed(2)
-        },
-        serviceValue() {
-            return this.platformCommission * 100
-        }
-    },
-    created() {
-        if (this.info.status == 'NOT_PAID') {
-            this.getTime()
-        }
-        this.$http.get('/sysConfig/get/platform_commission').then(res => {
-            this.platformCommission = res.value
-        })
-        this.$http.get('/sysConfig/get/max_rise_rate').then(res => {
-            this.maxRiseRate = res.value * 100
-            this.value = this.maxRiseRate
-        })
-        // this.$http.get('/sysConfig/get/pay_type').then(res => {
-        //     if (res.value == '0') {
-        //         if (this.isWeixin) {
-        //             this.payType = 'weixin';
-        //         } else {
-        //             this.payType = 'alipay';
-        //         }
-        //     } else {
-        //         this.payType = 'third';
-        //     }
-        // });
-    },
-    methods: {
-        goDetail() {
-            this.goNext('orderDetail', {
-                id: this.info.id
-            })
-        },
-        getTime() {
-            var times = differenceInSeconds(
-                addMinutes(parse(this.info.createdAt, 'yyyy-MM-dd HH:mm:ss', new Date()), 30),
-                new Date()
-            )
-            if (times <= 0) {
-                times = 0
-            }
-            var mint = parseInt(times / 60)
-            var seconds = parseInt(times % 60)
-            this.times = mint + '分 ' + seconds + '秒'
-            if (!times) {
-                return
-            }
-            setTimeout(this.getTime, 1000)
-        },
-        confirmPayment() {
-            this.$http
-                .post('/order/confirmPayment', {
-                    orderId: this.info.id
-                })
-                .then(res => {
-                    this.$toast.success('确认成功')
-                    setTimeout(() => {
-                        this.$emit('updateOrder', res)
-                    }, 1000)
-                })
-                .catch(e => {
-                    return this.$toast.error(e.error)
-                })
-        },
-        confirmReceipt() {
-            this.$http
-                .post('/order/confirmReceipt', {
-                    orderId: this.info.id
-                })
-                .then(res => {
-                    this.$toast.success('确认成功')
-                    setTimeout(() => {
-                        this.$emit('updateOrder', res)
-                    }, 1000)
-                })
-                .catch(e => {
-                    return this.$toast.error(e.error)
-                })
-        },
-        addNum(a, b) {
-            var c, d, e
-            try {
-                c = a.toString().split('.')[1].length
-            } catch (f) {
-                c = 0
-            }
-            try {
-                d = b.toString().split('.')[1].length
-            } catch (f) {
-                d = 0
-            }
-            return (e = Math.pow(10, Math.max(c, d))), (this.mul(a, e) + this.mul(b, e)) / e
-        },
-        mul(a, b) {
-            var c = 0,
-                d = a.toString(),
-                e = b.toString()
-            try {
-                c += d.split('.')[1].length
-            } catch (f) {
-                // eslint-disable-next-line no-empty
-            }
-            try {
-                c += e.split('.')[1].length
-            } catch (f) {
-                // eslint-disable-next-line no-empty
-            }
-            return (Number(d.replace('.', '')) * Number(e.replace('.', ''))) / Math.pow(10, c)
-        },
-        sale() {
-            this.show = false
-            if (this.payType === 'alipay') {
-                window.open(
-                    this.$baseUrl +
-                        `/payDelegation/alipay?userId=${this.user.id}&orderId=${this.info.id}&riseRate=${
-                            this.value / 100
-                        }&returnUrl=${encodeURIComponent(location.href)}`
-                )
-            } else if (this.payType === 'third') {
-                window.open(
-                    this.$baseUrl +
-                        `/payDelegation/third?userId=${this.user.id}&orderId=${this.info.id}&riseRate=${
-                            this.value / 100
-                        }&payType=` +
-                        (this.isWeixin ? 'WXGZH' : 'ZFBH5')
-                )
-            } else if (this.payType === 'weixin') {
-                this.loading = true
-                this.$toast.loading({
-                    mask: false,
-                    message: '加载中...',
-                    duration: 0,
-                    forbidClick: true
-                })
-                this.$http
-                    .get('/payDelegation/wx', {
-                        userId: this.user.id,
-                        orderId: this.info.id,
-                        riseRate: this.value / 100
-                    })
-                    .then(res => {
-                        this.$toast.dismiss()
-                        this.loading = false
-                        wx.chooseWXPay({
-                            appId: res.appId,
-                            timestamp: res.timeStamp,
-                            nonceStr: res.nonceStr,
-                            package: res.packageValue,
-                            signType: res.signType,
-                            paySign: res.paySign,
-                            success(res) {
-                                this.$toast.success('支付成功')
-                            }
-                        })
-                    })
-                    .catch(e => {
-                        this.$toast.dismiss()
-                        this.loading = false
-                        return this.$toast.error(e.error)
-                    })
-            } else if (this.payType === 'balance') {
-                this.$toast.loading('支付中')
-                this.$http
-                    .post('/payDelegation/balance', {
-                        userId: this.user.id,
-                        orderId: this.info.id,
-                        riseRate: this.value / 100
-                    })
-                    .then(res => {
-                        this.$toast.success('支付成功')
-                        this.$emit('updateOrder', res)
-                    })
-                    .catch(e => {
-                        this.$toast.error(e.error)
-                    })
-            }
-        },
-        applyShip() {
-            this.$dialog
-                .confirm({
-                    title: '提示',
-                    message: '确认申请发货?'
-                })
-                .then(() => {
-                    this.$http
-                        .post('/order/applyShip', {
-                            orderId: this.info.id
-                        })
-                        .then(res => {
-                            this.$toast.success('申请成功')
-                            setTimeout(() => {
-                                this.$emit('updateOrder', res)
-                            }, 1000)
-                        })
-                        .catch(e => {
-                            return this.$toast.error(e.error)
-                        })
-                })
-                .catch(() => {})
-        },
-        receive() {
-            this.$http
-                .post('/order/receive', {
-                    orderId: this.info.id
-                })
-                .then(res => {
-                    this.$toast.success('确认成功')
-                    setTimeout(() => {
-                        this.$emit('updateOrder', res)
-                    }, 1000)
-                })
-                .catch(e => {
-                    return this.$toast.error(e.error)
-                })
-        },
-        pay() {
-            this.$toast.loading('支付中')
-            this.$http
-                .post('/order/balancePay', { orderId: this.orderInfo.id })
-                .then(res => {
-                    this.$toast.success('支付成功')
-                    setTimeout(() => {
-                        this.getInfo()
-                    }, 1000)
-                })
-                .catch(e => {
-                    this.$toast.error(e.error)
-                })
-        },
-        showTip() {
-            this.$dialog.alert({
-                title: '提示',
-                message: '委托代卖暂未开始,将在今天' + this.delegationTime + '开始'
-            })
-        },
-        problem() {
-            this.$router.push({
-                name: 'workOrderction',
-                query: {
-                    orderId: this.info.id
-                },
-                params: {
-                    isNext: true
-                }
-            })
-        }
-    }
-}
-</script>
-<style lang="less" scoped>
-.order-info {
-    padding: 0 15px;
-    background: rgba(var(--ion-text-color-rgb), 1);
-    border-radius: 2px;
-}
-.order-top {
-    display: flex;
-    justify-content: space-between;
-    height: 43px;
-    align-items: center;
-
-    .order-staus {
-        color: #ff8f00;
-        font-size: 13px;
-        font-weight: bold;
-    }
-}
-
-.text1 {
-    font-size: 14px;
-    color: rgba(var(--ion-color-light-contrast-rgb), 1);
-    line-height: 20px;
-}
-
-.text2 {
-    font-size: 12px;
-    color: rgba(255, 143, 0, 1);
-    line-height: 22px;
-    height: 22px;
-    background: rgba(255, 143, 0, 0.12);
-    border-radius: 2px 100px 100px 100px;
-    padding: 0 8px;
-    margin-top: 5px;
-    display: inline-block;
-}
-
-.text3 {
-    display: flex;
-    align-items: center;
-    justify-content: space-between;
-    margin-top: 13px;
-
-    .price {
-        font-size: 14px;
-        font-weight: bold;
-        color: rgba(var(--ion-color-light-contrast-rgb), 1);
-        line-height: 20px;
-    }
-
-    .num {
-        font-size: 14px;
-        color: rgba(170, 172, 173, 1);
-        line-height: 20px;
-    }
-}
-.order-content {
-    display: flex;
-    padding-top: 10px;
-    border-top: 1px solid var(--ion-background-color);
-
-    .order-text {
-        margin-left: 10px;
-        flex-grow: 1;
-        overflow: hidden;
-    }
-}
-
-.order-price {
-    text-align: right;
-
-    .price {
-        font-size: 12px;
-        color: rgba(102, 102, 102, 1);
-        line-height: 17px;
-        margin-top: 18px;
-        span {
-            &:last-child {
-                font-size: 16px;
-                font-weight: bold;
-                color: rgba(255, 59, 48, 1);
-                line-height: 22px;
-            }
-        }
-    }
-    .order-tips {
-        font-size: 12px;
-        color: rgba(255, 143, 0, 1);
-        line-height: 17px;
-        margin-top: 8px;
-    }
-}
-
-.order-button {
-    padding: 15px 0;
-    display: flex;
-    justify-content: flex-end;
-    align-items: center;
-    border-top: 1px solid #f2f4f5;
-    margin-top: 15px;
-
-    .van-button {
-        margin-left: 10px;
-        height: 28px;
-    }
-    .problem {
-        flex-grow: 1;
-        text-align: left;
-        font-size: 12px;
-        font-weight: 400;
-        color: rgba(170, 172, 173, 1);
-    }
-}
-.getsold {
-    width: 300px;
-    height: 405px;
-    background: rgba(var(--ion-text-color-rgb), 1);
-    border-radius: 4px;
-    padding: 15px 20px;
-    box-sizing: border-box;
-    .title {
-        font-size: 16px;
-        font-weight: bold;
-        text-align: center;
-        color: rgba(var(--ion-color-light-contrast-rgb), 1);
-        line-height: 22px;
-    }
-
-    .sold-item {
-        display: flex;
-        align-items: center;
-        height: 28px;
-        padding: 22px 0 10px;
-        border-bottom: 1px solid #f2f4f5;
-        .name {
-            font-size: 18px;
-            font-weight: bold;
-            color: rgba(var(--ion-color-light-contrast-rgb), 1);
-            line-height: 25px;
-            min-width: 82px;
-        }
-
-        .val {
-            font-size: 14px;
-            font-weight: bold;
-            color: rgba(var(--ion-color-light-contrast-rgb), 1);
-            line-height: 20px;
-
-            &.bold {
-                font-size: 16px;
-                color: rgba(255, 59, 48, 1);
-                line-height: 22px;
-            }
-        }
-    }
-    .sold-list {
-        margin-top: 10px;
-    }
-    .tips {
-        font-size: 13px;
-        color: rgba(170, 172, 173, 1);
-        line-height: 18px;
-        margin-top: 20px;
-    }
-
-    .button {
-        width: 200px;
-        display: block;
-        margin: 50px auto 0;
-    }
-}
-</style>

+ 7 - 6
src/components/OrderItem.vue

@@ -134,6 +134,7 @@ import { useUserStore } from '@/stores/user'
 import { useSystemStore } from '@/stores/system'
 import { orderStatus } from '../status'
 import { differenceInSeconds, addMinutes, parse } from 'date-fns'
+import { showDialog } from 'vant'
 
 export default {
     name: 'orderInfo',
@@ -346,7 +347,7 @@ export default {
                             signType: res.signType,
                             paySign: res.paySign,
                             success(res) {
-                                this.$toast.success('支付成功')
+                                this.$toast.success(this.$t('order.paySuccess'))
                             }
                         })
                     })
@@ -356,7 +357,7 @@ export default {
                         return this.$toast.error(e.error)
                     })
             } else if (this.payType === 'balance') {
-                this.$toast.loading('支付中')
+                this.$toast.loading(this.$t('order.paying'))
                 this.$http
                     .post('/payDelegation/balance', {
                         userId: this.user.id,
@@ -364,7 +365,7 @@ export default {
                         riseRate: this.riseRatePercent / 100
                     })
                     .then(res => {
-                        this.$toast.success('支付成功')
+                        this.$toast.success(this.$t('order.paySuccess'))
                         this.$emit('updateOrder', res)
                     })
                     .catch(e => {
@@ -411,11 +412,11 @@ export default {
                 })
         },
         pay() {
-            this.$toast.loading('支付中')
+            this.$toast.loading(this.$t('order.paying'))
             this.$http
                 .post('/order/balancePay', { orderId: this.info.id })
                 .then(res => {
-                    this.$toast.success('支付成功')
+                    this.$toast.success(this.$t('order.paySuccess'))
                     setTimeout(() => {
                         this.getInfo()
                     }, 1000)
@@ -425,7 +426,7 @@ export default {
                 })
         },
         showTip() {
-            this.$dialog.alert({
+            showDialog({
                 title: this.$t('common.alert'),
                 message: this.$t('delegate.tip', { time: this.delegationTime })
             })

+ 5 - 3
src/locales/en.json

@@ -16,7 +16,7 @@
         },
         "symbol": "$",
         "totalWithdraw": "Cumulative withdrawal",
-        "unit": "Yuan",
+        "unit": "PHP",
         "withdraw": "withdraw",
         "withdrawAmount": "Withdrawal Amount",
         "withdrawAmountError": "Please enter the correct withdrawal amount",
@@ -178,7 +178,7 @@
             "SOLD_NOT_CONFIRMED": "To be confirmed receipt",
             "SOLD_NOT_PAID": "pending buyer payment"
         },
-        "total": "total",
+        "total": "Total",
         "totalPayment": "actual payment",
         "walletPay": "wallet payment",
         "applyShip": "Apply for delivery",
@@ -189,7 +189,9 @@
         "viewOrder": "check order",
         "mint": "Minute",
         "second": "Second",
-        "stopSale": "Suspension of sale"
+        "stopSale": "Suspension of sale",
+        "paySuccess": "Payment successful",
+        "paying": "Payment in progress"
     },
     "product": {
         "dailyEarning": "Daily Income",

+ 3 - 1
src/locales/zh.json

@@ -84,7 +84,9 @@
         "viewOrder": "查看订单",
         "applyShip": "申请发货",
         "confirmReceipt": "确认收货",
-        "hasProblem": "遇到问题?"
+        "hasProblem": "遇到问题?",
+        "paySuccess": "支付成功",
+        "paying": "支付中"
     },
     "balance": {
         "symbol": "¥",

+ 36 - 4
src/main.js

@@ -21,7 +21,8 @@ import { Locale } from 'vant'
 import vantEnUS from 'vant/es/locale/lang/en-US'
 import { useStorage } from '@vueuse/core'
 import { init as initEruda } from '@/utils/console'
-import { codePush } from 'capacitor-codepush'
+import { codePush, InstallMode } from 'capacitor-codepush'
+import { Network } from '@capacitor/network'
 
 import 'normalize.css/normalize.css'
 
@@ -81,9 +82,9 @@ document.addEventListener('online', () => {
 document.addEventListener('deviceready', () => {
     console.log('deviceready')
     if (Capacitor.isNativePlatform()) {
-        StatusBar.setOverlaysWebView({ overlay: true })
         StatusBar.setStyle({ style: Style.Dark })
         if (Capacitor.getPlatform() === 'android') {
+            StatusBar.setOverlaysWebView({ overlay: true })
             const style = document.documentElement.style
 
             window.AndroidNotch.getInsetTop(
@@ -144,8 +145,38 @@ document.addEventListener('deviceready', () => {
             SplashScreen.hide()
         }, 1000)
         window.codePush = codePush
-        codePush.sync({}).then(status => {
-            console.log('codePush sync status:', status)
+        window.InstallMode = InstallMode
+        const checkUpdate = () => {
+            codePush
+                .sync(
+                    {
+                        updateDialog: true,
+                        installMode: InstallMode.IMMEDIATE,
+                        ignoreFailedUpdates: false
+                    },
+                    downloadProgress => {
+                        if (downloadProgress) {
+                            console.log(
+                                `Downloading ${downloadProgress.receivedBytes} of ${downloadProgress.totalBytes}`
+                            )
+                        }
+                    }
+                )
+                .then(status => {
+                    console.log('codePush sync status:', status)
+                })
+        }
+        Network.addListener('networkStatusChange', status => {
+            console.log('networkStatusChange:', status)
+            if (status.connected) {
+                //checkUpdate()
+            }
+        })
+        Network.getStatus().then(status => {
+            console.log('networkStatus:', status)
+            if (status.connected) {
+                checkUpdate()
+            }
         })
     }
 })
@@ -153,3 +184,4 @@ document.addEventListener('deviceready', () => {
 if (useStorage('showConsole', 0).value > new Date().getTime()) {
     initEruda()
 }
+console.log(7)

+ 1 - 0
src/router/index.js

@@ -28,6 +28,7 @@ const router = createRouter({
                 {
                     path: '',
                     redirect: '/home',
+                    name: 'redirect',
                     meta: {
                         allowGuest: true
                     }

+ 2 - 2
src/styles/common.less

@@ -7,9 +7,9 @@
     display: flex;
     flex-direction: column;
 }
-
+@primary-gradient: linear-gradient(90deg, #dfffcd 0%, #90f9c4 48%, #39f3bb 100%);
 .gt() {
-    background: linear-gradient(90deg, #dfffcd 0%, #90f9c4 48%, #39f3bb 100%);
+    background: @primary-gradient;
     background-clip: text;
     -webkit-background-clip: text;
     -webkit-text-fill-color: transparent;

+ 2 - 2
src/styles/main.less

@@ -82,7 +82,7 @@ ion-modal.dialog {
     color: var(--ion-color-step-400) !important;
 }
 .van-button--primary {
-    background: linear-gradient(90deg, #dfffcd 0%, #91fac5 48%, #39f3bb 100%);
+    background: @primary-gradient;
     color: #000000;
     border: none;
 }
@@ -94,7 +94,7 @@ ion-modal.dialog {
     --van-button-normal-font-size: 14px;
 }
 .gt {
-    background: linear-gradient(90deg, #dfffcd 0%, #90f9c4 48%, #39f3bb 100%);
+    background: @primary-gradient;
     background-clip: text;
     -webkit-background-clip: text;
     -webkit-text-fill-color: transparent;

+ 7 - 7
src/views/OrderDetailPage.vue

@@ -305,8 +305,8 @@ export default {
     methods: {
         showTip() {
             showDialog({
-                title: '提示',
-                message: '委托代卖暂未开始,将在今天' + this.delegationTime + '开始'
+                title: this.$t('common.alert'),
+                message: this.$t('delegate.tip', { time: this.delegationTime })
             }).then(() => {})
         },
         getInfo() {
@@ -435,7 +435,7 @@ export default {
                             signType: res.signType,
                             paySign: res.paySign,
                             success(res) {
-                                this.$toast.success('支付成功')
+                                this.$toast.success(this.$t('order.paySuccess'))
                             }
                         })
                     })
@@ -445,7 +445,7 @@ export default {
                         return this.$toast.error(e.error)
                     })
             } else if (this.payType === 'balance') {
-                this.$toast.loading('支付中')
+                this.$toast.loading(this.$t('order.paying'))
                 this.$http
                     .post('/payDelegation/balance', {
                         userId: this.user.id,
@@ -453,7 +453,7 @@ export default {
                         riseRate: this.riseRatePercent / 100
                     })
                     .then(res => {
-                        this.$toast.success('支付成功')
+                        this.$toast.success(this.$t('order.paySuccess'))
                         this.getInfo()
                     })
                     .catch(e => {
@@ -512,11 +512,11 @@ export default {
                 })
         },
         pay() {
-            this.$toast.loading('支付中')
+            this.$toast.loading(this.$t('order.paying'))
             this.$http
                 .post('/order/balancePay', { orderId: this.orderInfo.id })
                 .then(res => {
-                    this.$toast.success('支付成功')
+                    this.$toast.success(this.$t('order.paySuccess'))
                     setTimeout(() => {
                         this.getInfo()
                     }, 1000)

+ 14 - 11
src/views/ProductDetailPage.vue

@@ -118,12 +118,12 @@
             <ion-content :style="{ height: `${breakpoint * 100}%` }">
                 <div class="head">
                     <div class="title">{{ $t('order.payInfo') }}</div>
-                    <div class="close" @click="showWithdrawModal = false">
-                        <img src="@/assets/icon_close.svg" />
+                    <div class="close" @click="showPayModal = false">
+                        <ion-icon :icon="closeOutline" />
                     </div>
                 </div>
                 <div class="price-box">
-                    <div class="label">{{ $t('order.total') }}({{ $t('balance.unit') }})</div>
+                    <div class="label">{{ $t('order.total') }}&nbsp;({{ $t('balance.unit') }})</div>
                     <div class="value">{{ info.currentPrice }}</div>
                 </div>
                 <div class="divider"></div>
@@ -156,6 +156,7 @@ import { useSystemStore } from '../stores/system'
 import { accAdd, accMul } from '../plugins/calc'
 import ProductBanner from '../components/ProductBanner.vue'
 import ProductTitle from '../components/ProductTitle.vue'
+import { closeOutline } from 'ionicons/icons'
 
 const route = useRoute()
 const router = useRouter()
@@ -501,17 +502,19 @@ ion-footer {
         padding-left: 16px;
         border-bottom: 1px solid var(--ion-color-step-50);
         font-size: 14px;
+        height: 44px;
+        padding-top: 5px;
         .title {
             flex-grow: 1;
             color: var(--ion-color-text);
-            padding: 16px 0 10px 0;
+            line-height: 32px;
         }
         .close {
-            padding: 16px 16px 10px 0;
-            img {
-                width: 24px;
-                height: 24px;
-            }
+            font-size: 18px;
+            height: 32px;
+            .f();
+            justify-content: center;
+            padding: 0 16px;
         }
     }
     .price-box {
@@ -561,8 +564,8 @@ ion-footer {
         }
     }
     :deep(.van-checkbox__icon--checked .van-icon) {
-        background: linear-gradient(135deg, #a108ff 0%, #5c7cff 100%);
-        border-color: var(--ion-color-step-0);
+        background: @primary-gradient;
+        color: black;
     }
 }
 .dark .pay-modal {

+ 4 - 1
vite.config.js

@@ -10,7 +10,10 @@ export default defineConfig(({ command, mode }) => {
     return {
         base: process.env.VITE_BASE_URL,
         server: {
-            host: '0.0.0.0'
+            host: '0.0.0.0',
+            fs: {
+                strict: false
+            }
         },
         plugins: [
             vue(),

+ 3 - 5
yarn.lock

@@ -2090,11 +2090,9 @@ caniuse-lite@^1.0.30001400:
   resolved "https://registry.npmmirror.com/caniuse-lite/-/caniuse-lite-1.0.30001442.tgz#40337f1cf3be7c637b061e2f78582dc1daec0614"
   integrity sha512-239m03Pqy0hwxYPYR5JwOIxRJfLTWtle9FV8zosfV5pHg+/51uD4nxcUlM8+mWWGfwKtt8lJNHnD3cWw9VZ6ow==
 
-"capacitor-codepush@https://github.com/mapiacompany/capacitor-codepush":
-  version "1.0.0"
-  resolved "https://github.com/mapiacompany/capacitor-codepush#037174d2c00fa1a095f1ed2a445a31ccd70815df"
-  dependencies:
-    code-push "^4.0.2"
+"capacitor-codepush@link:../../capacitor/capacitor-codepush":
+  version "0.0.0"
+  uid ""
 
 caw@^2.0.0, caw@^2.0.1:
   version "2.0.1"