| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- <template>
- <view class="box">
- <view class="box_item" v-for="item in list" :key="item.id" @click="goPage(item)">
- {{ item.name }}({{ item.cardNo }})
- <img class="item_img" src="../static/images/right.png" />
- </view>
- <NoData v-if="!list.length" />
- </view>
- </template>
- <script setup>
- import { onLoad } from '@dcloudio/uni-app'
- import NoData from '@/components/noData.vue'
- const props = defineProps({
- list: Array,
- appType: String
- })
- onLoad(() => {})
- // 点击每一个学生回调
- const goPage = (item) => {
- // console.log(item)
- let msg = encodeURIComponent(JSON.stringify(item))
- if (props.appType == '学生轨迹') {
- uni.navigateTo({
- url: `/pages/track/track?id=${item.id}`
- })
- } else if (props.appType == '社交亲密度') {
- uni.navigateTo({
- url: `/pages/intimacy/intimacy?msg=${msg}`
- })
- } else {
- uni.navigateTo({
- url: `/pages/student/student?msg=${msg}`
- })
- }
- }
- </script>
- <style lang="scss" scoped>
- .box {
- margin-top: 22rpx;
- padding: 0 20rpx 30rpx 30rpx;
- box-sizing: border-box;
- width: 710rpx;
- background-color: #fff;
- overflow: hidden;
- .box_item {
- display: flex;
- justify-content: space-between;
- align-items: center;
- height: 90rpx;
- font-size: 28rpx;
- border-bottom: 1rpx solid #e6e6e6;
- .item_img {
- width: 31rpx;
- height: 31rpx;
- }
- }
- }
- </style>
|