Commit 0bf99ddf authored by zhengzy's avatar zhengzy

冲突

parent 10fa606f
const UNI_APP = {
ucenterUrl: {
apiUrl: 'http://rest-u.yunya.com', //php端域名请求头
// xueUrl: 'https://xue.banshouhui.com', //学院
apiUrl: 'http://192.168.1.46', //php端域名请求头
xueUrl: 'http://192.168.1.46:8088', //学院
// banshou: 'https://m.banshou.com', //扳手app
},
systemUrl: {
......
;
(function() {
let NODE_ENV = 'test'; // dev:开发环境 | test:测试环境
let NODE_ENV = 'dev'; // dev:开发环境 | test:测试环境
let ENV_VAR = null;
if (process.env.NODE_ENV === "development") {
if (NODE_ENV === 'dev') {
......
......@@ -162,383 +162,378 @@
</template>
<script>
<<<<<<< .merge_file_a10028
export default {
data() {
return {
msg:"赣南吴彦祖",
tabs: [{
name: "交付规范",
},
{
name: "培训通知",
},
{
name: "在线学习",
},
{
name: "考核认证",
},
],
current: 0,
swiperCurrent: 0,
params: {
start: 0,
},
list: [],
courselist:null,
loadStatus: "loading", //加载样式:loadMore-加载前样式,loading-加载加载中样式,nomore-没有数据样式
isLoadMore: false, //是否加载中
course_id:"course_id_=173",
exam:null
};
},
onLoad() {
this.getList();
this.getCourseList();
this.getUserExamInfo();
},
computed:{
bannerImage() {
return process.uniEnv.qn_base_url + 'banner-xx.png'
},
},
methods: {
getList() {
this.$u.api
.getTrainingNoticeList(this.params)
.then((res) => {
if (res.code == 200) {
if (res.data) {
this.list = this.list.concat(res.data);
if (res.data.length < 5) {
//判断接口返回数据量小于请求数据量,则表示此为最后一页
this.isLoadMore = true;
this.loadStatus = "nomore";
} else {
this.isLoadMore = false;
}
} else {
this.isLoadMore = true;
this.loadStatus = "nomore";
}
} else {
//接口请求失败的处理
uni.showToast({
title: res.message,
icon: "none"
});
this.isLoadMore = false;
if (this.params.start > 0) {
this.page -= 5;
}
}
})
.catch((err) => {
uni.showToast({
title: err,
icon: "none",
});
this.isLoadMore = false;
if (this.params.start > 0) {
this.page -= 5;
}
});
},
//在线学习通用课程信息
getCourseList() {
this.$u.api
.CourseList()
.then((res) => {
if (res.code == 200) {
if (res.data) {
this.courselist = res.data;
console.log("--------")
console.log(this.courselist)
if (res.data.length < 5) {
//判断接口返回数据量小于请求数据量,则表示此为最后一页
this.isLoadMore = true;
this.loadStatus = "nomore";
} else {
this.isLoadMore = false;
}
} else {
this.isLoadMore = true;
this.loadStatus = "nomore";
}
} else {
//接口请求失败的处理
uni.showToast({
title: res.message,
icon: "none"
});
this.isLoadMore = false;
if (this.params.start > 0) {
this.page -= 5;
}
}
})
.catch((err) => {
uni.showToast({
title: err,
icon: "none",
});
this.isLoadMore = false;
if (this.params.start > 0) {
this.page -= 5;
}
});
},
//tabs通知swiper切换
tabsChange(index) {
this.swiperCurrent = index;
},
//swiper-item左右移动,通知tabs的滑块跟随移动
transition(e) {
let dx = e.detail.dx;
this.$refs.uTabs.setDx(dx);
},
animationfinish(e) {
let current = e.detail.current;
this.$refs.uTabs.setFinishCurrent(current);
this.swiperCurrent = current;
this.current = current;
},
//跳转到assessment页面
aaa() {
wx.navigateTo({
url: "./assessment",
});
},
//跳转到课程介绍
ccc(id){
uni.navigateTo({
url:"./curriculum?course_id=" + id
})
},
//跳转到
bbb(e) {
var news = {
body:e.body,
id:e.id,
level:e.level,
title:e.title
};
// console.log(news)
uni.navigateTo({
url: "./news-details"
});
setTimeout(()=>{uni.$emit('news',news),console.log('发送数据')},500)
console.log('跳转结束11111111')
},
//scroll-view到底部加载更多
onreachBottom() {
console.log("上拉触底函数");
//上拉触底函数
if (!this.isLoadMore) {
this.isLoadMore = true;
this.params.start += 5;
if (this.loadStatus !== "nomore") {
this.getList();
}
}
},
//跳转到拍照小程序首页
goToPrint() {
console.log("111111");
uni.navigateToMiniProgram({
appId: "wxd1d6eede324b0465",
success(res) {
//打开成功
console.log("success", res);
},
fail(err) {
console.log("err", err);
},
});
},
//考核认证,通用认证,考试通过or未通过查询接口请求
getUserExamInfo() {
uni.showLoading({
title: '请稍候'
})
let that = this
uni.request({
url: 'http://192.168.1.22' +
'/wxh-worker-rest/rest/exam' +
'/serviceRule/userExamInfo/' +
'RTOKENe83309bff5846d2ff0949d58a0c0f643d60d107d' +
'?examId=' + 2,
method: 'POST',
data: {
//examId:this.examId,
},
header: {
'Content-Type': 'application/x-www-form-urlencoded'
},
success: (res) => {
console.log(res.data)
uni.hideLoading()
if (!res.data) {
return
}
if (res.data.code == 401 || res.data.code == 403) {
// uni.navigateTo({
// url: '/pages/login/wxlogin'
// })
// return
console.log('洪塘张学友')
}
if (res.data.code == 200) {
//examStatus 用户考试状态 0考试中 1考试完成 2未参与
that.exam = res.data.data
console.log(that.exam)
if (res.data.data.examStatus == 2) {
that.applyExam()
return
}
if(res.data.data.examStatus == 1){
console.log('111111111111111111111111111')
that.isComplete = true
that.examScore = res.data.data.examScore
that.postResult()
return
}
if (res.data.data.examStatus == 0 ) {
that.userExamId = res.data.data.id
that.getNext()
}
} else {
uni.showToast({
icon: 'none',
title: res.data.message
})
}
},
fail: (e) => {
uni.hideLoading()
uni.showToast({
icon: 'none',
title: '获取考试信息失败'
})
}
})
},
},
};
export default {
data() {
return {
msg: "赣南吴彦祖",
tabs: [
{
name: "交付规范",
},
{
name: "培训通知",
},
{
name: "在线学习",
},
{
name: "考核认证",
},
],
current: 0,
swiperCurrent: 0,
params: {
start: 0,
},
list: [],
courselist: null,
loadStatus: "loading", //加载样式:loadMore-加载前样式,loading-加载加载中样式,nomore-没有数据样式
isLoadMore: false, //是否加载中
course_id: "course_id_=173",
exam: null,
};
},
onLoad() {
this.getList();
this.getCourseList();
this.getUserExamInfo();
},
computed: {
bannerImage() {
return process.uniEnv.qn_base_url + "banner-xx.png";
},
},
methods: {
getList() {
this.$u.api
.getTrainingNoticeList(this.params)
.then((res) => {
if (res.code == 200) {
if (res.data) {
this.list = this.list.concat(res.data);
if (res.data.length < 5) {
//判断接口返回数据量小于请求数据量,则表示此为最后一页
this.isLoadMore = true;
this.loadStatus = "nomore";
} else {
this.isLoadMore = false;
}
} else {
this.isLoadMore = true;
this.loadStatus = "nomore";
}
} else {
//接口请求失败的处理
uni.showToast({
title: res.message,
icon: "none",
});
this.isLoadMore = false;
if (this.params.start > 0) {
this.page -= 5;
}
}
})
.catch((err) => {
uni.showToast({
title: err,
icon: "none",
});
this.isLoadMore = false;
if (this.params.start > 0) {
this.page -= 5;
}
});
},
//在线学习通用课程信息
getCourseList() {
this.$u.api
.CourseList()
.then((res) => {
if (res.code == 200) {
if (res.data) {
this.courselist = res.data;
console.log("--------");
console.log(this.courselist);
if (res.data.length < 5) {
//判断接口返回数据量小于请求数据量,则表示此为最后一页
this.isLoadMore = true;
this.loadStatus = "nomore";
} else {
this.isLoadMore = false;
}
} else {
this.isLoadMore = true;
this.loadStatus = "nomore";
}
} else {
//接口请求失败的处理
uni.showToast({
title: res.message,
icon: "none",
});
this.isLoadMore = false;
if (this.params.start > 0) {
this.page -= 5;
}
}
})
.catch((err) => {
uni.showToast({
title: err,
icon: "none",
});
this.isLoadMore = false;
if (this.params.start > 0) {
this.page -= 5;
}
});
},
//tabs通知swiper切换
tabsChange(index) {
this.swiperCurrent = index;
},
//swiper-item左右移动,通知tabs的滑块跟随移动
transition(e) {
let dx = e.detail.dx;
this.$refs.uTabs.setDx(dx);
},
animationfinish(e) {
let current = e.detail.current;
this.$refs.uTabs.setFinishCurrent(current);
this.swiperCurrent = current;
this.current = current;
},
//跳转到assessment页面
aaa() {
wx.navigateTo({
url: "./assessment",
});
},
//跳转到课程介绍
ccc(id) {
uni.navigateTo({
url: "./curriculum?course_id=" + id,
});
},
//跳转到
bbb(e) {
var news = {
body: e.body,
id: e.id,
level: e.level,
title: e.title,
};
// console.log(news)
uni.navigateTo({
url: "./news-details",
});
setTimeout(() => {
uni.$emit("news", news), console.log("发送数据");
}, 500);
console.log("跳转结束11111111");
},
//scroll-view到底部加载更多
onreachBottom() {
console.log("上拉触底函数");
//上拉触底函数
if (!this.isLoadMore) {
this.isLoadMore = true;
this.params.start += 5;
if (this.loadStatus !== "nomore") {
this.getList();
}
}
},
//跳转到拍照小程序首页
goToPrint() {
console.log("111111");
uni.navigateToMiniProgram({
appId: "wxd1d6eede324b0465",
success(res) {
//打开成功
console.log("success", res);
},
fail(err) {
console.log("err", err);
},
});
},
//考核认证,通用认证,考试通过or未通过查询接口请求
getUserExamInfo() {
uni.showLoading({
title: "请稍候",
});
let that = this;
uni.request({
url:
"http://192.168.1.22" +
"/wxh-worker-rest/rest/exam" +
"/serviceRule/userExamInfo/" +
getApp().globalData.token +
"?examId=" +
2,
method: "POST",
data: {
//examId:this.examId,
},
header: {
"Content-Type": "application/x-www-form-urlencoded",
},
success: (res) => {
console.log(res.data);
uni.hideLoading();
if (!res.data) {
return;
}
if (res.data.code == 401 || res.data.code == 403) {
// uni.navigateTo({
// url: '/pages/login/wxlogin'
// })
// return
console.log("洪塘张学友");
}
if (res.data.code == 200) {
//examStatus 用户考试状态 0考试中 1考试完成 2未参与
that.exam = res.data.data;
console.log(that.exam);
if (res.data.data.examStatus == 2) {
that.applyExam();
return;
}
if (res.data.data.examStatus == 1) {
console.log("111111111111111111111111111");
that.isComplete = true;
that.examScore = res.data.data.examScore;
that.postResult();
return;
}
if (res.data.data.examStatus == 0) {
that.userExamId = res.data.data.id;
that.getNext();
}
} else {
uni.showToast({
icon: "none",
title: res.data.message,
});
}
},
fail: (e) => {
uni.hideLoading();
uni.showToast({
icon: "none",
title: "获取考试信息失败",
});
},
});
},
},
};
</script>
<style>
.study {
height: 100vh;
background-color: #f4f5f7;
padding: 0rpx 30rpx 0 30rpx;
}
.title-view{
color: #333333;
font-weight: bold;
font-size: 40rpx;
}
.study {
height: 100vh;
background-color: #f4f5f7;
padding: 0rpx 30rpx 0 30rpx;
}
.title-view {
color: #333333;
font-weight: bold;
font-size: 40rpx;
}
.banner {
width: 690rpx;
height: 240rpx;
/* margin-left: -15rpx; */
}
.banner {
width: 690rpx;
height: 240rpx;
/* margin-left: -15rpx; */
}
//交付规范
.standard {
width: 656rpx;
display: flex;
justify-content: space-between;
border-bottom: 1rpx solid #82848a;
padding: 0 34rpx;
margin: 72rpx auto;
}
/* //交付规范 */
.standard {
width: 656rpx;
display: flex;
justify-content: space-between;
border-bottom: 1rpx solid #82848a;
padding: 0 34rpx;
margin: 72rpx auto;
}
//培训通知
.notice {
border: #808080 solid 2rpx;
width: 100%;
height: 400rpx;
margin-top: 36rpx;
overflow: hidden;
}
/* //培训通知 */
.notice {
border: #808080 solid 2rpx;
width: 100%;
height: 400rpx;
margin-top: 36rpx;
overflow: hidden;
}
.n-head {
text-align: center;
margin: 32rpx 0;
}
.news{
}
//在线学习
.currency-class {
width: 100%;
background: #ffffff;
padding: 18rpx;
margin-bottom: 11px;
border-radius: 12rpx;
}
.title{
font-size: 32rpx;
font-weight: bold;
font-family: PingFang-SC-Bold, PingFang-SC;
}
.class1 {
display: flex;
justify-content: space-between;
padding-top: 22rpx;
margin-top: 28rpx;
border-top: 1rpx solid #808080;
}
.n-head {
text-align: center;
margin: 32rpx 0;
}
.news {
}
/* //在线学习 */
.currency-class {
width: 100%;
background: #ffffff;
padding: 18rpx;
margin-bottom: 11px;
border-radius: 12rpx;
}
.title {
font-size: 32rpx;
font-weight: bold;
font-family: PingFang-SC-Bold, PingFang-SC;
}
.class1 {
display: flex;
justify-content: space-between;
padding-top: 22rpx;
margin-top: 28rpx;
border-top: 1rpx solid #808080;
}
.img {
width: 201rpx;
height: 201rpx;
display: block;
margin-right: 0rpx;
}
.img {
width: 201rpx;
height: 201rpx;
display: block;
margin-right: 0rpx;
}
.right {
width: 428rpx;
display: flex;
flex-direction: column;
justify-content: space-between;
}
.intro{
color: #9999a6;
}
.tab {
background: #fff;
height: 82rpx;
margin: 0 0;
}
.right {
width: 428rpx;
display: flex;
flex-direction: column;
justify-content: space-between;
}
.intro {
color: #9999a6;
}
.tab {
background: #fff;
height: 82rpx;
margin: 0 0;
}
.text {
margin: 0 40rpx;
line-height: 82rpx;
color: #667eb5;
}
.text {
margin: 0 40rpx;
line-height: 82rpx;
color: #667eb5;
}
.content {
margin: 5px 0;
height: 485rpx;
background: #fff;
}
.content {
margin: 5px 0;
height: 485rpx;
background: #fff;
}
swiper {
height: 691rpx;
}
swiper {
height: 691rpx;
}
</style>
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