cashier_wx/pages/user/member/storedManage.vue

93 lines
1.7 KiB
Vue

<template>
<view class="container">
<view class="list">
<view class="list_item" @click="handleClick(item)" v-for="(item,index) in list" :key="index">
<view>{{ item.name }}</view>
<u-icon name="arrow-right" color="#575B66" size="16"></u-icon>
</view>
</view>
</view>
</template>
<script setup>
import {
ref,
onMounted,
reactive
} from 'vue'
const list = ref([
// {
// name: "余额明细",
// url: "user/member/billDetails"
// },
{
name: "密码设置",
url: "user/member/setPassword"
},
{
name: "使用须知",
url: "user/member/instructions"
},
])
const shopUserInfo = reactive({
shopInfo: "",
shopId: ''
})
// 跳转
const handleClick = (item) => {
uni.pro.navigateTo(item.url, {
shopInfo: JSON.stringify(shopUserInfo.shopInfo)
})
}
//
onMounted(async () => {
// 获取当前页面栈
const pages = getCurrentPages();
// 获取当前页面实例
const currentPage = pages[pages.length - 1];
// 获取页面参数
const options = currentPage.options;
shopUserInfo.shopId = options.shopId
shopUserInfo.shopInfo = JSON.parse(decodeURIComponent(options.shopInfo))
console.log(shopUserInfo)
})
</script>
<style scoped lang="less">
page {}
.container {
padding: 48rpx 20rpx;
.list {
display: flex;
flex-direction: column;
background-color: #fff;
border-radius: 24rpx;
padding: 16rpx 24rpx;
.list_item {
display: flex;
align-items: center;
justify-content: space-between;
border-bottom: 2rpx solid #E5E5E5;
;
padding: 24rpx 0;
view {
font-weight: 500;
font-size: 28rpx;
color: #333333;
}
}
.list_item:last-child {
border-bottom: none;
}
}
}
</style>