mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-mobile.git
synced 2025-12-10 03:16:45 +08:00
Merge branch 'master' into dev
This commit is contained in:
@@ -189,7 +189,7 @@
|
||||
<view >
|
||||
<uni-load-more :status="loadStatus"></uni-load-more>
|
||||
</view>
|
||||
<u-overlay :show="signInShow">
|
||||
<!-- <u-overlay :show="signInShow">
|
||||
<view style="padding-top: 180upx;">
|
||||
<view style="margin-top: 180upx;width:624upx;margin: 0px auto;position: relative;">
|
||||
<img usemap="#HotMap" src="/mobile/static/images/dlg.png" style="width:624upx;height: 864upx;">
|
||||
@@ -197,7 +197,8 @@
|
||||
<mapelement></mapelement>
|
||||
</view>
|
||||
</view>
|
||||
</u-overlay>
|
||||
</u-overlay> -->
|
||||
<gonggao></gonggao>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
@@ -212,6 +213,7 @@
|
||||
import apiMessage from '@/api/system/message.js'
|
||||
import {toScore} from '@/utils/tools.js'
|
||||
import apiBoeCourse from '@/api/boe/course.js'
|
||||
import gonggao from '@/components/gonggao/index.vue'
|
||||
export default {
|
||||
data(){
|
||||
return {
|
||||
@@ -281,6 +283,7 @@
|
||||
this.countNoReadMsg();
|
||||
},
|
||||
components:{
|
||||
gonggao,
|
||||
'mapelement': {
|
||||
render: function(createElement) {
|
||||
|
||||
|
||||
@@ -30,38 +30,54 @@
|
||||
window.open(this.$config.loginPath)
|
||||
// #endif
|
||||
}else{
|
||||
console.log('获取用户信息');
|
||||
apiLogin.boeLogin(token).then(rs=>{
|
||||
if(rs.status==200){
|
||||
console.log('获取用户信息成功');
|
||||
//setToken(rs.result.access_token);
|
||||
//加载用户信息
|
||||
this.$store.dispatch("InitData").then(res => {
|
||||
//console.log(res)
|
||||
//this.$watermark.set(res.result.name + res.result.loginName);
|
||||
// uni.switchTab({
|
||||
// url:'/pages/index/index'
|
||||
// })
|
||||
uni.setStorageSync("boe_new_login",1);//记录新登录
|
||||
let openUrl=$this.toUrl;
|
||||
if(openUrl){
|
||||
if(openUrl.startsWith('http')){
|
||||
location.href=openUrl
|
||||
}else{
|
||||
if(openUrl=='/pages/index/index' || openUrl=='/pages/study/index' || openUrl=='/pages/plus/index' || openUrl=='/pages/my/index'){
|
||||
uni.switchTab({
|
||||
url:openUrl
|
||||
})
|
||||
this.$store.dispatch("InitData").then(res => {
|
||||
//console.log(res)
|
||||
//this.$watermark.set(res.result.name + res.result.loginName);
|
||||
// uni.switchTab({
|
||||
// url:'/pages/index/index'
|
||||
// })
|
||||
uni.setStorageSync("boe_new_login",1);//记录新登录
|
||||
let openUrl=$this.toUrl;
|
||||
if(openUrl){
|
||||
console.log('跳转url='+openUrl);
|
||||
if(openUrl.startsWith('http')){
|
||||
//alert('跳转url0='+openUrl)
|
||||
location.href=openUrl
|
||||
}else{
|
||||
uni.navigateTo({url:openUrl})
|
||||
if(openUrl=='/pages/index/index' || openUrl=='/pages/study/index' || openUrl=='/pages/plus/index' || openUrl=='/pages/my/index'){
|
||||
//alert('跳转url1='+openUrl)
|
||||
uni.switchTab({
|
||||
url:openUrl
|
||||
})
|
||||
}else{
|
||||
//alert('跳转url2='+openUrl)
|
||||
uni.navigateTo({url:openUrl})
|
||||
}
|
||||
}
|
||||
}
|
||||
}else{
|
||||
uni.switchTab({
|
||||
url:'/pages/index/index'
|
||||
})
|
||||
}
|
||||
|
||||
});
|
||||
}else{
|
||||
console.log('跳转到首页');
|
||||
//alert('跳转到首页')
|
||||
uni.switchTab({
|
||||
url:'/pages/index/index'
|
||||
})
|
||||
}
|
||||
|
||||
}).catch(error => {
|
||||
console.log('加载用户信息错误:',error);
|
||||
//alert('加载用户信息错误')
|
||||
uni.showModal({
|
||||
title:'错误',
|
||||
content:error
|
||||
})
|
||||
})
|
||||
}else{
|
||||
//alert('加载用户错误')
|
||||
console.log(rs.message+','+rs.error);
|
||||
//#ifdef APP-PLUS
|
||||
plus.runtime.openURL(this.$config.loginPath) //这里默认使用外部浏览器打开而不是内部web-view组件打开
|
||||
@@ -73,6 +89,7 @@
|
||||
}
|
||||
}).catch(err=>{
|
||||
//
|
||||
//alert('请求超时')
|
||||
uni.showToast({
|
||||
title:'请求超时'
|
||||
})
|
||||
|
||||
@@ -255,9 +255,12 @@
|
||||
import apiOldCourse from '@/api/modules/course.js'
|
||||
import apiCoursePortal from '@/api/modules/coursePortal.js'
|
||||
import apiUser from '@/api/system/user.js'
|
||||
import apiQa from '@/api/modules/qa.js'
|
||||
import {toScore} from '@/utils/tools.js'
|
||||
import apiArticle from '@/api/modules/article.js'
|
||||
import apiBoeCourse from '@/api/boe/course.js'
|
||||
import apiUserGroup from "@/api/modules/usergroup.js";
|
||||
import { mapGetters } from 'vuex'
|
||||
export default{
|
||||
data(){
|
||||
return{
|
||||
@@ -312,9 +315,33 @@
|
||||
onLoad(options){
|
||||
if(options.type){
|
||||
this.conType=parseInt(options.type);
|
||||
}else{
|
||||
this.conType=1;
|
||||
}
|
||||
this.loadSeachWords();
|
||||
//let localKey="user_"+this.userInfo.sysId+"_gids";
|
||||
if(this.audiences.length==0){
|
||||
//let hasIds;
|
||||
// let hasIds=sessionStorage.getItem(localKey);
|
||||
// if(hasIds && hasIds.length>0){
|
||||
// this.audiences=hasIds.split(",");
|
||||
// this.search();
|
||||
// }else{
|
||||
console.log(this.userInfo,'this.userInfo')
|
||||
Promise.all([apiBoeCourse.audience(this.userInfo.sysId),apiUserGroup.userGroupIds()]).then(rs=>{
|
||||
//console.log(rs,'rs');
|
||||
let aids=[];
|
||||
if(rs[0].status==200){
|
||||
aids.push(rs[0].result);
|
||||
}
|
||||
if(rs[1].status==200){
|
||||
aids.push(rs[1].result);
|
||||
}
|
||||
this.audiences=aids;
|
||||
//sessionStorage.setItem(localKey,this.audiences);
|
||||
//this.search();
|
||||
})
|
||||
}
|
||||
//}
|
||||
}
|
||||
},
|
||||
computed:{
|
||||
@@ -526,6 +553,7 @@
|
||||
},
|
||||
async loadCourseData(){
|
||||
uni.showLoading({title:'加载中...'});
|
||||
this.course.params.keyword=this.keyword;
|
||||
//查询课程
|
||||
let $this=this;
|
||||
let dataList = [];
|
||||
|
||||
@@ -179,6 +179,7 @@
|
||||
//console.log(this.paper.items);
|
||||
let totalScore=0;
|
||||
this.paper.items.forEach(item => {
|
||||
item.score=parseInt(item.score);
|
||||
totalScore+=item.score;//加到总分中
|
||||
if(item.type != 102){
|
||||
item.userAnswer='';
|
||||
@@ -214,8 +215,14 @@
|
||||
}
|
||||
let allRight = true;
|
||||
item.options.forEach(it =>{
|
||||
if(it.answer && item.userAnswer.indexOf(it.id)==-1) {
|
||||
if(it.answer){ //正确答案
|
||||
if(item.userAnswer.indexOf(it.id)==-1){
|
||||
allRight=false;
|
||||
}
|
||||
}else{
|
||||
if(item.userAnswer.indexOf(it.id)>-1){
|
||||
allRight=false;
|
||||
}
|
||||
}
|
||||
});
|
||||
if(allRight){
|
||||
|
||||
@@ -292,20 +292,19 @@
|
||||
</view>
|
||||
</view>
|
||||
</u-overlay>
|
||||
<gonggao></gonggao>
|
||||
</view>
|
||||
</template>
|
||||
<script>
|
||||
import apicourseStudy from "../../api/modules/courseStudy.js"
|
||||
import apiCoursePortal from '@/api/modules/coursePortal.js'
|
||||
import apiBoeCourse from '@/api/boe/course.js';
|
||||
import {
|
||||
formatDate
|
||||
} from '@/utils/tools.js';
|
||||
import {formatDate} from '@/utils/tools.js';
|
||||
import apiUser from '@/api/system/user.js'
|
||||
import {
|
||||
mapGetters
|
||||
} from 'vuex'
|
||||
import {mapGetters} from 'vuex'
|
||||
import gonggao from '@/components/gonggao/index.vue'
|
||||
export default {
|
||||
components:{gonggao},
|
||||
computed: {
|
||||
...mapGetters(['userInfo', 'isOneStady'])
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user