Commit 8f2ac57a authored by 李晓兵's avatar 李晓兵

'jpush'

parent a96c6257
...@@ -24,6 +24,7 @@ ...@@ -24,6 +24,7 @@
<div class="pwd-forgotten" @click="pwdForgotten">忘记密码?</div> <div class="pwd-forgotten" @click="pwdForgotten">忘记密码?</div>
</div> </div>
<div class="button submit" @click="access">登录</div> <div class="button submit" @click="access">登录</div>
<div class="button submit" @click="test">测试</div>
</div> </div>
</h-content> </h-content>
<!-- <div style="width: 100%;height: 100%;background-color: #007aff;display: flex;justify-content: center;align-items: center;"> <!-- <div style="width: 100%;height: 100%;background-color: #007aff;display: flex;justify-content: center;align-items: center;">
...@@ -119,6 +120,46 @@ export default { ...@@ -119,6 +120,46 @@ export default {
clearPassword: function () { clearPassword: function () {
this.password = '' this.password = ''
}, },
test(){
let vm = this
hlsPopup.showActionSheet({
titleText: '请选择照片',
buttonArray: ['拍照', '从相册取'],
callback: index => {
if (index === 0) {
vm.imgUploadOpenCamera()
} else {
vm.imgUploadTakePicture()
}
},
})
},
imgUploadOpenCamera () {
let vm = this
let cameraoptions = {
quality: 100,
}
let success = function (imgdata) {
alert('imgdata'+imgdata)
}
let error = function () {
hlsPopup.showLongCenter('请拍照')
}
hlsUtil.openCamera(cameraoptions, success, error)
},
imgUploadTakePicture () {
let vm = this
let cameraoptions = {
quality: 100,
}
let success = function (imgUrl) {
alert('imgUrl[0]'+imgUrl[0])
}
let error = function () {
}
vm.hlsUtil.takePicture(cameraoptions, success, error)
},
}, },
} }
</script> </script>
......
...@@ -371,7 +371,6 @@ export default { ...@@ -371,7 +371,6 @@ export default {
* @param success * @param success
*/ */
fileUploadSvc: function (file, success) { fileUploadSvc: function (file, success) {
debugger
let path = file.filePath let path = file.filePath
var name = path.substr(path.lastIndexOf('/') + 1) var name = path.substr(path.lastIndexOf('/') + 1)
let url = encodeURI(process.env.rootPath + '/app/fileUploadSvc?sysName=XCMG_DEV&apiName=attachment_upload') let url = encodeURI(process.env.rootPath + '/app/fileUploadSvc?sysName=XCMG_DEV&apiName=attachment_upload')
......
...@@ -6,13 +6,13 @@ export default { ...@@ -6,13 +6,13 @@ export default {
onGetRegistrationID: function (data) { onGetRegistrationID: function (data) {
let vm = this let vm = this
try { try {
alert("JPushPlugin:registrationID is " + JSON.stringify(data)); //alert("JPushPlugin:registrationID is " + JSON.stringify(data));
if (data) { if (data) {
alert('111') // alert('111')
window.localStorage.setItem('registrationID', data) window.localStorage.setItem('registrationID', data)
} }
if (!data) { if (!data) {
alert('222') //alert('222')
window.plugins.jPushPlugin.getRegistrationID(this.onGetRegistrationID.bind(vm)) window.plugins.jPushPlugin.getRegistrationID(this.onGetRegistrationID.bind(vm))
//window.setTimeout(() => this.getRegistrationID(),1000) //window.setTimeout(() => this.getRegistrationID(),1000)
/* window.setTimeout(function () { /* window.setTimeout(function () {
...@@ -21,7 +21,7 @@ export default { ...@@ -21,7 +21,7 @@ export default {
} }
} catch (exception) { } catch (exception) {
alert('###'+exception); // alert('###'+exception);
} }
}, },
// 获取设备号 // 获取设备号
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment