Browse Source

合并

master
j1ack 3 years ago
parent
commit
33bd208ab7
  1. 54
      App.vue
  2. 66
      pages/home/index.vue
  3. 83
      pages/login/index.vue
  4. 9
      pages/recharge/recharge.vue
  5. 12
      pages/recharge/rechargeRecord.vue
  6. 2
      utils/constant.js
  7. 5
      utils/language/en_US.js
  8. 5
      utils/language/vi_VN.js
  9. 6
      utils/language/zh_TW.js

54
App.vue

@ -1,16 +1,20 @@
<script> <script>
import api from '@/utils/api' import api from '@/utils/api'
export default { export default {
// computed: { data() {
// i18n() { return {
// return this.$t('index')
// }, }
// }, },
computed: {
i18n() {
return this.$t('me')
},
},
onLaunch: function() { onLaunch: function() {
console.log('App Launch') console.log('App Launch')
// #ifdef APP-PLUS
this.appVersion()
// #endif
api.indexInfo().then(res => { api.indexInfo().then(res => {
uni.setStorageSync('coinTypeInfo', res) uni.setStorageSync('coinTypeInfo', res)
}) })
@ -22,37 +26,7 @@
console.log('App Hide') console.log('App Hide')
}, },
methods: { methods: {
// APP
async appVersion() {
let param = {
'appId': uni.getSystemInfoSync().platform
}
// console.log('ss' + JSON.stringify(uni.getSystemInfoSync()))
const response = await this.$api.appVersion(param)
// console.log(response)
if(!response.isUpgrade){
return;
}
plus.runtime.getProperty(plus.runtime.appid, (wgtinfo) => {
// console.log('' + wgtinfo.versionCode)
// console.log((wgtinfo.versionCode < response.versionCode))
// console.log(wgtinfo.versionCode, response.versionCode)
if (wgtinfo.versionCode < response.versionCode) {
// console.log('')
let that = this;
uni.showModal({
title: this.$t("login").Versionupdate,
content: response.info,
showCancel: false,
success: function(res) {
if (res.confirm) {
plus.runtime.openURL(response.appUrl);
}
}
});
}
});
},
} }
} }
@ -61,9 +35,11 @@
<style lang="scss"> <style lang="scss">
/*每个页面公共css */ /*每个页面公共css */
@import "uview-ui/index.scss"; @import "uview-ui/index.scss";
.main .body { .main .body {
margin-top: 100rpx !important; margin-top: 100rpx !important;
} }
/deep/ .u-loadmore__content__text { /deep/ .u-loadmore__content__text {
line-height: 50rpx !important; line-height: 50rpx !important;
} }

66
pages/home/index.vue

@ -118,6 +118,15 @@
</view> --> </view> -->
<!-- tabBar --> <!-- tabBar -->
<tab-bar :selectActive="1"></tab-bar> <tab-bar :selectActive="1"></tab-bar>
<u-modal :show="showLogOut" :confirmText="i18n.Versionupdate" :cancelText="i18n.Cancel" :showCancelButton="false"
@confirm="logOut" @cancel="showLogOut=false" confirmColor="#00E8A2" cancelColor="#96959E">
<view class="slot-content" v-html="conInfo.info">
<rich-text></rich-text>
</view>
</u-modal>
</view> </view>
</template> </template>
@ -139,6 +148,10 @@
}, },
data() { data() {
return { return {
conInfo: {},
showLogOut: false,
closeModalShow: false, closeModalShow: false,
stepCount: '', stepCount: '',
stepResult: '', stepResult: '',
@ -174,6 +187,11 @@
this.getbanner(); this.getbanner();
this.noticeList(); this.noticeList();
this.getUserInfoBalance(); this.getUserInfoBalance();
// #ifdef APP-PLUS
this.appVersion()
// #endif
}, },
onShow() { onShow() {
@ -212,6 +230,54 @@
} }
}, },
methods: { methods: {
logOut() {
plus.runtime.openURL(this.conInfo.appUrl);
},
// APP
appVersion() {
console.log("校验APP应用版本", uni.getSystemInfoSync().platform)
// console.log('ss' + JSON.stringify(uni.getSystemInfoSync()))
// const response = await this.$api.appVersion(param)
// console.log(response)
plus.runtime.getProperty(plus.runtime.appid, (wgtinfo) => {
console.log('当前版本号' + wgtinfo.versionCode)
// console.log((wgtinfo.versionCode < response.versionCode))
// console.log(wgtinfo.versionCode, response.versionCode)
let param = {
'appId': uni.getSystemInfoSync().platform,
'versionCode': '1.0.0'
}
console.log(param)
this.$api.appVersion(param).then(response => {
console.log(response)
if (!response.isUpgrade) {
return;
}
// if (wgtinfo.versionCode < response.versionCode) {
// console.log('')
let that = this;
this.conInfo = response
this.showLogOut=true
// uni.showModal({
// title: this.$t("login").Versionupdate,
// content: response.info,
// showCancel: false,
// success: function(res) {
// if (res.confirm) {
// plus.runtime.openURL(response.appUrl);
// }
// }
// });
// }
})
});
},
// //
updateSteps(soucre) { updateSteps(soucre) {
var today = this.$index.formatyymmdd(new Date().getTime()); var today = this.$index.formatyymmdd(new Date().getTime());

83
pages/login/index.vue

@ -27,6 +27,14 @@
</navigator> </navigator>
</view> </view>
<u-modal :show="showLogOut" :confirmText="i18n.Versionupdate" :cancelText="i18n.Cancel" :showCancelButton="false"
@confirm="logOut" @cancel="showLogOut=false" confirmColor="#00E8A2" cancelColor="#96959E">
<view class="slot-content" v-html="conInfo.info">
<rich-text></rich-text>
</view>
</u-modal>
</view> </view>
</template> </template>
@ -37,6 +45,8 @@
name: 'login', name: 'login',
data() { data() {
return { return {
conInfo: {},
showLogOut: false,
// //
isCanGetCode: false, isCanGetCode: false,
userInfo: { userInfo: {
@ -73,9 +83,64 @@
}, },
onLoad() { onLoad() {
// console.log(this.$t('login.emailInputMessage')); // console.log(this.$t('login.emailInputMessage'));
// #ifdef APP-PLUS
this.appVersion()
// #endif
},
onShow() {
}, },
onShow() {},
methods: { methods: {
logOut() {
plus.runtime.openURL(this.conInfo.appUrl);
},
// APP
appVersion() {
console.log("校验APP应用版本", uni.getSystemInfoSync().platform)
// console.log('ss' + JSON.stringify(uni.getSystemInfoSync()))
// const response = await this.$api.appVersion(param)
// console.log(response)
plus.runtime.getProperty(plus.runtime.appid, (wgtinfo) => {
console.log('当前版本号' + wgtinfo.versionCode)
console.log(wgtinfo)
// console.log((wgtinfo.versionCode < response.versionCode))
// console.log(wgtinfo.versionCode, response.versionCode)
let param = {
'appId': uni.getSystemInfoSync().platform,
'versionCode': wgtinfo.version
}
console.log(param)
this.$api.appVersion(param).then(response => {
console.log(response)
if (!response.isUpgrade) {
return;
}
if (wgtinfo.version < response.versionCode) {
// console.log('')
let that = this;
this.conInfo = response
this.showLogOut=true
// uni.showModal({
// title: this.$t("login").Versionupdate,
// content: response.info,
// showCancel: false,
// success: function(res) {
// if (res.confirm) {
// plus.runtime.openURL(response.appUrl);
// }
// }
// });
}
})
});
},
// //
login() { login() {
if (!this.isCanGetCode) { if (!this.isCanGetCode) {
@ -111,6 +176,22 @@
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
/deep/ .u-modal__content__text {
color: #96959E !important;
}
/deep/.u-popup__content {
background: #323045;
.u-modal__title {
color: #fff;
}
.u-modal__content__text {
text-align: center;
}
}
page { page {
height: 100%; height: 100%;
background: url(../../static/public/BG.png) no-repeat fixed; background: url(../../static/public/BG.png) no-repeat fixed;

9
pages/recharge/recharge.vue

@ -88,7 +88,7 @@
{{item}}{{coinTypeInfo.system_coin_code}} {{item}}{{coinTypeInfo.system_coin_code}}
</view> </view>
</view> </view>
<input class="input" v-model="onlineInfo.tranAmt" focus :placeholder="i18n.EnterNumber" <input class="input" v-model="onlineInfo.tranAmt" focus :placeholder="i18n.EnterNumber+inputText.minLimit+'-'+inputText.maxLimit"
placeholder-style="color:#A1A0A8" /> placeholder-style="color:#A1A0A8" />
</view> </view>
<view class="RechargeMethod"> <view class="RechargeMethod">
@ -139,8 +139,9 @@
tranAmt: null, tranAmt: null,
}, },
rechargeMinAmount: '', rechargeMinAmount: '',
enname: '' enname: '',
// input
inputText:{},
}; };
}, },
@ -253,6 +254,8 @@
this.reInfo.fastAmount = this.reInfo.fastAmount.split(',') this.reInfo.fastAmount = this.reInfo.fastAmount.split(',')
this.onlineInfo.tranAmt = this.reInfo.fastAmount[0] this.onlineInfo.tranAmt = this.reInfo.fastAmount[0]
this.onlineInfo.payType = this.reInfo.payTypes[0].payType this.onlineInfo.payType = this.reInfo.payTypes[0].payType
//
this.inputText=this.reInfo.payTypes[0]
} }

12
pages/recharge/rechargeRecord.vue

@ -35,7 +35,8 @@
<view class="dataBody" v-if="form.type === 'crypto'"> <view class="dataBody" v-if="form.type === 'crypto'">
<view style="padding:20rpx 32rpx;"> <view style="padding:20rpx 32rpx;">
<key-value-row :keyName="i18n.OrderID" :value="item.orderNo"></key-value-row> <key-value-row :keyName="i18n.OrderID" :value="item.orderNo"></key-value-row>
<key-value-row :keyName="i18n.Fees" :value="(item.tranAmt-item.realAmount)+item.coinCode"> <key-value-row :keyName="i18n.Fees" :value="getValue(item.tranAmt-item.realAmount,item.coinCode)">
<!-- +item.coinCode -->
</key-value-row> </key-value-row>
<key-value-row :keyName="i18n.Time" :value="item.timestr"></key-value-row> <key-value-row :keyName="i18n.Time" :value="item.timestr"></key-value-row>
</view> </view>
@ -59,7 +60,7 @@
<view class="dataBody" v-if="form.type === 'online'"> <view class="dataBody" v-if="form.type === 'online'">
<view style="padding:20rpx 32rpx;"> <view style="padding:20rpx 32rpx;">
<key-value-row :keyName="i18n.OrderID" :value="item.orderNo"></key-value-row> <key-value-row :keyName="i18n.OrderID" :value="item.orderNo"></key-value-row>
<key-value-row :keyName="i18n.Fees" :value="(item.tranAmt-item.realAmount)+item.coinCode"> <key-value-row :keyName="i18n.Fees" :value="getValue(item.tranAmt-item.realAmount,item.coinCode)">
</key-value-row> </key-value-row>
<key-value-row :keyName="i18n.Time" :value="item.timestr"></key-value-row> <key-value-row :keyName="i18n.Time" :value="item.timestr"></key-value-row>
</view> </view>
@ -129,6 +130,13 @@
}, },
onShow() {}, onShow() {},
methods: { methods: {
getValue(s,v) {
/*
js 数字精度问题
*/
s = parseFloat(s.toPrecision(10))
return s+v;
},
change(e) { change(e) {
console.log(e); console.log(e);
}, },

2
utils/constant.js

@ -1,5 +1,5 @@
const IS_TEST = false; const IS_TEST = true;
const H5_BASE_URL = '/api'; const H5_BASE_URL = '/api';
const BASE_URL = IS_TEST?'https://sapi.payairs.com':'https://api.gream.ltd'; const BASE_URL = IS_TEST?'https://sapi.payairs.com':'https://api.gream.ltd';
const H5_MARKET_URL = '/market'; const H5_MARKET_URL = '/market';

5
utils/language/en_US.js

@ -11,6 +11,9 @@ export default {
// 登陆相关页面 // 登陆相关页面
login: { login: {
Confirm: 'Confirm',
Cancel: 'Cancel',
Versionupdate:'Version update', Versionupdate:'Version update',
copySuccess:'Copied', copySuccess:'Copied',
Purchasesucceeded:'Purchase succeeded', Purchasesucceeded:'Purchase succeeded',
@ -197,7 +200,7 @@ export default {
message: `Minimum deposit amount: {rechargeMinAmount} {enname}. Deposit less than the minimum amount will not be posted and cannot be returned message: `Minimum deposit amount: {rechargeMinAmount} {enname}. Deposit less than the minimum amount will not be posted and cannot be returned
This address is your latest deposit address. When the system receives deposit, it will be automatically credited to the account.The transfer needs to be confirmed by the entire blockchain network. When it reaches 10 network confirmations, your {enname} will be automatically deposit into the account.`, This address is your latest deposit address. When the system receives deposit, it will be automatically credited to the account.The transfer needs to be confirmed by the entire blockchain network. When it reaches 10 network confirmations, your {enname} will be automatically deposit into the account.`,
selectAmount: 'Please select the amount to deposit', selectAmount: 'Please select the amount to deposit',
EnterNumber: 'Enter 100-1000000', EnterNumber: 'Enter',
RechargeMethod: 'Recharge method', RechargeMethod: 'Recharge method',
Submit: 'Submit', Submit: 'Submit',
RechargeRecord: 'Recharge Record', RechargeRecord: 'Recharge Record',

5
utils/language/vi_VN.js

@ -11,6 +11,9 @@ export default {
// 登陆相关页面 // 登陆相关页面
login: { login: {
Confirm: 'xác nhận',
Cancel: 'Hủy bỏ',
Versionupdate: 'cập nhật phiên bản mới', Versionupdate: 'cập nhật phiên bản mới',
copySuccess: 'đã sao chép', copySuccess: 'đã sao chép',
Purchasesucceeded: 'mua thành công', Purchasesucceeded: 'mua thành công',
@ -193,7 +196,7 @@ export default {
ScanQR: 'Quét mã QR ở trên để lấy địa chỉ gửi tiền', ScanQR: 'Quét mã QR ở trên để lấy địa chỉ gửi tiền',
message: '最低充值金額:{rechargeMinAmount} {enname}。 低於最低金額的押金將不予過帳且不予退還此地址是您最新的充值地址。 系統收到充值後,會自動到賬。轉賬需要整個區塊鍊網絡確認。 當節點確認達到 10 次時,您的 {enname} 將自動存入賬戶。', message: '最低充值金額:{rechargeMinAmount} {enname}。 低於最低金額的押金將不予過帳且不予退還此地址是您最新的充值地址。 系統收到充值後,會自動到賬。轉賬需要整個區塊鍊網絡確認。 當節點確認達到 10 次時,您的 {enname} 將自動存入賬戶。',
selectAmount: 'Vui lòng chọn số tiền nạp', selectAmount: 'Vui lòng chọn số tiền nạp',
EnterNumber: 'Nhập 100-1000000', EnterNumber: 'Nhập',
RechargeMethod: 'Phương thức nạp tiền', RechargeMethod: 'Phương thức nạp tiền',
Submit: 'Gửi đi', Submit: 'Gửi đi',
RechargeRecord: 'Bản ghi nạp tiền', RechargeRecord: 'Bản ghi nạp tiền',

6
utils/language/zh_TW.js

@ -11,6 +11,10 @@ export default {
// 登陆相关页面 // 登陆相关页面
login: { login: {
Confirm: '確認',
Cancel: '取消',
Versionupdate:'版本更新', Versionupdate:'版本更新',
copySuccess:'已復制', copySuccess:'已復制',
Purchasesucceeded:'購買成功', Purchasesucceeded:'購買成功',
@ -198,7 +202,7 @@ export default {
message: `最低充值金額:{rechargeMinAmount} {enname}。 低於最低充值金額將不予過帳且不予退還 message: `最低充值金額:{rechargeMinAmount} {enname}。 低於最低充值金額將不予過帳且不予退還
此地址是您最新的充值地址 系統收到充值後會自動到賬轉賬需要整個區塊鍊網絡確認 當節點確認達到 10 次時您的 {enname} 將自動存入賬戶`, 此地址是您最新的充值地址 系統收到充值後會自動到賬轉賬需要整個區塊鍊網絡確認 當節點確認達到 10 次時您的 {enname} 將自動存入賬戶`,
selectAmount: '請選擇充值金額', selectAmount: '請選擇充值金額',
EnterNumber: '輸入 100-1000000', EnterNumber: '輸入',
RechargeMethod: '充值方式', RechargeMethod: '充值方式',
Submit: '提交', Submit: '提交',
RechargeRecord: '充值記錄', RechargeRecord: '充值記錄',

Loading…
Cancel
Save