fix: UI优化
|
@ -4,7 +4,8 @@
|
|||
} from "./libs/login";
|
||||
import {
|
||||
refreshToken,
|
||||
getWeChatOpenId
|
||||
getWeChatOpenId,
|
||||
fetchTenantInfo
|
||||
} from "@/api/api";
|
||||
import {
|
||||
HTTP_REQUEST_URL
|
||||
|
@ -13,7 +14,8 @@
|
|||
import Routine from './libs/routine.js';
|
||||
import Apps from './libs/apps.js';
|
||||
import {
|
||||
mapActions
|
||||
mapActions,
|
||||
mapGetters
|
||||
} from 'vuex'
|
||||
|
||||
export default {
|
||||
|
@ -159,12 +161,15 @@
|
|||
}
|
||||
// #endif
|
||||
},
|
||||
computed: mapGetters(['tenantId']),
|
||||
async mounted() {
|
||||
if (this.$store.getters.isLogin && !this.$Cache.get('USER_INFO')) {
|
||||
await this.$store.dispatch('USERINFO');
|
||||
}
|
||||
if (!this.$Cache.get('TENANT_ID') || this.$route.query.tenantId) {
|
||||
this.getTenantId()
|
||||
} else {
|
||||
this.getTenantInfo()
|
||||
}
|
||||
if (!this.$Cache.get('OPEN_ID') && this.$route.query.code) {
|
||||
this.getWxChatCode()
|
||||
|
@ -176,11 +181,18 @@
|
|||
}, 60000)
|
||||
},
|
||||
methods: {
|
||||
// 获取租户信息
|
||||
getTenantInfo() {
|
||||
fetchTenantInfo(this.tenantId).then(res => {
|
||||
this.$store.commit("SET_TENANT_INFO", res.data);
|
||||
})
|
||||
},
|
||||
// 获取租户ID
|
||||
getTenantId() {
|
||||
const tenantId = this.$route.query.tenantId
|
||||
if (tenantId) {
|
||||
this.$store.commit("SET_TENANTID", tenantId);
|
||||
this.getTenantInfo()
|
||||
} else {
|
||||
this.$util.Tips({
|
||||
title: '请扫码物业公司二维码访问'
|
||||
|
@ -198,8 +210,8 @@
|
|||
getWxChatCode() {
|
||||
const code = this.$route.query.code
|
||||
getWeChatOpenId(code).then(res => {
|
||||
if(res.data){
|
||||
this.$store.commit("SET_OPENID", res.data);
|
||||
if (res.data) {
|
||||
this.$store.commit("SET_OPENID", res.data);
|
||||
}
|
||||
})
|
||||
},
|
||||
|
|
|
@ -2,35 +2,44 @@ import request from "@/utils/request.js";
|
|||
/**
|
||||
* 公共接口 ,优惠券接口 , 行业此讯 , 手机号码注册
|
||||
*
|
||||
*/
|
||||
*/
|
||||
|
||||
/**
|
||||
* 获取主页数据 无需授权
|
||||
*
|
||||
*/
|
||||
export function getIndexData()
|
||||
{
|
||||
return request.get("index",{},{ noAuth : true});
|
||||
*/
|
||||
export function getIndexData() {
|
||||
return request.get("index", {}, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取登录授权login
|
||||
*
|
||||
*/
|
||||
export function getLogo()
|
||||
{
|
||||
return request.get('wechat/getLogo', {}, { noAuth : true});
|
||||
*/
|
||||
export function getLogo() {
|
||||
return request.get('wechat/getLogo', {}, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
|
||||
export function refreshToken(token)
|
||||
{
|
||||
return request.post('member/auth/refresh-token?refreshToken=' + token, {}, { noAuth : true});
|
||||
export function refreshToken(token) {
|
||||
return request.post('member/auth/refresh-token?refreshToken=' + token, {}, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
|
||||
// 获取微信OpenId
|
||||
export function getWeChatOpenId(code)
|
||||
{
|
||||
return request.get('api/order/member/getOpenId?code=' + code, {}, { noAuth : true});
|
||||
export function getWeChatOpenId(code) {
|
||||
return request.get('api/order/member/getOpenId?code=' + code, {}, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
|
||||
// 获取租户信息
|
||||
export function fetchTenantInfo(id) {
|
||||
return request.get('tenant/get?id=' + id, {});
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -38,133 +47,165 @@ export function getWeChatOpenId(code)
|
|||
* @param string formId
|
||||
*/
|
||||
export function setFormId(formId) {
|
||||
return request.post("wechat/set_form_id", { formId: formId});
|
||||
return request.post("wechat/set_form_id", {
|
||||
formId: formId
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 领取优惠卷
|
||||
* @param int couponId
|
||||
*
|
||||
*/
|
||||
export function setCouponReceive(couponId){
|
||||
return request.post('coupon/receive', { couponId: couponId});
|
||||
*/
|
||||
export function setCouponReceive(couponId) {
|
||||
return request.post('coupon/receive', {
|
||||
couponId: couponId
|
||||
});
|
||||
}
|
||||
/**
|
||||
* 优惠券列表
|
||||
* @param object data
|
||||
*/
|
||||
export function getCoupons(data){
|
||||
return request.get('coupons',data,{noAuth:true})
|
||||
*/
|
||||
export function getCoupons(data) {
|
||||
return request.get('coupons', data, {
|
||||
noAuth: true
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 我的优惠券
|
||||
* @param int types 0全部 1未使用 2已使用
|
||||
*/
|
||||
export function getUserCoupons(data){
|
||||
return request.get('coupon/list',data)
|
||||
*/
|
||||
export function getUserCoupons(data) {
|
||||
return request.get('coupon/list', data)
|
||||
}
|
||||
|
||||
/**
|
||||
* 文章分类列表
|
||||
*
|
||||
*/
|
||||
export function getArticleCategoryList(){
|
||||
return request.get('article/category/list',{},{noAuth:true})
|
||||
*/
|
||||
export function getArticleCategoryList() {
|
||||
return request.get('article/category/list', {}, {
|
||||
noAuth: true
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 文章列表
|
||||
* @param int cid
|
||||
*
|
||||
*/
|
||||
export function getArticleList(cid,data){
|
||||
return request.get('article/list/' + cid, data,{noAuth:true})
|
||||
*/
|
||||
export function getArticleList(cid, data) {
|
||||
return request.get('article/list/' + cid, data, {
|
||||
noAuth: true
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 文章 热门列表
|
||||
*
|
||||
*/
|
||||
export function getArticleHotList(){
|
||||
return request.get('article/hot/list',{},{noAuth:true});
|
||||
*/
|
||||
export function getArticleHotList() {
|
||||
return request.get('article/hot/list', {}, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 文章 轮播列表
|
||||
*
|
||||
*/
|
||||
export function getArticleBannerList(){
|
||||
return request.get('article/banner/list',{},{noAuth:true})
|
||||
*/
|
||||
export function getArticleBannerList() {
|
||||
return request.get('article/banner/list', {}, {
|
||||
noAuth: true
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 文章详情
|
||||
* @param int id
|
||||
*
|
||||
*/
|
||||
export function getArticleDetails(id){
|
||||
return request.get('article/info',id,{noAuth:true});
|
||||
*/
|
||||
export function getArticleDetails(id) {
|
||||
return request.get('article/info', id, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 手机号+验证码登录接口
|
||||
* @param object data
|
||||
*/
|
||||
export function loginMobile(data){
|
||||
return request.post('login/mobile',data,{noAuth:true})
|
||||
*/
|
||||
export function loginMobile(data) {
|
||||
return request.post('login/mobile', data, {
|
||||
noAuth: true
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取短信KEY
|
||||
* @param object phone
|
||||
*/
|
||||
export function verifyCode(){
|
||||
return request.get('verify_code', {},{noAuth:true})
|
||||
*/
|
||||
export function verifyCode() {
|
||||
return request.get('verify_code', {}, {
|
||||
noAuth: true
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 验证码发送
|
||||
* @param object phone
|
||||
*/
|
||||
export function registerVerify(phone){
|
||||
return request.post('sendCode', { phone: phone },{noAuth:true},1)
|
||||
*/
|
||||
export function registerVerify(phone) {
|
||||
return request.post('sendCode', {
|
||||
phone: phone
|
||||
}, {
|
||||
noAuth: true
|
||||
}, 1)
|
||||
}
|
||||
|
||||
/**
|
||||
* 手机号注册
|
||||
* @param object data
|
||||
*
|
||||
*/
|
||||
export function phoneRegister(data){
|
||||
return request.post('register',data,{noAuth:true});
|
||||
*/
|
||||
export function phoneRegister(data) {
|
||||
return request.post('register', data, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 手机号修改密码
|
||||
* @param object data
|
||||
*
|
||||
*/
|
||||
export function phoneRegisterReset(data){
|
||||
return request.post('register/reset',data,{noAuth:true})
|
||||
*/
|
||||
export function phoneRegisterReset(data) {
|
||||
return request.post('register/reset', data, {
|
||||
noAuth: true
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 手机号+密码登录
|
||||
* @param object data
|
||||
*
|
||||
*/
|
||||
export function phoneLogin(data){
|
||||
return request.post('login',data,{noAuth:true})
|
||||
*/
|
||||
export function phoneLogin(data) {
|
||||
return request.post('login', data, {
|
||||
noAuth: true
|
||||
})
|
||||
}
|
||||
|
||||
/**
|
||||
* 切换H5登录
|
||||
* @param object data
|
||||
*/
|
||||
*/
|
||||
// #ifdef MP
|
||||
export function switchH5Login(){
|
||||
return request.post('switch_h5', { 'from':'routine'});
|
||||
export function switchH5Login() {
|
||||
return request.post('switch_h5', {
|
||||
'from': 'routine'
|
||||
});
|
||||
}
|
||||
// #endif
|
||||
|
||||
|
@ -173,67 +214,80 @@ export function switchH5Login(){
|
|||
* */
|
||||
// #ifdef H5
|
||||
export function switchH5Login() {
|
||||
return request.post("switch_h5", { 'from': "wechat" });
|
||||
return request.post("switch_h5", {
|
||||
'from': "wechat"
|
||||
});
|
||||
}
|
||||
// #endif
|
||||
|
||||
/**
|
||||
* 换绑手机号
|
||||
*
|
||||
*/
|
||||
export function bindingPhone(data){
|
||||
return request.post('update/binding',data);
|
||||
*/
|
||||
export function bindingPhone(data) {
|
||||
return request.post('update/binding', data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 换绑手机号校验
|
||||
*
|
||||
*/
|
||||
export function bindingVerify(data){
|
||||
return request.post('update/binding/verify',data);
|
||||
*/
|
||||
export function bindingVerify(data) {
|
||||
return request.post('update/binding/verify', data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 退出登錄
|
||||
*
|
||||
*/
|
||||
export function logout(){
|
||||
*/
|
||||
export function logout() {
|
||||
return request.get('logout');
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取订阅消息id
|
||||
*/
|
||||
export function getTemlIds(data)
|
||||
{
|
||||
return request.get('wechat/program/my/temp/list', data , { noAuth:true});
|
||||
export function getTemlIds(data) {
|
||||
return request.get('wechat/program/my/temp/list', data, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 首页拼团数据
|
||||
*/
|
||||
export function pink()
|
||||
{
|
||||
return request.get('pink', {}, { noAuth:true});
|
||||
export function pink() {
|
||||
return request.get('pink', {}, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取城市信息
|
||||
*/
|
||||
export function getCity() {
|
||||
return request.get('area/tree', { }, { noAuth: true });
|
||||
return request.get('area/tree', {}, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取小程序直播列表
|
||||
*/
|
||||
export function getLiveList(page,limit) {
|
||||
return request.get('wechat/live', { page, limit}, { noAuth: true });
|
||||
export function getLiveList(page, limit) {
|
||||
return request.get('wechat/live', {
|
||||
page,
|
||||
limit
|
||||
}, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取小程序二维码
|
||||
*/
|
||||
export function getQrcode(data) {
|
||||
return request.post('qrcode/get',data,{ noAuth: true });
|
||||
return request.post('qrcode/get', data, {
|
||||
noAuth: true
|
||||
});
|
||||
}
|
||||
|
|
|
@ -88,8 +88,9 @@
|
|||
},
|
||||
function(res) {
|
||||
if (res.err_msg == "get_brand_wcpay_request:ok") {
|
||||
// 使用以上方式判断前端返回,微信团队郑重提示:
|
||||
//res.err_msg将在用户支付成功后返回ok,但并不保证它绝对可靠。
|
||||
uni.switchTab({
|
||||
url: '/pages/member_application/index'
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
@ -110,7 +111,8 @@
|
|||
title: '请选择要支付的订单'
|
||||
});
|
||||
uni.showLoading({
|
||||
title: '支付中'
|
||||
title: '支付中',
|
||||
mask: true
|
||||
});
|
||||
if(paytype === 'WXPAY' && !that.openId) {
|
||||
return that.$util.Tips({
|
||||
|
|
|
@ -10,6 +10,8 @@ module.exports = {
|
|||
OPEN_ID: 'OPEN_ID',
|
||||
//用户信息
|
||||
USER_INFO: 'USER_INFO',
|
||||
//租户信息
|
||||
TENANT_INFO: 'TENANT_INFO',
|
||||
//token 过期时间
|
||||
EXPIRES_TIME: 'EXPIRES_TIME',
|
||||
//微信授权
|
||||
|
|
|
@ -443,6 +443,13 @@
|
|||
"navigationBarTitleText": "注册",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
},
|
||||
{
|
||||
"path": "register/success",
|
||||
"style": {
|
||||
"navigationBarTitleText": "注册成功",
|
||||
"navigationStyle": "custom"
|
||||
}
|
||||
}
|
||||
]
|
||||
},
|
||||
|
@ -562,37 +569,31 @@
|
|||
"backgroundColor": "#ffffff",
|
||||
"list": [{
|
||||
"pagePath": "pages/index/index",
|
||||
"iconPath": "static/images/1-001.png",
|
||||
"iconPath": "static/images/tabbar/nav_icon_shop.png",
|
||||
"selectedIconPath": "static/images/1-002.png",
|
||||
"text": "首页"
|
||||
"text": "商城"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/goods_cate/goods_cate",
|
||||
"iconPath": "static/images/2-001.png",
|
||||
"iconPath": "static/images/tabbar/nav_icon_sort.png",
|
||||
"selectedIconPath": "static/images/2-002.png",
|
||||
"text": "分类"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/member_record/index",
|
||||
"pagePath": "pages/member_application/index",
|
||||
"iconPath": "static/images/2-001.png",
|
||||
"selectedIconPath": "static/images/2-002.png",
|
||||
"selectedIconPath": "static/images/tabbar/nav_icon_member_active.png",
|
||||
"text": "会员申请"
|
||||
},
|
||||
// {
|
||||
// "pagePath": "pages/member_application/index",
|
||||
// "iconPath": "static/images/2-001.png",
|
||||
// "selectedIconPath": "static/images/2-002.png",
|
||||
// "text": "会员申请"
|
||||
// },
|
||||
{
|
||||
"pagePath": "pages/order_addcart/order_addcart",
|
||||
"iconPath": "static/images/3-001.png",
|
||||
"iconPath": "static/images/tabbar/nav_icon_cart.png",
|
||||
"selectedIconPath": "static/images/3-002.png",
|
||||
"text": "购物车"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/user/index",
|
||||
"iconPath": "static/images/4-001.png",
|
||||
"iconPath": "static/images/tabbar/nav_icon_my.png",
|
||||
"selectedIconPath": "static/images/4-002.png",
|
||||
"text": "我的"
|
||||
}
|
||||
|
|
|
@ -8,20 +8,24 @@
|
|||
<div class="list">
|
||||
<form @submit.prevent="submit">
|
||||
<div class="item">
|
||||
<div class="acea-row row-middle">
|
||||
<image src="/static/images/phone_1.png" style="width: 37rpx; height: 42rpx;"></image>
|
||||
<input type="text" class="texts" placeholder="输入您手机号码" v-model="mobile" required />
|
||||
<div class="acea-row row-middle" v-if="current === 0">
|
||||
<image src="/static/images/user_1.png" style="width: 40rpx; height: 40rpx;"></image>
|
||||
<input type="text" class="texts" placeholder="请输入您的账号" v-model="mobile" required />
|
||||
</div>
|
||||
<div class="acea-row row-middle" v-else>
|
||||
<image src="/static/images/phone_2.png" style="width: 40rpx; height: 40rpx;"></image>
|
||||
<input type="text" class="texts" placeholder="请输入您的手机号" v-model="mobile" required />
|
||||
</div>
|
||||
</div>
|
||||
<div class="item" v-if="current === 0">
|
||||
<div class="acea-row row-middle">
|
||||
<image src="/static/images/code_2.png" style="width: 28rpx; height: 32rpx;"></image>
|
||||
<image src="/static/images/code_3.png" style="width: 40rpx; height: 40rpx;"></image>
|
||||
<input type="password" class="texts" placeholder="填写登录密码" v-model="password" required />
|
||||
</div>
|
||||
</div>
|
||||
<div class="item" v-else>
|
||||
<div class="acea-row row-middle">
|
||||
<image src="/static/images/code_2.png" style="width: 28rpx; height: 32rpx;"></image>
|
||||
<image src="/static/images/code_4.png" style="width: 40rpx; height: 40rpx;"></image>
|
||||
<input type="text" placeholder="请输入您的验证码" class="texts" v-model="captcha" />
|
||||
</div>
|
||||
<button class="code" :disabled="disabled" :class="disabled === true ? 'on' : ''" @click="code">
|
||||
|
@ -369,6 +373,8 @@
|
|||
|
||||
.login-wrapper {
|
||||
padding: 30rpx 52rpx;
|
||||
background: url('@/static/images/bg-linear.png') center 0 no-repeat;
|
||||
background-size:100% 672rpx;
|
||||
|
||||
.logo-wrap {
|
||||
margin: 285rpx 0 85rpx 0;
|
||||
|
@ -465,7 +471,7 @@
|
|||
justify-content: center;
|
||||
width: 100%;
|
||||
height: 87rpx;
|
||||
margin-top: 237rpx;
|
||||
margin-top: 137rpx;
|
||||
color: #FFFFFF;
|
||||
font-size: 32rpx;
|
||||
background: linear-gradient(0deg, #E63163 0%, #FF819F 100%);
|
||||
|
|
|
@ -1,37 +1,42 @@
|
|||
<template>
|
||||
<div class="login-wrapper">
|
||||
<div class="shading">
|
||||
<!-- <image :src="logoUrl"/> -->
|
||||
<image :src="logoUrl" />
|
||||
<!-- <image src="/static/images/logo2.png" v-if="!logoUrl" /> -->
|
||||
<div class="logo-wrap">
|
||||
<img src="/static/images/logo.png" style="width:127rpx;height:45rpx;"></image>
|
||||
</div>
|
||||
<view class="title">注册账号</view>
|
||||
<div class="whiteBg">
|
||||
<div class="list">
|
||||
<form @submit.prevent="submit">
|
||||
<div class="item">
|
||||
<div class="acea-row row-middle">
|
||||
<image src="/static/images/phone_1.png" style="width: 24rpx; height: 34rpx;"></image>
|
||||
<image src="/static/images/user_1.png" style="width: 40rpx; height: 40rpx;"></image>
|
||||
<input type="text" class="texts" placeholder="请输入姓名" v-model="registerForm.realName" required />
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="acea-row row-middle">
|
||||
<image src="/static/images/phone_1.png" style="width: 28rpx; height: 32rpx;"></image>
|
||||
<image src="/static/images/phone_2.png" style="width: 40rpx; height: 40rpx;"></image>
|
||||
<input type="text" class="texts" placeholder="请输入手机号" v-model="registerForm.mobile" required />
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="acea-row row-middle">
|
||||
<image src="/static/images/code_2.png" style="width: 28rpx; height: 32rpx;"></image>
|
||||
<input type="text" placeholder="填写验证码" class="codeIput" v-model="registerForm.code" />
|
||||
<button class="code" :disabled="disabled" :class="disabled === true ? 'on' : ''" @click="code">
|
||||
{{ text }}
|
||||
</button>
|
||||
<image src="/static/images/code_3.png" style="width: 40rpx; height: 40rpx;"></image>
|
||||
<input type="text" placeholder="填写验证码" class="texts" v-model="registerForm.code" />
|
||||
</div>
|
||||
<button class="code" :disabled="disabled" :class="disabled === true ? 'on' : ''" @click="code">
|
||||
{{ text }}
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<button class="logon" @click="onRegister" :disabled="loading" :loading="loading">注册</button>
|
||||
<div class="protocol-wrap">
|
||||
<u-checkbox-group v-model="checked">
|
||||
<u-checkbox size="30" shape="circle" activeColor="#F35981" name="同意"></u-checkbox>
|
||||
</u-checkbox-group>
|
||||
<view class="text">我已阅读并同意 <span class="link">《创盈商城用户协议》</span></view>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bottom"></div>
|
||||
</div>
|
||||
|
@ -51,6 +56,7 @@
|
|||
return {
|
||||
logoUrl: '',
|
||||
loading: false,
|
||||
checked: [],
|
||||
registerForm: {
|
||||
realName: '',
|
||||
mobile: '',
|
||||
|
@ -67,7 +73,7 @@
|
|||
const res = await register(this.registerForm)
|
||||
this.$util.Tips({
|
||||
title: res.code === 0 ? '注册成功' : res.msg
|
||||
}, '/pages/users/login/index')
|
||||
}, '/pages/users/register/success')
|
||||
} catch (err) {
|
||||
//TODO handle the exception
|
||||
this.$util.Tips({
|
||||
|
@ -84,6 +90,9 @@
|
|||
if (!/^1(3|4|5|7|8|9|6)\d{9}$/i.test(this.registerForm.mobile)) return this.$util.Tips({
|
||||
title: '请输入正确的手机号码'
|
||||
});
|
||||
if(that.checked.length === 0) return that.$util.Tips({
|
||||
title: '请勾选同意用户协议'
|
||||
});
|
||||
await registerVerify(this.registerForm.mobile, 4)
|
||||
.then(res => {
|
||||
this.$util.Tips({
|
||||
|
@ -191,7 +200,19 @@
|
|||
}
|
||||
|
||||
.login-wrapper {
|
||||
padding: 30rpx;
|
||||
padding: 30rpx 52rpx;
|
||||
background: url('@/static/images/bg-linear.png') center 0 no-repeat;
|
||||
background-size:100% 672rpx;
|
||||
|
||||
.logo-wrap {
|
||||
margin: 285rpx 0 85rpx 0;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 40rpx;
|
||||
font-weight: 400;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.shading {
|
||||
display: flex;
|
||||
|
@ -215,25 +236,45 @@
|
|||
}
|
||||
|
||||
.whiteBg {
|
||||
margin-top: 100rpx;
|
||||
margin-top: 46rpx;
|
||||
|
||||
.list {
|
||||
border-radius: 16rpx;
|
||||
overflow: hidden;
|
||||
|
||||
.item {
|
||||
border-bottom: 1px solid #F0F0F0;
|
||||
background: #fff;
|
||||
margin-bottom: 38rpx;
|
||||
height: 98rpx;
|
||||
display: flex;
|
||||
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.code {
|
||||
width: 197rpx;
|
||||
text-align: center;
|
||||
line-height: 96rpx;
|
||||
background: #FFF3F6;
|
||||
border: 1px solid #F54275;
|
||||
border-radius: 15rpx;
|
||||
font-size: 28rpx;
|
||||
color: #F03A76;
|
||||
margin-left: 19rpx;
|
||||
}
|
||||
|
||||
.row-middle {
|
||||
position: relative;
|
||||
padding: 16rpx 45rpx;
|
||||
padding: 28rpx;
|
||||
background: #fff;
|
||||
border: 1px solid #BFBFBF;
|
||||
border-radius: 15rpx;
|
||||
flex: 1;
|
||||
|
||||
.texts {
|
||||
flex: 1;
|
||||
font-size: 28rpx;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
height: 42rpx;
|
||||
line-height: 42rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
@ -249,14 +290,6 @@
|
|||
align-items: center;
|
||||
}
|
||||
|
||||
.code {
|
||||
position: absolute;
|
||||
right: 30rpx;
|
||||
top: 50%;
|
||||
color: $theme-color;
|
||||
font-size: 26rpx;
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -266,18 +299,36 @@
|
|||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
height: 86rpx;
|
||||
margin-top: 80rpx;
|
||||
background-color: $theme-color;
|
||||
border-radius: 120rpx;
|
||||
height: 87rpx;
|
||||
margin-top: 99rpx;
|
||||
color: #FFFFFF;
|
||||
font-size: 32rpx;
|
||||
background: linear-gradient(0deg, #E63163 0%, #FF819F 100%);
|
||||
border-radius: 44rpx;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
.tips {
|
||||
margin: 30rpx;
|
||||
text-align: center;
|
||||
color: #999;
|
||||
margin: 125rpx 20rpx 0 20rpx;
|
||||
font-size: 24rpx;
|
||||
color: #000;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.protocol-wrap {
|
||||
margin: 131rpx 0 80rpx 0;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
|
||||
.text {
|
||||
font-size: 24rpx;
|
||||
color: #000;
|
||||
|
||||
.link {
|
||||
color: #F35981;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,56 @@
|
|||
<template>
|
||||
<view class="register-success-wrap">
|
||||
<image src="@/static/images/logo.png" class="icon"></image>
|
||||
<view class="text">恭喜您,注册成功</view>
|
||||
<u-button class="logon" @click="onBackLogin">返回登录</u-button>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onBackLogin() {
|
||||
uni.navigateTo({
|
||||
url: '/pages/users/login/index'
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.register-success-wrap {
|
||||
padding: 0 50rpx;
|
||||
text-align: center;
|
||||
|
||||
.icon {
|
||||
margin: 428rpx auto 56rpx;
|
||||
width: 98rpx;
|
||||
height: 98rpx;
|
||||
}
|
||||
|
||||
.text {
|
||||
text-align: center;
|
||||
font-size: 40rpx;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.logon {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
height: 87rpx;
|
||||
margin-top: 237rpx;
|
||||
color: #FFFFFF;
|
||||
font-size: 32rpx;
|
||||
background: linear-gradient(0deg, #E63163 0%, #FF819F 100%);
|
||||
border-radius: 44rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
|
@ -1,145 +1,246 @@
|
|||
<template>
|
||||
<div class="register absolute">
|
||||
<div class="shading">
|
||||
<div class="pictrue acea-row row-center-wrapper">
|
||||
<image src="../../../static/images/logo2.png" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="whiteBg">
|
||||
<div class="title">找回密码</div>
|
||||
<div class="list">
|
||||
<div class="item">
|
||||
<div class="acea-row row-middle">
|
||||
<image src="/static/images/phone_1.png"></image>
|
||||
<input type="text" placeholder="输入手机号码" v-model="account" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
|
||||
<div class="acea-row row-middle">
|
||||
<image src="/static/images/code_2.png"></image>
|
||||
<input type="text" placeholder="填写验证码" class="codeIput" v-model="captcha" />
|
||||
<button class="code" :disabled="disabled" :class="disabled === true ? 'on' : ''" @click="code">
|
||||
{{ text }}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="acea-row row-middle">
|
||||
<image src="/static/images/code_2.png"></image>
|
||||
<input type="password" placeholder="填写您的新密码" v-model="password" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="item" v-if="isShowCode">
|
||||
<div class="align-left">
|
||||
<input type="text" placeholder="填写验证码" class="codeIput" v-model="codeVal" />
|
||||
<div class="code" @click="again"><img :src="codeUrl" /></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="logon" @click="registerReset">确认</div>
|
||||
<div class="tip">
|
||||
<span class="font-color-red" @click="back">立即登录</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bottom"></div>
|
||||
</div>
|
||||
<div class="login-wrapper">
|
||||
<div class="logo-wrap">
|
||||
<img src="/static/images/logo.png" style="width:127rpx;height:45rpx;"></image>
|
||||
</div>
|
||||
<view class="title">找回密码</view>
|
||||
<div class="whiteBg">
|
||||
<div class="list">
|
||||
<div class="item">
|
||||
<div class="acea-row row-middle">
|
||||
<image src="/static/images/phone_1.png" style="width: 40rpx; height: 40rpx;"></image>
|
||||
<input type="text" class="texts" placeholder="输入手机号码" v-model="account" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="acea-row row-middle">
|
||||
<image src="/static/images/code_2.png" style="width: 40rpx; height: 40rpx;"></image>
|
||||
<input type="text" class="texts" placeholder="填写验证码" v-model="captcha" />
|
||||
</div>
|
||||
<button class="code" :disabled="disabled" :class="disabled === true ? 'on' : ''" @click="code">
|
||||
{{ text }}
|
||||
</button>
|
||||
</div>
|
||||
<div class="item">
|
||||
<div class="acea-row row-middle">
|
||||
<image src="/static/images/code_2.png" style="width: 40rpx; height: 40rpx;"></image>
|
||||
<input type="password" class="texts" placeholder="填写您的新密码" v-model="password" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="item" v-if="isShowCode">
|
||||
<div class="align-left">
|
||||
<input type="text" placeholder="填写验证码" class="codeIput" v-model="codeVal" />
|
||||
<div class="code" @click="again"><img :src="codeUrl" /></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="logon" @click="registerReset">确认</div>
|
||||
<div class="tips">
|
||||
<span @click="back">立即登录</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="bottom"></div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import sendVerifyCode from "@/mixins/SendVerifyCode";
|
||||
import {
|
||||
registerVerify,
|
||||
registerReset,
|
||||
getCodeApi
|
||||
} from "@/api/user";
|
||||
// import { validatorDefaultCatch } from "@/utils/dialog";
|
||||
// import attrs, { required, alpha_num, chs_phone } from "@utils/validate";
|
||||
// import { VUE_APP_API_URL } from "@utils";
|
||||
import sendVerifyCode from "@/mixins/SendVerifyCode";
|
||||
import {
|
||||
registerVerify,
|
||||
registerReset,
|
||||
getCodeApi
|
||||
} from "@/api/user";
|
||||
// import { validatorDefaultCatch } from "@/utils/dialog";
|
||||
// import attrs, { required, alpha_num, chs_phone } from "@utils/validate";
|
||||
// import { VUE_APP_API_URL } from "@utils";
|
||||
|
||||
export default {
|
||||
name: "RetrievePassword",
|
||||
data: function() {
|
||||
return {
|
||||
account: "",
|
||||
password: "",
|
||||
captcha: "",
|
||||
keyCode: "",
|
||||
codeUrl: "",
|
||||
codeVal: "",
|
||||
isShowCode: false
|
||||
};
|
||||
},
|
||||
mixins: [sendVerifyCode],
|
||||
mounted: function() {
|
||||
export default {
|
||||
name: "RetrievePassword",
|
||||
data: function() {
|
||||
return {
|
||||
account: "",
|
||||
password: "",
|
||||
captcha: "",
|
||||
keyCode: "",
|
||||
codeUrl: "",
|
||||
codeVal: "",
|
||||
isShowCode: false
|
||||
};
|
||||
},
|
||||
mixins: [sendVerifyCode],
|
||||
mounted: function() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
back() {
|
||||
uni.navigateBack();
|
||||
},
|
||||
again() {
|
||||
this.codeUrl =
|
||||
VUE_APP_API_URL + "/captcha?" + this.keyCode + Date.parse(new Date());
|
||||
},
|
||||
async registerReset() {
|
||||
var that = this;
|
||||
if (!that.account) return that.$util.Tips({
|
||||
title: '请填写手机号码'
|
||||
});
|
||||
if (!/^1(3|4|5|7|8|9|6)\d{9}$/i.test(that.account)) return that.$util.Tips({
|
||||
title: '请输入正确的手机号码'
|
||||
});
|
||||
if (!that.captcha) return that.$util.Tips({
|
||||
title: '请填写验证码'
|
||||
});
|
||||
registerReset({
|
||||
mobile: that.account,
|
||||
password: that.password,
|
||||
code: that.captcha
|
||||
})
|
||||
.then(res => {
|
||||
that.$util.Tips({
|
||||
title: res.message
|
||||
}, {
|
||||
tab: 3
|
||||
})
|
||||
})
|
||||
.catch(res => {
|
||||
that.$util.Tips({
|
||||
title: res
|
||||
})
|
||||
});
|
||||
},
|
||||
async code() {
|
||||
let that = this;
|
||||
if (!that.account) return that.$util.Tips({
|
||||
title: '请填写手机号码'
|
||||
});
|
||||
if (!/^1(3|4|5|7|8|9|6)\d{9}$/i.test(that.account)) return that.$util.Tips({
|
||||
title: '请输入正确的手机号码'
|
||||
});
|
||||
await registerVerify(that.account, 3)
|
||||
.then(res => {
|
||||
// that.$dialog.success(res.message);
|
||||
that.sendCode();
|
||||
})
|
||||
.catch(res => {
|
||||
// if (res.data.status === 402) {
|
||||
// that.codeUrl = `${VUE_APP_API_URL}/sms_captcha?key=${that.keyCode}`;
|
||||
// that.isShowCode = true;
|
||||
// }
|
||||
that.$util.Tips({
|
||||
title: res
|
||||
});
|
||||
});
|
||||
},
|
||||
}
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
back() {
|
||||
uni.navigateBack();
|
||||
},
|
||||
again() {
|
||||
this.codeUrl =
|
||||
VUE_APP_API_URL + "/captcha?" + this.keyCode + Date.parse(new Date());
|
||||
},
|
||||
async registerReset() {
|
||||
var that = this;
|
||||
if (!that.account) return that.$util.Tips({
|
||||
title: '请填写手机号码'
|
||||
});
|
||||
if (!/^1(3|4|5|7|8|9|6)\d{9}$/i.test(that.account)) return that.$util.Tips({
|
||||
title: '请输入正确的手机号码'
|
||||
});
|
||||
if (!that.captcha) return that.$util.Tips({
|
||||
title: '请填写验证码'
|
||||
});
|
||||
registerReset({
|
||||
mobile: that.account,
|
||||
password: that.password,
|
||||
code: that.captcha
|
||||
})
|
||||
.then(res => {
|
||||
that.$util.Tips({
|
||||
title: res.message
|
||||
}, {
|
||||
tab: 3
|
||||
})
|
||||
})
|
||||
.catch(res => {
|
||||
that.$util.Tips({
|
||||
title: res
|
||||
})
|
||||
});
|
||||
},
|
||||
async code() {
|
||||
let that = this;
|
||||
if (!that.account) return that.$util.Tips({
|
||||
title: '请填写手机号码'
|
||||
});
|
||||
if (!/^1(3|4|5|7|8|9|6)\d{9}$/i.test(that.account)) return that.$util.Tips({
|
||||
title: '请输入正确的手机号码'
|
||||
});
|
||||
await registerVerify(that.account, 3)
|
||||
.then(res => {
|
||||
// that.$dialog.success(res.message);
|
||||
that.sendCode();
|
||||
})
|
||||
.catch(res => {
|
||||
// if (res.data.status === 402) {
|
||||
// that.codeUrl = `${VUE_APP_API_URL}/sms_captcha?key=${that.keyCode}`;
|
||||
// that.isShowCode = true;
|
||||
// }
|
||||
that.$util.Tips({
|
||||
title: res
|
||||
});
|
||||
});
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style scoped>
|
||||
.code img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
<style lang="scss" scoped>
|
||||
.code img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.acea-row.row-middle {
|
||||
input {
|
||||
margin-left: 20rpx;
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
.login-wrapper {
|
||||
padding: 30rpx 52rpx;
|
||||
background: url('@/static/images/bg-linear.png') center 0 no-repeat;
|
||||
background-size: 100% 672rpx;
|
||||
|
||||
.logo-wrap {
|
||||
margin: 285rpx 0 85rpx 0;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 40rpx;
|
||||
font-weight: 400;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.whiteBg {
|
||||
|
||||
margin-top: 46rpx;
|
||||
|
||||
.list {
|
||||
overflow: hidden;
|
||||
|
||||
.item {
|
||||
margin-bottom: 38rpx;
|
||||
height: 98rpx;
|
||||
display: flex;
|
||||
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.code {
|
||||
width: 197rpx;
|
||||
text-align: center;
|
||||
line-height: 96rpx;
|
||||
background: #FFF3F6;
|
||||
border: 1px solid #F54275;
|
||||
border-radius: 15rpx;
|
||||
font-size: 28rpx;
|
||||
color: #F03A76;
|
||||
margin-left: 19rpx;
|
||||
}
|
||||
|
||||
.row-middle {
|
||||
position: relative;
|
||||
padding: 28rpx;
|
||||
background: #fff;
|
||||
border: 1px solid #BFBFBF;
|
||||
border-radius: 15rpx;
|
||||
flex: 1;
|
||||
|
||||
.texts {
|
||||
flex: 1;
|
||||
font-size: 28rpx;
|
||||
height: 42rpx;
|
||||
line-height: 42rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
input {
|
||||
flex: 1;
|
||||
font-size: 28rpx;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.logon {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 100%;
|
||||
height: 87rpx;
|
||||
margin-top: 80rpx;
|
||||
color: #FFFFFF;
|
||||
font-size: 32rpx;
|
||||
background: linear-gradient(0deg, #E63163 0%, #FF819F 100%);
|
||||
border-radius: 44rpx;
|
||||
}
|
||||
|
||||
.tips {
|
||||
margin-top: 50rpx;
|
||||
font-size: 24rpx;
|
||||
color: #000;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
After Width: | Height: | Size: 272 KiB |
After Width: | Height: | Size: 3.0 KiB |
After Width: | Height: | Size: 4.2 KiB |
After Width: | Height: | Size: 2.7 KiB |
After Width: | Height: | Size: 5.0 KiB |
After Width: | Height: | Size: 11 KiB |
After Width: | Height: | Size: 4.9 KiB |
After Width: | Height: | Size: 4.9 KiB |
After Width: | Height: | Size: 5.2 KiB |
After Width: | Height: | Size: 5.5 KiB |
|
@ -3,6 +3,7 @@ export default {
|
|||
isLogin: state => !!state.app.token,
|
||||
backgroundColor: state => state.app.backgroundColor,
|
||||
userInfo: state => state.app.userInfo || {},
|
||||
tenantInfo: state => state.app.tenantInfo || {},
|
||||
uid: state => state.app.uid,
|
||||
tenantId: state => state.app.tenantId,
|
||||
openId: state => state.app.openId,
|
||||
|
|
|
@ -11,7 +11,8 @@ import {
|
|||
} from '../../config/cache';
|
||||
import Cache from '../../utils/cache';
|
||||
import {
|
||||
USER_INFO
|
||||
USER_INFO,
|
||||
TENANT_INFO
|
||||
} from '../../config/cache';
|
||||
|
||||
const state = {
|
||||
|
@ -19,6 +20,7 @@ const state = {
|
|||
refreshToken: Cache.get(REFRESH_TOKEN) || '',
|
||||
backgroundColor: "#fff",
|
||||
userInfo: Cache.get(USER_INFO)?JSON.parse(Cache.get(USER_INFO)):null,
|
||||
tenantInfo: Cache.get(TENANT_INFO)?JSON.parse(Cache.get(TENANT_INFO)):null,
|
||||
uid: Cache.get(UID) || null,
|
||||
tenantId: Cache.get(TENANT_ID) || '',
|
||||
spreadId: '',
|
||||
|
@ -36,6 +38,10 @@ const mutations = {
|
|||
Cache.set(LOGIN_STATUS, opt.token);
|
||||
Cache.set(REFRESH_TOKEN, opt.refreshToken);
|
||||
},
|
||||
SET_TENANT_INFO(state,val){
|
||||
state.tenantInfo = val
|
||||
Cache.set(TENANT_INFO, val);
|
||||
},
|
||||
SETUID(state,val){
|
||||
state.uid = val;
|
||||
Cache.set(UID, val);
|
||||
|
|