fix: UI优化

pull/2/head
TianYu 2023-05-19 11:25:26 +08:00
parent 12228e7d09
commit 381632dc9d
22 changed files with 1165 additions and 865 deletions

View File

@ -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,7 +210,7 @@
getWxChatCode() {
const code = this.$route.query.code
getWeChatOpenId(code).then(res => {
if(res.data){
if (res.data) {
this.$store.commit("SET_OPENID", res.data);
}
})

View File

@ -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
});
}

View File

@ -88,8 +88,9 @@
},
function(res) {
if (res.err_msg == "get_brand_wcpay_request:ok") {
// 使,
//res.err_msgok
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({

View File

@ -10,6 +10,8 @@ module.exports = {
OPEN_ID: 'OPEN_ID',
//用户信息
USER_INFO: 'USER_INFO',
//租户信息
TENANT_INFO: 'TENANT_INFO',
//token 过期时间
EXPIRES_TIME: 'EXPIRES_TIME',
//微信授权

View File

@ -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": "我的"
}

View File

@ -6,8 +6,7 @@
<view class="head pad30">
<view class="user-card">
<view class="user-info">
<image class="avatar" :src='userInfo.avatar' v-if="userInfo.avatar && uid"
@click="goEdit()"></image>
<image class="avatar" :src='userInfo.avatar' v-if="userInfo.avatar && uid" @click="goEdit()"></image>
<image v-else class="avatar" src="/static/images/f.png" mode="" @click="goEdit()"></image>
<view class="info">
<view class="name" v-if="!uid" @tap="openAuto">
@ -23,8 +22,8 @@
</view>
<view class="num" v-if="userInfo.mobile && uid" @click="goEdit()">
<view class="num-txt">{{userInfo.mobile}}</view>
<view class="icon">
<image src="/static/images/edit.png" mode=""></image>
<view class="icon-setting">
<u-icon name="setting" color="#000" size="36"></u-icon>
</view>
</view>
<view class="phone" v-if="!userInfo.mobile && isLogin" @tap="bindPhone"></view>
@ -36,10 +35,10 @@
class="num">{{userInfo.nowMoney && uid ?Number(userInfo.nowMoney).toFixed(2):0}}</text>
<view class="txt">余额</view>
</view> -->
<view class="num-item" @click="goMenuPage('/pages/users/user_integral/index')">
<!-- <view class="num-item" @click="goMenuPage('/pages/users/user_integral/index')">
<text class="num">{{userInfo.integral && uid ? userInfo.integral: 0}}</text>
<view class="txt">积分</view>
</view>
</view> -->
<!-- <view class="num-item" @click="goMenuPage('/pages/users/user_coupon/index')">
<text class="num">{{userInfo.couponCount && uid ? userInfo.couponCount : 0}}</text>
<view class="txt">优惠券</view>
@ -53,10 +52,9 @@
</view>
<view class="order-wrapper">
<view class="order-hd flex">
<view class="left">订单中心</view>
<navigator class="right flex" hover-class="none" url="/pages/users/order_list/index"
open-type="navigate">
查看全部
<view class="left">我的商品订单</view>
<navigator class="right flex" hover-class="none" url="/pages/users/order_list/index" open-type="navigate">
全部订单
<text class="iconfont icon-xiangyou"></text>
</navigator>
</view>
@ -88,36 +86,23 @@
<!-- 会员菜单 -->
<view class="user-menus" style="margin-top: 20rpx;">
<view class="menu-title">我的服务</view>
<view class="list-box">
<block v-for="(item,index) in MyMenus" :key="index">
<!-- <navigator class="item" :url="item.url" hover-class="none"
v-if="!(item.url =='/pages/service/index' || (item.url =='/pages/users/user_spread_user/index' && !userInfo.isPromoter))">
<image :src="item.pic"></image>
<text>{{item.name}}</text>
</navigator> -->
<navigator class="item" :url="item.url" hover-class="none"
v-if="!(item.url =='/pages/users/user_spread_user/index' && userInfo.userType !== 'PROMOTER')"
>
<image :src="item.pic"></image>
<text>{{item.name}}</text>
</navigator>
</block>
<!-- #ifndef MP -->
<view class="item" @click="kefuClick">
<image :src="servicePic"></image>
<text>联系客服</text>
<!-- <view class="menu-title">我的服务</view> -->
<u-cell-group>
<u-cell title="收货地址" isLink @click="jumpPage('/pages/users/user_address_list/index')">
<u-icon slot="icon" size="32" name="map"></u-icon>
</u-cell>
<u-cell title="分销中心" v-if="userInfo.userType === 'PROMOTER'" isLink
@click="jumpPage('/pages/users/user_spread_user/index')">
<u-icon slot="icon" size="32" name="map"></u-icon>
</u-cell>
<u-cell title="热线电话" value="023-12948338" :value="tenantInfo.serviceMobile" isLink>
<u-icon slot="icon" size="32" name="phone"></u-icon>
</u-cell>
<u-cell title="在线客服" value="8:30-17:30" :value="tenantInfo.serviceTime" isLink @click="kefuClick">
<u-icon slot="icon" size="32" name="kefu-ermai"></u-icon>
</u-cell>
</u-cell-group>
</view>
<!-- #endif -->
<!-- #ifdef MP -->
<button class="item" open-type='contact' hover-class='none'>
<image :src="servicePic"></image>
<text>联系客服</text>
</button>
<!-- #endif -->
</view>
</view>
<image src="/static/images/support.png" alt="" class='support'>
<view class="uni-p-b-98"></view>
</view>
@ -131,12 +116,24 @@
<script>
let sysHeight = uni.getSystemInfoSync().statusBarHeight + 'px';
import Cache from '@/utils/cache';
import {BACK_URL} from '@/config/cache';
import {getMenuList} from '@/api/user.js';
import {orderData} from '@/api/order.js';
import {toLogin} from '@/libs/login.js';
import {getCity} from '@/api/api.js';
import {mapGetters} from "vuex";
import {
BACK_URL
} from '@/config/cache';
import {
getMenuList
} from '@/api/user.js';
import {
orderData
} from '@/api/order.js';
import {
toLogin
} from '@/libs/login.js';
import {
getCity
} from '@/api/api.js';
import {
mapGetters
} from "vuex";
// #ifdef H5
import Auth from '@/libs/wechat';
// #endif
@ -150,7 +147,7 @@
authorize
// #endif
},
computed: mapGetters(['isLogin', 'chatUrl', 'userInfo', 'uid']),
computed: mapGetters(['isLogin', 'chatUrl', 'userInfo', 'uid', 'tenantInfo']),
data() {
return {
orderMenu: [{
@ -173,7 +170,7 @@
},
{
img: '/static/images/order4.png',
title: '待评价',
title: '已完成',
url: '/pages/users/order_list/index?status=3',
num: 0
},
@ -193,8 +190,7 @@
isAuto: false, //
isShowAuth: false, //
orderStatusNum: {},
MyMenus: [
{
MyMenus: [{
pic: '/static/images/address.png',
url: '/pages/users/user_address_list/index',
name: '收货地址'
@ -250,17 +246,18 @@
}
},
methods: {
// 访
// setVisit(){
// setVisit({
// url:'/pages/user/index'
// }).then(res=>{})
// },
navito(e) {
window.location.href = 'https://' + e;
},
jumpPage(url) {
uni.navigateTo({
url: url
})
},
kefuClick() {
location.href = this.chatUrl;
if (tenantInfo.wxKfUrl) {
location.href = tenantInfo.wxKfUrl
}
},
getOrderData() {
let that = this;
@ -369,13 +366,16 @@
position: absolute;
left: 0;
top: 0;
width:100%;
height: 420rpx;
background-image: url('~@/static/images/user_bg.png');
background-repeat: no-repeat;
background-size: 100% 100%;
width: 100%;
height: 616rpx;
background: linear-gradient(0deg, #F94B78 0%, #FFD35C 100%);
opacity: 0.18;
z-index: 0
}
.contenBox {
position: relative;
z-index: 9;
padding: 0 30rpx;
}
@ -408,7 +408,7 @@
}
.head {
background: linear-gradient(360deg, rgba(255, 121, 49, 0) 0%, rgba(248, 74, 29, 0.82) 39%, #E93323 100%);
// background: linear-gradient(360deg, rgba(255, 121, 49, 0) 0%, rgba(248, 74, 29, 0.82) 39%, #E93323 100%);
// padding: 0 30rpx;
.user-card {
@ -416,6 +416,7 @@
width: 100%;
margin: 0 auto;
padding: 35rpx 0 30rpx 0;
.user-info {
z-index: 20;
position: relative;
@ -425,6 +426,7 @@
width: 120rpx;
height: 120rpx;
border-radius: 50%;
border: 2px solid #fff;
}
.info {
@ -438,8 +440,8 @@
.name {
display: flex;
align-items: center;
color: #fff;
font-size: 31rpx;
color: #000;
font-size: 35rpx;
.vip {
display: flex;
@ -461,7 +463,13 @@
display: flex;
align-items: center;
font-size: 26rpx;
color: rgba(255, 255, 255, 0.6);
color: #000;
.icon-setting {
position: absolute;
top: 44rpx;
right: 28rpx;
}
image {
width: 22rpx;

View File

@ -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%);

View File

@ -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" />
<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>
</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;
}
}
}
}
}

View File

@ -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>

View File

@ -1,33 +1,30 @@
<template>
<div class="register absolute">
<div class="shading">
<div class="pictrue acea-row row-center-wrapper">
<image src="../../../static/images/logo2.png" />
</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="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" />
<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"></image>
<input type="text" placeholder="填写验证码" class="codeIput" v-model="captcha" />
<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>
<div class="item">
<div class="acea-row row-middle">
<image src="/static/images/code_2.png"></image>
<input type="password" placeholder="填写您的新密码" v-model="password" />
<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">
@ -38,8 +35,8 @@
</div>
</div>
<div class="logon" @click="registerReset"></div>
<div class="tip">
<span class="font-color-red" @click="back"></span>
<div class="tips">
<span @click="back"></span>
</div>
</div>
<div class="bottom"></div>
@ -137,9 +134,113 @@
}
};
</script>
<style scoped>
<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>

Binary file not shown.

After

Width:  |  Height:  |  Size: 272 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

View File

@ -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,

View File

@ -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);