修改意见反馈以及修改密码发现的bug
							parent
							
								
									5cb2f6ad91
								
							
						
					
					
						commit
						b840a0adf1
					
				| 
						 | 
				
			
			@ -2,8 +2,8 @@
 | 
			
		|||
    "name" : "lili商城",
 | 
			
		||||
    "appid" : "__UNI__EC9FD60",
 | 
			
		||||
    "description" : "",
 | 
			
		||||
    "versionName" : "4.2.5",
 | 
			
		||||
    "versionCode" : 4000250,
 | 
			
		||||
    "versionName" : "4.2.6",
 | 
			
		||||
    "versionCode" : 4000260,
 | 
			
		||||
    "transformPx" : false,
 | 
			
		||||
    "app-plus" : {
 | 
			
		||||
        "compatible" : {
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -16,9 +16,9 @@
 | 
			
		|||
    <!-- 上传凭证 -->
 | 
			
		||||
    <div class="feedBack-box">
 | 
			
		||||
      <view class="opt-view">
 | 
			
		||||
        <view class="img-title">上传凭证(最多5张)</view>
 | 
			
		||||
        <view class="img-title">上传凭证(最多2张)</view>
 | 
			
		||||
        <view class="images-view">
 | 
			
		||||
          <u-upload :header=" { accessToken: storage.getAccessToken() }" :action="action" width="150" @on-uploaded="onUploaded" :max-count="5" :show-progress="false"></u-upload>
 | 
			
		||||
          <u-upload :header=" { accessToken: storage.getAccessToken() }" :action="action" width="150" @on-uploaded="onUploaded" :max-count="2" :show-progress="false"></u-upload>
 | 
			
		||||
        </view>
 | 
			
		||||
      </view>
 | 
			
		||||
    </div>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -15,12 +15,14 @@
 | 
			
		|||
 | 
			
		||||
					<u-form-item class="sendCode" label-width="120" prop="code" label="验证码">
 | 
			
		||||
						<u-input v-model="codeForm.code" placeholder="请输入验证码" />
 | 
			
		||||
          <u-verification-code unique-key="page-edit" :seconds="seconds" @end="end" @start="start" ref="uCode" @change="codeChange"></u-verification-code>
 | 
			
		||||
						<u-verification-code unique-key="page-edit" :seconds="seconds" @end="end" @start="start"
 | 
			
		||||
							ref="uCode" @change="codeChange"></u-verification-code>
 | 
			
		||||
						<view @tap="getCode" class="text-tips">{{ tips }}</view>
 | 
			
		||||
					</u-form-item>
 | 
			
		||||
 | 
			
		||||
					<view class="submit" @click="validatePhone">验证</view>
 | 
			
		||||
        <myVerification keep-running @send="verification" class="verification" ref="verification" business="FIND_USER" />
 | 
			
		||||
					<myVerification keep-running @send="verification" class="verification" ref="verification"
 | 
			
		||||
						business="FIND_USER" />
 | 
			
		||||
				</view>
 | 
			
		||||
				<view v-if="validateFlage">
 | 
			
		||||
					<u-form-item label-width="120" label="旧密码">
 | 
			
		||||
| 
						 | 
				
			
			@ -41,12 +43,18 @@
 | 
			
		|||
</template>
 | 
			
		||||
 | 
			
		||||
<script>
 | 
			
		||||
import { sendMobile, resetByMobile, modifyPass } from "@/api/login";
 | 
			
		||||
	import {
 | 
			
		||||
		sendMobile,
 | 
			
		||||
		resetByMobile,
 | 
			
		||||
		modifyPass
 | 
			
		||||
	} from "@/api/login";
 | 
			
		||||
 | 
			
		||||
import { md5 } from "@/utils/md5.js"; // md5
 | 
			
		||||
import myVerification from "@/components/verification/verification.vue"; //验证
 | 
			
		||||
import uuid from "@/utils/uuid.modified.js";
 | 
			
		||||
export default {
 | 
			
		||||
	import {
 | 
			
		||||
		md5
 | 
			
		||||
	} from "@/utils/md5.js"; // md5
 | 
			
		||||
	import myVerification from "@/components/verification/verification.vue"; //验证
 | 
			
		||||
	import uuid from "@/utils/uuid.modified.js";
 | 
			
		||||
	export default {
 | 
			
		||||
		components: {
 | 
			
		||||
			myVerification,
 | 
			
		||||
		},
 | 
			
		||||
| 
						 | 
				
			
			@ -54,8 +62,7 @@ export default {
 | 
			
		|||
			return {
 | 
			
		||||
				uuid,
 | 
			
		||||
				validateFlage: false, //是否进行了手机号验证
 | 
			
		||||
      verificationTitle: [
 | 
			
		||||
        {
 | 
			
		||||
				verificationTitle: [{
 | 
			
		||||
						title: "安全验证",
 | 
			
		||||
						desc: "请输入当前手机号进行安全验证",
 | 
			
		||||
					},
 | 
			
		||||
| 
						 | 
				
			
			@ -74,28 +81,24 @@ export default {
 | 
			
		|||
				newPassword: "", //新密码
 | 
			
		||||
				password: "", //密码
 | 
			
		||||
				tips: "", //提示
 | 
			
		||||
      seconds: 60, // 60s等待时间
 | 
			
		||||
				seconds: 69, // 60s等待时间
 | 
			
		||||
 | 
			
		||||
				// 验证码登录校验
 | 
			
		||||
				codeRules: {
 | 
			
		||||
        mobile: [
 | 
			
		||||
          {
 | 
			
		||||
					mobile: [{
 | 
			
		||||
						validator: (rule, value, callback) => {
 | 
			
		||||
							return this.$u.test.mobile(value);
 | 
			
		||||
						},
 | 
			
		||||
						message: "手机号码不正确",
 | 
			
		||||
						trigger: ["blur"],
 | 
			
		||||
          },
 | 
			
		||||
        ],
 | 
			
		||||
        code: [
 | 
			
		||||
          {
 | 
			
		||||
					}, ],
 | 
			
		||||
					code: [{
 | 
			
		||||
						min: 4,
 | 
			
		||||
						max: 6,
 | 
			
		||||
						required: true,
 | 
			
		||||
						message: "请输入验证码",
 | 
			
		||||
						trigger: ["blur"],
 | 
			
		||||
          },
 | 
			
		||||
        ],
 | 
			
		||||
					}, ],
 | 
			
		||||
				},
 | 
			
		||||
			};
 | 
			
		||||
		},
 | 
			
		||||
| 
						 | 
				
			
			@ -106,6 +109,7 @@ export default {
 | 
			
		|||
		watch: {
 | 
			
		||||
			flage(val) {
 | 
			
		||||
				if (val) {
 | 
			
		||||
 | 
			
		||||
					if (this.$refs.uCode.canGetCode) {
 | 
			
		||||
						uni.showLoading({
 | 
			
		||||
							title: "正在获取验证码",
 | 
			
		||||
| 
						 | 
				
			
			@ -113,7 +117,7 @@ export default {
 | 
			
		|||
						sendMobile(this.codeForm.mobile, "FIND_USER").then((res) => {
 | 
			
		||||
							uni.hideLoading();
 | 
			
		||||
							// 这里此提示会被this.start()方法中的提示覆盖
 | 
			
		||||
            if (res.data.code == 200) {
 | 
			
		||||
							if (res.data.success) {
 | 
			
		||||
								this.$refs.uCode.start();
 | 
			
		||||
							} else {
 | 
			
		||||
								uni.showToast({
 | 
			
		||||
| 
						 | 
				
			
			@ -121,8 +125,10 @@ export default {
 | 
			
		|||
									duration: 2000,
 | 
			
		||||
									icon: "none",
 | 
			
		||||
								});
 | 
			
		||||
								this.flage = false;
 | 
			
		||||
								this.$refs.verification.getCode();
 | 
			
		||||
							}
 | 
			
		||||
          });
 | 
			
		||||
						})
 | 
			
		||||
					} else {
 | 
			
		||||
						this.$u.toast("请倒计时结束后再发送");
 | 
			
		||||
					}
 | 
			
		||||
| 
						 | 
				
			
			@ -178,7 +184,11 @@ export default {
 | 
			
		|||
			codeChange(text) {
 | 
			
		||||
				this.tips = text;
 | 
			
		||||
			},
 | 
			
		||||
    end() {},
 | 
			
		||||
			end() {
 | 
			
		||||
				
 | 
			
		||||
				this.flage = false;
 | 
			
		||||
					this.$refs.verification.getCode()
 | 
			
		||||
			},
 | 
			
		||||
 | 
			
		||||
			/**判断是否是当前用户的手机号 */
 | 
			
		||||
			isUserPhone() {
 | 
			
		||||
| 
						 | 
				
			
			@ -200,7 +210,7 @@ export default {
 | 
			
		|||
			getCode() {
 | 
			
		||||
				if (this.isUserPhone()) {
 | 
			
		||||
					if (this.tips == "重新获取") {
 | 
			
		||||
          this.flage = true;
 | 
			
		||||
						this.$refs.verification.error(); //发送
 | 
			
		||||
					}
 | 
			
		||||
					if (!this.$u.test.mobile(this.codeForm.mobile)) {
 | 
			
		||||
						uni.showToast({
 | 
			
		||||
| 
						 | 
				
			
			@ -210,49 +220,58 @@ export default {
 | 
			
		|||
						return false;
 | 
			
		||||
					}
 | 
			
		||||
					if (!this.flage) {
 | 
			
		||||
          this.$refs.verification.hide();
 | 
			
		||||
						this.$refs.verification.error(); //发送
 | 
			
		||||
						return false;
 | 
			
		||||
					}
 | 
			
		||||
				}
 | 
			
		||||
			},
 | 
			
		||||
			start() {
 | 
			
		||||
				this.$u.toast("验证码已发送");
 | 
			
		||||
      this.flage = false;
 | 
			
		||||
				this.flage = true;
 | 
			
		||||
 | 
			
		||||
				this.$refs.verification.hide();
 | 
			
		||||
			},
 | 
			
		||||
		},
 | 
			
		||||
};
 | 
			
		||||
	};
 | 
			
		||||
</script>
 | 
			
		||||
<style lang="scss" scoped>
 | 
			
		||||
@import url("@/pages/passport/login.scss");
 | 
			
		||||
/deep/ .u-form-item {
 | 
			
		||||
	@import url("@/pages/passport/login.scss");
 | 
			
		||||
 | 
			
		||||
	/deep/ .u-form-item {
 | 
			
		||||
		margin: 40rpx 0;
 | 
			
		||||
}
 | 
			
		||||
.sendCode {
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	.sendCode {
 | 
			
		||||
		/deep/ .u-form-item--right__content__slot {
 | 
			
		||||
			display: flex;
 | 
			
		||||
		}
 | 
			
		||||
}
 | 
			
		||||
.h2{
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	.h2 {
 | 
			
		||||
		font-size: 40rpx;
 | 
			
		||||
		font-weight: bold;
 | 
			
		||||
}
 | 
			
		||||
page {
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	page {
 | 
			
		||||
		background: #fff;
 | 
			
		||||
}
 | 
			
		||||
.box {
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	.box {
 | 
			
		||||
		padding: 80rpx 0;
 | 
			
		||||
		border-radius: 20rpx;
 | 
			
		||||
}
 | 
			
		||||
.submit {
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	.submit {
 | 
			
		||||
		background: $light-color;
 | 
			
		||||
}
 | 
			
		||||
.box-tips {
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	.box-tips {
 | 
			
		||||
		margin: 0 72rpx;
 | 
			
		||||
}
 | 
			
		||||
.verification {
 | 
			
		||||
	}
 | 
			
		||||
 | 
			
		||||
	.verification {
 | 
			
		||||
		font-size: 24rpx;
 | 
			
		||||
		color: #999;
 | 
			
		||||
		margin-top: 10rpx;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
	}
 | 
			
		||||
</style>
 | 
			
		||||
		Loading…
	
		Reference in New Issue