feat: 前端全量更新 - 含所有本次需求

- 移除秒合约页面及UI
- 合约页Tab改为Position Held/Transaction Record
- 存款/提款/转账页增加BTC/ETH
- 资产页重构(用户信息+盈亏+多语言)
- 注册页改版(匹配新设计稿)
- 日文全面翻译+首页菜单多语言
- 代理专属注册链接支持(?code=)
- 10个locale文件同步更新
This commit is contained in:
li
2026-03-30 20:14:20 +08:00
commit 5f40e4e1b5
605 changed files with 154871 additions and 0 deletions
File diff suppressed because it is too large Load Diff
+319
View File
@@ -0,0 +1,319 @@
<template>
<view>
<z-paging :language="$i18n.locale" ref="paging" v-model="list" @query="queryList" :pageSize="20"
:style="'background-color: '+theme.bg+';color: '+theme.text">
<!-- 下拉刷新 -->
<custom-refresher slot="refresher" slot-scope="{refresherStatus}" :status="refresherStatus">
</custom-refresher>
<!-- 头部 -->
<view slot="top" class="width-750 relative flex align-center justify-center bj-8EBEFF"
:style="{height: `calc(${statusBar}px + 176rpx)`}">
<view class="width-750 fixed1"
:style="{paddingTop: statusBar + 'px', height: `calc(${statusBar}px + 176rpx)`}">
<view class="width-750 height-110 padding-w-30 bgimg1 flex align-center justify-center">
<view @click="_goback" class="cuIcon-back font-40"
style="position: absolute;left: 30rpx;"></view>
<text class="font-36 weight-bold">{{i18n.TranRecord.title1}}</text>
<image @click="show=true" class="width-36 height-36 absolute" style="right: 30rpx;"
src="/static/imgs/index/shaixuan@2x.png"></image>
</view>
<view class="height-66 flex align-center">
<view @click="selectMeun(index)" v-for="(item,index) in meunList" class="flex-1 height-66">
<view class="height-60 line-height-60 text-center">
<text
:class="meunIndex==index?'font-28 color-0165EE weight-bold':'color-C3C3C3 font-26'">{{item}}</text>
</view>
<view class="height-4 flex align-center justify-center">
<view v-if="meunIndex==index" class="width-40 height-4 bj-0165EE"></view>
</view>
</view>
</view>
</view>
</view>
<!-- 身体 -->
<view class="width-750 padding-b-40">
<view>
<view v-for="(item,index) in list" class="padding-w-30 margin-t-8"
:style="'background-color: '+theme.fu_bg+';color: '+theme.text">
<view class="height-96 flex align-center justify-between">
<view class="flex align-center font-28 numbold-font">
<image class="width-52 height-52 radiu-26 margin-r-12" :src="item.image" mode="">
</image>
<text :class="item.type==1?'color-00C481':'color-FF4040'">{{item.type==1?i18n.TranRecord.text1:i18n.TranRecord.text2}}</span>{{item.coinname}}</text>
</view>
<text class="font-24 color-C3C3C3">{{item.createtime}}</text>
</view>
<view class="padding-c-20">
<view class="flex align-center margin-b-8">
<text class="font-24 color-C3C3C3">{{i18n.TranRecord.text3}}</text>
<text class="font-24 numbold-font">{{item.order_sn}}</text>
</view>
<view class="flex align-center margin-b-8">
<text
class="font-24 color-C3C3C3">{{item.type == 1?i18n.TranRecord.text1:i18n.TranRecord.text2}}{{i18n.TranRecord.text4}}</text>
<text class="font-24 numbold-font">{{item.num}}</text>
</view>
<view class="flex align-center margin-b-8">
<text
class="font-24 color-C3C3C3">{{item.type == 1?i18n.TranRecord.text1:i18n.TranRecord.text2}}{{i18n.TranRecord.text5}}</text>
<text class="font-24 numbold-font">{{item.amount}}</text>
</view>
<view class="flex align-center margin-b-8">
<text
class="font-24 color-C3C3C3">{{item.type == 1?i18n.TranRecord.text1:i18n.TranRecord.text2}}{{i18n.TranRecord.text6}}</text>
<text class="font-24 numbold-font">{{item.price}}</text>
</view>
<view class="flex align-center margin-b-8">
<text class="font-24 color-C3C3C3">{{i18n.TranRecord.text7}}</text>
<text class="font-24 numbold-font">{{item.fee}}</text>
</view>
<view class="flex align-center margin-b-8">
<text class="font-24 color-C3C3C3">{{i18n.TranRecord.text8}}</text>
<text class="font-24 numbold-font">{{item.bc_time}}</text>
</view>
<view class="flex align-center">
<text class="font-24 color-C3C3C3">{{i18n.TranRecord.text9}}</text>
<text class="font-24 numbold-font">{{item.income}}</text>
</view>
</view>
</view>
</view>
</view>
</z-paging>
<!-- 筛选弹窗 -->
<u-popup v-model="show" mode="bottom" border-radius="25">
<view class="width-100b padding-w-20"
:style="'background-color: '+theme.bg+';color: '+theme.text"
style="height:570rpx; border-radius: 20rpx 20rpx 0 0;">
<view class="width-100b height-70 text-center line-height-100">
<text class="font-28 weight-bold">{{i18n.TranRecord.text10}}</text>
</view>
<!-- <view class="width-100b height-160 padding-w-30 margin-c-10 flex direction-column justify-around">
<text class="font-30 weight-bold">{{i18n.TranRecord.text11}}</text>
<view class="width-100b flex align-center">
<view @click="selectBourse(index)" :class="bourseIndex==index+1?'select_on':'select_off'"
v-for="(item,index) in bourseList" :key="index">{{item}}</view>
</view>
</view> -->
<view class="width-100b height-150 margin-c-10 padding-w-30 flex direction-column justify-around">
<text class="font-28 weight-bold line-height-64">{{i18n.TranRecord.text12}} <span
class="font-26">({{i18n.TranRecord.text13}})</span></text>
<input class="width-100b height-86 font-28 numbold-font"
:placeholder="i18n.TranRecord.tos2" type="text" v-model="coin" />
</view>
<view class="width-100b height-160 margin-c-10 padding-w-30 flex direction-column justify-around">
<text class="font-28 weight-bold">{{i18n.TranRecord.text14}}</text>
<view class="width-100b height-70 flex align-center justify-between">
<view @click="tshow1=true" class="selectTime">
<view class="picker">
{{startTime}}
</view>
</view>
<view class="width-20 height-6 radiu-3 bj-0165EE"></view>
<view @click="tshow2=true" class="selectTime">
<view class="picker">
{{endTime}}
</view>
</view>
</view>
</view>
<view class="width-100b height-100 padding-30 flex align-center justify-between">
<view class="resetBtn" @click="reset">{{i18n.TranRecord.text15}}</view>
<view class="inquireBtn" @click="chechOrder">{{i18n.TranRecord.text16}}</view>
</view>
</view>
</u-popup>
<u-picker mode="time" v-model="tshow1" @confirm="startTimeChange" :cancelText="i18n.Tactics.text28"
:confirmText="i18n.Tactics.text29"></u-picker>
<u-picker mode="time" v-model="tshow2" @confirm="endTimeChange" :cancelText="i18n.Tactics.text28"
:confirmText="i18n.Tactics.text29"></u-picker>
</view>
</template>
<script>
export default {
data() {
return {
statusBar: uni.getSystemInfoSync().statusBarHeight,
meunList: ['全部', '买入', '卖出'],
meunIndex: 0,
show: false,
bourseList: ['HUOBI'],
// bourseList: ['HUOBI', 'Binance', 'OKEx', 'Coinbase'],
bourseIndex: 1,
coin: '',
startTime: '请选择时间',
endTime: '请选择时间',
tshow1: false,
tshow2: false,
list: [],
theme: '',
}
},
computed: {
i18n() {
return this.$t('message');
}
},
onLoad(e) {
this.meunList[0] = this.i18n.TranRecord.text17
this.meunList[1] = this.i18n.TranRecord.text1
this.meunList[2] = this.i18n.TranRecord.text2
this.startTime = this.i18n.TranRecord.text18
this.endTime = this.i18n.TranRecord.text18
console.log(e)
if (e.symbol) {
this.coin = e.symbol
}
if (e.exchange_id) {
this.bourseIndex = e.exchange_id
}
// this.top()
},
onShow() {
if (uni.getStorageSync("theme") == "dark") {
this.theme = this.$store.state.darkTheme
} else {
this.theme = this.$store.state.lightTheme
}
},
methods: {
chechOrder() {
// var obj = {
// coin: this.coin,
// bourseIndex: this.bourseIndex,
// startTime: this.startTime,
// endTime: this.endTime,
// exchange_id: this.bourseIndex
// }
// console.log(obj)
this.show = false
this.list = []
this.queryList(1, 10)
},
selectMeun(index) {
this.list = []
this.meunIndex = index
this.queryList(1, 10)
},
// selectStatus(index) {
// this.statusIndex = index
// },
selectBourse(index) {
this.bourseIndex = index + 1
},
startTimeChange: function(e) {
console.log('开始时间', e)
this.startTime = e.year + '-' + e.month + '-' + e.day
},
endTimeChange: function(e) {
console.log('结束时间', e)
this.endTime = e.year + '-' + e.month + '-' + e.day
},
reset() {
this.statusIndex = 0
this.bourseIndex = 1
this.coin = ''
this.startTime = this.i18n.TranRecord.text18
this.endTime = this.i18n.TranRecord.text18
},
queryList(pageNo, pageSize) {
let obj = {
page: pageNo,
page_num: pageSize,
type: this.meunIndex,
exchange_id: this.bourseIndex == '' ? '' : this.bourseIndex,
symbol: this.coin == '' ? '' : this.coin,
starttime: this.startTime == this.i18n.TranRecord.text18 ? '' : this.startTime,
endtime: this.endTime == this.i18n.TranRecord.text18 ? '' : this.endTime
}
setTimeout(() => {
this.post('/strategy/get_order', obj).then(res => {
if (res.code == 1) {
console.log(res)
this.$refs.paging.complete(res.data.data);
}
})
}, 500)
},
}
}
</script>
<style lang="scss">
.fixed1 {
position: fixed;
top: 0;
z-index: 1010;
}
.selectTime {
width: 300rpx;
height: 66rpx;
background: rgba(160, 171, 181, 0.2);
box-shadow: 0rpx 0rpx 8rpx 0rpx rgba(255, 255, 255, 0.5);
border-radius: 10rpx;
color: #8B99A2;
font-size: 28rpx;
text-align: center;
line-height: 66rpx;
}
.select_on {
width: 180rpx;
height: 66rpx;
margin-right: 20rpx;
line-height: 66rpx;
background: #0165EE;
border-radius: 10rpx;
color: #FFFFFF;
font-size: 30rpx;
font-weight: 500;
text-align: center;
}
.select_off {
width: 180rpx;
height: 66rpx;
margin-right: 20rpx;
line-height: 66rpx;
background: #8B99A2;
border-radius: 10rpx;
color: #FFFFFF;
font-size: 30rpx;
font-weight: 500;
text-align: center;
}
.resetBtn {
width: 300rpx;
height: 86rpx;
line-height: 86rpx;
background: rgba(160, 171, 181, 0.2);
border-radius: 10rpx;
color: #8B99A2;
font-size: 30rpx;
font-weight: bold;
text-align: center;
}
.inquireBtn {
width: 300rpx;
height: 86rpx;
line-height: 86rpx;
background: #0165EE;
border-radius: 10rpx;
color: #FFFFFF;
font-size: 30rpx;
font-weight: bold;
text-align: center;
}
</style>
File diff suppressed because it is too large Load Diff
+424
View File
@@ -0,0 +1,424 @@
<template>
<view :style="'background-color: '+theme.bg+';color: '+theme.text" style="height: 100vh;">
<myNav :title="i18n.setTransaction.title"></myNav>
<!-- 身体 -->
<view class="width-750">
<!-- 首单 -->
<view class="height-183 padding-w-30 padding-c-14 flex direction-column justify-between">
<view class="flex align-center">
<image class="width-42 height-42 margin-r-8" src="/static/imgs/quantify/shoudan.png" mode="">
</image>
<text class="font-28">{{i18n.setTransaction.text1}}</text>
</view>
<text class="font-24 color-C3C3C3">{{i18n.setTransaction.text2}}</text>
<view class="flex align-center">
<input class="font-28 flex-1 numbold-font padding-r-20" type="text" v-model="first_num"
:placeholder="i18n.setTransaction.tos1" placeholder-class="color-333333" />
<text class="font-28 numbold-font">USDT</text>
</view>
</view>
<!-- 最低 -->
<view class="height-186 padding-w-30 margin-t-26">
<view class="height-93 flex align-center justify-between">
<text class="font-28">{{i18n.setTransaction.text3}}</text>
<view class="flex align-center flex-1">
<input class="font-28 color-0165EE nummedium-font text-right padding-w-24" type="number"
v-model="min_price" :placeholder="i18n.setTransaction.tos2"
placeholder-class="color-0165EE" />
<text class="font-28 weight-bold">USDT</text>
</view>
</view>
<view class="height-93 flex direction-column justify-center font-24 color-FF4040">
<text>{{i18n.setTransaction.text4}}</text>
<text>{{i18n.setTransaction.text5}}</text>
</view>
</view>
<!-- 其它 -->
<view class="margin-t-26">
<view class="height-96 flex align-center justify-between padding-w-30 margin-b-1">
<text class="font-28">{{i18n.setTransaction.text6}}</text>
<view class="flex align-center">
<input class="font-28 color-0165EE nummedium-font text-right padding-w-24" type="number"
v-model="order_num" :placeholder="i18n.setTransaction.tos3"
placeholder-class="color-0165EE" />
<text class="font-28 weight-bold">{{i18n.setTransaction.text7}}</text>
</view>
</view>
<view class="height-96 flex align-center justify-between padding-w-30 margin-b-1">
<text class="font-28">{{i18n.setTransaction.text8}}</text>
<view class="flex align-center">
<input class="font-28 color-0165EE nummedium-font text-right padding-w-24" type="number"
v-model="zy_percent" :placeholder="i18n.setTransaction.tos4"
placeholder-class="color-0165EE" />
<text class="font-28 weight-bold">%</text>
</view>
</view>
<view class="height-96 flex align-center justify-between padding-w-30 margin-b-1">
<text class="font-28">{{i18n.setTransaction.text9}}</text>
<view class="flex align-center">
<input class="font-28 color-0165EE nummedium-font text-right padding-w-24" type="number"
v-model="zy_ht" :placeholder="i18n.setTransaction.tos5" placeholder-class="color-0165EE" />
<text class="font-28 weight-bold">%</text>
</view>
</view>
<view class="height-96 flex align-center justify-between padding-w-30 margin-b-1">
<text class="font-28">{{i18n.setTransaction.text10}}</text>
<view @click="bcShow=true" class="flex align-center">
<text
class="font-28 color-0165EE nummedium-font">{{bcs_1 == ''?i18n.setTransaction.text14:i18n.setTransaction.text15}}</text>
<u-icon name="arrow-right" color="#0165EE" size="28"></u-icon>
</view>
</view>
<view class="height-96 flex align-center justify-between padding-w-30 margin-b-1">
<text class="font-28">{{i18n.setTransaction.text11}}</text>
<view class="flex align-center">
<input class="font-28 color-0165EE nummedium-font text-right padding-w-24" type="number"
v-model="bc_ht" :placeholder="i18n.setTransaction.tos6" placeholder-class="color-0165EE" />
<text class="font-28 weight-bold">%</text>
</view>
</view>
<view class="height-96 flex align-center justify-between padding-w-30 margin-b-1">
<text class="font-28">{{i18n.setTransaction.text12}}</text>
<u-switch @change="change" size="36" v-model="pc_status" active-color="#0165EE" inactive-color="#F1F4F8">
</u-switch>
</view>
<view class="height-96 flex align-center justify-between padding-w-30 margin-b-1">
<text class="font-28">{{i18n.setTransaction.text13}}</text>
<u-switch @change="change1" size="36" v-model="rc_status" active-color="#0165EE" inactive-color="#F1F4F8">
</u-switch>
</view>
</view>
<view @click="get_cionSetting" class="btn">{{i18n.setTransaction.text16}}</view>
</view>
<!-- 补仓跌幅弹窗 -->
<u-popup v-model="bcShow" mode="bottom" border-radius="20">
<view class="padding-b-80" :style="'background-color: '+theme.bg+';color: '+theme.text">
<view class="height-110 flex align-center justify-center">
<text class="font-28">{{i18n.setTransaction.text17}}</text>
</view>
<view class="height-96 flex align-center justify-between padding-w-30">
<text class="font-28">{{i18n.setTransaction.text18}}</text>
<view class="flex align-center">
<input class="font-28 color-0165EE nummedium-font text-right padding-w-24" type="number"
v-model="bcs_1" :placeholder="i18n.setTransaction.tos7" placeholder-class="color-0165EE" />
<text class="font-28 weight-bold">%</text>
</view>
</view>
<view class="height-96 flex align-center justify-between padding-w-30">
<text class="font-28">{{i18n.setTransaction.text19}}</text>
<view class="flex align-center">
<input class="font-28 color-0165EE nummedium-font text-right padding-w-24" type="number"
v-model="bcs_2" :placeholder="i18n.setTransaction.tos7" placeholder-class="color-0165EE" />
<text class="font-28 weight-bold">%</text>
</view>
</view>
<view class="height-96 flex align-center justify-between padding-w-30">
<text class="font-28">{{i18n.setTransaction.text20}}</text>
<view class="flex align-center">
<input class="font-28 color-0165EE nummedium-font text-right padding-w-24" type="number"
v-model="bcs_3" :placeholder="i18n.setTransaction.tos7" placeholder-class="color-0165EE" />
<text class="font-28 weight-bold">%</text>
</view>
</view>
<view class="height-96 flex align-center justify-between padding-w-30">
<text class="font-28">{{i18n.setTransaction.text21}}</text>
<view class="flex align-center">
<input class="font-28 color-0165EE nummedium-font text-right padding-w-24" type="number"
v-model="bcs_4" :placeholder="i18n.setTransaction.tos7" placeholder-class="color-0165EE" />
<text class="font-28 weight-bold">%</text>
</view>
</view>
<view class="height-96 flex align-center justify-between padding-w-30">
<text class="font-28">{{i18n.setTransaction.text22}}</text>
<view class="flex align-center">
<input class="font-28 color-0165EE nummedium-font text-right padding-w-24" type="number"
v-model="bcs_5" :placeholder="i18n.setTransaction.tos7" placeholder-class="color-0165EE" />
<text class="font-28 weight-bold">%</text>
</view>
</view>
<view class="height-96 flex align-center justify-between padding-w-30">
<text class="font-28">{{i18n.setTransaction.text23}}</text>
<view class="flex align-center">
<input class="font-28 color-0165EE nummedium-font text-right padding-w-24" type="number"
v-model="bcs_6" :placeholder="i18n.setTransaction.tos7" placeholder-class="color-0165EE" />
<text class="font-28 weight-bold">%</text>
</view>
</view>
<view class="height-96 flex align-center justify-between padding-w-30">
<text class="font-28">{{i18n.setTransaction.text24}}</text>
<view class="flex align-center">
<input class="font-28 color-0165EE nummedium-font text-right padding-w-24" type="number"
v-model="bcs_7" :placeholder="i18n.setTransaction.tos7" placeholder-class="color-0165EE" />
<text class="font-28 weight-bold">%</text>
</view>
</view>
<view class="margin-t-60 flex align-center justify-around">
<view @click="bcShow=false" class="width-300 height-96 radiu-20 line-height-96 text-center"
style="background: rgba(195,195,195,0.5);">
<text class="font-28 color-white">{{i18n.setTransaction.text25}}</text>
</view>
<view @click="confirmBC" class="width-300 height-96 radiu-20 line-height-96 text-center bj-0165EE">
<text class="font-28 color-white">{{i18n.setTransaction.text16}}</text>
</view>
</view>
</view>
</u-popup>
<!-- 去实名 -->
<u-popup style="z-index: 5000;" border-radius="18" mode="center" v-model="TSShow">
<view class="width-600 padding-b-20" :style="'background-color: '+theme.bg+';color: '+theme.text">
<view class="width-100b height-220 padding-w-30 padding-c-40 flex direction-column align-center justify-between">
<image class="width-64 height-64" src="/static/imgs/quantify/tongzhi@2x.png" mode=""></image>
<view class="font-28 weight-bold text-center padding-w-20">
{{i18n.setTransaction.text26}}
</view>
</view>
<view class="width-100b height-90 flex align-center justify-center">
<view @click="TSShow=false,router.push('/pages/my/safety/real')" class="qcbtn3">
{{i18n.setTransaction.text27}}</view>
</view>
</view>
</u-popup>
</view>
</template>
<script>
export default {
data() {
return {
statusBar: uni.getSystemInfoSync().statusBarHeight,
bcShow: false,
coin_id: '', //币种id数组
first_num: '', //首单额度
min_price: 0, //最低入场价格
pc_status: true, //0=正常补仓 1=停止补仓
rc_status: true, //0=关闭 1=开启
order_num: '', //交易单数
zy_percent: '', //止盈比例
zy_ht: '', //止盈回调
bc_ht: '', //补仓回调
bcjson: {}, //补仓设置,数组[1=>0.02,2=>0.03….]
bcs_1: '',
bcs_2: '',
bcs_3: '',
bcs_4: '',
bcs_5: '',
bcs_6: '',
bcs_7: '',
flag: true,
TSShow: false,
theme: '',
}
},
computed: {
i18n() {
return this.$t('message');
}
},
filters: {
// 价格过滤器(保留小数点后两位)
percentFilter: function(item) {
return (item * 100).toFixed(2)
}
},
onLoad: function(option) {
if (option.idArr) {
this.coin_id = option.idArr
console.log(this.coin_id)
this.get_strategy()
}
if (option.item) {
// decodeURIComponent 解密传过来的对象字符串
const item = JSON.parse(option.item)
console.log(item)
this.coin_id = item.coin_id
this.first_num = item.first_num
this.order_num = item.order_num
this.min_price = item.in_price
this.pc_status = item.pc_status == 0 ? true : false
this.rc_status = item.is_now == 0 ? false : true
this.zy_percent = (item.zy_percent * 100).toFixed(2)
this.zy_ht = (item.zy_ht * 100).toFixed(2)
this.bc_ht = (item.bc_ht * 100).toFixed(2)
this.bcs_1 = (item.bcs_1 * 100).toFixed(2)
this.bcs_2 = (item.bcs_2 * 100).toFixed(2)
this.bcs_3 = (item.bcs_3 * 100).toFixed(2)
this.bcs_4 = (item.bcs_4 * 100).toFixed(2)
this.bcs_5 = (item.bcs_5 * 100).toFixed(2)
this.bcs_6 = (item.bcs_6 * 100).toFixed(2)
this.bcs_7 = (item.bcs_7 * 100).toFixed(2)
}
},
onShow() {
if (uni.getStorageSync("theme") == "dark") {
this.theme = this.$store.state.darkTheme
} else {
this.theme = this.$store.state.lightTheme
}
},
methods: {
change(status) {
console.log(this.pc_status);
},
change1(status) {
console.log(this.rc_status);
},
// 批量设置时获取默认值
get_strategy() {
this.post('/strategy/get_strategy_ori').then(res => {
console.log(res)
if (res.code == 1) {
var item = res.data
this.first_num = item.first_num
this.order_num = item.order_num
this.min_price = 0
this.pc_status = true
this.rc_status = false
this.zy_percent = (item.zy_percent * 100).toFixed(2)
this.zy_ht = (item.zy_ht * 100).toFixed(2)
this.bc_ht = (item.bc_ht * 100).toFixed(2)
this.bcs_1 = (item.bcs_1 * 100).toFixed(2)
this.bcs_2 = (item.bcs_2 * 100).toFixed(2)
this.bcs_3 = (item.bcs_3 * 100).toFixed(2)
this.bcs_4 = (item.bcs_4 * 100).toFixed(2)
this.bcs_5 = (item.bcs_5 * 100).toFixed(2)
this.bcs_6 = (item.bcs_6 * 100).toFixed(2)
this.bcs_7 = (item.bcs_7 * 100).toFixed(2)
}
})
},
confirmBC() {
this.bcShow = false
},
get_cionSetting(id) {
if (!this.flag) return
if (this.first_num == '') {
this.tos(this.i18n.setTransaction.tos8)
return
}
if (this.min_price === '') {
this.tos(this.i18n.setTransaction.tos9)
return
}
if (this.order_num == '') {
this.tos(this.i18n.setTransaction.tos10)
return
}
if (this.zy_percent == '') {
this.tos(this.i18n.setTransaction.tos4)
return
}
if (this.zy_ht == '') {
this.tos(this.i18n.setTransaction.tos5)
return
}
if (this.bcs_1 == '') {
this.tos(this.i18n.setTransaction.tos11)
return
}
if (this.bcs_2 == '') {
this.tos(this.i18n.setTransaction.tos12)
return
}
if (this.bcs_3 == '') {
this.tos(this.i18n.setTransaction.tos13)
return
}
if (this.bcs_4 == '') {
this.tos(this.i18n.setTransaction.tos14)
return
}
if (this.bcs_5 == '') {
this.tos(this.i18n.setTransaction.tos15)
return
}
if (this.bcs_6 == '') {
this.tos(this.i18n.setTransaction.tos16)
return
}
if (this.bcs_7 == '') {
this.tos(this.i18n.setTransaction.tos17)
return
}
let that = this
uni.showLoading({
title: that.i18n.setTransaction.tos18
})
this.flag = false
var obj = {
coin_id: this.coin_id,
first_num: this.first_num,
order_num: this.order_num,
in_price: this.min_price,
pc_status: this.pc_status ? '0' : '1',
is_now: this.rc_status ? '1' : '0',
zy_percent: (this.zy_percent / 100).toFixed(4),
zy_ht: (this.zy_ht / 100).toFixed(4),
bc_ht: (this.bc_ht / 100).toFixed(4),
bcs_1: (this.bcs_1 / 100).toFixed(4),
bcs_2: (this.bcs_2 / 100).toFixed(4),
bcs_3: (this.bcs_3 / 100).toFixed(4),
bcs_4: (this.bcs_4 / 100).toFixed(4),
bcs_5: (this.bcs_5 / 100).toFixed(4),
bcs_6: (this.bcs_6 / 100).toFixed(4),
bcs_7: (this.bcs_7 / 100).toFixed(4),
}
console.log(obj)
this.post('/strategy/set_strategy', obj).then(res => {
uni.hideLoading()
this.flag = true
console.log(res)
if (res.code == 1) {
this.tos(res.msg)
setTimeout(() => {
uni.navigateBack()
}, 800)
} else {
uni.hideToast()
if (res.data.jump == 1) {
this.TSShow = true
}
}
})
},
}
}
</script>
<style lang="scss">
.fixed1 {
position: fixed;
top: 0;
z-index: 1000;
background: #FFFFFF;
}
.btn {
width: 690rpx;
height: 96rpx;
border-radius: 20rpx;
background-color: #0165EE;
line-height: 96rpx;
text-align: center;
font-size: 32rpx;
color: #FFFFFF;
margin: 100rpx auto 200rpx;
}
.qcbtn3 {
width: 320rpx;
height: 86rpx;
background: #0165EE;
border-radius: 20rpx;
font-size: 28rpx;
font-weight: bold;
color: #FFFFFF;
display: flex;
align-items: center;
justify-content: center;
}
</style>
+100
View File
@@ -0,0 +1,100 @@
<template>
<view :style="'background-color: '+theme.bg+';color: '+theme.text" style="height: 100vh;">
<myNav :title="i18n.TranRecord.title2"></myNav>
<!-- 身体 -->
<view class="width-750 padding-w-30 padding-t-16">
<view class="height-76 flex align-center">
<text class="font-28">{{i18n.TranRecord.text19}}</text>
</view>
<view class="height-96 flex align-center">
<input class="flex-1 font-28 color-C3C3C3" type="number" v-model="BCnum" :placeholder="i18n.TranRecord.tos1" placeholder-class="color-C3C3C3" >
</view>
<view @click="sureBC" class="btn">{{i18n.TranRecord.text20}}</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
statusBar: uni.getSystemInfoSync().statusBarHeight,
BCnum: '0',
flag: true,
theme: '',
}
},
computed: {
i18n() {
return this.$t('message');
}
},
onShow() {
if (uni.getStorageSync("theme") == "dark") {
this.theme = this.$store.state.darkTheme
} else {
this.theme = this.$store.state.lightTheme
}
this.get_strategy()
},
methods: {
// 获取补仓限制
get_strategy() {
this.post('/strategy/get_strategy_setting', {
exchange_id: uni.getStorageSync('exchange_id')
}).then(res => {
console.log(res)
if (res.code == 1) {
this.BCnum = res.data.bc_min_limit
}
})
},
sureBC() {
if (!this.flag) return
if (this.BCnum == '') {
this.tos(this.i18n.TranRecord.tos1);
return
}
this.flag = false
uni.showLoading({
title: ''
})
this.post('/strategy/setbc_limit', {
bc_min_limit: this.BCnum,
exchange_id: uni.getStorageSync('exchange_id')
}).then(res => {
console.log(res)
this.flag = true
uni.hideLoading()
if (res.code == 1) {
this.tos(res.msg)
setTimeout(() => {
uni.navigateBack()
}, 500)
}
})
},
}
}
</script>
<style lang="scss">
.fixed1 {
position: fixed;
top: 0;
z-index: 1000;
}
.btn{
width: 690rpx;
height: 96rpx;
border-radius: 20rpx;
background-color: #0165EE;
line-height: 96rpx;
text-align: center;
font-size: 32rpx;
color: #FFFFFF;
position: fixed;
bottom: 200rpx;
}
</style>