This commit is contained in:
itgaojian163 2023-02-07 21:47:50 +08:00
parent 0aa7f77cbf
commit a70dce6f44
7 changed files with 107 additions and 87 deletions

View File

@ -1,9 +1,9 @@
// const userCenterBaseUrl = 'http://192.168.0.107:7001/usercenter';
const userCenterBaseUrl = 'http://211.82.137.19:8188/usercenter'; //正式服务器
const userCenterBaseUrl = 'http://121.36.71.250:58033/usercenter'; //正式服务器
// const evalutaionBaseUrl = 'http://127.0.0.1:7003/evaluation';
// const evalutaionBaseUrl = 'http://192.168.0.110:7003/evaluation';
// const evalutaionBaseUrl = 'http://39.104.74.123:8082/evaluation'; //正式服务器
const evalutaionBaseUrl = 'http://211.82.137.19:8188/evaluation'; //正式服务器
const evalutaionBaseUrl = 'http://121.36.71.250:58033/evaluation'; //正式服务器
const missionList = evalutaionBaseUrl + '/app/apptask/listtasktoapp';
function pathArgsHasSameValue(pathArgArray) {

View File

@ -1,8 +1,5 @@
<template>
<view>
<iframe ref="iframe" id="iframe" :srcdoc="data" style="width:100%;" scrolling="no"
onload="this.height=this.contentWindow.document.documentElement.scrollHeight"></iframe>
<web-view :src="webUrl"></web-view>
</view>
</template>
@ -71,7 +68,11 @@
key: 'appToken',
success: res => {
_self.token = res.data;
_self.getHtml(ldRes.taskId, ldRes.rid);
_self.webUrl = common.evalutaionBaseUrl +
'/app/apptask/getoptiontemplatedefault-release/' +
ldRes.taskId + "?token=" + _self.token;
console.log(_self.webUrl)
// _self.getHtml(ldRes.taskId, ldRes.rid);
// console.log(_self.webviewStyles)
// _self.webviewStyles.additionalHttpHeaders = {
// token: _self.token

View File

@ -45,12 +45,9 @@
// _self.createView(ldRes.taskId, ldRes.rid)
// // #endif
// // #ifdef H5
_self.webUrl = common.evalutaionBaseUrl + '/app/apptask/getoptiontemplatedefaultresult/' +
ldRes.taskId + '/' + ldRes.rid;
_self.webUrl = common.evalutaionBaseUrl + '/app/apptask/getoptiontemplatedefaultresult-release/' +
ldRes.taskId + '/' + ldRes.rid + "?token=" + _self.token;
console.log(_self.webUrl)
_self.webstyle.additionalHttpHeaders = {
token: _self.token
}
// // #endif
}

View File

@ -2,11 +2,13 @@
<view>
<view class="search">
<view class="input-box">
<input class="input-font" placeholder="请输入关键字" type="text" v-model="keyword" placeholder-class="input-placeholder" />
<input class="input-font" placeholder="请输入关键字" type="text" v-model="keyword"
placeholder-class="input-placeholder" />
<image src="../../static/ic_search.png" style="width: 70rpx;height: 70rpx;margin-right: 20rpx;"></image>
</view>
</view>
<view v-if="evaluations.length>0" style="display: flex;flex-direction: column;justify-content: center;width: 100%;">
<view v-if="evaluations.length>0"
style="display: flex;flex-direction: column;justify-content: center;width: 100%;">
<view class="content" v-for="(evaluation,index) in evaluations" :key="index" @tap="itemClick(evaluation)"
:data-taskid="evaluation.taskId">
<view class="item-li">
@ -29,11 +31,13 @@
</view>
</view>
<view class="item-count-tag">
<view class="item-count-yet">{{evaluation.taskRecordSubmitCount.substring(0,evaluation.taskRecordSubmitCount.lastIndexOf('|'))}}
<view class="item-count-yet">
{{evaluation.taskRecordSubmitCount.substring(0,evaluation.taskRecordSubmitCount.lastIndexOf('|'))}}
</view>
<text style="color: #FFFFFF;" space="emsp" decode="true">{{divider}}</text>
<view class="item-count-not">
{{evaluation.taskRecordSubmitCount.substring(evaluation.taskRecordSubmitCount.lastIndexOf('未'),evaluation.taskRecordSubmitCount.length)}}</view>
{{evaluation.taskRecordSubmitCount.substring(evaluation.taskRecordSubmitCount.lastIndexOf('未'),evaluation.taskRecordSubmitCount.length)}}
</view>
</view>
</view>
</view>
@ -42,7 +46,8 @@
<view v-else>
<emptyView></emptyView>
</view>
<yomol-upgrade :type="upgradeType" :url="upgradeUrl" title="发现新版本" :content="upgradeContent" ref="yomolUpgrade"></yomol-upgrade>
<yomol-upgrade :type="upgradeType" :url="upgradeUrl" title="发现新版本" :content="upgradeContent" ref="yomolUpgrade">
</yomol-upgrade>
</view>
</template>
@ -99,7 +104,10 @@
});
}
_self.token = appToken
// #ifdef APP-PLUS
_self.checkAppVersion();
// #endif
},
onPullDownRefresh() {
var self = this;
@ -110,7 +118,8 @@
checkAppVersion() {
var versionUrl = common.userCenterBaseUrl +
'/app/appversion/getappversionnumber/240fbf7a-aa32-4cde-9674-5147a7d5eb2f'
var downloadUrl = common.userCenterBaseUrl + '/app/appversion/downloadapp/240fbf7a-aa32-4cde-9674-5147a7d5eb2f'
var downloadUrl = common.userCenterBaseUrl +
'/app/appversion/downloadapp/240fbf7a-aa32-4cde-9674-5147a7d5eb2f'
uni.request({
url: versionUrl,
header: {
@ -210,6 +219,7 @@
top: 0;
background-color: #FFFFFF;
}
.input-box {
margin-top: 10rpx;
width: 90%;
@ -234,6 +244,7 @@
border: #666666 solid #555555;
border-radius: 15rpx;
}
.item-count {
font-size: 15rpx;
display: flex;

View File

@ -1,6 +1,7 @@
<template>
<view>
<view v-if="evaluations.length>0" style="display: flex;flex-direction: column;justify-content: center;width: 100%;margin-top: 10rpx;">
<view v-if="evaluations.length>0"
style="display: flex;flex-direction: column;justify-content: center;width: 100%;margin-top: 10rpx;">
<view class="content" v-for="(evaluation,index) in evaluations" :key="index" @tap="itemClick(evaluation)"
:data-taskid="evaluation.evaluationId">
<view class="item-li">
@ -11,7 +12,8 @@
<view v-else>
<emptyView></emptyView>
</view>
<yomol-upgrade :type="upgradeType" :url="upgradeUrl" title="发现新版本" :content="upgradeContent" ref="yomolUpgrade"></yomol-upgrade>
<yomol-upgrade :type="upgradeType" :url="upgradeUrl" title="发现新版本" :content="upgradeContent" ref="yomolUpgrade">
</yomol-upgrade>
</view>
</template>
@ -59,14 +61,17 @@
});
}
_self.token = appToken
// #ifdef APP-PLUS
_self.checkAppVersion();
// #endif
_self.initData();
},
methods: {
checkAppVersion() {
var versionUrl = common.userCenterBaseUrl +
'/app/appversion/getappversionnumber/240fbf7a-aa32-4cde-9674-5147a7d5eb2f'
var downloadUrl = common.userCenterBaseUrl + '/app/appversion/downloadapp/240fbf7a-aa32-4cde-9674-5147a7d5eb2f'
var downloadUrl = common.userCenterBaseUrl +
'/app/appversion/downloadapp/240fbf7a-aa32-4cde-9674-5147a7d5eb2f'
uni.request({
url: versionUrl,
header: {
@ -119,7 +124,7 @@
},
itemClick(e) {
uni.navigateTo({
url:'indexTwo?id='+ e.evaluationId,
url: 'indexTwo?id=' + e.evaluationId,
})
// uni.navigateTo({

View File

@ -1,7 +1,7 @@
<template>
<view>
<view>
<view style="position: fixed;top: 0;background-color: #FFFFFF;">
<view style="position: fixed;top: 100rpx;background-color: #FFFFFF;">
<QSTabs :current="current_1" line2Style="tab-line1" defaultColor="#888" activeColor="#008B8B" :tabs="tabList" width="245"
@change="tabChange($event, '1')" />
<view class="search">

View File

@ -1,5 +1,6 @@
<template>
<view>
<web-view :src="webUrl"></web-view>
</view>
</template>
@ -11,23 +12,25 @@
data() {
const token = '';
return {
token: ''
token: '',
webUrl: "",
};
},
methods: {
createView(taskid,trid) {
var url = common.evalutaionBaseUrl + '/app/apptask/getoptiontemplatedefaulttemporary/' + taskid+'/'+trid
wv = plus.webview.create(url, "custom-webview", {
top: uni.getSystemInfoSync().statusBarHeight + 44,
bottom: '0px',
additionalHttpHeaders: {
token: _self.token
}
})
// wv.loadURL(url)
var currentWebview = this.$mp.page.$getAppWebview()
currentWebview.append(wv);
setTimeout(function() {}, 1000);
createView(taskid, trid) {
var url = common.evalutaionBaseUrl + '/app/apptask/getoptiontemplatedefaulttemporary/' + taskid + '/' +
trid + "?token="
// wv = plus.webview.create(url, "custom-webview", {
// top: uni.getSystemInfoSync().statusBarHeight + 44,
// bottom: '0px',
// additionalHttpHeaders: {
// token: _self.token
// }
// })
// // wv.loadURL(url)
// var currentWebview = this.$mp.page.$getAppWebview()
// currentWebview.append(wv);
// setTimeout(function() {}, 1000);
}
},
onLoad(ldRes) {
@ -37,7 +40,10 @@
key: 'appToken',
success: res => {
_self.token = res.data;
_self.createView(ldRes.taskId,ldRes.trid)
_self.webUrl = common.evalutaionBaseUrl +
'/app/apptask/getoptiontemplatedefaulttemporary-release/' +
ldRes.taskId + '/' +
ldRes.trid + "?token=" + _self.token;
}
});
},