login.vue 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  1. <template>
  2. <view>
  3. <!--pages/login/login.wxml-->
  4. <image src="http://img-test.gz-yami.com/mini/logo.jpg" class="c-logo"></image>
  5. <view class="title">mall4j</view>
  6. <view class="msg">申请获得你的公开信息(昵称、头像等)</view>
  7. <button color="#eb2444" open-type="getUserInfo" lang="zh_CN" @getuserinfo="onGotUserInfo" class>微信授权</button>
  8. </view>
  9. </template>
  10. <script>
  11. var http = require("../../utils/http.js");
  12. export default {
  13. data() {
  14. return {};
  15. },
  16. components: {},
  17. props: {},
  18. /**
  19. * 生命周期函数--监听页面加载
  20. */
  21. onLoad: function (options) {},
  22. /**
  23. * 生命周期函数--监听页面初次渲染完成
  24. */
  25. onReady: function () {},
  26. /**
  27. * 生命周期函数--监听页面显示
  28. */
  29. onShow: function () {},
  30. /**
  31. * 生命周期函数--监听页面隐藏
  32. */
  33. onHide: function () {},
  34. /**
  35. * 生命周期函数--监听页面卸载
  36. */
  37. onUnload: function () {},
  38. /**
  39. * 页面相关事件处理函数--监听用户下拉动作
  40. */
  41. onPullDownRefresh: function () {},
  42. /**
  43. * 页面上拉触底事件的处理函数
  44. */
  45. onReachBottom: function () {},
  46. /**
  47. * 用户点击右上角分享
  48. */
  49. onShareAppMessage: function () {},
  50. methods: {
  51. onGotUserInfo: function (res) {
  52. http.updateUserInfo();
  53. uni.navigateBack({
  54. delta: 1
  55. });
  56. }
  57. }
  58. };
  59. </script>
  60. <style>
  61. @import "./login.css";
  62. </style>