Browse Source

app判断

hella_vue3
zhang_li 5 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>
<!-- #ifdef APP -->
<web-view src="/hybrid/html/point.html" :fullscreen='false' :webview-styles="webviewStyles"></web-view>
<!-- #endif -->
</view>
</template>
<script>
const htmlFileUrl = '/hybrid/html/point.html';
import {
getList
} from '@/api/request2.js';
export default {
data() {
return {
@ -17,16 +22,13 @@
color: '#FF3333'
},
width: '100%',
height: '600px',
height: '500px',
}
}
},
mounted() {
},
methods: {
// #ifdef APP
readFile(path, callback) {
plus.io.resolveLocalFileSystemURL(path, function(entry) {
entry.file(function(file) {
@ -42,24 +44,40 @@
console.log("获取图片资源失败:" + e.message);
});
}
// #endif
},
onShow() {
this.readFile(htmlFileUrl, function(htmlContent) {
console.log(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);
// }
// this.readFile(htmlFileUrl, function(htmlContent) {
// console.log(htmlContent); // HTML
// console.log(typeof htmlContent); // HTML
// });
// #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