Commit f3f00306 authored by leon's avatar leon

feat: page add share

parent 17888a7c
......@@ -125,6 +125,9 @@
this.getReportIdList()
}
this.getReportCharts()
},
onShareAppMessage() {
},
onShow() {
const that = this
......
......@@ -116,6 +116,10 @@
this.userAuthCheck()
},
onShareAppMessage() {
},
// detail页面也会监听这两个事件,所有index页面需要在onShow里面增加监听,在onHide里面移除监听
onShow() {
const that = this
......
<template>
<view class="wrap">
<view class="content">
<u-form
ref="uForm"
:model="params"
:error-type="['toast']"
:label-width="200"
>
<u-form ref="uForm" :model="params" :error-type="['toast']" :label-width="200">
<u-form-item label="用户名" prop="userName">
<u-input
v-model="params.userName"
placeholder="请输入用户名"
type="text"
/>
<u-input v-model="params.userName" placeholder="请输入用户名" type="text" />
</u-form-item>
<u-form-item label="密码" prop="password">
<u-input
v-model="params.password"
placeholder="请输入密码"
type="password"
:password-icon="true"
/>
<u-input v-model="params.password" placeholder="请输入密码" type="password" :password-icon="true" />
</u-form-item>
<u-form-item label="员工号(选填)" prop="staffNo">
<u-input
v-model="params.staffNo"
placeholder="填写员工号可以更精确的获取权限"
type="number"
/>
<u-input v-model="params.staffNo" placeholder="填写员工号可以更精确的获取权限" type="number" />
</u-form-item>
</u-form>
<u-button
class="my-u-block u-m-t-80"
type="warning"
shape="square"
:ripple="true"
@click="submit('login')"
:disabled="!submitDisabled"
>登入</u-button>
<u-button
class="my-u-block u-m-t-80"
type="warning"
shape="square"
:ripple="true"
@click="submit('register')"
:disabled="!submitDisabled"
>注册</u-button>
<u-button class="my-u-block u-m-t-80" type="warning" shape="square" :ripple="true" @click="submit('login')"
:disabled="!submitDisabled">登入</u-button>
<u-button class="my-u-block u-m-t-80" type="warning" shape="square" :ripple="true"
@click="submit('register')" :disabled="!submitDisabled">注册</u-button>
<text class="tips-text">使用须知:仅限企业内部人员使用,使用前需要认证用户</text>
</view>
......@@ -53,25 +23,31 @@
</template>
<script>
export default {
export default {
data() {
return {
params: {
appId: wx.getAccountInfoSync().miniProgram.appId,
userName: '',
password: '',
staffNo:''
staffNo: ''
},
rules: {
userName: [
{ required: true, message: '请输入用户名', trigger: 'blur' }
],
password: [
{ required: true, message: '请输入密码', trigger: 'blur' }
],
staffNumber:[
{ required: true, message: '员工号(选填)', trigger: 'blur' }
]
userName: [{
required: true,
message: '请输入用户名',
trigger: 'blur'
}],
password: [{
required: true,
message: '请输入密码',
trigger: 'blur'
}],
staffNumber: [{
required: true,
message: '员工号(选填)',
trigger: 'blur'
}]
}
}
},
......@@ -96,7 +72,10 @@ export default {
}
}
let res = await info.url
const { Status, Result } = res.data
const {
Status,
Result
} = res.data
if (Status === 'true') {
this.$u.vuex('vuex_token', `${res.token_type} ${res.access_token}`)
this.$u.toast(info.msg)
......@@ -143,8 +122,12 @@ export default {
},
onReady() {
this.$refs.uForm.setRules(this.rules)
},
onShareAppMessage() {
}
};
};
</script>
<style lang="scss" scoped>
......
......@@ -46,6 +46,10 @@
onLoad() {
this.getReportList()
},
onShareAppMessage() {
},
methods: {
/**
* 获取页面报表配置
......
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