Commit a7bddcdd authored by 刘用法's avatar 刘用法
parents 31988a13 a938d021
...@@ -73,17 +73,7 @@ ...@@ -73,17 +73,7 @@
}) })
} }
} }
// if(photo.currentItem){
// photo.currentItem.imageList.unshift(photo.tempPath.mixWater)
// }
// if(photo.productList && photo.productList[photo.topIndex]){
// const topArr = photo.productList[photo.topIndex]
// if(topArr[photo.itemIndex]){
// topArr[photo.itemIndex].imageList.push(photo.tempPath.mixWater)
// }
// }
// photo.
if(photo.tempPath.mixWater){ if(photo.tempPath.mixWater){
// 保存水印处理图片到本地 // 保存水印处理图片到本地
path = photo.tempPath.mixWater path = photo.tempPath.mixWater
...@@ -122,6 +112,7 @@ ...@@ -122,6 +112,7 @@
}, },
finishPhoto(){ finishPhoto(){
const photo = getApp().globalData.photo const photo = getApp().globalData.photo
if (photo.currentItemLength === 10) return
photo.currentItemLength = 10 photo.currentItemLength = 10
this.continuePhoto() this.continuePhoto()
// 完成本项 // 完成本项
...@@ -149,24 +140,7 @@ ...@@ -149,24 +140,7 @@
}else{ }else{
this.$emit('finish') this.$emit('finish')
} }
},
downloadImages() {
let self = this;
for (let url of this.images) {
uni.downloadFile({
url: url, //仅为示例,并非真实的资源
success(res) {
// 只要服务器有响应数据,就会把响应内容写入文件并进入 success 回调,业务需要自行判断是否下载到了想要的内容
if (res.statusCode === 200) {
self.files.push(res.tempFilePath)
}
},
fail(e) {
}
})
} }
},
} }
} }
</script> </script>
......
...@@ -265,6 +265,7 @@ ...@@ -265,6 +265,7 @@
top: 0; top: 0;
left: 0; left: 0;
width: 100%; width: 100%;
height: 100vh;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
......
...@@ -206,10 +206,6 @@ ...@@ -206,10 +206,6 @@
}, },
updateTime() { updateTime() {
this.waterInfo.date = this.getTime() this.waterInfo.date = this.getTime()
// let timer = setTimeout(() => {
// clearTimeout(timer);
// this.updateTime()
// }, 1000)
}, },
setCameraInfo(type) { setCameraInfo(type) {
// 设置相机前置后置、闪关灯等 // 设置相机前置后置、闪关灯等
...@@ -261,7 +257,6 @@ ...@@ -261,7 +257,6 @@
const { const {
errMsg errMsg
} = e.detail } = e.detail
// console.log(e.detail, 'e.detail')
if (errMsg !== 'insertCamera:fail auth deny') { if (errMsg !== 'insertCamera:fail auth deny') {
return return
} }
......
...@@ -221,6 +221,13 @@ ...@@ -221,6 +221,13 @@
} }
}, },
{ {
"path":"contract/out",
"style":{
"navigationBarTitleText":""
}
},
{
"path": "customer/index", "path": "customer/index",
"style": { "style": {
"navigationStyle":"custom", "navigationStyle":"custom",
......
...@@ -17,13 +17,11 @@ ...@@ -17,13 +17,11 @@
<view :class="['itemView',item.isSelect ? 'active':'']" v-for="(item,ikey) in currentItem.answerList" :key="ikey" @click="itemClick(item,ikey)"> <view :class="['itemView',item.isSelect ? 'active':'']" v-for="(item,ikey) in currentItem.answerList" :key="ikey" @click="itemClick(item,ikey)">
<view :class="item.isSelect ? 'itemIndexView' : 'itemIndexView grayBorder' "> <view :class="item.isSelect ? 'itemIndexView' : 'itemIndexView grayBorder' ">
<text <text :class="item.isSelect ? 'itemIndexText whiteColor selectBackColor' : 'itemIndexText gray-color' ">
:class="item.isSelect ? 'itemIndexText whiteColor selectBackColor' : 'itemIndexText gray-color' ">
{{alphaArr[ikey]}} {{alphaArr[ikey]}}
</text> </text>
</view> </view>
<view <view :class="item.isSelect ? 'itemText selectedColor' : 'itemText defaultColor' ">{{contentFilter(item.content)}}</view>
:class="item.isSelect ? 'itemText selectedColor' : 'itemText defaultColor' ">{{contentFilter(item.content)}}</view>
</view> </view>
</view> </view>
...@@ -35,8 +33,7 @@ ...@@ -35,8 +33,7 @@
<text class="numberText">{{progress}}</text> <text class="numberText">{{progress}}</text>
</view> </view>
<view class="bottomRightView"> <view class="bottomRightView">
<view :class="isSelect ? 'nextBtn selectBackColor' : 'nextBtn defaultBackColor' " <view :class="isSelect ? 'nextBtn selectBackColor' : 'nextBtn defaultBackColor' " @click="handleClick()">
@click="handleClick()">
<text class="bottomTitle">{{bottomTitle}}</text> <text class="bottomTitle">{{bottomTitle}}</text>
</view> </view>
</view> </view>
...@@ -57,20 +54,20 @@ ...@@ -57,20 +54,20 @@
</template> </template>
<script> <script>
import Examine from '@/components/settle/examine.vue' import Examine from "@/components/settle/examine.vue";
import utils from '@/utils/util.js' import utils from "@/utils/util.js";
const globalUrl = process.uniEnv || {} const globalUrl = process.uniEnv || {};
const systemApiUrl = globalUrl.systemUrl.apiUrl const systemApiUrl = globalUrl.systemUrl.apiUrl;
const ucenterApiUrl = globalUrl.ucenterUrl.apiUrl const ucenterApiUrl = globalUrl.ucenterUrl.apiUrl;
export default { export default {
components: { components: {
Examine Examine,
}, },
data() { data() {
return { return {
examId: null, examId: null,
userExamId: null, userExamId: null,
userAnswerIds: '', userAnswerIds: "",
isStart: true, isStart: true,
currentNumber: 1, currentNumber: 1,
currentItem: null, currentItem: null,
...@@ -82,31 +79,31 @@ ...@@ -82,31 +79,31 @@
}, },
endTime: 0, endTime: 0,
currentTime: 100, currentTime: 100,
everyTime: 90, everyTime: 20,
progress: '', progress: "",
bottomTitle: '下一题', bottomTitle: "下一题",
isStop: false, isStop: false,
clock_url: 'https://qn-static.banshouhui.com/clock_exam.png', clock_url: "https://qn-static.banshouhui.com/clock_exam.png",
examScore: 0, examScore: 0,
alphaArr: ['A', 'B', 'C', 'D', 'E'], alphaArr: ["A", "B", "C", "D", "E"],
timer: null, timer: null,
isComplete: false, // 是否已经考试完成判定 isComplete: false, // 是否已经考试完成判定
examInfo: null, examInfo: null,
} };
}, },
computed: { computed: {
titleText() { titleText() {
return ['单选', '多选', '问答'] return ["单选", "多选", "问答"];
}, },
time1Image() { time1Image() {
return process.uniEnv.qn_base_url + 'time1.png' return process.uniEnv.qn_base_url + "time1.png";
}, },
chenggongImage() { chenggongImage() {
return process.uniEnv.qn_base_url + 'chenggong.png' return process.uniEnv.qn_base_url + "chenggong.png";
}, },
timuImage() { timuImage() {
return process.uniEnv.qn_base_url + 'timu-new.png' return process.uniEnv.qn_base_url + "timu-new.png";
} },
}, },
onLoad(e) { onLoad(e) {
this.examId = e.examId; this.examId = e.examId;
...@@ -116,13 +113,22 @@ ...@@ -116,13 +113,22 @@
methods: { methods: {
formatTimeToMini(timestamp) { formatTimeToMini(timestamp) {
let result = timestamp; let result = timestamp;
let h = Math.floor(result / 3600) < 10 ? '0' + Math.floor(result / 3600) : Math.floor(result / 3600); let h =
let m = Math.floor((result / 60 % 60)) < 10 ? '0' + Math.floor((result / 60 % 60)) : Math.floor((result / 60 % 60)); Math.floor(result / 3600) < 10
let s = Math.floor((result % 60)) < 10 ? '0' + Math.floor((result % 60)) : Math.floor((result % 60)); ? "0" + Math.floor(result / 3600)
: Math.floor(result / 3600);
let res = ''; let m =
if(h !== '00') res += `${h}:`; Math.floor((result / 60) % 60) < 10
if(m !== '00') res += `${m}:`; ? "0" + Math.floor((result / 60) % 60)
: Math.floor((result / 60) % 60);
let s =
Math.floor(result % 60) < 10
? "0" + Math.floor(result % 60)
: Math.floor(result % 60);
let res = "";
if (h !== "00") res += `${h}:`;
if (m !== "00") res += `${m}:`;
res += `${s}`; res += `${s}`;
return res; return res;
}, },
...@@ -130,263 +136,286 @@ ...@@ -130,263 +136,286 @@
//判断是否通过,通过去成功页,失败去失败页 //判断是否通过,通过去成功页,失败去失败页
let examInfo = this.examInfo; let examInfo = this.examInfo;
let examId = this.examId; let examId = this.examId;
let status = examInfo.examLevelResult == '通过'; let status = examInfo.examLevelResult == "通过";
if(status){ if (status) {
wx.navigateTo({ wx.navigateTo({
url: "/pages/learn/exam-pass?userExamId=" + this.userExamId + "&examId=" + examId, url:
"/pages/learn/exam-pass?userExamId=" +
this.userExamId +
"&examId=" +
examId,
}); });
}else{ } else {
wx.navigateTo({ wx.navigateTo({
url: "/pages/learn/result?userExamId=" + this.userExamId + "&examId=" + examId, url:
"/pages/learn/result?userExamId=" +
this.userExamId +
"&examId=" +
examId,
}); });
} }
}, },
contentFilter(txt) { contentFilter(txt) {
if (!txt) { if (!txt) {
return txt return txt;
} }
let reg = /\w+\.?/; let reg = /\w+\.?/;
const result = txt.replace(reg, '') const result = txt.replace(reg, "");
return result return result;
}, },
//开始考试 点击 //开始考试 点击
startClick: function() { startClick: function () {
this.isStart = true this.isStart = true;
//this.getData() //this.getData()
//this.applyExam() //this.applyExam()
this.getUserExamInfo() this.getUserExamInfo();
}, },
//获取考试信息 //获取考试信息
getUserExamInfo: function() { getUserExamInfo: function () {
uni.showLoading({ uni.showLoading({
title: '请稍候' title: "请稍候",
}) });
let that = this let that = this;
uni.request({ uni.request({
url: systemApiUrl + url:
'/wxh-worker-rest/rest/exam' + systemApiUrl +
'/serviceRule/userExamInfo/' + "/wxh-worker-rest/rest/exam" +
"/serviceRule/userExamInfo/" +
that.vuex_token + that.vuex_token +
'?examId=' + this.examId, "?examId=" +
method: 'POST', this.examId,
method: "POST",
data: { data: {
//examId:this.examId, //examId:this.examId,
}, },
header: { header: {
'Content-Type': 'application/x-www-form-urlencoded' "Content-Type": "application/x-www-form-urlencoded",
}, },
success: (res) => { success: (res) => {
uni.hideLoading() uni.hideLoading();
if (!res.data) { if (!res.data) {
return return;
} }
if (res.data.code == 401 || res.data.code == 403) { if (res.data.code == 401 || res.data.code == 403) {
uni.navigateTo({ uni.navigateTo({
url: '/pages/login/wxlogin' url: "/pages/login/wxlogin",
}) });
return return;
} }
if (res.data.code == 200) { if (res.data.code == 200) {
//examStatus 用户考试状态 0考试中 1考试完成 2未参与 //examStatus 用户考试状态 0考试中 1考试完成 2未参与
if (res.data.data.examStatus == 2) { if (res.data.data.examStatus == 2) {
that.applyExam() that.applyExam();
return return;
} }
if (res.data.data.examStatus == 1) { if (res.data.data.examStatus == 1) {
console.log('111111111111111111111111111') console.log("111111111111111111111111111");
that.isComplete = true that.isComplete = true;
that.examScore = res.data.data.examScore that.examScore = res.data.data.examScore;
return return;
} }
if (res.data.data.examStatus == 0) { if (res.data.data.examStatus == 0) {
that.userExamId = res.data.data.id that.userExamId = res.data.data.id;
that.getNext() that.getNext();
} }
} else { } else {
uni.showToast({ uni.showToast({
icon: 'none', icon: "none",
title: res.data.message title: res.data.message,
}) });
} }
}, },
fail: (e) => { fail: (e) => {
uni.hideLoading() uni.hideLoading();
uni.showToast({ uni.showToast({
icon: 'none', icon: "none",
title: '获取考试信息失败' title: "获取考试信息失败",
}) });
} },
}) });
}, },
//申请考试 //申请考试
applyExam: function() { applyExam: function () {
uni.showLoading({ uni.showLoading({
title: '请稍候' title: "请稍候",
}) });
let that = this let that = this;
uni.request({ uni.request({
url: systemApiUrl + url:
'/wxh-worker-rest/rest/exam' + systemApiUrl +
'/serviceRule/' + "/wxh-worker-rest/rest/exam" +
"/serviceRule/" +
that.vuex_token + that.vuex_token +
'?examId=' + this.examId, "?examId=" +
method: 'POST', this.examId,
method: "POST",
data: { data: {
//examId:this.examId, //examId:this.examId,
}, },
header: { header: {
'Content-Type': 'application/x-www-form-urlencoded' "Content-Type": "application/x-www-form-urlencoded",
}, },
success: (res) => { success: (res) => {
uni.hideLoading() uni.hideLoading();
if (res.statusCode == 401) { if (res.statusCode == 401) {
uni.navigateTo({ uni.navigateTo({
url: '/pages/login/wxlogin' url: "/pages/login/wxlogin",
}) });
return return;
} }
if (res.data.code == 200) { if (res.data.code == 200) {
if (res.data.data.userExamId) { if (res.data.data.userExamId) {
that.userExamId = res.data.data.userExamId that.userExamId = res.data.data.userExamId;
//申请完考试设置倒计时总时间 //申请完考试设置倒计时总时间
let time = parseInt(this.timeDefine['time-id-' + this.examId]); let time = parseInt(
this.timeDefine["time-id-" + this.examId]
);
this.endTime = time; this.endTime = time;
// let timestamp = new Date().getTime(); // let timestamp = new Date().getTime();
// this.endTime = timestamp + time * 1000; // this.endTime = timestamp + time * 1000;
this.currentTime = parseInt(time * 1000);//this.formatTimeToMini(timestamp);//endTime-currentTime再格式化时间显示 this.currentTime = parseInt(time * 1000); //this.formatTimeToMini(timestamp);//endTime-currentTime再格式化时间显示
that.getNext() that.getNext();
console.log(
this.endTime,
this.currentTime,
"总时间"
);
} }
} else { } else {
uni.showToast({ uni.showToast({
icon: 'none', icon: "none",
title: res.data.message title: res.data.message,
}) });
} }
}, },
fail: (e) => { fail: (e) => {
uni.hideLoading() uni.hideLoading();
uni.showToast({ uni.showToast({
icon: 'none', icon: "none",
title: '申请考试 失败' title: "申请考试 失败",
}) });
} },
}) });
}, },
//获取下一题 //获取下一题
getNext: function() { getNext: function () {
var questionId = '' var questionId = "";
if (this.currentItem && if (
this.currentItem &&
this.currentItem.question && this.currentItem.question &&
this.currentItem.question.id) { this.currentItem.question.id
questionId = this.currentItem.question.id ) {
questionId = this.currentItem.question.id;
} }
uni.showLoading({ uni.showLoading({
title: '请稍候' title: "请稍候",
}) });
let that = this let that = this;
uni.request({ uni.request({
url: systemApiUrl + url:
'/wxh-worker-rest/rest/exam' + systemApiUrl +
'/serviceRule/next/' + "/wxh-worker-rest/rest/exam" +
"/serviceRule/next/" +
that.vuex_token + that.vuex_token +
'?userExamId=' + this.userExamId + "?userExamId=" +
'&questionId=' + questionId + this.userExamId +
'&userAnswerIds=' + (this.userAnswerIds || '9999'), // 9999超时自动下一题 "&questionId=" +
method: 'POST', questionId +
"&userAnswerIds=" +
(this.userAnswerIds || "9999"), // 9999超时自动下一题
method: "POST",
data: { data: {
// userExamId:this.userExamId, // userExamId:this.userExamId,
// questionId:this.currentItem.question.id, // questionId:this.currentItem.question.id,
// userAnswerIds:this.userAnswerIds, // userAnswerIds:this.userAnswerIds,
}, },
header: { header: {
'Content-Type': 'application/x-www-form-urlencoded' "Content-Type": "application/x-www-form-urlencoded",
}, },
success: (res) => { success: (res) => {
uni.hideLoading() uni.hideLoading();
if (res.statusCode == 401) { if (res.statusCode == 401) {
uni.navigateTo({ uni.navigateTo({
url: '/pages/login/wxlogin' url: "/pages/login/wxlogin",
}) });
return return;
} }
if (res.data.code == 200) { if (res.data.code == 200) {
that.currentItem = res.data.data that.currentItem = res.data.data;
that.progress = res.data.data.progress that.progress = res.data.data.progress;
if (res.data.data.answerList) { if (res.data.data.answerList) {
that.handleData() that.handleData();
// that.currentTime = 100 // that.currentTime = 100
this.everyTime = 90;//每道题90s this.everyTime = 90; //每道题90s
that.isSelect = false that.isSelect = false;
clearTimeout(this.timer) clearTimeout(this.timer);
that.startCounting() that.startCounting();
} else { } else {
that.isSelect = true that.isSelect = true;
that.getUserExamInfo() that.getUserExamInfo();
clearTimeout(this.timer) clearTimeout(this.timer);
this.isComplete = true this.isComplete = true;
//用来考完试判断跳转 //用来考完试判断跳转
this.examInfo = that.currentItem; this.examInfo = that.currentItem;
// that.bottomTitle = '完成考试,现在签约' // that.bottomTitle = '完成考试,现在签约'
} }
} else { } else {
uni.showToast({ uni.showToast({
icon: 'none', icon: "none",
title: res.data.message title: res.data.message,
}) });
} }
}, },
fail: (e) => { fail: (e) => {
uni.hideLoading() uni.hideLoading();
uni.showToast({ uni.showToast({
icon: 'none', icon: "none",
title: '获取下一题 失败' title: "获取下一题 失败",
}) });
} },
}) });
}, },
handleData: function() { handleData: function () {
this.currentItem.answerList.forEach((item, index) => { this.currentItem.answerList.forEach((item, index) => {
item.isSelect = false item.isSelect = false;
this.$set(this.currentItem.answerList, index, item) this.$set(this.currentItem.answerList, index, item);
}) });
}, },
startCounting: function() { startCounting: function () {
if (this.isStop) { if (this.isStop) {
return return;
} }
this.endTime = this.endTime - 1; this.endTime = this.endTime - 1;
this.currentTime = this.formatTimeToMini(this.endTime) this.currentTime = this.formatTimeToMini(this.endTime);
this.everyTime = this.everyTime - 1; this.everyTime = this.everyTime - 1;
if (this.everyTime > 0) { if (this.everyTime > 0) {
this.timer = setTimeout(this.startCounting, 1000); this.timer = setTimeout(this.startCounting, 1000);
} else { } else {
clearTimeout(this.timer) clearTimeout(this.timer);
this.everyTime = 90 this.everyTime = 90;
this.nextClick() this.nextClick();
} }
}, },
itemClick: function(currentItem, ikey) { itemClick: function (currentItem, ikey) {
this.isSelect = true this.isSelect = true;
// console.log('选点点击--处理前--this.currentItem:') // console.log('选点点击--处理前--this.currentItem:')
// console.log(this.currentItem) // console.log(this.currentItem)
...@@ -398,33 +427,38 @@ ...@@ -398,33 +427,38 @@
//answerType 题目类型,1单选,2多选,3简答, //answerType 题目类型,1单选,2多选,3简答,
for (let i = 0; i < this.currentItem.answerList.length; i++) { for (let i = 0; i < this.currentItem.answerList.length; i++) {
var item = this.currentItem.answerList[i] var item = this.currentItem.answerList[i];
if (this.currentItem.question.answerType == 2) { //多选 if (this.currentItem.question.answerType == 2) {
//多选
if (ikey == i) { if (ikey == i) {
item.isSelect = !item.isSelect item.isSelect = !item.isSelect;
} }
} else { //单选/简答 } else {
//单选/简答
if (ikey == i) { if (ikey == i) {
item.isSelect = !item.isSelect item.isSelect = !item.isSelect;
} else { } else {
item.isSelect = false item.isSelect = false;
} }
} }
this.$set(this.currentItem.answerList[i], isSelect, item.isSelect) this.$set(
this.currentItem.answerList[i],
isSelect,
item.isSelect
);
} }
var isSelect = false var isSelect = false;
this.currentItem.answerList.forEach(item => { this.currentItem.answerList.forEach((item) => {
if (item.isSelect) { if (item.isSelect) {
isSelect = true isSelect = true;
} }
}) });
//有选答案 //有选答案
this.isSelect = isSelect this.isSelect = isSelect;
// console.log('选点点击--处理后--this.currentItem.answerList:') // console.log('选点点击--处理后--this.currentItem.answerList:')
// console.log(this.currentItem.answerList) // console.log(this.currentItem.answerList)
...@@ -433,70 +467,71 @@ ...@@ -433,70 +467,71 @@
handleClick() { handleClick() {
// 判断有没有选 // 判断有没有选
if (!this.isSelect) { if (!this.isSelect) {
return return;
} }
this.nextClick() this.nextClick();
}, },
//下一题 //下一题
nextClick: function() { nextClick: function () {
clearTimeout(this.timer) clearTimeout(this.timer);
this.currentNumber = this.currentNumber + 1 this.currentNumber = this.currentNumber + 1;
//this.getData() //this.getData()
this.handleAnswer() this.handleAnswer();
//this.getNext() //this.getNext()
}, },
//上传考试结果 //上传考试结果
postResult: function() { postResult: function () {
uni.showLoading({ uni.showLoading({
title: '请稍候' title: "请稍候",
}) });
let that = this let that = this;
uni.request({ uni.request({
url: ucenterApiUrl + '/v1/settled/update-settled-exam-score' + url:
'?access-token=' + that.vuex_token, ucenterApiUrl +
method: 'POST', "/v1/settled/update-settled-exam-score" +
"?access-token=" +
that.vuex_token,
method: "POST",
data: { data: {
score: this.examScore || 0, score: this.examScore || 0,
}, },
success: (res) => { success: (res) => {
uni.hideLoading() uni.hideLoading();
if (res.statusCode == 401) { if (res.statusCode == 401) {
uni.navigateTo({ uni.navigateTo({
url: '/pages/login/wxlogin' url: "/pages/login/wxlogin",
}) });
return return;
} }
if (res.statusCode == 200) { if (res.statusCode == 200) {
// uni.navigateTo({ // uni.navigateTo({
// url: '/pages/settle/prompt' // url: '/pages/settle/prompt'
// }) // })
} else { } else {
uni.showToast({ uni.showToast({
icon: 'none', icon: "none",
title: "上传考试结果失败" title: "上传考试结果失败",
}) });
} }
}, },
fail: (e) => { fail: (e) => {
uni.hideLoading() uni.hideLoading();
uni.showToast({ uni.showToast({
icon: 'none', icon: "none",
title: '上传考试结果失败' title: "上传考试结果失败",
}) });
} },
}) });
}, },
//所选答案 //所选答案
handleAnswer: function() { handleAnswer: function () {
/* /*
userAnswerIds userAnswerIds
本题回答。 本题回答。
...@@ -506,47 +541,40 @@ ...@@ -506,47 +541,40 @@
*/ */
//每次清空 //每次清空
this.userAnswerIds = '' this.userAnswerIds = "";
this.currentItem.answerList.forEach(item => {
this.currentItem.answerList.forEach((item) => {
if (item.isSelect) { if (item.isSelect) {
//this.userAnswerIds = item.id + ',' + this.userAnswerIds //this.userAnswerIds = item.id + ',' + this.userAnswerIds
//answerType 题目类型,1单选,2多选,3简答, //answerType 题目类型,1单选,2多选,3简答,
if (this.currentItem.question.answerType == 2) { //多选 if (this.currentItem.question.answerType == 2) {
//多选
///* ///*
if (this.userAnswerIds.length == 0) { if (this.userAnswerIds.length == 0) {
this.userAnswerIds = item.id this.userAnswerIds = item.id;
} else { // if(this.userAnswerIds.length == 1) } else {
this.userAnswerIds = item.id + ',' + this.userAnswerIds // if(this.userAnswerIds.length == 1)
this.userAnswerIds =
item.id + "," + this.userAnswerIds;
} }
//*/ //*/
} else {
//单选
} else { //单选 this.userAnswerIds = item.id;
this.userAnswerIds = item.id
} }
} }
});
this.getNext();
})
this.getNext()
}, },
} },
} };
</script> </script>
<style lang="scss"> <style lang="scss">
.backView { .backView {
background-color: #F4F5F7; background-color: #f4f5f7;
position: absolute; position: absolute;
top: 0; top: 0;
left: 0; left: 0;
...@@ -554,55 +582,55 @@ ...@@ -554,55 +582,55 @@
height: 100%; height: 100%;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
overflow-y:auto; overflow-y: auto;
overflow-y:auto; overflow-y: auto;
} }
.noticeView { .noticeView {
margin-top: 100rpx; margin-top: 100rpx;
width: 100%; width: 100%;
display: flex; display: flex;
} }
.noticeText { .noticeText {
font-size: 32rpx; font-size: 32rpx;
color: #555555; color: #555555;
padding-left: 40rpx; padding-left: 40rpx;
padding-right: 40rpx; padding-right: 40rpx;
} }
.numberView { .numberView {
margin-top: 40rpx; margin-top: 40rpx;
width: 100%; width: 100%;
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
} }
.numberText { .numberText {
color: #333333; color: #333333;
font-size: 28rpx; font-size: 28rpx;
font-weight: bold; font-weight: bold;
} }
.topicView { .topicView {
margin-top: 40rpx; margin-top: 40rpx;
width: 100%; width: 100%;
display: flex; display: flex;
align-items: center; align-items: center;
margin-bottom: 40rpx; margin-bottom: 40rpx;
} }
.topicText { .topicText {
color: #333333; color: #333333;
font-size: 32rpx; font-size: 32rpx;
line-height: 48rpx; line-height: 48rpx;
font-weight: bold; font-weight: bold;
} }
.itemView { .itemView {
margin-top: 30rpx; margin-top: 30rpx;
background-color: #F4F5F7; background-color: #f4f5f7;
width: 100%; width: 100%;
padding: 40rpx 30rpx; padding: 40rpx 30rpx;
display: flex; display: flex;
...@@ -611,12 +639,12 @@ ...@@ -611,12 +639,12 @@
border: 2rpx solid transparent; border: 2rpx solid transparent;
font-size: 28rpx; font-size: 28rpx;
&.active { &.active {
background-color: #FFFFFF; background-color: #ffffff;
border: 2rpx solid #2272FF; border: 2rpx solid #2272ff;
}
} }
}
.itemIndexView { .itemIndexView {
width: 40rpx; width: 40rpx;
height: 40rpx; height: 40rpx;
border-radius: 8rpx; border-radius: 8rpx;
...@@ -624,18 +652,18 @@ ...@@ -624,18 +652,18 @@
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
flex-shrink:0 flex-shrink: 0;
} }
.grayBorder { .grayBorder {
border: 2rpx solid #999999; border: 2rpx solid #999999;
} }
.gray-color { .gray-color {
color: #999999; color: #999999;
} }
.itemIndexText { .itemIndexText {
border-radius: 8rpx; border-radius: 8rpx;
width: 36rpx; width: 36rpx;
height: 36rpx; height: 36rpx;
...@@ -643,15 +671,15 @@ ...@@ -643,15 +671,15 @@
line-height: 36rpx; line-height: 36rpx;
text-align: center; text-align: center;
font-size: 28rpx; font-size: 28rpx;
} }
.itemText { .itemText {
margin-left: 20rpx; margin-left: 20rpx;
font-size: 28rpx; font-size: 28rpx;
} }
.bottomView { .bottomView {
background-color: #FFFFFF; background-color: #ffffff;
width: 100%; width: 100%;
height: 140rpx; height: 140rpx;
display: flex; display: flex;
...@@ -659,40 +687,40 @@ ...@@ -659,40 +687,40 @@
justify-content: center; justify-content: center;
position: fixed; position: fixed;
bottom: 0; bottom: 0;
} }
.bottomBtn { .bottomBtn {
background-color: #007AFF; background-color: #007aff;
width: 60%; width: 60%;
height: 80rpx; height: 80rpx;
border-radius: 40rpx; border-radius: 40rpx;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
} }
.bottomTitle { .bottomTitle {
font-size: 32rpx; font-size: 32rpx;
color: #FFFFFF; color: #ffffff;
} }
.title-view { .title-view {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
.title-text { .title-text {
border-radius: 8rpx; border-radius: 8rpx;
background-color: #FF930D; background-color: #ff930d;
font-size: 20rpx; font-size: 20rpx;
color: #FFFFFF; color: #ffffff;
width: 72rpx; width: 72rpx;
height: 40rpx; height: 40rpx;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
&.radio { &.radio {
background-color: #2272FF; background-color: #2272ff;
} }
} }
...@@ -717,52 +745,52 @@ ...@@ -717,52 +745,52 @@
text-align: right; text-align: right;
} }
} }
} }
.bottomRightView { .bottomRightView {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
align-items: center; align-items: center;
margin-right: 30rpx; margin-right: 30rpx;
} }
.nextBtn { .nextBtn {
width: 300rpx; width: 300rpx;
height: 104rpx; height: 104rpx;
border-radius: 52rpx; border-radius: 52rpx;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
} }
.defaultColor { .defaultColor {
color: #333333; color: #333333;
} }
.defaultBackColor { .defaultBackColor {
background-color: #D1D4D4; background-color: #d1d4d4;
} }
.selectedColor { .selectedColor {
color: #2272FF; color: #2272ff;
} }
.whiteColor { .whiteColor {
color: #FFFFFF; color: #ffffff;
} }
.selectBackColor { .selectBackColor {
background-color: #2272FF; background-color: #2272ff;
} }
.bottom-padding { .bottom-padding {
// margin-bottom: 188rpx; // margin-bottom: 188rpx;
background-color: #FFFFFF; background-color: #ffffff;
border-radius: 12rpx; border-radius: 12rpx;
padding: 40rpx 30rpx 40rpx 30rpx; padding: 40rpx 30rpx 40rpx 30rpx;
} }
.answerBottomView { .answerBottomView {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
...@@ -781,10 +809,9 @@ ...@@ -781,10 +809,9 @@
margin-left: 30rpx; margin-left: 30rpx;
} }
} }
}
} .mask {
.mask {
position: fixed; position: fixed;
left: 0; left: 0;
width: 100%; width: 100%;
...@@ -794,9 +821,9 @@ ...@@ -794,9 +821,9 @@
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
background: rgba(0, 0, 0, 0.5); background: rgba(0, 0, 0, 0.5);
} }
.box { .box {
width: 660rpx; width: 660rpx;
height: 696rpx; height: 696rpx;
padding: 0 70rpx; padding: 0 70rpx;
...@@ -816,7 +843,7 @@ ...@@ -816,7 +843,7 @@
font-weight: bold; font-weight: bold;
font-size: 40rpx; font-size: 40rpx;
line-height: 66rpx; line-height: 66rpx;
color: #2272FF; color: #2272ff;
text-align: center; text-align: center;
} }
...@@ -827,5 +854,5 @@ ...@@ -827,5 +854,5 @@
font-size: 32rpx; font-size: 32rpx;
color: #fff; color: #fff;
} }
} }
</style> </style>
...@@ -8,16 +8,16 @@ ...@@ -8,16 +8,16 @@
></u-navbar> ></u-navbar>
<view class="content"> <view class="content">
<text class="title">合同清单</text> <text class="title">合同清单</text>
<view class="jf-currency-class" v-for="item in res" :key="item.id"> <view
class="jf-currency-class"
v-for="item in res"
:key="item.id"
@click="goBaidu(item.url)"
>
<view class="left">{{ item.name }}</view> <view class="left">{{ item.name }}</view>
<view class="text1">《{{ item.name }}》</view> <view class="text1">《{{ item.name }}》</view>
<view class="text2">下载时间: {{ item.create_at }}</view> <view class="text2">下载时间: {{ item.create_at }}</view>
</view> </view>
<!-- <view class="jf-currency-class">
<view class="left">新风机技工入驻签约合同</view>
<view class="text1">《新风机技工入驻签约合同》</view>
<view class="text2">下载时间: 2021.05.06 15:01:48</view>
</view> -->
</view> </view>
</view> </view>
</template> </template>
...@@ -28,14 +28,6 @@ export default { ...@@ -28,14 +28,6 @@ export default {
return { return {
background: { background: {
backgroundColor: "#F4F5F7", backgroundColor: "#F4F5F7",
// 导航栏背景图
// background: 'url(https://cdn.uviewui.com/uview/swiper/1.jpg) no-repeat',
// 还可以设置背景图size属性
// backgroundSize: 'cover',
// 渐变色
// backgroundImage: 'linear-gradient(45deg, rgb(28, 187, 180), rgb(141, 198, 63))'
}, },
res: [], res: [],
type: "充电桩", type: "充电桩",
...@@ -52,50 +44,37 @@ export default { ...@@ -52,50 +44,37 @@ export default {
if (res.data) { if (res.data) {
let length = res.data.length; let length = res.data.length;
for (let i = 0; i < length; i++) { for (let i = 0; i < length; i++) {
var re = /[^\u4e00-\u9fa5]/gi;
// res.data.name = res.data.name.replace(re, "");
let data = new Date( let data = new Date(
Number(res.data[i].create_at) * 1000 Number(res.data[i].create_at) * 1000
); );
res.data[i].create_at = moment(data).format( res.data[i].create_at = moment(data).format(
"yyyy.MM.DD HH:mm:ss" "yyyy.MM.DD HH:mm:ss"
); );
res.data[i].name = res.data[i].name.replace(re, "");
} }
this.res = this.res.concat(res.data); this.res = this.res.concat(res.data);
console.log(this.res); console.log(this.res);
} }
} else { } else {
console.log(res.code); //接口请求失败的处理
uni.showToast({
title: res.message,
icon: "none",
});
} }
}); });
}, },
add0(m) { goBaidu(a) {
return m < 10 ? "0" + m : m; getApp().globalData.contractUrl = a;
wx.navigateTo({
url: "./out",
success: function () {}, //成功回调
fail: function () {},
complete: function () {},
});
}, },
// format(shijianchuo) {
// //shijianchuo是整数,否则要parseInt转换
// var time = new Date(shijianchuo * 1000);
// var y = time.getFullYear();
// var m = time.getMonth() + 1;
// var d = time.getDate();
// var h = time.getHours();
// var mm = time.getMinutes();
// var s = time.getSeconds();
// return (
// y +
// "." +
// this.add0(m) +
// "." +
// this.add0(d) +
// " " +
// this.add0(h) +
// ":" +
// this.add0(mm) +
// ":" +
// this.add0(s)
// );
// // },
// gettime(time) {
// moment(new Date(time).format("yyyy.MM.DD HH:mm:ss"));
// },
}, },
}; };
</script> </script>
...@@ -122,7 +101,6 @@ export default { ...@@ -122,7 +101,6 @@ export default {
} }
.jf-currency-class { .jf-currency-class {
width: 100%; width: 100%;
height: 180rpx;
border-radius: 12rpx; border-radius: 12rpx;
padding-top: 40rpx; padding-top: 40rpx;
margin-top: 74rpx; margin-top: 74rpx;
......
<template>
<view>
<web-view :src="url"></web-view>
</view>
</template>
<script>
export default {
data() {
return {
url: "",
};
},
onLoad(option) {
this.url = option.url;
var app = getApp();
this.url = app.globalData.contractUrl;
console.log(app.globalData, "这是个标识符");
},
methods: {},
};
</script>
<style>
</style>
\ No newline at end of file
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