Fly 2 年之前
父節點
當前提交
1594fe648a

+ 8 - 2
api/index.js

@@ -65,8 +65,14 @@ export function Api_getFlashRecord() {
 }
 
 // 提交兑换
-export function Api_getSubmit() {
-	return axios.post(`/api/wallet/flashAgainst`)
+export function Api_getSubmit(data) {
+	return axios.post(`/api/wallet/flashAgainst` , data)
+}
+
+
+// 7-2-3、7-2-4 充值
+export function Api_getTopUp(data) {
+	return axios.post(`/api/wallet/get_in_address` , data)
 }
 
 // // 根据手机号登录

+ 1 - 1
components/marketplace/marketplace.vue

@@ -37,7 +37,7 @@
 					<view class="table-title">
 						<view class="title">
 							<text>{{ val.currency_name }}</text>
-							<text class="title-sub">/{{ item.name }}</text>
+							<text class="title-sub">{{ item.legal_name ? `/${item.legal_name}` : '' }}</text>
 						</view>
 						<view class="title-num">
 							24H额:476.62m

File diff suppressed because it is too large
+ 1201 - 0
components/tki-qrcode/qrcode.js


+ 210 - 0
components/tki-qrcode/tki-qrcode.vue

@@ -0,0 +1,210 @@
+<template xlang="wxml" minapp="mpvue">
+	<view class="tki-qrcode">
+		<!-- #ifndef MP-ALIPAY -->
+		<canvas class="tki-qrcode-canvas" :canvas-id="cid" :style="{width:cpSize+'px',height:cpSize+'px'}" />
+		<!-- #endif -->
+		<!-- #ifdef MP-ALIPAY -->
+		<canvas :id="cid" :width="cpSize" :height="cpSize" class="tki-qrcode-canvas" />
+		<!-- #endif -->
+		<image v-show="show" :src="result" :style="{width:cpSize+'px',height:cpSize+'px'}" />
+	</view>
+</template>
+
+<script>
+import QRCode from "./qrcode.js"
+let qrcode
+export default {
+	name: "tki-qrcode",
+	props: {
+		cid: {
+			type: String,
+			default: 'tki-qrcode-canvas'
+		},
+		size: {
+			type: Number,
+			default: 200
+		},
+		unit: {
+			type: String,
+			default: 'upx'
+		},
+		show: {
+			type: Boolean,
+			default: true
+		},
+		val: {
+			type: String,
+			default: ''
+		},
+		background: {
+			type: String,
+			default: '#ffffff'
+		},
+		foreground: {
+			type: String,
+			default: '#000000'
+		},
+		pdground: {
+			type: String,
+			default: '#000000'
+		},
+		icon: {
+			type: String,
+			default: ''
+		},
+		iconSize: {
+			type: Number,
+			default: 40
+		},
+		lv: {
+			type: Number,
+			default: 3
+		},
+		onval: {
+			type: Boolean,
+			default: false
+		},
+		loadMake: {
+			type: Boolean,
+			default: false
+		},
+		usingComponents: {
+			type: Boolean,
+			default: true
+		},
+		showLoading: {
+			type: Boolean,
+			default: true
+		},
+		loadingText: {
+			type: String,
+			default: '二维码生成中'
+		},
+	},
+	data() {
+		return {
+			result: '',
+		}
+	},
+	methods: {
+		_makeCode() {
+			let that = this
+			if (!this._empty(this.val)) {
+				qrcode = new QRCode({
+					context: that, // 上下文环境
+					canvasId:that.cid, // canvas-id
+					usingComponents: that.usingComponents, // 是否是自定义组件
+					showLoading: that.showLoading, // 是否显示loading
+					loadingText: that.loadingText, // loading文字
+					text: that.val, // 生成内容
+					size: that.cpSize, // 二维码大小
+					background: that.background, // 背景色
+					foreground: that.foreground, // 前景色
+					pdground: that.pdground, // 定位角点颜色
+					correctLevel: that.lv, // 容错级别
+					image: that.icon, // 二维码图标
+					imageSize: that.iconSize,// 二维码图标大小
+					cbResult: function (res) { // 生成二维码的回调
+						that._result(res)
+					},
+				});
+			} else {
+				uni.showToast({
+					title: '二维码内容不能为空',
+					icon: 'none',
+					duration: 2000
+				});
+			}
+		},
+		_clearCode() {
+			this._result('')
+			qrcode.clear()
+		},
+		_saveCode() {
+			let that = this;
+			if (this.result != "") {
+				uni.saveImageToPhotosAlbum({
+					filePath: that.result,
+					success: function () {
+						uni.showToast({
+							title: '二维码保存成功',
+							icon: 'success',
+							duration: 2000
+						});
+					}
+				});
+			}
+		},
+		_result(res) {
+			this.result = res;
+			this.$emit('result', res)
+		},
+		_empty(v) {
+			let tp = typeof v,
+				rt = false;
+			if (tp == "number" && String(v) == "") {
+				rt = true
+			} else if (tp == "undefined") {
+				rt = true
+			} else if (tp == "object") {
+				if (JSON.stringify(v) == "{}" || JSON.stringify(v) == "[]" || v == null) rt = true
+			} else if (tp == "string") {
+				if (v == "" || v == "undefined" || v == "null" || v == "{}" || v == "[]") rt = true
+			} else if (tp == "function") {
+				rt = false
+			}
+			return rt
+		}
+	},
+	watch: {
+		size: function (n, o) {
+			if (n != o && !this._empty(n)) {
+				this.cSize = n
+				if (!this._empty(this.val)) {
+					setTimeout(() => {
+						this._makeCode()
+					}, 100);
+				}
+			}
+		},
+		val: function (n, o) {
+			if (this.onval) {
+				if (n != o && !this._empty(n)) {
+					setTimeout(() => {
+						this._makeCode()
+					}, 0);
+				}
+			}
+		}
+	},
+	computed: {
+		cpSize() {
+			if(this.unit == "upx"){
+				return uni.upx2px(this.size)
+			}else{
+				return this.size
+			}
+		}
+	},
+	mounted: function () {
+		if (this.loadMake) {
+			if (!this._empty(this.val)) {
+				setTimeout(() => {
+					this._makeCode()
+				}, 0);
+			}
+		}
+	},
+}
+</script>
+<style>
+.tki-qrcode {
+  position: relative;
+}
+.tki-qrcode-canvas {
+  position: fixed;
+  top: -99999upx;
+  left: -99999upx;
+  z-index: -99999;
+}
+</style>

+ 6 - 0
pages.json

@@ -139,6 +139,12 @@
                     "style" : {
                         "navigationBarTitleText" : "客服"
                     }
+                },
+                {
+                    "path" : "exchange-record",
+                    "style" : {
+                        "navigationBarTitleText" : "兑换记录"
+                    }
                 }
             ]
         }

+ 53 - 0
pages/content/exchange-record.vue

@@ -0,0 +1,53 @@
+<template>
+	<view>
+		<headContent>&#xe642;
+			<template #left>
+				<reverse-back />
+			</template>
+			<template #content>
+				<view class="haed-title">
+					兑换记录
+				</view>
+			</template>
+		</headContent>
+		<gap />
+		<view class="page-content">
+			<block v-for="(item , index) in recordList" :key="`record_${index}`">
+				<view class="">
+					{{ item.l_currency }} - {{ item.r_currency }} - {{ item.num }}
+				</view>
+			</block>
+		</view>
+	</view>
+</template>
+
+<script>
+	import { Api_getFlashRecord } from "@/api/index.js"
+	export default {
+		name:'exchange-record',
+		data() {
+			return {
+				recordList:[]
+			};
+		},
+		onLoad() {
+			this.getFlashRecord()
+		},
+		mounted() {
+		 
+		},
+		methods:{
+			getFlashRecord(){
+				Api_getFlashRecord().then(res => {
+					this.recordList = res.data
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+.page-content{
+	padding: 0 $pages-padding;
+}
+</style>

+ 174 - 29
pages/content/top-up.vue

@@ -3,7 +3,7 @@
 		<!-- 头部 -->
 		<headContent>
 			<template #left>
-				<reverse-back path="pages/content/top-up"/>
+				<reverse-back path="pages/content/top-up" />
 			</template>
 			<template #content>
 				<view class="haed-title">
@@ -18,7 +18,7 @@
 		<view class="currency-box">
 			<view class="currency-item">
 				<view class="currency-info">
-					<template  v-if="biInfo">
+					<template v-if="biInfo">
 						<image class="currency-icon" :src="biInfo.logo" mode="aspectFit"></image>
 						<text class="currency-name">{{ biInfo.name }}</text>
 					</template>
@@ -28,15 +28,36 @@
 					<text class="iconfont">&#xe88e;</text>
 				</view>
 			</view>
-			<view class="currency-code"></view>
-			
-			<view class="currency-btn">保存二维码</view>
-			<view class="currency-btn currency-copy">复制地址</view>
+			<view class="link-name">
+				<view class="link-lable">链名称</view>
+				<view class="link-btns">
+					<text @click.stop="setCode('erc20')"
+						:class="['link-btn' , linkLable === 'erc20' ? 'active-link-btn' : '']">ERC20</text>
+					<text @click.stop="setCode('trc20')"
+						:class="['link-btn' , linkLable === 'trc20' ? 'active-link-btn' : '']">TRC20</text>
+				</view>
+			</view>
+
+			<view class="currency-code">
+				<!-- https://ext.dcloud.net.cn/plugin?id=39 -->
+				<tki-qrcode ref="qrcode" :size="350" :showLoading="false" :val="linkVal[linkLable]" />
+
+
+			</view>
+
+			<view class="currency-btn" @click.stop="saveCode()">保存二维码</view>
+			<view class="link-val">
+				{{ linkVal[linkLable] }}
+			</view>
+			<view class="currency-btn currency-copy" @click.stop="setCopy(linkVal[linkLable])">复制地址</view>
 		</view>
 	</view>
 </template>
 
 <script>
+	import {
+		Api_getTopUp
+	} from "@/api/index.js"
 	import reverseBack from "@/components/headModules/reverse-back.vue"
 	export default {
 		name: 'top-up',
@@ -45,45 +66,100 @@
 		},
 		data() {
 			return {
-				biInfo:null,
+				biInfo: null,
+				linkLable: 'erc20',
+				linkVal: {
+					erc20: '',
+					trc20: ''
+				}
 			};
 		},
 		onLoad(opt) {
 			const key = opt?.key || '';
 			this.biInfo = this.$getStorageSync('select')[key];
+			this.getTopUp()
 		},
 		methods: {
+			getTopUp() {
+				Api_getTopUp({
+					currency: this.biInfo.id
+				}).then(res => {
+					this.linkVal = res;
+					this.makeCode()
+				}).catch(err => {
+
+				}).finally(() => {
+
+				})
+			},
+			setCode(item) {
+				this.linkLable = item;
+				this.makeCode()
+			},
+			makeCode() {
+				this.$nextTick(() => {
+					this.$refs.qrcode._makeCode()
+				})
+			},
+			saveCode() {
+				// #ifndef H5
+				this.$nextTick(() => {
+					this.$refs.qrcode._saveCode()
+				})
+				// #endif
+			},
+			setCopy(val) {
+				if (val) {
+					uni.setClipboardData({
+						data: val,
+						success: function() {
+							uni.showToast({
+								icon:"none",
+								title: '复制成功'
+							})
+						}
+					});
+				}
+			},
 			// pages/content/top-up
-			selectCurrency(){
+			selectCurrency() {
 				const pages = getCurrentPages()
-				console.log('pages = ' , pages)
-				if(pages.length > 1 && pages[pages.length - 1].route === 'pages/content/select-currency' ){
+				console.log('pages = ', pages)
+				if (pages.length > 1 && pages[pages.length - 1].route === 'pages/content/select-currency') {
 					uni.navigateBack()
-				}else{
+				} else {
 					uni.navigateTo({
 						url: '/pages/content/select-currency'
 					});
 				}
-				
+
 			},
 			// 查看充值记录
-			lookRecord(){
-				uni.navigateTo({
-					url:'/pages/content/charge-record'
-				})
+			lookRecord() {
+				const pages = getCurrentPages()
+				if (pages.length > 2 && pages[pages.length - 2].route === 'pages/content/charge-record') {
+					uni.navigateBack({
+						delta: 1
+					})
+				} else {
+					uni.navigateTo({
+						url: "/pages/content/charge-record"
+					});
+				};
 			}
 		}
 	}
 </script>
 <style>
 	page {
-		background-color: #f5f5f5;
+		background-color: #F6F7FB;
 	}
 </style>
 <style lang="scss" scoped>
-	.head-record{
+	.head-record {
 		font-size: 60rpx;
 	}
+
 	.currency-box {
 		width: 100%;
 		padding: 30rpx 40rpx;
@@ -111,27 +187,28 @@
 					font-weight: 700;
 				}
 			}
-			
-			.select-currency{
+
+			.select-currency {
 				flex-shrink: 0;
 				display: flex;
 				align-items: center;
 				font-size: 24rpx;
-				.iconfont{
+
+				.iconfont {
 					color: #ccc;
 				}
 			}
 
 		}
 
-		.currency-code{
-			margin: 80rpx auto 0;
+		.currency-code {
+			margin: 36rpx auto 0;
 			width: 350rpx;
 			height: 350rpx;
 			background-color: #fff;
 		}
-		
-		.currency-btn{
+
+		.currency-btn {
 			width: 360rpx;
 			height: 80rpx;
 			background-color: $Theme-Color;
@@ -142,14 +219,82 @@
 			font-size: 30rpx;
 			color: #fff;
 		}
-		
-		.currency-copy{
+
+		.link-val {
+			width: 100%;
+			min-height: 103rpx;
+			padding: 35rpx 0;
+			font-size: 24rpx;
+			font-family: PingFang SC, PingFang SC-Regular;
+			font-weight: 400;
+			text-align: center;
+			color: #1a1a1a;
+			line-height: 33rpx;
+
+		}
+
+		.currency-copy {
 			color: $Theme-Color;
 			background-color: #fff;
-			margin: 100rpx auto 0; 
-			border: 1rpx solid $Theme-Color; 
+			margin: 0 auto;
+			border: 1rpx solid $Theme-Color;
 			line-height: 78rpx;
 		}
 
 	}
+
+	.link-name {
+		width: 100%;
+		padding-top: 40rpx;
+		font-size: 24rpx;
+		font-family: PingFang SC, PingFang SC-Bold;
+		font-weight: 700;
+
+		.link-lable {
+			// width: 72px;
+			// height: 33px;
+			color: #1a1a1a;
+			line-height: 1.2;
+		}
+
+		.link-btns {
+			width: 100%;
+			padding-top: 16rpx;
+
+
+			.link-btn {
+				display: inline-block;
+				width: 180rpx;
+				height: 72rpx;
+				background: #f6f5f3;
+				border-radius: 8px;
+				text-align: center;
+				line-height: 70rpx;
+				font-size: 28rpx;
+				font-weight: 400;
+				color: #666666;
+				border-radius: 8rpx;
+				border: 1rpx solid #f6f5f3;
+
+				&:nth-child(n + 2) {
+					margin-left: 20rpx;
+				}
+			}
+
+			.active-link-btn {
+				background: #ffffff;
+				border-color: #05c175;
+				color: #FFBA6A;
+			}
+		}
+
+	}
+
+	// <view class="link-name">
+	// 	<view class="link-lable">链名称</view>
+	// 	<view class="link-btns">
+	// 		<text class="link-btn">ERC20</text>
+	// 		<text class="link-btn">TRC20</text>
+	// 	</view>
+	// </view>
 </style>

+ 170 - 37
pages/exchange/index.vue

@@ -11,33 +11,41 @@
 				<view @click.stop="lookRecord()" class="head-record iconfont">&#xe642;</view>
 			</template>
 		</headContent>
-
 		<view class="box">
 			<view class="exchange-box">
 				<view class="">
 					<view class="exchange-item">
-						<view class="exchange-coin">
-							<image class="coin-icon" src="../../static/logo.png" mode="aspectFit"></image>
-							<text class="coin-name">USDTV</text>
-							<text class="coin-ratio">0.09</text>
+						<view class="exchange-coin" @click.stop="activeType('left')">
+							<template v-if="active.left">
+								<image class="coin-icon" :src="active.left.logo" mode="aspectFit"></image>
+								<text class="coin-name">{{ active.left.name }}</text>
+								<text class="select-icon iconfont">&#xe601;</text>
+								<text class="coin-ratio" />
+								<!-- <text class="coin-ratio">{{ active.left.min_number }} - {{ active.left.max_number }}</text> -->
+							</template>
 						</view>
-						<text class="max-title">最大</text>
+						<input class="coin-input iconfont" :placeholder=" active.left ? `${active.left.min_number}-${active.left.balance}` : ''" v-model="num" type="number">
+						<text class="max-title" @click.stop="active.left ? setMaxNum(active.left.balance) : ''">最大</text>
 					</view>
 					<view class="exchange-item">
-						可用余额:0.0914USDT
+						可用余额:{{ active.left ? active.left.balance : '--' }} USDT
 					</view>
 				</view>
 				<view class="exchange-item">
-					<view class="exchange-coin">
-						<image class="coin-icon" src="../../static/logo.png" mode="aspectFit"></image>
-						<text class="coin-name">USDTV</text>
+					<view class="exchange-coin" @click.stop="activeType('right')">
+						<template v-if="active.right">
+							<image class="coin-icon" :src="active.right.logo" mode="aspectFit"></image>
+							<text class="coin-name">{{ active.right.name }}</text>
+							<text class="select-icon iconfont">&#xe601;</text>
+						</template>
+
 					</view>
 				</view>
-				<view class="exchange-switch">
-					<image class="switch-icon" src="../../static/logo.png" mode="aspectFit"></image>
+				<view class="exchange-switch" @click.stop="exchangeSwitch">
+					<text class="switch-icon iconfont">&#xe607;</text>
 				</view>
 			</view>
-			<view class="exchange-btn">预览兑换结果</view>
+			<view class="exchange-btn" @click.stop="submitPreview">预览兑换结果</view>
 
 			<view class="exchange-hint">
 				<view class="hint-title">兑换规则</view>
@@ -52,14 +60,18 @@
 				</view>
 			</view>
 		</view>
-		<selectCoin ref="selectCoin"/>
+		<selectCoin ref="selectCoinRef" :active-val.sync="active[selectKey]" :selectList="selectList" />
 	</view>
 </template>
 
 <script>
 	import share from "@/components/headModules/share.vue"
-	import selectCoin from "./modules/select-coin.vue" 
-	import { Api_getBiTypeList , Api_getFlashRecord , Api_getSubmit} from "@/api/index.js"
+	import selectCoin from "./modules/select-coin.vue"
+	import {
+		Api_getBiTypeList,
+		Api_getFlashRecord,
+		Api_getSubmit
+	} from "@/api/index.js"
 	export default {
 		name: 'exchange',
 		components: {
@@ -68,32 +80,128 @@
 		},
 		data() {
 			return {
-
+				content: {
+					left: [],
+					right: []
+				},
+				selectKey: '',
+				selectList: [],
+				fromKey: true,
+				left: [],
+				right: [],
+				active: {
+					left: null,
+					right: null,
+				},
+				num:'',
 			};
 		},
 		onLoad() {
 			this.getBiTypeList();
 		},
-		methods:{
-			getBiTypeList(){
-				Api_getFlashRecord().then(res => {
-					console.log('Api_getBiTypeList = ' , res)
+		watch: {
+			'active.left': {
+				handler() {
+					this.setLeftList()
+				},
+				deep: true
+			}
+		},
+		methods: {
+			getBiTypeList() {
+				Api_getBiTypeList().then(res => {
+					this.content = res;
+					this.setLeftList()
 				}).catch(err => {
-					console.log('Api_getBiTypeList = ' , err)
+					console.log('Api_getBiTypeList = ', err)
+				})
+			},
+			// 选择
+			activeType(key) {
+				this.selectKey = key;
+				this.selectList = this[key];
+				console.log('aaa ', this[key])
+				this.$nextTick(() => {
+					this.$refs.selectCoinRef.open()
+				})
+			},
+			// 上下切换
+			exchangeSwitch() {
+				this.fromKey = !this.fromKey;
+				const l = JSON.parse(JSON.stringify(this.active.left));
+				this.active.left = this.active.right
+				this.active.right = l
+				this.setLeftList()
+			},
+			setMaxNum(num){
+				this.num = num
+			},
+			setLeftList() {
+				let rightList = null;
+				if (this.fromKey) {
+					rightList = JSON.parse(JSON.stringify(this.content.right))
+					this.left = this.content.left;
+				} else {
+					rightList = JSON.parse(JSON.stringify(this.content.left))
+					this.left = this.content.right;
+				};
+
+				this.active.left = this.active.left || this.left[0] || null
+				this.setRightList(rightList)
+				// this.right = right;
+				// this.active.right = this.right[0] || null
+			},
+			setRightList(right) {
+				this.right = []
+				right.forEach(el => {
+					if (el.name == this.active.left.name) {
+						if(this.active.right && this.active.right.name == el.name){
+							this.active.right = null;
+						}
+					} else {
+						this.right.push(el)
+					}
+
+				})
+				this.active.right = this.active.right || this.right[0] || null
+
+
+
+			},
+			// 提交预览
+			submitPreview(){
+				const obj = {
+					l_currency_id: this.active.left.id,
+					r_currency_id: this.active.right.id,
+					num:this.num,
+					price: this.active.left.price,
+				}
+				uni.showLoading({
+					mask:true
+				})
+				Api_getSubmit(obj).then(res => {
+					this.getBiTypeList()
+				}).catch(err => {}).finally(() => {
+					uni.hideLoading()
+				})
+			},
+			lookRecord(){
+				uni.navigateTo({
+					url:'/pages/content/exchange-record'
 				})
 			}
 		}
 	}
 </script>
 <style>
-	page{
+	page {
 		background-color: #EDEDEF;
 	}
 </style>
 <style lang="scss" scoped>
-	 .head-record{
-	 	font-size: 60rpx;
-	 }
+	.head-record {
+		font-size: 60rpx;
+	}
 
 	.box {
 		padding: 36rpx 30rpx 0;
@@ -117,10 +225,13 @@
 				height: 84rpx;
 				background: #05c175;
 				border-radius: 29rpx;
+				text-align: center;
+				line-height: 84rpx;
+				transform: rotate(90deg);
 
 				.switch-icon {
-					width: 100%;
-					height: 100%;
+					font-size: 40rpx;
+					color: #fff;
 				}
 			}
 
@@ -132,14 +243,17 @@
 				.exchange-coin {
 					display: flex;
 					align-items: center;
+					flex-shrink: 0;
 
 					.coin-icon {
 						width: 52rpx;
 						height: 52rpx;
 						border-radius: 50%;
+						flex-shrink: 0;
 					}
 
 					.coin-name {
+						flex-shrink: 0;
 						padding-left: 13rpx;
 
 						font-size: 32rpx;
@@ -150,19 +264,37 @@
 					}
 
 					.coin-ratio {
-						font-size: 28rpx;
-						font-family: PingFang SC, PingFang SC-Bold;
-						font-weight: 700;
-						color: #1a1a1a;
-						line-height: 40rpx;
-						border-left: 1rpx solid #e6e6e6;
-						padding-left: 24rpx;
+						margin: 0 20rpx;
+						width: 1rpx;
+						height: 44rpx;
+						// $border-color;
+						background-color: $border-color;
+						// flex-shrink: 0;
+						// font-size: 26rpx;
+						// font-family: PingFang SC, PingFang SC-Bold;
+						// font-weight: 700;
+						// color: #b7b4b4;
+						// line-height: 40rpx;
+						// border-left: 1rpx solid #e6e6e6;
+						// padding-left: 24rpx;
+						// margin-left: 20rpx;
+					}
+
+					.select-icon {
+						font-size: 26rpx;
 						margin-left: 20rpx;
 					}
 				}
 
-				.max-title {
+				.coin-input {
+					flex: 1;
+					height: 100%;
+					padding: 0 20rpx;
+					font-size: 24rpx;
+				}
 
+				.max-title {
+					flex-shrink: 0;
 					font-size: 28rpx;
 					font-family: PingFang SC, PingFang SC-Regular;
 					font-weight: 400;
@@ -205,7 +337,8 @@
 				font-weight: 400;
 				color: #1a1a1a;
 			}
-			.hint-content{
+
+			.hint-content {
 				padding: 24rpx 0 11rpx;
 				font-size: 26rpx;
 				font-family: PingFang SC, PingFang SC-Regular;

+ 42 - 15
pages/exchange/modules/select-coin.vue

@@ -9,14 +9,16 @@
 
 			<view class="content-box">
 				<view class="search-box">
-					<input class="search-input" placeholder-class="search-input-placeholder" placeholder="搜索您要的币种"/>
+					<input class="search-input" placeholder-class="search-input-placeholder" placeholder="搜索您要的币种" />
 					<image class="search-icon" src="../../../static/logo.png" mode="aspectFit"></image>
 				</view>
+				<scroll-view scroll-y class="scroll-view-list">
+					<view class="content-item" v-for="(item , index) in selectList" @click.stop="selectItem(item)" :key="`content_${index}`">
+						<image class="item-icon" :src="item.logo" mode="aspectFit"></image>
+						<text class="item-text hide_1">{{item.name}}</text>
+					</view>
+				</scroll-view>
 
-				<view class="content-item" v-for="(item , index) in contentList" :key="`content_${index}`">
-					<image class="item-icon" :src="item.icon" mode="aspectFit"></image>
-					<text class="item-text hide_1">{{item.name}}</text>
-				</view>
 			</view>
 		</view>
 	</uni-popup>
@@ -25,6 +27,18 @@
 <script>
 	export default {
 		name: "exchangeSelectCoin",
+		props: {
+			activeVal:{
+				type:Object,
+				default: () => {
+					return {}
+				}
+			},
+			selectList: {
+				type: Array,
+				default: () => []
+			}
+		},
 		data() {
 			return {
 				contentList: [{
@@ -50,6 +64,13 @@
 				this.$nextTick(() => {
 					this.$refs.popupRef.open();
 				})
+			},
+			close() {
+				this.$refs.popupRef.close();
+			},
+			selectItem(item){
+				this.$emit('update:activeVal', item);
+				this.close();
 			}
 
 		}
@@ -59,11 +80,12 @@
 <style lang="scss" scoped>
 	.popup-box {
 		width: 100%;
-		min-height: 45vh;
-		max-height: 75vh;
 		border-radius: 50rpx 50rpx 0px 0px;
 		background-color: #fff;
-
+		.scroll-view-list{
+			width: 100%;
+			height: 35vh;
+		}
 		.title-box {
 			width: 100%;
 			height: 113rpx;
@@ -93,9 +115,9 @@
 
 		.content-box {
 			width: 100%;
-			height: calc(100% - 113rpx);
 			padding: 0 $pages-padding 20rpx;
-			.search-box{
+
+			.search-box {
 				margin: 30rpx 0 20rpx;
 				width: 100%;
 				height: 60rpx;
@@ -104,29 +126,34 @@
 				background-color: #dbdce0;
 				border-radius: 30rpx;
 				padding: 0 30rpx;
+
 				// <view class="search-box">
 				// 	<input class="search-input" placeholder-class="search-input-placeholder" placeholder="请输入密码"/>
 				// 	<image class="search-icon" src="../../../static/logo.png" mode="aspectFit"></image>
 				// </view>
-				.search-input{
+				.search-input {
 					flex: 1;
 					height: 100%;
 				}
-				.search-input,.search-input-placeholder{
-				 
+
+				.search-input,
+				.search-input-placeholder {
+
 					font-size: 24rpx;
 					font-family: PingFang SC, PingFang SC-Regular;
 					font-weight: 400;
 					text-align: left;
 					color: #333333;
 				}
-				.search-icon{
+
+				.search-icon {
 					width: 38rpx;
 					height: 38rpx;
 					flex-shrink: 0;
 				}
-				
+
 			}
+
 			.content-item {
 				width: 100%;
 				height: 66rpx;

+ 2 - 1
pages/index/index.vue

@@ -111,7 +111,8 @@
 			// 获取行情 / 首页推荐
 			getQuotationNew() {
 				Api_getQuotationNew().then(res => {
-					this.quotationNew = res
+					this.quotationNew = res;
+					console.log('this.quotationNew = ' , this.quotationNew)
 				}).catch(err => {
 
 				})

+ 0 - 1
pages/index/modules/market.vue

@@ -18,7 +18,6 @@
 					<marketplace ref="marketplaceRef" :marketplaceList="market"/>
 				</scroll-view>
 			</swiper-item>
-
 		</swiper>
 
 	</view>

+ 5 - 3
pages/property/modules/Bibi/index.vue

@@ -82,13 +82,15 @@
 				cardMuen: [{
 					icon: require('@/static/logo.png'),
 					name: '充币',
-					path:'/pages/content/select-currency'
+					path:'/pages/content/select-currency?type=recharge'
 				}, {
 					icon: require('@/static/logo.png'),
-					name: '提币'
+					name: '提币',
+					path:'/pages/content/select-currency?type=withdraw'
 				}, {
 					icon: require('@/static/logo.png'),
-					name: '闪兑'
+					name: '闪兑',
+					path:'/pages/exchange/index'
 				}, {
 					icon: require('@/static/logo.png'),
 					name: '划转',

+ 6 - 1
pages/property/modules/card.js

@@ -12,7 +12,12 @@ export const biName = {
 
 export const checkBill = (path = '') => {
 	uni.navigateTo({
-		url: path
+		url: path,
+		fail: () => {
+			uni.reLaunch({
+				url: path
+			});
+		}
 	});
 }
 

+ 4 - 3
utils/common.js

@@ -69,16 +69,17 @@ export const reverseBack = (path = undefined) => {
 		let deltaNum = 1;
 		if (path) {
 			const pageLength = pages.length
-			let num = pageLength - 1;
+			let num = pageLength;
 			for (let i = 1; i < pageLength; i++) {
 				num -= 1;
-				if (pages[num].route !== path) {
+				if (pages[num].route === path) {
 					deltaNum = i;
-					break;
 				}
 			}
 			
 		};
+		console.log('pages = ' , pages)
+		console.log('deltaNum = ' , deltaNum)
 		uni.navigateBack({
 			delta: deltaNum,
 			fail: err => {}

+ 5 - 3
utils/request.js

@@ -72,8 +72,7 @@ export const request = async (opt = {}) => {
 	opt.timeout = 5000 // 请求超时时间
 
 	opt.header = headers
-	
-	console.log('opt = ' , opt)
+	 
 	const result = new Promise((resolve, reject) => {
 		const handler = uni.request(Object.assign({}, opt, {
 			success: (res) => {
@@ -83,7 +82,10 @@ export const request = async (opt = {}) => {
 					resolve(data.message)
 				}else if (data.type === '999') {
 					// 未登录
-					store.commit('app/SET_TOKEN' , '')
+					store.commit('app/SET_TOKEN' , '');
+					uni.navigateTo({
+						url:'/pages/login/index'
+					})
 				} else {
 					uni.showToast({
 						icon: 'none',