This commit is contained in:
xx 2025-06-15 22:12:30 +08:00
parent 671b357c44
commit 61f6c9514d
35 changed files with 735 additions and 288 deletions

View File

@ -45,9 +45,9 @@
}
// #endif
// #ifdef APP-PLUS
if (store.state.userInfo.token) {
socket.init();
}
// if (store.state.userInfo.token) {
// socket.init();
// }
APPUpdate();
// #endif
},

View File

@ -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 = {

View File

@ -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;

View File

@ -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",

View File

@ -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": "取消"
}
}

View File

@ -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: { // 设置语言环境信息

View File

@ -9,8 +9,8 @@
"src" : "图片路径"
}
],
"versionName" : "1.0.7",
"versionCode" : 107,
"versionName" : "2.1.6",
"versionCode" : 216,
"app-plus" : {
"softinputMode" : "adjustResize",
"statusBarAppearance" : "dark",

34
package-lock.json generated
View File

@ -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"
}
}
}

View File

@ -5,4 +5,4 @@
"vue-clipboard2": "^0.3.3",
"vue-i18n": "^8.28.2"
}
}
}

View File

@ -558,6 +558,13 @@
{
"navigationBarTitleText": "detail"
}
},
{
"path" : "pages/promotion/invitesignup",
"style" :
{
"navigationBarTitleText" : ""
}
}
],
"globalStyle": {

View File

@ -61,7 +61,7 @@
},
changeLang(l){
this.$i18n.locale = l;
localStorage.setItem('locale', l);
uni.setStorageSync('locale', l);
setTimeout(() => {
uni.navigateBack();
}, 500);

View File

@ -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 => {

View File

@ -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){

View File

@ -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<this.lastPage){
this.page = this.page + 1;
this.getlist();
}
this.$http.post('/api/address/list', data).then(res => {
if(res.code == 0){
res.data.data.forEach(item => {
this.list.push(item);
});
}
}).catch(err => {
this.page = this.page - 1;
});
},
//
onShareAppMessage(e) {

View File

@ -163,7 +163,7 @@ export default {
data() {
return {
init: {
cdnurl: 'http://api.dxmt.io'
cdnurl: 'https://api.dxmt.io'
},
channel:{},
//

View File

@ -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){

View File

@ -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

View File

@ -8,7 +8,7 @@
<uni-icons size="30" type="notification" style="margin-left: 40rpx;"></uni-icons>
</uni-badge> -->
<span style="float: right; margin-left: 10rpx; font-size: 28rpx;" v-if="$i18n.locale == 'en'">EN</span>
<span style="float: right; margin-left: 10rpx; font-size: 28rpx;" v-if="$i18n.locale == 'zh'">ZH</span>
<span style="float: right; margin-left: 10rpx; font-size: 28rpx;" v-if="$i18n.locale == 'zh'">中文</span>
<image src="/static/images/earth.png" style="width: 40rpx; height: 40rpx; float: right;"></image>
</view>
<view style="clear: both;"></view>
@ -98,7 +98,7 @@
{{$t('index.text10')}}: <span style="font-size: 40rpx;">${{parseFloat(item.interest_rate).toFixed(2)}} </span>
</view>
<view style="float: right;">
<button type="primary" class="b" @click="onTokenJump('/pages/questionnaire/details?id='+item.id)">To answer</button>
<button type="primary" class="b" @click="onTokenJump('/pages/questionnaire/details?id='+item.id)">{{$t('Questionnaire.text7')}}</button>
</view>
</view>
</uni-col>
@ -117,9 +117,9 @@
{{$t('index.text12')}}
</view>
<view style="text-align: center; margin-top: 20rpx; color: #999; font-size: 26rpx;">
1.&nbsp;{{$t('index.text13')}}<br>
2.&nbsp;{{$t('index.text14')}}<br>
3.&nbsp;{{$t('index.text15')}}
{{$t('index.text13')}}<br>
{{$t('index.text14')}}<br>
{{$t('index.text15')}}
</view>
</view>
<view class="v2">
@ -128,9 +128,9 @@
{{$t('index.text16')}}
</view>
<view style="text-align: center; margin-top: 20rpx; color: #999; font-size: 26rpx;">
1.&nbsp;{{$t('index.text17')}}<br>
2.&nbsp;{{$t('index.text18')}}<br>
3.&nbsp;{{$t('index.text19')}}
{{$t('index.text17')}}<br>
{{$t('index.text18')}}<br>
{{$t('index.text19')}}
</view>
</view>
<view class="v2">
@ -139,9 +139,9 @@
{{$t('index.text20')}}
</view>
<view style="text-align: center; margin-top: 20rpx; color: #999; font-size: 26rpx;">
1.&nbsp;{{$t('index.text21')}}<br>
2.&nbsp;{{$t('index.text22')}}<br>
3.&nbsp;{{$t('index.text23')}}
{{$t('index.text21')}}<br>
{{$t('index.text22')}}<br>
{{$t('index.text23')}}
</view>
</view>
</uni-section>
@ -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) })
}
},
//

View File

@ -72,7 +72,7 @@
</view>
</uni-col>
<uni-col :span="24" style="margin-top: 20rpx;">
<view class="wallet" style="padding: 40rpx 20rpx;" @click="onPageJump('/pages/about/help')">
<view class="wallet" style="padding: 40rpx 20rpx;" @click="onTokenJump('/pages/about/help')">
<image class="i" src="/static/images/m6.png" fit="cover"></image>
<span class="s">{{$t('mine.text9')}}</span>
<uni-icons size="20" type="right" style="float: right;"></uni-icons>
@ -80,7 +80,7 @@
</view>
</uni-col>
<uni-col :span="24" style="margin-top: 20rpx;">
<view class="wallet" style="padding: 40rpx 20rpx;" @click="onPageJump('/pages/about/index')">
<view class="wallet" style="padding: 40rpx 20rpx;" @click="onTokenJump('/pages/about/index')">
<image class="i" src="/static/images/m3.png" fit="cover"></image>
<span class="s">{{$t('mine.text10')}}</span>
<uni-icons size="20" type="right" style="float: right;"></uni-icons>
@ -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
},
}
}

View File

@ -21,7 +21,7 @@
<view style="font-size: 24rpx; color:#4D81E7; font-weight: 500; text-align: right; margin-bottom: 40rpx;" @click="onPageJump('/pages/mine/forgotpassword')">{{$t('login.text6')}}</view>
<button type="primary" round style="width: 100%;" @click="login()">{{$t('login.title')}}</button>
</view>
<view style="bottom: 0rpx; position: absolute; width:100vw; height: 100rpx;">
<view style="bottom: 0rpx; width:100vw; height: 100rpx;">
<view style="font-size: 32rpx; color: #6C7278; font-weight: 500; text-align: center;">
{{$t('login.text7')}}
<span style="color: #4D81E7; margin-left: 20rpx;" @click="onPageJump('/pages/mine/signup')">{{$t('login.text8')}}</span>
@ -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'});

View File

@ -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<this.lastPage){
this.page = this.page + 1;
this.getnotice();
}
this.$http.post('/api/article/list', data).then(res => {
if(res.code == 0){
res.data.data.forEach(item => {
this.list.push(item);
})
}
}).catch(err => {
this.page = this.page - 1;
});
},
//
onShareAppMessage(e) {

View File

@ -106,7 +106,7 @@
methods: {
...mapMutations(['setUserInfo']),
change(id){
if(tihs.rid > id){
if(this.rid > id){
return;
}
this.role_id = id;

View File

@ -56,6 +56,7 @@
<view style="font-size: 24rpx; font-weight: 400; color: #999; line-height: 40rpx;">
ID{{item.id}}<br>
{{$t('promotion.text9')}}: {{item.created_at}}<br>
{{$t('promotion.text12')}}: {{item.role_id<2 ? $t('promotion.text13') : (item.role_id==2 ? $t('promotion.text15') : $t('promotion.text14'))}}<br>
{{$t('promotion.text10')}}: <span style="color: #333; font-weight: 500; margin-left: 6rpx;"> {{parseFloat(item.performance_large).toFixed(4)}}</span><br>
{{$t('promotion.text11')}}: <span style="color: #333; font-weight: 500; margin-left: 6rpx;"> {{item.total_count}}</span>
</view>
@ -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
},
}
}

View File

@ -1,7 +1,7 @@
<template>
<view>
<uni-nav-bar @clickLeft="goto(1, 1)" left-icon="back" :border="false" :shadow="false" :fixed="true"
title="Invite" backgroundColor="#fff" :statusBar="true"></uni-nav-bar>
:title="$t('promotion.text1')" backgroundColor="#fff" :statusBar="true"></uni-nav-bar>
<canvas canvas-id="poster" class="poster_canvas"></canvas>
<view class="minebg">
<view class="v1">
@ -30,7 +30,7 @@
<uni-icons type="download" size="20" color="#fff"></uni-icons>
<text style="margin-left: 10rpx;">{{$t('invite.text1')}}</text>
</button>
<button type="primary" class="b2" @click="copy()">
<button type="primary" class="b2" @click="copy('https://web.dxmt.io/#/pages/promotion/invitesignup')">
<uni-icons type="undo" size="20" color="#000"></uni-icons>
<text style="margin-left: 10rpx;">{{$t('invite.text2')}}</text>
</button>
@ -107,10 +107,23 @@
});
},
methods: {
copy() {
this.$copyText(this.qrcode).then(res => {
copy(val) {
// #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
},
goto(url, type) {
if (type == 2) {
@ -137,8 +150,8 @@
});
const ctx = uni.createCanvasContext('poster');
ctx.setFillStyle('#2651ef');
ctx.fillRect(0, 0, 375, 667);
ctx.drawImage(this.promoteBgImgs[this.swiperIndex], 0, 0, 375, 360);
ctx.fillRect(0, 0, 375, 700);
ctx.drawImage(this.promoteBgImgs[this.swiperIndex], 0, 0, 375, 700);
ctx.drawImage(this.result, 108, 440, 160, 160);
//
var x = 80; // x

View File

@ -0,0 +1,248 @@
<template>
<view class="page">
<view style="padding-top: 100rpx;">
<image src="/static/images/logo.png" style="width: 140rpx; height: 60rpx; float: left; margin-left: 20rpx;"></image>
<view class="v1" style="line-height: 50rpx;" @click="download">
<span style="float: right; margin-left: 10rpx; font-size: 28rpx;">下载APP</span>
<uni-icons size="25" type="download" style="float: left;"></uni-icons>
</view>
<view class="v1" style="line-height: 50rpx; margin-right: 60rpx;" @click="selectlanguage">
<span style="float: right; margin-left: 10rpx; font-size: 28rpx;" v-if="$i18n.locale == 'en'">EN</span>
<span style="float: right; margin-left: 10rpx; font-size: 28rpx;" v-if="$i18n.locale == 'zh'">中文</span>
<image src="/static/images/earth.png" style="width: 40rpx; height: 40rpx; margin-top: 6rpx; float: right;"></image>
</view>
<view style="clear: both;"></view>
</view>
<view style="width:94%; margin: 40rpx auto; background: url('/static/images/s9.png'); background-size: 20%; background-repeat: no-repeat; background-position: right;">
<view style="font-weight: 600;font-size: 48rpx; line-height: 80rpx; color: #333333;">欢迎来到MT</view>
<view style="font-weight: 400;font-size: 28rpx; line-height: 50rpx; color: #333333;">注册并完成交易即可获得高额返佣奖励</view>
</view>
<view style="width: 94%; margin: 40rpx auto;">
<uni-forms label-position="left" label-width="80rpx" :modelValue="signupModel" :rules="rules" ref="signupModel">
<uni-forms-item label="Email" name="email" label-width="180rpx">
<uni-easyinput type="text" v-model="signupModel.email" :placeholder="$t('signup.text2')"></uni-easyinput>
</uni-forms-item>
<uni-forms-item :label="$t('forgot.text23')" name="code" label-width="180rpx">
<uni-easyinput type="number" v-model="signupModel.code" :placeholder="$t('signup.text3')">
<template #right>
<button type="primary"
:disabled="isSend"
@click="sendCode()"
style="font-size: 28rpx; padding: auto 20rpx; width: 220rpx;">{{sendText}}</button>
</template>
</uni-easyinput>
</uni-forms-item>
<uni-forms-item :label="$t('forgot.text11')" name="password" label-width="180rpx">
<uni-easyinput type="password" :passwordIcon="true" v-model="signupModel.password" :placeholder="$t('login.text5')" />
</uni-forms-item>
<uni-forms-item :label="$t('signup.text6')" name="trade_password" label-width="180rpx">
<uni-easyinput type="password" :passwordIcon="true" v-model="signupModel.trade_password" :placeholder="$t('signup.text7')" />
</uni-forms-item>
<uni-forms-item :label="$t('signup.text16')" name="invite_code" label-width="180rpx">
<uni-easyinput type="text" v-model="signupModel.invite_code" :placeholder="$t('signup.text9')"></uni-easyinput>
</uni-forms-item>
</uni-forms>
</view>
<view style="font-weight: 400;font-size: 26rpx;color: #333333; width: 94%; margin: 10rpx auto;">
<checkbox :checked="isAgree" style="width: 40rpx; height: 40rpx; transform: scale(0.8,0.8)" />
<span style="margin-left: 20rpx;">I have read and agree<span style="color: #1D61FF">MT User Agreement</span></span>
</view>
<view style="bottom: 0rpx; position: absolute; width:100vw; height: 60rpx; ">
<button type="primary" style="width: 94%; margin: auto;" @click="signup">{{this.$t('signup.text17')}}</button>
</view>
<uni-popup ref="popup" background-color="#fff">
<view style="width: 80vw; padding: 20rpx 30rpx; border-radius: 40rpx; line-height: 50rpx;">
<view style="font-size: 36rpx; font-weight: bold; text-align: center; margin-bottom: 30rpx;">{{$t('index.text25')}}</view>
<view style="padding-bottom: 20rpx; width: 100%;">
<view @click="switchlan('en')" style="height: 80rpx; line-height: 80rpx;" :style = "$i18n.locale == 'en' ? 'background-color:#1D61E7; color: #fff' : 'color: #333'">
<view style="font-weight: 600;font-size: 32rpx; margin-left: 20rpx;">English</view>
</view>
<view @click="switchlan('zh')" style="height: 80rpx; line-height: 80rpx;" :style = "$i18n.locale == 'zh' ? 'background-color:#1D61E7; color: #fff' : 'color: #333'">
<view style="font-weight: 600;font-size: 32rpx;margin-left: 20rpx;">简体中文</view>
</view>
</view>
</view>
</uni-popup>
</view>
</template>
<script>
import zNavigation from '@/components/module/navigation.vue';
import { getUserInfo } from '@/config/utils';
import {
mapState,
mapMutations
} from 'vuex';
export default {
components: {
zNavigation
},
data() {
return {
sendText: this.$t('setPasswork.text8'),
isSend: false,
isAgree:true,
signupModel:{
email:"",
code:"",
password:"",
invite_code:"",
trade_password:"",
},
rules: {
email: {rules:[{required: true,errorMessage: this.$t('forgot.text2')}]},
code:{rules:[{required: true,errorMessage: this.$t('setPasswork.text12')}]},
password: {rules:[{required: true,errorMessage: this.$t('login.text10')}]},
trade_password:{
rules:[{required: true,errorMessage: this.$t('putforward.text5')},
{minLength: 6, maxLength: 6, errorMessage: this.$t('putforward.text6') }],
},
invite_code: {rules:[{required: true,errorMessage: this.$t('putforward.text9')}]}
},
};
},
computed: {
...mapState(['userInfo']),
...mapState(['init'])
},
//
onLoad(e) {
},
created() {
uni.hideTabBar()
},
//
onShow() {
},
//
methods: {
selectlanguage(){
this.$refs.popup.open('center');
},
download(){
window.location.href='https://www.dxmt.io/download'
},
switchlan(l){
this.$i18n.locale = l;
uni.setStorageSync('locale', l)
this.$refs.popup.close();
},
sendCode(){
this.isSend = true;
if (this.signupModel.email == '') {
uni.showToast({title: this.$t('forgot.text19'), icon:'error'});
this.isSend = false;
return;
}
if (!this.$base.mailRegular.test(this.signupModel.email)) {
uni.showToast({title: this.$t('forgot.text20'), icon:'error'});
this.isSend = false;
return;
}
let s = 120;
let data = {
type: "email",
event: "register",
email: this.signupModel.email,
lang: this.$i18n.locale
}
this.$http.post('/api/common/captcha', data).then(res => {
if(res.code == 0){
uni.showToast({title: 'Successfully sent'});
this.sendText = this.$t('forgot.text4',{par: s});
let intervalId = setInterval(() => {
s = s-1;
if (s == 0) {
clearInterval(intervalId);
this.isSend = false;
this.sendText = "Get code";
}
else{
this.sendText = this.$t('forgot.text4',{par: s});
}
}, 1000);
}
});
},
signup(){
this.$refs.signupModel.validate().then(res=>{
if (!this.$base.mailRegular.test(this.signupModel.email)) {
uni.showToast({title:this.$t('signup.text12'),icon:'error'});
return;
}
if(!this.$base.passwordRegular.test(this.signupModel.password)){
uni.showToast({title:this.$t('signup.text14'),icon:'error'});
return;
}
let data = {
email: this.signupModel.email,
code: this.signupModel.code,
password: this.signupModel.password,
invite_code: this.signupModel.invite_code,
trade_password: this.signupModel.trade_password,
}
this.$http.post('/api/common/register', data).then(res => {
if(res.code == 0){
this.setUserInfo(res.data.userinfo);
setTimeout(() => {
uni.switchTab({
url: '/pages/mine/index'
});
}, 1000);
}
});
}).catch(err =>{})
},
onTokenJump(url) {
if(this.userInfo.token === typeof(undefined) || this.userInfo.token === undefined){
uni.showModal({
title: this.$t('gotoLogin.title'),
content: this.$t('gotoLogin.content'),
confirmText: this.$t('gotoLogin.login'),
cancelText: this.$t('gotoLogin.cancel'),
success: (res) => {
if (res.confirm) {
uni.navigateTo({
url: "/pages/mine/login"
});
}
}
});
}else{
uni.navigateTo({
url: url
});
}
},
onPageJump(url) {
uni.navigateTo({
url: url
});
},
onPageJump1(url) {
uni.switchTab({
url: url
});
},
},
//
onHide() {},
//
onUnload() {},
//
onPullDownRefresh() {},
//
onReachBottom() {},
//
onShareAppMessage(e) {
return this.wxShare();
}
};
</script>
<style lang="scss" scoped>
@import '@/style/mixin.scss';
.page{min-height: 98vh;position: relative;}
.v1{ float: right; padding-right: 20upx;}
</style>

View File

@ -6,15 +6,15 @@
<uni-col :span="24">
<view class="wallet1">
<view style="width: 400; font-size: 24rpx; color: #fff;">{{$t('promotionList.text1')}}</view>
<view style="width: 500; font-size: 48rpx; color: #fff; line-height: 110rpx;">{{parseFloat(this.team.direct_total).toFixed(4)}}</view>
<view style="width: 500; font-size: 48rpx; color: #fff; line-height: 110rpx;">{{parseFloat(this.team.direct_total).toFixed(0)}}</view>
</view>
</uni-col>
</uni-row>
<view style="width: 94%; margin: 0rpx auto;">
<uni-row :gutter="10" style="margin-top: 30rpx;" v-for="(item, index) in list" :key="index" :style="index==0 ? '' : 'margin-top: 60rpx;'">
<uni-col :span="6" style="text-align: center;">
<uni-badge class="uni-badge-left-margin" text="V10" absolute="leftBottom" :offset="[25, 8]"
:customStyle="{background: getBg(10)}" size="small">
<uni-badge class="uni-badge-left-margin" :text="'v'+item.level" absolute="leftBottom" :offset="[25, 8]"
:customStyle="{background: getBg(item.level)}" size="small">
<image style="width: 120rpx; height: 120rpx; margin: auto;" :src="url" fit="cover"></image>
</uni-badge>
</uni-col>
@ -23,6 +23,7 @@
<view style="font-size: 24rpx; font-weight: 400; color: #999; line-height: 40rpx;">
ID{{item.id}}<br>
{{$t('promotion.text9')}}: {{item.created_at}}<br>
{{$t('promotion.text12')}}: {{item.role_id<2 ? $t('promotion.text13') : (item.role_id==2 ? $t('promotion.text15') : $t('promotion.text14'))}}<br>
{{$t('promotion.text10')}}: <span style="color: #333; font-weight: 500; margin-left: 6rpx;">{{parseFloat(item.performance_large).toFixed(4)}}</span><br>
{{$t('promotion.text11')}}: <span style="color: #333; font-weight: 500; margin-left: 6rpx;">{{item.total_count}}</span>
</view>
@ -58,6 +59,7 @@
limit: 10
},
list: [],
lastPage: 1,
};
},
computed: {
@ -81,16 +83,7 @@
this.team.resultsCell = res.data.performance_small;
}
});
let data = {
page: this.par.page,
limit: this.par.limit,
lang: this.$i18n.locale
};
this.$http.post('/api/team/list', data).then(res => {
if(res.code == 0){
this.list = res.data.data;
}
});
this.getlist();
}
},
@ -101,6 +94,21 @@
url: url
});
},
getlist(){
let data = {
page: this.par.page,
limit: this.par.limit,
lang: this.$i18n.locale
};
this.$http.post('/api/team/list', data).then(res => {
if(res.code == 0){
res.data.data.forEach(item => {
this.list.push(item);
});
this.lastPage = res.data.last_page;
}
});
},
goto(url, type) {
if (type == 2) {
return uni.switchTab({ url: url })
@ -116,13 +124,13 @@
this.dialogVisible = false;
},
getBg(level){
if(level >= 0 && level <= 3){
if(parseInt(level) >= 0 && parseInt(level) <= 3){
return 'linear-gradient( 270deg, #CD8817 0%, #ED790D 100%)';
}else if(level >= 4 && level <= 6){
}else if(parseInt(level) >= 4 && parseInt(level) <= 6){
return 'linear-gradient( 270deg, #FB5E00 0%, #FFA500 100%)';
}else if(level >= 7 && level <= 9){
}else if(parseInt(level) >= 7 && parseInt(level) <= 9){
return 'linear-gradient( 270deg, #216CFF 0%, #47E3FF 100%)';
}else if(level == 10){
}else if(parseInt(level) == 10){
return 'linear-gradient( 270deg, #CC44FF 1%, #FF5666 100%)';
}
}
@ -134,7 +142,12 @@
//
onPullDownRefresh() {},
//
onReachBottom() {},
onReachBottom() {
if(this.page<this.lastPage){
this.page = this.page + 1;
this.getlist();
}
},
//
onShareAppMessage(e) {
return this.wxShare();

View File

@ -149,7 +149,8 @@ import detailsVue from './details.vue';
let data = {
product_id: this.detail.id,
quantity: this.answerModel.num,
trade_password: this.pingcode
trade_password: this.pingcode,
lang: this.$i18n.locale
}
this.$http.post('/api/productOrder/create', data).then(res => {
if(res.code == 0){

View File

@ -48,7 +48,11 @@
</view>
<view class="content" v-if="navIndex==1">
<view class="v2" style="margin-top: 20rpx" v-if="list1.length > 0" v-for="(item, index) in list1" :key="index">
<view class="title">{{item.questionnaire.title}}</view>
<view class="title">{{item.product.title}}</view>
<view style="font-weight: 400;font-size: 28rpx;color: #999999;">
{{$t('Questionnaire.text11')}}: <span style="color: #1D61E7;">${{parseFloat(item.product.interest_rate).toFixed(2)}}</span>
<span style="margin-left: 60rpx;">{{$t('Questionnaire.text12')}}</span>: <span style="color: #1D61E7;">{{item.product.billing_cycle}} Days</span>
</view>
<view style="font-weight: 400;font-size: 28rpx;color: #999999;">{{$t('Questionnaire.text8')}}: {{item.created_at.slice(0, 19)}}</view>
<view style="text-align: right;">
<button type="primary" class="b" style="float: right;" v-if="item.status == 1" @click="onTokenJump('/pages/questionnaire/answer?id='+item.id)">{{$t('Questionnaire.text9')}}</button>
@ -63,7 +67,7 @@
</view>
<view class="content" v-if="navIndex==2">
<view class="v2" style="margin-top: 20rpx" v-if="list2.length > 0" v-for="(item, index) in list2" :key="index">
<view class="title">{{item.questionnaire.title}}</view>
<view class="title">{{item.product.title}}</view>
<view style="font-weight: 400;font-size: 28rpx;color: #999999;">{{$t('Questionnaire.text8')}}: {{item.created_at.slice(0, 19)}}</view>
<view style="text-align: right;"><button type="primary" class="b" style="float: right; background-color: #eee; color: #333">{{$t('Questionnaire.text10')}}</button></view>
<view style="clear: both;"></view>
@ -98,8 +102,20 @@
list2: [],
par:{
page: 1,
limit: 10
limit: 10,
lastPage: 1
},
par1:{
page: 1,
limit: 10,
lastPage: 1
},
par2:{
page: 1,
limit: 10,
lastPage: 1
},
};
},
computed: {
@ -107,62 +123,95 @@
},
//
onLoad(e) {
uni.showLoading({
title: this.$t('loading')
})
if(this.userInfo.token === typeof(undefined) || this.userInfo.token === undefined){
}else{
this.getList1();
this.getList2();
}
},
created() {
uni.hideTabBar()
},
//
onShow() {
uni.showLoading({
title: this.$t('loading')
})
let data = {
page: this.par.page,
limit: this.par.limit,
lang: this.$i18n.locale,
};
this.$http.post('/api/product/list', data).then(res => {
if(res.code == 0){
this.list = res.data.data;
uni.hideLoading();
}
}).catch(err => {
uni.hideLoading()
});
if(this.userInfo.token === typeof(undefined) || this.userInfo.token === undefined){
}else{
let data2 = {
page: this.par.page,
limit: this.par.limit,
lang: this.$i18n.locale,
step: 'progress'
};
this.$http.post('/api/server/list', data2).then(res => {
if(res.code == 0){
this.list1 = res.data.data;
}
}).catch(err => {
});
let data1 = {
page: this.par.page,
limit: this.par.limit,
lang: this.$i18n.locale,
step: 'done'
};
this.$http.post('/api/server/list', data1).then(res => {
if(res.code == 0){
this.list2 = res.data.data;
}
}).catch(err => {
});
}
this.par.page = 1
this.list = [];
this.getList();
},
//
methods: {
checkIndex(index) {
this.navIndex = index;
if(this.navIndex == 0){
this.par.page = 1;
this.list = [];
this.getList();
}
if(this.navIndex == 1){
this.par1.page = 1;
this.list1 = [];
this.getList1();
}
if(this.navIndex == 2){
this.par2.page = 1;
this.list2 = [];
this.getList2();
}
},
getList(){
let data = {
page: this.par.page,
limit: this.par.limit,
lang: this.$i18n.locale,
};
this.$http.post('/api/product/list', data).then(res => {
if(res.code == 0){
res.data.data.forEach(item => {
this.list.push(item);
});
this.par.lastPage = res.data.last_page
uni.hideLoading();
}
}).catch(err => {
uni.hideLoading()
});
},
getList1(){
let data2 = {
page: this.par1.page,
limit: this.par1.limit,
lang: this.$i18n.locale,
step: 'progress'
};
this.$http.post('/api/server/list', data2).then(res => {
if(res.code == 0){
res.data.data.forEach(item => {
this.list1.push(item);
});
this.par1.lastPage = res.data.last_page
}
}).catch(err => {
});
},
getList2(){
let data1 = {
page: this.par2.page,
limit: this.par2.limit,
lang: this.$i18n.locale,
step: 'done'
};
this.$http.post('/api/server/list', data1).then(res => {
if(res.code == 0){
res.data.data.forEach(item => {
this.list2.push(item);
});
this.par2.lastPage = res.data.last_page
}
}).catch(err => {
});
},
onTokenJump(url) {
if(this.userInfo.token === typeof(undefined) || this.userInfo.token === undefined){
@ -193,7 +242,26 @@
//
onPullDownRefresh() {},
//
onReachBottom() {},
onReachBottom() {
if(this.navIndex == 0){
if(this.par.page < this.par.lastPage){
this.par.page = this.par.page + 1;
this.getList();
}
}
if(this.navIndex == 1){
if(this.par1.page < this.par1.lastPage){
this.par1.page = this.par1.page + 1;
this.getList1();
}
}
if(this.navIndex == 2){
if(this.par2.page < this.par2.lastPage){
this.par2.page = this.par2.page + 1;
this.getList2();
}
}
},
//
onShareAppMessage(e) {
return this.wxShare();

View File

@ -65,7 +65,8 @@
page: 1,
limit: 10
},
kw: ''
kw: '',
lastPage: 0
};
},
computed: {
@ -95,7 +96,10 @@
};
this.$http.post('/api/product/list', data).then(res => {
if(res.code == 0){
this.list = res.data.data;
res.data.data.forEach(item => {
this.list.push(item);
});
this.par.lastPage = res.data.last_page
uni.hideLoading();
}
}).catch(err => {
@ -155,8 +159,10 @@
onPullDownRefresh() {},
//
onReachBottom() {
this.par.page = this.par.page + 1;
this.getlist();
if(this.par.page < fthis.par.lastPage){
this.par.page = this.par.page + 1;
this.getlist();
}
},
//
onShareAppMessage(e) {

View File

@ -37,7 +37,7 @@
</view>
<view style="clear: both;"></view>
</view>
<view style="width: 92%; margin: auto;">
<view style="width: 96%; margin: auto;">
<view class="cell_list" style="border-bottom: 2rpx solid #ddd;" v-if="list.length > 0" v-for="(n, index) in list" v-bind:key="index">
<template v-if="n.name == $t('recharge.title')">
<view class="d">
@ -45,7 +45,7 @@
</view>
<view class="u1 u">
<span v-if='n.status == 2'>+</span>
<span :style="n.status == 2 ? 'color:#1D61E7' : ''">{{parseFloat(n.amount).toFixed(2)}} USDT</span>
<span :style="n.status == 2 ? 'color:#1D61E7' : ''">{{parseFloat(n.amount).toFixed(4)}} USDT</span>
<view class="d" style="text-align: right; color: #1D61E7;">{{ recharge_status_list[n.status]}}</view>
</view>
</template>
@ -54,17 +54,19 @@
{{n.name}}<view class="d1">{{ n.created_at}}</view>
</view>
<view class="u1 u">
<span>-{{parseFloat(n.deduction_amount).toFixed(2)}} USDT</span>
<span>-{{parseFloat(n.deduction_amount).toFixed(4)}} USDT</span>
<view class="d" style="text-align: right; color: #1D61E7;">{{ withdrawl_status_list[n.status] }}</view>
</view>
</template>
<template v-else>
<view class="d">
{{n.type}}<view class="d1">{{n.created_at.slice(0, 19)}}</view>
</view>
<view class="u1 u">
<span>{{parseFloat(n.amount).toFixed(2)}} USDT</span>
<view class="d" style="text-align: right; color: #1D61E7;">After:{{parseFloat(n.after).toFixed(2)}}</view>
{{n.type}}
<view class="d1" style="white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: 400rpx" v-if="select.type==300">Into mail: {{n.target}}</view>
<view class="d1">{{n.created_at.slice(0, 19)}}</view>
</view>
<view class="u1 u" style="text-align: right;">
<span :style="select.type==300?' margin-top: 20rpx;':''">{{parseFloat(n.amount).toFixed(4)}} USDT</span>
<view class="d" :style="select.type==300?'margin-top: 40rpx;':''" style="text-align: right; color: #1D61E7;">{{$t('wallet.text6')}}:{{parseFloat(n.after).toFixed(4)}}</view>
</view>
</template>
</view>
@ -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;

View File

@ -44,9 +44,9 @@
</view>
<view class="cell_list" style="padding: 30rpx 0rpx;border-bottom: 2rpx solid #ddd;" v-if="list.length > 0" v-for="item in list" :key="item.id">
<view class="t">{{item.type}}<view class="d1">{{item.created_at.slice(0, 19)}}</view></view>
<view class="u1 u">
<view class="u1 u" style="text-align: right;">
<span>{{parseFloat(item.amount).toFixed(2)}} USDT</span>
<view class="d" style="text-align: right; color: #1D61E7;">After:{{parseFloat(item.after).toFixed(2)}}</view>
<view class="d" style="text-align: right; color: #1D61E7;">{{$t('wallet.text6')}}:{{parseFloat(item.after).toFixed(4)}}</view>
</view>
</view>
<view style="text-align: center; padding-bottom: 160rpx;" v-if="list.length == 0">

View File

@ -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
},
},
//

View File

@ -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",

View File

@ -22,7 +22,7 @@ class MattermostClient {
this.reconnectTimer = null;
// 心跳相关
this.heartbeatInterval = 30000; // 30秒
this.heartbeatInterval = 10000; // 30秒
this.heartbeatTimer = null;
this.lastHeartbeatResponse = Date.now();

BIN
static/images/s9.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB