Commit 1c63d3fb by kyle

所有标签替换以及样式调整以及拦截器调整

parent 589c8b01
......@@ -20,11 +20,11 @@
height: 100%;
}
@font-face {font-family: 'iconfont';
src: url('iconfont.eot');
src: url('iconfont.eot?#iefix') format('embedded-opentype'),
url('iconfont.woff') format('woff'),
url('iconfont.ttf') format('truetype'),
url('iconfont.svg#iconfont') format('svg');
src: url('./static/font/iconfont.eot');
src: url('./static/font/iconfont.eot?#iefix') format('embedded-opentype'),
url('./static/font/iconfont.woff') format('woff'),
url('./static/font/iconfont.ttf') format('truetype'),
url('./static/font/iconfont.svg#iconfont') format('svg');
}
.iconfont{
font-family:"iconfont" !important;
......
......@@ -136,5 +136,9 @@ export default {
// 售后详情
userAfterSalesDtl(params){
return request(`${cffpURL}/course/userAfterSalesDtl`, "POST", params)
},
// 个人信息查询
queryInfo(params){
return request(`${cffpURL}/user/queryInfo`, "POST", params)
}
}
<template>
<view class="itemContent">
<view class="thumbnailBox">
<img :src="thumbnailPath" alt="">
<image :src="thumbnailPath" alt="" mode="widthFix"></image>
</view>
<view class="courseDetailBox">
<h4>{{title}}</h4>
......@@ -68,7 +68,7 @@
width: 200rpx;
height: 200rpx;
margin-right: 26rpx;
img{
image{
max-width: 100%;
height: auto;
}
......
<template>
<view class="wrapper">
<view class="logo">
<img :src="imgSrc" alt="logo" srcset="">
<image :src="imgSrc" alt="logo" srcset="" class="iconBox" mode="widthFix"></image>
<view>欢迎登录使用CFFP</view>
</view>
<view class="content">
......@@ -13,15 +13,13 @@
<input class="uni-input" name="invitationCode" placeholder="输入邀请码(非必填)" v-model="invitation_code"/>
</view>
<view class="inputItem" v-if="loginType!=='agentlogin'">
<input class="uni-input" name="mobileNo" placeholder="输入手机号" v-model="form.mobile" maxlength="11"
/>
<input class="uni-input" name="mobileNo" placeholder="输入手机号" v-model="form.mobile" maxlength="11"/>
</view>
<view class="inputItem" v-if="loginType==='agentlogin'">
<input class="uni-input" name="mobileNo" placeholder="输入账号" v-model="account" maxlength="11"
/>
<input class="uni-input" name="mobileNo" placeholder="输入账号" v-model="account" maxlength="11"/>
</view>
<view class="inputItem" v-if="loginType === 'codelogin' || loginType==='register' || loginType === 'resetpw'">
<input class="uni-input" name="code" placeholder="输入验证码" v-model="form.code" type="number" maxlength="6"/>
<input class="uni-input codeBtn" name="code" placeholder="输入验证码" v-model="form.code" type="number" maxlength="6"/>
<text @click="sendMessage()" :class="{'grey':disabledSendBtn}">{{sendCodeHtml}}</text>
</view>
<view class="inputItem" v-if="loginType === 'pwlogin' || loginType==='register' || loginType==='agentlogin'">
......@@ -46,8 +44,6 @@
</view>
<view class="login_btn" @click="loginInCheck()" v-if="loginType!='resetpw'">
{{loginType=='register'?'注册':'登录'}}
{{loginType}}
</view>
<view class="login_btn" v-if="loginType=='resetpw'" @click="loginInCheck()">
保存
......@@ -98,7 +94,7 @@
doublePassword:null,
agreeFlag:false,
userId:null,
imgSrc:'static/cffp_logo.jpg'
imgSrc:'../../static/cffp_logo.jpg'
}
},
methods: {
......@@ -336,8 +332,9 @@
margin-top: 40rpx;
font-size: 40rpx;
}
img{
.iconBox{
border-radius: 15rpx;
width: 20% !important;
}
}
.content{
......@@ -357,6 +354,9 @@
.inputItem{
position: relative;
margin-bottom: 30rpx;
.codeBtn{
width: 70%;
}
.uni-input{
height: 80rpx;
line-height: 80rpx;
......
......@@ -4,8 +4,8 @@
<view v-for="item in menuLists" :key="item.link" class="tabbar_item" :class="{'active':item.link == currentPage}"
@click="navTo(item,index)">
<view class="pic">
<img v-if="item.link == currentPage" :src="'../../static/tabbar/' + item.selectedIconPath + '.png'" >
<img v-else :src="'../../static/tabbar/' + item.iconPath + '.png'">
<image v-if="item.link == currentPage" :src="'/static/tabbar/' + item.selectedIconPath + '.png'" mode="widthFix"></image>
<image v-else :src="'/static/tabbar/' + item.iconPath + '.png'" mode="widthFix"></image>
</view>
<view class="name">{{item.name}}</view>
</view>
......@@ -68,9 +68,6 @@ import tabBarVue from './tabBar.vue';
.pic{
width: 70rpx;
margin: 0 auto;
img{
max-width: 100%;
}
}
.name{
text-align: center;
......
......@@ -18,7 +18,8 @@
},
/* 模块配置 */
"modules" : {
"Share" : {}
"Share" : {},
"Payment" : {}
},
/* 应用发布信息 */
"distribute" : {
......@@ -49,7 +50,17 @@
/* SDK配置 */
"sdkConfigs" : {
"share" : {},
"ad" : {}
"ad" : {},
"payment" : {
"alipay" : {
"__platform__" : [ "ios", "android" ]
},
"weixin" : {
"__platform__" : [ "ios", "android" ],
"appid" : "wxec09b9be6cff4eb3",
"UniversalLinks" : ""
}
}
}
}
},
......
<template>
<view class="container">
<ul>
<li v-for="item in userCourses" :key="item.orderId">
<view class="ulBox">
<view class="liBOx" v-for="item in userCourses" :key="item.orderId">
<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 class="statusBox">
<text>{{item.orderStatusName}}</text>
<text @click="goDetail(item)">查看详情></text>
</view>
</li>
</ul>
</view>
</view>
</view>
</template>
......@@ -54,9 +54,9 @@
<style lang="scss">
.container{
height: 100%;
ul{
.ulBox{
padding: 10rpx 20rpx;
li{
.liBox{
background-color: #fff;
margin-bottom: 20rpx;
padding: 18rpx 10rpx;
......
......@@ -4,24 +4,24 @@
{{certificateInfo.cerIntroduce}}
</view>
<view class="certifySignInfo">
<ul>
<li><text>报名时间:</text><text>{{certificateInfo.startDate}} - {{certificateInfo.endDate}}</text></li>
<li><text>考试费用:</text><text>{{certificateInfo.examinationPrice}}</text></li>
<li><text>培训费用:</text><text>{{certificateInfo.trainPrice}}</text></li>
<li><text>培训课程:</text><text>{{certificateInfo.courseName}}</text></li>
<li><text>培训方式:</text><text>{{certificateInfo.trainType == 1 ? '线上培训' : '/'}}</text></li>
<li><text>考试方式:</text><text>{{certificateInfo.examinationType == 1 ? '线上考试' : '/'}}</text></li>
<li><text>及格分数:</text><text>{{certificateInfo.passScore}}</text></li>
</ul>
<view class="ulBox">
<view class="liBox"><text>报名时间:</text><text>{{certificateInfo.startDate}} - {{certificateInfo.endDate}}</text></view>
<view class="liBox"><text>考试费用:</text><text>{{certificateInfo.examinationPrice}}</text></view>
<view class="liBox"><text>培训费用:</text><text>{{certificateInfo.trainPrice}}</text></view>
<view class="liBox"><text>培训课程:</text><text>{{certificateInfo.courseName}}</text></view>
<view class="liBox"><text>培训方式:</text><text>{{certificateInfo.trainType == 1 ? '线上培训' : '/'}}</text></view>
<view class="liBox"><text>考试方式:</text><text>{{certificateInfo.examinationType == 1 ? '线上考试' : '/'}}</text></view>
<view class="liBox"><text>及格分数:</text><text>{{certificateInfo.passScore}}</text></view>
</view>
<view class="eqrocdeContent">
<img :src="certificateInfo.wechatCodeUrl" alt="" srcset="">
<image :src="certificateInfo.wechatCodeUrl" alt="" srcset="" mode="widthFix"></image>
<text>请扫二维码进群学习~</text>
</view>
</view>
<!-- 荣誉证书 -->
<view class="certifyImgBox">
<h3>荣誉证书</h3>
<img :src="certificateInfo.cerUrl" alt="" srcset="">
<image :src="certificateInfo.cerUrl" alt="" srcset="" mode="widthFix"></image>
</view>
<!-- 考试计划 -->
<view class="examPlanning">
......@@ -38,44 +38,44 @@
<!-- 考试认证流程 -->
<view class="examProcessContainer">
<h3>考试认证流程</h3>
<ul>
<li>
<view class="ulBox">
<view class="liBox">
<view>
<img src="../../static/certifyProcess/onlineSign.png" alt="" srcset="">
<image src="../../static/certifyProcess/onlineSign.png" alt="" srcset="" mode="widthFix"></image>
</view>
<view>
<h4>线上报名</h4>
<view>点击右下方“立即报名”,提交信息,选择时间 并缴费后即可完成报名。</view>
</view>
</li>
<li>
</view>
<view class="liBox">
<view>
<img src="../../static/certifyProcess/onlineExam.png" alt="" srcset="">
<image src="../../static/certifyProcess/onlineExam.png" alt="" srcset="" mode="widthFix"></image>
</view>
<view>
<h4>线上考试</h4>
<view>考试必须在电脑端进行,通过浏览器访问考试链 接进行考试。电脑须配置摄像头设备用于考前人 脸和身份验证、考中监考等。考试前请确认设备 网络、摄像头可正常运行!</view>
</view>
</li>
<li>
</view>
<view class="liBox">
<view>
<img src="../../static/certifyProcess/getCertify.png" alt="" srcset="">
<image src="../../static/certifyProcess/getCertify.png" alt="" srcset="" mode="widthFix"></image>
</view>
<view>
<h4>获得证书</h4>
<view>考试分及格后,即可获得证书</view>
</view>
</li>
<li>
</view>
<view class="liBox">
<view>
<img src="../../static/certifyProcess/feedback.png" alt="" srcset="">
<image src="../../static/certifyProcess/feedback.png" alt="" srcset="" mode="widthFix"></image>
</view>
<view>
<h4>填写反馈</h4>
<view>培训完成后,请填写培训反馈,考试质量进行评估。</view>
</view>
</li>
</ul>
</view>
</view>
<!-- 报名按钮区域 -->
<view class="signBtnContent">
<view class="consultBtn">咨询客服</view>
......@@ -166,12 +166,12 @@
font-size: 32rpx;
margin-bottom: 30rpx;
}
li{
.liBox{
margin-bottom: 20rpx;
display: flex;
view{
img{
width: 40rpx;
image{
width: 40rpx !important;
height: 40rpx;
margin-right: 10rpx;
}
......
......@@ -35,8 +35,8 @@
<!-- 模块导航 -->
<view class="nav_wrapper">
<view class="nav_content" v-for="featureItem in featureLists" @click="featureSelect(featureItem)">
<view>
<img :src="'/static/moduleIcon/'+featureItem.icon + '.png'" alt="" srcset="">
<view style="width: 80rpx;">
<image :src="'/static/moduleIcon/'+featureItem.icon + '.png'" alt="" srcset="" mode="widthFix"></image>
</view>
<view>{{featureItem.name}}</view>
</view>
......@@ -92,7 +92,7 @@
announcementInfo:null,
messageUnreadCount:null,
tagIds:123,
currentPage:'index'
currentPage:'index',
}
},
components:{
......
<template>
<view class="container">
<view class="logo">
<img src="../../static/cffp_logo.jpg" alt="">
<image src="../../static/cffp_logo.jpg" alt="" mode="widthFix"></image>
<text>欢迎使用CFFP</text>
</view>
<view class="inviteInfo">
......@@ -37,7 +37,7 @@
border-radius: 30rpx;
overflow: hidden;
font-size: 40rpx;
img{
image{
margin-bottom: 20rpx;
width: 160rpx;
height: 160rpx;
......
......@@ -9,55 +9,55 @@
<view class="tabContent">
<!-- 基本信息 -->
<view v-if="tabType===1">
<ul>
<li>
<view class="ulBox">
<view class="liBox">
<text>姓名:</text>
<text><input class="uni-input" maxlength="15" placeholder="姓名" /></text>
</li>
<li>
</view>
<view class="liBox">
<text>手机号:</text>
<text><input class="uni-input" type="number" maxlength="11" placeholder="手机号" /></text>
</li>
<li>
</view>
<view class="liBox">
<text>申请身份:</text>
<text>
<picker @change="bindPickerChange" :value="applyIdentity" :range="identityArr">
<view class="uni-input">{{identityArr[applyIdentity]}}</view>
</picker>
</text>
</li>
<li>
</view>
<view class="liBox">
<text>所属组织:</text>
<text>XXXXXX</text>
</li>
</ul>
</view>
</view>
<share></share>
<button type="primary" plain="true" class="sendInvite" @click="uniShare">发出邀请</button>
</view>
<!-- 邀请信息 -->
<view class="inviteListsBox" v-if="tabType===2">
<ul class="listUl">
<li>
<view class="listUl ulBox">
<view class="liBox">
<text>姓名:</text>
<text></text>
</li>
<li>
</view>
<view class="liBox">
<text>手机号:</text>
<text></text>
</li>
<li>
</view>
<view class="liBox">
<text>申请身份:</text>
<text></text>
</li>
<li>
</view>
<view class="liBox">
<text>所属组织:</text>
<text></text>
</li>
<li>
</view>
<view class="liBox">
<text>邀请状态:</text>
<text></text>
</li>
</ul>
</view>
</view>
</view>
</view>
</view>
......@@ -137,7 +137,7 @@
}
.tabContent{
margin-top: 10rpx;
ul{
.ulBox{
width: 95%;
margin: 0 auto 20rpx;
padding: 0.3125rem 1.25rem;
......@@ -146,7 +146,7 @@
background-color: #fff;
box-sizing: border-box;
position: relative;
li{
.liBox{
border-bottom: 1px solid #F0F0F0;
height: 76rpx;
display: flex;
......
......@@ -31,7 +31,7 @@
<view class="certifyInfoItem" v-for="item in userCertificates" :key="item.cerNo">
<h4>{{item.cerName}}</h4>
<view class="certifyImgBox">
<img :src="item.cerUrl" alt="" srcset="">
<image :src="item.cerUrl" alt="" srcset="" mode="widthFix"></image>
<view>认证编号:{{item.authenticationCode}}</view>
<view>有效期至:{{item.endDate}}</view>
</view>
......@@ -160,7 +160,7 @@
display: flex;
flex-direction: column;
align-items: center;
img{
image{
max-width: 60%;
height: auto;
}
......
......@@ -14,7 +14,7 @@
<!-- 课程详情 -->
<view class="courseInfoContent" v-for="subItem in item.userStudyInfos" :key="subItem.fileId">
<view class="thumbnailBox">
<img :src="subItem.displayImage" alt="">
<image :src="subItem.displayImage" alt="" mode="widthFix"></image>
</view>
<view class="courseDetailBox">
<h4>{{subItem.fileTitle}}</h4>
......@@ -116,7 +116,7 @@
width: 200rpx;
height: 200rpx;
margin-right: 26rpx;
img{
image{
max-width: 100%;
height: auto;
}
......
<template>
<view class="container">
<view class="orderInfoContent">
<ul>
<li v-for="item in orderInfoList.filter(item=>item.pageArea===1)" :key="item.id">
<view class="ulBox">
<view v-for="item in orderInfoList.filter(item=>item.pageArea===1)" :key="item.id" class="liBox">
<text>{{item.name}}:</text>
<text :style="{color:item.color ? item.color : '#666'}">{{item.value}}</text>
</li>
</ul>
<ul>
<li v-for="item in orderInfoList.filter(item=>item.pageArea===2)" :key="item.id">
</view>
</view>
<view class="ulBox">
<view v-for="item in orderInfoList.filter(item=>item.pageArea===2)" :key="item.id" class="liBox">
<text>{{item.name}}:</text>
<text :style="{color:item.color ? item.color : '#666'}">{{item.value}}</text>
</li>
</ul>
</view>
</view>
</view>
</view>
</template>
......@@ -77,11 +77,11 @@
.container{
height: 100%;
.orderInfoContent{
ul{
.ulBox{
background-color: #fff;
margin: 20rpx 22rpx;
padding: 20rpx;
li{
.liBox{
margin-bottom: 20rpx;
display: flex;
justify-content: space-between;
......
......@@ -3,7 +3,7 @@
<!-- 头部信息 -->
<view class="basicInfoBox">
<view class="avatar">
<img src="/static/cffp_logo.jpg" alt="" srcset="">
<image src="/static/cffp_logo.jpg" alt="" srcset="" mode="widthFix"></image>
</view>
<view class="infoBox">
<view class="firstLineBox">
......@@ -26,7 +26,7 @@
<h4>{{mainMenu.categoryName}}</h4>
<view class="menuItemBox">
<view class="mainMenuItem" v-for="menuItem in mainMenu.children.filter(v=>v.isShow)" :key="menuItem.title" @click="goDetail(menuItem)">
<img :src="'/static/moduleIcon/'+menuItem.icon+'.png'" alt="" srcset="">
<image :src="'/static/moduleIcon/'+menuItem.icon+'.png'" alt="" srcset="" mode="widthFix"></image>
<text>{{menuItem.title}}</text>
</view>
</view>
......@@ -35,17 +35,17 @@
</view>
<!-- 个人信息 -->
<view class="personalInfo">
<ul>
<li v-for="item in minorMenuLists.filter(v=>v.isShow)" :key="item.title" @click="goDetail(item)">
<view class="ulBox">
<view v-for="item in minorMenuLists.filter(v=>v.isShow)" :key="item.title" @click="goDetail(item)" class="liBox">
<view class="infoBox">
<img :src="'/static/moduleIcon/'+item.icon+'.png'" alt="" srcset="">
<image :src="'/static/moduleIcon/'+item.icon+'.png'" alt="" srcset="" mode="widthFix"></image>
<text>{{item.title}}</text>
</view>
<view class="iconBox">
<i class="iconfont icon-youjiantou"></i>
</view>
</li>
</ul>
</view>
</view>
</view>
<tabBar :currentPage="currentPage"></tabBar>
<!-- 我的邀请码 -->
......@@ -74,9 +74,11 @@
<script>
import common from "../../common/common";
import tabBar from '../../components/tabBar/tabBar.vue';
import api from "@/api/api";
export default {
data() {
return {
userId:'1',
inviteEqrode:'XXXXXXX',
currentPage:'personalCenter',
customerBasicInfo:{},
......@@ -116,10 +118,11 @@
],
minorMenuLists:[
{title:'我的邀请码',icon:'shareEcode',link:'',isOpen:true,isShow:true},
{title:'我的卡包',icon:'card',link:'',isOpen:true,isShow:true},
{title:'我的卡包',icon:'card',link:'',isOpen:true,isShow:false},
{title:'我的认证',icon:'myCertify',link:'/pages/myCertify/myCertify',isOpen:true,isShow:true},
{title:'申请修改公司周边',icon:'message',link:'',isOpen:true,isShow:true},
{title:'我的消息',icon:'message',link:'',isOpen:true,isShow:true},
{title:'系统设置',icon:'setting',link:'',isOpen:true,isShow:true}
{title:'系统设置',icon:'setting',link:'',isOpen:true,isShow:false}
]
}
......@@ -157,7 +160,18 @@
console.log('success');
}
});
},
// 查询个人资料
queryInfo(){
api.queryInfo({userId:this.userId}).then(res=>{
if(res['success']){
console.log(res)
}
})
}
},
onLoad() {
this.queryInfo();
}
}
</script>
......@@ -237,7 +251,7 @@
align-items: center;
max-width: 20%;
flex: 1;
img{
image{
width: 80rpx;
}
text{
......@@ -252,9 +266,9 @@
background: #fff;
width: 95%;
margin: 6rpx auto 0;
ul{
.ulBox{
padding: 0 30rpx;
li{
.liBox{
display: flex;
align-items: center;
justify-content: space-between;
......@@ -263,8 +277,8 @@
.infoBox{
display: flex;
align-items: center;
img{
width: 52rpx;
image{
width: 52rpx !important;
height: 52rpx;
}
}
......
import api from "../api/api";
// import {baseURL,apiURL,cffpURL} from "../environments/environment";
// 白名单,不需要携带token就允许被访问的接口
const whiteApiList = [`/api/authorize/obtainToken`,`/api/authorize/checkToken`]
const whiteApiList = [`/api/authorize/obtainToken`,`/api/authorize/checkToken`];
export const interceptor = () => {
uni.addInterceptor('request', {
......@@ -14,13 +11,12 @@ export const interceptor = () => {
// 加载loading
uni.showLoading({
title: '加载中...'
})
});
// 当本地没有token,并且接口地址没在白名单内,需要重新获取token
if (!uni.getStorageSync('uni-token') && !whiteApiList.includes(args.url)) {
console.log('-----------')
return new Promise((resolve, reject)=>{
uni.request({
url: '/api/authorize/obtainToken',
url: 'https://mdev.zuihuibi.cn/api/authorize/obtainToken',
method:'POST',
data:{ticket: 'uni-app'},
success: (res) => {
......@@ -29,35 +25,31 @@ export const interceptor = () => {
window.location.href = window.location.href + '?' + 't_reload=' + new Date().getTime();
}
// console.log(res)
},fail(err) {
reject(err);
},
})
uni.hideLoading()
return false
}
})
uni.hideLoading();
}
// request 触发前拼接 url
//设置请求头及token
args.header = {
'content-type': args.method === 'POST' ? 'application/json' : 'application/x-www-form-urlencoded',
'X-Authorization': uni.getStorageSync('uni-token')
'X-Authorization': uni.getStorageSync('uni-token') ? uni.getStorageSync('uni-token') : ''
}
// console.log(args.header)
},
// 响应拦截器,可以对数据进行预处理
success(args) {
success() {
uni.hideLoading()
// console.log(args);
},
fail(err) {
fail() {
// console.log('interceptor-fail', err)
// console.log('请求失败')
uni.hideLoading()
},
complete(res) {
complete() {
uni.hideLoading()
}
})
......
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