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

'jpush'

parent a96c6257
......@@ -24,6 +24,7 @@
<div class="pwd-forgotten" @click="pwdForgotten">忘记密码?</div>
</div>
<div class="button submit" @click="access">登录</div>
<div class="button submit" @click="test">测试</div>
</div>
</h-content>
<!-- <div style="width: 100%;height: 100%;background-color: #007aff;display: flex;justify-content: center;align-items: center;">
......@@ -119,6 +120,46 @@ export default {
clearPassword: function () {
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>
......
......@@ -371,7 +371,6 @@ export default {
* @param success
*/
fileUploadSvc: function (file, success) {
debugger
let path = file.filePath
var name = path.substr(path.lastIndexOf('/') + 1)
let url = encodeURI(process.env.rootPath + '/app/fileUploadSvc?sysName=XCMG_DEV&apiName=attachment_upload')
......
......@@ -6,13 +6,13 @@ export default {
onGetRegistrationID: function (data) {
let vm = this
try {
alert("JPushPlugin:registrationID is " + JSON.stringify(data));
//alert("JPushPlugin:registrationID is " + JSON.stringify(data));
if (data) {
alert('111')
// alert('111')
window.localStorage.setItem('registrationID', data)
}
if (!data) {
alert('222')
//alert('222')
window.plugins.jPushPlugin.getRegistrationID(this.onGetRegistrationID.bind(vm))
//window.setTimeout(() => this.getRegistrationID(),1000)
/* window.setTimeout(function () {
......@@ -21,7 +21,7 @@ export default {
}
} 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