dever před 4 roky
rodič
revize
99e386b6f5
2 změnil soubory, kde provedl 8 přidání a 5 odebrání
  1. 3 0
      lib/dever/index.js
  2. 5 5
      pages/dream/func/times.vue

+ 3 - 0
lib/dever/index.js

@@ -762,6 +762,9 @@ var bgm = {
 	vue : false,
 	
 	init : function(vue, music, title, signer, pic, autoplay) {
+		if (this.manager) {
+			return;
+		}
 		this.vue = vue;
 		this.vue.bgm = {
 			show : false,

+ 5 - 5
pages/dream/func/times.vue

@@ -3,7 +3,7 @@
 		<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}">
+				<view class="content" :style="{color:v1.color,backgroundColor:v1.bgcolor}" @click="openTime(k, k1)">
 					<view class="cu-capsule radius">
 						<view class="cu-tag bg-cyan">{{v1.name}}</view>
 						<view class="cu-tag line-white">
@@ -12,7 +12,7 @@
 								<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 class="uni-input" @click="openTime()">{{fetch.user_times[v1.id] && fetch.user_times[v1.id].day != 0 ? fetch.user_times[v1.id].day : '主序时间'}}</view>
+							<view class="uni-input">{{fetch.user_times[v1.id] && fetch.user_times[v1.id].day != 0 ? fetch.user_times[v1.id].day : '主序时间'}}</view>
 						</view>
 					</view>
 					<view @click="go(v1)">
@@ -22,7 +22,7 @@
 				</view>
 				
 				<w-picker
-					:visible.sync="timeVisible"
+					:visible.sync="v1.visible"
 					mode="date" 
 					:startYear="v1.year" 
 					:endYear="(v1.end_year ? v1.end_year : v1.year)"
@@ -74,8 +74,8 @@ export default {
 		this.getDate();
 	},
 	methods:{
-		openTime : function() {
-			this.timeVisible = true;
+		openTime : function(k, k1) {
+			this.fetch.times[k].child[k1].visible = true;
 		},
 		getDate : function(type) {
 			const date = new Date();