适配H5
This commit is contained in:
parent
0aa7f77cbf
commit
a70dce6f44
@ -1,9 +1,9 @@
|
|||||||
// const userCenterBaseUrl = 'http://192.168.0.107:7001/usercenter';
|
// 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://127.0.0.1:7003/evaluation';
|
||||||
// const evalutaionBaseUrl = 'http://192.168.0.110:7003/evaluation';
|
// const evalutaionBaseUrl = 'http://192.168.0.110:7003/evaluation';
|
||||||
// const evalutaionBaseUrl = 'http://39.104.74.123:8082/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';
|
const missionList = evalutaionBaseUrl + '/app/apptask/listtasktoapp';
|
||||||
|
|
||||||
function pathArgsHasSameValue(pathArgArray) {
|
function pathArgsHasSameValue(pathArgArray) {
|
||||||
|
@ -1,8 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<view>
|
<web-view :src="webUrl"></web-view>
|
||||||
<iframe ref="iframe" id="iframe" :srcdoc="data" style="width:100%;" scrolling="no"
|
|
||||||
onload="this.height=this.contentWindow.document.documentElement.scrollHeight"></iframe>
|
|
||||||
|
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -71,7 +68,11 @@
|
|||||||
key: 'appToken',
|
key: 'appToken',
|
||||||
success: res => {
|
success: res => {
|
||||||
_self.token = res.data;
|
_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)
|
// console.log(_self.webviewStyles)
|
||||||
// _self.webviewStyles.additionalHttpHeaders = {
|
// _self.webviewStyles.additionalHttpHeaders = {
|
||||||
// token: _self.token
|
// token: _self.token
|
||||||
|
@ -45,12 +45,9 @@
|
|||||||
// _self.createView(ldRes.taskId, ldRes.rid)
|
// _self.createView(ldRes.taskId, ldRes.rid)
|
||||||
// // #endif
|
// // #endif
|
||||||
// // #ifdef H5
|
// // #ifdef H5
|
||||||
_self.webUrl = common.evalutaionBaseUrl + '/app/apptask/getoptiontemplatedefaultresult/' +
|
_self.webUrl = common.evalutaionBaseUrl + '/app/apptask/getoptiontemplatedefaultresult-release/' +
|
||||||
ldRes.taskId + '/' + ldRes.rid;
|
ldRes.taskId + '/' + ldRes.rid + "?token=" + _self.token;
|
||||||
console.log(_self.webUrl)
|
console.log(_self.webUrl)
|
||||||
_self.webstyle.additionalHttpHeaders = {
|
|
||||||
token: _self.token
|
|
||||||
}
|
|
||||||
// // #endif
|
// // #endif
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -2,11 +2,13 @@
|
|||||||
<view>
|
<view>
|
||||||
<view class="search">
|
<view class="search">
|
||||||
<view class="input-box">
|
<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>
|
<image src="../../static/ic_search.png" style="width: 70rpx;height: 70rpx;margin-right: 20rpx;"></image>
|
||||||
</view>
|
</view>
|
||||||
</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)"
|
<view class="content" v-for="(evaluation,index) in evaluations" :key="index" @tap="itemClick(evaluation)"
|
||||||
:data-taskid="evaluation.taskId">
|
:data-taskid="evaluation.taskId">
|
||||||
<view class="item-li">
|
<view class="item-li">
|
||||||
@ -29,11 +31,13 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="item-count-tag">
|
<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>
|
</view>
|
||||||
<text style="color: #FFFFFF;" space="emsp" decode="true">{{divider}}</text>
|
<text style="color: #FFFFFF;" space="emsp" decode="true">{{divider}}</text>
|
||||||
<view class="item-count-not">
|
<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>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@ -42,7 +46,8 @@
|
|||||||
<view v-else>
|
<view v-else>
|
||||||
<emptyView></emptyView>
|
<emptyView></emptyView>
|
||||||
</view>
|
</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>
|
</view>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
@ -99,7 +104,10 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
_self.token = appToken
|
_self.token = appToken
|
||||||
|
// #ifdef APP-PLUS
|
||||||
_self.checkAppVersion();
|
_self.checkAppVersion();
|
||||||
|
// #endif
|
||||||
|
|
||||||
},
|
},
|
||||||
onPullDownRefresh() {
|
onPullDownRefresh() {
|
||||||
var self = this;
|
var self = this;
|
||||||
@ -110,7 +118,8 @@
|
|||||||
checkAppVersion() {
|
checkAppVersion() {
|
||||||
var versionUrl = common.userCenterBaseUrl +
|
var versionUrl = common.userCenterBaseUrl +
|
||||||
'/app/appversion/getappversionnumber/240fbf7a-aa32-4cde-9674-5147a7d5eb2f'
|
'/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({
|
uni.request({
|
||||||
url: versionUrl,
|
url: versionUrl,
|
||||||
header: {
|
header: {
|
||||||
@ -210,6 +219,7 @@
|
|||||||
top: 0;
|
top: 0;
|
||||||
background-color: #FFFFFF;
|
background-color: #FFFFFF;
|
||||||
}
|
}
|
||||||
|
|
||||||
.input-box {
|
.input-box {
|
||||||
margin-top: 10rpx;
|
margin-top: 10rpx;
|
||||||
width: 90%;
|
width: 90%;
|
||||||
@ -234,6 +244,7 @@
|
|||||||
border: #666666 solid #555555;
|
border: #666666 solid #555555;
|
||||||
border-radius: 15rpx;
|
border-radius: 15rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
.item-count {
|
.item-count {
|
||||||
font-size: 15rpx;
|
font-size: 15rpx;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<view>
|
<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)"
|
<view class="content" v-for="(evaluation,index) in evaluations" :key="index" @tap="itemClick(evaluation)"
|
||||||
:data-taskid="evaluation.evaluationId">
|
:data-taskid="evaluation.evaluationId">
|
||||||
<view class="item-li">
|
<view class="item-li">
|
||||||
@ -11,7 +12,8 @@
|
|||||||
<view v-else>
|
<view v-else>
|
||||||
<emptyView></emptyView>
|
<emptyView></emptyView>
|
||||||
</view>
|
</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>
|
</view>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
@ -59,14 +61,17 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
_self.token = appToken
|
_self.token = appToken
|
||||||
|
// #ifdef APP-PLUS
|
||||||
_self.checkAppVersion();
|
_self.checkAppVersion();
|
||||||
|
// #endif
|
||||||
_self.initData();
|
_self.initData();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
checkAppVersion() {
|
checkAppVersion() {
|
||||||
var versionUrl = common.userCenterBaseUrl +
|
var versionUrl = common.userCenterBaseUrl +
|
||||||
'/app/appversion/getappversionnumber/240fbf7a-aa32-4cde-9674-5147a7d5eb2f'
|
'/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({
|
uni.request({
|
||||||
url: versionUrl,
|
url: versionUrl,
|
||||||
header: {
|
header: {
|
||||||
@ -119,7 +124,7 @@
|
|||||||
},
|
},
|
||||||
itemClick(e) {
|
itemClick(e) {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url:'indexTwo?id='+ e.evaluationId,
|
url: 'indexTwo?id=' + e.evaluationId,
|
||||||
})
|
})
|
||||||
|
|
||||||
// uni.navigateTo({
|
// uni.navigateTo({
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
<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"
|
<QSTabs :current="current_1" line2Style="tab-line1" defaultColor="#888" activeColor="#008B8B" :tabs="tabList" width="245"
|
||||||
@change="tabChange($event, '1')" />
|
@change="tabChange($event, '1')" />
|
||||||
<view class="search">
|
<view class="search">
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<view>
|
<view>
|
||||||
|
<web-view :src="webUrl"></web-view>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -11,23 +12,25 @@
|
|||||||
data() {
|
data() {
|
||||||
const token = '';
|
const token = '';
|
||||||
return {
|
return {
|
||||||
token: ''
|
token: '',
|
||||||
|
webUrl: "",
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
createView(taskid,trid) {
|
createView(taskid, trid) {
|
||||||
var url = common.evalutaionBaseUrl + '/app/apptask/getoptiontemplatedefaulttemporary/' + taskid+'/'+trid
|
var url = common.evalutaionBaseUrl + '/app/apptask/getoptiontemplatedefaulttemporary/' + taskid + '/' +
|
||||||
wv = plus.webview.create(url, "custom-webview", {
|
trid + "?token="
|
||||||
top: uni.getSystemInfoSync().statusBarHeight + 44,
|
// wv = plus.webview.create(url, "custom-webview", {
|
||||||
bottom: '0px',
|
// top: uni.getSystemInfoSync().statusBarHeight + 44,
|
||||||
additionalHttpHeaders: {
|
// bottom: '0px',
|
||||||
token: _self.token
|
// additionalHttpHeaders: {
|
||||||
}
|
// token: _self.token
|
||||||
})
|
// }
|
||||||
// wv.loadURL(url)
|
// })
|
||||||
var currentWebview = this.$mp.page.$getAppWebview()
|
// // wv.loadURL(url)
|
||||||
currentWebview.append(wv);
|
// var currentWebview = this.$mp.page.$getAppWebview()
|
||||||
setTimeout(function() {}, 1000);
|
// currentWebview.append(wv);
|
||||||
|
// setTimeout(function() {}, 1000);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
onLoad(ldRes) {
|
onLoad(ldRes) {
|
||||||
@ -37,7 +40,10 @@
|
|||||||
key: 'appToken',
|
key: 'appToken',
|
||||||
success: res => {
|
success: res => {
|
||||||
_self.token = res.data;
|
_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;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user