123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115 |
- <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 class="content">
- <view class="" v-if="curNow==0">
- <view class="name">贵州旭烁食品有限公司简介</view>
- <u--image v-if="pageData.uxImg" :src="pageData.uxImg" :showLoading="true" width="100%" mode="aspectFill"></u--image>
- <view class="xsIntro">{{pageData.xsIntro}}</view>
- <view class="shopIntro">
- <view class="title">一、成立背景</view>
- {{pageData.shopIntro}}
- </view>
- <!-- <view class="shopIntro">{{pageData.shopIntro}}</view> -->
- </view>
- <view class="" v-if="curNow==1">
-
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- export default {
- components:{
-
- },
- data() {
- return {
- navbarTitle:'',
- typeList:['旭烁简介','商行简介'],
- curNow:0,
- pageData:{}
- }
- },
- 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=>{
- this.pageData = res.data;
- // console.log('res',res);
- }).catch(err=>{
- console.log('xsGetIntro',err.data);
- })
- }
- }
- }
- </script>
- <style>
- page{
- background-color: #F9F9F9;
- }
- </style>
- <style lang="scss" scoped>
- .content{
- font-size: 26rpx;
- font-weight: 400;
- color: #666666;
- line-height: 44rpx;
- .name{
- font-size: 32rpx;
- font-weight: 600;
- color: #333333;
- line-height: 45rpx;
- text-align: center;
- margin-top: 34rpx;
- margin-bottom: 30rpx;
- }
- .title{
- font-size: 30rpx;
- font-weight: 400;
- color: #333333;
- line-height: 50rpx;
- margin: 30rpx auto 15rpx;
- }
- .xsIntro{
- font-size: 24rpx;
- font-weight: 400;
- color: #999999;
- line-height: 33rpx;
- margin: 20rpx auto 50rpx;
- }
- }
- </style>
|