py 2 سال پیش
والد
کامیت
0941b7b338
8فایلهای تغییر یافته به همراه259 افزوده شده و 4 حذف شده
  1. 9 2
      common/css/common.css
  2. 6 1
      pages-my/my-appraise.vue
  3. 47 0
      pages-my/set-user-name.vue
  4. 58 0
      pages-my/set-user-sex.vue
  5. 109 0
      pages-my/user-info.vue
  6. 19 1
      pages.json
  7. 3 0
      pages/me/index.vue
  8. 8 0
      service/tools.js

+ 9 - 2
common/css/common.css

@@ -216,6 +216,9 @@ image {
 .fc-6{
 	color: #666;
 }
+.fc-9198A2{
+	color: #9198A2;
+}
 .fc-9{
 	color: #999;
 }
@@ -309,7 +312,9 @@ image {
 }
 
 
-
+.mr-6{
+	margin-right: 6rpx;
+}
 .mr-8{
 	margin-right: 8rpx;
 }
@@ -380,7 +385,9 @@ image {
 .mb-64{
 	margin-bottom: 64rpx;
 }
-
+.mb-80{
+	margin-bottom: 80rpx;
+}
 
 /* 宽度 */
 .w-100{

+ 6 - 1
pages-my/my-appraise.vue

@@ -28,7 +28,7 @@
 						</view>
 					</view>
 					<view class="flex-justify-end">
-						<view class="fc-41ABF5 fs-28 item-but">
+						<view class="fc-41ABF5 fs-28 item-but" @click="goToUrl">
 							评价
 						</view>
 					</view>
@@ -65,6 +65,11 @@
 			scrolltolower() {
 				console.log('触底');
 			},
+			goToUrl() {
+				uni.navigateTo({
+					url:'/pages-my/appraise'
+				})
+			}
 		},
 	}
 </script>

+ 47 - 0
pages-my/set-user-name.vue

@@ -0,0 +1,47 @@
+<template>
+	<view class="flex-common-css bgc-f">
+		<Nav title="昵称" titleColor="#333" bgckgroundBox='#fff'></Nav>
+		<scroll-view :scroll-y="true" class="scroll-view-css">
+			<view class="content-box box-border-box">
+				<input class="uni-input mb-16" focus placeholder="请输入昵称" maxlength="50" />
+				<view class="fs-24 fc-9 mb-80">
+					昵称由中文、英文、数字、组合
+				</view>
+				<view class="but fs-32 fc-f fw-600 b-rad-200 bgc-41ABF5 text-align-center">
+					保存
+				</view>
+			</view>
+		</scroll-view>
+	</view>
+</template>
+
+<script>
+	export default {
+		components: {},
+		data() {
+			return {};
+		},
+		onLoad(data) {},
+		mounted() {},
+		methods: {},
+	}
+</script>
+
+<style lang="scss" scoped>
+.content-box{
+	padding: 40rpx 32rpx 0;
+}
+.uni-input{
+	width: 100%;
+	height: 92rpx;
+	line-height: 92rpx;
+	background: #F6F6F6;
+	border-radius: 12rpx;
+	padding: 0 0 0 26rpx;
+}
+.but{
+	width: 100%;
+	height: 92rpx;
+	line-height: 92rpx;
+}
+</style>

+ 58 - 0
pages-my/set-user-sex.vue

@@ -0,0 +1,58 @@
+<template>
+	<view class="flex-common-css">
+		<Nav title="性别设置" titleColor="#333" bgckgroundBox='#fff'></Nav>
+		<scroll-view :scroll-y="true" class="scroll-view-css">
+			<view class="content-box">
+				<view class="list-box box-border-box mb-80 bgc-f">
+					<view class="item-box flex-justify-space" v-for="(item,index) in sexList" :key="index">
+						<view class="fs-32 fc-3">
+							{{item}}
+						</view>
+						<uni-icons color="#57CAFF" type="checkbox-filled" size="25"></uni-icons>
+					</view>
+				</view>
+				<view class="but-box box-border-box">
+					<view class="but fs-32 fc-f fw-600 b-rad-200 bgc-41ABF5 text-align-center">
+						保存
+					</view>
+				</view>
+			</view>
+		</scroll-view>
+	</view>
+</template>
+
+<script>
+	export default {
+		components: {},
+		data() {
+			return {
+				sexList:['保密','男','女'],
+				sexId: 0
+			};
+		},
+		onLoad(data) {},
+		mounted() {},
+		methods: {},
+	}
+</script>
+
+<style lang="scss" scoped>
+.content-box{
+	padding: 20rpx 0 0 0;
+}
+.list-box{
+	padding: 0 32rpx;
+}
+.item-box{
+	padding: 32rpx 0;
+	border-bottom: 1rpx solid #EEEEEE;
+}
+.but-box{
+	padding: 0 40rpx;
+}
+.but{
+	width: 100%;
+	height: 92rpx;
+	line-height: 92rpx;
+}
+</style>

+ 109 - 0
pages-my/user-info.vue

@@ -0,0 +1,109 @@
+<template>
+	<view class="flex-common-css bgc-f">
+		<Nav title="个人资料" titleColor="#333" bgckgroundBox='#fff'></Nav>
+		<scroll-view :scroll-y="true" class="scroll-view-css" @scrolltolower="scrolltolower">
+			<view class="user-img-box">
+				<image class="user-img" src="@/static/img/my/user-img.png" mode=""></image>
+				<image @click="goToUrl(0)" class="set-iimg" src="@/static/img/my/pen.png" mode=""></image>
+			</view>
+			<view class="item-info-box box-border-box">
+				<view class="item-box mb-32 flex-justify-space box-border-box">
+					<view class="item-left fs-32 fc-3">
+						昵称
+					</view>
+					<view class="item-right align-items-center" @click="goToUrl(1)">
+						<view class="fc-9198A2 fs-28 mr-6">
+							仰看-1883354266
+						</view>
+						<uni-icons color="#9198A2" type="right" size="20"></uni-icons>
+					</view>
+				</view>
+				<view class="item-box mb-32 flex-justify-space box-border-box">
+					<view class="item-left fs-32 fc-3">
+						性别
+					</view>
+					<view class="item-right align-items-center" @click="goToUrl(2)">
+						<view class="fc-9198A2 fs-28 mr-6">
+							保密
+						</view>
+						<uni-icons color="#9198A2" type="right" size="20"></uni-icons>
+					</view>
+				</view>
+				<view class="item-box mb-32 flex-justify-space box-border-box">
+					<view class="item-left fs-32 fc-3">
+						更换手机号
+					</view>
+					<view class="item-right align-items-center" @click="goToUrl(3)">
+						<view class="fc-9198A2 fs-28 mr-6">
+							188******88
+						</view>
+						<uni-icons color="#9198A2" type="right" size="20"></uni-icons>
+					</view>
+				</view>
+			</view>
+		</scroll-view>
+	</view>
+</template>
+
+<script>
+	import tools from '@/service/tools';
+	export default {
+		components: {},
+		data() {
+			return {};
+		},
+		onLoad(data) {},
+		mounted() {},
+		methods: {
+			goToUrl(type) {
+				if (type === 1) {
+					// 昵称
+					uni.navigateTo({
+						url: '/pages-my/set-user-name'
+					})
+				} else if (type === 2) {
+					// 性别
+					uni.navigateTo({
+						url: '/pages-my/set-user-sex'
+					})
+				} else {
+					// 更换手机号
+				}
+			},
+			scrolltolower() {
+				console.log('触底');
+			},
+		},
+	}
+</script>
+
+<style lang="scss" scoped>
+	.user-img-box {
+		width: 144rpx;
+		height: 144rpx;
+		position: relative;
+		margin: 98rpx auto 80rpx;
+	}
+
+	.user-img {
+		width: 100%;
+		height: 100%;
+	}
+
+	.set-iimg {
+		position: absolute;
+		right: 10rpx;
+		bottom: 2rpx;
+		width: 33rpx;
+		height: 33rpx;
+	}
+
+	.item-info-box {
+		padding: 0 0 0 32rpx;
+
+		.item-box {
+			padding: 0 32rpx 32rpx 0;
+			border-bottom: 1rpx solid #EEEEEE;
+		}
+	}
+</style>

+ 19 - 1
pages.json

@@ -69,6 +69,24 @@
 		{
 			"root": "pages-my",
 			"pages": [
+				{
+					"path": "user-info",
+					"style": {
+						"navigationBarTitleText": "个人资料"
+					}
+				},
+				{
+					"path": "set-user-name",
+					"style": {
+						"navigationBarTitleText": "昵称设置"
+					}
+				},
+				{
+					"path": "set-user-sex",
+					"style": {
+						"navigationBarTitleText": "性别设置"
+					}
+				},
 				{
 					"path": "my-ticket",
 					"style": {
@@ -119,7 +137,7 @@
 		"current": 0,
 		"list": [{
 			"name": "列表调试",
-			"path": "pages-my/appraise",
+			"path": "pages-my/set-user-sex",
 			"query": ""
 		}]
 	}

+ 3 - 0
pages/me/index.vue

@@ -148,6 +148,9 @@
 			goToUrl(type) {
 				if (type == 0) {
 					// 修改个人信息
+					uni.navigateTo({
+						url: '/pages-my/user-info'
+					})
 				} else if (type == 1) {
 					// 我的卡券
 					uni.navigateTo({

+ 8 - 0
service/tools.js

@@ -17,6 +17,14 @@ tools.sortNumber = function (a, b) {
 }
 
 
+//邮箱/手机***过滤
+tools.starPhone = function(value, type) {
+	const start = value.slice(0, 3)
+	const end = value.slice(-type)
+	return `${start}****${end}`
+}
+
+
 /**
  * 保留两位小数
  * @param num