diff --git a/App.vue b/App.vue index 1a03a41..15a77ff 100644 --- a/App.vue +++ b/App.vue @@ -45,9 +45,9 @@ } // #endif // #ifdef APP-PLUS - if (store.state.userInfo.token) { - socket.init(); - } + // if (store.state.userInfo.token) { + // socket.init(); + // } APPUpdate(); // #endif }, diff --git a/config/baseUrl.js b/config/baseUrl.js index 15585ba..ed3b57a 100644 --- a/config/baseUrl.js +++ b/config/baseUrl.js @@ -4,11 +4,11 @@ if (process.env.NODE_ENV === 'development') { // 开发环境 // baseUrl = "http://localhost:7001/"; // socketUrl = "ws://localhost:6001/"; - baseUrl = "http://api.dxmt.io"; + baseUrl = "https://api.dxmt.io"; //socketUrl = "ws://8.129.186.35:6001/"; } else if (process.env.NODE_ENV === 'production') { // 生产环境 - baseUrl = "http://api.dxmt.io"; + baseUrl = "https://api.dxmt.io"; //socketUrl = "ws://8.129.186.35:6001/"; } const courtConfig = { diff --git a/config/requestConfig.js b/config/requestConfig.js index 1f4e35b..811176d 100644 --- a/config/requestConfig.js +++ b/config/requestConfig.js @@ -180,10 +180,22 @@ $http.dataFactory = async function(res) { // uni.navigateTo({ // url:'/pages/mine/index' // }) + const savedLocale = uni.getStorageSync('locale') || 'en'; + let msg = ''; + if(savedLocale == 'zh'){ + console.log(httpData.msg) + if(httpData.msg.indexOf('limit of uncompleted orders') > 0){ + msg = '订单已达上限,请完成该订单或者15分钟后再试'; + }else{ + msg = httpData.msg; + } + }else{ + msg = httpData.msg; + } //其他错误提示 if (res.isPrompt) { uni.showToast({ - title: httpData.info || httpData.msg, + title: httpData.info || msg, icon: "none", duration: 3000 }); @@ -191,7 +203,7 @@ $http.dataFactory = async function(res) { // 返回错误的结果(catch接受数据) return Promise.reject({ statusCode: 0, - errMsg: "【request】" + (httpData.info || httpData.msg) + errMsg: "【request】" + (httpData.info || msg) }); } @@ -211,10 +223,10 @@ $http.requestError = function(e){ if(e.statusCode === 0){ throw e; } else { - uni.showToast({ - title: "网络错误,请检查一下网络", - icon: "none" - }); + // uni.showToast({ + // title: "网络错误,请检查一下网络", + // icon: "none" + // }); } } export default $http; diff --git a/locales/en.json b/locales/en.json index 7755d44..bc72f0d 100644 --- a/locales/en.json +++ b/locales/en.json @@ -22,7 +22,8 @@ "send_fail":"Send Fail", "loading":"loading...", "gallery":"gallery", - "camera":"camera" + "camera":"camera", + "primq5x5u38kuch8iwpeemy87y": "MT Global official group" }, "setIndex":{ "title": "setting", @@ -93,7 +94,9 @@ "text7": "To answer", "text8": "Answer time", "text9": "Details", - "text10": "Done" + "text10": "Done", + "text11": "Reward", + "text12": "Cycle" }, "Select": { "title": "Select", @@ -166,8 +169,8 @@ "text19": "Email is empty", "text20": "Email address error", "text21": "Please enter a 6-10 digit password", - "text22": "Two passwords are inconsistent" - + "text22": "Two passwords are inconsistent", + "text23": "Code" }, "personal":{ "title": "Personal details", @@ -215,7 +218,9 @@ "text12": "Please enter the correct email address", "text13": "Already have an account?", "text14": "Please enter a 6-10 digit password", - "text15": "Two passwords are inconsistent" + "text15": "Two passwords are inconsistent", + "text16": "Invite code", + "text17": "Sign up now" }, "putforward":{ "title": "Put forward", @@ -278,7 +283,8 @@ "text2": "Accumulated earnings", "text3": "Cash withdrawn", "text4": "Wallet fund records", - "text5": "View details" + "text5": "View details", + "text6": "After" }, "fundrecords":{ "title": "Wallet fund records", @@ -312,7 +318,11 @@ "text8": "View all", "text9": "Join date", "text10": "KPI results", - "text11": "Total Team Size" + "text11": "Total Team Size", + "text12": "Identity", + "text13": "User", + "text14": "channel provider", + "text15": "VIP" }, "invite": { "text1": "Save", @@ -386,7 +396,8 @@ "text22": "Behavior pattern simulation", "text23": "Equipment environment quarantine", "text24": "Core advantage", - "text25": "Select Language" + "text25": "Select Language", + "text26": "{par} purchased {par1} on {par2}" }, "nav":{ "home": "Home", diff --git a/locales/zh.json b/locales/zh.json index 89ee66a..42ea747 100644 --- a/locales/zh.json +++ b/locales/zh.json @@ -22,7 +22,8 @@ "send_fail":"发送失败", "loading":"加载中...", "gallery":"照片", - "camera":"相机" + "camera":"相机", + "primq5x5u38kuch8iwpeemy87y": "MT全球官方社群" }, "setIndex":{ "title": "设置", @@ -50,7 +51,7 @@ "text13": "邮箱地址错误", "text14": "发送成功", "text15": "在{par}之后发送", - "text16": "请输入6-10位纯数字密码", + "text16": "请输入6-10位密码", "text17": "两个密码不一致" }, "setPin":{ @@ -89,11 +90,13 @@ "text3": "已完成", "text4": "已答题", "text5": "周期", - "text6": "奖励", + "text6": "报酬", "text7": "去答题", "text8": "答题时间", "text9": "详情", - "text10": "已完成" + "text10": "已完成", + "text11": "报酬", + "text12": "周期" }, "Select": { "title": "选择", @@ -155,7 +158,7 @@ "text8": "重新发送", "text9": "修改密码", "text10": "不要担心忘记密码,你可以把它改成一个你能记住的密码。", - "text11": "密码", + "text11": "登录密码", "text12": "请输入您的密码", "text13": "确认密码", "text14": "请输入您的确认密码", @@ -166,8 +169,8 @@ "text19": "请输入邮箱", "text20": "邮箱地址错误", "text21": "请输入6-10位数字密码", - "text22": "两次输入密码不一致" - + "text22": "两次输入密码不一致", + "text23": "验证码" }, "personal":{ "title": "个人信息", @@ -181,7 +184,7 @@ }, "login":{ "title": "登录", - "text1": "调查问卷", + "text1": "问卷调查", "text2": "登录您的帐户", "text3": "输入您的邮箱和密码登录", "text4": "请输入您的邮箱地址", @@ -215,7 +218,9 @@ "text12": "请输入正确的邮箱地址", "text13": "已经有账户了吗?", "text14": "请输入6-10位数字密码", - "text15": "两个密码不一致" + "text15": "两个密码不一致", + "text16": "邀请码", + "text17": "立即注册" }, "putforward":{ "title": "提现", @@ -278,7 +283,8 @@ "text2": "累计收益", "text3": "已提金额", "text4": "钱包资金记录", - "text5": "查看详情" + "text5": "查看详情", + "text6": "余额" }, "fundrecords":{ "title": "钱包资金记录", @@ -306,16 +312,20 @@ "text2": "我的社区", "text3": "团队总人数", "text4": "分享总人数", - "text5": "KPI业绩-大区", - "text6": "KPI业绩-小区", + "text5": "KPI业绩-大市场", + "text6": "KPI业绩-小市场", "text7": "分享列表", "text8": "查看所有", "text9": "注册时间", "text10": "KPI业绩", - "text11": "团队总人数" + "text11": "团队总人数", + "text12": "身份", + "text13": "普通用户", + "text14": "渠道商", + "text15": "VIP" }, "invite": { - "text1": "保持", + "text1": "保存", "text2": "分享", "text3": "长按并保存", "text4": "正在下载海报" @@ -371,7 +381,7 @@ "text7": "邀请朋友获得高额佣金", "text8": "查看详情", "text9": "已答题", - "text10": "奖励", + "text10": "报酬", "text11": "查看所有", "text12": "新技术的应用(自动化工具/人工智能辅助)", "text13": "智能答题引擎", @@ -386,7 +396,8 @@ "text22": "行为模式模拟", "text23": "设备环境隔离", "text24": "核心优势", - "text25": "选择语言" + "text25": "选择语言", + "text26": "用户 {par} 于 {par2} 购买了 {par1}" }, "nav":{ "home": "首页", @@ -398,7 +409,7 @@ "gotoLogin":{ "title": "登录提醒", "content": "您还未登录,立即登录~", - "login": "去登陆", + "login": "去登录", "cancel": "取消" } } \ No newline at end of file diff --git a/main.js b/main.js index dda87b0..5296ef0 100644 --- a/main.js +++ b/main.js @@ -24,7 +24,7 @@ import VueI18n from 'vue-i18n'; import en from './locales/en.json'; // 引入英文语言包 import zh from './locales/zh.json'; // 引入中文语言包 Vue.use(VueI18n); // 使用vue-i18n插件 -const savedLocale = localStorage.getItem('locale') || 'en'; +const savedLocale = uni.getStorageSync('locale') || 'en'; const i18n = new VueI18n({ locale: savedLocale, // 设置默认语言 messages: { // 设置语言环境信息 diff --git a/manifest.json b/manifest.json index 7dacef2..4a70b22 100644 --- a/manifest.json +++ b/manifest.json @@ -9,8 +9,8 @@ "src" : "图片路径" } ], - "versionName" : "1.0.7", - "versionCode" : 107, + "versionName" : "2.1.6", + "versionCode" : 216, "app-plus" : { "softinputMode" : "adjustResize", "statusBarAppearance" : "dark", diff --git a/package-lock.json b/package-lock.json index b5424c2..1f5ae5f 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,13 +13,15 @@ }, "node_modules/@dcloudio/uni-ui": { "version": "1.5.7", - "resolved": "https://registry.npmmirror.com/@dcloudio/uni-ui/-/uni-ui-1.5.7.tgz", - "integrity": "sha512-DugxSIrQrze1FLdUOj9a+JEQ0bHGjnJTcGUK1mN/MivKg7nuKJBRWk5Ipa9sUdoBznX6ndz5h2e7Uao6x1CdCw==" + "resolved": "https://registry.npmjs.org/@dcloudio/uni-ui/-/uni-ui-1.5.7.tgz", + "integrity": "sha512-DugxSIrQrze1FLdUOj9a+JEQ0bHGjnJTcGUK1mN/MivKg7nuKJBRWk5Ipa9sUdoBznX6ndz5h2e7Uao6x1CdCw==", + "license": "Apache-2.0" }, "node_modules/clipboard": { "version": "2.0.11", - "resolved": "https://registry.npmmirror.com/clipboard/-/clipboard-2.0.11.tgz", + "resolved": "https://registry.npmjs.org/clipboard/-/clipboard-2.0.11.tgz", "integrity": "sha512-C+0bbOqkezLIsmWSvlsXS0Q0bmkugu7jcfMIACB+RDEntIzQIkdr148we28AfSloQLRdZlYL/QYyrq05j/3Faw==", + "license": "MIT", "dependencies": { "good-listener": "^1.2.2", "select": "^1.1.2", @@ -28,26 +30,30 @@ }, "node_modules/delegate": { "version": "3.2.0", - "resolved": "https://registry.npmmirror.com/delegate/-/delegate-3.2.0.tgz", - "integrity": "sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw==" + "resolved": "https://registry.npmjs.org/delegate/-/delegate-3.2.0.tgz", + "integrity": "sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw==", + "license": "MIT" }, "node_modules/good-listener": { "version": "1.2.2", - "resolved": "https://registry.npmmirror.com/good-listener/-/good-listener-1.2.2.tgz", + "resolved": "https://registry.npmjs.org/good-listener/-/good-listener-1.2.2.tgz", "integrity": "sha512-goW1b+d9q/HIwbVYZzZ6SsTr4IgE+WA44A0GmPIQstuOrgsFcT7VEJ48nmr9GaRtNu0XTKacFLGnBPAM6Afouw==", + "license": "MIT", "dependencies": { "delegate": "^3.1.2" } }, "node_modules/select": { "version": "1.1.2", - "resolved": "https://registry.npmmirror.com/select/-/select-1.1.2.tgz", - "integrity": "sha512-OwpTSOfy6xSs1+pwcNrv0RBMOzI39Lp3qQKUTPVVPRjCdNa5JH/oPRiqsesIskK8TVgmRiHwO4KXlV2Li9dANA==" + "resolved": "https://registry.npmjs.org/select/-/select-1.1.2.tgz", + "integrity": "sha512-OwpTSOfy6xSs1+pwcNrv0RBMOzI39Lp3qQKUTPVVPRjCdNa5JH/oPRiqsesIskK8TVgmRiHwO4KXlV2Li9dANA==", + "license": "MIT" }, "node_modules/tiny-emitter": { "version": "2.1.0", - "resolved": "https://registry.npmmirror.com/tiny-emitter/-/tiny-emitter-2.1.0.tgz", - "integrity": "sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q==" + "resolved": "https://registry.npmjs.org/tiny-emitter/-/tiny-emitter-2.1.0.tgz", + "integrity": "sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q==", + "license": "MIT" }, "node_modules/tki-qrcode": { "version": "0.1.6", @@ -57,17 +63,19 @@ }, "node_modules/vue-clipboard2": { "version": "0.3.3", - "resolved": "https://registry.npmmirror.com/vue-clipboard2/-/vue-clipboard2-0.3.3.tgz", + "resolved": "https://registry.npmjs.org/vue-clipboard2/-/vue-clipboard2-0.3.3.tgz", "integrity": "sha512-aNWXIL2DKgJyY/1OOeITwAQz1fHaCIGvUFHf9h8UcoQBG5a74MkdhS/xqoYe7DNZdQmZRL+TAdIbtUs9OyVjbw==", + "license": "MIT", "dependencies": { "clipboard": "^2.0.0" } }, "node_modules/vue-i18n": { "version": "8.28.2", - "resolved": "https://registry.npmmirror.com/vue-i18n/-/vue-i18n-8.28.2.tgz", + "resolved": "https://registry.npmjs.org/vue-i18n/-/vue-i18n-8.28.2.tgz", "integrity": "sha512-C5GZjs1tYlAqjwymaaCPDjCyGo10ajUphiwA922jKt9n7KPpqR7oM1PCwYzhB/E7+nT3wfdG3oRre5raIT1rKA==", - "deprecated": "Vue I18n v8.x has reached EOL and is no longer actively maintained. About maintenance status, see https://vue-i18n.intlify.dev/guide/maintenance.html" + "deprecated": "Vue I18n v8.x has reached EOL and is no longer actively maintained. About maintenance status, see https://vue-i18n.intlify.dev/guide/maintenance.html", + "license": "MIT" } } } diff --git a/package.json b/package.json index 745a0be..e8ac588 100644 --- a/package.json +++ b/package.json @@ -5,4 +5,4 @@ "vue-clipboard2": "^0.3.3", "vue-i18n": "^8.28.2" } -} +} \ No newline at end of file diff --git a/pages.json b/pages.json index 202aee1..039f47d 100644 --- a/pages.json +++ b/pages.json @@ -558,6 +558,13 @@ { "navigationBarTitleText": "detail" } + }, + { + "path" : "pages/promotion/invitesignup", + "style" : + { + "navigationBarTitleText" : "" + } } ], "globalStyle": { diff --git a/pages/Setting/languages.vue b/pages/Setting/languages.vue index 653e233..307c32a 100644 --- a/pages/Setting/languages.vue +++ b/pages/Setting/languages.vue @@ -61,7 +61,7 @@ }, changeLang(l){ this.$i18n.locale = l; - localStorage.setItem('locale', l); + uni.setStorageSync('locale', l); setTimeout(() => { uni.navigateBack(); }, 500); diff --git a/pages/Setting/setPasswork.vue b/pages/Setting/setPasswork.vue index 5346aec..ca2c7cc 100644 --- a/pages/Setting/setPasswork.vue +++ b/pages/Setting/setPasswork.vue @@ -88,7 +88,7 @@ sendCode(){ this.isSend = true; if (!this.$base.mailRegular.test(this.model.email)) { - uni.showToast({title: this.$t('setPasswork.text13'), icon:'error'}); + uni.showToast({title: this.$t('setPasswork.text13'), icon:'none'}); return; } let s = 120; @@ -119,15 +119,15 @@ submit(){ this.$refs.model.validate().then(res=>{ if (!this.$base.mailRegular.test(this.model.email)) { - uni.showToast({title: this.$t('setPasswork.text13'), icon:'error'}); + uni.showToast({title: this.$t('setPasswork.text13'), icon:'none'}); return; } if (!this.$base.passwordRegular.test(this.model.password)) { - uni.showToast({title: this.$t('setPasswork.text16'), icon:'error'}); + uni.showToast({title: this.$t('setPasswork.text16'), icon:'none'}); return; } if (this.model.cpassword !== this.model.password) { - uni.showToast({title: this.$t('setPasswork.text17'), icon:'error'}); + uni.showToast({title: this.$t('setPasswork.text17'), icon:'none'}); return; } this.$http.post('/api/common/resetpwd', {email: this.model.email, newpassword: this.model.password, code: this.model.code}).then(res => { diff --git a/pages/about/help.vue b/pages/about/help.vue index da9e765..68cee19 100644 --- a/pages/about/help.vue +++ b/pages/about/help.vue @@ -153,19 +153,22 @@ // #endif }, copy(val = '') { - const textArea = document.createElement('textarea'); - textArea.value = val; - document.body.appendChild(textArea); - textArea.select(); - try { - document.execCommand('copy'); - uni.showToast({ - title: this.$t('copySuccess') - }); - } catch (err) { - console.error('Could not copy text: ', err); - } - document.body.removeChild(textArea); + // #ifdef APP-PLUS + uni.setClipboardData({ + data: val, // e是你要保存的内容 + success: function () { + uni.showToast({ + title:this.$t('copySuccess'), + icon:'none' + }) + } + }) + // #endif + // #ifdef H5 + this.$copyText(val).then(res => { + uni.showToast({title: this.$t('copySuccess'), icon: 'none'}); + }); + // #endif }, // open1(v){ // switch(this.type){ diff --git a/pages/address/index.vue b/pages/address/index.vue index 2eab0fc..acbebf4 100644 --- a/pages/address/index.vue +++ b/pages/address/index.vue @@ -36,17 +36,20 @@ return { list:[], page: 1, - limit: 10 + limit: 10, + lastPage: 1, }; }, computed: { }, //第一次加载 onLoad(e) { - this.getlist(); + }, //页面显示 - onShow() {}, + onShow() { + this.getlist(); + }, //方法 methods: { ...mapMutations(['setUserInfo']), @@ -58,7 +61,10 @@ } this.$http.post('/api/address/list', data).then(res => { if(res.code == 0){ - this.list = res.data.data; + res.data.data.forEach(item => { + this.list.push(item); + }); + this.lastPage = res.data.last_page; } }); }, @@ -90,21 +96,11 @@ onPullDownRefresh() {}, //页面上拉触底 onReachBottom() { - this.page = this.page + 1; - let data = { - page: this.page, - limit: this.limit, - lang: this.$i18n.locale + if(this.page { - if(res.code == 0){ - res.data.data.forEach(item => { - this.list.push(item); - }); - } - }).catch(err => { - this.page = this.page - 1; - }); + }, //用户点击分享 onShareAppMessage(e) { diff --git a/pages/im/chat.vue b/pages/im/chat.vue index 2b307a9..452c8bb 100644 --- a/pages/im/chat.vue +++ b/pages/im/chat.vue @@ -163,7 +163,7 @@ export default { data() { return { init: { - cdnurl: 'http://api.dxmt.io' + cdnurl: 'https://api.dxmt.io' }, channel:{}, // 滚动容器 diff --git a/pages/im/index.vue b/pages/im/index.vue index 5f51113..ecae290 100644 --- a/pages/im/index.vue +++ b/pages/im/index.vue @@ -45,8 +45,8 @@ v-if="item.id" :key="`${item.id}`" :avatar-circle="true" - :title="item.display_name || item.name || item.nickname || item.email" - :avatar="item.id==='bkgjcxzi9j8wimrumt1nfosbgr' ? '/static/im/kefu1.png' : getAvatarUrl(item)" + :title="gettitle(item.display_name) || item.name || item.nickname || item.email" + :avatar="item.id==='primq5x5u38kuch8iwpeemy87y' ? '/static/im/kefu1.png' : getAvatarUrl(item)" :note="item.last_msg ? (item.last_msg_type === 'image' ? $t('im.pic_msg') : item.last_msg) : $t('im.msg_none')" :time="item.last_post_at ? date(item.last_post_at) : ''" :badge-text="item.unread_count > 0 ? (item.unread_count > 99 ? '99+' : item.unread_count) : ''" @@ -154,6 +154,17 @@ }, methods: { ...mapMutations(['setUserInfo']), + gettitle(title){ + if(this.$i18n.locale == 'zh' && title){ + if(title.indexOf('official group')>0){ + return "MT全球官方社群"; + } + if(title.indexOf("Inviter") >= 0){ + return "邀请人"; + } + } + return title; + }, async init(){ try { if(!this.userInfo.token || !this.userInfo.im_token){ @@ -168,7 +179,7 @@ const initRes = await this.$http.get('/api/common/init?lang=' + this.$i18n.locale); if (initRes.code === 0) { this.config = initRes.data; - this.config.cdnurl = initRes.data.cdnurl || "http://www.dxmt.io"; + this.config.cdnurl = initRes.data.cdnurl || "https://www.dxmt.io"; } // 检查 Mattermost 连接状态 @@ -182,7 +193,7 @@ } catch (error) { console.error('页面加载失败:', error); uni.showToast({ - title: 'im.loading_fail', + title: $t('im.loading_fail'), icon: 'none' }); } @@ -427,10 +438,10 @@ } } catch (error) { console.error('获取客服列表失败:', error); - uni.showToast({ - title: error.message || '获取客服列表失败', - icon: 'none' - }); + // uni.showToast({ + // title: error.message || '获取客服列表失败', + // icon: 'none' + // }); } }, goto(url,type){ diff --git a/pages/im/member.vue b/pages/im/member.vue index aabc011..249db3f 100644 --- a/pages/im/member.vue +++ b/pages/im/member.vue @@ -109,7 +109,7 @@ const initRes = await this.$http.get('/api/common/init?lang=' + this.$i18n.locale); if (initRes.code === 0) { this.config = initRes.data; - this.config.cdnurl = initRes.data.cdnurl || "http://www.dxmt.io"; + this.config.cdnurl = initRes.data.cdnurl || "https://www.dxmt.io"; } // 检查 Mattermost 连接状态 diff --git a/pages/index/index.vue b/pages/index/index.vue index d4fbcaa..a1e67c3 100644 --- a/pages/index/index.vue +++ b/pages/index/index.vue @@ -8,7 +8,7 @@ --> EN - ZH + 中文 @@ -98,7 +98,7 @@ {{$t('index.text10')}}: ${{parseFloat(item.interest_rate).toFixed(2)}} - + @@ -117,9 +117,9 @@ {{$t('index.text12')}} - 1. {{$t('index.text13')}}
- 2. {{$t('index.text14')}}
- 3. {{$t('index.text15')}} + {{$t('index.text13')}}
+ {{$t('index.text14')}}
+ {{$t('index.text15')}}
@@ -128,9 +128,9 @@ {{$t('index.text16')}} - 1. {{$t('index.text17')}}
- 2. {{$t('index.text18')}}
- 3. {{$t('index.text19')}} + {{$t('index.text17')}}
+ {{$t('index.text18')}}
+ {{$t('index.text19')}}
@@ -139,9 +139,9 @@ {{$t('index.text20')}} - 1. {{$t('index.text21')}}
- 2. {{$t('index.text22')}}
- 3. {{$t('index.text23')}} + {{$t('index.text21')}}
+ {{$t('index.text22')}}
+ {{$t('index.text23')}}
@@ -208,7 +208,7 @@ this.user = res; }); } - this.$http.get('/api/withdrawl/recent').then(res => { + this.$http.get('/api/role/recent?lang='+this.$i18n.locale).then(res => { if(res.code == 0){ this.notices = res.data; } @@ -240,7 +240,7 @@ }, switchlan(l){ this.$i18n.locale = l; - localStorage.setItem('locale', l); + uni.setStorageSync('locale', l) this.$refs.popup.close(); }, onTokenJump(url) { @@ -275,12 +275,12 @@ }); }, getcash(o){ - var email = o.user.email; + var email = o.username; let username = email.split('@')[0]; // 获取用户名部分 let domain = email.split('@')[1]; // 获取域名部分 let midIndex = Math.floor(username.length / 2) - 2; // 计算中间两个字符的起始索引 let censoredEmail = username.slice(0, midIndex) + "****" + username.slice(midIndex + 4) + '@' + domain; - return censoredEmail + this.$t('index.text5', {par: parseFloat(o.deduction_amount).toFixed(2)}) + return this.$t('index.text26', {par: censoredEmail, par1: o.role, par2: o.created_at.slice(0,10) }) } }, //页面隐藏 diff --git a/pages/mine/index.vue b/pages/mine/index.vue index 4ba63f9..785eb57 100644 --- a/pages/mine/index.vue +++ b/pages/mine/index.vue @@ -72,7 +72,7 @@ - + {{$t('mine.text9')}} @@ -80,7 +80,7 @@ - + {{$t('mine.text10')}} @@ -238,19 +238,22 @@ } }, copy(val = ''){ - const textArea = document.createElement('textarea'); - textArea.value = val; - document.body.appendChild(textArea); - textArea.select(); - try { - document.execCommand('copy'); - uni.showToast({ - title: this.$t('copySuccess') - }); - } catch (err) { - console.error('Could not copy text: ', err); - } - document.body.removeChild(textArea); + // #ifdef APP-PLUS + uni.setClipboardData({ + data: val, // e是你要保存的内容 + success: function () { + uni.showToast({ + title:this.$t('copySuccess'), + icon:'none' + }) + } + }) + // #endif + // #ifdef H5 + this.$copyText(val).then(res => { + uni.showToast({title: this.$t('copySuccess'), icon: 'none'}); + }); + // #endif }, } } diff --git a/pages/mine/login.vue b/pages/mine/login.vue index 95c1e91..1147c13 100644 --- a/pages/mine/login.vue +++ b/pages/mine/login.vue @@ -21,7 +21,7 @@ {{$t('login.text6')}} - + {{$t('login.text7')}} {{$t('login.text8')}} @@ -77,6 +77,7 @@ }) }, login(){ + this.$refs.loginModel.validate().then(res=>{ if (!this.$base.mailRegular.test(this.loginModel.username)) { uni.showToast({title: this.$t('setPasswork.text13'), icon:'error'}); diff --git a/pages/mine/notice.vue b/pages/mine/notice.vue index 9a42051..f49029d 100644 --- a/pages/mine/notice.vue +++ b/pages/mine/notice.vue @@ -38,6 +38,7 @@ list: [], page: 1, limit: 10, + lastPage: 1, }; }, computed: { @@ -62,7 +63,8 @@ if(res.code == 0){ res.data.data.forEach(item => { this.list.push(item); - }) + }); + this.lastPage = res.data.last_page; } }); }, @@ -112,22 +114,10 @@ }, //页面上拉触底 onReachBottom() { - this.page = this.page + 1; - let data = { - category_id: 10, - page: this.page, - limit: this.limit, - lang: this.$i18n.locale + if(this.page { - if(res.code == 0){ - res.data.data.forEach(item => { - this.list.push(item); - }) - } - }).catch(err => { - this.page = this.page - 1; - }); }, //用户点击分享 onShareAppMessage(e) { diff --git a/pages/mine/upgrade.vue b/pages/mine/upgrade.vue index a8ad630..481cbc6 100644 --- a/pages/mine/upgrade.vue +++ b/pages/mine/upgrade.vue @@ -106,7 +106,7 @@ methods: { ...mapMutations(['setUserInfo']), change(id){ - if(tihs.rid > id){ + if(this.rid > id){ return; } this.role_id = id; diff --git a/pages/promotion/index.vue b/pages/promotion/index.vue index ce8df96..35187b6 100644 --- a/pages/promotion/index.vue +++ b/pages/promotion/index.vue @@ -56,6 +56,7 @@ ID:{{item.id}}
{{$t('promotion.text9')}}: {{item.created_at}}
+ {{$t('promotion.text12')}}: {{item.role_id<2 ? $t('promotion.text13') : (item.role_id==2 ? $t('promotion.text15') : $t('promotion.text14'))}}
{{$t('promotion.text10')}}: {{parseFloat(item.performance_large).toFixed(4)}}
{{$t('promotion.text11')}}: {{item.total_count}}
@@ -195,19 +196,22 @@ }); }, copy(val = ''){ - const textArea = document.createElement('textarea'); - textArea.value = val; - document.body.appendChild(textArea); - textArea.select(); - try { - document.execCommand('copy'); - uni.showToast({ - title: this.$t('copySuccess') - }); - } catch (err) { - console.error('Could not copy text: ', err); - } - document.body.removeChild(textArea); + // #ifdef APP-PLUS + uni.setClipboardData({ + data: val, // e是你要保存的内容 + success: function () { + uni.showToast({ + title:this.$t('copySuccess'), + icon:'none' + }) + } + }) + // #endif + // #ifdef H5 + this.$copyText(val).then(res => { + uni.showToast({title: this.$t('copySuccess'), icon: 'none'}); + }); + // #endif }, } } diff --git a/pages/promotion/invite.vue b/pages/promotion/invite.vue index 9a928c1..9b27d3e 100644 --- a/pages/promotion/invite.vue +++ b/pages/promotion/invite.vue @@ -1,7 +1,7 @@
@@ -142,9 +144,26 @@ uni.showLoading({ title: this.$t('loading') }); - if(e.id != typeof(undefined) && e.id != undefined){ + if(e.id){ this.isActive = e.id; this.index = e.id; + switch(this.isActive.toString()){ + case '0': + this.select.type = ''; + break; + case '1': + this.select.type = '99999'; + break; + case '2': + this.select.type = '100'; + break; + case '3': + this.select.type = '200'; + break; + case '4': + this.select.type = '300'; + break; + } }; this.$http.get('/api/common/init?lang='+this.$i18n.locale).then(res => { this.init = res.data; diff --git a/pages/wallet/index.vue b/pages/wallet/index.vue index 364a43f..29edc26 100644 --- a/pages/wallet/index.vue +++ b/pages/wallet/index.vue @@ -44,9 +44,9 @@
{{item.type}}{{item.created_at.slice(0, 19)}} - + {{parseFloat(item.amount).toFixed(2)}} USDT - After:{{parseFloat(item.after).toFixed(2)}} + {{$t('wallet.text6')}}:{{parseFloat(item.after).toFixed(4)}} diff --git a/pages/wallet/recharge.vue b/pages/wallet/recharge.vue index 99dc2e7..b361a91 100644 --- a/pages/wallet/recharge.vue +++ b/pages/wallet/recharge.vue @@ -205,26 +205,42 @@ this.qrcode = res.data.order.address; this.icon = this.rechargeModel.network == 'TRC-20' ? '/static/images/s1.png' : '/static/images/s2.png' }else{ - uni.showToast({ - title: res.msg - }) + if(this.$i18n.locale == 'zh'){ + console.log(res.msg) + if(res.msg.indexOf('limit of uncompleted orders') > 0){ + uni.showToast({ + title: '订单已达上限,请完成该订单或者15分钟后再试' + }) + }else{ + uni.showToast({ + title: res.msg + }) + } + }else{ + uni.showToast({ + title: res.msg + }) + } } }); }, copy(val = ''){ - const textArea = document.createElement('textarea'); - textArea.value = val; - document.body.appendChild(textArea); - textArea.select(); - try { - document.execCommand('copy'); - uni.showToast({ - title: this.$t('copySuccess') - }); - } catch (err) { - console.error('Could not copy text: ', err); - } - document.body.removeChild(textArea); + // #ifdef APP-PLUS + uni.setClipboardData({ + data: val, // e是你要保存的内容 + success: function () { + uni.showToast({ + title:this.$t('copySuccess'), + icon:'none' + }) + } + }) + // #endif + // #ifdef H5 + this.$copyText(val).then(res => { + uni.showToast({title: this.$t('copySuccess'), icon: 'none'}); + }); + // #endif }, }, //页面隐藏 diff --git a/plugins/APPUpdate/index.js b/plugins/APPUpdate/index.js index a075ef0..e288ff1 100644 --- a/plugins/APPUpdate/index.js +++ b/plugins/APPUpdate/index.js @@ -4,7 +4,7 @@ // 请求配置说明:https://ext.dcloud.net.cn/plugin?id=822 import $http from '@/config/requestConfig'; /**** 结束 *****/ - +const lang = uni.getStorageSync('locale') || 'en'; const platform = uni.getSystemInfoSync().platform; // 主颜色 const $mainColor = "FF5B78"; @@ -37,9 +37,7 @@ export const getServerNo = function(version,isPrompt = false, callback) { */ /****************以下是示例*******************/ // 可以用自己项目的请求方法 - $http.get("api/common/v1/app_version", httpData,{ - isPrompt: isPrompt - }).then(res => { + $http.get("/api/common/init").then(res => { /* res的数据说明 * | 参数名称 | 一定返回 | 类型 | 描述 * | -------------|--------- | --------- | ------------- | @@ -49,8 +47,16 @@ export const getServerNo = function(version,isPrompt = false, callback) { * | forceUpdate | y | boolean | 是否强制更新 | * | downloadUrl | y | String | 版本下载链接(IOS安装包更新请放跳转store应用商店链接,安卓apk和wgt文件放文件下载链接) | */ - if (res && res.downloadUrl) { - callback && callback(res); + if (res && res.data.client_download_url) { + if(parseInt(version) < parseInt(res.data.client_version)){ + callback && callback({ + versionCode: parseInt(res.data.client_version), + versionName: res.data.soft_version, + versionInfo: "", + forceUpdate: true, + downloadUrl: res.data.client_download_url, + }); + } } else if (isPrompt) { uni.showToast({ title: "暂无新版本", @@ -78,23 +84,23 @@ export const getDownload = function(data) { if (status == 200) { res.change({ progressValue: 100, - progressTip:"正在安装文件...", + progressTip: lang=='en' ? 'installing...' : "正在安装文件...", progress: true, buttonNum: 0 }); plus.runtime.install(download.filename, {}, function() { res.change({ - contentText: "应用资源更新完成!", + contentText: lang=='en' ? 'Application resource update completed' : "应用资源更新完成!", buttonNum: 1, progress: false }); }, function(e) { res.cancel(); - plus.nativeUI.alert("安装文件失败[" + e.code + "]:" + e.message); + plus.nativeUI.alert(lang=='en' ? 'Installation file failed[' + e.code + ']' + e.message : "安装文件失败[" + e.code + "]:" + e.message); }); } else { res.change({ - contentText: "文件下载失败...", + contentText: lang=='en' ? 'File download failed' : "文件下载失败...", buttonNum: 1, progress: false }); @@ -106,14 +112,14 @@ export const getDownload = function(data) { case 1: // 开始 res.change({ progressValue:0, - progressTip:"准备下载...", + progressTip: lang=='en' ? 'Ready to download...' : "准备下载...", progress: true }); break; case 2: // 已连接到服务器 res.change({ progressValue:0, - progressTip:"开始下载...", + progressTip: lang=='en' ? 'Start downloading...' : "开始下载...", progress: true }); break; @@ -123,7 +129,7 @@ export const getDownload = function(data) { lastProgressValue = progress; res.change({ progressValue:progress, - progressTip: "已下载" + progress + "%", + progressTip: lang=='en' ? "Downloaded" + progress + "%" : "已下载" + progress + "%", progress: true }); } @@ -135,7 +141,7 @@ export const getDownload = function(data) { // 取消下载 dtask && dtask.abort(); uni.showToast({ - title: "已取消下载", + title: lang=='en' ? 'Download cancelled' : "已取消下载", icon:"none" }); }, @@ -275,7 +281,7 @@ function updatePopup(data, callback) { { tag: 'font', id: 'title', - text: "发现新版本" + data.versionName, + text: lang=='en' ? "Discover a new version" + data.versionName : "发现新版本" + data.versionName, textStyles: { size: '18px', color: "#333", @@ -358,7 +364,7 @@ function updatePopup(data, callback) { popupViewContentList.push({ tag: 'font', id: 'cancelText', - text: "暂不升级", + text: lang=='en' ? 'Not upgrading temporarily' : "暂不升级", textStyles: { size: '14px', color: "#666", @@ -375,7 +381,7 @@ function updatePopup(data, callback) { popupViewContentList.push({ tag: 'font', id: 'confirmText', - text: "立即升级", + text: lang=='en' ? 'upgrade now' : "立即升级", textStyles: { size: '14px', color: "#FFF", @@ -429,8 +435,8 @@ function downloadPopupDrawing(data){ const viewContentWidth = popupViewWidth - (viewContentPadding * 2); // 弹窗容器高度 let popupViewHeight = viewContentPadding * 3 + 60; - let progressTip = data.progressTip || "准备下载..."; - let contentText = data.contentText || "正在为您更新,请耐心等待"; + let progressTip = data.progressTip || lang=='en' ? 'Ready to download' :"准备下载..."; + let contentText = data.contentText || lang=='en' ? 'We are updating for you, please be patient' :"正在为您更新,请耐心等待"; let elementList = [ { tag: 'rect', //背景色 @@ -539,7 +545,7 @@ function downloadPopupDrawing(data){ { tag: 'font', id: 'cancelText', - text: "取消下载", + text: lang=='en' ? 'Cancel Download' :"取消下载", textStyles: { size: '14px', color: "#666", @@ -556,7 +562,7 @@ function downloadPopupDrawing(data){ { tag: 'font', id: 'confirmText', - text: "后台下载", + text: lang=='en' ? 'Backend download' :"后台下载", textStyles: { size: '14px', color: "#FFF", @@ -591,7 +597,7 @@ function downloadPopupDrawing(data){ { tag: 'font', id: 'confirmText', - text: "关闭", + text: lang=='en' ? 'close' :"关闭", textStyles: { size: '14px', color: "#FFF", diff --git a/static/im/mattermost.js b/static/im/mattermost.js index 1aaa7ba..23f4e78 100644 --- a/static/im/mattermost.js +++ b/static/im/mattermost.js @@ -22,7 +22,7 @@ class MattermostClient { this.reconnectTimer = null; // 心跳相关 - this.heartbeatInterval = 30000; // 30秒 + this.heartbeatInterval = 10000; // 30秒 this.heartbeatTimer = null; this.lastHeartbeatResponse = Date.now(); diff --git a/static/images/s9.png b/static/images/s9.png new file mode 100644 index 0000000..f67c599 Binary files /dev/null and b/static/images/s9.png differ