xiaol 10 months ago
parent
commit
227ca9a6c1

+ 359 - 0
pages/index/index - 副本.vue

@@ -0,0 +1,359 @@
+<template>
+	<view class="container">
+		<view class="top flex">
+			<view class="icon1 flex">
+				<image src="/static/image/img01.png" style="width: 139rpx;" mode="widthFix"></image>
+				<view class="myName">我的</view>
+			</view>
+			<view class="flex">
+				<image src="/static/image/img03.png" style="width: 39rpx;margin-right: 38rpx;" mode="widthFix"></image>
+				<image src="/static/image/img02.png" style="width: 39rpx;" mode="widthFix"></image>
+			</view>
+		</view>
+		<view class="swiper-box">
+			<u-swiper :list="swiperList" indicator indicatorMode="line" height="280rpx" circular></u-swiper>
+		</view>
+		<view class="flex noteBox">
+			<view class="flex_item noteTpl">
+				<image src="/static/image/img04.png" style="width: 42rpx;" mode="widthFix"></image>
+				<view class="clamp textTpl">上线活动的公告等等公告内容上线活动的公告等等公告内容等上线活动的公告等等公告内容等</view>
+			</view>
+			<view class="tip"></view>
+		</view>
+		<view class="flex navList">
+			<view class="navTpl" @click="openurl('/pages/index/recharge')">
+				<image src="/static/image/img06.png" style="width: 123rpx;" mode="widthFix"></image>
+				<view class="navName">充值</view>
+			</view>
+			<view class="navTpl" @click="openurl('/pages/index/personal')">
+				<image src="/static/image/img07.png" style="width: 123rpx;" mode="widthFix"></image>
+				<view class="navName">实名认证</view>
+			</view>
+			<view class="navTpl" @click="openurl('/pages/index/transaction')">
+				<image src="/static/image/img08.png" style="width: 123rpx;" mode="widthFix"></image>
+				<view class="navName">交易密码</view>
+			</view>
+			<view class="navTpl" @click="openurl('/pages/index/information')">
+				<image src="/static/image/img09.png" style="width: 123rpx;" mode="widthFix"></image>
+				<view class="navName">收款信息</view>
+			</view>
+			<view class="navTpl" @click="openurl('/pages/index/service')">
+				<image src="/static/image/img10.png" style="width: 123rpx;" mode="widthFix"></image>
+				<view class="navName">联系客服</view>
+			</view>
+		</view>
+		<view class="starBox flex">
+			<view class="starTpl flex_item">
+				<image src="/static/image/img12.png" style="width: 75rpx;" mode="widthFix"></image>
+				<view class="starText">
+					<view class="name">okx(欧易)</view>
+					<view class="num">7.21</view>
+				</view>
+			</view>
+			<view class="starTpl flex_item">
+				<image src="/static/image/img13.png" style="width: 75rpx;" mode="widthFix"></image>
+				<view class="starText">
+					<view class="name">STAR(星空)</view>
+					<view class="num">7.21</view>
+				</view>
+			</view>
+		</view>
+		<image src="/static/image/img11.png" style="width: 692rpx;padding-top: 31rpx;" mode="widthFix"></image>
+		<view class="titleBox">
+			<view class="titleTip">累计成交量</view>
+		</view>
+		<view class="flex totalBox">
+			<view class="totalTpl">
+				<view class="totalNum">10,910,000<text>USDT</text></view>
+				<view class="totalName">累计买入</view>
+			</view>
+			<view class="totalTpl">
+				<view class="totalNum">10,910,000<text>USDT</text></view>
+				<view class="totalName">累计卖出</view>
+			</view>
+		</view>
+		<view class="titleBox">
+			<view class="titleTip">平台优势</view>
+		</view>
+		<view class="advantageBox flex">
+			<view class="advantageTpl">
+				<image src="/static/image/img16.png" style="width:149rpx;" mode="widthFix"></image>
+				<view class="advantageName">简单</view>
+			</view>
+			<view class="advantageTpl">
+				<image src="/static/image/img15.png" style="width:149rpx;" mode="widthFix"></image>
+				<view class="advantageName">安全</view>
+			</view>
+			<view class="advantageTpl">
+				<image src="/static/image/img14.png" style="width:149rpx;" mode="widthFix"></image>
+				<view class="advantageName">省心</view>
+			</view>
+			<view class="advantageTpl">
+				<image src="/static/image/img17.png" style="width:149rpx;" mode="widthFix"></image>
+				<view class="advantageName">极速</view>
+			</view>
+		</view>
+	</view>
+</template>
+<script>
+	import {
+		getIndex
+	} from '@/api/index.js';
+	import {
+		getGameList,
+	} from "@/api/game.js";
+	import {
+		mapState,
+		mapActions,
+		mapMutations
+	} from "vuex";
+	export default {
+		data() {
+			return {
+				gameList: [],
+				active_user: '0',
+				swiperList:['/static/image/img05.png']
+			}
+		},
+		computed: {
+			...mapState({
+				langList: "langList",
+				lang: "lang",
+			}),
+			...mapState('user', ['userInfo']),
+			label() {
+				const label = this.langList.find((item) => {
+					console.log(this.lang, item.value);
+					return item.value == this.lang
+				}).label;
+				return label
+			}
+		},
+		onLoad(option) {
+			// #ifndef MP
+			if (option.spread) {
+				// 存储其他邀请人
+				uni.setStorageSync('spread', option.spread);
+			}
+			// #endif
+			// #ifdef MP
+			if (option.scene) {
+				// 存储小程序邀请人
+				uni.setStorage({
+					key: 'spread_code',
+					data: option.scene
+				});
+			}
+			// #endif
+		},
+		onShow() {
+			this.getGameList();
+			this.loadData();
+		},
+		methods: {
+			...mapMutations('user', ['setUserInfo', 'login']),
+			...mapActions({
+				setLang: "setLang",
+			}),
+			openurl(url){
+				uni.navigateTo({
+					url: url,
+					fail: (err) => {
+						uni.showModal({
+							title: '错误',
+							content: err,
+							showCancel: false,
+						});
+					}
+				});
+			},
+			// 请求载入数据
+			async loadData() {
+				getIndex({})
+					.then(({
+						data
+					}) => {
+						this.active_user = data.active_user
+						console.log(data);
+					})
+					.catch(e => {});
+			},
+			selectLang(value) {
+				this.setLang(this.langList[value.detail.value].value);
+			},
+
+			getGameList() {
+				getGameList().then((res) => {
+					this.gameList = res.data.list;
+
+					if (this.gameList.length > 2) {
+						this.gameList = this.gameList.slice(0, 2)
+					}
+				})
+			},
+		},
+	}
+</script>
+
+<style lang="scss">
+	.container {
+		width: 100%;
+		background-color: #051137;
+		padding: 0rpx 30rpx;
+		padding-top: calc(60px + var(--status-bar-height));
+		padding-bottom: 50rpx;
+	}
+	.top {
+		font-weight: 500;
+		padding: 40rpx 30rpx 24rpx 30rpx;
+		line-height: 1;
+		position: fixed;
+		top: 0;
+		left: 0;
+		width: 100%;
+		background: #051137;
+		z-index: 99;
+		.icon1 {
+			line-height: 0;
+			position: relative;
+			.myName{
+				position: absolute;
+				right: 22rpx;
+				font-weight: 500;
+				font-size: 24rpx;
+				color: #2884FF;
+			}
+		}
+	}
+	.noteBox{
+		padding: 46rpx 0rpx;
+		.noteTpl{
+			color: #fff;
+			width: 85%;
+			.textTpl{
+				width: calc(100% - 42rpx);
+				font-family: PingFang SC;
+				font-weight: 500;
+				font-size: 26rpx;
+				color: #FFFFFF;
+				padding-left: 30rpx;
+			}
+		}
+		.tip{
+			width: 12rpx;
+			height: 12rpx;
+			background: #F7453D;
+			border-radius: 100%;
+		}
+	}
+	.navList{
+		text-align: center;
+		padding:15rpx 0rpx;
+		.navTpl{
+			.navName{
+				padding-top: 23rpx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				font-size: 26rpx;
+				color: #FFFFFF;
+			}
+		}
+	}
+	.starBox{
+		padding-top: 43rpx;
+		.starTpl{
+			width: 48%;
+			background: #1F2A4A;
+			box-shadow: 0rpx 0rpx 20rpx 0rpx rgba(50,50,52,0.06);
+			border-radius: 20rpx;
+			padding: 20rpx 18rpx;
+			.starText{
+				padding-left: 25rpx;
+				.name{
+					font-family: PingFang SC;
+					font-weight: 500;
+					font-size: 22rpx;
+					color: #FFFFFF;
+					line-height: 24rpx;
+				}
+				.num{
+					padding-top: 15rpx;
+					font-family: PingFang SC;
+					font-weight: bold;
+					font-size: 30rpx;
+					color: #FFA235;
+					line-height: 24rpx;
+				}
+			}
+		}
+	}
+	.titleBox{
+		text-align: center;
+		padding: 45rpx 0rpx;
+		.titleTip{
+			flex: 1;
+			display: flex;
+			justify-content: center;
+			align-items: center;
+			height: 100%;
+			position: relative;
+			font-weight: bold;
+			font-size: 42rpx;
+			color: #FFFFFF;
+			line-height: 110rpx;
+			&:after {
+				content: '';
+				position: absolute;
+				left: 50%;
+				bottom: 0;
+				transform: translateX(-50%);
+				width: 44px;
+				height: 0;
+				border-bottom: 3px solid #FFFFFF;
+				border-radius: 25rpx;
+			}
+		}
+	}
+	.totalBox{
+		padding-top: 30rpx;
+		.totalTpl{
+			width: 45%;
+			background: url('../../static/image/img18.png') no-repeat;
+			background-size: 100% 100%;
+			text-align: center;
+			padding: 45rpx 0rpx;
+			.totalNum{
+				font-family: FZCuHeiSongS-B-GB;
+				font-weight: 400;
+				font-size: 39rpx;
+				color: #66FFFF;
+				text{
+					font-family: PingFang SC;
+					font-weight: 500;
+					font-size: 22rpx;
+					color: #66FFFF;
+				}
+			}
+			.totalName{
+				padding-top: 20rpx;
+				font-family: Source Han Sans CN;
+				font-weight: bold;
+				font-size: 26rpx;
+				color: #FFFFFF;
+			}
+		}
+	}
+	.advantageBox{
+		padding-top: 50rpx;
+		.advantageTpl{
+			text-align: center;
+			.advantageName{
+				padding-top: 25rpx;
+				font-family: PingFang SC;
+				font-weight: 500;
+				font-size: 28rpx;
+				color: #FFFFFF;
+			}
+		}
+	}
+</style>

+ 189 - 5
pages/index/index.vue

@@ -25,19 +25,19 @@
 				<image src="/static/image/img06.png" style="width: 123rpx;" mode="widthFix"></image>
 				<view class="navName">充值</view>
 			</view>
-			<view class="navTpl" @click="openurl('')">
+			<view class="navTpl" @click="openurl('/pages/index/personal')">
 				<image src="/static/image/img07.png" style="width: 123rpx;" mode="widthFix"></image>
 				<view class="navName">实名认证</view>
 			</view>
-			<view class="navTpl" @click="openurl('')">
+			<view class="navTpl" @click="openurl('/pages/index/transaction')">
 				<image src="/static/image/img08.png" style="width: 123rpx;" mode="widthFix"></image>
 				<view class="navName">交易密码</view>
 			</view>
-			<view class="navTpl" @click="openurl('')">
+			<view class="navTpl" @click="openurl('/pages/index/information')">
 				<image src="/static/image/img09.png" style="width: 123rpx;" mode="widthFix"></image>
 				<view class="navName">收款信息</view>
 			</view>
-			<view class="navTpl" @click="openurl('')">
+			<view class="navTpl" @click="openKf">
 				<image src="/static/image/img10.png" style="width: 123rpx;" mode="widthFix"></image>
 				<view class="navName">联系客服</view>
 			</view>
@@ -93,6 +93,38 @@
 				<view class="advantageName">极速</view>
 			</view>
 		</view>
+		<uni-popup
+			ref="popupkf"
+			type="center">
+			<view class="popup-box">
+				<view class="img">
+					<image
+						src="/static/image/img24.png"
+						mode=""></image>
+				</view>
+				<view class="mian">
+					<view class="delivery">
+						<view class="title">已经为您定制专属客服</view>
+						<image
+							src="/static/image/img25.png"
+							mode=""></image>
+					</view>
+					<view class="nocancel">客服VX:{{ kefu }}</view>
+					<view class="comfirm-box">
+						<view
+							class="cancel"
+							@click="cancel"
+							>取消</view
+						>
+						<view
+							class="comfirm"
+							@click="comfirm(kefu)"
+							>复制微信</view
+						>
+					</view>
+				</view>
+			</view>
+		</uni-popup>
 	</view>
 </template>
 <script>
@@ -112,7 +144,8 @@
 			return {
 				gameList: [],
 				active_user: '0',
-				swiperList:['/static/image/img05.png']
+				swiperList:['/static/image/img05.png'],
+				kefu:'ch125221',
 			}
 		},
 		computed: {
@@ -167,6 +200,14 @@
 					}
 				});
 			},
+			// 打开客服
+			openKf() {
+				this.$refs.popupkf.open();
+			},
+			// 关闭客服
+			cancel() {
+				this.$refs.popupkf.close();
+			},
 			// 请求载入数据
 			async loadData() {
 				getIndex({})
@@ -191,6 +232,55 @@
 					}
 				})
 			},
+			comfirm(text) {
+				console.log(text);
+				const result = this.uniCopy(text);
+				if (result === false) {
+					uni.showToast({
+						title: "不支持",
+					});
+				} else {
+					uni.showToast({
+						title: "复制成功",
+						icon: "none",
+					});
+				}
+				this.$refs.popupkf.close();
+			},
+			uniCopy(content) {
+				/**
+				 * 小程序端 和 app端的复制逻辑
+				 */
+				//#ifndef H5
+				uni.setClipboardData({
+					data: content,
+					success: function () {
+						console.log("success");
+						return true;
+					},
+				});
+				//#endif
+			
+				/**
+				 * H5端的复制逻辑
+				 */
+				// #ifdef H5
+				if (!document.queryCommandSupported("copy")) {
+					//为了兼容有些浏览器 queryCommandSupported 的判断
+					// 不支持
+					return false;
+				}
+				let textarea = document.createElement("textarea");
+				textarea.value = content;
+				textarea.readOnly = "readOnly";
+				document.body.appendChild(textarea);
+				textarea.select(); // 选择对象
+				textarea.setSelectionRange(0, content.length); //核心
+				let result = document.execCommand("copy"); // 执行浏览器复制命令
+				textarea.remove();
+				return result;
+				// #endif
+			},
 		},
 	}
 </script>
@@ -356,4 +446,98 @@
 			}
 		}
 	}
+	.popup-box {
+		width: 522rpx;
+		height: 605rpx;
+		background-color: #ffffff;
+		border-radius: 20rpx;
+		position: relative;
+	
+		.img {
+			position: relative;
+			top: -56rpx;
+			left: 0;
+			width: 522rpx;
+			height: 132rpx;
+			display: flex;
+			justify-content: center;
+	
+			image {
+				border-radius: 20rpx 20rpx 0 0;
+				width: 450rpx;
+				height: 132rpx;
+			}
+		}
+	
+		.mian {
+			margin-top: -44rpx;
+			display: flex;
+			flex-direction: column;
+			align-items: center;
+			// padding: 32rpx 32rpx;
+			background-color: #ffffff;
+			border-radius: 0 0 20rpx 20rpx;
+			text-align: center;
+	
+			.delivery {
+				font-size: 40rpx;
+				color: #333333;
+				display: flex;
+				align-items: center;
+				flex-direction: column;
+	
+				.title {
+				}
+	
+				image {
+					margin-top: 48rpx;
+					width: 172rpx;
+					height: 160rpx;
+				}
+			}
+	
+			.nocancel {
+				font-size: 32rpx;
+				color: #333333;
+				margin-top: 14rpx;
+			}
+	
+			.comfirm-box {
+				margin-top: 52rpx;
+				display: flex;
+				// margin-bottom: 32rpx;
+	
+				// justify-content: space-around;
+				.cancel {
+					display: flex;
+					align-items: center;
+					justify-content: center;
+					width: 197rpx;
+					height: 74rpx;
+					border: 1px solid #dcc786;
+					border-radius: 38rpx;
+	
+					font-size: 32rpx;
+					color: #605128;
+				}
+	
+				.comfirm {
+					margin-left: 32rpx;
+					display: flex;
+					align-items: center;
+					justify-content: center;
+					width: 197rpx;
+					height: 74rpx;
+					background: linear-gradient(
+						-90deg,
+						#d1ba77 0%,
+						#f7e8ad 100%
+					);
+					border-radius: 38px;
+					font-size: 32rpx;
+					color: #605128;
+				}
+			}
+		}
+	}
 </style>

+ 274 - 4
pages/index/information.vue

@@ -1,8 +1,278 @@
 <template>
+	<view class="container">
+		<view class="recharge">
+			<!-- <view class="example-title flex_item">
+				<view class="titleTip"></view>
+				<view class="">充值地址</view>
+			</view> -->
+			<view class="infoBox">
+				<view class="tplName">链名称</view>
+				<view class="tplNum">USDT-TRC20</view>
+				<view class="tplAddr">收款地址<text>ca87ca68ca68c6a986c98a678c7a8</text></view>
+			</view>
+			<view class="code"><image :src="er_code"></image></view>
+			<view class="flex btnBox">
+				<view class="btn">保存相册</view>
+				<view class="btn">复制地址</view>
+			</view>
+		</view>
+		<!-- <view class="login_text">
+			<view class="login_input flex" style="padding-top: 45rpx;">
+				<view class="login_img">金额</view>
+				<view class="login_name"><input class="uni-input" type="text" v-model="money" placeholder="请输入充值金额" /></view>
+			</view>
+			<view class="login_input flex">
+				<view class="login_img"><text>打款凭证</text></view>
+				<view class="login_name" @click="scImg"><image :src="img"></image></view>
+			</view>
+			<view class="login_input flex" style="padding-top: 45rpx;border-bottom: none;">
+				<view class="login_img">备注</view>
+				<view class="login_name"><input class="uni-input" type="text" v-model="remark" placeholder="例如:备注用户账号" /></view>
+			</view>
+			<view class="submission"><button class="golden" type="golden" hover-class="none" @click="submission">确认提交</button></view>
+		</view> -->
+		<view class="login_text">
+			<view class="tip">
+				<view>
+					<text>
+						该地址仅支持 USDT-TRC20 收款请勿用于其他币种,否则资产将不可找回</br>
+						从易趣付之外地址转入的资金,需要在完成交易的120分钟后,才能将资产转账给易币付其他用户或提到钱包以外的地址 最小收款金额: 0.0001USDT小于最小金额的收款将不会上账且无法退回1次网络确认后可到账,1次网络确认后可转账。您的充值地址不会经常改变,可截图保存并重复充值。
+					</text>
+				</view>
+			</view>
+		</view>
+	</view>
 </template>
-
-<script>
+<script type="text/javascript">
+import uniList from '@/components/uni-list/uni-list.vue';
+import uniListItem from '@/components/uni-list-item/uni-list-item.vue';
+// import { show_cb,do_cb } from '@/api/recharge.js';
+// import { upload } from '@/api/real.js';
+export default {
+	components: {
+		uniList,
+		uniListItem
+	},
+	data() {
+		return {
+			uid: '',
+			list:'',
+			account: '',
+			money: '',
+			address:'',
+			er_code:'',
+			remark:'',
+			img: '/static/image/img19.png'
+		};
+	},
+	onLoad() {
+		this.uid = uni.getStorageSync('uid');
+		this.loadData();
+	},
+	methods: {
+		//获取数据
+		loadData() {
+		  // show_cb({})
+		  //   .then(data => {
+		  //     this.list = data.data;
+			 //  this.address = data.data.address;
+			 //  this.er_code = data.data.er_code;
+		  //   })
+		  //   .catch(err => {
+		  //     console.log(err);
+		  //   });
+		},
+		//确认提交
+		submission() {
+			let obj = this;
+			uni.showLoading({
+				title: '充币中...',
+				mask: true
+			});
+			//确认充值调接口,成功跳转页面
+			do_cb({
+				uid: obj.uid,
+				img: obj.img,
+				address: obj.address,
+				money: obj.money,
+				bz: obj.remark,
+			})
+				.then(function(e) {
+					uni.showToast({
+						title: '请耐心等待系统审核通过',
+						duration: 1500,
+						mask: false,
+						icon: 'none'
+					});
+					uni.hideLoading();
+				})
+				.catch(function(e) {
+					console.log(e);
+				});
+		},
+		//上传图片
+		scImg() {
+			upload({
+				file:''
+			}).then((e) => {
+				console.log(e,55)
+				this.img = e[0].url;
+			});
+		},
+	}
+};
 </script>
 
-<style>
-</style>
+<style lang="scss">
+/* page {
+	min-height: 100%;
+	background: linear-gradient(-28deg, rgba(44, 45, 53, 1), rgba(59, 62, 74, 1));
+} */
+.container{
+	padding: 30rpx 30rpx;
+}
+.body_content {
+	width: 100%;
+	height: 100%;
+}
+.login_text {
+	width: 100%;
+	color: #fff !important;
+	font-size: 28rpx !important;
+	background-color: #1F2A4A;
+	margin: 25rpx 0rpx;
+	padding: 0rpx 25rpx;
+	padding-bottom: 15rpx;
+	border-radius: 15rpx;
+}
+.recharge {
+	text-align: center;
+	color: #85858e;
+	font-size: 30rpx;
+	background-color: #1F2A4A;
+	border-radius: 15rpx;
+}
+.example-title{
+	text-align: left !important;
+	padding: 25rpx 25rpx;
+	border-bottom: 2rpx solid #2F364E;
+	color: #0C5AFA;
+	.titleTip{
+		width: 5rpx;
+		height: 30rpx;
+		background: linear-gradient(90deg, #0C5AFA, #1356FF);
+		border-radius: 3rpx;
+		margin-right: 15rpx;
+	}
+}
+.infoBox{
+	text-align: left;
+	padding: 28rpx 51rpx;
+	.tplName{
+		font-family: PingFang SC;
+		font-weight: bold;
+		font-size: 32rpx;
+		color: #FFFFFF;
+		padding-top: 15rpx;
+	}
+	.tplNum{
+		margin: 30rpx 0rpx;
+		padding: 15rpx 30rpx;
+		border-radius: 10rpx;
+		border: 1px solid #1356FF;
+		font-family: PingFang SC;
+		font-size: 26rpx;
+		color: #1356FF;
+		display: inline-block;
+	}
+	.tplAddr{
+		color: #fff;
+		font-size: 32rpx;
+		text{
+			padding-left: 15rpx;
+			font-size: 26rpx;
+			color: #FFFFFF;
+		}
+	}
+}
+.login_input {
+	border-bottom: 1px solid #464755;
+	padding: 35rpx;
+}
+.uni-input {
+	width: 100%;
+	text-align: left !important;
+}
+.code {
+	width: 277rpx;
+	height: 277rpx;
+	margin: 25rpx auto;
+	margin-bottom: 35rpx;
+	background: #0C5AFA;
+}
+.code image {
+	width: 100%;
+	height: 100%;
+}
+.btnBox{
+	justify-content: center;
+	padding-bottom: 50rpx;
+	padding-top: 30rpx;
+	.btn{
+		margin-right: 50rpx;
+		font-family: PingFang SC;
+		font-weight: bold;
+		font-size: 26rpx;
+		color: #0C5AFA;
+		border: 1rpx solid #0C5AFA;
+		padding: 15rpx 45rpx;
+		border-radius: 15rpx;
+	}
+}
+.submission {
+	padding: 30rpx 25rpx;
+	.golden{
+		background: #0C5AFA;
+		color: #fff;
+	}
+}
+.login_name {
+	width: 480rpx;
+	color: #ffffff;
+}
+.login_name image {
+	width: 100rpx;
+	height: 100rpx;
+}
+.tip {
+	padding: 29rpx 31rpx;
+	line-height: 55rpx;
+	font-size: 24rpx;
+}
+.select_img {
+	width: 28rpx;
+	height: 32rpx;
+}
+.select_img image {
+	width: 100%;
+	height: 100%;
+}
+.scann {
+	margin-bottom: 35rpx;
+	margin-top: 15rpx;
+}
+.scanning {
+	background-color: #6f6f78;
+	color: #ffffff;
+	padding: 10rpx 30rpx;
+	border-radius: 15rpx;
+	font-size: 28rpx;
+}
+.address_code {
+	padding: 25rpx 0rpx;
+	color: #ffffff;
+}
+.input-placeholder{
+	color: #fff !important;
+}
+</style>

+ 21 - 28
pages/index/personal.vue

@@ -21,37 +21,21 @@
 			</view>
 		</view>
 	</view>
-	<view class="submission"><button class="golden" type="golden" hover-class="none" @click="submission">确认提交</button></view>
-	<view class="">身份证照片(正反两面)</view>
+	<view class="uploadText">身份证照片(正反两面)</view>
 	<view class="flex upLoadBox">
-		<view class="">
+		<view class="imageBox flex">
 			<image src="../../static/img/add.png" style="width: 180rpx;" mode="widthFix"></image>
 			<image src="../../static/img/add.png" style="width: 180rpx;" mode="widthFix"></image>
 		</view>
 	</view>
-	<!-- <view class="example-title"><text>资金账户</text></view>
-	<view class="login_text">
-		<view class="login_input flex" style="padding-top: 45rpx;"> 
-			<view class="login_img"><text>保证金余额</text></view>
-			<view class="login_name"><text>2514. 00U</text></view>
-		</view>
-		<view class="login_input flex">
-			<view class="login_img"><text>奖励金额</text></view>
-			<view class="login_name"><text>1254.00U</text></view>
-		</view>
-		<view class="login_input flex">
-			<view class="login_img"><text>佣金费率</text></view>
-			<view class="login_name"><text>1.6</text></view>
-		</view>
-		<view class="login_input flex">
-			<view class="login_img"><text>已收款金额</text></view>
-			<view class="login_name"><text>54500U</text></view>
-		</view> -->
+	<view class="submission">
+		<button class="golden" type="golden" hover-class="none" @click="submission">提交认证</button>
+	</view>
 	</view>
   </view>
 </template>
 <script type="text/javascript">
-import { show_us,attestation } from '@/api/user.js';
+// import { show_us,attestation } from '@/api/user.js';
 export default {
   data() {
     return {
@@ -61,6 +45,11 @@ export default {
 	  vcode:''
     };
   },
+  onLoad() {
+  	// this.uid = uni.getStorageSync('uid');
+  	// console.log(uni.getStorageSync('uid'),this.uid)
+   //  this.loadData();
+  },
   methods: {
     //获取数据
     loadData() {
@@ -132,12 +121,7 @@ export default {
 			uni.stopPullDownRefresh(); //停止下拉刷新动画
 		}, 1000);
 	}
-  },
-  onLoad() {
-	this.uid = uni.getStorageSync('uid');
-	console.log(uni.getStorageSync('uid'),this.uid)
-    this.loadData();
-  },
+  }
 };
 </script>
 <style lang="scss">
@@ -151,6 +135,15 @@ export default {
 	border-bottom: 1px solid #464755;
 	padding: 35rpx;
 }
+.uploadText{
+	padding: 47rpx 40rpx;
+	color: #ffffff;
+	
+}
+.imageBox{
+	width: 100%;
+	padding: 50rpx 15%;
+}
 .uni-input{
 	width:450rpx;
 	text-align: left !important;

+ 181 - 5
pages/index/transaction.vue

@@ -1,8 +1,184 @@
 <template>
+  <view class="body_content">
+	<view class="login_text">
+		<view class="example-title">修改交易密码</view>
+		<view class="login_input flex" style="padding-top: 45rpx;"> 
+			<view class="login_name">新密码</view>
+			<view class="login_name"><input class="uni-input" type="text" v-model="username" placeholder="请输入新密码" /></view>
+		</view>
+		<view class="login_input flex">
+			<view class="login_name"><text>重复密码</text></view>
+			<view class="login_name"><input class="uni-input" type="idcard" v-model="idCard" placeholder="请重复输入密码" /></view>
+		</view>
+		<view class="login_input flex" style="border: none;">
+			<view class="login_name"><text>验证码</text></view>
+			<view class="login_name flex_item">
+				<input style="width: 310rpx;" class="uni-input" type="number" v-model="vcode" placeholder="请输入验证码" />
+				<view class="" style="font-size: 26rpx;color: #0C5AFA;">获取验证码</view>
+			</view>
+		</view>
+	</view>
+	<view class="submission">
+		<button class="golden" type="golden" hover-class="none" @click="submission">确认</button>
+	</view>
+	</view>
+  </view>
 </template>
-
-<script>
+<script type="text/javascript">
+// import { show_us,attestation } from '@/api/user.js';
+export default {
+  data() {
+    return {
+	  username:'',
+	  idCard:'',
+	  phone:'',
+	  vcode:''
+    };
+  },
+  onLoad() {
+  	// this.uid = uni.getStorageSync('uid');
+  	// console.log(uni.getStorageSync('uid'),this.uid)
+   //  this.loadData();
+  },
+  methods: {
+    //获取数据
+    loadData() {
+      show_us({
+		  uid:this.uid
+	  })
+        .then(data => {
+		  let obj = this;
+          obj.list = data.data;
+		  if(data.data.card == null){
+			  obj.number = "";
+		  }else{
+			   obj.number = data.data.card;
+		  }
+		 if(data.data.email == null){
+			obj.mail = ""; 
+		 }else{
+			 obj.mail = data.data.email;
+		 }
+		 if( data.data.name == null){
+			 obj.username = '';
+		 }else{
+			 obj.username = data.data.name;
+		 }
+		  
+        })
+        .catch(err => {
+          console.log(err);
+        });
+    },
+	// 提交
+	submission() {
+		if (this.mail == '') {
+			this.$api.msg('请输入电子邮箱');
+			return;
+		}
+		if (this.username == '') {
+			this.$api.msg('请输入真实姓名');
+			return;
+		}
+		if (this.number == '') {
+			this.$api.msg('请输入身份证号');
+			return;
+		}
+		attestation({
+			uid:this.uid,
+			email: this.mail,
+			name: this.username,
+			card: this.number,
+		})
+			.then(function(e) {
+				uni.showToast({
+					title: e.message,
+					duration: 1500,
+					mask: false,
+					icon: 'none'
+				});
+			})
+			.catch(function(e) {
+				console.log(e);
+			});
+	},
+	//下拉刷新
+	onPullDownRefresh() {
+		let obj = this;
+		//监听下拉刷新动作的执行方法,每次手动下拉刷新都会执行一次
+		setTimeout(function() {
+			obj.loadData();
+			uni.stopPullDownRefresh(); //停止下拉刷新动画
+		}, 1000);
+	}
+  }
+};
 </script>
-
-<style>
-</style>
+<style lang="scss">
+.login_text {
+	width: 100%;
+	// padding: 25rpx 0rpx;
+	font-size: 28rpx !important;
+	background: #1F2A4A;
+	padding: 0rpx 25rpx;
+}
+.login_input {
+	border-bottom: 1px solid #464755;
+	padding: 35rpx;
+}
+.uploadText{
+	padding: 47rpx 40rpx;
+	color: #ffffff;
+	
+}
+.imageBox{
+	width: 100%;
+	padding: 50rpx 15%;
+}
+.uni-input{
+	width:450rpx;
+	text-align: left !important;
+	font-size: 26rpx;
+}
+.width {
+	width: 265rpx !important;
+}
+.code {
+	color: #EEC680;
+	font-size: 23rpx;
+	border-left: 1px solid #85858E;
+	padding-left: 25rpx;
+}
+.submission{
+	padding: 80rpx 25rpx;
+	.golden{
+		background: #0C5AFA;
+		color: #ffffff;
+	}
+}
+.login_name {
+	color: #ffffff;
+}
+.example-title {
+	display: flex;
+	justify-content: space-between;
+	align-items: center;
+	font-size: 30rpx;
+	color: #fff;
+	padding: 30rpx 30rpx 30rpx 50rpx;
+	position: relative;
+	background-color: #1F2A4A;
+	border-bottom: 1rpx solid #464755;
+}
+.example-title:after {
+	content: '';
+	position: absolute;
+	left: 30rpx;
+	margin: auto;
+	top: 0;
+	bottom: 0;
+	width: 4rpx;
+	height: 32rpx;
+	background-color: #0C5AFA;
+}
+</style>

BIN
static/image/img24.png


BIN
static/image/img25.png