优惠卷和商品卷
This commit is contained in:
@@ -3,66 +3,89 @@
|
||||
<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="28"></u-icon>
|
||||
<u-icon name="arrow-right" color="#575B66" size="16"></u-icon>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
shopUserInfo: null,
|
||||
list: [
|
||||
{name: "余额明细", url: "member/billDetails"},
|
||||
{name: "密码设置", url: "member/setPassword"},
|
||||
{name: "使用须知", url: "member/instructions"},
|
||||
]
|
||||
}
|
||||
<script setup>
|
||||
import {
|
||||
ref,
|
||||
onMounted,
|
||||
reactive
|
||||
} from 'vue'
|
||||
|
||||
const list = ref([
|
||||
// {
|
||||
// name: "余额明细",
|
||||
// url: "user/member/billDetails"
|
||||
// },
|
||||
{
|
||||
name: "密码设置",
|
||||
url: "user/member/setPassword"
|
||||
},
|
||||
onLoad(e) {
|
||||
this.shopUserInfo = JSON.parse(e.shopUserInfo)
|
||||
{
|
||||
name: "使用须知",
|
||||
url: "user/member/instructions"
|
||||
},
|
||||
|
||||
methods: {
|
||||
/**
|
||||
* 跳转
|
||||
*/
|
||||
handleClick ( item ) {
|
||||
uni.navigateTo({
|
||||
url: `/pages/${item.url}?shopUserInfo=${JSON.stringify(this.shopUserInfo)}`
|
||||
})
|
||||
}
|
||||
}
|
||||
])
|
||||
|
||||
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{
|
||||
page {}
|
||||
|
||||
.container {
|
||||
padding: 48rpx 20rpx;
|
||||
.list{
|
||||
|
||||
.list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background-color: #fff;
|
||||
border-radius: 24rpx;
|
||||
padding: 16rpx 24rpx;
|
||||
.list_item{
|
||||
|
||||
.list_item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
border-bottom: 2rpx solid #E5E5E5;;
|
||||
border-bottom: 2rpx solid #E5E5E5;
|
||||
;
|
||||
padding: 24rpx 0;
|
||||
view{
|
||||
|
||||
view {
|
||||
font-weight: 500;
|
||||
font-size: 28rpx;
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
.list_item:last-child{
|
||||
|
||||
.list_item:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user