uni-app分段选择器组件⽗组件
<template>
<view>
<view class="topview">
<!--分段器  导航跳转不同组件 -->
<view class="uni-padding-wrap uni-common-mt">
<uni-segmented-control :current="current"
:values="items.map(v => v.title)"
style-type="text"
:active-color="activeColor"
@clickItem="onClickItem"></uni-segmented-control>
</view>
</view>
<view class="content">
<view v-if="current === 0">
<!-- 导航组件页⾯ -->
<co-shebaoview
:isShow="isShowClass"
:param="cParamList"
@seldelect="seldelects"
@selpay="selpays"></co-shebaoview>
</view>
<view v-if="current === 1">
<!-- 导航组件页⾯ -->
<co-pingzhengview
:isShow="isShowClassP"
:param="cParamListP"
@seldelectP="seldelectP"
@selpayP="selpayP"></co-pingzhengview>
</view>
</view>
</view>
</template>
<script>
// 只要组件安装在项⽬的components⽬录下,并符合components/组件名称/组件名称.vue⽬录结构。就可以不⽤引⽤、注册,直接在页⾯中使⽤
// 引⼊
// import coshebaoview from "../../components/co-shebaoview/co-shebaoview.vue";
// import copingzhengview from "../../components/co-pingzhengview/co-pingzhengview.vue";
export default {
// 注册组件
// components: {
// coshebaoview,
// copingzhengview
// },
data () {
return {
// 上个页⾯传递数据
djxh: '',
<script>flutter uniapp 哪个好
// 只要组件安装在项⽬的components⽬录下,并符合components/组件名称/组件名称.vue⽬录结构。就可以不⽤引⽤、注册,直接在页⾯中使⽤
// 引⼊
// import coshebaoview from "../../components/co-shebaoview/co-shebaoview.vue";
// import copingzhengview from "../../components/co-pingzhengview/co-pingzhengview.vue";
export default {
// 注册组件
// components: {
// coshebaoview,
// copingzhengview
// },
data () {
return {
// 上个页⾯传递数据djxh: '',
nsrsbh: '',
xm: '',
sfzjhm: '',
// 分段选择器数据items: [{
title: "待缴税费"
},
{
title: "待缴凭证"
},
],
current: 0,
colorIndex: 0, activeColor: '#168DE9', //传递给页⾯数据isShowClass: true, isShowClassP: true, cParamList: [], cParamListP: [], indexs: 0,
ztlx: '2'
}
},
methods: {
//获取查询数据 待缴
getdataSB () {
var me = this
let url = figURL.hnserverUrl + '/dzswj/externalService/JSONNOLOGIN/sscx_sscx' //获取存储值
const value = StorageSync('carinfo_key');
//判断当前是否有该存储值
if (value.isLogin) {
//读取存储对象对应的值
< =
me.sfzjhm = value.userInfo.sfzjhm
me.djxh = value.userInfo.djxh
}
this.http.httpRequest(url, 'POST', {
xm: me.xm,
djxh: me.aes_encrypt(me.djxh),
nsrsbh: me.aes_encrypt(me.sfzjhm),
ywlx: 'qsxx',
// S 税 F 费 不写好像都查询
cxlx: '',
// 企业 1 个⼈2
ztlx: me.ztlx
}).then(res => {
console.log("==========获取待缴数据========")
console.log(res)
me.cParamList = []
if (res.status === "Y") {
if (res.o) {
me.isShowClass = false
me.cParamList = res.o
} else {
me.isShowClass = true
uni.showToast({
title: '暂⽆数据!',
duration: 2000
})
}
} else {
me.isShowClassP = true
if (me.configURL.isNullstr(res.msg.msg)) { uni.showToast({
title: "数据请求失败!",
duration: 2000
})
} else {
uni.showToast({
title: res.msg.msg,
duration: 2000
})
}
}
})
},
onLoad (option) {

版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。