| @ -0,0 +1,145 @@ | |||||
| <template> | |||||
| <view class="active-card"> | |||||
| <view class="active-title">【{{item.name}}】</view> | |||||
| <view class="active-time flex align-center"> | |||||
| <text>【电话】{{item.phone}}</text> | |||||
| </view> | |||||
| <view class="active-time flex align-center"> | |||||
| <text>【地址】{{item.region}}</text> | |||||
| </view> | |||||
| <view class="active-time flex align-center"> | |||||
| <text>【详细地址】{{item.detailAddress}}</text> | |||||
| </view> | |||||
| </view> | |||||
| </template> | |||||
| <script> | |||||
| export default{ | |||||
| props:{ | |||||
| text:{ | |||||
| type:String, | |||||
| default:'查看详情' | |||||
| }, | |||||
| item:{ | |||||
| type:Object, | |||||
| }, | |||||
| i:{ | |||||
| type:Number, | |||||
| } | |||||
| }, | |||||
| data(){ | |||||
| return{ | |||||
| } | |||||
| }, | |||||
| methods:{ | |||||
| seeDetail(){ | |||||
| this.$emit('seeDetail',this.item) | |||||
| } | |||||
| } | |||||
| } | |||||
| </script> | |||||
| <style lang="scss" scoped> | |||||
| .active-card { | |||||
| background: #ffffff; | |||||
| border-radius: 12rpx; | |||||
| box-shadow: 3rpx 3rpx 6rpx 5rpx rgba(0,0,0,0.16); | |||||
| overflow: hidden; | |||||
| padding-bottom: 10rpx; | |||||
| margin-bottom: 20rpx; | |||||
| .active-title { | |||||
| word-wrap:break-word; | |||||
| word-break:break-all; | |||||
| font-size: 32rpx; | |||||
| color: #000; | |||||
| font-weight: 700; | |||||
| margin-top: 20rpx; | |||||
| line-height: 60rpx; | |||||
| white-space: nowrap; | |||||
| overflow: hidden; | |||||
| text-overflow: ellipsis; | |||||
| } | |||||
| .active-time { | |||||
| word-wrap:break-word; | |||||
| word-break:break-all; | |||||
| color: #707070; | |||||
| font-size: 28rpx; | |||||
| margin: 20rpx 0; | |||||
| image { | |||||
| width: 33rpx; | |||||
| height: 33rpx; | |||||
| margin-right: 27rpx; | |||||
| } | |||||
| /* 文本不会换行显示 */ | |||||
| white-space: nowrap; | |||||
| /* 超出盒子部分隐藏 */ | |||||
| overflow: hidden; | |||||
| /* 文本超出的部分打点显示 */ | |||||
| text-overflow: ellipsis; | |||||
| } | |||||
| .active-add { | |||||
| color: #707070; | |||||
| font-size: 28rpx; | |||||
| word-wrap:break-word; | |||||
| word-break:break-all; | |||||
| /* 文本不会换行显示 */ | |||||
| white-space: nowrap; | |||||
| /* 超出盒子部分隐藏 */ | |||||
| overflow: hidden; | |||||
| /* 文本超出的部分打点显示 */ | |||||
| text-overflow: ellipsis; | |||||
| // overflow: hidden;/*这个参数根据需求来决定要不要*/ | |||||
| image { | |||||
| width: 30rpx; | |||||
| height: 35rpx; | |||||
| margin-right: 27rpx; | |||||
| } | |||||
| } | |||||
| .active-time2 { | |||||
| color: #707070; | |||||
| font-size: 28rpx; | |||||
| margin: 20rpx 0; | |||||
| image { | |||||
| width: 33rpx; | |||||
| height: 33rpx; | |||||
| margin-right: 27rpx; | |||||
| } | |||||
| } | |||||
| .active-menu { | |||||
| margin-top: 21rpx; | |||||
| padding: 0 10rpx; | |||||
| .menu-price { | |||||
| font-size: 32rpx; | |||||
| .price { | |||||
| color: #D33D3E; | |||||
| font-size: 34rpx; | |||||
| font-weight: 500; | |||||
| } | |||||
| } | |||||
| .menu-btn { | |||||
| width: 213rpx; | |||||
| height: 79rpx; | |||||
| display: flex; | |||||
| align-items: center; | |||||
| justify-content: center; | |||||
| color: #00CCCC; | |||||
| font-size: 30rpx; | |||||
| font-weight: 500; | |||||
| } | |||||
| .menu-btn::after { | |||||
| content: " "; | |||||
| width: 15rpx; | |||||
| height: 15rpx; | |||||
| border-bottom: 3rpx solid #00CCCC; | |||||
| border-right: 3rpx solid #00CCCC; | |||||
| transform: rotate(-45deg); | |||||
| margin-left: 8rpx; | |||||
| } | |||||
| } | |||||
| } | |||||
| </style> | |||||
| @ -0,0 +1,159 @@ | |||||
| <template> | |||||
| <view class="active-card"> | |||||
| <view class="active-title">【{{item.title}}】</view> | |||||
| <view class="active-time flex align-center"> | |||||
| <text>【商品】{{item.shopName}}</text> | |||||
| </view> | |||||
| <view class="active-add flex align-center"> | |||||
| <text>【地址】{{item.addressText}}</text> | |||||
| </view> | |||||
| <view class="active-add flex align-center"> | |||||
| <text>【价格】{{item.price}}</text> | |||||
| </view> | |||||
| <view class="active-add flex align-center"> | |||||
| <text>【数量】{{item.num}}</text> | |||||
| </view> | |||||
| <view class="active-add flex align-center" v-if="item.type == 1"> | |||||
| <text>【类型】微信订单</text> | |||||
| </view> | |||||
| <view class="active-add flex align-center" v-else> | |||||
| <text>【类型】积分订单</text> | |||||
| </view> | |||||
| <view class="active-time2 flex align-center"> | |||||
| <text>【下单时间】{{item.createTime}}</text> | |||||
| </view> | |||||
| </view> | |||||
| </template> | |||||
| <script> | |||||
| export default{ | |||||
| props:{ | |||||
| text:{ | |||||
| type:String, | |||||
| default:'查看详情' | |||||
| }, | |||||
| item:{ | |||||
| type:Object, | |||||
| }, | |||||
| i:{ | |||||
| type:Number, | |||||
| } | |||||
| }, | |||||
| data(){ | |||||
| return{ | |||||
| } | |||||
| }, | |||||
| methods:{ | |||||
| seeDetail(){ | |||||
| this.$emit('seeDetail',this.item) | |||||
| } | |||||
| } | |||||
| } | |||||
| </script> | |||||
| <style lang="scss" scoped> | |||||
| .active-card { | |||||
| background: #ffffff; | |||||
| border-radius: 12rpx; | |||||
| box-shadow: 3rpx 3rpx 6rpx 5rpx rgba(0,0,0,0.16); | |||||
| overflow: hidden; | |||||
| padding-bottom: 10rpx; | |||||
| margin-bottom: 20rpx; | |||||
| .active-title { | |||||
| word-wrap:break-word; | |||||
| word-break:break-all; | |||||
| font-size: 32rpx; | |||||
| color: #000; | |||||
| font-weight: 700; | |||||
| margin-top: 20rpx; | |||||
| line-height: 60rpx; | |||||
| white-space: nowrap; | |||||
| overflow: hidden; | |||||
| text-overflow: ellipsis; | |||||
| } | |||||
| .active-time { | |||||
| word-wrap:break-word; | |||||
| word-break:break-all; | |||||
| color: #707070; | |||||
| font-size: 28rpx; | |||||
| margin: 20rpx 0; | |||||
| image { | |||||
| width: 33rpx; | |||||
| height: 33rpx; | |||||
| margin-right: 27rpx; | |||||
| } | |||||
| /* 文本不会换行显示 */ | |||||
| white-space: nowrap; | |||||
| /* 超出盒子部分隐藏 */ | |||||
| overflow: hidden; | |||||
| /* 文本超出的部分打点显示 */ | |||||
| text-overflow: ellipsis; | |||||
| } | |||||
| .active-add { | |||||
| color: #707070; | |||||
| font-size: 28rpx; | |||||
| word-wrap:break-word; | |||||
| word-break:break-all; | |||||
| /* 文本不会换行显示 */ | |||||
| white-space: nowrap; | |||||
| /* 超出盒子部分隐藏 */ | |||||
| overflow: hidden; | |||||
| /* 文本超出的部分打点显示 */ | |||||
| text-overflow: ellipsis; | |||||
| // overflow: hidden;/*这个参数根据需求来决定要不要*/ | |||||
| image { | |||||
| width: 30rpx; | |||||
| height: 35rpx; | |||||
| margin-right: 27rpx; | |||||
| } | |||||
| } | |||||
| .active-time2 { | |||||
| color: #707070; | |||||
| font-size: 28rpx; | |||||
| margin: 20rpx 0; | |||||
| image { | |||||
| width: 33rpx; | |||||
| height: 33rpx; | |||||
| margin-right: 27rpx; | |||||
| } | |||||
| } | |||||
| .active-menu { | |||||
| margin-top: 21rpx; | |||||
| padding: 0 10rpx; | |||||
| .menu-price { | |||||
| font-size: 32rpx; | |||||
| .price { | |||||
| color: #D33D3E; | |||||
| font-size: 34rpx; | |||||
| font-weight: 500; | |||||
| } | |||||
| } | |||||
| .menu-btn { | |||||
| width: 213rpx; | |||||
| height: 79rpx; | |||||
| display: flex; | |||||
| align-items: center; | |||||
| justify-content: center; | |||||
| color: #00CCCC; | |||||
| font-size: 30rpx; | |||||
| font-weight: 500; | |||||
| } | |||||
| .menu-btn::after { | |||||
| content: " "; | |||||
| width: 15rpx; | |||||
| height: 15rpx; | |||||
| border-bottom: 3rpx solid #00CCCC; | |||||
| border-right: 3rpx solid #00CCCC; | |||||
| transform: rotate(-45deg); | |||||
| margin-left: 8rpx; | |||||
| } | |||||
| } | |||||
| } | |||||
| </style> | |||||
| @ -0,0 +1,93 @@ | |||||
| <template> | |||||
| <view class="new-card flex justify-between" @click="seeDetail"> | |||||
| <view class="new-card-l flex flex-column justify-between"> | |||||
| <view class="title">{{item.title}}</view> | |||||
| <view>原价:{{item.oldPrice}}元</view> | |||||
| <view>{{item.price}}</view> | |||||
| <view class="price">{{item.intgerPrice}}/积分可兑换</view> | |||||
| </view> | |||||
| <view class="new-card-r"> | |||||
| <u--image :showLoading="true" :src="item.image" width="216rpx" height="216rpx"></u--image> | |||||
| </view> | |||||
| </view> | |||||
| </template> | |||||
| <script> | |||||
| export default{ | |||||
| props:{ | |||||
| item:{ | |||||
| type:Object, | |||||
| } | |||||
| }, | |||||
| data(){ | |||||
| return{ | |||||
| } | |||||
| }, | |||||
| methods:{ | |||||
| seeDetail(){ | |||||
| this.$emit('seeDetail',this.item) | |||||
| } | |||||
| } | |||||
| } | |||||
| </script> | |||||
| <style lang="scss" scoped> | |||||
| .new-card { | |||||
| background: #ffffff; | |||||
| border-radius: 12rpx; | |||||
| box-shadow: 3rpx 3rpx 6rpx 5rpx rgba(0,0,0,0.16); | |||||
| overflow: hidden; | |||||
| padding-bottom: 10rpx; | |||||
| margin-bottom: 20rpx; | |||||
| .new-card-l { | |||||
| font-size: 28rpx; | |||||
| color: #C8C8C8; | |||||
| padding: 16rpx 16rpx; | |||||
| .title { | |||||
| font-size: 32rpx; | |||||
| color: #000000; | |||||
| line-height: 40rpx; | |||||
| font-weight: 600; | |||||
| overflow: hidden; | |||||
| display: -webkit-box; | |||||
| -webkit-box-orient: vertical; | |||||
| -webkit-line-clamp: 2; | |||||
| font-family: SimSun; | |||||
| } | |||||
| .titleText{ | |||||
| font-size: 22rpx; | |||||
| color: #000000; | |||||
| line-height: 40rpx; | |||||
| font-weight: 600; | |||||
| overflow: hidden; | |||||
| display: -webkit-box; | |||||
| -webkit-box-orient: vertical; | |||||
| -webkit-line-clamp: 2; | |||||
| font-family: SimSun; | |||||
| } | |||||
| .price{ | |||||
| font-size: 32rpx; | |||||
| color: #FF0000; | |||||
| line-height: 40rpx; | |||||
| font-weight: 600; | |||||
| overflow: hidden; | |||||
| display: -webkit-box; | |||||
| -webkit-box-orient: vertical; | |||||
| -webkit-line-clamp: 2; | |||||
| font-family: SimSun; | |||||
| } | |||||
| } | |||||
| .new-card-r{ | |||||
| uni-image>img { | |||||
| border-radius: 50%; | |||||
| margin: 4rpx 4rpx 4rpx 4rpx; | |||||
| border-top-right-radius: 4rpx; | |||||
| border-bottom-right-radius: 4rpx; | |||||
| } | |||||
| } | |||||
| } | |||||
| </style> | |||||
| @ -0,0 +1,68 @@ | |||||
| <template> | |||||
| <view class="new-card flex justify-between" @click="seeDetail"> | |||||
| <view class="new-card-r"> | |||||
| <u--image :showLoading="true" :src="item.photo" width="256rpx" height="256rpx"></u--image> | |||||
| </view> | |||||
| <view class="new-card-l flex flex-column justify-between"> | |||||
| <view class="title">{{item.title}}</view> | |||||
| <view>{{item.createTime}}</view> | |||||
| </view> | |||||
| </view> | |||||
| </template> | |||||
| <script> | |||||
| export default{ | |||||
| props:{ | |||||
| item:{ | |||||
| type:Object, | |||||
| } | |||||
| }, | |||||
| data(){ | |||||
| return{ | |||||
| } | |||||
| }, | |||||
| methods:{ | |||||
| seeDetail(){ | |||||
| this.$emit('seeDetail',this.item) | |||||
| } | |||||
| } | |||||
| } | |||||
| </script> | |||||
| <style lang="scss" scoped> | |||||
| .new-card { | |||||
| background: #ffffff; | |||||
| border-radius: 12rpx; | |||||
| box-shadow: 3rpx 3rpx 6rpx 5rpx rgba(0,0,0,0.16); | |||||
| overflow: hidden; | |||||
| padding-bottom: 40rpx; | |||||
| margin-bottom: 20rpx; | |||||
| .new-card-l { | |||||
| font-size: 28rpx; | |||||
| color: #C8C8C8; | |||||
| padding: 16rpx 16rpx; | |||||
| .title { | |||||
| font-size: 32rpx; | |||||
| color: #000000; | |||||
| line-height: 40rpx; | |||||
| font-weight: 600; | |||||
| overflow: hidden; | |||||
| display: -webkit-box; | |||||
| -webkit-box-orient: vertical; | |||||
| -webkit-line-clamp: 2; | |||||
| font-family: SimSun; | |||||
| } | |||||
| } | |||||
| .new-card-r{ | |||||
| uni-image>img { | |||||
| border-top-right-radius: 2rpx; | |||||
| border-bottom-right-radius: 2rpx; | |||||
| } | |||||
| } | |||||
| } | |||||
| </style> | |||||
| @ -0,0 +1,65 @@ | |||||
| <template> | |||||
| <view class="new-card flex justify-between"> | |||||
| <view style="margin: 10rpx 24rpx; display: flex;"> | |||||
| <image :showLoading="true" :src="item.headImage" style="width: 100rpx;height: 100rpx;border-radius: 50%;"></image> | |||||
| <view style="padding: 28rpx;"> | |||||
| <view style="font-size: 28rpx;font-weight: 500;color: crimson;" v-if="item.type === '0'">{{item.name}} - {{item.integerVal}}</view> | |||||
| <view style="font-size: 28rpx;font-weight: 500;color: crimson;" v-if="item.type === '1'">{{item.name}} + {{item.integerVal}}</view> | |||||
| <view style="font-size: 24rpx;margin-top: 20rpx;">{{item.createTime}}</view> | |||||
| </view> | |||||
| </view> | |||||
| </view> | |||||
| </template> | |||||
| <script> | |||||
| export default{ | |||||
| props:{ | |||||
| item:{ | |||||
| type:Object, | |||||
| } | |||||
| }, | |||||
| data(){ | |||||
| return{ | |||||
| } | |||||
| }, | |||||
| methods:{ | |||||
| getName(str){ | |||||
| if(str.length > 10) { | |||||
| return str.substr(0,10) + "..." | |||||
| } | |||||
| return str | |||||
| } | |||||
| } | |||||
| } | |||||
| </script> | |||||
| <style lang="scss" scoped> | |||||
| .new-card { | |||||
| margin-bottom: 12rpx; | |||||
| background-color: #FFFFFF; | |||||
| .new-card-l { | |||||
| font-size: 28rpx; | |||||
| color: #C8C8C8; | |||||
| padding: 16rpx 16rpx; | |||||
| .title { | |||||
| font-size: 32rpx; | |||||
| color: #000000; | |||||
| line-height: 40rpx; | |||||
| font-weight: 600; | |||||
| overflow: hidden; | |||||
| display: -webkit-box; | |||||
| -webkit-box-orient: vertical; | |||||
| -webkit-line-clamp: 2; | |||||
| } | |||||
| } | |||||
| .new-card-r{ | |||||
| uni-image>img { | |||||
| border-radius: 50%; | |||||
| } | |||||
| } | |||||
| } | |||||
| </style> | |||||
| @ -0,0 +1,65 @@ | |||||
| <template> | |||||
| <view class="new-card flex justify-between"> | |||||
| <view style="margin: 10rpx 24rpx; display: flex;"> | |||||
| <image :showLoading="true" :src="item.headImage" style="width: 100rpx;height: 100rpx;border-radius: 50%;"></image> | |||||
| <view style="padding: 28rpx;"> | |||||
| <view style="font-size: 28rpx;font-weight: 500;color: crimson;" v-if="item.type === '0'">{{item.name}} - {{item.price}}</view> | |||||
| <view style="font-size: 28rpx;font-weight: 500;color: crimson;" v-if="item.type === '1'">{{item.name}} + {{item.price}}</view> | |||||
| <view style="font-size: 24rpx;margin-top: 20rpx;">{{item.createTime}}</view> | |||||
| </view> | |||||
| </view> | |||||
| </view> | |||||
| </template> | |||||
| <script> | |||||
| export default{ | |||||
| props:{ | |||||
| item:{ | |||||
| type:Object, | |||||
| } | |||||
| }, | |||||
| data(){ | |||||
| return{ | |||||
| } | |||||
| }, | |||||
| methods:{ | |||||
| getName(str){ | |||||
| if(str.length > 10) { | |||||
| return str.substr(0,10) + "..." | |||||
| } | |||||
| return str | |||||
| } | |||||
| } | |||||
| } | |||||
| </script> | |||||
| <style lang="scss" scoped> | |||||
| .new-card { | |||||
| margin-bottom: 12rpx; | |||||
| background-color: #FFFFFF; | |||||
| .new-card-l { | |||||
| font-size: 28rpx; | |||||
| color: #C8C8C8; | |||||
| padding: 16rpx 16rpx; | |||||
| .title { | |||||
| font-size: 32rpx; | |||||
| color: #000000; | |||||
| line-height: 40rpx; | |||||
| font-weight: 600; | |||||
| overflow: hidden; | |||||
| display: -webkit-box; | |||||
| -webkit-box-orient: vertical; | |||||
| -webkit-line-clamp: 2; | |||||
| } | |||||
| } | |||||
| .new-card-r{ | |||||
| uni-image>img { | |||||
| border-radius: 50%; | |||||
| } | |||||
| } | |||||
| } | |||||
| </style> | |||||
| @ -1,269 +0,0 @@ | |||||
| <template> | |||||
| <view class="home-pages"> | |||||
| <u-swiper | |||||
| :list="swpList" | |||||
| keyName="image" | |||||
| indicator | |||||
| height="180" | |||||
| indicatorActiveColor="#FFFFFF" | |||||
| indicatorMode="dot" | |||||
| circular | |||||
| @click="swpClick" | |||||
| ></u-swiper> | |||||
| <view style="color: #707070; | |||||
| font-size: 28rpx;"> | |||||
| </view> | |||||
| <view class="home-content"> | |||||
| <u-tabs | |||||
| :list="tabList" | |||||
| lineWidth="70" | |||||
| lineHeight="3" | |||||
| lineColor= "#00CCCC" | |||||
| :activeStyle="{ | |||||
| color: '#000000', | |||||
| fontWeight: 'bold', | |||||
| transform: 'scale(1.35)' | |||||
| }" | |||||
| :inactiveStyle="{ | |||||
| color: '#000000', | |||||
| transform: 'scale(1)' | |||||
| }" | |||||
| itemStyle="padding-left: 15px; padding-right: 15px; height: 34px;" | |||||
| @click="tabClick" | |||||
| > | |||||
| </u-tabs> | |||||
| <scroll-view scroll-y="true" class="scroll-y" | |||||
| <template v-if="params.labelClass == '-1'"> | |||||
| <card v-for="(item,i) in studyList" :item="item" :key="i" :i="i" @seeDetail="seeDetail"></card> | |||||
| </template> | |||||
| <template v-if="params.labelClass == '0'"> | |||||
| <active-card v-for="(item,i) in studyList" :item="item" :key="i" :i="i" @seeDetail="seeDetail"></active-card> | |||||
| </template> | |||||
| <template v-if="params.labelClass == '1'"> | |||||
| <activeCardMan v-for="(item,i) in studyList" :item="item" :key="i" :i="i" @seeDetail="seeDetail"></activeCardMan> | |||||
| </template> | |||||
| </scroll-view> | |||||
| </view> | |||||
| </view> | |||||
| </template> | |||||
| <script> | |||||
| import card from '@/components/active-card/index.vue' | |||||
| import activeCard from '@/components/active-card/index-car.vue' | |||||
| import activeCardMan from '@/components/active-card/index-car-man.vue' | |||||
| export default{ | |||||
| components:{ | |||||
| card, | |||||
| activeCard, | |||||
| activeCardMan | |||||
| }, | |||||
| data(){ | |||||
| return{ | |||||
| list:[ | |||||
| '寒雨连江夜入吴', | |||||
| '平明送客楚山孤', | |||||
| '洛阳亲友如相问', | |||||
| '一片冰心在玉壶' | |||||
| ], | |||||
| params:{ | |||||
| pageNo:1, | |||||
| labelClass:'0', | |||||
| pageSize:10, | |||||
| total: null, | |||||
| isLock: true | |||||
| }, | |||||
| current:0, | |||||
| studyList:[], | |||||
| swpList: [ | |||||
| ], | |||||
| tabList: [ | |||||
| { | |||||
| id:'-1', | |||||
| name:'招聘信息' | |||||
| }, | |||||
| { | |||||
| id:'0', | |||||
| name:'兑换商城' | |||||
| }, | |||||
| ] | |||||
| } | |||||
| }, | |||||
| onLoad() { | |||||
| this.studyList = []; | |||||
| this.params.labelClass = "-1"; | |||||
| this.params.pageNo = 1; | |||||
| this.params.total = null; | |||||
| this.params.isLock = true; | |||||
| this.getstudy(); | |||||
| // this.getknowledge(); | |||||
| this.getbannerList() | |||||
| this.getJobAddressList(); | |||||
| }, | |||||
| // 隐藏微信h5的标题栏 | |||||
| onReady() { | |||||
| this.$com.displayNav() | |||||
| }, | |||||
| onPullDownRefresh() { | |||||
| this.studyList = []; | |||||
| this.params.pageNo = 1; | |||||
| this.params.total = null; | |||||
| this.params.isLock = true; | |||||
| this.getstudy() | |||||
| }, | |||||
| onReachBottom() { | |||||
| if(this.params.isLock){ | |||||
| this.params.isLock = false; | |||||
| if(this.params.total !== null && this.params.pageNo * this.params.pageSize >= this.params.total){ | |||||
| this.$Toast('没有更多数据了哦!'); | |||||
| setTimeout(()=>{ | |||||
| this.params.isLock = true; | |||||
| },3000) | |||||
| return | |||||
| } | |||||
| this.params.pageNo+=1; | |||||
| this.$Toast('数据加载成功!'); | |||||
| this.getstudy(); | |||||
| } | |||||
| }, | |||||
| methods:{ | |||||
| lower(){ | |||||
| }, | |||||
| getbannerList(){ | |||||
| this.$api('bannerListJiangHua') | |||||
| .then(res=>{ | |||||
| if(res.code == 200){ | |||||
| this.swpList = res.result | |||||
| } | |||||
| }) | |||||
| }, | |||||
| //得到兼职地区分类 | |||||
| getJobAddressList(){ | |||||
| }, | |||||
| getstudy(){//学习列表 | |||||
| uni.showLoading() | |||||
| if(this.params.labelClass == "-1"){ | |||||
| this.$api('JobList',this.params) | |||||
| .then(res=>{ | |||||
| uni.hideLoading(); | |||||
| if(res.code == 200){ | |||||
| if(this.params.total== null) { | |||||
| this.params.total = res.result.total | |||||
| } | |||||
| if(this.params.pageNo>1){ | |||||
| uni.hideLoading(); | |||||
| } | |||||
| this.studyList = this.studyList.concat(res.result.records); | |||||
| this.params.isLock = true; | |||||
| }else { | |||||
| if(this.params.pageNo>1){ | |||||
| uni.hideLoading(); | |||||
| } | |||||
| this.params.isLock = true; | |||||
| } | |||||
| }) | |||||
| }else{ | |||||
| this.$api('getJobShopList',this.params) | |||||
| .then(res=>{ | |||||
| uni.hideLoading(); | |||||
| if(res.code == 200){ | |||||
| if(this.params.total== null) { | |||||
| this.params.total = res.result.total | |||||
| } | |||||
| if(this.params.pageNo>1){ | |||||
| uni.hideLoading(); | |||||
| } | |||||
| this.studyList = this.studyList.concat(res.result.records); | |||||
| this.params.isLock = true; | |||||
| }else { | |||||
| if(this.params.pageNo>1){ | |||||
| uni.hideLoading(); | |||||
| } | |||||
| this.params.isLock = true; | |||||
| } | |||||
| }) | |||||
| } | |||||
| }, | |||||
| swpClick(){ | |||||
| }, | |||||
| tabClick(e){ | |||||
| this.params.labelClass = e.id; | |||||
| this.params.pageNo =1; | |||||
| this.studyList = []; | |||||
| this.getstudy(); | |||||
| }, | |||||
| seeDetail(item){//查看详情 | |||||
| this.$api('myInfo') | |||||
| .then(res=>{ | |||||
| if(res.code == 200){ | |||||
| this.role = res.result.role; | |||||
| this.userInfo = res.result; | |||||
| this.$store.commit('set_userInfo',res.result) | |||||
| if(this.params.labelClass=='-1'){ | |||||
| uni.navigateTo({ | |||||
| url:`/pages/home/course-detial?id=${item.id}` | |||||
| }) | |||||
| }else{ | |||||
| uni.navigateTo({ | |||||
| url:`/pages/car/course-detial?id=${item.id}` | |||||
| }) | |||||
| } | |||||
| }else{ | |||||
| this.$Toast('请先登录!') | |||||
| setTimeout(()=>{ | |||||
| uni.navigateTo({ | |||||
| url:'/pages/my/login-kehu' | |||||
| }) | |||||
| },1000) | |||||
| return | |||||
| this.userInfo = null | |||||
| } | |||||
| }) | |||||
| }, | |||||
| } | |||||
| } | |||||
| </script> | |||||
| <style lang="scss" scoped> | |||||
| .home-pages { | |||||
| padding: 28rpx 29rpx 0; | |||||
| background-color: #F7F7F7; | |||||
| .swiper{ | |||||
| position: relative; | |||||
| height: calc(100% -7vh); | |||||
| width: 100%; | |||||
| height: 1800px; | |||||
| } | |||||
| .scroll-Y { | |||||
| height: calc(300vh - 660rpx); | |||||
| padding-top: 20rpx; | |||||
| } | |||||
| .home-content { | |||||
| .active-card{ | |||||
| margin-top: 20rpx;; | |||||
| border-radius: 0; | |||||
| border: none; | |||||
| border-style: none; | |||||
| box-shadow: none; | |||||
| } | |||||
| } | |||||
| } | |||||
| </style> | |||||
| @ -0,0 +1,318 @@ | |||||
| <template> | |||||
| <view class="home-pages"> | |||||
| <u-swiper | |||||
| :list="swpList" | |||||
| keyName="image" | |||||
| indicator | |||||
| height="150" | |||||
| indicatorActiveColor="#FFFFFF" | |||||
| indicatorMode="dot" | |||||
| circular | |||||
| ></u-swiper> | |||||
| <view style="color: #707070; | |||||
| font-size: 28rpx;"> | |||||
| </view> | |||||
| <view class="home-content"> | |||||
| <u-tabs | |||||
| :list="tabList" | |||||
| lineWidth="70" | |||||
| lineHeight="3" | |||||
| lineColor= "#00CCCC" | |||||
| :activeStyle="{ | |||||
| color: '#000000', | |||||
| fontWeight: 'bold', | |||||
| transform: 'scale(1.35)' | |||||
| }" | |||||
| :inactiveStyle="{ | |||||
| color: '#000000', | |||||
| transform: 'scale(1)' | |||||
| }" | |||||
| itemStyle="padding-left: 15px; padding-right: 15px; height: 34px;" | |||||
| @click="tabClick" | |||||
| > | |||||
| </u-tabs> | |||||
| <scroll-view scroll-y="true" class="scroll-Y" @scrolltolower="lower"> | |||||
| <template v-if="current == 0"> | |||||
| <active-card v-for="(item,i) in jobList" :item="item" :key="i" :i="i" @seeDetail="seeDetail"></active-card> | |||||
| </template> | |||||
| <template v-if="current == 1"> | |||||
| <new-card v-for="(item,i) in houseList" :key="i" :item="item" @seeDetail="newDetail"></new-card> | |||||
| </template> | |||||
| <template v-if="current == 2"> | |||||
| <shopCard v-for="(item,i) in shopList" :key="i" :item="item" @seeDetail="jianHuaNewDetail"></shopCard> | |||||
| </template> | |||||
| </scroll-view> | |||||
| </view> | |||||
| </view> | |||||
| </template> | |||||
| <script> | |||||
| import newCard from '@/components/new-card/index.vue' | |||||
| import activeCard from '@/components/active-card/index.vue' | |||||
| import shopCard from '@/components/jianghua-card/shop-card.vue' | |||||
| export default{ | |||||
| components:{ | |||||
| activeCard, | |||||
| newCard, | |||||
| shopCard | |||||
| }, | |||||
| data(){ | |||||
| return{ | |||||
| current:0, | |||||
| swpList:[], | |||||
| tabList: [ | |||||
| { | |||||
| id:'1623505640888492033', | |||||
| name:'江华招聘', | |||||
| }, | |||||
| { | |||||
| id:'1685924287505633281', | |||||
| name:'江华房源', | |||||
| }, | |||||
| { | |||||
| id:'1685924287505633281', | |||||
| name:'积分商城', | |||||
| } | |||||
| ], | |||||
| houseList:[], | |||||
| jobList:[], | |||||
| shopList:[], | |||||
| params:{ | |||||
| classId:'1623505640888492033', | |||||
| pageNo:1, | |||||
| pageSize:10, | |||||
| total: null, | |||||
| isLock: true | |||||
| }, | |||||
| } | |||||
| }, | |||||
| onLoad() { | |||||
| this.getbannerList(); | |||||
| this.getJobList(); | |||||
| }, | |||||
| // 隐藏微信h5的标题栏 | |||||
| onReady() { | |||||
| this.$com.displayNav() | |||||
| }, | |||||
| methods:{ | |||||
| seeDetail(item){//查看详情 | |||||
| this.$api('myInfo') | |||||
| .then(res=>{ | |||||
| if(res.code == 200){ | |||||
| this.role = res.result.role; | |||||
| this.userInfo = res.result; | |||||
| this.$store.commit('set_userInfo',res.result) | |||||
| uni.navigateTo({ | |||||
| url:`/pages/home/course-detial?id=${item.id}` | |||||
| }) | |||||
| }else{ | |||||
| this.$Toast('请先登录!') | |||||
| setTimeout(()=>{ | |||||
| uni.navigateTo({ | |||||
| url:'/pages/my/login-kehu' | |||||
| }) | |||||
| },1000) | |||||
| return | |||||
| this.userInfo = null | |||||
| } | |||||
| }) | |||||
| }, | |||||
| onPullDownRefresh() { | |||||
| this.houseList=[]; | |||||
| this.jobList=[]; | |||||
| this.shopList=[]; | |||||
| this.params.pageNo = 1; | |||||
| this.params.total = null; | |||||
| this.params.isLock = true; | |||||
| if(this.current == 0){ | |||||
| this.getJobList(); | |||||
| }else if(this.current == 1){ | |||||
| this.getHouseList() | |||||
| }else{ | |||||
| this.getShopList(); | |||||
| } | |||||
| uni.stopPullDownRefresh(); | |||||
| }, | |||||
| //获取租房信息 | |||||
| getbannerList(){ | |||||
| this.$api('bannerList',{state:'1'}) | |||||
| .then(res=>{ | |||||
| if(res.code == 200){ | |||||
| this.swpList = res.result | |||||
| } | |||||
| }) | |||||
| }, | |||||
| //获取兼职信息 | |||||
| getShopList(){ | |||||
| uni.showLoading() | |||||
| this.$api('getJobShopList',this.params) | |||||
| .then(res=>{ | |||||
| uni.hideLoading(); | |||||
| if(res.code == 200){ | |||||
| if(this.params.total== null) { | |||||
| this.params.total = res.result.total | |||||
| } | |||||
| if(this.params.pageNo>1){ | |||||
| uni.hideLoading(); | |||||
| } | |||||
| this.shopList = this.shopList.concat(res.result.records); | |||||
| this.params.isLock = true; | |||||
| }else { | |||||
| if(this.params.pageNo>1){ | |||||
| uni.hideLoading(); | |||||
| } | |||||
| this.params.isLock = true; | |||||
| } | |||||
| }) | |||||
| }, | |||||
| //获取兼职信息 | |||||
| getJobList(){ | |||||
| uni.showLoading() | |||||
| this.$api('JobList',this.params) | |||||
| .then(res=>{ | |||||
| uni.hideLoading(); | |||||
| if(res.code == 200){ | |||||
| if(this.params.total== null) { | |||||
| this.params.total = res.result.total | |||||
| } | |||||
| if(this.params.pageNo>1){ | |||||
| uni.hideLoading(); | |||||
| } | |||||
| this.jobList = this.jobList.concat(res.result.records); | |||||
| this.params.isLock = true; | |||||
| }else { | |||||
| if(this.params.pageNo>1){ | |||||
| uni.hideLoading(); | |||||
| } | |||||
| this.params.isLock = true; | |||||
| } | |||||
| }) | |||||
| }, | |||||
| //获取房源信息 | |||||
| getHouseList(){ | |||||
| uni.showLoading() | |||||
| this.$api('getHouseList',this.params) | |||||
| .then(res=>{ | |||||
| uni.hideLoading() | |||||
| if(res.code == 200){ | |||||
| if(this.params.total== null) { | |||||
| this.params.total = res.result.total | |||||
| } | |||||
| if(this.params.pageNo>1){ | |||||
| uni.hideLoading(); | |||||
| } | |||||
| this.houseList = this.houseList.concat(res.result.records); | |||||
| this.params.isLock = true; | |||||
| }else { | |||||
| if(this.params.pageNo>1){ | |||||
| uni.hideLoading(); | |||||
| } | |||||
| this.params.isLock = true; | |||||
| } | |||||
| }) | |||||
| }, | |||||
| //点击切换 | |||||
| tabClick(e){ | |||||
| this.params.classId=e.id; | |||||
| this.houseList=[]; | |||||
| this.jobList=[]; | |||||
| this.shopList=[]; | |||||
| this.current = e.index; | |||||
| this.params.pageNo = 1; | |||||
| if(this.current == 0){ | |||||
| this.getJobList(); | |||||
| }else if(this.current == 1){ | |||||
| this.getHouseList() | |||||
| }else{ | |||||
| this.getShopList(); | |||||
| } | |||||
| }, | |||||
| jianHuaNewDetail(item){ | |||||
| this.$api('myInfo') | |||||
| .then(res=>{ | |||||
| if(res.code == 200){ | |||||
| this.role = res.result.role; | |||||
| this.userInfo = res.result; | |||||
| this.$store.commit('set_userInfo',res.result) | |||||
| //如果不是会员请开通会员 | |||||
| uni.navigateTo({ | |||||
| url:`/pages/jianhua/course-detial?id=${item.id}` | |||||
| }) | |||||
| }else{ | |||||
| this.$Toast('请先登录!') | |||||
| setTimeout(()=>{ | |||||
| uni.navigateTo({ | |||||
| url:'/pages/my/login-kehu' | |||||
| }) | |||||
| },1000) | |||||
| return | |||||
| this.userInfo = null | |||||
| } | |||||
| }) | |||||
| }, | |||||
| //查看详情 | |||||
| newDetail(item){ | |||||
| this.$api('myInfo') | |||||
| .then(res=>{ | |||||
| if(res.code == 200){ | |||||
| this.role = res.result.role; | |||||
| this.userInfo = res.result; | |||||
| this.$store.commit('set_userInfo',res.result) | |||||
| //如果不是会员请开通会员 | |||||
| if(this.userInfo.isPay == 1){ | |||||
| uni.navigateTo({ | |||||
| url:`/pages/home/new-detail?id=${item.id}` | |||||
| }) | |||||
| }else{ | |||||
| this.$Toast("开通会员即可查看") | |||||
| //跳转到实名认证页面进行实名认证 | |||||
| setTimeout(()=>{ //设置延迟执行 | |||||
| uni.navigateTo({ | |||||
| url:'/pages/my/list-renzhen' | |||||
| }) | |||||
| },2000); | |||||
| } | |||||
| }else{ | |||||
| this.$Toast('请先登录!') | |||||
| setTimeout(()=>{ | |||||
| uni.navigateTo({ | |||||
| url:'/pages/my/login-kehu' | |||||
| }) | |||||
| },1000) | |||||
| return | |||||
| this.userInfo = null | |||||
| } | |||||
| }) | |||||
| }, | |||||
| lower(){ | |||||
| if(this.params.pageNo >= this.pages) return; | |||||
| this.params.pageNo ++; | |||||
| this.getHouseList(); | |||||
| }, | |||||
| } | |||||
| } | |||||
| </script> | |||||
| <style lang="scss" scoped> | |||||
| .home-pages { | |||||
| padding: 18rpx 29rpx 0; | |||||
| background-color: #F7F7F7; | |||||
| .scroll-Y { | |||||
| height: calc(100vh - 210rpx); | |||||
| padding-top: 20rpx; | |||||
| } | |||||
| } | |||||
| </style> | |||||
| @ -0,0 +1,216 @@ | |||||
| <template> | |||||
| <view> | |||||
| <view class="home-pages"> | |||||
| <view style="position: absolute;top: 0; left: 0; height: 188rpx; width: 100%; z-index: 100; background-color: #FFFFFF; box-shadow: 0px 15px 10px -15px #E8E8E8;"> | |||||
| <view style="margin: 28rpx 24rpx; display: flex;"> | |||||
| <image :showLoading="true" :src="userInfo?userInfo.headImage : ''" style="width: 148rpx;height: 148rpx;border-radius: 50%;"></image> | |||||
| <view style="padding: 28rpx;"> | |||||
| <view style="font-size: 32rpx;font-weight: 600">{{userInfo?userInfo.nickName : '点击登录'}}</view> | |||||
| <view style="font-size: 30rpx;margin-top: 20rpx;">积分余额:{{userInfo.integerPrice}}</view> | |||||
| </view> | |||||
| </view> | |||||
| </view> | |||||
| <view class="home-content"> | |||||
| <user-card v-for="(item,i) in informationList" :key="i" :item="item"></user-card> | |||||
| </view> | |||||
| </view> | |||||
| </view> | |||||
| </template> | |||||
| <script> | |||||
| import userCard from '@/components/user-card/index-integer.vue' | |||||
| export default{ | |||||
| components:{ | |||||
| userCard | |||||
| }, | |||||
| data(){ | |||||
| return{ | |||||
| userInfo:{ | |||||
| integerPrice:0.00 | |||||
| }, | |||||
| current:1, | |||||
| activiteList:[], | |||||
| informationList:[], | |||||
| params:{ | |||||
| pageNo:1, | |||||
| pageSize:10, | |||||
| total: null, | |||||
| isLock: true | |||||
| }, | |||||
| } | |||||
| }, | |||||
| onShow() { | |||||
| this.getmyInfo() | |||||
| }, | |||||
| onLoad() { | |||||
| this.getinformation() | |||||
| // if(this.current == 0){ | |||||
| // this.getActivity(); | |||||
| // }else{ | |||||
| // this.getinformation() | |||||
| // } | |||||
| }, | |||||
| onPullDownRefresh() { | |||||
| this.activiteList = []; | |||||
| this.params.pageNo = 1; | |||||
| this.params.total = null; | |||||
| this.params.isLock = true; | |||||
| this.getinformation() | |||||
| }, | |||||
| onReachBottom() { | |||||
| if(this.params.isLock){ | |||||
| this.params.isLock = false; | |||||
| if(this.params.total !== null && this.params.pageNo * this.params.pageSize >= this.params.total){ | |||||
| this.$Toast('没有更多数据!'); | |||||
| setTimeout(()=>{ | |||||
| this.params.isLock = true; | |||||
| },3000) | |||||
| return | |||||
| } | |||||
| this.params.pageNo+=1; | |||||
| this.$Toast('数据加载成功!'); | |||||
| this.getinformation() | |||||
| } | |||||
| }, | |||||
| onPullDownRefresh() { | |||||
| this.params.pageNo = 1; | |||||
| this.getinformation() | |||||
| // if(this.current == 0){ | |||||
| // this.getActivity(); | |||||
| // }else{ | |||||
| // this.getinformation() | |||||
| // } | |||||
| }, | |||||
| // 隐藏微信h5的标题栏 | |||||
| onReady() { | |||||
| this.$com.displayNav() | |||||
| }, | |||||
| methods:{ | |||||
| getmyInfo(){ | |||||
| this.$api('myInfo') | |||||
| .then(res=>{ | |||||
| if(res.code == 200){ | |||||
| this.role = res.result.role; | |||||
| this.userInfo = res.result; | |||||
| this.$store.commit('set_userInfo',res.result) | |||||
| }else{ | |||||
| this.userInfo = null | |||||
| } | |||||
| }) | |||||
| }, | |||||
| // tabClick(e){ | |||||
| // this.current = e.index; | |||||
| // this.params.pageNo = 1; | |||||
| // if(this.current == 0){ | |||||
| // this.getActivity(2); | |||||
| // }else{ | |||||
| // this.getinformation(2) | |||||
| // } | |||||
| // }, | |||||
| // getActivity(type){ | |||||
| // uni.showLoading() | |||||
| // this.$api('activity',this.params) | |||||
| // .then(res=>{ | |||||
| // uni.hideLoading() | |||||
| // if(res.code == 200){ | |||||
| // if(this.params.total== null) { | |||||
| // this.params.total = res.result.total | |||||
| // } | |||||
| // if(this.params.pageNo>1){ | |||||
| // uni.hideLoading(); | |||||
| // } | |||||
| // this.pages = this.pages.concat(res.result.pages); | |||||
| // this.params.isLock = true; | |||||
| // }else { | |||||
| // if(this.params.pageNo>1){ | |||||
| // uni.hideLoading(); | |||||
| // } | |||||
| // this.params.isLock = true; | |||||
| // } | |||||
| // }) | |||||
| // }, | |||||
| getinformation(type){ | |||||
| uni.showLoading() | |||||
| this.$api('getIntegerList',this.params) | |||||
| .then(res=>{ | |||||
| uni.hideLoading() | |||||
| if(res.code == 200){ | |||||
| if(this.params.total== null) { | |||||
| this.params.total = res.result.total | |||||
| } | |||||
| if(this.params.pageNo>1){ | |||||
| uni.hideLoading(); | |||||
| } | |||||
| this.informationList = this.informationList.concat(res.result.records); | |||||
| this.params.isLock = true; | |||||
| }else { | |||||
| if(this.params.pageNo>1){ | |||||
| uni.hideLoading(); | |||||
| } | |||||
| this.params.isLock = true; | |||||
| } | |||||
| }) | |||||
| // uni.showLoading() | |||||
| // this.$api('getFans',this.params) | |||||
| // .then(res=>{ | |||||
| // uni.hideLoading() | |||||
| // if(res.code == 200){ | |||||
| // this.pages = res.result.pages; | |||||
| // if(type == 2){ | |||||
| // this.informationList = [...this.informationList,...res.result.records]; | |||||
| // }else{ | |||||
| // this.informationList = res.result.records; | |||||
| // uni.stopPullDownRefresh(); | |||||
| // } | |||||
| // } | |||||
| // }) | |||||
| }, | |||||
| seeDetail(item){//查看详情 | |||||
| uni.navigateTo({ | |||||
| url:`/pages/home/course-detial?id=${item.id}` | |||||
| }) | |||||
| }, | |||||
| newDetail(item){//知识查看详情 | |||||
| uni.navigateTo({ | |||||
| url:`/pages/home/new-detail?id=${item.id}` | |||||
| }) | |||||
| }, | |||||
| lower(){ | |||||
| if(this.params.pageNo >= this.pages) return; | |||||
| this.params.pageNo ++; | |||||
| if(this.current == 0){ | |||||
| this.getActivity(2); | |||||
| }else{ | |||||
| this.getinformation(2) | |||||
| } | |||||
| }, | |||||
| } | |||||
| } | |||||
| </script> | |||||
| <style lang="scss" scoped> | |||||
| .home-content { | |||||
| margin-top: 20rpx; | |||||
| } | |||||
| .home-pages { | |||||
| padding: 188rpx 29rpx 0; | |||||
| background-color: #F7F7F7; | |||||
| .scroll-Y { | |||||
| height: calc(100vh - 200rpx); | |||||
| padding-top: 20rpx; | |||||
| } | |||||
| } | |||||
| </style> | |||||
| @ -0,0 +1,216 @@ | |||||
| <template> | |||||
| <view> | |||||
| <view class="home-pages"> | |||||
| <view style="position: absolute;top: 0; left: 0; height: 188rpx; width: 100%; z-index: 100; background-color: #FFFFFF; box-shadow: 0px 15px 10px -15px #E8E8E8;"> | |||||
| <view style="margin: 28rpx 24rpx; display: flex;"> | |||||
| <image :showLoading="true" :src="userInfo?userInfo.headImage : ''" style="width: 148rpx;height: 148rpx;border-radius: 50%;"></image> | |||||
| <view style="padding: 28rpx;"> | |||||
| <view style="font-size: 32rpx;font-weight: 600">{{userInfo?userInfo.nickName : '点击登录'}}</view> | |||||
| <view style="font-size: 30rpx;margin-top: 20rpx;">我的余额:{{userInfo.price}}</view> | |||||
| </view> | |||||
| </view> | |||||
| </view> | |||||
| <view class="home-content"> | |||||
| <user-card v-for="(item,i) in informationList" :key="i" :item="item"></user-card> | |||||
| </view> | |||||
| </view> | |||||
| </view> | |||||
| </template> | |||||
| <script> | |||||
| import userCard from '@/components/user-card/index-price.vue' | |||||
| export default{ | |||||
| components:{ | |||||
| userCard | |||||
| }, | |||||
| data(){ | |||||
| return{ | |||||
| userInfo:{ | |||||
| price:0.00 | |||||
| }, | |||||
| current:1, | |||||
| activiteList:[], | |||||
| informationList:[], | |||||
| params:{ | |||||
| pageNo:1, | |||||
| pageSize:10, | |||||
| total: null, | |||||
| isLock: true | |||||
| }, | |||||
| } | |||||
| }, | |||||
| onShow() { | |||||
| this.getmyInfo() | |||||
| }, | |||||
| onLoad() { | |||||
| this.getinformation() | |||||
| // if(this.current == 0){ | |||||
| // this.getActivity(); | |||||
| // }else{ | |||||
| // this.getinformation() | |||||
| // } | |||||
| }, | |||||
| onPullDownRefresh() { | |||||
| this.activiteList = []; | |||||
| this.params.pageNo = 1; | |||||
| this.params.total = null; | |||||
| this.params.isLock = true; | |||||
| this.getinformation() | |||||
| }, | |||||
| onReachBottom() { | |||||
| if(this.params.isLock){ | |||||
| this.params.isLock = false; | |||||
| if(this.params.total !== null && this.params.pageNo * this.params.pageSize >= this.params.total){ | |||||
| this.$Toast('没有更多数据!'); | |||||
| setTimeout(()=>{ | |||||
| this.params.isLock = true; | |||||
| },3000) | |||||
| return | |||||
| } | |||||
| this.params.pageNo+=1; | |||||
| this.$Toast('数据加载成功!'); | |||||
| this.getinformation() | |||||
| } | |||||
| }, | |||||
| onPullDownRefresh() { | |||||
| this.params.pageNo = 1; | |||||
| this.getinformation() | |||||
| // if(this.current == 0){ | |||||
| // this.getActivity(); | |||||
| // }else{ | |||||
| // this.getinformation() | |||||
| // } | |||||
| }, | |||||
| // 隐藏微信h5的标题栏 | |||||
| onReady() { | |||||
| this.$com.displayNav() | |||||
| }, | |||||
| methods:{ | |||||
| getmyInfo(){ | |||||
| this.$api('myInfo') | |||||
| .then(res=>{ | |||||
| if(res.code == 200){ | |||||
| this.role = res.result.role; | |||||
| this.userInfo = res.result; | |||||
| this.$store.commit('set_userInfo',res.result) | |||||
| }else{ | |||||
| this.userInfo = null | |||||
| } | |||||
| }) | |||||
| }, | |||||
| // tabClick(e){ | |||||
| // this.current = e.index; | |||||
| // this.params.pageNo = 1; | |||||
| // if(this.current == 0){ | |||||
| // this.getActivity(2); | |||||
| // }else{ | |||||
| // this.getinformation(2) | |||||
| // } | |||||
| // }, | |||||
| // getActivity(type){ | |||||
| // uni.showLoading() | |||||
| // this.$api('activity',this.params) | |||||
| // .then(res=>{ | |||||
| // uni.hideLoading() | |||||
| // if(res.code == 200){ | |||||
| // if(this.params.total== null) { | |||||
| // this.params.total = res.result.total | |||||
| // } | |||||
| // if(this.params.pageNo>1){ | |||||
| // uni.hideLoading(); | |||||
| // } | |||||
| // this.pages = this.pages.concat(res.result.pages); | |||||
| // this.params.isLock = true; | |||||
| // }else { | |||||
| // if(this.params.pageNo>1){ | |||||
| // uni.hideLoading(); | |||||
| // } | |||||
| // this.params.isLock = true; | |||||
| // } | |||||
| // }) | |||||
| // }, | |||||
| getinformation(type){ | |||||
| uni.showLoading() | |||||
| this.$api('getPriceList',this.params) | |||||
| .then(res=>{ | |||||
| uni.hideLoading(); | |||||
| if(res.code == 200){ | |||||
| if(this.params.total== null) { | |||||
| this.params.total = res.result.total | |||||
| } | |||||
| if(this.params.pageNo>1){ | |||||
| uni.hideLoading(); | |||||
| } | |||||
| this.informationList = this.informationList.concat(res.result.records); | |||||
| this.params.isLock = true; | |||||
| }else { | |||||
| if(this.params.pageNo>1){ | |||||
| uni.hideLoading(); | |||||
| } | |||||
| this.params.isLock = true; | |||||
| } | |||||
| }) | |||||
| // uni.showLoading() | |||||
| // this.$api('getFans',this.params) | |||||
| // .then(res=>{ | |||||
| // uni.hideLoading() | |||||
| // if(res.code == 200){ | |||||
| // this.pages = res.result.pages; | |||||
| // if(type == 2){ | |||||
| // this.informationList = [...this.informationList,...res.result.records]; | |||||
| // }else{ | |||||
| // this.informationList = res.result.records; | |||||
| // uni.stopPullDownRefresh(); | |||||
| // } | |||||
| // } | |||||
| // }) | |||||
| }, | |||||
| seeDetail(item){//查看详情 | |||||
| uni.navigateTo({ | |||||
| url:`/pages/home/course-detial?id=${item.id}` | |||||
| }) | |||||
| }, | |||||
| newDetail(item){//知识查看详情 | |||||
| uni.navigateTo({ | |||||
| url:`/pages/home/new-detail?id=${item.id}` | |||||
| }) | |||||
| }, | |||||
| lower(){ | |||||
| if(this.params.pageNo >= this.pages) return; | |||||
| this.params.pageNo ++; | |||||
| if(this.current == 0){ | |||||
| this.getActivity(2); | |||||
| }else{ | |||||
| this.getinformation(2) | |||||
| } | |||||
| }, | |||||
| } | |||||
| } | |||||
| </script> | |||||
| <style lang="scss" scoped> | |||||
| .home-content { | |||||
| margin-top: 20rpx; | |||||
| } | |||||
| .home-pages { | |||||
| padding: 188rpx 29rpx 0; | |||||
| background-color: #F7F7F7; | |||||
| .scroll-Y { | |||||
| height: calc(100vh - 200rpx); | |||||
| padding-top: 20rpx; | |||||
| } | |||||
| } | |||||
| </style> | |||||
| @ -0,0 +1,157 @@ | |||||
| <template> | |||||
| <view> | |||||
| <view class="from"> | |||||
| <view class="from-line"> | |||||
| <span class="label-class">姓名:</span> | |||||
| <view><input v-model="release.name" placeholder="请输入姓名"/></view> | |||||
| </view> | |||||
| <view class="from-line"> | |||||
| <span class="label-class">电话:</span> | |||||
| <view><input v-model="release.phone" placeholder="请输入电话"/></view> | |||||
| </view> | |||||
| <view class="from-line"> | |||||
| <span class="label-class">地址:</span> | |||||
| <view><input v-model="release.region" placeholder="请输入地址信息"/></view> | |||||
| </view> | |||||
| <view class="from-line"> | |||||
| <span class="label-class">详细地址:</span> | |||||
| <view><input v-model="release.detailAddress" placeholder="请输入地址详情"/></view> | |||||
| </view> | |||||
| </view> | |||||
| <view class="pay-btn" @click="fabujianzhi()"> | |||||
| 提交地址信息 | |||||
| </view> | |||||
| </view> | |||||
| </template> | |||||
| <script> | |||||
| import userCard from '@/components/user-card/index.vue' | |||||
| export default{ | |||||
| components:{ | |||||
| userCard | |||||
| }, | |||||
| data(){ | |||||
| return{ | |||||
| release:{ | |||||
| name:"", | |||||
| phone:"", | |||||
| region:"", | |||||
| detailAddress:"", | |||||
| } | |||||
| } | |||||
| }, | |||||
| onShow() { | |||||
| this.getmyInfo() | |||||
| }, | |||||
| onLoad() { | |||||
| }, | |||||
| onReady() { | |||||
| this.$com.displayNav() | |||||
| }, | |||||
| methods:{ | |||||
| getmyInfo(){ | |||||
| this.$api('myInfo') | |||||
| .then(res=>{ | |||||
| if(res.code == 200){ | |||||
| this.role = res.result.role; | |||||
| this.userInfo = res.result; | |||||
| this.$store.commit('set_userInfo',res.result) | |||||
| }else{ | |||||
| this.userInfo = null | |||||
| } | |||||
| }) | |||||
| }, | |||||
| fabujianzhi(){ | |||||
| let that = this; | |||||
| if(that.release.name == ''){ | |||||
| this.$Toast("姓名不能为空"); | |||||
| return | |||||
| } | |||||
| if(that.release.phone == null){ | |||||
| this.$Toast("电话不能为空") | |||||
| return | |||||
| } | |||||
| if(that.release.region == ''){ | |||||
| this.$Toast("地址不能为空") | |||||
| return | |||||
| } | |||||
| if(that.release.detailAddress == null){ | |||||
| this.$Toast("地址详情不能为空") | |||||
| return | |||||
| } | |||||
| let params = { | |||||
| name:that.release.name, | |||||
| phone:that.release.phone, | |||||
| region:that.release.region, | |||||
| detailAddress:that.release.detailAddress, | |||||
| } | |||||
| that.$api('saveOrUpdateAddress',params).then(res=>{ | |||||
| this.$Toast(res.message); | |||||
| setTimeout(()=>{ | |||||
| uni.navigateTo({ | |||||
| url:'/pages/my/my-address-list' | |||||
| }) | |||||
| },1500) | |||||
| }); | |||||
| }, | |||||
| } | |||||
| } | |||||
| </script> | |||||
| <style lang="scss" scoped> | |||||
| .from { | |||||
| margin-top: 20rpx; | |||||
| } | |||||
| .from-line { | |||||
| height: 138rpx; | |||||
| display: flex; | |||||
| .label-class{ | |||||
| text-align: justify; | |||||
| text-align-last: justify; | |||||
| line-height: 128rpx; | |||||
| width: 128rpx; | |||||
| padding: 0 24rpx; | |||||
| } | |||||
| input{ | |||||
| padding-left: 10rpx; | |||||
| height: 128rpx; | |||||
| line-height: 128rpx; | |||||
| } | |||||
| } | |||||
| .from-line-box { | |||||
| height: 328rpx; | |||||
| margin-right: 50rpx; | |||||
| display: flex; | |||||
| .label-class{ | |||||
| text-align: justify; | |||||
| text-align-last: justify; | |||||
| line-height: 128rpx; | |||||
| width: 128rpx; | |||||
| padding: 0 24rpx; | |||||
| } | |||||
| input{ | |||||
| padding-left: 20rpx; | |||||
| height: 228rpx; | |||||
| line-height: 128rpx; | |||||
| } | |||||
| } | |||||
| .pay-btn{ | |||||
| margin:190rpx auto; | |||||
| width: 387rpx; | |||||
| text-align: center; | |||||
| border-radius: 12rpx; | |||||
| height: 78rpx; | |||||
| line-height: 78rpx; | |||||
| background-color: #00CCCC; | |||||
| color: #FFFFFF; | |||||
| } | |||||
| </style> | |||||
| @ -0,0 +1,160 @@ | |||||
| <template> | |||||
| <view class="home-pages"> | |||||
| <view style="color: #707070; | |||||
| font-size: 28rpx;"> | |||||
| </view> | |||||
| <view class="home-content"> | |||||
| <u-tabs | |||||
| :list="tabList" | |||||
| lineWidth="70" | |||||
| lineHeight="3" | |||||
| lineColor= "#00CCCC" | |||||
| :activeStyle="{ | |||||
| color: '#000000', | |||||
| fontWeight: 'bold', | |||||
| transform: 'scale(1.35)' | |||||
| }" | |||||
| :inactiveStyle="{ | |||||
| color: '#000000', | |||||
| transform: 'scale(1)' | |||||
| }" | |||||
| itemStyle="padding-left: 15px; padding-right: 15px; height: 34px;" | |||||
| @click="tabClick" | |||||
| > | |||||
| </u-tabs> | |||||
| <scroll-view scroll-y="true" class="scroll-y" | |||||
| <card v-for="(item,i) in studyList" :item="item" :key="i" :i="i" @seeDetail="seeDetail"></card> | |||||
| </scroll-view> | |||||
| </view> | |||||
| </view> | |||||
| </template> | |||||
| <script> | |||||
| import card from '@/components/active-card/address-list.vue' | |||||
| export default{ | |||||
| components:{ | |||||
| card, | |||||
| }, | |||||
| data(){ | |||||
| return{ | |||||
| params:{ | |||||
| pageNo:1, | |||||
| labelClass:'0', | |||||
| pageSize:10, | |||||
| total: null, | |||||
| isLock: true | |||||
| }, | |||||
| current:0, | |||||
| studyList:[], | |||||
| tabList: [ | |||||
| { | |||||
| id:'0', | |||||
| name:'地址信息' | |||||
| }, | |||||
| ] | |||||
| } | |||||
| }, | |||||
| onLoad() { | |||||
| this.studyList = []; | |||||
| this.params.labelClass = "0"; | |||||
| this.params.pageNo = 1; | |||||
| this.params.total = null; | |||||
| this.params.isLock = true; | |||||
| this.queryPageListJobRelease(); | |||||
| }, | |||||
| // 隐藏微信h5的标题栏 | |||||
| onReady() { | |||||
| this.$com.displayNav() | |||||
| }, | |||||
| onPullDownRefresh() { | |||||
| this.studyList = []; | |||||
| this.params.pageNo = 1; | |||||
| this.params.total = null; | |||||
| this.params.isLock = true; | |||||
| this.queryPageListJobRelease() | |||||
| }, | |||||
| onReachBottom() { | |||||
| if(this.params.isLock){ | |||||
| this.params.isLock = false; | |||||
| if(this.params.total !== null && this.params.pageNo * this.params.pageSize >= this.params.total){ | |||||
| this.$Toast('没有更多数据了哦!'); | |||||
| setTimeout(()=>{ | |||||
| this.params.isLock = true; | |||||
| },3000) | |||||
| return | |||||
| } | |||||
| this.params.pageNo+=1; | |||||
| this.$Toast('数据加载成功!'); | |||||
| this.queryPageListJobRelease(); | |||||
| } | |||||
| }, | |||||
| methods:{ | |||||
| queryPageListJobRelease(){//学习列表 | |||||
| if(this.pageNo>1){ | |||||
| uni.showLoading({}) | |||||
| } | |||||
| this.$api('getAddressList',this.params) | |||||
| .then(res=>{ | |||||
| if(res.code == 200){ | |||||
| if(this.params.total== null) { | |||||
| this.params.total = res.result.total | |||||
| } | |||||
| if(this.params.pageNo>1){ | |||||
| uni.hideLoading(); | |||||
| } | |||||
| this.studyList = this.studyList.concat(res.result.records); | |||||
| this.params.isLock = true; | |||||
| }else { | |||||
| if(this.params.pageNo>1){ | |||||
| uni.hideLoading(); | |||||
| } | |||||
| this.params.isLock = true; | |||||
| } | |||||
| }) | |||||
| }, | |||||
| tabClick(e){ | |||||
| this.params.labelClass = e.id; | |||||
| this.params.pageNo =1; | |||||
| this.studyList = []; | |||||
| this.queryPageListJobRelease(); | |||||
| }, | |||||
| } | |||||
| } | |||||
| </script> | |||||
| <style lang="scss" scoped> | |||||
| .home-pages { | |||||
| padding: 28rpx 29rpx 0; | |||||
| background-color: #F7F7F7; | |||||
| .swiper{ | |||||
| position: relative; | |||||
| height: calc(100% -7vh); | |||||
| width: 100%; | |||||
| height: 1800px; | |||||
| } | |||||
| .scroll-Y { | |||||
| height: calc(300vh - 660rpx); | |||||
| padding-top: 20rpx; | |||||
| } | |||||
| .home-content { | |||||
| .active-card{ | |||||
| margin-top: 20rpx;; | |||||
| border-radius: 0; | |||||
| border: none; | |||||
| border-style: none; | |||||
| box-shadow: none; | |||||
| } | |||||
| } | |||||
| } | |||||
| </style> | |||||
| @ -0,0 +1,172 @@ | |||||
| <template> | |||||
| <view class="home-pages"> | |||||
| <view style="color: #707070; | |||||
| font-size: 28rpx;"> | |||||
| </view> | |||||
| <view class="home-content"> | |||||
| <u-tabs | |||||
| :list="tabList" | |||||
| lineWidth="70" | |||||
| lineHeight="3" | |||||
| lineColor= "#00CCCC" | |||||
| :activeStyle="{ | |||||
| color: '#000000', | |||||
| fontWeight: 'bold', | |||||
| transform: 'scale(1.35)' | |||||
| }" | |||||
| :inactiveStyle="{ | |||||
| color: '#000000', | |||||
| transform: 'scale(1)' | |||||
| }" | |||||
| itemStyle="padding-left: 15px; padding-right: 15px; height: 34px;" | |||||
| @click="tabClick" | |||||
| > | |||||
| </u-tabs> | |||||
| <scroll-view scroll-y="true" class="scroll-y" | |||||
| <card v-for="(item,i) in studyList" :item="item" :key="i" :i="i" @seeDetail="seeDetail"></card> | |||||
| </scroll-view> | |||||
| </view> | |||||
| </view> | |||||
| </template> | |||||
| <script> | |||||
| import card from '@/components/active-card/order-list.vue' | |||||
| export default{ | |||||
| components:{ | |||||
| card, | |||||
| }, | |||||
| data(){ | |||||
| return{ | |||||
| params:{ | |||||
| pageNo:1, | |||||
| state:'0', | |||||
| pageSize:10, | |||||
| total: null, | |||||
| isLock: true | |||||
| }, | |||||
| current:0, | |||||
| studyList:[], | |||||
| tabList: [ | |||||
| { | |||||
| id:'0', | |||||
| name:'未支付' | |||||
| }, | |||||
| { | |||||
| id:'1', | |||||
| name:'已支付' | |||||
| }, | |||||
| { | |||||
| id:'2', | |||||
| name:'已发货' | |||||
| }, | |||||
| { | |||||
| id:'3', | |||||
| name:'已收货' | |||||
| } | |||||
| ] | |||||
| } | |||||
| }, | |||||
| onLoad() { | |||||
| this.studyList = []; | |||||
| this.params.state = "0"; | |||||
| this.params.pageNo = 1; | |||||
| this.params.total = null; | |||||
| this.params.isLock = true; | |||||
| this.queryPageListJobRelease(); | |||||
| }, | |||||
| // 隐藏微信h5的标题栏 | |||||
| onReady() { | |||||
| this.$com.displayNav() | |||||
| }, | |||||
| onPullDownRefresh() { | |||||
| this.studyList = []; | |||||
| this.params.pageNo = 1; | |||||
| this.params.total = null; | |||||
| this.params.isLock = true; | |||||
| this.queryPageListJobRelease() | |||||
| }, | |||||
| onReachBottom() { | |||||
| if(this.params.isLock){ | |||||
| this.params.isLock = false; | |||||
| if(this.params.total !== null && this.params.pageNo * this.params.pageSize >= this.params.total){ | |||||
| this.$Toast('没有更多数据了哦!'); | |||||
| setTimeout(()=>{ | |||||
| this.params.isLock = true; | |||||
| },3000) | |||||
| return | |||||
| } | |||||
| this.params.pageNo+=1; | |||||
| this.$Toast('数据加载成功!'); | |||||
| this.queryPageListJobRelease(); | |||||
| } | |||||
| }, | |||||
| methods:{ | |||||
| queryPageListJobRelease(){//学习列表 | |||||
| if(this.pageNo>1){ | |||||
| uni.showLoading({}) | |||||
| } | |||||
| this.$api('getOrderList',this.params) | |||||
| .then(res=>{ | |||||
| if(res.code == 200){ | |||||
| if(this.params.total== null) { | |||||
| this.params.total = res.result.total | |||||
| } | |||||
| if(this.params.pageNo>1){ | |||||
| uni.hideLoading(); | |||||
| } | |||||
| this.studyList = this.studyList.concat(res.result.records); | |||||
| this.params.isLock = true; | |||||
| }else { | |||||
| if(this.params.pageNo>1){ | |||||
| uni.hideLoading(); | |||||
| } | |||||
| this.params.isLock = true; | |||||
| } | |||||
| }) | |||||
| }, | |||||
| tabClick(e){ | |||||
| this.params.state = e.id; | |||||
| this.params.pageNo =1; | |||||
| this.studyList = []; | |||||
| this.queryPageListJobRelease(); | |||||
| }, | |||||
| } | |||||
| } | |||||
| </script> | |||||
| <style lang="scss" scoped> | |||||
| .home-pages { | |||||
| padding: 28rpx 29rpx 0; | |||||
| background-color: #F7F7F7; | |||||
| .swiper{ | |||||
| position: relative; | |||||
| height: calc(100% -7vh); | |||||
| width: 100%; | |||||
| height: 1800px; | |||||
| } | |||||
| .scroll-Y { | |||||
| height: calc(300vh - 660rpx); | |||||
| padding-top: 20rpx; | |||||
| } | |||||
| .home-content { | |||||
| .active-card{ | |||||
| margin-top: 20rpx;; | |||||
| border-radius: 0; | |||||
| border: none; | |||||
| border-style: none; | |||||
| box-shadow: none; | |||||
| } | |||||
| } | |||||
| } | |||||
| </style> | |||||