xiongzhu 2 лет назад
Родитель
Сommit
8f2895564e
1 измененных файлов с 0 добавлено и 14 удалено
  1. 0 14
      src/views/GameView.vue

+ 0 - 14
src/views/GameView.vue

@@ -11,7 +11,6 @@
             <template #default="{ row }">
                 <ElButton @click="onPlay(row)" type="primary">进入</ElButton>
                 <ElButton @click="onEdit(row)">编辑</ElButton>
-                <ElButton @click="bindTwitch(row)" type="success">绑定Twitch</ElButton>
                 <ElButton @click="onDelete(row)" type="danger">删除</ElButton>
             </template>
         </ElTableColumn>
@@ -27,9 +26,6 @@
         <ElFormItem prop="name" label="名称">
             <ElInput v-model="model.name" placeholder="请输入名称" />
         </ElFormItem>
-        <ElFormItem prop="platform" label="平台">
-            <EnumSelect :enum="StreamPlatform" v-model="model.platform" />
-        </ElFormItem>
         <ElFormItem prop="roomId" label="房间ID">
             <ElInput v-model="model.roomId" placeholder="请输入房间ID" />
         </ElFormItem>
@@ -89,7 +85,6 @@ const table = ref(null)
 const model = ref({})
 const rules = {
     name: [{ required: true, message: '请输入昵称', trigger: 'blur' }],
-    platform: [{ required: true, message: '请选择平台', trigger: 'blur' }],
     roomId: [{ required: true, message: '请输入房间ID', trigger: 'blur' }],
     background: [{ required: true, message: '请输入故事背景', trigger: 'blur' }],
     charactors: [
@@ -160,15 +155,6 @@ function onPlay(row) {
         }
     })
 }
-function bindTwitch(row) {
-    let u = new URL('https://id.twitch.tv/oauth2/authorize?')
-    u.searchParams.append('client_id', '530df6x09eq34be0vjhsezkl2oxap0')
-    u.searchParams.append('redirect_uri', 'http://localhost:3000/api/twitch/auth_callback')
-    u.searchParams.append('response_type', 'code')
-    u.searchParams.append('xxx', 'aaa')
-    u.searchParams.append('scope', 'channel:manage:broadcast chat:read chat:edit channel:manage:polls')
-    window.open(u.href)
-}
 </script>
 <style lang="less" scoped>
 .charactor-form {