dever пре 4 година
родитељ
комит
84ccd7a546
4 измењених фајлова са 26 додато и 19 уклоњено
  1. 5 4
      pages/dream/func/my.vue
  2. 17 10
      pages/dream/func/times.vue
  3. 2 1
      pages/dream/view.vue
  4. 2 4
      pages/dream/view/product.vue

+ 5 - 4
pages/dream/func/my.vue

@@ -35,11 +35,12 @@
 									<view class="text-pink"><view class="text-cut">{{v.name}}</view></view>
 									<view class="text-gray text-sm flex"> <view class="text-cut">{{v.date}}</view></view>
 								</view>
-								<view class="action">
+								<view class="action" style="width:120rpx;">
 									<view class="text-grey text-xs">{{v.price}}</view>
-									<view class="cu-tag round bg-red sm" v-if="v.status == 1">{{v.status_name}}</view>
-									<view class="cu-tag round bg-blue sm" v-if="v.status == 2 || v.status > 3">{{v.status_name}}</view>
-									<view class="cu-tag round bg-black sm" v-if="v.status == 3">{{v.status_name}}</view>
+									<view class="cu-tag round bg-red sm" v-if="v.shape == 2">查看详情</view>
+									<view class="cu-tag round bg-black sm" v-else-if="v.mode == 2">查看自提码</view>
+									<view class="cu-tag round bg-blue sm" v-else>{{v.status_name}}</view>
+									
 								</view>
 							</view>
 						</view>

+ 17 - 10
pages/dream/func/times.vue

@@ -7,8 +7,8 @@
 					<view class="cu-capsule radius">
 						<view class="cu-tag bg-cyan">{{v1.name}}</view>
 						<view class="cu-tag line-white">
-							<picker mode="date" :value="fetch.user_times[v1.id] && fetch.user_times[v1.id].day != 0 ? fetch.user_times[v1.id].day : v1.year + '-' + month + '-' + day" :start="v1.year+`-01-01`" :end="v1.year+`-12-31`" @change="selectDay" :data-year="v1.year" :data-name="v1.name" :data-id="v1.id">
-								<view class="uni-input">{{fetch.user_times[v1.id] && fetch.user_times[v1.id].day != 0 ? fetch.user_times[v1.id].day : '正点'}}</view>
+							<picker mode="date" :value="fetch.user_times[v1.id] && fetch.user_times[v1.id].day != 0 ? fetch.user_times[v1.id].day : v1.year + '-' + month + '-' + day" :start="v1.year+`-01-01`" :end="v1.year+`-12-31`" :fields="`day`" @change="selectDay" :data-year="v1.year" :data-name="v1.name" :data-id="v1.id">
+								<view class="uni-input">{{fetch.user_times[v1.id] && fetch.user_times[v1.id].day != 0 ? fetch.user_times[v1.id].day : '主序时间'}}</view>
 							</picker>
 						</view>
 					</view>
@@ -36,7 +36,8 @@ export default {
 		},
 		param : {},
 		index : 0,
-		times : 0,
+		times : 0,
+		set : 0,
 	},
 	data() {
 		return {
@@ -76,13 +77,19 @@ export default {
 			if (this.fetch.user_times[times.id]) {
 				var day = this.fetch.user_times[times.id].day;
 			} else {
-				var day = '正点';
+				var day = '主序时间';
 			}
-			if (day == '正点') {
+			if (day == '主序时间') {
 				day = '';
-			}
-			this.Dever.post('app/collection/?l=api.getPageId', {code:this.Dever.config.code,times_id:times.id,day:day}, function(t) {
-				self.Dever.location('dream/view?code=' + t.code);
+			}
+			var code = this.Dever.config.code;
+			
+			this.Dever.post('app/collection/?l=api.getPageId', {set:this.set,code:code,times_id:times.id,day:day}, function(t) {
+				if (t.code) {
+					self.Dever.location('dream/view?code=' + t.code);
+				} else {
+					self.Dever.alert('这是您当前选择的时间');
+				}
 			})
 			
 		},
@@ -91,13 +98,13 @@ export default {
 			times = res.currentTarget.dataset;
 			if (!this.fetch.user_times[times.id]) {
 				this.fetch.user_times[times.id] = {};
-				this.fetch.user_times[times.id].day = '正点';
+				this.fetch.user_times[times.id].day = '主序时间';
 			}
 			var old = this.fetch.user_times[times.id].day;
 			this.fetch.user_times[times.id].day = res.detail.value;
 			var current = times.year + '-' + this.month + '-' + this.day;
 			if (this.fetch.user_times[times.id].day == current) {
-				this.fetch.user_times[times.id].day = '正点';
+				this.fetch.user_times[times.id].day = '主序时间';
 			}
 			if (old != res.detail.value) {
 				this.go(times);

+ 2 - 1
pages/dream/view.vue

@@ -32,7 +32,7 @@
 						</block>
 						
 						<block v-if="k == 'times'">
-							<times ref="times" @goIndex="goIndex" :index="fetch.index" :content_id="content_id" :width="v.width" :param="v.param" :times="fetch.times_id" @getTimes="getTimes"></times>
+							<times ref="times" @goIndex="goIndex" :index="fetch.index" :content_id="content_id" :width="v.width" :param="v.param" :set="v.set" :times="fetch.times_id" @getTimes="getTimes"></times>
 						</block>
 						
 						<block v-if="k == 'shop'">
@@ -247,6 +247,7 @@ export default{
 			});
 		},
 		getCate : function() {
+			console.info(1);
 			if (!this.login) {
 				return;
 			}

+ 2 - 4
pages/dream/view/product.vue

@@ -44,11 +44,9 @@
 						<view class="text-pink"><view class="text-cut"><text v-if="v.user.author" style="margin-right:10rpx;color: #00B3FF;">[{{v.user.author}}]</text>{{v.user.username}}</view><text v-if="v.user.title" style="margin-left:10rpx">({{v.user.title}})</text></view>
 						<view class="text-gray text-sm flex"> <view class="text-cut">{{v.date}}</view></view>
 					</view>
-					<view class="action">
+					<view class="action" style="width:160rpx;">
 						<view class="text-grey text-xs">{{v.price}}</view>
-						<view class="cu-tag round bg-red sm" v-if="v.status == 1">{{v.status_name}}</view>
-						<view class="cu-tag round bg-blue sm" v-if="v.status == 2 || v.status > 3">{{v.status_name}}</view>
-						<view class="cu-tag round bg-black sm" v-if="v.status == 3">{{v.status_name}}</view>
+						<view class="cu-tag round bg-blue sm">{{v.status_name}}</view>
 					</view>
 				</view>
 			</view>