소스 검색

注册修改

mym 1 년 전
부모
커밋
ebbeb27794
3개의 변경된 파일13개의 추가작업 그리고 13개의 파일을 삭제
  1. 8 5
      pages/login/chooseRole.vue
  2. 0 6
      pages/login/login.vue
  3. 5 2
      pages/login/register.vue

+ 8 - 5
pages/login/chooseRole.vue

@@ -4,12 +4,12 @@
 		<u-list :scrollable="false" height="500px">
 			<u-list-item v-for="(item, index) in roles" :key="index" >
 				<!-- <u-button class="custom-style" size="lager" type="primary" shape="circle" :text="`我是${item.roleName}`" @click="choose(item.id)"></u-button> -->
-				<u-button :class="index==current?'active-custom-style':'custom-style'" size="lager" type="primary" shape="circle" @click="choose(item)">
+				<u-button :class="item.id==current?'active-custom-style':'custom-style'" size="lager" type="primary" shape="circle" @click="choose(item)">
 					<text>我是{{item.roleName}}</text>
 				</u-button>
 			</u-list-item>
 		</u-list>
-		<u-button type="error" shape="circle" text="下一步" @click="next()"></u-button>
+		<!-- <u-button type="error" shape="circle" text="下一步" @click="next()"></u-button> -->
 	</view>
 </template>
 
@@ -26,12 +26,15 @@
 		},
 		methods: {
 			choose(data) {
-				for (let i = 0; i <= this.roles.length; i++) {
+				for (let i = 0; i < this.roles.length; i++) {
 					if (this.roles[i].roleName == data.roleName) {
-						this.current = i+1;
+						this.current = data.id;
 					}
 				}
-				this.isNext = true
+				var that = this
+				setTimeout(function() {
+					that.$common.to('/pages/login/register?type='+this.current);
+				}, 1000)
 			},
 			getList(){
 				this.$api.getIdentifyList().then(res => {

+ 0 - 6
pages/login/login.vue

@@ -100,12 +100,6 @@
 				this.$common.to('/pages/login/chooseRole')
 			},
 			getAgreement(id) {
-				// let params = {
-				// 	id: this.id
-				// }
-				// this.$api.getAgreement(params).then(res => {
-				// 	console.log(res)
-				// })
 				this.$common.to('/pages/login/userAgreement?id='+id)
 			}
 		}

+ 5 - 2
pages/login/register.vue

@@ -42,8 +42,8 @@
 			<view class="btn">
 				<view style="margin-bottom: 20rpx;font-size: 28rpx;">
 					<u-checkbox-group v-model="value" :wrap="true">
-						<u-checkbox name="1"></u-checkbox>注册同意<text class="blue-class">《用户协议》</text>和<text
-							class="blue-class">《隐私政策》</text>
+						<u-checkbox name="1"></u-checkbox>登录同意<text class="blue-class" @click="getAgreement(1)">《用户协议》</text>和<text
+							class="blue-class" @click="getAgreement(2)">《隐私政策》</text>
 					</u-checkbox-group>
 				</view>
 				<view>
@@ -162,6 +162,9 @@
 					url: '/pages/login/login'
 				});
 			},
+			getAgreement(id) {
+				this.$common.to('/pages/login/userAgreement?id='+id)
+			}
 			// changeHandler(e){
 			// 	console.log(e)
 			// 	this.form.type=e.value[0]