scan test
This commit is contained in:
parent
9afa52f9a5
commit
64ce37cd83
|
@ -7,14 +7,15 @@ Page({
|
||||||
data: {
|
data: {
|
||||||
|
|
||||||
},
|
},
|
||||||
bindusernameInput: function (e) {
|
usernameChange: function (e) {
|
||||||
this.data.username = e.detail.value
|
this.data.username = e.detail.value
|
||||||
},
|
},
|
||||||
bindpasswordInput: function (e) {
|
passwordChange: function (e) {
|
||||||
this.data.password = e.detail.value
|
this.data.password = e.detail.value
|
||||||
},
|
},
|
||||||
denglu: function(){
|
denglu: function(){
|
||||||
var that=this
|
var that=this
|
||||||
|
console.log(that.data)
|
||||||
wx.request({
|
wx.request({
|
||||||
url: getApp().globalData.serverUrl + 'bindmp',
|
url: getApp().globalData.serverUrl + 'bindmp',
|
||||||
header: {
|
header: {
|
||||||
|
@ -62,7 +63,7 @@ Page({
|
||||||
* 生命周期函数--监听页面显示
|
* 生命周期函数--监听页面显示
|
||||||
*/
|
*/
|
||||||
onShow: function () {
|
onShow: function () {
|
||||||
|
wx.hideHomeButton()
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -98,5 +99,33 @@ Page({
|
||||||
*/
|
*/
|
||||||
onShareAppMessage: function () {
|
onShareAppMessage: function () {
|
||||||
|
|
||||||
|
},
|
||||||
|
intro:function(){
|
||||||
|
let fileurl = getApp().globalData.serverUrl + 'media/安全生产管理系统-国检集团.docx'
|
||||||
|
wx.showLoading({
|
||||||
|
title: '下载中...',
|
||||||
|
})
|
||||||
|
console.log(fileurl)
|
||||||
|
wx.downloadFile({
|
||||||
|
url: fileurl,
|
||||||
|
success(res) {
|
||||||
|
const filePath = res.tempFilePath
|
||||||
|
console.log(filePath)
|
||||||
|
var filetype
|
||||||
|
if (fileurl.indexOf(".docx") != -1) {
|
||||||
|
filetype = 'docx'
|
||||||
|
}
|
||||||
|
wx.openDocument({
|
||||||
|
filePath,
|
||||||
|
fileType: filetype,
|
||||||
|
success(res) {
|
||||||
|
wx.hideLoading()
|
||||||
|
console.log('打开文档成功')
|
||||||
|
}, fail: function (e) {
|
||||||
|
console.log(e)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
|
@ -10,12 +10,12 @@
|
||||||
<view class="weui-cells weui-cells_after-title">
|
<view class="weui-cells weui-cells_after-title">
|
||||||
<view class="weui-cell weui-cell_input">
|
<view class="weui-cell weui-cell_input">
|
||||||
<view class="weui-cell__bd">
|
<view class="weui-cell__bd">
|
||||||
<input class="weui-input" placeholder="请输入账号" bindinput="bindusernameInput"/>
|
<input class="weui-input" placeholder="请输入账号" bindinput="usernameChange"/>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="weui-cell weui-cell_input">
|
<view class="weui-cell weui-cell_input">
|
||||||
<view class="weui-cell__bd">
|
<view class="weui-cell__bd">
|
||||||
<input class="weui-input" placeholder="请输入密码" bindinput="bindpasswordInput" password="true"/>
|
<input class="weui-input" placeholder="请输入密码" bindinput="passwordChange" password="true"/>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
@ -26,5 +26,6 @@
|
||||||
<!-- <view class="weui-footer__links">
|
<!-- <view class="weui-footer__links">
|
||||||
<navigator url="" class="weui-footer__link">WeUI首页</navigator>
|
<navigator url="" class="weui-footer__link">WeUI首页</navigator>
|
||||||
</view> -->
|
</view> -->
|
||||||
<view class="weui-footer__text">Copyright © 2018-2019 国检集团</view>
|
<view class="weui-footer__text" bindtap="intro">点击下载系统/小程序文档介绍</view>
|
||||||
</view>
|
<view class="weui-footer__text">Copyright © 2018-2019 国检集团</view>
|
||||||
|
</view>
|
|
@ -198,7 +198,7 @@ Page({
|
||||||
if (res.result.indexOf("examtest") != -1) {
|
if (res.result.indexOf("examtest") != -1) {
|
||||||
let id = res.result.split('=')[1]
|
let id = res.result.split('=')[1]
|
||||||
wx.navigateTo({
|
wx.navigateTo({
|
||||||
url: 'note?examtestid=' + id,
|
url: 'note?id=' + id,
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
wx.showModal({
|
wx.showModal({
|
||||||
|
|
|
@ -6,15 +6,28 @@ Page({
|
||||||
* 页面的初始数据
|
* 页面的初始数据
|
||||||
*/
|
*/
|
||||||
data: {
|
data: {
|
||||||
testdisable:false
|
testdisable:false,
|
||||||
|
fromWx:false
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 生命周期函数--监听页面加载
|
* 生命周期函数--监听页面加载
|
||||||
*/
|
*/
|
||||||
onLoad: function (options) {
|
onLoad: function (options) {
|
||||||
|
var examtestid
|
||||||
|
if (options.id) {
|
||||||
|
examtestid = options.id
|
||||||
|
} else {
|
||||||
|
let q = decodeURIComponent(options.q)
|
||||||
|
if (q) {
|
||||||
|
examtestid = util.getQueryString(q, 'id')
|
||||||
|
this.setData({
|
||||||
|
fromWx: true
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
wx.request({
|
wx.request({
|
||||||
url: getApp().globalData.serverUrl + 'api/examtest?a=detail&id='+options.examtestid,
|
url: getApp().globalData.serverUrl + 'api/examtest?a=detail&id='+examtestid,
|
||||||
header: {
|
header: {
|
||||||
'content-type': 'application/json', // 默认值
|
'content-type': 'application/json', // 默认值
|
||||||
'Cookie': wx.getStorageSync("sessionid"),
|
'Cookie': wx.getStorageSync("sessionid"),
|
||||||
|
|
|
@ -26,9 +26,9 @@ Page({
|
||||||
// 采用衔接滑动
|
// 采用衔接滑动
|
||||||
circular: true,
|
circular: true,
|
||||||
// 自动切换时间间隔2s
|
// 自动切换时间间隔2s
|
||||||
interval: 4000,
|
interval: 8000,
|
||||||
// 滑动动画时长0.5s
|
// 滑动动画时长0.5s
|
||||||
duration: 1000,
|
duration: 1500,
|
||||||
// 前边距,可用于露出前一项的一小部分,接受 px 和 rpx 值
|
// 前边距,可用于露出前一项的一小部分,接受 px 和 rpx 值
|
||||||
previousMargin: 0,
|
previousMargin: 0,
|
||||||
// 后边距,可用于露出后一项的一小部分,接受 px 和 rpx 值
|
// 后边距,可用于露出后一项的一小部分,接受 px 和 rpx 值
|
||||||
|
@ -64,7 +64,8 @@ Page({
|
||||||
onShow: function () {
|
onShow: function () {
|
||||||
var that = this
|
var that = this
|
||||||
//获取待阅读通知数目
|
//获取待阅读通知数目
|
||||||
if (wx.getStorageSync("sessionid")) {
|
//console.log(wx.getStorageSync('sessionid'))
|
||||||
|
if (wx.getStorageSync("sessionid").indexOf('sessionid')!=-1) {
|
||||||
this.getnoread()
|
this.getnoread()
|
||||||
this.getyhtodonum()
|
this.getyhtodonum()
|
||||||
this.getzytodonum()
|
this.getzytodonum()
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
<view class="weui-media-box__bd weui-media-box__bd_in-appmsg">
|
<view class="weui-media-box__bd weui-media-box__bd_in-appmsg">
|
||||||
<view class="weui-media-box__title">{{item.noticeid__title}}</view>
|
<view class="weui-media-box__title">{{item.noticeid__title}}</view>
|
||||||
<view class="weui-media-box__desc">{{item.noticeid__pubpart__partname}} {{item.noticeid__pubuser__name}}发布</view>
|
<view class="weui-media-box__desc">{{item.noticeid__pubpart__partname}} {{item.noticeid__pubuser__name}}发布</view>
|
||||||
<view class="weui-media-box__desc">{{item.noticeid__submittime}}</view>
|
<view class="weui-media-box__desc">发布时间:{{item.noticeid__submittime}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="weui-panel__ft weui-cell__ft_in-access">
|
<view class="weui-panel__ft weui-cell__ft_in-access">
|
||||||
<view class="weui-media-box__title" wx:if="{{item.read == 0}}" style="background-color:yellow">未读</view>
|
<view class="weui-media-box__title" wx:if="{{item.read == 0}}" style="background-color:yellow">未读</view>
|
||||||
|
|
|
@ -7,7 +7,8 @@
|
||||||
<view class="weui-media-box__bd weui-media-box__bd_in-appmsg">
|
<view class="weui-media-box__bd weui-media-box__bd_in-appmsg">
|
||||||
<view class="weui-media-box__title">{{item.title}}</view>
|
<view class="weui-media-box__title">{{item.title}}</view>
|
||||||
<view class="weui-media-box__desc">{{item.pubpart__partname}} {{item.pubuser__name}}发布</view>
|
<view class="weui-media-box__desc">{{item.pubpart__partname}} {{item.pubuser__name}}发布</view>
|
||||||
<view class="weui-media-box__desc">{{item.submittime}}</view>
|
<view class="weui-media-box__desc">修改时间:{{item.modifytime}}</view>
|
||||||
|
<view class="weui-media-box__desc">发布时间:{{item.submittime}}</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="weui-panel__ft weui-cell__ft_in-access">
|
<view class="weui-panel__ft weui-cell__ft_in-access">
|
||||||
<view class="weui-media-box__title">阅读量:<span style="color:green"> {{item.reads}}</span></view>
|
<view class="weui-media-box__title">阅读量:<span style="color:green"> {{item.reads}}</span></view>
|
||||||
|
|
|
@ -17,7 +17,7 @@ Page({
|
||||||
yhdjArray: [],
|
yhdjArray: [],
|
||||||
yhdjIndex: null,
|
yhdjIndex: null,
|
||||||
jclxArray: [],
|
jclxArray: [],
|
||||||
jclxIndex: null,
|
jclxIndex: 0,
|
||||||
troubleid: '',
|
troubleid: '',
|
||||||
yhdj: '',
|
yhdj: '',
|
||||||
jclx: '',
|
jclx: '',
|
||||||
|
@ -352,6 +352,7 @@ Page({
|
||||||
this.data.jclxArray = res.data;
|
this.data.jclxArray = res.data;
|
||||||
this.setData({
|
this.setData({
|
||||||
jclxArray: res.data,
|
jclxArray: res.data,
|
||||||
|
jclx:res.data[0]//默认检查类型
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
"newFeature": true
|
"newFeature": true
|
||||||
},
|
},
|
||||||
"compileType": "miniprogram",
|
"compileType": "miniprogram",
|
||||||
"libVersion": "1.9.94",
|
"libVersion": "2.8.3",
|
||||||
"appid": "wx5c39b569f01c27db",
|
"appid": "wx5c39b569f01c27db",
|
||||||
"projectname": "aqyj",
|
"projectname": "aqyj",
|
||||||
"isGameTourist": false,
|
"isGameTourist": false,
|
||||||
|
|
Loading…
Reference in New Issue