|
@@ -13,7 +13,7 @@
|
|
|
<view class="content">
|
|
<view class="content">
|
|
|
<view class="contentTitle">{{ nowPageData.content }}</view>
|
|
<view class="contentTitle">{{ nowPageData.content }}</view>
|
|
|
<view class="imageBox" v-if="nowPageData.imgUrl && nowPageData.imgUrl !== null">
|
|
<view class="imageBox" v-if="nowPageData.imgUrl && nowPageData.imgUrl !== null">
|
|
|
- <image :src="$method.splitImgHost(nowPageData.imgUrl)" mode="aspectFit"></image>
|
|
|
|
|
|
|
+ <image :src="$method.splitImgHost(nowPageData.imgUrl)" mode="aspectFit" @click="seeBigImage(nowPageData.imgUrl)"></image>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
<!---案例内容start -->
|
|
<!---案例内容start -->
|
|
@@ -25,7 +25,7 @@
|
|
|
</view>
|
|
</view>
|
|
|
<view class="content">
|
|
<view class="content">
|
|
|
<view class="contentTitle">{{ itemst.content }}</view>
|
|
<view class="contentTitle">{{ itemst.content }}</view>
|
|
|
- <view class="imageBox" v-if="itemst.imgUrl && itemst.imgUrl !== null"><image :src="$method.splitImgHost(itemst.imgUrl)" mode="aspectFit"></image></view>
|
|
|
|
|
|
|
+ <view class="imageBox" v-if="itemst.imgUrl && itemst.imgUrl !== null"><image :src="$method.splitImgHost(itemst.imgUrl)" mode="aspectFit" @click="seeBigImage(itemst.imgUrl)"></image></view>
|
|
|
</view>
|
|
</view>
|
|
|
<view
|
|
<view
|
|
|
class="banksChiList"
|
|
class="banksChiList"
|
|
@@ -37,7 +37,7 @@
|
|
|
<view class="leftIndex">{{ alphabet[indexs] }}.</view>
|
|
<view class="leftIndex">{{ alphabet[indexs] }}.</view>
|
|
|
<view class="bankTie">
|
|
<view class="bankTie">
|
|
|
<view>{{ items.content }}</view>
|
|
<view>{{ items.content }}</view>
|
|
|
- <image v-if="items.imgUrl && items.imgUrl !== null" :src="$method.splitImgHost(items.imgUrl)" mode="aspectFit"></image>
|
|
|
|
|
|
|
+ <image v-if="items.imgUrl && items.imgUrl !== null" :src="$method.splitImgHost(items.imgUrl)" mode="aspectFit" @click="seeBigImage(items.imgUrl)"></image>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
<view v-if="itemst.type === 3" class="banksChiList" :class="isWrong === 1 ? 'activeListBt' : ''" @click="activePDs(1, indexst)">正确</view>
|
|
<view v-if="itemst.type === 3" class="banksChiList" :class="isWrong === 1 ? 'activeListBt' : ''" @click="activePDs(1, indexst)">正确</view>
|
|
@@ -69,7 +69,7 @@
|
|
|
<view class="content">
|
|
<view class="content">
|
|
|
<view class="contentTitle">{{ nowPageData.content }}</view>
|
|
<view class="contentTitle">{{ nowPageData.content }}</view>
|
|
|
<view class="imageBox" v-if="nowPageData.imgUrl && nowPageData.imgUrl !== null">
|
|
<view class="imageBox" v-if="nowPageData.imgUrl && nowPageData.imgUrl !== null">
|
|
|
- <image :src="$method.splitImgHost(nowPageData.imgUrl)" mode="aspectFit"></image>
|
|
|
|
|
|
|
+ <image :src="$method.splitImgHost(nowPageData.imgUrl)" mode="aspectFit" @click="seeBigImage(nowPageData.imgUrl)"></image>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
<view
|
|
<view
|
|
@@ -82,7 +82,7 @@
|
|
|
<view class="leftIndex">{{ alphabet[indexs] }}.</view>
|
|
<view class="leftIndex">{{ alphabet[indexs] }}.</view>
|
|
|
<view class="bankTie">
|
|
<view class="bankTie">
|
|
|
<view>{{ items.content }}</view>
|
|
<view>{{ items.content }}</view>
|
|
|
- <image v-if="items.imgUrl && items.imgUrl !== null" :src="$method.splitImgHost(items.imgUrl)" mode="aspectFit"></image>
|
|
|
|
|
|
|
+ <image v-if="items.imgUrl && items.imgUrl !== null" :src="$method.splitImgHost(items.imgUrl)" mode="aspectFit" @click="seeBigImage(items.imgUrl)"></image>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
<view v-if="nowPageData.type === 3" class="banksChiList" :class="isWrong === 1 ? 'activeListBt' : ''" @click="activePD(1)">正确</view>
|
|
<view v-if="nowPageData.type === 3" class="banksChiList" :class="isWrong === 1 ? 'activeListBt' : ''" @click="activePD(1)">正确</view>
|
|
@@ -99,8 +99,8 @@
|
|
|
<u-row gutter="16">
|
|
<u-row gutter="16">
|
|
|
<u-col span="4">
|
|
<u-col span="4">
|
|
|
<view class="box">
|
|
<view class="box">
|
|
|
- <view style="text-align: center;margin-left: 30rpx;position: absolute;left: 20rpx;">
|
|
|
|
|
- <image src="/static/sc.png" class="sc"></image>
|
|
|
|
|
|
|
+ <view style="text-align: center;margin-left: 30rpx;position: absolute;left: 20rpx;" @click="favorites">
|
|
|
|
|
+ <image :src="collecStatus ? '/static/star.png' : '/static/sc.png'" class="sc"></image>
|
|
|
<view class="sc_t">收藏</view>
|
|
<view class="sc_t">收藏</view>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
@@ -173,7 +173,8 @@ export default {
|
|
|
bankId: 0, //题库ID
|
|
bankId: 0, //题库ID
|
|
|
selects: [], //当前做了哪些题目
|
|
selects: [], //当前做了哪些题目
|
|
|
showJX: [], // 展开解析列表
|
|
showJX: [], // 展开解析列表
|
|
|
- showJXanli: [] // 展开案例解析列表
|
|
|
|
|
|
|
+ showJXanli: [], // 展开案例解析列表
|
|
|
|
|
+ collecStatus: false
|
|
|
};
|
|
};
|
|
|
},
|
|
},
|
|
|
onLoad(option) {
|
|
onLoad(option) {
|
|
@@ -187,8 +188,49 @@ export default {
|
|
|
this.examId = option.examId;
|
|
this.examId = option.examId;
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
- onShow() {},
|
|
|
|
|
methods: {
|
|
methods: {
|
|
|
|
|
+ //预览图片
|
|
|
|
|
+ seeBigImage(url){
|
|
|
|
|
+ var urlarr = []
|
|
|
|
|
+ urlarr.push(this.$method.splitImgHost(url))
|
|
|
|
|
+ uni.previewImage({
|
|
|
|
|
+ urls: urlarr
|
|
|
|
|
+ })
|
|
|
|
|
+ },
|
|
|
|
|
+ favoritesStatus() {
|
|
|
|
|
+ this.$api.questionsystems(this.nowPageData.questionId).then(result => {
|
|
|
|
|
+ if (result.data.data === undefined) {
|
|
|
|
|
+ this.collecStatus = false;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ this.collecStatus = true;
|
|
|
|
|
+ }
|
|
|
|
|
+ });
|
|
|
|
|
+ },
|
|
|
|
|
+ //收藏
|
|
|
|
|
+ favorites() {
|
|
|
|
|
+ console.log(this.collecStatus);
|
|
|
|
|
+ var self = this;
|
|
|
|
|
+ if (!uni.getStorageSync('union_id') && this.$store.state.token === '') {
|
|
|
|
|
+ uni.navigateTo({
|
|
|
|
|
+ url: '/pages/login/login'
|
|
|
|
|
+ });
|
|
|
|
|
+ } else {
|
|
|
|
|
+ if (this.collecStatus) {
|
|
|
|
|
+ this.$api.questionsystems(self.nowPageData.questionId).then(results => {
|
|
|
|
|
+ self.$api.questionsystemdelete(results.data.data.collectQuestionId).then(resz => {
|
|
|
|
|
+ self.favoritesStatus();
|
|
|
|
|
+ });
|
|
|
|
|
+ });
|
|
|
|
|
+ } else {
|
|
|
|
|
+ var data = {
|
|
|
|
|
+ questionId: self.nowPageData.questionId
|
|
|
|
|
+ };
|
|
|
|
|
+ this.$api.questionsystemadd(data).then(res => {
|
|
|
|
|
+ self.favoritesStatus();
|
|
|
|
|
+ });
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ },
|
|
|
// 查看解析start
|
|
// 查看解析start
|
|
|
showTitle(ids) {
|
|
showTitle(ids) {
|
|
|
var self = this;
|
|
var self = this;
|
|
@@ -219,13 +261,16 @@ export default {
|
|
|
this.initDatas();
|
|
this.initDatas();
|
|
|
this.initLint();
|
|
this.initLint();
|
|
|
this.getCooieds();
|
|
this.getCooieds();
|
|
|
|
|
+ this.favoritesStatus(self.nowPageData.questionId);
|
|
|
|
|
+ this.show = false;
|
|
|
},
|
|
},
|
|
|
|
|
+ //数据清空
|
|
|
initDatas() {
|
|
initDatas() {
|
|
|
this.isWrong = -1;
|
|
this.isWrong = -1;
|
|
|
this.showJX = [];
|
|
this.showJX = [];
|
|
|
this.showJXanli = [];
|
|
this.showJXanli = [];
|
|
|
this.selects = [];
|
|
this.selects = [];
|
|
|
- }, //数据清空
|
|
|
|
|
|
|
+ },
|
|
|
getCooieds() {
|
|
getCooieds() {
|
|
|
var self = this;
|
|
var self = this;
|
|
|
if (this.answerList.length) {
|
|
if (this.answerList.length) {
|
|
@@ -238,7 +283,6 @@ export default {
|
|
|
} else {
|
|
} else {
|
|
|
self.replyL = item.selectIds;
|
|
self.replyL = item.selectIds;
|
|
|
}
|
|
}
|
|
|
- console.log(self.replyL);
|
|
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
}
|
|
}
|
|
@@ -324,7 +368,6 @@ export default {
|
|
|
examId: option.examId
|
|
examId: option.examId
|
|
|
};
|
|
};
|
|
|
}
|
|
}
|
|
|
- console.log(option);
|
|
|
|
|
this.$api.questiondetailList(data).then(res => {
|
|
this.$api.questiondetailList(data).then(res => {
|
|
|
if (res.data.rows.length) {
|
|
if (res.data.rows.length) {
|
|
|
let self = this;
|
|
let self = this;
|
|
@@ -338,6 +381,7 @@ export default {
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
self.nowPageData = res.data.rows[self.numIndex];
|
|
self.nowPageData = res.data.rows[self.numIndex];
|
|
|
|
|
+ self.favoritesStatus(res.data.rows[self.numIndex].questionId);
|
|
|
self.list = res.data.rows;
|
|
self.list = res.data.rows;
|
|
|
} else {
|
|
} else {
|
|
|
uni.showModal({
|
|
uni.showModal({
|
|
@@ -464,7 +508,18 @@ export default {
|
|
|
},
|
|
},
|
|
|
//交卷
|
|
//交卷
|
|
|
carryOut() {
|
|
carryOut() {
|
|
|
- this.answerList.forEach((item, index) => {
|
|
|
|
|
|
|
+ var self = this;
|
|
|
|
|
+ var correct = 0;
|
|
|
|
|
+ var errorz = 0;
|
|
|
|
|
+ var answerListString = JSON.parse(JSON.stringify(this.answerList));
|
|
|
|
|
+ answerListString.forEach((item, index) => {
|
|
|
|
|
+ if (item.isRight !== undefined) {
|
|
|
|
|
+ if (item.isRight === 1) {
|
|
|
|
|
+ correct++;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ errorz++;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
item.selectIds = item.selectIds.toString();
|
|
item.selectIds = item.selectIds.toString();
|
|
|
item.replyStr.forEach((items, indexs) => {
|
|
item.replyStr.forEach((items, indexs) => {
|
|
|
if (items.selectId) {
|
|
if (items.selectId) {
|
|
@@ -476,7 +531,7 @@ export default {
|
|
|
var data = {
|
|
var data = {
|
|
|
bankId: this.bankId,
|
|
bankId: this.bankId,
|
|
|
type: this.typeId,
|
|
type: this.typeId,
|
|
|
- answerList: this.answerList
|
|
|
|
|
|
|
+ answerList: answerListString
|
|
|
};
|
|
};
|
|
|
if (this.examId !== null) {
|
|
if (this.examId !== null) {
|
|
|
data.examId = this.examId;
|
|
data.examId = this.examId;
|
|
@@ -485,21 +540,29 @@ export default {
|
|
|
data.simulateId = this.bankSectionId;
|
|
data.simulateId = this.bankSectionId;
|
|
|
}
|
|
}
|
|
|
this.$api.questiondetailrecord(data).then(res => {
|
|
this.$api.questiondetailrecord(data).then(res => {
|
|
|
- console.log(res);
|
|
|
|
|
if (res.data.code === 200) {
|
|
if (res.data.code === 200) {
|
|
|
- uni.showModal({
|
|
|
|
|
- title: '提示',
|
|
|
|
|
- content: '提交成功返回上级',
|
|
|
|
|
- showCancel: false,
|
|
|
|
|
- confirmText: '返回上级',
|
|
|
|
|
- success: function(ress) {
|
|
|
|
|
- if (ress.confirm) {
|
|
|
|
|
- uni.navigateBack({
|
|
|
|
|
- delta: 1
|
|
|
|
|
- });
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ // uni.showModal({
|
|
|
|
|
+ // title: '提示',
|
|
|
|
|
+ // content: '提交成功返回上级',
|
|
|
|
|
+ // showCancel: false,
|
|
|
|
|
+ // confirmText: '返回上级',
|
|
|
|
|
+ // success: function(ress) {
|
|
|
|
|
+ // if (ress.confirm) {
|
|
|
|
|
+ // uni.navigateBack({
|
|
|
|
|
+ // delta: 1
|
|
|
|
|
+ // });
|
|
|
|
|
+ // }
|
|
|
|
|
+ // }
|
|
|
|
|
+ // });
|
|
|
|
|
+ var num = 0;
|
|
|
|
|
+ self.list.forEach((item, index) => {
|
|
|
|
|
+ if (item.type !== 4) {
|
|
|
|
|
+ num++;
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
|
|
+ uni.redirectTo({
|
|
|
|
|
+ url: `/pages2/bank/endBG?bankId=${self.bankId}&type=${self.typeId}&allIndex=${num}&correct=${correct}&error=${errorz}`
|
|
|
|
|
+ });
|
|
|
} else {
|
|
} else {
|
|
|
uni.showToast({
|
|
uni.showToast({
|
|
|
title: '提交失败',
|
|
title: '提交失败',
|