123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263 |
- <template>
- <mobile-frame>
- <view class="main">
- 系统首页
- <uni-forms ref="form" :rules="rules" :model="form" label-width="auto">
- <uni-forms-item label="test" name="num">
- <uni-easyinput type="digit" v-model="form.num" @input="toInput" aceholder="请输入内容"></uni-easyinput>
- </uni-forms-item>
- </uni-forms>
- </view>
- </mobile-frame>
- </template>
- <script>
- export default {
- components: {},
- data() {
- return {
- form: {},
- rules: {}
- };
- },
- onLoad: function() {},
- onShow: function() {
- const that = this;
- that.search();
- },
- methods: {
- toInput(value) {
- if (value > 10) {
- uni.showToast({
- title: '可以'
- })
- } else {
- uni.showToast({
- title: '不可以'
- })
- }
- },
- search() {
- // 查询当前所在平台
- uni.getSystemInfo({
- success: async function(res) {
- uni.setStorage({
- key: 'system',
- data: res,
- success: function() {
- uni.redirectTo({
- // url: `/pages/home/index`
- // url: `/pagesMy/order/info`
- })
- }
- });
- }
- });
- },
- }
- }
- </script>
- <style lang="scss">
- </style>
|