码农知识堂 - 1000bd
  •   Python
  •   PHP
  •   JS/TS
  •   JAVA
  •   C/C++
  •   C#
  •   GO
  •   Kotlin
  •   Swift
  • uni-app 之 获取input输入内容


    uni-app 之 获取input输入内容

    定义名称 v-model="logon_phone"
    获取内容 console.log("111 111 logon_phone 打印 ", this.logon_phone)

    1. <template>
    2. <view style="width: 100%; display: flex; flex-direction:column; align-items:center;">
    3. <view style="width: 60%; margin-top: 100px;">
    4. <view style="display: flex; ">
    5. <u-input placeholder="请输入手机号码" v-model="logon_phone" />
    6. <button @click="getphoneurl">验证码</button>
    7. </view>
    8. <!-- <text>retCode={{urlretCode}}; </text>
    9. <text>retMsg={{curlretMsg}}; </text> -->
    10. </view>
    11. </view>
    12. </template>
    13. <script>
    14. export default {
    15. data() {
    16. return {
    17. // urlretCode: "",
    18. // curlretMsg: "",
    19. logon_phone: "",
    20. };
    21. },
    22. methods: {
    23. // 按钮点击后执行的方法
    24. getphoneurl() {
    25. // uni.showLoading({
    26. // title: "加载中" // 加个进度条
    27. // })
    28. console.log("----- phone打印 ", this.logon_phone)
    29. uni.request({
    30. url: "https://api.xxx.com/xxx/xxx/" + this.logon_phone,
    31. success: res => {
    32. console.log(res) // log打印获取的数据
    33. // this.urlretCode = res.data.retCode
    34. // this.curlretMsg = res.data.retMsg
    35. // uni.hideLoading() // 加载出来后,关闭进度条
    36. }
    37. })
    38. },
    39. },
    40. onLoad() {
    41. // 页面刚进去就初始化的方法
    42. // this.getphoneurl(),
    43. }
    44. }
    45. </script>
    46. <style lang="scss">
    47. </style>
  • 相关阅读:
    C专家编程 第2章 这不是Bug,而是语言特性 2.3 误做之过
    99年表示真干不过,部门新来的00后测试员已把我卷崩溃,想离职了...
    Mockito的@Mock与@MockBean
    【Git】
    [资源推荐] 飞书画板模板
    代码随想录7——哈希表:454四数相加II、383赎金信、15三数之和、18四数之和
    Python GIL锁
    uniapp项目实践总结(十三)封装文件操作方法
    Ehcache配置资料,方便自己查
    【AcWing】827. 双链表
  • 原文地址:https://blog.csdn.net/jun_tong/article/details/133342175
  • 最新文章
  • 攻防演习之三天拿下官网站群
    数据安全治理学习——前期安全规划和安全管理体系建设
    企业安全 | 企业内一次钓鱼演练准备过程
    内网渗透测试 | Kerberos协议及其部分攻击手法
    0day的产生 | 不懂代码的"代码审计"
    安装scrcpy-client模块av模块异常,环境问题解决方案
    leetcode hot100【LeetCode 279. 完全平方数】java实现
    OpenWrt下安装Mosquitto
    AnatoMask论文汇总
    【AI日记】24.11.01 LangChain、openai api和github copilot
  • 热门文章
  • 十款代码表白小特效 一个比一个浪漫 赶紧收藏起来吧!!!
    奉劝各位学弟学妹们,该打造你的技术影响力了!
    五年了,我在 CSDN 的两个一百万。
    Java俄罗斯方块,老程序员花了一个周末,连接中学年代!
    面试官都震惊,你这网络基础可以啊!
    你真的会用百度吗?我不信 — 那些不为人知的搜索引擎语法
    心情不好的时候,用 Python 画棵樱花树送给自己吧
    通宵一晚做出来的一款类似CS的第一人称射击游戏Demo!原来做游戏也不是很难,连憨憨学妹都学会了!
    13 万字 C 语言从入门到精通保姆级教程2021 年版
    10行代码集2000张美女图,Python爬虫120例,再上征途
Copyright © 2022 侵权请联系2656653265@qq.com    京ICP备2022015340号-1
正则表达式工具 cron表达式工具 密码生成工具

京公网安备 11010502049817号