12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970 |
- <template name="times">
- <view>
- <view class="cu-timeline" v-for="(v,k) in fetch.times" :key="v.id">
- <view class="cu-time">{{v.name}}</view>
- <view class="cu-item" :class="v1.id == times ? 'text-blue' : ''" v-for="(v1,k1) in v.child" :key="v1.id" :style="{backgroundImage: v1.icon}">
- <view class="content" :style="{color:v1.color,backgroundColor:v1.bgcolor}" @click="go(v1)">
- <view class="cu-capsule radius">
- <view class="cu-tag bg-cyan">{{v1.name}}</view>
- </view>
- <view class="margin-top" v-if="v1.desc&& !v1.pic">{{v1.desc}}</view>
- <view class="margin-top" v-if="v1.pic && !v1.desc"><image :src="v1.pic" mode="widthFix" class="slide-image" style="height:auto"></image></view>
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- export default {
- name: "times",
- props: {
- content_id : {
- type : String,
- value : null
- },
- width : {
- type : String,
- default : '100%'
- },
- code : {
- type : String,
- default : ''
- },
- param : {},
- index : 0,
- times : 0,
- },
- data() {
- return {
- fetch : {},
- }
- },
- mounted() {
- this.fetch = this.param;
- },
- methods:{
- getData : function() {
- this.$emit('getTimes');
- },
- getInfo : function(t) {
- //触底刷新
- },
- go : function(times) {
- var self = this;
- this.Dever.alert('正在进入' + times.name);
- // 要拿到最新的page_id
- this.Dever.post('app/collection/?l=api.getPageId', {code:this.code,times_id:times.id}, function(t) {
- self.Dever.location('dream/view?code=' + t.code);
- })
-
- },
- },
- }
- </script>
- <style>
- .slide-image {
-
- }
- </style>
|