Browse Source

新建分支

qukaidi 4 năm trước cách đây
mục cha
commit
88a09f8992

+ 20 - 3
pages.json

@@ -40,7 +40,9 @@
 			"path": "pages/login/index",
 			"style": {
 				"app-plus": {
-					"titleNView": false //禁用原生导航栏
+					"titleNView": {
+						"autoBackButton": false
+					}
 				}
 			}
 		}
@@ -53,12 +55,27 @@
 				"navigationBarTitleText": "零售店注销"
 			}
 
+		}, {
+			"path": "register_2",
+			"style": {
+				"navigationBarTitleText": "零售店注销"
+			}
+
+		}, {
+			"path": "register_3",
+			"style": {
+				"navigationBarTitleText": "零售店注销"
+			}
+
 		}]
 	}],
 	"preloadRule": {},
 	"globalStyle": {
-		"navigationBarBackgroundColor":"#0095FF",
-		"navigationBarTextStyle":"white"
+		"navigationBarBackgroundColor": "#0095FF",
+		"navigationBarTextStyle": "white",
+		"app-plus": {
+			"bounce": "none" //关闭窗口回弹效果
+		}
 	},
 	"tabBar": {
 		"list": [{

+ 3 - 4
pages/login/index.vue

@@ -2,8 +2,8 @@
 	<view>
 		<u-image src="../../static/sailun/login_bg.png" mode="widthFix"></u-image>
 		<view class="content">
-			<u-card padding="70" :head-border-bottom="false" :show-head="false" :show-foot="false" :border="false" box-shadow="0px 1px 10px rgba(0,0,0,0.2)"
-			 border-radius="20" margin="20rpx 50rpx">
+			<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)"
+			 border-radius="20" margin="50rpx">
 				<view slot="body">
 					<view style="margin-top: 20rpx;">
 						<u-field v-model="tel" placeholder="请填写手机号" label-width="50">
@@ -16,13 +16,12 @@
 							<u-button size="mini" slot="right" type="primary" @click="getCode" shape="circle">{{codeText}}</u-button>
 						</u-field>
 					</view>
-
 					<u-verification-code ref="uCode" @change="codeChange"></u-verification-code>
 					<view style="margin-top: 80rpx;">
 						<u-button type="primary" :ripple="true" ripple-bg-color="#99d4ff" shape="circle" @tap="$u.debounce(submit, 2000,immediate = true)"
 						 :loading="loading">登录</u-button>
 					</view>
-					<view style="margin-top: 100rpx;display: flex;justify-content: center;">
+					<view style="margin-top: 80rpx;display: flex;justify-content: center;">
 						<view class="u-flex" @click="inregister">
 							<view style="color: rgba(0,160,234,0.5)">
 								还没有账号?

+ 48 - 5
pages/login/register.vue

@@ -1,6 +1,40 @@
 <template>
 	<view>
-		
+		<view class="">
+
+		</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>
+					请按照要求上传您的营业执照和门店照
+				</view>
+			</view>
+			<view slot="body">
+				<u-upload :custom-btn="true" max-count="1" :action="action" class="u-flex u-row-center">
+					<view slot="addBtn" hover-class="slot-btn__hover" hover-stay-time="150">
+						<u-image width="475rpx" height="303rpx" src="../../static/sailun/upload_preview.png"></u-image>
+					</view>
+				</u-upload>
+				<view class="u-flex u-row-center" style="color: #787878;margin: 20rpx 0 60rpx 0;">
+					点击上传营业执照
+				</view>
+				<u-upload :custom-btn="true" max-count="1" :action="action" class="u-flex u-row-center">
+					<view slot="addBtn" hover-class="slot-btn__hover" hover-stay-time="150">
+						<u-image width="475rpx" height="303rpx" src="../../static/sailun/upload_preview.png"></u-image>
+					</view>
+				</u-upload>
+				<view class="u-flex u-row-center" style="color: #787878;margin: 20rpx 0;">
+					点击上传门头照
+				</view>
+			</view>
+		</u-card>
+		<view style="color: #787878;margin-left: 40rpx;">
+			注:上传完营业执照请确认和营业执照一致。
+		</view>
+		<view style="margin: 30rpx;">
+			<u-button type="primary" :ripple="true" ripple-bg-color="#99d4ff" @click="nextStep">下一步</u-button>
+		</view>
 	</view>
 </template>
 
@@ -8,12 +42,21 @@
 	export default {
 		data() {
 			return {
-				
+				action: 'http://www.example.com', // 演示地址
 			};
-		}
+		},
+		methods: {
+			nextStep() {
+				this.$u.route({
+					url: 'pages/login/register_2',
+				})
+			}
+		},
 	}
 </script>
 
-<style lang="scss">
-
+<style lang="scss" scoped>
+	.slot-btn__hover {
+		background-color: rgb(235, 236, 238);
+	}
 </style>

+ 166 - 0
pages/login/register_2.vue

@@ -0,0 +1,166 @@
+<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>
+					基本信息
+				</view>
+			</view>
+			<view slot="body">
+				<u-form :model="form" ref="uForm">
+					<u-form-item prop="store">
+						<view style="margin-right: 10rpx;">
+							<u-icon name="home" size="36"></u-icon>
+						</view>
+						<u-input v-model="form.store" placeholder="请输入门店名称" />
+					</u-form-item>
+					<u-form-item prop="company">
+						<view style="margin-right: 10rpx;">
+							<u-icon name="home" size="36"></u-icon>
+						</view>
+						<u-input v-model="form.company" placeholder="请输入公司名称" />
+					</u-form-item>
+					<u-form-item prop="name">
+						<view style="margin-right: 10rpx;">
+							<u-icon name="account" size="36"></u-icon>
+						</view>
+						<u-input v-model="form.name" placeholder="请输入联系人" />
+					</u-form-item>
+					<u-form-item prop="phone">
+						<view style="margin-right: 10rpx;">
+							<u-icon name="phone" size="36"></u-icon>
+						</view>
+						<u-input v-model="form.phone" placeholder="请输入联系电话" type="number"/>
+					</u-form-item>
+					<u-form-item prop="code">
+						<view style="margin-right: 10rpx;">
+							<u-icon name="lock" size="36"></u-icon>
+						</view>
+						<u-input v-model="form.code" placeholder="请输入验证码" type="number"/>
+						<view class="" slot="right">
+							<u-button size="mini" type="primary" @click="getCode" shape="circle">{{codeText}}</u-button>
+						</view>
+					</u-form-item>
+					<u-form-item prop="region">
+						<view style="margin-right: 10rpx;">
+							<u-icon name="map" size="36"></u-icon>
+						</view>
+						<u-input :select-open="pickerShow" v-model="form.region" placeholder="点击选择省市区" @click="pickerShow = true" :disabled="true"></u-input>
+						<view class="" slot="right">
+							<u-icon name="arrow-right" color="#666666" size="36"></u-icon>
+						</view>
+					</u-form-item>
+					<u-form-item>
+						<view style="margin-right: 10rpx;">
+							<u-icon name="map" size="36"></u-icon>
+						</view>
+						<u-input placeholder="点击选择详细地址"></u-input>
+						<view class="" slot="right">
+							<u-icon name="arrow-right" color="#666666" size="36"></u-icon>
+						</view>
+					</u-form-item>
+				</u-form>
+				<u-verification-code ref="uCode" @change="codeChange"></u-verification-code>
+				<u-picker mode="region" v-model="pickerShow" @confirm="regionConfirm"></u-picker>
+			</view>
+		</u-card>
+		<view style="margin: 30rpx;">
+			<u-button @click="nextStep" type="primary">下一步</u-button>
+		</view>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+				codeText: '',
+				pickerShow: false,
+				form: {
+					store: '',
+					company: '',
+					name: "",
+					phone: "",
+					code: '',
+					region: '',
+				},
+				rules: {
+					store: [{
+						required: true,
+						message: '请输入门店名称',
+						trigger: 'blur,change'
+					}],
+					company: [{
+						required: true,
+						message: '请输入公司名称',
+						trigger: 'blur,change'
+					}],
+					name: [{
+						required: true,
+						message: '请输入联系人',
+						trigger: 'blur,change'
+					}],
+					phone: [{
+						required: true,
+						message: '请输入联系电话',
+						trigger: 'blur,change'
+					}],
+					code: [{
+						required: true,
+						message: '请输入验证码',
+						trigger: 'blur,change'
+					}],
+					region: [{
+						required: true,
+						message: '请选择地区',
+						trigger: 'change',
+					}],
+				}
+			};
+		},
+		methods: {
+			nextStep() {
+				this.$refs.uForm.validate(valid => {
+					if (valid) {
+						console.log('验证通过');
+						this.$u.route({
+							url: 'pages/login/register_3',
+						})
+					} else {
+						console.log('验证失败');
+					}
+					
+				});
+			},
+			codeChange(text) {
+				this.codeText = text;
+			},
+			getCode() {
+				if (this.$refs.uCode.canGetCode) {
+					// 模拟向后端请求验证码
+					uni.showLoading({
+						title: '正在获取验证码',
+					})
+					setTimeout(() => {
+						uni.hideLoading();
+						// 通知验证码组件内部开始倒计时
+						this.$refs.uCode.start();
+					}, 1000);
+				} else {
+					this.$u.toast('倒计时结束后再发送');
+				}
+			},
+			regionConfirm(e) {
+				this.form.region = e.province.label + '-' + e.city.label + '-' + e.area.label;
+			}
+		},
+		onReady() {
+			this.$refs.uForm.setRules(this.rules);
+		}
+	}
+</script>
+
+<style lang="scss" scoped>
+
+</style>

+ 71 - 0
pages/login/register_3.vue

@@ -0,0 +1,71 @@
+<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>
+					选择合作品牌
+				</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>
+			</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>
+			</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>
+			</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>
+			</view>
+			<view slot="body">
+			</view>
+		</u-card>
+	</view>
+</template>
+
+<script>
+	export default {
+		data() {
+			return {
+
+			}
+		},
+		methods: {
+
+		}
+	}
+</script>
+
+<style>
+
+</style>

BIN
static/sailun/upload_preview.png