|
@@ -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);
|