소스 검색

选择站点页面

xiaohaizhao 2 년 전
부모
커밋
5274ada226
2개의 변경된 파일56개의 추가작업 그리고 0개의 파일을 삭제
  1. 2 0
      pages.json
  2. 54 0
      pages/login/selectSite.vue

+ 2 - 0
pages.json

@@ -1,6 +1,8 @@
 {
 	"pages": [{
 		"path": "pages/login/login"
+	}, {
+		"path": "pages/login/selectSite"
 	}, {
 		"path": "pages/index/index"
 	}],

+ 54 - 0
pages/login/selectSite.vue

@@ -0,0 +1,54 @@
+<template>
+    <view>
+        <cu-custom bgImage="/static/img/navbg.png" :isBack="true" contentStyle="height:50px;">
+            <block slot="backText">返回</block>
+            <block slot="content">
+                <view class="cu-load load-cuIcon" style="margin-top: -16rpx;" :class="isLoad && 'loading'">选择登录站点</view>
+            </block>
+        </cu-custom>
+        <navigator class="site" url="#" v-for="item in account_list" :key="item.userid" @click="selectSite(item)">
+            {{ item.name }}
+        </navigator>
+    </view>
+</template>
+
+<script>
+import { loginMsg } from "./modules/dispose";
+export default {
+    name: "SelectSite",
+    data() {
+        return {
+            account_list: uni.getStorageSync('account_list'),
+            isLoad: false
+        }
+    },
+    methods: {
+        selectSite(site) {
+            let that = this;
+            uni.showModal({
+                title: '提示',
+                content: `是否确定登录“${site.sitename}”站点的“${site.name}”账号`,
+                success: ({ confirm }) => {
+                    if (confirm) {
+                        that.isLoad = true;
+                        loginMsg([site],this.$Http);
+                    }
+                }
+            })
+        },
+    },
+}
+</script>
+
+<style lang="scss" scoped>
+.site {
+    width: 690rpx;
+    border-radius: 8rpx;
+    background: #fff;
+    padding: 20rpx 30rpx;
+    box-sizing: border-box;
+    margin: 20rpx auto;
+    font-size: 28rpx;
+    color: #333333;
+}
+</style>