12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879 |
- <template>
- <view class="body">
- <!-- 公共组件-每个页面必须引入 -->
- <public-module></public-module>
- <block v-for="(item,index) in list" :key="index">
- <my-list-item :item="item" :index="index"></my-list-item>
- </block>
- <button class="my-3 mt-4 mx-3 d-flex a-center j-center main-bg-color" type="primary" @tap="logout">退出登录</button>
- </view>
- </template>
- <script>
- import {
- mapMutations
- } from "vuex"
- import myListItem from "@/components/modules/my/my-list-item.vue";
- export default {
- components: {
- myListItem
- },
- data() {
- return {
- list: [{
- icon: "",
- name: "账号管理",
- clicktype: "navigateTo",
- url: "/pages/set/safe",
- auth: true
- },
- {
- icon: "",
- name: "清除缓存",
- clicktype: "clear",
- url: ""
- },
- {
- icon: "",
- name: "常见问题",
- clicktype: "navigateTo",
- url: "/pages/set/question",
- auth: true
- },
- // { icon:"",name:"意见反馈",clicktype:"navigateTo",url:"/pages/set/suggest",auth:true },
- {
- icon: "",
- name: "关于掌柜",
- clicktype: "navigateTo",
- url: "/pages/set/about",
- text: "",
- auth: false
- },
- ]
- }
- },
- onLoad() {
- // #ifdef APP-PLUS
- plus.runtime.getProperty(plus.runtime.appid, (widgetInfo) => {
- this.list[4].text = widgetInfo.version;
- })
- // #endif
- },
- methods: {
- ...mapMutations(['emptyUserInfo']),
- logout() {
- this.emptyUserInfo();
- setTimeout(() => {
- uni.reLaunch({
- url: "/pages/login/login"
- })
- return true;
- }, 500);
- }
- }
- }
- </script>
- <style>
- </style>
|