合同小程序前端代码仓库
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

75 lines
4.5 KiB

3 months ago
  1. const __sfc__ = defineComponent({
  2. methods: {
  3. logout() {
  4. uni.showModal({
  5. title: '提示',
  6. content: '确定要退出登录吗?',
  7. success: (res) => {
  8. if (res.confirm) {
  9. uni.showToast({
  10. title: '退出登录成功',
  11. icon: 'success',
  12. success: () => {
  13. // 这里可以添加退出登录的逻辑,例如清除用户登录状态
  14. setTimeout(() => {
  15. uni.navigateTo({ url: '/pages/index/index' });
  16. }, 1500);
  17. }
  18. });
  19. }
  20. }
  21. });
  22. }
  23. }
  24. });
  25. export default __sfc__;
  26. function GenPagesIndexWodeRender(this: InstanceType<typeof __sfc__>): any | null {
  27. const _ctx = this;
  28. const _cache = this.$.renderCache;
  29. return createElementVNode("view", utsMapOf({ class: "container" }), [
  30. createElementVNode("view", utsMapOf({ class: "user-info" }), [
  31. createElementVNode("text", utsMapOf({ class: "username" }), "李晓春")
  32. ]),
  33. createElementVNode("view", utsMapOf({ class: "menu" }), [
  34. createElementVNode("view", utsMapOf({ class: "menu-item" }), [
  35. createElementVNode("image", utsMapOf({
  36. class: "arrow",
  37. src: "/static/arrow-right.png"
  38. })),
  39. createElementVNode("text", null, "关于我们")
  40. ]),
  41. createElementVNode("view", utsMapOf({ class: "menu-item" }), [
  42. createElementVNode("image", utsMapOf({
  43. class: "arrow",
  44. src: "/static/arrow-right.png"
  45. })),
  46. createElementVNode("text", null, "修改密码")
  47. ]),
  48. createElementVNode("view", utsMapOf({ class: "menu-item" }), [
  49. createElementVNode("image", utsMapOf({
  50. class: "arrow",
  51. src: "/static/arrow-right.png"
  52. })),
  53. createElementVNode("text", null, "服务协议")
  54. ]),
  55. createElementVNode("view", utsMapOf({ class: "menu-item" }), [
  56. createElementVNode("image", utsMapOf({
  57. class: "arrow",
  58. src: "/static/arrow-right.png"
  59. })),
  60. createElementVNode("text", null, "隐私政策")
  61. ]),
  62. createElementVNode("view", utsMapOf({
  63. class: "menu-item",
  64. onClick: _ctx.logout
  65. }), [
  66. createElementVNode("image", utsMapOf({
  67. class: "arrow",
  68. src: "/static/arrow-right.png"
  69. })),
  70. createElementVNode("text", null, "退出登录")
  71. ], 8 /* PROPS */, ["onClick"])
  72. ])
  73. ]);
  74. }
  75. const GenPagesIndexWodeStyles = [utsMapOf([["container", padStyleMapOf(utsMapOf([["display", "flex"], ["flexDirection", "column"], ["backgroundColor", "#f5f5f5"]]))], ["user-info", padStyleMapOf(utsMapOf([["paddingTop", 20], ["paddingRight", 20], ["paddingBottom", 20], ["paddingLeft", 20], ["height", 200], ["backgroundColor", "#007aff"], ["color", "#ffffff"], ["textAlign", "center"]]))], ["username", padStyleMapOf(utsMapOf([["fontSize", 20], ["fontWeight", "bold"], ["marginTop", 0], ["marginRight", "auto"], ["marginBottom", 0], ["marginLeft", "auto"], ["lineHeight", "200px"]]))], ["menu", padStyleMapOf(utsMapOf([["flex", 1], ["paddingTop", 20], ["paddingRight", 20], ["paddingBottom", 20], ["paddingLeft", 20], ["backgroundColor", "#ffffff"]]))], ["menu-item", padStyleMapOf(utsMapOf([["display", "flex"], ["justifyContent", "space-between"], ["alignItems", "center"], ["paddingTop", 15], ["paddingRight", 0], ["paddingBottom", 15], ["paddingLeft", 0], ["borderBottomWidth", 1], ["borderBottomStyle", "solid"], ["borderBottomColor", "#eeeeee"]]))], ["arrow", padStyleMapOf(utsMapOf([["width", 20], ["height", 20]]))], ["footer", padStyleMapOf(utsMapOf([["display", "flex"], ["justifyContent", "space-around"], ["paddingTop", 10], ["paddingRight", 10], ["paddingBottom", 10], ["paddingLeft", 10], ["backgroundColor", "#ffffff"], ["borderTopWidth", 1], ["borderTopStyle", "solid"], ["borderTopColor", "#cccccc"]]))], ["nav-item", padStyleMapOf(utsMapOf([["textAlign", "center"]]))]])];
  76. //# sourceMappingURL=wode.uvue.map