Browse Source

app判断

hella_vue3
zhang_li 7 months ago
parent
commit
e19c63b2d3
  1. 58
      src/pages/point/index.vue

58
src/pages/point/index.vue

@ -3,12 +3,17 @@
<view class="" style="position: absolute; bottom:80px ;left: 30px;z-index: 99999;"> <view class="" style="position: absolute; bottom:80px ;left: 30px;z-index: 99999;">
打印 打印
</view> </view>
<!-- #ifdef APP -->
<web-view src="/hybrid/html/point.html" :fullscreen='false' :webview-styles="webviewStyles"></web-view> <web-view src="/hybrid/html/point.html" :fullscreen='false' :webview-styles="webviewStyles"></web-view>
<!-- #endif -->
</view> </view>
</template> </template>
<script> <script>
const htmlFileUrl = '/hybrid/html/point.html'; const htmlFileUrl = '/hybrid/html/point.html';
import {
getList
} from '@/api/request2.js';
export default { export default {
data() { data() {
return { return {
@ -17,16 +22,13 @@
color: '#FF3333' color: '#FF3333'
}, },
width: '100%', width: '100%',
height: '600px', height: '500px',
} }
} }
}, },
mounted() {
},
methods: { methods: {
// #ifdef APP
readFile(path, callback) { readFile(path, callback) {
plus.io.resolveLocalFileSystemURL(path, function(entry) { plus.io.resolveLocalFileSystemURL(path, function(entry) {
entry.file(function(file) { entry.file(function(file) {
@ -42,24 +44,40 @@
console.log("获取图片资源失败:" + e.message); console.log("获取图片资源失败:" + e.message);
}); });
} }
// #endif
}, },
onShow() { onShow() {
this.readFile(htmlFileUrl, function(htmlContent) { // this.readFile(htmlFileUrl, function(htmlContent) {
console.log(htmlContent); // HTML // console.log(htmlContent); // HTML
console.log(typeof htmlContent); // HTML // console.log(typeof htmlContent); // HTML
});
// uni.request({
// url: htmlFileUrl,
// method: 'GET',
// success: function(res) {
// // res.dataHTML
// var htmlString = res.data;
// console.log(htmlString);
// },
// fail: function(error) {
// console.error('HTML:', error);
// }
// }); // });
// #ifdef APP
console.log(11)
var filters = []
if (this.checkedToday) {
filters.push({
column: "request_time",
action: "betweeen",
value: this.todayTime
})
}
console.log(22)
var params = {
filters: filters,
pageNo: this.pageNo,
pageSize: this.pageSize,
}
console.log(33)
getList(params).then(res => {
console.log(44)
this.data = res.data.list[7]
console.log(this.data)
}).catch(error => {
console.log(55)
this.showMessage(error)
})
// #endif
}, },
} }

Loading…
Cancel
Save