Commit 41cc903e by sunchao

一些bug修复&重置密码页面重写

parent 50df2ead
......@@ -156,6 +156,10 @@
font-size: 30rpx;
z-index: 1;
position: absolute;
top: 30rpx;
left: 20rpx;
width: 50rpx;
height: 50rpx;
text-align: center;
line-height: 50rpx;
}
</style>
......@@ -350,5 +350,9 @@ export default {
//微信认证
wxAuthorize(params){
return request(`${baseURL}/api/pay/wxAuthorize`, "POST", params)
},
//验证验证码是否正确
verification(params){
return request(`${cffpURL}/user/verification`, "POST", params)
}
}
......@@ -155,7 +155,6 @@
}
api.loginVerification(params).then((res)=>{
if(res['success']){
console.log(1)
this.userId = String(res['data']['userId']);
uni.setStorageSync('isLogin','1');
uni.setStorageSync('cffp_userId',this.userId);
......@@ -163,14 +162,10 @@
// uni.navigateTo({
// url:'/pages/index/index'
// })
console.log(2)
// uni.switchTab({
// url: '/pages/courselist/courselist'
// })
console.log(uni.getStorageSync('cffp_userId'))
uni.switchTab({
url:'/pages/index/index'
})
console.log(3)
}else{
uni.showToast({
title: res['message'],
......
<template>
<view class="vcode-input-body">
<text class="vcode-input-item"
:class="isBorderLine?'vcode-input-line':'vcode-input-border'"
v-for="(v,index) in sum"
:key="index"
@tap.stop="setFocus"
:style="{
borderColor:text.length===index&&focus?borderActiveColor:(text.length>index?borderValueColor:borderColor),
color:text.length>index?borderValueColor:borderColor
}"
>{{text[index]}}</text>
<view class="hidden-input">
<input
type="number"
:show-confirm-bar="false"
auto-blur
:cursor="99"
:focus="focus"
:maxlength="sum"
v-model="value"
@blur="setBlur"
@focus="setFocus"
:password="isPassword"
placeholder="验证码"/>
</view>
</view>
</template>
<script>
/**
* vcode-input 验证码输入框
* @description 验证码输入框。
* @property {Boolean} autofocus 自动获取焦点
* @property {Number} sum 验证码长度
* @property {Boolean} isBorderLine 显示的输入框的样式
* @property {String} borderColor 输入框未输入边框颜色
* @property {String} borderValueColor 输入框已输入边框颜色
* @property {String} borderActiveColor 输入框选中边框颜色
* @property {Boolean} isAutoComplete 当输入长度达到sum规定时才回调
* @property {Boolean} isPassword 是否为密文输入
* @example <vcode-input ref="VcodeInput" @vcodeInput="vcodeInput"></vcode-input>
*/
export default {
name:'vcode-input',
props: {
autofocus:{
type: Boolean,
default: true
},
sum:{
type: Number,
default: 6
},
isBorderLine:{
type:Boolean,
default:false
},
borderColor:{
type:String,
default:'#DADADA'
},
borderValueColor:{
type:String,
default:'#424456'
},
borderActiveColor:{
type:String,
default:'#FF6B00'
},
isAutoComplete:{
type: Boolean,
default: true
},
isPassword:{
type: Boolean,
default: false
}
},
data() {
return {
focus:false,
text:[],
value:'',
};
},
watch:{
value(value,oldVal){
if(this.isAutoComplete){
if(value.length>=this.sum){
this.setBlur();
this.$emit('vcodeInput', value);
}
}else{
this.$emit('vcodeInput', value);
}
if(this.isPassword){
let val='';
for (let i = 0; i < value.length; i++) {
val+='●';
}
this.text=val;
}else{
if(value){
this.text=value.split("");
}else{
this.text=[];
}
}
}
},
mounted() {
this.$nextTick(() => {
this.initInput()
})
},
methods:{
initInput(){
if(this.autofocus)
this.focus=true;
},
setBlur(){
uni.hideKeyboard();
this.$nextTick(() => {
this.focus=false;
})
},
setFocus(){
this.focus=true;
},
clearValue(){
this.setBlur();
this.value='';
this.text=[];
this.$forceUpdate();
}
}
}
</script>
<style lang="scss">
.vcode-input-body{
margin-left: -36rpx;
margin-right: -36rpx;
position: relative;
overflow: hidden;
/* #ifndef APP-NVUE */
display: flex;
/* #endif */
flex-direction: row;
justify-content: center;
align-items: center;
}
.vcode-input-item{
width: 76rpx;
height: 76rpx;
margin-left: 12rpx;
margin-right: 12rpx;
line-height: 76rpx;
text-align: center;
font-weight: 500;
}
.vcode-input-border{
border-style: solid;
border-width: 2rpx;
border-color: $uni-border-color;
border-radius: 4rpx;
}
.vcode-input-line{
border-bottom-style: solid;
border-bottom-width: 2rpx;
border-color: $uni-border-color;
}
.hidden-input{
width: 1px;
height: 1px;
position: absolute;
left: -1px;
top: -1px;
overflow: hidden;
}
</style>
{
"id": "pyh-rdtpicker",
"name": "日期区间picker",
"version": "1.0.7",
"description": "日期区间选择组件,可选粒度,可自定义主题",
"id": "vcode-input",
"name": "验证码输入框",
"version": "2.0",
"description": "验证码输入框,密码输入框",
"keywords": [
"日期",
"区间",
"时间",
"组件",
"选择"
"验证码输入框",
"支付密码输入框"
],
"displayName": "验证码输入框",
"dcloudext": {
"category": [
"前端组件",
"通用组件"
]
},
"dependencies": {
"echarts": "^5.4.1",
"nanoid": "^4.0.0",
"vue-signature-pad": "^3.0.2"
}
}
}
\ No newline at end of file
......@@ -345,6 +345,14 @@
},
{
"path": "pages/personalCenter/accountoperation/confirmResetpassword",
"style": {
"navigationBarTitleText": "重置密码",
"enablePullDownRefresh": false
}
},
{
"path": "pages/personalCenter/accountoperation/aboutcffp",
"style": {
"navigationBarTitleText": "关于我",
......
......@@ -82,8 +82,6 @@
font-size: 30rpx;
z-index: 1;
position: absolute;
top: 30rpx;
left: 20rpx;
}
text:nth-child(2){
width: 100%;
......
......@@ -74,8 +74,6 @@
font-size: 30rpx;
z-index: 1;
position: absolute;
top: 30rpx;
left: 20rpx;
}
text:nth-child(2){
width: 100%;
......
<template>
<view class="wrapper">
<text class="iconfont icon-youjiantou zuojiantou" @click="goBack()" style="left: 20rpx;"></text>
<text class="iconfont icon-youjiantou zuojiantou" @click="goBack()" style="top: 20rpx;"></text>
<view class="" style="margin-top: 40rpx;">
查询类型
</view>
......@@ -157,7 +157,7 @@
text-align: center;
border-radius: 40rpx;
position: absolute;
bottom: 0;
bottom: 30rpx;
left: 0;
right: 0;
}
......
<template>
<view class="container" style="padding-top: 50rpx;background: #fff;">
<view class="container" style="padding-top: 60rpx;background: #fff;">
<text class="iconfont icon-youjiantou zuojiantou" @click="goBack()" style="left: 20rpx;"
:style="{top:queryType==1? '16rpx':'-10rpx'}"></text>
<view class="others" v-if="queryType == 2">
......@@ -12,14 +12,12 @@
</view>
</view>
<view class="certifyListContent" v-if="userCertificates?.length>0">
<view class="certifyListContent" v-if="userCertificates.length>0">
<view class="certifyInfoItem" v-for="item in userCertificates" :key="item.cerNo" @click="previewImg(item)">
<h4>{{item.cerName}}</h4>
<view class="certifyImgBox">
<image :src="item.cerUrl" alt="" srcset="" mode="widthFix"></image>
<view>认证编号:{{item.authenticationCode}}</view>
<view>有效期至:{{dateFormat(item.endDate)}}</view>
</view>
<view class="certifyInfoItem" v-for="item in userCertificates" :key="item.cerNo" @click="previewImg(item)">
<h4>{{item.cerName}}</h4>
<view class="certifyImgBox">
<image :src="item.cerUrl" alt="" srcset="" mode="widthFix"></image>
<view>认证编号:{{item.authenticationCode}}</view>
<view v-if="item.cerCode=='CFFP-003'">有效期至:{{dateFormat(item.endDate)}}</view>
</view>
</view>
</view>
......@@ -40,7 +38,8 @@
userName:null,
authenticationCode:null,
queryType:null,
userCertificates:[]
userCertificates:[],
cerCode:null
}
},
components:{},
......@@ -48,6 +47,7 @@
this.userName = options.userName;
this.authenticationCode = options.authenticationCode;
this.queryType = options.queryType;
this.cerCode = options.cerCode;
this.getResult();
},
methods:{
......@@ -84,7 +84,16 @@
}
api.userCertificateResult(param).then((res)=>{
if(res['success']){
this.userCertificates = res['data']['userCertificates'];
if(res['data']['userCertificates']){
if(this.cerCode){
this.userCertificates = res['data']['userCertificates'].filter((item,idx)=>{
return item.cerCode == this.cerCode
});
}else{
this.userCertificates = res['data']['userCertificates'];
}
}
}else{
uni.showToast({
title: res['message'],
......
......@@ -123,7 +123,20 @@
},
getDetail(){
if(this.status != 1 && this.status != 3 &&this.status !== null){
this.registerNow()
if(uni.getStorageSync('loginType')=='visitor'){
uni.redirectTo({
url:'/components/login/login'
})
try {
uni.clearStorageSync();
} catch (e) {
// console.log(e)
// error
}
return false
}else{
this.registerNow()
}
}else {
this.uploadinfo()
}
......
......@@ -168,6 +168,7 @@
},
onLoad() {
if (uni.getStorageSync('isLogin')) {
console.log('游客登录')
this.queryAreaCenterInfo();
this.announcementQuery();
} else {
......@@ -176,7 +177,6 @@
})
}
this.courseList()
},
onShow() {
let loginType = uni.getStorageSync('loginType')
......@@ -428,7 +428,15 @@
}
}
}
.ulBox{
flex-direction: column;
}
.liBox{
background-color: #fff;
border-radius: 20rpx;
margin-bottom: 10rpx;
padding: 10rpx;
}
.description {
padding: 40rpx;
}
......
<template>
<view class="container">
<view class="top">
<text class="iconfont icon-youjiantou zuojiantou" @click="goBack()" style="left: 20rpx;"></text>
<text class="iconfont icon-youjiantou zuojiantou" @click="goBack()" style="top: 20rpx;"></text>
<image src="../../static/certifyProcess/learnCertifyBanner.png" mode="widthFix"></image>
</view>
<view class="certify_content">
......@@ -113,14 +113,9 @@
},
methods: {
goBack() {
let back = getCurrentPages();
if (back && back.length > 1) {
uni.navigateBack({
delta: 1
});
} else {
history.back();
}
uni.navigateBack({
delta: 1
});
},
getLearnCertifyList() {
api.queryCertificateList({
......@@ -142,7 +137,7 @@
//2通过跳到证书页,1跳到证书详情
if (certifyItem.isAdopt == 3) {
uni.navigateTo({
url: `../authentication-query/authentication-result?queryType=1`
url: `../authentication-query/authentication-result?queryType=1&cerCode=${certifyItem.cerCode}`
})
} else {
let certificateId = certifyItem.isAdopt != 1 ? certifyItem.certificateId : null
......
......@@ -21,19 +21,24 @@
<h4>精品课程</h4>
<view v-if="this.isRedirect == 1" @click="goToCourselist()">更多<text class="iconfont icon-youjiantou"></text></view>
</view>
<courselist :tagIds="[1111]" :onlyShowList="0"></courselist>
<view class="ulBox" v-if="cffpCourseInfos.length>0">
<view class="liBox" v-for="item in cffpCourseInfos" :key="item.fileId" @click="goDetail(item)">
<course-item :thumbnailPath="item.displayImage" :title="item.fileTitle" :summaryBox="item.fileSynopsis" :dataList="{coursePrice:item.coursePrice,salesNumber:item.salesNumber}" :tagList="{v1:item.fileLecturerRanks,v2:item.fileLecturerName}"></course-item>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
import courselist from '@/pages/courselist/courselist.vue';
import api from "@/api/api";
import courseItem from "@/components/courseItem/courseItem.vue";
export default {
components:{courselist},
components:{courseItem},
data() {
return {
cffpCourseInfos:[],
fileId:'',
orderId:'',
orderStatus:'2',
......@@ -42,6 +47,22 @@
};
},
methods:{
courseList(){
const param = {
queryName:this.queryName
}
api.courseList(param).then(res=>{
if(res['success']){
this.cffpCourseInfos = res['data']['data'];
}else{
uni.showToast({
title: res['message'],
duration: 2000,
icon: 'none'
})
}
})
},
viewDetail(){
// 查看详情
uni.navigateTo({
......@@ -64,6 +85,11 @@
uni.switchTab({
url:'/pages/index/index'
})
},
goDetail(item){
uni.navigateTo({
url: `/pages/courseDetail/courseDetail?fileId=${item.fileId}`
});
}
},
onLoad(options) {
......@@ -75,11 +101,21 @@
this.orderId = options.orderId;
this.orderStatus = options.orderStatus;
this.fileId = options.fileId;
this.courseList()
}
}
</script>
<style lang="scss">
.ulBox{
flex-direction: column;
}
.liBox{
background-color: #fff;
border-radius: 20rpx;
margin-bottom: 10rpx;
padding: 10rpx;
}
.statusBox{
padding: 30rpx 0;
background-color: #fff;
......
<template>
<view class="container">
<view class="top">
<text class="iconfont icon-youjiantou zuojiantou" @click="goBack()"></text>
<text>重置密码</text>
</view>
<view class="input-row">
<input type="text" placeholder="6-20位数字字母组合"/>
<input type="text" placeholder="再次确认"/>
</view>
<view class="forgetpsd">
<button class="primary log-btn" @click="resetPassword()">修改密码</button>
</view>
</view>
</template>
<script>
import api from "@/api/api";
export default{
data(){
return {
form:{
mobile: uni.getStorageSync('user_mobile'),
code:'',
password:'',
},
}
},
components:{},
onLoad(){
},
methods:{
resetPassword(){
const params = {
...this.form
}
if(!common.passwordValid(this.form.password)){
common.errorDialog(2,'请输入6-12位数字字母组合');
return false;
}
api.resetPassword(params).then((res)=>{
if(res['success']){
uni.showToast({
title: '密码重置成功,请重新登录',
duration: 5000,
icon: 'none'
})
uni.removeStorageSync('isLogin')
uni.redirectTo({
url:'/components/login/login'
})
//重置密码后需要密码登录
this.form = {
mobile:null,
code:null,
password:null,
}
}else{
uni.showToast({
title: res['message'],
duration: 2000,
icon: 'none'
})
}
})
},
},
mounted() {
}
}
</script>
<style lang="scss">
.top{
display: flex;
height: 80rpx;
justify-content: space-between;
align-items: center;
position: relative;
width: 100%;
margin: 0 auto 60rpx auto;
.zuojiantou{
display: inline-block;
transform: rotate(180deg);
font-size: 30rpx;
z-index: 1;
position: absolute;
}
text:nth-child(2){
width: 100%;
text-align: center;
position: absolute;
}
}
</style>
\ No newline at end of file
<template>
<view class="conent">
<view class="input-row">
<text>{{usermobile}}</text>
<view class="container">
<view class="top">
<text class="iconfont icon-youjiantou zuojiantou" @click="goBack()"></text>
<text>重置密码</text>
</view>
<view class="input-row">
<input maxlength="11" type="password" v-model="form.password" placeholder="请输入新密码" />
</view>
<view class="input-row">
<view style="width: 65%;"><input maxlength="11" type="text" v-model="form.code" placeholder="请输入验证码" /></view>
<view style="width: 30%;"><text v-if="codetimecode == false" style="font-size: 26upx;color: #3971E2;"
@click="sendMessage()">获取验证码</text>
<text v-else style="font-size: 26upx;margin-right: 20upx;color: #3971E2;">{{countdown}}秒后重新获取</text>
<view class="content">
<view class="item">
{{hideMoblie(usermobile)}}
</view>
<!-- <view class="input-row">
<input maxlength="11" type="password" v-model="form.password" placeholder="请输入新密码" />
</view>
<view class="input-row">
<view style="width: 65%;"><input maxlength="11" type="text" v-model="form.code" placeholder="请输入验证码" /></view>
<view style="width: 30%;"><text v-if="codetimecode == false" style="font-size: 26upx;color: #3971E2;"
@click="sendMessage()">获取验证码</text>
<text v-else style="font-size: 26upx;margin-right: 20upx;color: #3971E2;">{{countdown}}秒后重新获取</text>
</view>
</view> -->
<vcodeInput ref="VcodeInput" @vcodeInput="vcodeInput">
</vcodeInput>
<view class="send_btn" v-if="!confirmBtn">
<text v-if="codetimecode == false"
@click="sendMessage()">发送验证码</text>
<text v-else style="font-size: 26upx;margin-right: 20upx;color: #fff;">
{{countdown}}秒后重新获取
</text>
</view>
<view class="send_btn" v-if="confirmBtn" @click="nextPage()">
确定
</view>
</view>
<view class="forgetpsd"><button class="primary log-btn" @click="resetPassword()">修改密码</button></view>
<!-- <view class="forgetpsd"><button class="primary log-btn" @click="resetPassword()">修改密码</button></view> -->
</view>
</template>
......@@ -21,33 +40,57 @@
<script>
import common from '../../../common/common';
import api from "@/api/api";
import vcodeInput from "@/components/vcode-input/vcode-input";
export default {
data() {
return {
form:{
mobile: uni.getStorageSync('user_mobile'),
code:'',
password:'',
},
usermobile:uni.getStorageSync('user_mobile'),
code: '',
countdown: '60',
timer: null,
codetimecode: false
codetimecode: false,
confirmBtn:false
}
},
components:{
vcodeInput
},
destroyed() {
uni.hideToast();
},
methods: {
//验证码输入完成
vcodeInput(val) {
const param = {
mobile: this.usermobile,
code: val
}
api.verification(param).then((res)=>{
if(res['success']){
this.confirmBtn = true
}else{
uni.showToast({
title:res['message'],
icon:'none'
})
}
})
},
goBack() {
uni.navigateBack({
delta: 1
});
},
hideMoblie(str){
return str.substr(0,3) + "****" + str.substr(7)
},
sendMessage() {
const params = {
mobileNo: this.form.mobile,
mobileNo: this.usermobile,
type: "1"
}
if (common.mobileNoValid(this.form.mobile)) {
if (common.mobileNoValid(this.usermobile)) {
api.verificationCode(params).then((res) => {
console.log(res, 7788888)
if (res['success']) {
this.sendCode()
this.codetimecode = true
......@@ -55,46 +98,20 @@
title:'发送成功',
icon:'none'
})
}else{
uni.showToast({
title:res['message'],
icon:'none'
})
}
})
} else {
common.errorDialog(2, '手机号校验错误')
}
},
resetPassword(){
const params = {
...this.form
}
if(!common.passwordValid(this.form.password)){
common.errorDialog(2,'请输入6-12位数字字母组合');
return false;
}
api.resetPassword(params).then((res)=>{
if(res['success']){
uni.showToast({
title: '密码重置成功,请重新登录',
duration: 5000,
icon: 'none'
})
uni.removeStorageSync('isLogin')
uni.redirectTo({
url:'/components/login/login'
})
//重置密码后需要密码登录
this.form = {
mobile:null,
code:null,
password:null,
}
}else{
uni.showToast({
title: res['message'],
duration: 2000,
icon: 'none'
})
}
nextPage(){
uni.navigateTo({
url:'/pages/personalCenter/accountoperation/confirmResetpassword'
})
},
sendCode() {
......@@ -125,27 +142,60 @@
}
</script>
<style scoped>
<style lang="scss" scoped>
page {
background-color: RGBA(252, 252, 252, 1);
}
.conent {
width: 100vw;
overflow: hidden;
}
.input-row {
height: 100upx;
.top{
display: flex;
margin: 20upx 0;
align-items: center;
height: 80rpx;
justify-content: space-between;
padding: 0 20upx;
background: #FFFFFF;
border-bottom: 1upx solid #C8C7CC;
align-items: center;
position: relative;
width: 100%;
margin: 0 auto 60rpx auto;
.zuojiantou{
display: inline-block;
transform: rotate(180deg);
font-size: 30rpx;
z-index: 1;
position: absolute;
}
text:nth-child(2){
width: 100%;
text-align: center;
position: absolute;
}
}
// .input-row {
// height: 100upx;
// display: flex;
// margin: 20upx 0;
// align-items: center;
// justify-content: space-between;
// padding: 0 20upx;
// background: #FFFFFF;
// border-bottom: 1upx solid #C8C7CC;
// }
.content{
.item{
text-align: center;
font-size: 36rpx;
color: #333;
font-weight: 600;
margin-bottom: 40rpx;
}
.send_btn{
background: #20269B;
color: #fff;
height: 90rpx;
line-height: 90rpx;
width: 50%;
margin: 100rpx auto;
border-radius: 100rpx;
text-align: center;
}
}
.input-row-password {
height: 100upx;
display: flex;
......
......@@ -138,6 +138,7 @@
tabBar,
},
onShow() {
this.queryInfo();
let loginType = uni.getStorageSync('loginType')
if(loginType == "visitor" ){
this.loginornot = false
......@@ -248,8 +249,9 @@
},
// 查询个人资料
queryInfo(){
api.queryInfo({userId:this.userId}).then(res=>{
api.queryInfo({userId:uni.getStorageSync('cffp_userId')}).then(res=>{
if(res['success']){
console.log(res['data'])
this.customerBasicInfo = res['data'];
this.inviteEqrode = this.customerBasicInfo.invitationCode;
uni.setStorageSync('user_mobile', res.data.mobile)
......@@ -264,7 +266,7 @@
}
},
onLoad() {
this.queryInfo();
}
}
</script>
......
<template>
<view>
<view class="container">
<view class="top">
<text class="iconfont icon-youjiantou zuojiantou" @click="goBack()"></text>
<text>注销账号</text>
</view>
<view class="" style="text-align: center;font-size: 40rpx;">
<text>注销手机号:</text>
<text style="color: #20269B;">{{mobile}}</text>
<text style="color: #20269B;">{{hideMoblie(mobile)}}</text>
</view>
<view class="" style="margin: 40rpx;">
<text style="font-size: 28rpx;">注销账号后不可恢复,该账号绑定的所有权益、积分、记录等数据也将都被清空且无法恢复,包括:</text>
</view>
<view class="" style="margin: 20rpx 40rpx;color: #666666;">
<p>1.所有积分权益不可使用</p>
<p>2.已购买的课程无法观看</p>
<p>3.已获得认证的证书无法查看</p>
<p>4.学习数据将被清除</p>
</view>
<ul class="tips">
<li>所有积分权益不可使用</li>
<li>已购买的课程无法观看</li>
<li>已获得认证的证书无法查看</li>
<li>学习数据将被清除</li>
</ul>
<view class="footer" style="">
<view class="footer-cancelbtn" style="" @click="cancel()">
<text>取消</text>
</view>
<view class="footer-submitbtn" style="" @click="sunmit()">
<text>确认</text>
</view>
<view class="footer-cancelbtn" style="" @click="cancel()">
<text>取消</text>
</view>
</view>
</view>
</template>
......@@ -42,6 +45,14 @@
uni.hideToast();
},
methods: {
hideMoblie(str){
return str.substr(0,3) + "****" + str.substr(7)
},
goBack() {
uni.navigateBack({
delta: 1
});
},
cancel(){
uni.navigateBack({delta:1})
},
......@@ -63,6 +74,36 @@
</script>
<style lang="scss">
.container{
padding: 0 20rpx;
}
.top{
display: flex;
height: 80rpx;
justify-content: space-between;
align-items: center;
position: relative;
width: 100%;
margin: 0 auto 60rpx auto;
.zuojiantou{
display: inline-block;
transform: rotate(180deg);
font-size: 30rpx;
z-index: 1;
position: absolute;
}
text:nth-child(2){
width: 100%;
text-align: center;
position: absolute;
}
}
.tips{
color: #666666;
li{
margin: 20rpx auto;
}
}
.footer{
display: flex;justify-content: center;position: fixed;bottom: 40rpx;width: 100vw;
.footer-submitbtn{
......@@ -70,10 +111,9 @@
line-height: 80rpx;
width: 300rpx;
height: 80rpx;
border-radius: 20rpx;
border-radius: 40rpx;
margin: 0 40rpx;
color: #FFFFFF;
background-color: #20269B;
opacity: 1;
border: 2rpx solid #20269B;
}
......@@ -82,8 +122,10 @@
line-height: 80rpx;
width: 300rpx;
height: 80rpx;
border-radius: 20rpx;
border-radius: 40rpx;
margin: 0 40rpx;
color: #FFFFFF;
background-color: #20269B;
opacity: 1;
border: 2rpx solid #20269B;
}
......
<template>
<view class="container">
<view class="top">
<view class="iconfont icon-youjiantou" @click="goBack()">
<view class="iconfont icon-youjiantou zuojiantou" @click="goBack()">
</view>
<view style="width: 33%;text-align: right;">
<view style="width: 60%;text-align: right;">
消息列表
</view>
<view class="clear" @click="oneKeyRead()">
......@@ -65,7 +65,7 @@
})
},
goBack(){
uni.navigateTo({
uni.switchTab({
url:'../index/index'
})
},
......@@ -110,14 +110,7 @@
position: relative;
background: #fff;
padding-right: 20rpx;
.icon-youjiantou{
display: inline-block;
transform: rotate(180deg);
font-size: 30rpx;
width: 50rpx;
height: 50rpx;
z-index: 1;
}
.clear{
display: flex;
align-items: center;
......
<template>
<view class="top">
<text class="iconfont icon-youjiantou" @click="goBack()"></text>
<text class="iconfont icon-youjiantou zuojiantou" @click="goBack()"></text>
<text>消息详情</text>
</view>
<view class="announcement_detail_wrapper container">
......@@ -63,11 +63,8 @@
position: relative;
width: 95%;
margin: 0 auto;
.icon-youjiantou{
display: inline-block;
transform: rotate(180deg);
font-size: 30rpx;
z-index: 1;
.zuojiantou{
left: 0;
}
text:nth-child(2){
width: 100%;
......
......@@ -15,18 +15,18 @@ export const interceptor = () => {
// 当本地没有token,并且接口地址没在白名单内,需要重新获取token
if (!uni.getStorageSync('uni-token') && !whiteApiList.includes(args.url)) {
uni.request({
url: '/api/authorize/obtainToken',
method: 'POST',
data: { ticket: 'uni-app' },
success: (res) => {
if (res.statusCode === 200) {
uni.setStorageSync('uni-token', res.data['data']['token']);
window.location.href = window.location.href + '?' + 't_reload=' + new Date().getTime();
uni.request({
url: '/api/authorize/obtainToken',
method: 'POST',
data: { ticket: 'uni-app' },
success: (res) => {
if (res.statusCode === 200) {
uni.setStorageSync('uni-token', res.data['data']['token']);
window.location.href = window.location.href + '?' + 't_reload=' + new Date().getTime();
}
// console.log(res)
}
// console.log(res)
}
})
})
// uni.hideLoading();
}
// request 触发前拼接 url
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment