diff --git a/App.vue b/App.vue
index d54c295..eb0090b 100644
--- a/App.vue
+++ b/App.vue
@@ -37,7 +37,12 @@ export default {
margin: 0;
}
-
+/deep/ .u-empty{
+ position: absolute;
+ top: 150%;
+ left: 50%;
+ transform: translateX(-50%);
+}
page {
diff --git a/components/tabBar/tabBar.vue b/components/tabBar/tabBar.vue
index 9e6426e..b401f4d 100644
--- a/components/tabBar/tabBar.vue
+++ b/components/tabBar/tabBar.vue
@@ -192,18 +192,6 @@ export default {
display: flex;
z-index: 8;
box-sizing: border-box;
-
- &::after {
- display: block;
- position: absolute;
- content: '';
- background: #fff;
- width: 268rpx;
- height: 10rpx;
- border-radius: 10rpx;
- top: 140rpx;
- left: 242rpx;
- }
}
.tabbar_item {
diff --git a/pages/markets/trade.vue b/pages/markets/trade.vue
index e4e4815..3dbf4c2 100644
--- a/pages/markets/trade.vue
+++ b/pages/markets/trade.vue
@@ -7,10 +7,11 @@
-
+
-
+
+
@@ -52,13 +53,15 @@
name: "trade",
data() {
return {
+ /* 配置信息 */
+ contractInfo: {},
popupShow: false,
symbolList: [],
- symbol: null,
- marketDetail:null,
- bboList:{},
- tradeList:{},
- webSocketChannel:{}
+ symbol: null,
+ marketDetail: null,
+ bboList: {},
+ tradeList: {},
+ webSocketChannel: {}
};
},
computed: {
@@ -66,81 +69,91 @@
return this.$t("markets");
},
},
- onLoad() {
- this.getSymbolGroup();
- this.initWebSocket();
- this.symbol=uni.getStorageSync('symbol');
- if(this.symbol!=null){
- this.getMarketDetail()
- this.getBboList();
- this.getTradeList();
+ onLoad() {
+ this.getSymbolGroup();
+ this.initWebSocket();
+ this.symbol = uni.getStorageSync('symbol');
+ if (this.symbol != null) {
+ this.getMarketDetail()
+ this.getBboList();
+ this.getTradeList();
}
-
-
+
+
},
onShow() {
console.log(11111, uni.getStorageSync('symbol'));
},
- methods: {
- getTradeList(){
- const tradeList = this.$api.tradeList({
- "symbol": this.symbol.symbol
- });
- tradeList.then(res => {
- this.tradeList = res
-
- })
- .catch(e => {
- console.log(e)
- uni.showToast({
- title: e,
- icon: 'none',
- duration: 2500
- })
- })
- },
- getBboList(){
- const bboList = this.$api.bboList({
- "symbol": this.symbol.symbol
- });
- bboList.then(res => {
- this.bboList = res
-
- })
- .catch(e => {
- console.log(e)
- uni.showToast({
- title: e,
- icon: 'none',
- duration: 2500
- })
- })
- },
- getMarketDetail(){
- const marketDetail = this.$api.marketDetail({
- "symbol": this.symbol.symbol
- });
- marketDetail.then(res => {
- this.marketDetail = res
-
- })
- .catch(e => {
- console.log(e)
- uni.showToast({
- title: e,
- icon: 'none',
- duration: 2500
- })
- })
+ methods: {
+ //合约配置
+ contractConfig() {
+ this.$api.contractConfig({
+ pair: this.marketDetail.pair
+ }).then(res => {
+ this.contractInfo = res
+ this.contractInfo.leverageCon = [];
+ this.contractInfo.leverageCon = this.contractInfo.leverage.split(',')
+ })
+ },
+ getTradeList() {
+ const tradeList = this.$api.tradeList({
+ "symbol": this.symbol.symbol
+ });
+ tradeList.then(res => {
+ this.tradeList = res
+
+ })
+ .catch(e => {
+ console.log(e)
+ uni.showToast({
+ title: e,
+ icon: 'none',
+ duration: 2500
+ })
+ })
+ },
+ getBboList() {
+ const bboList = this.$api.bboList({
+ "symbol": this.symbol.symbol
+ });
+ bboList.then(res => {
+ this.bboList = res
+
+ })
+ .catch(e => {
+ console.log(e)
+ uni.showToast({
+ title: e,
+ icon: 'none',
+ duration: 2500
+ })
+ })
+ },
+ getMarketDetail() {
+ const marketDetail = this.$api.marketDetail({
+ "symbol": this.symbol.symbol
+ });
+ marketDetail.then(res => {
+ this.marketDetail = res
+ this.contractConfig()
+ })
+ .catch(e => {
+ console.log(e)
+ uni.showToast({
+ title: e,
+ icon: 'none',
+ duration: 2500
+ })
+ })
},
getSymbolGroup() {
const symbolGroup = this.$api.symbolGroup({
"model": "contract"
});
symbolGroup.then(res => {
- this.symbolList = res.USDT
- if(this.symbol==null){
- this.symbol=this.symbolList[0]
+ this.symbolList = res.USDT
+ if (this.symbol == null) {
+ this.symbol = this.symbolList[0]
}
})
@@ -155,90 +168,90 @@
- },
- initWebSocket() {
-
-
- this.websock = new this.$websocket(this.$constant.WSSURL) // xxx 表示接口地址URL
-
-
- var that = this
- this.websock.getWebSocketMsg(data => {
-
- if (data.channel === 'conn') {
- that.websockId = data.data
- that.subpairsgroup()
- that.subbbo()
- that.subtrade()
- that.submarketDetail()
- } else if (data.channel === 'market.pairsgroup') {
- that.symbolList = data.data.USDT;
- }else if (data.channel === that.webSocketChannel.bbo) {
- that.bboList = data.data;
-
- }else if (data.channel === that.webSocketChannel.bbo) {
- that.bboList = data.data;
-
- }else if(data.channel === that.webSocketChannel.trade){
- that.tradeList=data.data;
- }else if(data.channel === that.webSocketChannel.detail){
- that.marketDetail=data.data;
- }
- });
- },
- //订阅交易对
- subpairsgroup(){
- this.subWebSocket('pairsgroup',['market.pairsgroup'])
- },
- //取消订阅交易对
- unsubpairsgroup(){
- this.unsubWebSocket('pairsgroup',['market.pairsgroup'])
- },
- subbbo(){
- this.webSocketChannel.bbo='market.'+this.symbol.symbol+".bbo";
- this.subWebSocket('bbo',[this.webSocketChannel.bbo])
- },
-
- unsubbbo(){
- this.unsubWebSocket('bbo',[this.webSocketChannel.bbo])
- },
- subtrade(){
- this.webSocketChannel.trade='market.'+this.symbol.symbol+".trade";
- this.subWebSocket('trade',[this.webSocketChannel.trade])
- },
-
- unsubtrade(){
- this.unsubWebSocket('trade',[this.webSocketChannel.trade])
- },
- submarketDetail(){
- this.webSocketChannel.detail='market.'+this.symbol.symbol+".detail";
- this.subWebSocket('detail',[this.webSocketChannel.detail])
- },
-
- unsubmarketDetail(){
- this.unsubWebSocket('detail',[this.webSocketChannel.detail])
- },
-
- subWebSocket(type,channel) {
- const data = {
- event: 'sub',
- type: type,
- id: this.websockId,
- channel: channel
- };
-
- this.websock.webSocketSendMsg(data)
- console.log("websocket发送", data);
- },
- unsubWebSocket(type,channel) {
- const data = {
- event: 'un_sub',
- type: type,
- id: this.websockId,
- channel: channel
- };
- this.websock.webSocketSendMsg(data)
-
+ },
+ initWebSocket() {
+
+
+ this.websock = new this.$websocket(this.$constant.WSSURL) // xxx 表示接口地址URL
+
+
+ var that = this
+ this.websock.getWebSocketMsg(data => {
+
+ if (data.channel === 'conn') {
+ that.websockId = data.data
+ that.subpairsgroup()
+ that.subbbo()
+ that.subtrade()
+ that.submarketDetail()
+ } else if (data.channel === 'market.pairsgroup') {
+ that.symbolList = data.data.USDT;
+ } else if (data.channel === that.webSocketChannel.bbo) {
+ that.bboList = data.data;
+
+ } else if (data.channel === that.webSocketChannel.bbo) {
+ that.bboList = data.data;
+
+ } else if (data.channel === that.webSocketChannel.trade) {
+ that.tradeList = data.data;
+ } else if (data.channel === that.webSocketChannel.detail) {
+ that.marketDetail = data.data;
+ }
+ });
+ },
+ //订阅交易对
+ subpairsgroup() {
+ this.subWebSocket('pairsgroup', ['market.pairsgroup'])
+ },
+ //取消订阅交易对
+ unsubpairsgroup() {
+ this.unsubWebSocket('pairsgroup', ['market.pairsgroup'])
+ },
+ subbbo() {
+ this.webSocketChannel.bbo = 'market.' + this.symbol.symbol + ".bbo";
+ this.subWebSocket('bbo', [this.webSocketChannel.bbo])
+ },
+
+ unsubbbo() {
+ this.unsubWebSocket('bbo', [this.webSocketChannel.bbo])
+ },
+ subtrade() {
+ this.webSocketChannel.trade = 'market.' + this.symbol.symbol + ".trade";
+ this.subWebSocket('trade', [this.webSocketChannel.trade])
+ },
+
+ unsubtrade() {
+ this.unsubWebSocket('trade', [this.webSocketChannel.trade])
+ },
+ submarketDetail() {
+ this.webSocketChannel.detail = 'market.' + this.symbol.symbol + ".detail";
+ this.subWebSocket('detail', [this.webSocketChannel.detail])
+ },
+
+ unsubmarketDetail() {
+ this.unsubWebSocket('detail', [this.webSocketChannel.detail])
+ },
+
+ subWebSocket(type, channel) {
+ const data = {
+ event: 'sub',
+ type: type,
+ id: this.websockId,
+ channel: channel
+ };
+
+ this.websock.webSocketSendMsg(data)
+ console.log("websocket发送", data);
+ },
+ unsubWebSocket(type, channel) {
+ const data = {
+ event: 'un_sub',
+ type: type,
+ id: this.websockId,
+ channel: channel
+ };
+ this.websock.webSocketSendMsg(data)
+
},
depthChange(e) {
console.log(e);
@@ -260,18 +273,18 @@
* 切换当前交易货币对
*/
switchTo(item) {
- this.popupShow = false;
-
- this.unsubbbo()
- this.unsubtrade()
- this.unsubmarketDetail()
- this.symbol=item;
- uni.setStorageSync('symbol',this.symbol);
- this.getMarketDetail()
- this.getBboList();
- this.getTradeList();
- this.subbbo()
- this.subtrade()
+ this.popupShow = false;
+
+ this.unsubbbo()
+ this.unsubtrade()
+ this.unsubmarketDetail()
+ this.symbol = item;
+ uni.setStorageSync('symbol', this.symbol);
+ this.getMarketDetail()
+ this.getBboList();
+ this.getTradeList();
+ this.subbbo()
+ this.subtrade()
this.submarketDetail()
}
diff --git a/pages/me/myTeam.vue b/pages/me/myTeam.vue
index 5f0f4f9..1b204a5 100644
--- a/pages/me/myTeam.vue
+++ b/pages/me/myTeam.vue
@@ -1,94 +1,214 @@
-
-
- {{ i18n.MyTeam }}
-
-
-
-
- krichjmadif0985@gmail.com
- 2022/08/06
- {{ i18n.Fresh }}
-
-
-
-
+
+
+ {{ i18n.MyTeam }}
+
+
+
+
+ 394
+
+
+ Number of clionts
+
+
+
+
+ 0
+
+
+ Earnlings yesterday
+
+
+
+
+ 9343492
+
+
+ Total income
+
+
+
+
+
+
+
+
+ User |
+ Financial funds |
+ Time |
+
+
+
+
+ 98374354705 |
+ 349849 |
+ 2021.10.14 |
+
+
+ 98374354705 |
+ 349849 |
+ 2021.10.14 |
+
+
+ 98374354705 |
+ 349849 |
+ 2021.10.14 |
+
+
+
+
+
+
diff --git a/pages/subscription/index.vue b/pages/subscription/index.vue
index 6d999b1..876254b 100644
--- a/pages/subscription/index.vue
+++ b/pages/subscription/index.vue
@@ -2,19 +2,23 @@
-
+
{{ i18n.Product }}
-
+
{{ i18n.Pending }}
-
+
{{ i18n.Complete }}
-
+
-
+
-
-
+
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
+ :nomore-text="nomoreText" v-if="info.length&&pageState=='product'" height="80" />
+
+
+
+
+
@@ -94,12 +104,17 @@
form: {
pageNumber: 1,
pageSize: 20,
- type: 'crypto',
+ status: '',
},
+ // 用户申购记录的
+ isLoadMore2: false, //是否加载中
+ loadStatus2: 'loadmore',
+ loadingText2: this.$t("login").toload,
+ loadmoreText2: this.$t("login").pullup,
+ nomoreText2: this.$t("login").Nomore,
}
},
- onLoad() {
- },
+ onLoad() {},
onShow() {
this.baseURL = constant.BASE_URL
this.getGoods();
@@ -111,11 +126,71 @@
}
},
methods: {
+ //看是获取用户申购记录还是申购列表 product 是获取申购列表 其它两个是获取记录
+ getInfo(e) {
+ this.info=[];
+ this.userInfoObj=[]
+ if (e == 'product') {
+ this.getGoods()
+ }
+ if (e == 'pending') {
+ this.form.status = 'undone'
+ this.getList()
+ }
+ if (e == 'complete') {
+ this.form.status = 'complete'
+ this.getList()
+ }
+ },
+ //用户申购记录
+ getList() {
+ this.isLoadMore2 = true
+ api.subscriptionRecord(this.form).then(res => {
+ if (res.content.length) {
+ if (this.form.pageNumber > 1) {
+ this.userInfoObj = this.userInfoObj.concat(res.content)
+ for (var i = 0; i < this.userInfoObj.length; i++) {
+ if (this.userInfoObj[i].addTime) {
+ this.userInfoObj[i].timestr = this.$index.formatyymmddhhmmss(this.userInfoObj[
+ i].addTime)
+ }
+ }
+ } else {
+ this.userInfoObj = res.content
+ for (var i = 0; i < this.userInfoObj.length; i++) {
+ if (this.userInfoObj[i].addTime) {
+ this.userInfoObj[i].timestr = this.$index.formatyymmddhhmmss(this.userInfoObj[
+ i].addTime)
+ }
+ }
+ }
+ if (this.userInfoObj.length >= Number(res.totalElements)) { // 判断接口返回数据量小于请求数据量,则表示此为最后一页
+ this.isLoadMore2 = true
+ this.loadStatus2 = 'nomore'
+ } else {
+ this.isLoadMore2 = false
+ }
+ } else {
+ this.isLoadMore2 = true
+ this.loadStatus2 = 'nomore'
+ this.userInfoObj = []
+ }
+ this.$forceUpdate()
+ })
+ },
+
+ //申购币列表
getGoods() {
api.subscriptionList().then(res => {
this.info = res;
this.isLoadMore = true
this.loadStatus = 'nomore'
+ for (var i = 0; i < this.info.length; i++) {
+ if (this.info[i].startDate) {
+ this.info[i].timestr = this.$index.formatyymmddhhmmss(this.info[
+ i].startDate)
+ }
+ }
})
},
gotoDetails(i, index) {
diff --git a/static/me/myTeambg.png b/static/me/myTeambg.png
new file mode 100644
index 0000000..f16b8f0
Binary files /dev/null and b/static/me/myTeambg.png differ