浏览代码

登录和注册页面

qukaidi 4 年之前
父节点
当前提交
f3bb83bcf2
共有 5 个文件被更改,包括 178 次插入55 次删除
  1. 5 4
      pages.json
  2. 9 1
      pages/login/index.vue
  3. 1 1
      pages/login/register_2.vue
  4. 153 47
      pages/login/register_3.vue
  5. 10 2
      pages/me/index.vue

+ 5 - 4
pages.json

@@ -31,7 +31,10 @@
 		{
 			"path": "pages/me/index",
 			"style": {
-				"navigationBarTitleText": "我的"
+				// "navigationBarTitleText": "我的",
+				"app-plus": {
+					"titleNView":false
+				}
 			}
 
 		},
@@ -40,9 +43,7 @@
 			"path": "pages/login/index",
 			"style": {
 				"app-plus": {
-					"titleNView": {
-						"autoBackButton": false
-					}
+					"titleNView":false
 				}
 			}
 		}

+ 9 - 1
pages/login/index.vue

@@ -1,5 +1,8 @@
 <template>
 	<view>
+		<view class="status_bar">
+			<!-- 这里是状态栏 -->
+		</view>
 		<u-image src="../../static/sailun/login_bg.png" mode="widthFix"></u-image>
 		<view class="content">
 			<u-card padding="50" :head-border-bottom="false" :show-head="false" :show-foot="false" :border="false" box-shadow="0px 1px 10px rgba(0,0,0,0.2)"
@@ -100,9 +103,14 @@
 </script>
 
 <style lang="scss" scoped>
+	.status_bar {
+	    height: var(--status-bar-height);
+	    width: 100%;
+		  background-color:#0095FF;
+	}
 	.content {
 		position: relative;
-		top: -400rpx;
+		top: -350rpx;
 	}
 
 	.foot {

+ 1 - 1
pages/login/register_2.vue

@@ -66,7 +66,7 @@
 			</view>
 		</u-card>
 		<view style="margin: 30rpx;">
-			<u-button @click="nextStep" type="primary">下一步</u-button>
+			<u-button @click="nextStep" type="primary" :ripple="true" ripple-bg-color="#99d4ff">下一步</u-button>
 		</view>
 	</view>
 </template>

+ 153 - 47
pages/login/register_3.vue

@@ -1,55 +1,100 @@
 <template>
 	<view>
-		<u-card padding="30" box-shadow="0px 1px 10px rgba(0,0,0,0.2)" border-radius="20" :show-foot="false">
-			<view slot="head">
-				<view class="u-flex">
-					<view style="width: 8rpx;height: 34rpx;background: #0292FD;margin-right:20rpx;"></view>
-					选择合作品牌
+		<u-form :model="form">
+			<u-card padding="30" box-shadow="0px 1px 10px rgba(0,0,0,0.2)" border-radius="20" :show-foot="false">
+				<view slot="head">
+					<view class="u-flex">
+						<view style="width: 8rpx;height: 34rpx;background: #0292FD;margin-right:20rpx;"></view>
+						选择合作品牌
+					</view>
 				</view>
-			</view>
-			<view slot="body">
-			</view>
-		</u-card>
-		<u-card padding="30" box-shadow="0px 1px 10px rgba(0,0,0,0.2)" border-radius="20" :show-foot="false">
-			<view slot="head">
-				<view class="u-flex">
-					<view style="width: 8rpx;height: 34rpx;background: #0292FD;margin-right:20rpx;"></view>
-					已选合作品牌
+				<view slot="body">
+
+					<u-form-item prop="cooperation">
+						<view style="margin-right: 10rpx;">
+							<u-icon name="order" size="36"></u-icon>
+						</view>
+						<u-input placeholder="点击选择合作品牌" :disabled="true" @click="show = true;" v-model="form.cooperation"></u-input>
+						<view class="" slot="right">
+							<u-icon name="arrow-right" color="#666666" size="36"></u-icon>
+						</view>
+					</u-form-item>
+				</view>
+			</u-card>
+			<u-popup mode="bottom" v-model="show">
+				<view class="u-flex u-row-between u-padding-left-40 u-padding-right-40" style="height: 90rpx;" @click="show = false;">
+					<view style="padding: 16rpx;font-size:30rpx">
+						取消
+					</view>
+					<view style="padding: 16rpx;color:#0095FF;font-size:30rpx" @click="getCooperation">
+						确认
+					</view>
+				</view>
+				<u-line color="#e4e7ed"></u-line>
+				<view class="content">
+					<scroll-view scroll-y="true" style="height: 300rpx;">
+						<view class="u-flex u-row-center">
+							<u-checkbox-group :wrap="true" @change="checkboxGroupChange">
+								<u-checkbox v-model="item.checked" v-for="(item, index) in list" :key="index" :name="item.name" shape="circle">{{item.name}}</u-checkbox>
+							</u-checkbox-group>
+						</view>
+					</scroll-view>
+				</view>
+			</u-popup>
+			<u-card padding="30" box-shadow="0px 1px 10px rgba(0,0,0,0.2)" border-radius="20" :show-foot="false">
+				<view slot="head">
+					<view class="u-flex">
+						<view style="width: 8rpx;height: 34rpx;background: #0292FD;margin-right:20rpx;"></view>
+						已选合作品牌
+					</view>
 				</view>
-			</view>
-			<view slot="body">
-			</view>
-		</u-card>
-		<u-card padding="30" box-shadow="0px 1px 10px rgba(0,0,0,0.2)" border-radius="20" :show-foot="false">
-			<view slot="head">
-				<view class="u-flex">
-					<view style="width: 8rpx;height: 34rpx;background: #0292FD;margin-right:20rpx;"></view>
-					赛轮合作品牌签约任务
+				<view slot="body">
+					<view class="u-flex u-flex-wrap u-row-around">
+						<u-image width="40%" height="100rpx" src="../../static/sailun/upload_preview.png" style="margin:10rpx;"></u-image>
+						<u-image width="40%" height="100rpx" src="../../static/sailun/upload_preview.png" style="margin:10rpx;"></u-image>
+						<u-image width="40%" height="100rpx" src="../../static/sailun/upload_preview.png" style="margin:10rpx;"></u-image>
+						<u-image width="40%" height="100rpx" src="../../static/sailun/upload_preview.png" style="margin:10rpx;"></u-image>
+					</view>
 				</view>
-			</view>
-			<view slot="body">
-			</view>
-		</u-card>
-		<u-card padding="30" box-shadow="0px 1px 10px rgba(0,0,0,0.2)" border-radius="20" :show-foot="false">
-			<view slot="head">
-				<view class="u-flex">
-					<view style="width: 8rpx;height: 34rpx;background: #0292FD;margin-right:20rpx;"></view>
-					黑盾合作品牌签约任务
+			</u-card>
+			<u-card padding="30" box-shadow="0px 1px 10px rgba(0,0,0,0.2)" border-radius="20" :show-foot="false">
+				<view slot="head">
+					<view class="u-flex">
+						<view style="width: 8rpx;height: 34rpx;background: #0292FD;margin-right:20rpx;"></view>
+						赛轮合作品牌签约任务
+					</view>
 				</view>
-			</view>
-			<view slot="body">
-			</view>
-		</u-card>
-		<u-card padding="30" box-shadow="0px 1px 10px rgba(0,0,0,0.2)" border-radius="20" :show-foot="false">
-			<view slot="head">
-				<view class="u-flex">
-					<view style="width: 8rpx;height: 34rpx;background: #0292FD;margin-right:20rpx;"></view>
-					黑骑士合作品牌签约任务
+				<view slot="body">
+					<u-form-item>
+						<view style="margin-right: 10rpx;">
+							<u-icon name="account" size="36"></u-icon>
+						</view>
+						<view class="">
+							某某代理商
+						</view>
+					</u-form-item>
+					<u-form-item prop="lists">
+						<view style="margin-right: 10rpx;">
+							<u-icon name="order" size="36"></u-icon>
+						</view>
+						<u-input placeholder="点击选择签约任务" :disabled="true" @click="show = true;"></u-input>
+						<view class="" slot="right">
+							<u-icon name="arrow-right" color="#666666" size="36"></u-icon>
+						</view>
+					</u-form-item>
 				</view>
-			</view>
-			<view slot="body">
-			</view>
-		</u-card>
+			</u-card>
+			<u-form-item prop="protocol" :border-bottom="false">
+				<view style="margin:0 30rpx;">
+					<u-checkbox-group>
+						<u-checkbox v-model="form.protocol">同意《用户协议》及《隐私政策》</u-checkbox>
+					</u-checkbox-group>
+				</view>
+			</u-form-item>
+		</u-form>
+		<view style="margin:0 30rpx;">
+			<u-button @click="nextStep" type="primary" @tap="$u.debounce(submit, 2000,immediate = true)" :loading="loading">确认注册</u-button>
+		</view>
 	</view>
 </template>
 
@@ -57,15 +102,76 @@
 	export default {
 		data() {
 			return {
-
+				show: false,
+				loading: false,
+				form: {
+					cooperation: '',
+					protocol: false
+				},
+				form2: {},
+				list: [{
+						name: '第一个选项',
+						checked: false,
+						disabled: false
+					},
+					{
+						name: '第二个选项',
+						checked: false,
+						disabled: false
+					},
+					{
+						name: '第三个选项',
+						checked: false,
+						disabled: false
+					},
+					{
+						name: '第四个选项',
+						checked: false,
+						disabled: false
+					},
+					{
+						name: '第五个选项',
+						checked: false,
+						disabled: false
+					}
+				]
 			}
 		},
 		methods: {
+			checkboxGroupChange(e) {
+				this.cooperations = e
+			},
+			getCooperation() {
+				if (this.cooperations != null) {
+					this.form.cooperation = this.cooperations.toString();
+					this.show = false
+				} else {
+					console.log("至少选择一项")
+				}
 
+			},
+			submit() {
+				this.loading = true
+				setTimeout(() => {
+					this.$u.route({
+						url: 'pages/login/index',
+						type:"reLaunch"
+					})
+					this.loading = false
+				}, 2000)
+			},
 		}
 	}
 </script>
 
-<style>
+<style lang="scss" scoped>
+	.content {
+		padding: 24rpx;
+		text-align: center;
 
+		.u-checkbox[data-v-54acf820] {
+			display: flex;
+			justify-content: center;
+		}
+	}
 </style>

+ 10 - 2
pages/me/index.vue

@@ -1,5 +1,9 @@
 <template>
 	<view>
+		<view class="status_bar">
+			<!-- 这里是状态栏 -->
+		</view>
+		<view> 状态栏下的文字 </view>
 		<view class="u-page">
 		</view>
 		<!-- 与包裹页面所有内容的元素u-page同级,且在它的下方 -->
@@ -41,6 +45,10 @@
 	}
 </script>
 
-<style lang="scss">
-
+<style lang="scss" scoped>
+  .status_bar {
+      height: var(--status-bar-height);
+      width: 100%;
+	  background-color:#0095FF;
+  }
 </style>