Browse Source

购买&价格区间

panhui 2 years ago
parent
commit
ca2821012d
4 changed files with 612 additions and 340 deletions
  1. 337 329
      src/locales/en.json
  2. 11 3
      src/locales/zh.json
  3. 21 2
      src/views/HomePage.vue
  4. 243 6
      src/views/MinePage.vue

+ 337 - 329
src/locales/en.json

@@ -1,335 +1,343 @@
 {
-  "balance": {
-    "availableWidthdrawAmount": "Amount that can be withdrawn",
-    "balance": "Account Balance",
-    "credits": "Credits",
-    "totalRechargeAmount": "Total Recharge Amount",
-    "chooseAmount": "Choose Amount",
-    "confirmWithdraw": "Confirm withdrawal",
-    "inputCustomAmount": "Enter a custom amount",
-    "realReceipt": "Actual Arrival Amount",
-    "recharge": "Recharge",
-    "rechargeMax": "The maximum recharge amount is {value}",
-    "rechargeMin": "The minimum recharge amount is {value}",
-    "rechargeSuccess": "Recharge successful",
-    "record": {
-      "commission": "Commission",
-      "pay": "Pay",
-      "receipt": "Receipt",
-      "recharge": "Recharge",
-      "redeem": "Redeem",
-      "return": "Return",
-      "stake": "Stake",
-      "withdraw": "Withdraw",
-      "bonus": "Bonus"
+    "balance": {
+        "availableWidthdrawAmount": "Amount that can be withdrawn",
+        "balance": "Account Balance",
+        "credits": "Credits",
+        "totalRechargeAmount": "Total Recharge Amount",
+        "chooseAmount": "Choose Amount",
+        "confirmWithdraw": "Confirm withdrawal",
+        "inputCustomAmount": "Enter a custom amount",
+        "realReceipt": "Actual Arrival Amount",
+        "recharge": "Recharge",
+        "rechargeMax": "The maximum recharge amount is {value}",
+        "rechargeMin": "The minimum recharge amount is {value}",
+        "rechargeSuccess": "Recharge successful",
+        "record": {
+            "commission": "Commission",
+            "pay": "Pay",
+            "receipt": "Receipt",
+            "recharge": "Recharge",
+            "redeem": "Redeem",
+            "return": "Return",
+            "stake": "Stake",
+            "withdraw": "Withdraw",
+            "bonus": "Bonus"
+        },
+        "symbol": "₱",
+        "totalWithdraw": "Total withdrawal",
+        "unit": "PHP",
+        "withdraw": "Withdraw",
+        "withdrawAmount": "Withdrawal Amount",
+        "withdrawAmountError": "Enter the correct withdrawal amount",
+        "insufficientBalance": "Insufficient balance",
+        "withdrawMin": "The minimum withdrawal amount is {value}",
+        "withdrawFee": "Withdrawal fee",
+        "withdrawFeeTip": "Note: A service fee of <span class=\"rate2\">{rate2}</span> will be charged for withdrawals. If your credits reaches <span class=\"factor\">{factor}</span> times the total recharge amount, a super low service fee of <span class=\"rate1\">{rate1}</span> can be enjoyed.",
+        "withdrawing": "Withdrawing",
+        "withdrawInputTip": "Enter the withdrawal amount",
+        "withdrawModalTitle": "Apply for withdrawal",
+        "withdrawSuccess": "Withdrawal request has been submitted and is expected to arrive within 24 hours"
     },
-    "symbol": "₱",
-    "totalWithdraw": "Total withdrawal",
-    "unit": "PHP",
-    "withdraw": "Withdraw",
-    "withdrawAmount": "Withdrawal Amount",
-    "withdrawAmountError": "Enter the correct withdrawal amount",
-    "insufficientBalance": "Insufficient balance",
-    "withdrawMin": "The minimum withdrawal amount is {value}",
-    "withdrawFee": "Withdrawal fee",
-    "withdrawFeeTip": "Note: A service fee of <span class=\"rate2\">{rate2}</span> will be charged for withdrawals. If your credits reaches <span class=\"factor\">{factor}</span> times the total recharge amount, a super low service fee of <span class=\"rate1\">{rate1}</span> can be enjoyed.",
-    "withdrawing": "Withdrawing",
-    "withdrawInputTip": "Enter the withdrawal amount",
-    "withdrawModalTitle": "Apply for withdrawal",
-    "withdrawSuccess": "Withdrawal request has been submitted and is expected to arrive within 24 hours"
-  },
-  "bank": {
-    "account": "Account",
-    "addBankCard": "Add Bank Account",
-    "bank": "Bank",
-    "deleteBankCard": "Delete Bank Account",
-    "deletePrompt": "This account won't be able to added again until 7 days later, are you sure to delete it?",
-    "deleteSuccess": "Bank account deleted successfully",
-    "editBankCard": "Edit Bank Account",
-    "invalidAccount": "Invalid Account",
-    "invalidBank": "Invalid Bank",
-    "invalidMail": "Invalid Mail",
-    "invalidName": "Invalid Name",
-    "invalidPhone": "Invalid Phone Number",
-    "mail": "Mail",
-    "name": "Name",
-    "phone": "Phone Number",
-    "saveBankCard": "Save Bank Account",
-    "selectBank": "Select Bank",
-    "invalidCard": "Invalid Account"
-  },
-  "blf": {
-    "buy": "STAKE NOW",
-    "buying": "STAKING",
-    "computing": "Calculating Profit",
-    "end": "Activity has ended",
-    "finish": "sold out",
-    "has": "Remaining places",
-    "not": "No Activity Yet",
-    "pending": "Coming soon",
-    "pic": "illustrate",
-    "sucess": "successful purchase",
-    "tips": "Stake your balance through the overall stake balance ratio of the platform. Get {rate}‰ of the stake amount of that day.",
-    "amount": "Enter stake amount",
-    "minAmount": "minimum stake amount: ",
-    "time": "Choose a stake duration",
-    "promptAmount": "Please enter stake amount",
-    "sure": "",
-    "tips1": "",
-    "tips2": ""
-  },
-  "common": {
-    "alert": "Hint",
-    "cancel": "Cancel",
-    "close": "Close",
-    "confirm": "Confirm",
-    "copied": "Copied",
-    "customerService": "Customer Service",
-    "eula": "EULA",
-    "exitApp": "Press again to exit the app",
-    "guide": "Tutorial",
-    "home": "Home",
-    "loadFinish": "Load finished",
-    "loading": "Loading",
-    "mine": "Mine",
-    "more": "More",
-    "news": "News",
-    "noRecords": "No records",
-    "notAvailable": "Unavailable",
-    "open": "Open",
-    "profit": "Commission",
-    "pullRefresh": "Pull down to refresh",
-    "rank": "Rank",
-    "register": "Register",
-    "save": "Save",
-    "saveFailed": "Save failed",
-    "saveSuccess": "Saved successfully",
-    "saving": "Saving",
-    "serviceTime": "Service from 9:00 am to 9:00 pm",
-    "skip": "Skip",
-    "updateSuccess": "Update success",
-    "wait": "Stay tuned",
-    "ok": "OK",
-    "customer": "Add your broker",
-    "reward": "Reward",
-    "official": "Official",
-    "broker": "Broker"
-  },
-  "delegate": {
-    "increase": "Increase",
-    "originalPrice": "Original Price",
-    "payServiceCharge": "Pay Service Charge",
-    "sellPrice": "Selling Price",
-    "tip": "The consignment has not started yet, it will start today at {time}",
-    "tip1": "Note: entrusting the platform to sell services, the maximum price of the product can be increased by {riseRatePercent}% each time, and the platform will charge {serviceCharge}% of the custody service fee",
-    "title": "Consignment",
-    "tips2": "",
-    "tips3": ""
-  },
-  "distribution": {
-    "commission": "Commission",
-    "empty": "Empty",
-    "invite": "INVITE NOW",
-    "joinTeamAt": "Join at",
-    "myInvitor": "My invitor",
-    "myProfit": "Income",
-    "orderNum": "Orders",
-    "profitDetails": "Income Details",
-    "qrCode": "My promo code",
-    "saveImg": "Save Picture",
-    "teamNum": "Team size",
-    "totalProfit": "Income",
-    "viewDetail": "View details",
-    "viewTeam": "View team",
-    "shareUrl": "Share Link",
-    "copy": "Copy"
-  },
-  "home": {
-    "all": "All",
-    "trialPrompt": "This is only available to new users who register within 72 hours, please head to higher level"
-  },
-  "loginPage": {
-    "agreement": "User Agreement",
-    "codePla": "Please enter verification code",
-    "enterUsername": "Enter your username",
-    "goRegister": "Sign up now",
-    "invitorPla": "Invitation code (optional)",
-    "isRead": "I have read and agreed",
-    "login": "Login",
-    "loginByCode": "Verification code login",
-    "loginNow": "Already have an account, login now",
-    "loginPwd": "Password Login",
-    "loginSuceess": "Login successful",
-    "nameError": "Account length 6-20, can only contain numbers, letters and underscores, not pure numbers",
-    "noAcount": "No account yet?",
-    "noAgree": "Please read and agree to the registration agreement",
-    "phone": "Phone number",
-    "phoneError": "Wrong format of phone number",
-    "phonePla": "Please enter phone number",
-    "psd": "Password",
-    "psdAgainError": "The two passwords entered are inconsistent",
-    "psdAgainPla": "Please enter password again",
-    "psdEorror": "Wrong format of password",
-    "psdPla": "Please enter password",
-    "register": "Registration",
-    "registerSuccess": "Registration success",
-    "sendCode": "Send code",
-    "sended": "Sent"
-  },
-  "mine": {
-    "address": "Address",
-    "avatar": "Avatar",
-    "bankCard": "Bank Account",
-    "bindPhone": "Bind Phone",
-    "common": "Common Functions",
-    "female": "Female",
-    "logout": "Sign out",
-    "male": "male",
-    "newProfit": "new income",
-    "nickname": "Nickname",
-    "nickPlac": "Please enter a nickname",
-    "noBind": "Not added",
-    "noLogin": "LOGIN NOW",
-    "noSetting": "Not set",
-    "settings": "Settings",
-    "sex": "Gender",
-    "sure": "Confirm the changes",
-    "user": "User",
-    "username": "Username"
-  },
-  "news": {
-    "newsNull": "There is no news~"
-  },
-  "order": {
-    "applyShip": "Apply for delivery",
-    "buyNow": "Buy Now",
-    "confirmReceipt": "Confirm the receipt of goods",
-    "countDown": "Order will be automatically canceled when the payment countdown expires",
-    "createdAt": "Created at",
-    "createSuccess": "Order successfully created",
-    "detail": "Order details",
-    "hasProblem": "Any problems?",
-    "id": "Order ID",
-    "minute": "Minutes",
-    "my": "My Orders",
-    "payAt": "Payment time",
-    "payInfo": "Payment Information",
-    "paying": "Payment in progress",
-    "payMethod": "Payment method",
-    "payMethodName": {
-      "balance": "Balance"
+    "bank": {
+        "account": "Account",
+        "addBankCard": "Add Bank Account",
+        "bank": "Bank",
+        "deleteBankCard": "Delete Bank Account",
+        "deletePrompt": "This account won't be able to added again until 7 days later, are you sure to delete it?",
+        "deleteSuccess": "Bank account deleted successfully",
+        "editBankCard": "Edit Bank Account",
+        "invalidAccount": "Invalid Account",
+        "invalidBank": "Invalid Bank",
+        "invalidMail": "Invalid Mail",
+        "invalidName": "Invalid Name",
+        "invalidPhone": "Invalid Phone Number",
+        "mail": "Mail",
+        "name": "Name",
+        "phone": "Phone Number",
+        "saveBankCard": "Save Bank Account",
+        "selectBank": "Select Bank",
+        "invalidCard": "Invalid Account"
     },
-    "payNow": "Pay now",
-    "paySuccess": "Payment successful",
-    "processing": "Processing",
-    "second": "Seconds",
-    "status": {
-      "ALL": "All",
-      "CANCELED": "Cancelled",
-      "CONFIRMED": "For Sale",
-      "NOT_CONFIRMED": "Waiting for the seller to confirm receipt",
-      "NOT_PAID": "Pending",
-      "NOT_SHIPPED": "to be delivered",
-      "RECEIVED": "received",
-      "SELLING": "Selling",
-      "SHIPPED": "Shipped",
-      "SOLD": "Sold",
-      "SOLD_NOT_CONFIRMED": "To be confirmed receipt",
-      "SOLD_NOT_PAID": "pending buyer payment"
+    "blf": {
+        "buy": "STAKE NOW",
+        "buying": "STAKING",
+        "computing": "Calculating Profit",
+        "end": "Activity has ended",
+        "finish": "sold out",
+        "has": "Remaining places",
+        "not": "No Activity Yet",
+        "pending": "Coming soon",
+        "pic": "illustrate",
+        "sucess": "successful purchase",
+        "tips": "Stake your balance through the overall stake balance ratio of the platform. Get {rate}‰ of the stake amount of that day.",
+        "amount": "Enter stake amount",
+        "minAmount": "minimum stake amount: ",
+        "time": "Choose a stake duration",
+        "promptAmount": "Please enter stake amount",
+        "sure": "",
+        "tips1": "",
+        "tips2": ""
     },
-    "statusDesc": {
-      "CANCELED": "The order has been cancelled, if you have any questions, please contact customer service",
-      "CONFIRMED": "It will be listed within 24 hours after making the consignment",
-      "NOT_CONFIRMED": "Waiting for the seller to confirm receipt",
-      "NOT_PAID": "Please pay as soon as possible, overtime unpaid orders will be automatically canceled",
-      "NOT_SHIPPED": "Waiting for the seller to deliver the goods",
-      "RECEIVED": "Received",
-      "SELLING": "On consignment, if you have any questions, please contact customer service",
-      "SHIPPED": "Shipped",
-      "SOLD": "Sold, please contact customer service if you have any questions",
-      "SOLD_NOT_CONFIRMED": "Waiting for confirmation of receipt",
-      "SOLD_NOT_PAID": "Waiting for the buyer to pay"
+    "common": {
+        "alert": "Hint",
+        "cancel": "Cancel",
+        "close": "Close",
+        "confirm": "Confirm",
+        "copied": "Copied",
+        "customerService": "Customer Service",
+        "eula": "EULA",
+        "exitApp": "Press again to exit the app",
+        "guide": "Tutorial",
+        "home": "Home",
+        "loadFinish": "Load finished",
+        "loading": "Loading",
+        "mine": "Mine",
+        "more": "More",
+        "news": "News",
+        "noRecords": "No records",
+        "notAvailable": "Unavailable",
+        "open": "Open",
+        "profit": "Commission",
+        "pullRefresh": "Pull down to refresh",
+        "rank": "Rank",
+        "register": "Register",
+        "save": "Save",
+        "saveFailed": "Save failed",
+        "saveSuccess": "Saved successfully",
+        "saving": "Saving",
+        "serviceTime": "Service from 9:00 am to 9:00 pm",
+        "skip": "Skip",
+        "updateSuccess": "Update success",
+        "wait": "Stay tuned",
+        "ok": "OK",
+        "customer": "Add your broker",
+        "reward": "Reward",
+        "official": "Official",
+        "broker": "Broker"
     },
-    "stopSale": "Sale Suspended",
-    "total": "Total",
-    "totalPayment": "Total Payment",
-    "viewOrder": "View",
-    "walletPay": "Wallet payment"
-  },
-  "product": {
-    "dailyEarning": "Daily Income",
-    "detail": "Product Details",
-    "hot": "IN FULL SWING!",
-    "nowPrice": "Current",
-    "owner": "Current Holder",
-    "priceNow": "Current",
-    "riseDesc": "Daily Income",
-    "search": "Search",
-    "searchNo": "No products were found~",
-    "searchPla": "Enter search keywords",
-    "start": "Start at {time}",
-    "tag": "Digital Artwork",
-    "tomorrowBuy": "Can be sold for ",
-    "delayTips": "This product can only be purchased after the cooling time. If you need to buy multiple high-quality products in a concentrated manner, you can enter a higher level session.",
-    "soldOut": "Sold out"
-  },
-  "rank": {
-    "inviteNum": "New recruits",
-    "profitInfo": "Revenue",
-    "rank": "Ranking",
-    "rankByInvite": "Invite Ranking",
-    "rankByProfit": "Stake Ranking",
-    "userInfo": "User",
-    "withdrawRechargeRate": "Recharge revenue ratio",
-    "stake": "Stake",
-    "profit": "Profit"
-  },
-  "settings": {
-    "checkingUpdate": "Checking for update",
-    "checkUpdate": "Check for update",
-    "darkMode": "Dark Mode",
-    "updating": "Updating",
-    "upToDate": "Already up to date",
-    "newUpdate": "New version available",
-    "updateNow": "Update now"
-  },
-  "title": {
-    "balanceRecord": "Balance Records",
-    "distribution": "Revenue",
-    "myTeam": "My team",
-    "commissionRecords": "Commission Records"
-  },
-  "tutorial": {
-    "step1": "Step 1: Scan the QR code of the recommender, fill in the registration information, and click register to complete the registration",
-    "step2": "Step 2: After registration, save the QR code and share it with more users to register",
-    "step3": "Step 3: Login to the app, click on the wallet recharge amount",
-    "step4": "Step 4: Select or enter the amount to be recharged for recharge",
-    "step5": "Step 5: Select the session, click home, and select the initial session. Each user of the primary session is limited to two collections per day, the intermediate session is open from 4:00 pm to 5:00 pm every day, and the advanced session is open from 3:00 pm to 4:00 pm every day.",
-    "step6": "Step 6: Purchase collections, if the wallet balance is insufficient, you need to recharge the wallet balance",
-    "step7": "Step 7: When entrusting the collection to be put on the shelves in the order, you need to pay the platform a commission fee of 4%, and the collection range corresponding to the collection is 6% of the time of purchase.",
-    "step8": "Step 8: If the amount is sufficient, you can directly purchase the collection and then entrust it to be put on the shelf",
-    "step9": "Note: After purchasing 2 pieces, the primary field cannot purchase collections next time, and each user is limited to purchase 2 pieces per day"
-  },
-  "user": {
-    "notLogin": "User is not logged in, do you want to log in now?",
-    "profile": "Edit profile",
-    "wallet": "My Wallet"
-  },
-  "vip": {
-    "auto": "automatic acquisition",
-    "btn": "Renew",
-    "btn1": "recharge",
-    "isOpen": "Turned on",
-    "rights": "Rights",
-    "time": "Expire date:",
-    "title": "valued member",
-    "isClose": "Unopened",
-    "day": " Days",
-    "recharge": "Recharge member",
-    "tips": "Enjoy automatic acquisition rights",
-    "TopUp": "Recharge members enjoy benefits",
-    "expired": "membership has expired",
-    "lost": "Membership rights have been lost for {day} days",
-    "noVip": "no member"
-  }
+    "delegate": {
+        "increase": "Increase",
+        "originalPrice": "Original Price",
+        "payServiceCharge": "Pay Service Charge",
+        "sellPrice": "Selling Price",
+        "tip": "The consignment has not started yet, it will start today at {time}",
+        "tip1": "Note: entrusting the platform to sell services, the maximum price of the product can be increased by {riseRatePercent}% each time, and the platform will charge {serviceCharge}% of the custody service fee",
+        "title": "Consignment",
+        "tips2": "",
+        "tips3": ""
+    },
+    "distribution": {
+        "commission": "Commission",
+        "empty": "Empty",
+        "invite": "INVITE NOW",
+        "joinTeamAt": "Join at",
+        "myInvitor": "My invitor",
+        "myProfit": "Income",
+        "orderNum": "Orders",
+        "profitDetails": "Income Details",
+        "qrCode": "My promo code",
+        "saveImg": "Save Picture",
+        "teamNum": "Team size",
+        "totalProfit": "Income",
+        "viewDetail": "View details",
+        "viewTeam": "View team",
+        "shareUrl": "Share Link",
+        "copy": "Copy"
+    },
+    "home": {
+        "all": "All",
+        "trialPrompt": "This is only available to new users who register within 72 hours, please head to higher level"
+    },
+    "loginPage": {
+        "agreement": "User Agreement",
+        "codePla": "Please enter verification code",
+        "enterUsername": "Enter your username",
+        "goRegister": "Sign up now",
+        "invitorPla": "Invitation code (optional)",
+        "isRead": "I have read and agreed",
+        "login": "Login",
+        "loginByCode": "Verification code login",
+        "loginNow": "Already have an account, login now",
+        "loginPwd": "Password Login",
+        "loginSuceess": "Login successful",
+        "nameError": "Account length 6-20, can only contain numbers, letters and underscores, not pure numbers",
+        "noAcount": "No account yet?",
+        "noAgree": "Please read and agree to the registration agreement",
+        "phone": "Phone number",
+        "phoneError": "Wrong format of phone number",
+        "phonePla": "Please enter phone number",
+        "psd": "Password",
+        "psdAgainError": "The two passwords entered are inconsistent",
+        "psdAgainPla": "Please enter password again",
+        "psdEorror": "Wrong format of password",
+        "psdPla": "Please enter password",
+        "register": "Registration",
+        "registerSuccess": "Registration success",
+        "sendCode": "Send code",
+        "sended": "Sent"
+    },
+    "mine": {
+        "address": "Address",
+        "avatar": "Avatar",
+        "bankCard": "Bank Account",
+        "bindPhone": "Bind Phone",
+        "common": "Common Functions",
+        "female": "Female",
+        "logout": "Sign out",
+        "male": "male",
+        "newProfit": "new income",
+        "nickname": "Nickname",
+        "nickPlac": "Please enter a nickname",
+        "noBind": "Not added",
+        "noLogin": "LOGIN NOW",
+        "noSetting": "Not set",
+        "settings": "Settings",
+        "sex": "Gender",
+        "sure": "Confirm the changes",
+        "user": "User",
+        "username": "Username"
+    },
+    "news": {
+        "newsNull": "There is no news~"
+    },
+    "order": {
+        "applyShip": "Apply for delivery",
+        "buyNow": "Buy Now",
+        "confirmReceipt": "Confirm the receipt of goods",
+        "countDown": "Order will be automatically canceled when the payment countdown expires",
+        "createdAt": "Created at",
+        "createSuccess": "Order successfully created",
+        "detail": "Order details",
+        "hasProblem": "Any problems?",
+        "id": "Order ID",
+        "minute": "Minutes",
+        "my": "My Orders",
+        "payAt": "Payment time",
+        "payInfo": "Payment Information",
+        "paying": "Payment in progress",
+        "payMethod": "Payment method",
+        "payMethodName": {
+            "balance": "Balance"
+        },
+        "payNow": "Pay now",
+        "paySuccess": "Payment successful",
+        "processing": "Processing",
+        "second": "Seconds",
+        "status": {
+            "ALL": "All",
+            "CANCELED": "Cancelled",
+            "CONFIRMED": "For Sale",
+            "NOT_CONFIRMED": "Waiting for the seller to confirm receipt",
+            "NOT_PAID": "Pending",
+            "NOT_SHIPPED": "to be delivered",
+            "RECEIVED": "received",
+            "SELLING": "Selling",
+            "SHIPPED": "Shipped",
+            "SOLD": "Sold",
+            "SOLD_NOT_CONFIRMED": "To be confirmed receipt",
+            "SOLD_NOT_PAID": "pending buyer payment"
+        },
+        "statusDesc": {
+            "CANCELED": "The order has been cancelled, if you have any questions, please contact customer service",
+            "CONFIRMED": "It will be listed within 24 hours after making the consignment",
+            "NOT_CONFIRMED": "Waiting for the seller to confirm receipt",
+            "NOT_PAID": "Please pay as soon as possible, overtime unpaid orders will be automatically canceled",
+            "NOT_SHIPPED": "Waiting for the seller to deliver the goods",
+            "RECEIVED": "Received",
+            "SELLING": "On consignment, if you have any questions, please contact customer service",
+            "SHIPPED": "Shipped",
+            "SOLD": "Sold, please contact customer service if you have any questions",
+            "SOLD_NOT_CONFIRMED": "Waiting for confirmation of receipt",
+            "SOLD_NOT_PAID": "Waiting for the buyer to pay"
+        },
+        "stopSale": "Sale Suspended",
+        "total": "Total",
+        "totalPayment": "Total Payment",
+        "viewOrder": "View",
+        "walletPay": "Wallet payment"
+    },
+    "product": {
+        "dailyEarning": "Daily Income",
+        "detail": "Product Details",
+        "hot": "IN FULL SWING!",
+        "nowPrice": "Current",
+        "owner": "Current Holder",
+        "priceNow": "Current",
+        "riseDesc": "Daily Income",
+        "search": "Search",
+        "searchNo": "No products were found~",
+        "searchPla": "Enter search keywords",
+        "start": "Start at {time}",
+        "tag": "Digital Artwork",
+        "tomorrowBuy": "Can be sold for ",
+        "delayTips": "This product can only be purchased after the cooling time. If you need to buy multiple high-quality products in a concentrated manner, you can enter a higher level session.",
+        "soldOut": "Sold out"
+    },
+    "rank": {
+        "inviteNum": "New recruits",
+        "profitInfo": "Revenue",
+        "rank": "Ranking",
+        "rankByInvite": "Invite Ranking",
+        "rankByProfit": "Stake Ranking",
+        "userInfo": "User",
+        "withdrawRechargeRate": "Recharge revenue ratio",
+        "stake": "Stake",
+        "profit": "Profit"
+    },
+    "settings": {
+        "checkingUpdate": "Checking for update",
+        "checkUpdate": "Check for update",
+        "darkMode": "Dark Mode",
+        "updating": "Updating",
+        "upToDate": "Already up to date",
+        "newUpdate": "New version available",
+        "updateNow": "Update now"
+    },
+    "title": {
+        "balanceRecord": "Balance Records",
+        "distribution": "Revenue",
+        "myTeam": "My team",
+        "commissionRecords": "Commission Records"
+    },
+    "tutorial": {
+        "step1": "Step 1: Scan the QR code of the recommender, fill in the registration information, and click register to complete the registration",
+        "step2": "Step 2: After registration, save the QR code and share it with more users to register",
+        "step3": "Step 3: Login to the app, click on the wallet recharge amount",
+        "step4": "Step 4: Select or enter the amount to be recharged for recharge",
+        "step5": "Step 5: Select the session, click home, and select the initial session. Each user of the primary session is limited to two collections per day, the intermediate session is open from 4:00 pm to 5:00 pm every day, and the advanced session is open from 3:00 pm to 4:00 pm every day.",
+        "step6": "Step 6: Purchase collections, if the wallet balance is insufficient, you need to recharge the wallet balance",
+        "step7": "Step 7: When entrusting the collection to be put on the shelves in the order, you need to pay the platform a commission fee of 4%, and the collection range corresponding to the collection is 6% of the time of purchase.",
+        "step8": "Step 8: If the amount is sufficient, you can directly purchase the collection and then entrust it to be put on the shelf",
+        "step9": "Note: After purchasing 2 pieces, the primary field cannot purchase collections next time, and each user is limited to purchase 2 pieces per day"
+    },
+    "user": {
+        "notLogin": "User is not logged in, do you want to log in now?",
+        "profile": "Edit profile",
+        "wallet": "My Wallet"
+    },
+    "vip": {
+        "auto": "automatic acquisition",
+        "btn": "Renew",
+        "btn1": "recharge",
+        "isOpen": "Turned on",
+        "rights": "Rights",
+        "time": "Expire date:",
+        "title": "valued member",
+        "isClose": "Unopened",
+        "day": " Days",
+        "recharge": "Recharge member",
+        "tips": "Enjoy automatic acquisition rights",
+        "TopUp": "Recharge members enjoy benefits",
+        "expired": "membership has expired",
+        "lost": "Membership rights have been lost for {day} days",
+        "noVip": "no member",
+        "setAuto": "Set the interval for automatic purchase",
+        "dayTimes": "You can snap up {times} times a day",
+        "pla": "Please enter",
+        "to": "to",
+        "sureClose": "Are you sure you want to close automatic acquisition?",
+        "closeSu": "Closed successfully",
+        "errorInterval": "Please enter the correct interval",
+        "openSu": "Opened successfully"
+    }
 }

+ 11 - 3
src/locales/zh.json

@@ -205,9 +205,17 @@
         "tips": "享受自动收购权益",
         "day": "天",
         "noVip": "无会员",
-        "expired":"会员已过期",
-        "TopUp":"充值会员享权益",
-        "lost":"已失去会员权益{day}天"
+        "expired": "会员已过期",
+        "TopUp": "充值会员享权益",
+        "lost": "已失去会员权益{day}天",
+        "setAuto": "设置自动购买的区间",
+        "dayTimes": "每日最多可抢购{times}次",
+        "pla": "请输入",
+        "to": "至",
+        "sureClose": "确认要关闭自动收购吗?",
+        "closeSu": "关闭成功",
+        "errorInterval": "请输入正确区间",
+        "openSu": "开启成功"
     },
     "news": {
         "newsNull": "没有任何新闻哦~"

+ 21 - 2
src/views/HomePage.vue

@@ -158,13 +158,13 @@
                 </div>
             </template>
 
-            <div class="vip-content">
+            <div class="vip-content" v-if="isVip">
                 <img class="vip-bg" src="@/assets/png-cishu.png" alt="" />
                 <div class="vip-box">
                     <img class="icon" src="@/assets/png-huiyuan.png" alt="" />
                     <div class="num">
                         <img src="@/assets/icon-anniu.png" alt="" />
-                        <span>10</span>
+                        <span>{{ vipUserInfo.validityPeriod || 0 }}</span>
                     </div>
                     <span>times left</span>
                 </div>
@@ -210,6 +210,7 @@ import { useUserStore } from '@/stores/user'
 import { showVideoModal } from '@/components/videoModal'
 import NewsModal from '@/components/NewsModal.vue'
 import { UseElementBounding } from '@vueuse/components'
+import { onIonViewWillEnter } from '@ionic/vue'
 
 const router = useRouter()
 const i18n = useI18n()
@@ -294,6 +295,24 @@ const refresh = () => {
     getSaleBatch()
     getNews()
 }
+
+const user = computed(() => {
+    return useUserStore().user
+})
+const isVip = computed(() => {
+    return vipUserInfo.value && vipUserInfo.value.status === 'EFFECTIVE'
+})
+const vipUserInfo = ref({})
+function getMineVip() {
+    if (user.value == null) return
+    http.get('/vip/getUserVipInfo/' + user.value.id).then(res => {
+        vipUserInfo.value = res
+    })
+}
+onIonViewWillEnter(() => {
+    getMineVip()
+})
+
 const turtorialShown = useStorage('turtorialShown', false)
 const newsShown = useStorage('newsShown', null)
 const packageSynced = inject('packageSynced', false)

+ 243 - 6
src/views/MinePage.vue

@@ -161,7 +161,7 @@
                             {{ $t('vip.auto') }}
                             <span>({{ checked ? $t('vip.isOpen') : $t('vip.isClose') }})</span>
                         </div>
-                        <van-switch :disabled="!isVip" v-model="checked" />
+                        <van-switch @click="changeAuto" :disabled="!isVip" v-model="checked" />
                     </div>
                 </div>
             </div>
@@ -217,7 +217,7 @@
             </van-cell-group>
 
             <ion-modal
-                id="modal-withdraw"
+                id="modal-recharge"
                 class="modal"
                 :is-open="showRechargeModal"
                 :initial-breakpoint="breakpoint"
@@ -237,6 +237,15 @@
                                     <img src="@/assets/icon_close2.png" alt="" />
                                 </div>
                             </div>
+                            <van-tabs v-model:active="chooseType" @change="getTypeVip">
+                                <van-tab
+                                    :title="item.typeName"
+                                    :name="item.id"
+                                    v-for="(item, index) in typeList"
+                                    :key="index"
+                                >
+                                </van-tab>
+                            </van-tabs>
                             <div class="chooseBtns" :class="{ 'large-btn': vipList.length <= 3 }">
                                 <div
                                     class="choose-btn"
@@ -268,6 +277,31 @@
                     </div>
                 </ion-content>
             </ion-modal>
+
+            <ion-modal class="stake-modal" :is-open="showSetModal" @didDismiss="showSetModal = false">
+                <div class="stake-modal-wrapper">
+                    <div class="stake-modal-content">
+                        <div class="title">
+                            <div class="text1">{{ $t('vip.setAuto') }}</div>
+                            <div class="text2">{{ $t('vip.dayTimes', { times: maxNumber }) }}</div>
+                        </div>
+
+                        <div class="close" @click="showSetModal = false">
+                            <img src="@/assets/icon_close2.png" alt="" />
+                        </div>
+                        <div class="fileds">
+                            <van-field v-model="upInterval" type="digit" :placeholder="$t('vip.pla')" />
+                            <span class="fileds-text"> {{ $t('vip.to') }} </span>
+                            <van-field v-model="downInterval" type="digit" :placeholder="$t('vip.pla')" />
+                        </div>
+                        <div class="footer">
+                            <van-button type="primary" block @click="confirmInterval">{{
+                                $t('common.confirm')
+                            }}</van-button>
+                        </div>
+                    </div>
+                </div>
+            </ion-modal>
         </ion-content>
     </ion-page>
 </template>
@@ -285,6 +319,7 @@ import { useWindowSize } from '@vueuse/core'
 import { useI18n } from 'vue-i18n'
 import { differenceInDays, format } from 'date-fns'
 import Toast from '@/utils/toast'
+import { showConfirmDialog } from 'vant'
 
 const userStore = useUserStore()
 const user = computed(() => {
@@ -309,6 +344,7 @@ function getBalance() {
 watch(user, val => {
     if (val) {
         getBalance()
+        getVip()
     } else {
         balance.value = {}
     }
@@ -331,22 +367,45 @@ const breakpoint = computed(() => {
 })
 
 const vipList = ref([])
+const typeList = ref([])
+const chooseType = ref(0)
 const chooseVip = ref(0)
 
 const checked = ref(false)
 const vipUserInfo = ref(null)
 function getVip() {
     if (user.value == null) return
-    http.post('/vip/list').then(res => {
+    http.post('/vip/typeList').then(res => {
+        typeList.value = res
+        if (res.length > 0) {
+            chooseType.value = res[0].id
+        }
+        getTypeVip()
+    })
+    getMineVip()
+}
+
+function getTypeVip() {
+    http.get('/vip/vipList/' + chooseType.value).then(res => {
         vipList.value = res
         if (res.length > 0) {
             chooseVip.value = res[0].id
         }
     })
+}
 
-    http.get('/vip/getUserVipInfo/' + user.value.id).then(res => {
-        vipUserInfo.value = res
-    })
+function getMineVip() {
+    http.get('/vip/getUserVipInfo/' + user.value.id)
+        .then(res => {
+            vipUserInfo.value = res
+            checked.value = res.isAuto
+            upInterval.value = res.upInterval
+            downInterval.value = res.downInterval
+            return http.get('/vip/get/' + res.vipId)
+        })
+        .then(res => {
+            maxNumber.value = res.validityPeriod
+        })
 }
 
 function recharge() {
@@ -403,6 +462,71 @@ const vipTime = computed(() => {
         }
     }
 })
+
+const showSetModal = ref(false)
+const maxNumber = ref(0)
+const upInterval = ref(0)
+const downInterval = ref(0)
+
+function changeAuto() {
+    checked.value = vipUserInfo.value.isAuto
+    if (vipUserInfo.value.isAuto) {
+        showConfirmDialog({
+            title: t('common.alert'),
+            message: t('vip.sureClose'),
+            confirmButtonText: t('common.close')
+        })
+            .then(() => {
+                Toast.loading({
+                    message: t('common.loading') + '...',
+                    forbidClick: true
+                })
+                return http.get('/vip/modifyAuto/' + user.value.id)
+            })
+            .then(() => {
+                Toast.success(t('vip.closeSu'))
+                getMineVip()
+            })
+            .catch(e => {
+                Toast.clear()
+                if (e && e.error) {
+                    Toast.success(e.error)
+                }
+            })
+    } else {
+        showSetModal.value = true
+    }
+}
+
+function confirmInterval() {
+    if (Number(downInterval.value) <= Number(upInterval.value)) {
+        Toast('请输入正确区间')
+        return
+    }
+    Toast.loading({
+        message: t('common.loading') + '...',
+        forbidClick: true
+    })
+    http.post('/vip/modifyInterval', {
+        userId: user.value.id,
+        upInterval: upInterval.value,
+        downInterval: downInterval.value
+    })
+        .then(res => {
+            return http.get('/vip/modifyAuto/' + user.value.id)
+        })
+        .then(() => {
+            showSetModal.value = false
+            Toast.success('开启成功')
+            getMineVip()
+        })
+        .catch(e => {
+            Toast.clear()
+            if (e && e.error) {
+                Toast.success(e.error)
+            }
+        })
+}
 </script>
 
 <style lang="less" scoped>
@@ -853,6 +977,25 @@ ion-content {
             }
         }
 
+        :deep(.van-tabs) {
+            --van-tabs-nav-background: #2c302f;
+            --van-tabs-bottom-bar-height: 2px;
+            margin: 0 20px 18px;
+            .van-tab {
+                color: #ffffff;
+                line-height: 24px;
+                background: linear-gradient(135deg, #deffce 0%, #85f9c4 51%, #3df3bc 100%);
+                -webkit-background-clip: text;
+                -webkit-text-fill-color: transparent;
+                font-size: 18px;
+                font-family: AlimamaShuHeiTi;
+            }
+            .van-tabs__line {
+                background: #d8d8d8 linear-gradient(135deg, #deffce 0%, #85f9c4 51%, #3df3bc 100%);
+                bottom: 18px;
+            }
+        }
+
         .chooseBtns {
             padding: 8px 16px 20px;
             .f();
@@ -964,4 +1107,98 @@ ion-content {
         }
     }
 }
+
+.stake-modal {
+    --height: fit-content;
+    --border-radius: 8px;
+    --width: 80vw;
+}
+.stake-modal-wrapper {
+    background: linear-gradient(90deg, rgba(219, 255, 206, 1), rgba(61, 243, 188, 1));
+    padding: 2px;
+}
+.stake-modal-content {
+    background-color: #2c302f;
+    border-radius: 8px;
+    padding: 24px 16px;
+
+    .title {
+        .text1 {
+            font-size: 18px;
+            font-weight: bold;
+            color: #ffffff;
+            line-height: 24px;
+        }
+
+        .text2 {
+            font-size: 12px;
+            color: #39f3b9;
+            line-height: 17px;
+            margin-top: 5px;
+        }
+    }
+
+    .close {
+        position: absolute;
+        right: 16px;
+        top: 16px;
+        img {
+            width: 22px;
+            height: 22px;
+        }
+    }
+
+    .amount-filed {
+        --van-field-input-text-color: #39f3b9;
+        width: 100%;
+        margin: 14px 0 24px;
+        background: #3c403f;
+        border-radius: 8px;
+        border: 1px solid #4f5352;
+        font-size: 36px;
+        font-weight: bold;
+        line-height: 60px;
+        padding: 0 12px;
+        &::-webkit-input-placeholder {
+            font-size: 14px;
+        }
+        ::-webkit-input-placeholder {
+            font-size: 20px;
+            line-height: 60px;
+        }
+    }
+    .fileds {
+        .f();
+        padding: 20px 0 40px;
+        .van-field {
+            --van-field-input-text-color: #39f3b9;
+            background: #3c403f;
+            border-radius: 8px;
+            border: 1px solid #4f5352;
+            font-size: 36px;
+            font-weight: bold;
+            line-height: 60px;
+            padding: 0 12px;
+            text-align: center;
+            &::-webkit-input-placeholder {
+                font-size: 14px;
+            }
+            ::-webkit-input-placeholder {
+                font-size: 20px;
+                line-height: 60px;
+            }
+            :deep(.van-field__control) {
+                text-align: center;
+            }
+        }
+
+        .fileds-text {
+            font-size: 18px;
+            font-weight: bold;
+            color: #ffffff;
+            line-height: 24px;
+            margin: 0 13px;
+        }
+    }
+}
 </style>