12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- <template>
- <view class="pages">
- <u-navbar
- :title="navbarTitle"
- :autoBack="true"
- :safeAreaInsetTop="true"
- >
- </u-navbar>
- <view class="page-wrap">
- <u-subsection
- class="subsection"
- :customStyle="{height: '66rpx'}"
- :list="typeList"
- mode="subsection"
- activeColor="#00A447"
- @change="sectionChange"
- :current="curNow"></u-subsection>
- </view>
- </view>
- </template>
- <script>
- export default {
- components:{
-
- },
- data() {
- return {
- navbarTitle:'',
- typeList:['旭烁简介','商行简介'],
- curNow:0,
- }
- },
- watch:{
- curNow: {
- handler(newVal, oldVal){
- console.log('newVal',newVal);
- this.navbarTitle = this.typeList[newVal];
- this.getIntro();
- },
- immediate: true
- }
- },
- onLoad() {
-
- },
- methods: {
- sectionChange(index){
- this.curNow = index;
- },
- getIntro(){
- let type = this.curNow + 1;
- this.$u.api.xsGetIntro({type:type}).then(res=>{
- console.log('res',res);
- }).catch(err=>{
- console.log('err11111',err.data);
- })
- }
- }
- }
- </script>
- <style>
- page{
- background-color: #F9F9F9;
- }
- </style>
- <style lang="scss" scoped>
- </style>
|