lhl 2 anni fa
parent
commit
c8c896ff67
7 ha cambiato i file con 327 aggiunte e 6 eliminazioni
  1. 16 0
      api/login.js
  2. 13 0
      pages.json
  3. 128 0
      pages/user/authrz.vue
  4. 33 0
      pages/user/help.vue
  5. 16 6
      pages/user/menu.vue
  6. 121 0
      pages/user/respwd.vue
  7. BIN
      static/img/flower.png

+ 16 - 0
api/login.js

@@ -118,3 +118,19 @@ export function loginout(data) {
 		data
 	})
 }
+//oldpwd newpwd
+export function changepass(data) {
+	return request({
+		url: '/api/Index/sub_respwd',
+		method: 'get',
+		data
+	})
+}
+
+export function upauthrz(data) {
+	return request({
+		url: '/api/User/upauthrz',
+		method: 'get',
+		data
+	})
+}

+ 13 - 0
pages.json

@@ -87,7 +87,20 @@
 			"style": {
 				"navigationBarTitleText": ""
 			}
+		},
+		{
+			"path": "pages/user/respwd",
+			"style": {
+				"navigationBarTitleText": "密碼"
+			}
+		},
+		{
+			"path": "pages/user/authrz",
+			"style": {
+				"navigationBarTitleText": ""
+			}
 		}
+		
 	],
 	"globalStyle": {
 		"navigationBarTextStyle": "black",

+ 128 - 0
pages/user/authrz.vue

@@ -0,0 +1,128 @@
+<template>
+	<view class="content">
+		<view class="">
+			<view class="" style="padding: 50rpx 30rpx;font-size: 50rpx;">
+				實名認證
+			</view>
+			<view class=""
+				style="width: 720rpx;height: 80rpx;background-color: #fff;margin: auto;line-height: 80rpx;padding:0 10rpx;border-radius: 20rpx;font-size: 26rpx;">
+				完成實名認證後能夠獲得相應的權益
+			</view>
+			<view class=""
+				style="width: 720rpx;height: 80rpx;background-color: #fff;margin: auto;line-height: 80rpx;padding:0 10rpx;border-radius: 20rpx;font-size: 26rpx;">
+				高級實名
+			</view>
+		</view>
+		<view class="up-wrap">
+			<view class="up-tit">
+				上傳身份證正面
+			</view>
+			<view class="up-img" @click="upcardzm()">
+				<image src="" mode="heightFix" v-if="cardzm"></image>
+				<image src="../../static/img/flower.png" mode="heightFix" v-else></image>
+			</view>
+			<view class="up-tit">
+				上傳身份證背面
+			</view>
+			<view class="up-img"  @click="upcardzm()">
+				<image src="" mode="heightFix" v-if="cardfm"></image>
+				<image src="../../static/img/flower.png" mode="heightFix" v-else></image>
+			</view>
+			<view class="up-btn" @click="upauthrz()">
+				高級提交
+			</view>
+		</view>
+	</view>
+</template>
+
+<script>
+	import {
+		upauthrz,
+		upimg
+	} from '@/api/login.js'
+	// import {  } from '@/api/wallet.js'
+	export default {
+		data() {
+			return {
+				cardzm: '',
+				cardfm: ''
+			}
+		},
+		onLoad() {
+
+		},
+		onShow() {
+
+		},
+		onReachBottom() {
+
+		},
+		onReady() {
+
+		},
+		methods: {
+			upcardzm() {
+				
+			},
+			upcardfm() {
+				
+			},
+			upauthrz() {
+				let obj = this
+				if(obj.cardzm == '') {
+					return obj.$api.msg('請上傳身份證正面')
+				}
+				if(obj.cardfm == '') {
+					return obj.$api.msg('請上傳身份證反面')
+				}
+				upauthrz({
+					cardzm: obj.cardzm,
+					cardfm: obj.cardfm
+				}).then(res => {
+					uni.showToast({
+						title: '提交成功',
+						duration: 2000,
+						position: 'top'
+					});
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	.up-wrap {
+		width: 720rpx;
+		height: 860rpx;
+		border-radius: 20rpx;
+		background-color: #fff;
+		margin: 30rpx auto;
+		padding: 20rpx;
+		font-size: 32rpx;
+
+		.up-tit {
+			height: 80rpx;
+			line-height: 80rpx;
+		}
+		.up-img {
+			height: 240rpx;
+			margin-top: 20rpx ;
+			image {
+				height: 200rpx;
+				display: block;
+				margin: auto;
+			}
+		}
+		.up-btn {
+			margin: 20rpx auto 0;
+			width: 680rpx;
+			height: 80rpx;
+			line-height: 80rpx;
+			text-align: center;
+			color: #000;
+			font-size: 28rpx;
+			background:linear-gradient(to left,#eeb80d,#ffe35b);
+			border-radius: 20rpx;
+		}
+	}
+</style>

+ 33 - 0
pages/user/help.vue

@@ -0,0 +1,33 @@
+<template>
+	<view class="content">
+
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+
+			}
+		},
+		onLoad() {
+
+		},
+		onShow() {
+
+		},
+		onReachBottom() {
+
+		},
+		onReady() {
+
+		},
+		methods: {
+
+		}
+	}
+</script>
+
+<style lang="scss">
+</style>

+ 16 - 6
pages/user/menu.vue

@@ -18,21 +18,21 @@
 			</view>
 			<image src="../../static/icon/back.png" mode="" class="right-img"></image>
 		</view> -->
-		<view class="user-list flex">
+		<!-- <view class="user-list flex">
 			<image src="../../static/icon/mu2.png" mode="" class="left-img"></image>
 			<view class="">
 				幫助中心
 			</view>
 			<image src="../../static/icon/back.png" mode="" class="right-img"></image>
-		</view>
-		<view class="user-list flex">
+		</view> -->
+		<!-- <view class="user-list flex">
 			<image src="../../static/icon/mu3.png" mode="" class="left-img"></image>
 			<view class="">
 				通知
 			</view>
 			<image src="../../static/icon/back.png" mode="" class="right-img"></image>
-		</view>
-		<view class="user-list flex">
+		</view> -->
+		<view class="user-list flex" @click="navto('/pages/user/respwd')">
 			<image src="../../static/icon/mu4.png" mode="" class="left-img"></image>
 			<view class="">
 				修改密碼
@@ -46,7 +46,7 @@
 			</view>
 			<image src="../../static/icon/back.png" mode="" class="right-img"></image>
 		</view>
-		<view class="user-list flex">
+		<view class="user-list flex" @click="navto('/pages/user/authrz')">
 			<image src="../../static/icon/mu6.png" mode="" class="left-img"></image>
 			<view class="">
 				實名認證
@@ -92,6 +92,16 @@
 		},
 		methods: {
 			...mapMutations('user', ['login', 'setUserInfo', 'logout']),
+			navto(url) {
+				uni.navigateTo({
+					url,
+					fail() {
+						uni.switchTab({
+							url
+						})
+					}
+				})
+			},
 			getUser() {
 				let obj = this
 				getUser().then(res => {

+ 121 - 0
pages/user/respwd.vue

@@ -0,0 +1,121 @@
+<template>
+	<view class="content">
+		<view class="tip">
+			*為了您的資金安全,登錄密碼修改後24小時以內不允許提現。
+		</view>
+		<view class="tit">
+			舊密碼
+		</view>
+		<input type="password" class="shuru" placeholder="請翰入舊密碼" v-model="oldpwd">
+		<view class="tit">
+			新密碼
+		</view>
+		<input type="password" class="shuru" placeholder="請翰入新密碼" v-model="newpwd">
+		<view class="tit">
+			確認密碼
+		</view>
+		<input type="password" class="shuru" placeholder="請翰入確認密碼" v-model="renewpwd">
+		<view class="loginout" @click="changepass()">
+			提交
+		</view>
+	</view>
+</template>
+
+<script>
+	import {
+		changepass
+	} from '@/api/login.js'
+	export default {
+		data() {
+			return {
+				//oldpwd newpwd
+				oldpwd: '',
+				newpwd: '',
+				renewpwd: ''
+			}
+		},
+		onLoad() {
+
+		},
+		onShow() {
+
+		},
+		onReachBottom() {
+
+		},
+		onReady() {
+
+		},
+		methods: {
+			changepass() {
+				let obj = this
+				if(obj.oldpwd == '') {
+					return obj.$api.msg('請翰入舊密碼')
+				}
+				if(obj.newpwd == '') {
+					return obj.$api.msg('請翰入新密碼')
+				}
+				if(obj.renewpwd == '') {
+					return obj.$api.msg('請翰入確認密碼')
+				}
+				if(obj.newpwd != obj.renewpwd) {
+					return obj.$api.msg('兩次密碼不一致')
+				}
+				changepass({
+					oldpwd: obj.oldpwd,
+					newpwd: obj.newpwd
+				}).then(res => {
+					uni.showToast({
+						title: '修改成功',
+						duration: 2000,
+						position: 'top'
+					});
+					setTimeout(()=> {
+						uni.switchTab({
+							url: '/pages/index/index'
+						})
+					},1500)
+				})
+			}
+		}
+	}
+</script>
+
+<style lang="scss">
+	page {
+		height: 100%;
+		background-color: #fff;
+	}
+
+	.tip {
+		color: red;
+		font-size: 26rpx;
+		padding: 30rpx;
+	}
+
+	.shuru {
+		display: block;
+		background-color: #f5f5f5;
+		width: 673rpx;
+		height: 95rpx;
+		margin: auto;
+		padding-left: 30rpx;
+		text-align: 95rpx;
+	}
+
+	.tit {
+		padding: 60rpx 48rpx 20rpx;
+	}
+	.loginout {
+		width: 675rpx;
+		height: 70rpx;
+		line-height: 70rpx;
+		text-align: center;
+		font-size: 26rpx;
+		color: #000;
+		background-color: #f4d03c;
+		margin: 50rpx auto;
+		border-radius: 20rpx;
+		font-weight: bold;
+	}
+</style>

BIN
static/img/flower.png