|
|
@@ -4,12 +4,12 @@
|
|
|
<view class="z-tabs-scroll-view row-justify-sb center" style="position: relative;">
|
|
|
<view class="column-c tab-item p-lr30 p-t30 p-b20" v-for="(item,index) in navList" :key="index"
|
|
|
@click="setType(index)">
|
|
|
- <image class="wh-60 r-circle" :class="index===current?'double-border':''" :src="item.icon"
|
|
|
+ <image class="wh-60 r-circle" :class="index===current?'double-border':''" :src="item.product_icon"
|
|
|
mode="aspectFill">
|
|
|
</image>
|
|
|
<view class="m-t16 sys-size-24 text-center sys-weight-600"
|
|
|
:class="{'default-text':index===current}">
|
|
|
- {{item.name}}
|
|
|
+ {{item.product_name}}
|
|
|
</view>
|
|
|
<!-- <view class="half-circle m-t20" :class="{'half-circle1':current==1}" v-if="current==index"></view> -->
|
|
|
</view>
|
|
|
@@ -20,29 +20,36 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
- export default {
|
|
|
+ import {getTaskType} from "@/api/task";
|
|
|
+
|
|
|
+ export default {
|
|
|
data() {
|
|
|
return {
|
|
|
current: 0,
|
|
|
- navList: [{
|
|
|
- name: '垫资还款',
|
|
|
- icon: '/static/img/task/task-refund.png'
|
|
|
- }, {
|
|
|
- name: '房抵业务',
|
|
|
- icon: '/static/img/task/task-loan.png'
|
|
|
- }, {
|
|
|
- name: '消费金融',
|
|
|
- icon: '/static/img/task/task-financial.png'
|
|
|
- }, {
|
|
|
- name: '其他服务',
|
|
|
- icon: '/static/img/task/task-else.png'
|
|
|
- }, ]
|
|
|
- }
|
|
|
- },
|
|
|
- methods: {
|
|
|
- setType(current) {
|
|
|
- // this.$nextTick(() => {
|
|
|
- // uni.createSelectorQuery().in(this).select(".z-tabs-scroll-view").fields({
|
|
|
+ navList: [
|
|
|
+ {
|
|
|
+ id:0,
|
|
|
+ product_name: '全部',
|
|
|
+ product_icon: '/static/img/task/task-all.png'
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ this.getTaskType()
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ getTaskType(){
|
|
|
+ getTaskType().then(res=>{
|
|
|
+ if(res.code===1){
|
|
|
+ this.navList.push(...res.data)
|
|
|
+
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
+ setType(current) {
|
|
|
+ // this.$nextTick(() => {
|
|
|
+ // uni.createSelectorQuery().in(this).select(".z-tabs-scroll-view").fields({
|
|
|
// scrollOffset: true
|
|
|
// }, data => {
|
|
|
// if (data) {
|