Merge pull request '添加了开始直播' (#80) from xbx into master
Reviewed-on: http://git.luyuan.tk/luyuan/beelink/pulls/80
This commit is contained in:
		
						commit
						662521ea33
					
				@ -943,4 +943,13 @@ export async function feedback(text: string) {
 | 
			
		||||
    }else{
 | 
			
		||||
        message.error(res.msg)
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
export async function livestart(id: string) {
 | 
			
		||||
    const res = await put("live/" + id, {status : 1})
 | 
			
		||||
    if(res.code == 0){
 | 
			
		||||
        message.success(res.msg)
 | 
			
		||||
    }else{
 | 
			
		||||
        message.error(res.msg)
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -20,9 +20,15 @@
 | 
			
		||||
                  <span class="score">5.0分</span>
 | 
			
		||||
              </div>
 | 
			
		||||
          </div>
 | 
			
		||||
          <div class="right" @click="bianji">
 | 
			
		||||
          <div style="display: flex">
 | 
			
		||||
            <div class="right" @click="bianji">
 | 
			
		||||
              编辑信息
 | 
			
		||||
            </div>
 | 
			
		||||
            <div class="right" @click="kaishi">
 | 
			
		||||
              开始直播
 | 
			
		||||
            </div>
 | 
			
		||||
          </div>
 | 
			
		||||
          
 | 
			
		||||
      </div>
 | 
			
		||||
  </div>
 | 
			
		||||
</template>
 | 
			
		||||
@ -77,6 +83,7 @@
 | 
			
		||||
}
 | 
			
		||||
</style>
 | 
			
		||||
<script lang="ts">
 | 
			
		||||
import { livestart } from '@/api';
 | 
			
		||||
import router from '@/router';
 | 
			
		||||
import { defineComponent, ref } from "vue";
 | 
			
		||||
 | 
			
		||||
@ -91,9 +98,16 @@ export default defineComponent({
 | 
			
		||||
        router.push("/mine/webcast?id=" + props.info.liveid)
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
    // todo 修改后报错
 | 
			
		||||
    function kaishi(){
 | 
			
		||||
      if(props.info != undefined){
 | 
			
		||||
        livestart(props.info.liveid)
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
    // const liveinfo = ref(props.liveinfo)
 | 
			
		||||
    return {
 | 
			
		||||
      bianji
 | 
			
		||||
      bianji,
 | 
			
		||||
      kaishi
 | 
			
		||||
    }
 | 
			
		||||
  },
 | 
			
		||||
});
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user