123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827 |
- <?php
- namespace App\Console\Commands;
- use App\Repositories\Enums\ModelStatusEnum;
- use App\Repositories\Models\Base\Resource;
- use App\Repositories\Models\Course\Chapter;
- use App\Repositories\Models\Course\Course;
- use App\Repositories\Models\Course\Video;
- use App\Repositories\Models\TCM\Combinations;
- use App\Repositories\Models\TCM\Prescription;
- use App\Repositories\Models\TCM\Recipels;
- use App\Services\CombinationService;
- use Carbon\Carbon;
- use Illuminate\Console\Command;
- use Illuminate\Support\Facades\DB;
- use Illuminate\Support\Facades\File;
- use Illuminate\Support\Facades\Storage;
- use Illuminate\Support\Str;
- /**
- * Class PresenterCommand
- * @package Prettus\Repository\Generators\Commands
- * @author Anderson Andrade <contato@andersonandra.de>
- */
- class InitCourseCommand extends Command
- {
- public static $COURSE_MAPS = [
- '中医基础理论' => [
- 'name' => 'zhongyililunjichu',
- 'chapter' => [
- '绪论' => 'introduction',
- '哲学基础' => 'philosophical-basis',
- '藏象' => 'zangxiang',
- '精 气 血 津液' => 'bodyfluid',
- '经络' => 'jingluo',
- '体质' => 'constitution',
- '病因' => 'pathogeny',
- '病机' => 'bingji',
- '养生防治' => 'health',
- ]
- ]
- ];
- /**
- * The name of command.
- *
- * @var string
- */
- protected $name = 'init:course';
- /**
- * The description of command.
- *
- * @var string
- */
- protected $description = 'Create a new course.';
- /**
- * The type of class being generated.
- *
- * @var string
- */
- protected $type = 'course';
- /**
- * Execute the command.
- *
- * @return void
- * @see fire()
- */
- public function handle()
- {
- // $data = [
- // //推拿
- // [
- // 'url' => 'tuina',
- // 'lang' => 'zh_CN',
- // 'course_id' => 0,
- // 'is_close_chapter' => 1,
- // 'title' => '推拿',
- // ],
- // [
- // 'url' => 'tuina',
- // 'lang' => 'en',
- // 'course_id' => 0,
- // 'is_close_chapter' => 1,
- // 'title' => 'Tuina',
- // ],
- // //中医诊断
- // [
- // 'url' => 'zhenduanxue',
- // 'lang' => 'zh_CN',
- // 'course_id' => 0,
- // 'is_close_chapter' => 0,
- // 'title' => '中医诊断学',
- // ],
- // [
- // 'url' => 'zhenduanxue',
- // 'lang' => 'en',
- // 'course_id' => 0,
- // 'is_close_chapter' => 0,
- // 'title' => 'TCM Diagnostic ',
- // ],
- // //针灸学
- // [
- // 'url' => 'zhenjiuxue',
- // 'lang' => 'zh_CN',
- // 'course_id' => 0,
- // 'is_close_chapter' => 0,
- // 'title' => '针灸临床学',
- // ],
- // [
- // 'url' => 'zhenjiuxue',
- // 'lang' => 'en',
- // 'course_id' => 0,
- // 'is_close_chapter' => 1,
- // 'title' => 'Clinical Acupuncture',
- // ],
- // //中药鉴定
- // [
- // 'url' => 'zhongyaojianding',
- // 'lang' => 'zh_CN',
- // 'course_id' => 0,
- // 'is_close_chapter' => 0,
- // 'title' => '中药鉴定',
- // ],
- // [
- // 'url' => 'zhongyaojianding',
- // 'lang' => 'en',
- // 'course_id' => 0,
- // 'is_close_chapter' => 0,
- // 'title' => 'Herbal medicine identification',
- // ],
- // //中医基础理论
- // [
- // 'url' => 'zhongji-zh',
- // 'lang' => 'zh_CN',
- // 'course_id' => 1,
- // 'is_close_chapter' => 0,
- // 'title' => '',
- // ],
- // [
- // 'url' => 'zhongji-en',
- // 'lang' => 'en',
- // 'course_id' => 2,
- // 'is_close_chapter' => 0,
- // 'title' => '',
- // ],
- // ];
- $videos = Video::query()->whereIn('course_id', [16, 17])->get();
- foreach ($videos as $video) {
- $video->title = str_replace(['2024-01-14/zhongyao/', '.mp4'], '', $video->title);
- $video->save();
- }
- dd(1);
- $data = [
- //推拿
- [
- 'name' => 'zhongyao',
- 'lang' => 'zh_CN',
- 'course_id' => 0,
- 'is_close_chapter' => 1,
- 'title' => '药食同源疗百病·一带一路送健康',
- ],
- [
- 'name' => 'zhongyao',
- 'lang' => 'en',
- 'course_id' => 0,
- 'is_close_chapter' => 1,
- 'title' => '药食同源疗百病·一带一路送健康',
- ],
- // //中医诊断
- // [
- // 'url' => 'zhongyiwenhua-jingluoshuxuanxue',
- // 'lang' => 'zh_CN',
- // 'course_id' => 0,
- // 'is_close_chapter' => 0,
- // 'title' => '中医文化《经络腧穴学》',
- // ],
- // [
- // 'url' => 'zhongyiwenhua-jingluoshuxuanxue',
- // 'lang' => 'en',
- // 'course_id' => 0,
- // 'is_close_chapter' => 0,
- // 'title' => '中医文化《经络腧穴学》 ',
- // ],
- ];
- //
- foreach ($data as $da) {
- // $this->loadLocalFiles($da['url'], $da['lang'], $da['course_id'], $da['is_close_chapter'], $da['title']);
- // $this->loadLocalFiles($da['name'], $da['lang'], $da['course_id'], $da['is_close_chapter'], $da['title']);
- $this->readJson($da['name'], $da['lang'], $da['course_id'], $da['is_close_chapter'], $da['title']);
- }
- // $data = file_get_contents(base_path('data/zhongyiwenhua-jingluoshuxuanxue.json'));
- // $data = json_decode($data, true);
- //
- // file_put_contents(base_path('data/zhongyiwenhua-jingluoshuxuanxue.json'), json_encode($data, JSON_UNESCAPED_UNICODE));
- // dd(1);
- // $courses = [12, 13];
- // $t = Video::query()->where('course_id', 12)->count();
- // $this->line("total:{$t}");
- // $data = file_get_contents(base_path('data/youjihuaxueshuangyu.json'));
- // $data = json_decode($data, true);
- // foreach ($data['Videos'] as $k => $v) {
- // $sort = $t - $k;
- // $this->line("{$v['name']}==>{$sort}");
- // Video::query()->whereIn('course_id', $courses)->where('title', $v['name'])->update(['sort' => $sort]);
- // }
- //
- // $courses = [14, 15];
- // $t = Video::query()->where('course_id', 12)->count();
- // $this->line("total:{$t}");
- // $data = file_get_contents(base_path('data/zhongyiwenhua-jingluoshuxuanxue.json'));
- // $data = json_decode($data, true);
- // foreach ($data['Videos'] as $k => $v) {
- // $sort = $t - $k;
- // $this->line("{$v['name']}==>{$sort}");
- // Video::query()->whereIn('course_id', $courses)->where('title', $v['name'])->update(['sort' => $sort]);
- // }
- $this->line('ok');
- }
- public function loadLocalFiles($url_path, $lang)
- {
- $base_lang = $lang;
- $base_url = 'http://zhongma.qiniu.xmnk.cn/';
- $videos = [];
- $sections = [];
- //读取文件
- $files_json = js2php(file_get_contents(base_path("data/{$url_path}.json")));
- $files = $files_json['items'];
- //处理章节
- foreach ($files as $file) {
- if (!$file['fsize']) continue;
- $video = [
- 'section' => 0,
- 'video' => false,
- 'video_path' => false,
- 'srt' => false,
- ];
- $fileArr = pathinfo($file['key']);
- if (array_key_exists('extension', $fileArr)) {
- switch (strtolower($fileArr['extension'])) {
- case 'txt':
- // $file_data = str2arr0($file['key'], '-');
- // $name = $file_data[1];
- // if ($base_lang == 'en') $name = $file_data[2];
- // $sections[$file_data[0]] = [
- // 'name' => $name,
- // 'en_name' => $file_data[2],
- // ];
- break;
- case 'mp4':
- $name = $file['key'];
- $s[0] = 'Videos';
- $videos[$s[0]][] = [
- 'section' => $s[0],
- 'name' => $fileArr['filename'],
- 'en_name' => $fileArr['filename'],
- 'path' => "{$base_url}" . $file['key'],
- 'srt' => false
- ];
- break;
- case 'srt':
- break;
- }
- } else {
- $file_data = str2arr0($file['filename'], '-');
- $name = $file_data[1];
- if (count($file_data) == 2) {
- $sections[$file_data[0]] = [
- 'name' => $name,
- 'en_name' => $file_data[1],
- ];
- } else {
- if ($base_lang == 'en') $name = $file_data[2];
- $sections[$file_data[0]] = [
- 'name' => $name,
- 'en_name' => $file_data[2],
- ];
- }
- }
- }
- return $videos;
- }
- public function readJson($url_path, $lang, $course_id, $is_close_chapter, $title)
- {
- $base_lang = $lang;
- $base_course_id = $course_id;
- $videos = $this->loadLocalFiles($url_path, $lang);
- //保存数据
- if ($base_course_id) {
- $course = Course::query()->find($base_course_id);
- } else {
- $course = Course::query()->create([
- 'title' => $title,
- 'language' => $base_lang,
- 'admin_id' => 1,
- 'status' => 1,
- 'slug' => Str::random(8),
- 'published_at' => Carbon::now()->toDateTimeString(),
- ]);
- }
- Chapter::query()->where('course_id', $course->id)->delete();
- Video::query()->where('course_id', $course->id)->delete();
- DB::beginTransaction();
- try {
- foreach ($videos as $s => $vs) {
- $section['name'] = $s;
- $chapter = Chapter::query()->withoutGlobalScope('language')->updateOrCreate([
- 'course_id' => $course->id,
- 'title' => $section['name'],
- 'language' => $base_lang,
- ], [
- 'status' => ModelStatusEnum::OK
- ]);
- foreach ($vs as $video) {
- $resource = Resource::query()->withoutGlobalScope('language')->updateOrCreate([
- 'name' => $video['name'],
- 'original_name' => $video['name'],
- 'path' => $video['path'],
- ], [
- 'disk' => 'qiniu',
- 'url' => $video['path'],
- 'size' => 0,
- 'language' => $base_lang,
- 'status' => ModelStatusEnum::OK,
- ]);
- $subtitle_resource = null;
- if ($video['srt']) {
- $subtitle_resource = Resource::query()->withoutGlobalScope('language')->updateOrCreate([
- 'path' => $video['srt']['path'],
- ], [
- 'name' => Str::random(8) . '.srt',
- 'original_name' => $video['srt']['name'],
- 'disk' => 'public',
- 'url' => $video['srt']['path'],
- 'size' => 0,
- 'language' => $base_lang,
- 'status' => ModelStatusEnum::OK,
- ]);
- }
- Video::query()->withoutGlobalScope('language')->updateOrCreate([
- 'course_id' => $course->id,
- 'course_chapter_id' => $chapter->id,
- 'title' => $video['name'],
- ], [
- 'slug' => Str::random(),
- 'language' => $base_lang,
- 'url' => $resource->id,
- 'published_at' => Carbon::now()->toDateTimeString(),
- 'subtitle_zh_path' => $subtitle_resource ? $subtitle_resource->id : '',
- 'subtitle_en_path' => $subtitle_resource ? $subtitle_resource->id : '',
- 'status' => ModelStatusEnum::OK
- ]);
- }
- }
- DB::commit();
- } catch (\Exception $exception) {
- DB::rollBack();
- dd($exception);
- }
- }
- public function loadFiles($url_path, $lang, $course_id, $is_close_chapter, $title)
- {
- $base_lang = $lang;
- $base_url = 'http://zhongma.qiniu.xmnk.cn/' . $url_path;
- $base_course_id = $course_id;
- $videos = [];
- $sections = [];
- $i = 0;
- $files = '';
- switch ($url_path) {
- case 'tuina':
- $files = "1-推拿手法-Massage technique;1.1-按法-According to the law.mp4;1.2-拔身法-Body pulling method.mp4;1.3-背法-Back.mp4;1.4-拨法-Dial method.mp4;1.5-擦法-Rubbing method.mp4;1.6-点法-Point method.mp4;1.7-抖法-Shake method.mp4;1.8-复合手法-Compound technique.mp4;1.9-击法-Hit method.mp4;2.0-肩关节肘关节扳法-Shoulder joint and elbow joint pulling.mp4;2.1-颈腰椎斜扳法-Oblique pulling method of cervical and lumbar vertebrae.mp4;2.2-摩法-Rubbing method.mp4;2.3-抹法-Plastering.mp4;2.4-拿法-Manipulation.mp4;2.5-捏法-Kneading method.mp4;2.6-拍法-Beating method.mp4;2.7-屈伸法-Bending extension method.mp4;2.8-揉法-Rubbing method.mp4;2.9-推法-Deduction.mp4;3.0-推拿常用体位-Common postures for massage.mp4;3.1-推拿介质和热敷-Massage media and hot compress.mp4;3.2-推拿手法的定义和分类-Definition and classification of massage techniques.mp4;3.3-推拿手法的注意事项-Precautions for Massage Manipulation.mp4;3.4-推拿手法相关要求-Requirements for Massage Manipulation.mp4;3.5-摇法-Shaking method.mp4;3.6-一指禅推法-One Finger Zen Push Method.mp4;3.7-振法-Vibration method.mp4;3.8-㨰法-Law.mp4";
- break;
- case 'zhenjiuxue':
- $files = "1-针灸学绪论-Introduction to Acupuncture and Moxibustion;1.1-针灸的萌芽与形成-The germination and formation of acupuncture and moxibustion.mp4;1.2-针灸学的发展与鼎盛-The Development and Prosperity of Acupuncture and Moxibustion.mp4;1.3-针灸学的低俗复兴与对外传播-Vulgar revival and external dissemination of acupuncture and moxibustion.mp4;1.4-针灸学4—4 -Acupuncture 3—1.mp4;1.5-针灸学4—3-Acupuncture 4—3.mp4;2-针灸学绪论-General Theory of Meridians;2.1-经络概述-Overview of Meridians.mp4;2.2-经络系统的组成-Composition of Meridian system.mp4;2.3-经络的作用和临床应用-Function and clinical application of meridians.mp4;3-腧穴总论-Overview of acupoints;3.1-五腧穴-Five Shu Points.mp4;3.2-原穴-Original acupoint.mp4;3.3-八脉交会穴,下肢部下合穴(c)-Eight Meridians Intersection Point, Lower Limb Joint Point (c).mp4;4-刺灸法各论-On Acupuncture and Moxibustion;4.1-腧穴定位法-Point positioning method.mp4;4.2-骨度分寸定位法-Osteometric positioning method.mp4;4.3-毫针刺法的进针法 - Needling method of filiform needling.mp4;4.4-毫针刺法概述及操作准备-Overview and operation preparation of filiform needle needling.mp4;4.5-三棱针法一-Three edged needle method I.mp4;4.6-三棱针法二-Three edged needle method II.mp4;4.7-拔罐法-Cupping.mp4;5-耳针-Ear acupuncture;5.1-耳针法简介- Introduction to ear acupuncture.mp4;5.2-耳廓表面解剖- Surface anatomy of auricle.mp4;5.3-耳穴分布规律及选穴原则- Distribution rule and selection principle of auricular points.mp4;5.4-耳垂、耳背部耳穴分区定位- Localization of ear lobe and ear points at the back of the ear.mp4;5.5-耳穴诊察方法- Ear point diagnosis method.mp4;5.6-对耳轮、三角窝部耳穴分区定位- Localization of auricular points at the ear wheel and triangular fossa.mp4;5.7-耳甲部耳穴分区定位- Localization of auricular points of concha.mp4;5.8-耳轮、耳舟部耳穴分区定位- Localization of auricular points of ear wheel and ear boat.mp4;5.9-耳屏、对耳屏部耳穴分区定位- Localization of auricular points on the tragus.mp4;5.10-耳穴毫针刺法-Ear point filiform needling.mp4;5.11-耳针操作—压籽法- Ear acupuncture operation seed pressing method.mp4;5.12-耳针操作—刺血法 - Ear acupuncture operation - blood pricking method.mp4;6-悬起灸法- Suspension moxibustion;6.1-悬起灸法概述及艾条的介绍- Overview of hanging moxibustion and introduction of moxa stick.mp4;6.2-悬起灸的操作前准备及操作方法- Preparation and operation methods before suspension moxibustion.mp4;6.3-悬起灸法的注意事项与临床应用 - Precautions and clinical application of suspension moxibustion.mp4;7-间接灸之隔姜灸- Indirect moxibustion with ginger;7.1-间接灸之隔姜灸概述及用具-Overview and tools of indirect ginger separated moxibustion.mp4;7.2-隔姜灸的操作方法及临床应用- Operation method and clinical application of ginger separated moxibustion.mp4;8-间接灸之隔蒜灸-Indirect moxibustion with garlic;8.1-间接灸之隔蒜灸概述及用具- Overview and appliance of indirect moxibustion with garlic.mp4;8.2-隔蒜灸的操作方法及临床应用- Operation method and clinical application of garlic separated moxibustion.mp4;9-间接灸之隔盐灸- Indirect moxibustion with salt;9.1-间接灸之隔盐灸概述及用具- Overview and appliances of indirect moxibustion with salt.mp4;9.2-隔盐灸的操作方法及临床应用- Operation method and clinical application of salt separated moxibustion.mp4;10- 督脉隔姜灸-Dumai ginger separated moxibustion;10.1- 督脉隔姜灸-Dumai ginger separated moxibustion.mp4";
- break;
- case 'zhenduanxue':
- $files = "0-绪论-Introduction;0.1-绪论-Introduction.mp4;0.2-中医诊断的发展简史-Brief history of TCM diagnosis.mp4;0.3-中医诊断的主要内容-Main contents of TCM diagnosis.mp4;0.4-中医诊断的基本原理-Basic principles of TCM diagnosis.mp4;0.5-中医诊断的基本原则-The basic principles of TCM diagnosis.mp4;0.6-望诊概念、方法及内容-Concept, method and content of inspection.mp4;1-望诊-Visitation;1.1.1-望神的概念、原理及意义-The Concept, Principle and Significance of Watching God.mp4;1.1.2-望神的主要内容-Main contents of looking at God.mp4;1.1.3-得神的判断及意义-Judgment and Significance of Deity.mp4;1.1.4-失神的判断及意义-Judgment and significance of absence.mp4;1.1.5-神乱的特征与意义-The characteristics and significance of divine chaos.mp4;1.1.6-望神的注意事项-Precautions for looking at God.mp4;1.1.7-望色的概念-Concept of color.mp4;1.1.8-常色病色-Normal diseased color.mp4;1.1.9-望色的原理和意义-Principle and significance of color viewing.mp4;1.1.10-青色主病-Cyanosis major disease.mp4;1.1.11-赤色主病-Red main disease.mp4;1.1.12-黄色主病-Yellow main disease.mp4;1.1.13-白色主病-White main disease.mp4;1.1.14-黑色主病-Black main disease.mp4;1.1.15-望色十法-Ten methods of looking at colors.mp4;1.1.16-望色注意事项-Precautions for color.mp4;1.1.17-望形概念原理意义-Meaning of the concept of shape.mp4;1.1.18-望形内容-Look at the content.mp4;1.1.19-望态概念原理意义-The meaning of the concept of expectation state.mp4;1.1.20-望态内容1-Content of expectation1.mp4;1.1.21-望态内容2-Content of expectation 2.mp4;1.2.1-局部望诊-Local inspection.mp4;1.2.2-局部望诊中的目形、目态 咽喉-Eye and eye pharynx in local inspection.mp4;1.2.3-望皮肤-Look at the skin.mp4;1.2.4-望皮肤病症-Look for skin disease.mp4;1.3.1-望舌的原理-Principle of tongue observation.mp4;1.3.2-望舌的方法-Method of tongue observation.mp4;1.3.3-舌诊内容-Contents of tongue examination.mp4;1.3.4-正常舌象-Normal tongue.mp4;1.3.5-淡白舌-Pale tongue.mp4;1.3.6-红舌-Red tongue.mp4;1.3.7-绛舌-Crimson tongue.mp4;1.3.8-青紫舌-Bluish tongue.mp4;1.3.9-老嫩舌-Old and tender tongue.mp4;1.3.10-胖瘦舌-Fat and thin tongue.mp4;1.3.11-裂纹舌-Crack tongue.mp4;1.3.12-望舌下络脉-Look at the sublingual collaterals.mp4;1.3.13-厚薄苔-Thick and thin moss.mp4;1.3.14-润燥苔-Moisten and dry moss.mp4;1.3.15-白苔-White moss.mp4;1.3.16-黄苔-Yellow moss.mp4;2-闻诊-Auscultation;2.1.1-正常声音-Normal sound.mp4;2.1.2-喑哑与失音-Aphasia.mp4;2.1.3-谵语 郑声-Delirium, Zheng Sheng.mp4;2.1.4-哮喘-Asthma.mp4;2.1.5-咳嗽-Cough.mp4;3-问诊-Inquiries;3.1.1-问诊的意义及方法-Significance and method of consultation.mp4;3.2.1-问诊的内容-Contents of consultation.mp4;3.2.2-现病史、既往史、个人生活史、家族史-Current medical history Previous history Personal life history Family history.mp4;3.3.1-问现在症的要点,及恶寒发热-Ask about the main points of current symptoms and aversion to cold and fever.mp4;3.3.2-但寒不热、但热不寒、寒热往来-Whether it is cold or hot, but not cold or hot.mp4;3.3.3-问汗-Ask for sweat.mp4;3.3.4-问疼痛的性质-Ask about the nature of pain.mp4;3.3.5-问疼痛的部位-Ask where the pain is.mp4;3.3.6-问头身胸腹-Ask the head, body, chest and abdomen.mp4;3.3.7-问耳目-Ask the eyes and ears.mp4;3.3.8-问睡眠-Ask for sleep.mp4;3.3.9-问饮食的内容 口不渴-Ask about the content of food and drink and be thirsty.mp4;3.3.10-口渴多饮、渴不多饮-Drink too much and not too much.mp4;3.3.11-食欲减退-Loss of appetite.mp4;3.3.12-厌食、胃脘嘈杂-Anorexia and noisy stomach.mp4;3.3.13-消谷善饥、饥不欲食-Relieve hunger and hunger.mp4;3.3.14-偏嗜食物、食量变化和问口味-Preference for food, change in appetite and taste.mp4;3.3.15-便秘-Constipation.mp4;3.3.16-泄泻、便色异常-Diarrhea and abnormal stool color.mp4;3.3.17-便质异常、排便感异常-Abnormal stool quality and feeling.mp4;3.3.18-尿量异常、尿次异常-Abnormal urine volume and urine frequency.mp4;3.3.19-尿色质异常、排尿感异常-Abnormal urine color and sense of urination.mp4;4-切诊-Palpation;4.1.1-脉诊的原理-Principle of pulse diagnosis.mp4;4.1.2-寸口诊脉的基本方法-Basic methods of Cunkou pulse diagnosis.mp4;4.1.3-寸口诊脉的注意事项-Precautions for Cunkou pulse diagnosis.mp4;4.1.4-寸口诊脉的基本原理-Basic principle of cunkou pulse diagnosis.mp4;4.1.5-脉象八要素-Eight Elements of Pulse.mp4;4.1.6-正常脉象-Normal pulse.mp4;4.1.7-浮脉-Floating pulse.mp4;4.1.8-浮脉的相类脉-Facsimile veins of floating veins.mp4;4.1.9-望小儿指纹-Look for children's fingerprints.mp4;4.1.10-沉脉-Sinking pulse.mp4;4.1.11-沉脉的相类脉-Similar pulse of sinking pulse.mp4;4.1.12-迟脉-Delayed pulse.mp4;4.1.13-数脉-Numerous pulse.mp4;4.1.14-弦脉-String pulse.mp4;5-八纲辨证-Syndrome differentiation of eight principles;5.1-八纲辨证导论-Introduction.mp4;5.2.1-八纲的概念及源流-The concept and origin of the eight principles.mp4;5.2.2-表里辩证及表证-Syndrome differentiation between exterior and interior and exterior.mp4;5.2.3-里证及半表半里证-Internal certificate and half external certificate.mp4;5.2.4-寒证-Cold syndrome.mp4;5.2.5-热证及寒证热证的鉴别要点-Differentiation points of heat syndrome and cold syndrome.mp4;5.2.6-虚实辩证及实证-Syndrome differentiation of deficiency and excess and evidence.mp4;5.2.7-虚症及虚实证的鉴别要点- Key points for differentiation of deficiency syndrome and deficiency excess syndrome.mp4;5.2.8-阴证及阴阳辩证 阳证及阴阳鉴别要点-Yin Syndrome, Yin Yang Dialectics, Yang Syndrome and Key Points of Yin Yang Differentiation.mp4;5.2.9 -八纲证候间的关系及证候相兼-The relationship between the eight principles and syndromes and the combination of them.mp4;5.2.10-八纲证候间的关系之症候错杂-The relationship between the eight principles and syndromes and the confusion of syndromes.mp4;5.2.11-证候转化之——表里出入-Transformation of syndromes —— exterior and interior entry and exit.mp4;5.2.12 -寒热、虚实转化-Transformation of cold and heat, deficiency and excess.mp4;5.2.13-八纲辨证的意义-Significance of syndrome differentiation of eight principles.mp4;6-病性辨证-Syndrome differentiation of disease nature;6.1.1-风淫证-Wind lewdness syndrome.mp4;6.1.2-寒淫证-Cold Yin Syndrome.mp4;6.2.1-阳虚证-Yang deficiency syndrome.mp4;6.2.2-阴虚证-Yin deficiency syndrome.mp4;6.2.3-亡阳证与亡阴证-Death of Yang and Yin.mp4;6.3.1-气虚证-Qi deficiency syndrome.mp4;6.3.2-气陷证-Air entrapment syndrome.mp4;6.3.3-气不固证-Qi deficiency syndrome.mp4;6.3.4-血虚证与血脱证-Blood deficiency syndrome and blood withdrawal syndrome.mp4;6.3.5-血瘀证-Blood Stasis Syndrome.mp4;6.3.6-气滞证-Qi stagnation syndrome.mp4;6.3.7-气逆与气闭症-Qi inversion and qi stagnation.mp4;6.4.1-津液亏虚证-Syndrome of body fluid deficiency.mp4;6.4.2-痰证-Phlegm syndrome.mp4;7-病位辨证(脏腑辨证)-Disease location differentiation (viscera differentiation);7.1.1-心病总论与心血虚-General Theory of Heart Disease and Deficiency of Heart Blood.mp4;7.1.2-心阴虚心气虚-Heart Yin Deficiency, Heart Qi Deficiency.mp4;7.1.3-心阳虚 心阳虚脱证-Heart Yang Deficiency Syndrome Removal.mp4;7.1.4-心火亢盛证-Syndrome of hyperactivity of heart fire.mp4;7.1.5-心脉痹阻证-Heart Vessel Obstruction Syndrome.mp4;7.1.6-痰蒙心神证-Syndrome of phlegm obstructing mind.mp4;7.1.7-痰火扰神证 瘀阻脑络证- Syndrome of phlegm fire disturbing spirit syndrome of blood stasis blocking brain collaterals.mp4;7.2.1-肺气虚证-Lung Qi Deficiency Syndrome.mp4;7.2.2-肺阴虚证-Lung Yin Deficiency Syndrome.mp4;7.2.3-风寒犯肺证-Syndrome of wind cold attacking lung.mp4;7.2.4-风热犯肺证-Syndrome of wind heat invading the lung.mp4;7.2.5-燥邪犯肺证-Pathogenic dryness offends the lungs.mp4;7.2.6-肺热炽盛证-Syndrome of hyperactivity of lung heat.mp4;7.2.7-痰热壅肺证-Syndrome of phlegm heat obstructing the lung.mp4;7.2.8-寒痰阻肺证-Syndrome of cold phlegm obstructing lung.mp4;7.2.9-饮停胸胁证-Syndrome of stopping drinking and chest and hypochondriasis.mp4;7.2.10-风水搏肺证-Syndrome of Feng Shui Beating the Lung.mp4;7.3.1-脾胃总论与脾气虚证-General Theory of Spleen and Stomach and Spleen Qi Deficiency Syndrome.mp4;7.3.2-脾虚气陷证-Syndrome of spleen deficiency and qi depression.mp4;7.3.3-脾阳虚证-Spleen Yang Deficiency Syndrome.mp4;7.3.4-脾不统血证-Syndrome of spleen not controlling blood.mp4;7.3.5-湿热蕴脾证-Syndrome of dampness heat accumulating in the spleen.mp4;7.3.6-寒湿困脾证-Cold dampness and spleen stagnation syndrome.mp4;7.4.1-总论和肝血虚证-General and liver blood deficiency syndrome.mp4;7.4.2-肝阴虚证-Liver Yin Deficiency Syndrome.mp4;7.4.3-肝郁气滞证-Liver qi stagnation syndrome.mp4;7.4.4-肝火炽盛证-Syndrome of liver fire.mp4;7.4.5-肝阳上亢证-Hyperactivity of liver yang.mp4;7.4.6-肝风内动证-Syndrome of internal movement of liver wind.mp4;7.4.7-寒凝肝脉证-Syndrome of cold congealing liver pulse.mp4;7.5.1-肾阳虚证-Kidney Yang Deficiency Syndrome.mp4;7.5.2-肾虚水泛证-Syndrome of kidney deficiency and water flooding.mp4;7.5.3-肾阴虚证-Kidney yin deficiency syndrome.mp4;7.5.4-肾精不足证-Syndrome of insufficient kidney essence.mp4;7.5.5-肾气不固证-Syndrome of kidney qi deficiency.mp4;7.5.6-肾不纳气证-Syndrome of kidney failing to absorb qi.mp4;7.6.1-心肾不交证-Heart kidney non delivery.mp4;7.6.2-肝胃不和证-Syndrome of disharmony between liver and stomach.mp4;7.6.3-肝郁脾虚证-Liver depression and spleen deficiency syndrome.mp4;7.6.4-肝胆湿热证-Liver and gallbladder damp heat syndrome.mp4;7.6.5-肝肾阴虚证-Liver and kidney yin deficiency syndrome.mp4;7.6.6-脾肾阳虚证-Spleen and kidney yang deficiency syndrome.mp4;8-实训-Practical Training;8.1-中医脉诊实训-Practical Training of Pulse Diagnosis of Traditional Chinese Medicine.mp4";
- break;
- case 'zhongyaojianding':
- $files = "1-绪论-Introduction;1.1.1-中药鉴定学的定义-Definition of TCM identification.mp4;1.2.1-中药品种的考证与整理-Research and arrangement of traditional Chinese medicine varieties.mp4;1.2.2-鉴定中药的真伪优劣-Identification of the authenticity of traditional Chinese medicine.mp4;1.2.3-研究和制定中药质量标准-Research and formulate quality standards for traditional Chinese medicine.mp4;1.2.4-寻找和扩大新药源-Finding and expanding new drug sources.mp4;2-中药鉴定学的发展史-Development history of TCM identification;2.1.1-中药鉴定学的发展史-Development history of TCM identification.mp4;3-中药的采收和产地加工-Collection and processing of traditional Chinese medicine;3.1.1-道地药材的定义-Definition of genuine medicinal materials.mp4;3.1.2-道地药材的特点及形成机制-Characteristics and formation mechanism of genuine medicinal materials.mp4;3.2.1-中药适宜采收期确定的一般原则-中药适宜采收期确定的一般原则.mp4;3.2.2-中药采收的一般规律-General rules of traditional Chinese medicine collection.mp4;3.3.1-产地加工的意义-Significance of processing at the place of origin.mp4;3.3.2-产地加工的方法-Processing method at the place of origin.mp4;3.4.1-中药的贮藏-Storage of traditional Chinese medicine.mp4;3.4.2-中药贮藏保管和变质防治-Storage, preservation and deterioration prevention of traditional Chinese medicine.mp4;4-中药鉴定-Identification of traditional Chinese medicine;4.1.1-中药鉴定的依据和程序-Basis and procedure for identification of traditional Chinese medicine.mp4;4.2.1-来源鉴定-Source identification.mp4;4.2.2-性状鉴定-Character identification.mp4;4.2.3-显微鉴定-Microscopic identification.mp4;4.2.4-理化鉴定(上)-Physical and chemical identification (I).mp4;4.2.5-理化鉴定(下)-Physical and chemical identification (II).mp4;4.2.6-生物鉴定-Biological identification.mp4;5-根及根茎类中药-Roots and rhizomes;5.1.1-根及根茎类中药-Roots and rhizomes.mp4;5.1.2-根茎类中药-Rhizome traditional Chinese medicine.mp4;5.2.1-绵马贯众-Mianma Guanzhong.mp4;5.2.2-大黄-Rhubarb.mp4;5.2.3-何首乌-Polygonum multiflorum.mp4;5.2.4-牛膝 川牛膝-Achyranthes bidentata.mp4;5.2.5-川乌、附子、草乌-Radix Aconiti, Radix Aconiti, Radix Aconiti.mp4;5.2.6-白芍 赤芍-White peony and red peony.mp4;5.2.7-黄连-Coptis chinensis.mp4;5.2.8-防己-Self defense.mp4;5.2.9-板蓝根-Banlangen.mp4;5.2.10-甘草-Licorice.mp4;5.2.11-黄芪- Astragalus membranaceus.mp4;5.2.12-人参-Ginseng.mp4;5.2.13-西洋参-American Ginseng.mp4;5.2.14-三七- Panax notoginseng.mp4;5.2.15 -川芎- Ligusticum chuanxiong.mp4;5.2.16-防风-windproof.mp4;5.2.17-柴胡-Bupleurum chinense.mp4;5.2.18-白芷-Angelica dahurica.mp4;5.2.19-前胡-Qianhu.mp4;5.2.20-丹参-Salvia miltiorrhiza.mp4;5.2.21-黄芩-Scutellaria baicalensis.mp4;5.2.22-地黄- Rehmannia glutinosa.mp4;5.2.23-半夏- Pinellia ternate.mp4;5.2.24-天南星- Arisaema.mp4;5.2.25-山药- Yam.mp4;5.2.26-川贝母- Fritillaria thunbergii.mp4;5.2.27-麦冬- Ophiopogon japonicus.mp4;5.2.28-天麻- Gastrodia elata.mp4;6-茎木类中药-Stems and trees;6.1.1-茎木类中药鉴别特征-Identification characteristics of stems and trees.mp4;6.2.1-鸡血藤大血藤-Caulis spatholobi and Caulis spatholobi.mp4;6.2.2-沉香- Chenxiang.mp4;7-皮类中药-Dermata TCD;7.1.1-皮类中药概述-Overview of skin traditional Chinese medicine.mp4;7.1.2-皮类中药鉴别特征- Identification characteristics of traditional Chinese medicine for skin.mp4;7.2.1-桑白皮-Mulberry white.mp4;7.2.2-黄柏-Phellodendron chinense.mp4;7.2.3-关黄柏-Guan Huangbai.mp4;7.2.3-厚朴-Houpu.mp4;7.2.5-肉桂-Cinnamon.mp4;7.2.6-杜仲-DuZhong.mp4;7.2.7-牡丹皮-Peony bark.mp4;8-叶类中药-leaf traditional Chinese medicine;8.1-叶类中药鉴别特征-Identification characteristics of leaf type traditional Chinese medicine.mp4;8.2.1-大青叶、艾叶- Folium Isatidis and Artemisia argyi.mp4;8.2.2-番泻叶- Senna.mp4;9-花类中药-Flowers;9.1.1-花类中药鉴别特征 -Identification characteristics of flowers.mp4;9.2.1 -辛夷-Magnolia.mp4;9.2.2 -丁香 - Cloves.mp4;9.2.3-金银花- Honeysuckle.mp4;9.2.4-红花- Safflower.mp4;9.2.5-槐花- Sophora japonica.mp4;9.2.6-西红花- Saffron.mp4;10-果实及种子类中药-Fruits and seeds;10.1.1-果实及种子类中药鉴别- Identification of fruits and seeds of traditional Chinese medicine.mp4;10.2.1-五味子-Schisandra chinensis.mp4;10.2.2-苦杏仁- Bitter Almond.mp4;10.2.3-陈皮、巴豆- Orange peel, croton.mp4;10.2.4-砂仁- Amomum villosum.mp4;11-全草类中药-Herbal Chinese Medicine;11.1.1-全草类中药概述-Overview of whole herb Chinese medicine.mp4;11.2.1-麻黄- Ephedra.mp4;11.2.2-槲寄生- Mistletoe.mp4;11.2.3-薄荷- Mint.mp4;11.2.4-肉苁蓉- Cistanche deserticola.mp4;11.2.5-青蒿- Artemisia annua.mp4;12-藻菌地衣-Algae bacteria lichen;12.1.1-藻菌地衣概述- Overview of algal and bacterial lichens.mp4;12.2.1-冬虫夏草- Cordyceps sinensis.mp4;12.2.2-灵芝- Ganoderma lucidum.mp4;12.2.3-茯苓- Poria cocos.mp4;13-树脂类 - Resins;13.1.1-树脂类中药鉴别特征概述- Overview of identification characteristics of resin based traditional Chinese medicine.mp4;13.2.1-树脂类中药血竭 - Resinous Dragon's Blood.mp4;14-其他类中药-Other traditional Chinese medicine;14.1.1-其他类中药概述 - Overview of other traditional Chinese medicines.mp4;14.2.1-青黛- Indigo Naturalis.mp4;14.2.2-冰片- Borneol.mp4;14.2.3-五倍子 - Galla Chinensis.mp4;15-动物类中药研究与鉴定-Research and identification of animal traditional Chinese medicine;15.1.1-动物类中药的应用与研究-Application and research of animal traditional Chinese medicine.mp4;15.2.1-动物类中药的分类与鉴定- Classification and identification of animal traditional Chinese medicine.mp4;16-动物类中药-Animal traditional Chinese medicine;16.1.1-全蝎-Scorpion.mp4;16.1.2-桑螵蛸- Cuttlebone.mp4;16.1.3-海马- Hippocampus.mp4;16.1.4-珍珠- Pearl.mp4;16.1.5-金钱白花蛇- Golden Snake.mp4;16.1.6-蕲蛇- Agkistrodon acutus.mp4;16.1.7-麝香- Musk.mp4;16.1.8-牛黄- Bezoar.mp4;16.1.9-羚羊角 - Antelope horn.mp4;17- 矿物类中药-Mineral Traditional Chinese Medicine;17.1.1 - 矿物类中药概述- Overview of mineral traditional Chinese medicine.mp4;17.2.1-朱砂- vermilion.mp4;17.2.2-雄黄- Realgar.mp4;17.2.3-石膏- Gypsum.mp4;17.2.4-自然铜-Native copper.mp4";
- break;
- case 'zhongji-zh':
- $files = "1-中医基础理论介绍;1.1.1-国之瑰宝 中国医学.mp4;1.1.2-B中医学的学科属性.mp4;1.1.3- 走进《中医基础理论》.mp4;1.1.4-中医学理论体系的内涵.mp4;1.1.5-中华医药 源远流长—形成.mp4;1.1.6-四大经典 奠基中医.mp4;1.1.7-传承创新 代有发展—魏晋隋唐时期.mp4;1.1.8-传承创新 代有发展—宋金元时期 1.mp4;1.1.9-B传承创新 代有发展--宋金元时期 2.mp4;1.1.10-传承创新 代有发展—明清时期.mp4;1.1.11-传承创新 代有发展—近代与现代.mp4;1.2.1-B整体观念:生理的整体观.mp4;1.2.2-整体观念,病机上的整体观.mp4;1.2.3-B整体观念,诊治上的整体观.mp4;1.2.4-人与自然的整体性——季节气候与生理病理.mp4;1.2.5-人与自然的整体性——昼夜时辰 地域环境与生理病理.mp4;1.2.6-人与自然的整体性——疾病防治与自然环境的关系.mp4;1.2.7-人与社会环境的统一性.mp4;1.2.8-C辨证论治——症、证、病的概念与关系.mp4;1.2.9-辨证论治——辨证论治的概念以及运用1.mp4;1.2.10-C辨证论治——辨证论治的概念以及运用2.mp4;1.3.1-中医学的主要思维方式——象思维.mp4;1.3.2-中医学的主要思维方式——系统思维 变易思维.mp4;1.3.3-中医学的主要思维方式——变易思维 中和思维.mp4;2-气、阴阳、五行;2.1.1-A一气的原始概念哲学概念.mp4;2.1.2-B一气的原始概念哲学概念.mp4;2.1.3-C一气的原始概念哲学概念.mp4;2.1.4-A气是天地万物相互联系的中介 2021.4.26修改.mp4;2.2.1-阴阳的概念与形成.mp4;2.2.2-A阴阳的特性与归类.mp4;2.2.3-阴阳对立.mp4;2.2.4-阴阳互根.mp4;2.2.5-阴阳交感.mp4;2.2.6-阴阳消长.mp4;2.2.7-阴阳转化.mp4;2.2.8-阴阳学说的基本内容(六)阴阳自和.mp4;2.2.9-人生有形,不离阴阳.mp4;2.2.10-察色按脉,先别阴阳.mp4;2.2.11-防治疾病,必和阴阳.mp4;2.3.1-五行的概念与形成.mp4;2.3.2-五行的特性与归类.mp4;2.3.3-五行学说的基本内容(一)五行相生.mp4;2.3.4-五行学说的基本内容(二)五行相克.mp4;2.3.5-五行制化与胜复.mp4;2.3.6-C五行相乘、相侮及母子相及.mp4;2.3.7-五行学说在中医学中的应用(一).mp4;2.3.8-五行学说在中医学中的应用(二).mp4;2.3.9-B指导疾病的诊断和治疗.mp4;3-藏相;3.1.1-藏象的概念.mp4;3.1.2-C以表知里,司外揣内.mp4;3.1.3-藏象学说的形成.mp4;3.1.4-脏腑分类及各自生理特点.mp4;3.1.5-藏象学说的特点及学习方法特点.mp4;3.2.1-心主血脉的概念与条件.mp4;3.2.2-A心主血脉的生理和病理1.mp4;3.2.3-心主血脉的生理和病理2.mp4;3.2.4-心主神明1.mp4;3.2.5-心主神明2.mp4;3.2.6-心的特性.mp4;3.2.7-心联属1.mp4;3.2.8-心联属2.mp4;3.2.9-心在窍为舌,心在液为汗.mp4;3.2.10-心应夏,心包络.mp4;3.2.11-肺的概述与特性.mp4;3.2.12-肺主气司呼吸.mp4;3.2.13-肺主一身之气,通调水道.mp4;3.2.14-通调水道2.mp4;3.2.15-肺朝百脉,主治节.mp4;3.2.16-肺藏魄 肺在志为忧(悲).mp4;3.2.17-D肺在体合皮,其华在毛.mp4;3.2.18-肺在窍为鼻,喉为肺之门户在液为涕肺应秋.mp4;3.2.19-D脾运化食物.mp4;3.2.20-运化食物2.mp4;3.2.21-运化水液、喜燥恶湿.mp4;3.2.22-脾的特性-脾气宜升.mp4;3.2.23-脾统血.mp4;3.2.24-系统联系1.mp4;3.2.25-系统联系2.mp4;3.2.26D-肝1—概述与特性_1只修过2次,应该是B为了与上传好认.mp4;3.2.27-肝主疏泄概念及病机.mp4;3.2.28-肝主疏泄的生理作用1.mp4;3.2.29-肝主疏泄的生理作用2.mp4;3.2.30-肝5肝藏血1.mp4;3.2.31-肝6肝藏血2.mp4;3.2.32-肝7肝藏魂.mp4;3.2.33-肝8 体华窍液时.mp4;3.2.34-肾的概述、肾藏精的概念.mp4;3.2.35-肾藏精—主生长发育与生殖.mp4;3.2.35-A肾藏精-主生长发育与生殖.mp4;3.2.36-肾藏精,主脏腑气化等.mp4;3.2.37-肾藏精,主生髓化血、主抵御外邪.mp4;3.2.38-肾主水.mp4;3.2.39-肾主纳气.mp4;3.2.40-肾藏志、在志为恐、在体合骨、荣齿、其华在发.mp4;3.2.41-肾在窍为耳及二阴.mp4;3.2.42-系统联系3.mp4;3.3.1-六腑的概念、生理功能及特点.mp4;3.3.2-胆的生理功能.mp4;3.3.3-胃的概念及生理功能.mp4;3.3.4-小肠、大肠.mp4;3.3.5-膀胱、三焦.mp4;3.4.1-奇恒之腑的概念及特点.mp4;3.4.2-脑、髓的概述及功能.mp4;3.4.3-女子胞的概述及生理功能.mp4;3.5.1-心与它脏的关系.mp4;3.5.2-A肺与它脏的关系.mp4;3.5.3-肝与它脏的关系.mp4;3.5.4-脾与它脏的关系.mp4;3.5.5-腑与腑之间的关系.mp4;3.6.1-脏与腑的关系前言.mp4;3.6.2-心与小肠的关系.mp4;3.6.3-肺与大肠的关系.mp4;3.6.4-脾与胃的关系.mp4;3.6.5-肝与胆的关系.mp4;3.6.6-肾与膀胱的关系.mp4;4-精气血津液;4.1.1-人体之精的概念与分类1.mp4;4.1.2-人体之精的生成、贮藏和施泄2.mp4;4.1.3-人体之精的功能3.mp4;4.2.1-人体之气的概念.mp4;4.2.2-人体之气的生成.mp4;4.2.3-人体之气的运动——气机.mp4;4.2.4-气机失常的表现与气化.mp4;4.2.5-人体之气功能之——推动、温煦.mp4;4.2.6-人体之气功能之——防御、固摄、中介.mp4;4.2.7-元气.mp4;4.2.8-宗气.mp4;4.2.9-营气、卫气.mp4;4.3.1-血的概念与生成1.mp4;4.3.1-A血的概念与生成.mp4;4.3.2-血的运行与功能.mp4;4.4.1-A津液的概念和输布.mp4;4.4.2-津液的排泄与功能.mp4;4.5.1-神的概念、分布与功能.mp4;4.6.1-气与血的关系.mp4;4.6.2-气与津液的关系.mp4;4.6.3-B精血、津液和精气的关系.mp4;5- 经络;5.1.1-经络概念.mp4;5.1.2-经络系统.mp4;5.2.1-A十二经脉的名称和走向交接规律.mp4;5.2.2-分布、表里和气血流注.mp4;5.3.1-奇经八脉.mp4;5.3.2-奇经八脉2.mp4;5.3.3-A奇经八脉各自的生理功能2.mp4;5.4.1-经络的生理功能.mp4;5.4.2-A经络学说的应用.mp4;6-体质;6.1.1-体质的概念.mp4;6.1.1-A体质的概念.mp4;6.1.2-体质的特点.mp4;6.1.2-A体质的特点.mp4;6.2.1-体质的基础与成因.mp4;6.2.1-A体质的基础与成因.mp4;6.3.1-阴阳分类.mp4;6.3.1-A阴阳分类.mp4;6.3.2-气虚质.mp4;6.3.2-A气虚质.mp4;6.3.3-阳虚质.mp4;6.3.3-A阳虚质.mp4;6.3.4-阴虚质.mp4;6.3.4-A阴虚质.mp4;6.3.5-湿热质.mp4;6.3.5-A湿热质.mp4;6.3.6-血瘀质.mp4;6.3.6-A血瘀质.mp4;6.3.7-气郁质.mp4;6.3.7-A气郁质.mp4;6.3.8-痰湿质.mp4;6.3.8-A痰湿质.mp4;6.4.1-体质学说的应用.mp4;6.4.1-A体质学说的应用.mp4;7-病因;7.1.1-A病因概述.mp4;7.1.1-D病因概述.mp4;7.1.2-A六淫的概念.mp4;7.1.3-D六淫致病的共同致病特点-改.mp4;7.1.4-A风邪(一).mp4;7.1.5-A风邪(二).mp4;7.1.6-C风邪(三).mp4;7.1.7-A寒邪.mp4;7.1.8-A暑性升散,伤津耗气.mp4;7.1.9-A湿邪(一).mp4;7.1.10-A湿邪(二).mp4;7.1.11-A燥胜则干,津伤肺燥.mp4;7.1.12-C火邪(一).mp4;7.1.13-A火邪(二).mp4;7.1.14-C火邪(三).mp4;7.1.15-C疠气致病特点.mp4;7.1.16-A疠气发病的影响因素.mp4;7.2.1-B七情过激直接伤及内脏.mp4;7.2.2-B七情致病影响脏腑气机(一).mp4;7.2.3-B七情致病影响脏腑气机(二).mp4;7.2.4-B情绪是把双刃剑.mp4;7.2.5-B饮食不节与不洁,成疾致危.mp4;7.2.6-B饮食偏嗜,阴阳失调.mp4;7.2.7-B积“劳”成疾(一).mp4;7.2.8-B积“劳”成疾(二).mp4;7.2.9-B过“逸”致疾(一).mp4;7.2.10-B过“逸”致疾(二).mp4;7.3.1-B痰饮的形成(一).mp4;7.3.2-B痰饮的形成(二).mp4;7.3.3-B痰饮的致病特点(一).mp4;7.3.4-B痰饮的致病特点(二).mp4;7.3.5-B瘀血的形成(一).mp4;7.3.6-B瘀血的形成(二).mp4;7.3.7-B瘀血致病特点(一).mp4;7.3.8-B瘀血致病特点(二).mp4;7.3.9-B结石致病.mp4;8-病机;8.1.1-病机概述.mp4;8.1.2-正虚邪侵与疾病发生.mp4;8.1.3-影响发病的主要因素.mp4;8.1.4-发病类型.mp4;8.2.1-邪正盛衰与虚实变化.mp4;8.2.2-邪正盛衰与疾病转归.mp4;8.2.3-阴阳偏胜与偏衰.mp4;8.2.4-阴阳互损与格拒.mp4;8.2.5-阴阳转化与亡失.mp4;8.2.6-精的失常.mp4;8.2.7-气的失常.mp4;8.2.8-血的失常.mp4;8.2.9-精气血关系的失调.mp4;8.2.10-精气血津液失常.mp4;8.2.10-A精气血津液失常.mp4;8.3.1-内生五邪之风气内动.mp4;8.3.1-A内生五邪之风气内动.mp4;8.3.2-内生五邪之寒从中生与湿浊内生.mp4;8.3.3-C内生五邪之津伤化燥与火热内生.mp4;8.3.3-D内生五邪之津伤化燥与火热内生.mp4;8.4.1-疾病传变的形式.mp4;8.4.2-影响疾病传变的因素.mp4;9-养生与防治原则;9.1.1-养生与天年.mp4;9.1.2-衰老及原因.mp4;9.1.3-养生的基本原则.mp4;9.2.1-治未病总论.mp4;9.2.2-未病先防 扶正辟邪.mp4;9.2.3-既病防变,愈后防复.mp4;9.3.1-治则总论-治病求本.mp4;9.3.2-逆者正治,从者反治.mp4;9.3.3-标本缓急、分清主次.mp4;9.3.4-扶正祛邪、灵活运用.mp4;9.3.5-B调整阴阳、以平为期_2020.10.25改.mp4;9.3.6-调和脏腑1——五行相生、补母泻子.mp4;9.3.7-调和脏腑2——五行相克、抑强扶弱.mp4;9.3.8-三因制宜、辨证治疗.mp4";
- break;
- case 'zhongji-en':
- $files = "0-preface;0-Preface of Learing(序言).mp4;0.1-Basic Theory of Traditional Chinese Medicine.mp4;1- Introduction;1.1-Breif History of TCM Theory System.mp4;1.2-Wholism Concep.mp4;1.3-Treatment Based on Syndrome Differentiation.mp4;2- Yin Yang and Five Elements;2.1-Concept and Theory Contents of Yin-Yang.mp4;2.2- Application of Yin-Yang Theory in Chinese Medicine.mp4;2.3- Notion of the Five Elements.mp4;2.4-Application of the Five Elements Theory in Chinese Medicine.mp4;3-Tibetan, Heart;3.1-Visceral Picture Theory Overview.mp4;3.2-The Heart.mp4;3.3-The Lung.mp4;3.4-The Spleen.mp4;3.5-The Liver.mp4;3.6-The Kidney.mp4;3.7-The Six Fu Organs.mp4;4-Spirit, Qi, Blood, Body Fluid and Spirit;4.1- Qi.mp4;4.2-The Blood.mp4;4.3- Body Fluid.mp4;4.4- Relationships among Qi, Blood, and Body Fluid.mp4;5-Meridians;5.1-Overview of the Meridian System.mp4;5.2- The Twelve Meridians.mp4;5.3-The Eight Extraordinary Meridians.mp4;6-Constitution;6.0-Constitution Theory.mp4;7-Etiology;7.1- Etiology Introduction.mp4;7.2- Wind Pathogen.mp4;7.3- Cold Pathogen.mp4;7.4-Summer-heat Pathogen.mp4;7.5- Dampness Pathogen.mp4;7.6- Dryness Pathogen.mp4;7.7- Fire Pathogen.mp4;7.8-Pestilent Pathogens.mp4;7.9- Endogenous Seven Affects.mp4;7.10-Improper Diet and Maladjustment of Work and Leisure.mp4;7.11-Phlegm and Stagnant Fluid.mp4;7.12-Stagnant Blood.mp4;8-Pathogenesis;8.1- Basic Pathogenesis I.mp4;8.2-Basic Pathogenesis II.mp4;9-Prevention and treatment principles;9.1-Principles for Prevention of Disease.mp4;9.2-Principles for Treatment of Disease.mp4";
- break;
- }
- $filesInFolder = str2arr($files, ';');
- foreach ($filesInFolder as $path) {
- $file = pathinfo($path);
- $video = [
- 'section' => 0,
- 'video' => false,
- 'video_path' => false,
- 'srt' => false,
- ];
- if (array_key_exists('extension', $file)) {
- $this->line($file['filename']);
- switch (strtolower($file['extension'])) {
- case 'txt':
- $file_data = str2arr0($file['filename'], '-');
- $name = $file_data[1];
- if ($base_lang == 'en') $name = $file_data[2];
- $sections[$file_data[0]] = [
- 'name' => $name,
- 'en_name' => $file_data[2],
- ];
- break;
- case 'mp4':
- $file_data = str2arr0($file['filename'], '-');
- if (count($file_data) == 2) {
- list($index, $name
- ) = str2arr0($file['filename'], '-');
- $s = str2arr0($index, '.');
- $en_name = $name;
- } else {
- list($index, $name, $en_name) = str2arr0($file['filename'], '-');
- $s = str2arr0($index, '.');
- if ($base_lang == 'en') $name = $en_name;
- }
- $videos[$s[0]][] = [
- 'section' => $s[0],
- 'name' => $name,
- 'en_name' => $en_name,
- 'path' => "{$base_url}/" . $file['filename'] . '.mp4',
- 'srt' => false
- ];
- break;
- case 'srt':
- break;
- }
- } else {
- $file_data = str2arr0($file['filename'], '-');
- $name = $file_data[1];
- if (count($file_data) == 2) {
- $sections[$file_data[0]] = [
- 'name' => $name,
- 'en_name' => $file_data[1],
- ];
- } else {
- if ($base_lang == 'en') $name = $file_data[2];
- $sections[$file_data[0]] = [
- 'name' => $name,
- 'en_name' => $file_data[2],
- ];
- }
- }
- }
- // dd($videos[0]);
- // print_r($videos);
- // $this->table(['section', 'name', 'en_name', 'path', 'srt'], $videos);
- // $this->table(array_keys($videos[0]), $videos);
- //dd(1);
- // return false;
- if ($base_course_id) {
- $course = Course::query()->find($base_course_id);
- } else {
- $course = Course::query()->create([
- 'title' => $title,
- 'language' => $base_lang,
- 'admin_id' => 1,
- 'status' => 1,
- 'slug' => Str::random(8),
- 'published_at' => Carbon::now()->toDateTimeString(),
- ]);
- }
- Chapter::query()->where('course_id', $course->id)->delete();
- Video::query()->where('course_id', $course->id)->delete();
- DB::beginTransaction();
- try {
- foreach ($videos as $s => $vs) {
- $section = false;
- if ($is_close_chapter) {
- $section = $sections[1];
- } else {
- $section = $sections[$s];
- }
- $chapter = Chapter::query()->updateOrCreate([
- 'course_id' => $course->id,
- 'title' => $section['name'],
- 'language' => $base_lang,
- ], [
- 'status' => ModelStatusEnum::OK
- ]);
- foreach ($vs as $video) {
- $resource = Resource::query()->updateOrCreate([
- 'name' => $video['name'],
- 'original_name' => $video['name'],
- 'path' => $video['path'],
- ], [
- 'disk' => 'qiniu',
- 'url' => $video['path'],
- 'size' => 0,
- 'language' => $base_lang,
- 'status' => ModelStatusEnum::OK,
- ]);
- $subtitle_resource = null;
- if ($video['srt']) {
- $subtitle_resource = Resource::query()->updateOrCreate([
- 'path' => $video['srt']['path'],
- ], [
- 'name' => Str::random(8) . '.srt',
- 'original_name' => $video['srt']['name'],
- 'disk' => 'public',
- 'url' => $video['srt']['path'],
- 'size' => 0,
- 'language' => $base_lang,
- 'status' => ModelStatusEnum::OK,
- ]);
- }
- Video::query()->updateOrCreate([
- 'course_id' => $course->id,
- 'course_chapter_id' => $chapter->id,
- 'title' => $video['name'],
- ], [
- 'slug' => Str::random(),
- 'language' => $base_lang,
- 'url' => $resource->id,
- 'published_at' => Carbon::now()->toDateTimeString(),
- 'subtitle_zh_path' => $subtitle_resource ? $subtitle_resource->id : '',
- 'subtitle_en_path' => $subtitle_resource ? $subtitle_resource->id : '',
- 'status' => ModelStatusEnum::OK
- ]);
- }
- }
- DB::commit();
- } catch (\Exception $exception) {
- DB::rollBack();
- dd($exception);
- }
- $this->line('完成');
- return true;
- }
- public function srt2vtt($str)
- {
- return str_replace('.srt', '.vtt', $str);
- }
- public function number($str)
- {
- return preg_replace('/[^\.0123456789]/s', '', $str);
- }
- public function getNumber($str)
- {
- $arr = explode('-', $str);
- return (int)$arr[0] . '.' . (int)$arr[1] . '.' . (int)$arr[2];
- }
- // public function loadFiles()
- // {
- //// $base_path = '/home/www/platform-api/storage/app/public/course_video/zhongyililunjichu-en';
- //// $base_path = '/Volumes/希梦耐康科技/中医基础理论/中医基础理论';
- //// $base_path = '/Volumes/希梦耐康科技/中医基础理论v3-laster';
- //// $filesInFolder = File::files($base_path);
- //// $videos = [];
- //// $i = 0;
- //// foreach ($filesInFolder as $path) {
- //// $file = pathinfo($path);
- //// $video = [
- //// 'id' => 0,
- //// 'section' => 0,
- //// 'video' => false,
- //// 'video_path' => false,
- //// 'srt' => false,
- //// ];
- //// if ($file['extension'] == 'mp4') {
- ////
- //// $video['video'] = $file['filename'] . '.mp4';
- //// $video['video_path'] = 'zhongyijichulilun-20220905/' . $file['filename'] . '.mp4';
- //// $nums = substr($video['video'], 0, 1);
- //// $video['section'] = $nums;
- ////// $is_exists = File::exists($base_path . '/' . $file['filename'] . '.srt');
- ////// if ($is_exists) {
- ////// $video['srt'] = $file['filename'] . '.srt';
- ////// $video['srt_path'] = 'course_video/zhongyijichulilun-20220905/' . $file['filename'] . '.srt';
- ////// $i++;
- ////// }
- //// $i++;
- //// $video['id'] = count($videos) + 1;
- ////// $videos[$nums][] = $video;
- //// $videos[] = $video;
- //// }
- //// }
- //// dd(arr2str(array_column($videos, 'video'), '&'));
- //// $this->table(['id', 'section', 'name', 'path', 'srt'], $videos);
- //// dd(1);
- //
- //// $s_courses = "《中医基础理论》片花.mp4&0 Preface of Learing(序言).mp4&1.1 Breif History of TCM Theory System(中医理论体系简史).mp4&1.2 Wholism Concept(整体观念).mp4&1.3 Treatment Based on Syndrome Differentiation(辨证论治).mp4&2.1 Concept and Theory Contents of Yin-Yang(阴阳概念及阴阳学说内容).mp4&2.2 Application of Yin-Yang Theory in Chinese Medicine(阴阳学说的应用).mp4&2.3 Notion of the Five Elements(五行概念).mp4&2.4 Application of the Five Elements Theory in Chinese Medicine(五行学说的应用).mp4&3.1 Visceral Picture Theory Overview(藏象概述).mp4&3.2 The Heart(心).mp4&3.3 The Lung(肺).mp4&3.4 The Spleen(脾).mp4&3.5 The Liver(肝).mp4&3.6 The Kidney.mp4&3.7 The Six Fu Organs(六腑).mp4&4.1 Qi(气).mp4&4.2 The Blood(血).mp4&4.3 Body Fluid(津液).mp4&4.4 Relationships among Qi, Blood, and Body Fluid(气血津液的相互关系).mp4&5.1 Overview of the Meridian System(经络学说概述).mp4&5.2 The Twelve Meridians(十二经脉).mp4&5.3 The Eight Extraordinary Meridians(奇经八脉).mp4&6.0 Constitution Theory(体质).mp4&7.1 Etiology Introduction(病因概述).mp4&7.10 Improper Diet and Maladjustment of Work and Leisure(饮食失宜及劳逸失度).mp4&7.11 Phlegm and Stagnant Fluid(痰饮).mp4&7.12 Stagnant Blood(瘀血).mp4&7.2 Wind Pathogen(风邪).mp4&7.3 Cold Pathogen(寒邪).mp4&7.4 Summer-heat Pathogen(暑邪).mp4&7.5 Dampness Pathogen(湿邪).mp4&7.6 Dryness Pathogen(燥邪).mp4&7.7 Fire Pathogen(火邪).mp4&7.8 Pestilent Pathogens(疠气).mp4&7.9 Endogenous Seven Affects(内伤七情).mp4&8.1 Basic Pathogenesis I(病机一).mp4&8.2 Basic Pathogenesis II(病机二).mp4&9.1 Principles for Prevention of Disease(预防).mp4&9.2 Principles for Treatment of Disease(治则).mp4";
- //// $courses = [];
- ////
- //// foreach (str2arr($s_courses, '&') as $key => $course) {
- //// $courses[$key]['section'] = is_numeric(substr($course, 0, 1)) ? substr($course, 0, 1) : 0;
- //// $courses[$key]['path'] = "zhongyijichulilun-20220905/" . $course;
- //// $courses[$key]['name'] = $course;
- //// }
- ////
- //// //创建课程
- //// $course = Course::query()->updateOrCreate([
- //// 'title' => 'TCM BASIC THEORY',
- //// 'language' => 'en',
- //// ], [
- //// 'status' => ModelStatusEnum::OK
- //// ]);
- //// //创建章节
- ////// $sections = array_unique(array_column($videos, 'section'));
- ////// foreach ($videos as $section => $video) {
- ////// $chater = Chapter::query()->updateOrCreate([
- ////// 'course_id' => $course->id,
- ////// 'title' => str_replace('.mp4', '', $video[0]['video']),
- ////// 'language' => 'en',
- ////// ], [
- ////// 'status' => ModelStatusEnum::OK
- ////// ]);
- ////// foreach ($video as $item) {
- //////
- ////// $resource = Resource::query()->updateOrCreate([
- ////// 'name' => $item['video'],
- ////// 'original_name' => $item['video'],
- ////// 'path' => $item['video_path'],
- ////// ], [
- ////// 'disk' => 'qiniu',
- ////// 'url' => 'http://zhongma.qiniu.xmnk.cn/' . $item['video_path'],
- ////// 'size' => 0,
- ////// 'language' => 'en',
- ////// 'status' => ModelStatusEnum::OK,
- ////// ]);
- ////// $subtitle_resource = null;
- ////// if ($item['srt']) {
- ////// $subtitle_resource = Resource::query()->updateOrCreate([
- ////// 'path' => $item['srt'],
- ////// ], [
- ////// 'name' => Str::random(8) . '.srt',
- ////// 'original_name' => $item['srt'],
- ////// 'disk' => 'public',
- ////// 'url' => 'http://zmzjzyyzx.hactcm.edu.cn/storage/' . $item['srt_path'],
- ////// 'size' => 0,
- ////// 'language' => 'en',
- ////// 'status' => ModelStatusEnum::OK,
- ////// ]);
- ////// }
- //////
- ////// Video::query()->updateOrCreate([
- ////// 'course_id' => $course->id,
- ////// 'course_chapter_id' => $chater->id,
- ////// 'title' => $item['video'],
- ////// ], [
- ////// 'slug' => Str::random(),
- ////// 'language' => 'en',
- ////// 'url' => $resource->id,
- ////// 'published_at' => Carbon::now()->toDateTimeString(),
- ////// 'subtitle_zh_path' => $subtitle_resource ? $subtitle_resource->id : '',
- ////// 'subtitle_en_path' => $subtitle_resource ? $subtitle_resource->id : '',
- ////// 'status' => ModelStatusEnum::OK
- ////// ]);
- ////// }
- //////// Chapter::query()->updateOrCreate([
- //////// 'course_id' => $course->id,
- //////// 'title' => $section,
- //////// 'language' => 'en',
- //////// ], [
- //////// 'status' => ModelStatusEnum::OK
- //////// ]);
- ////// }
- ////
- //// foreach ($courses as $section => $video) {
- //// $chater = Chapter::query()->updateOrCreate([
- //// 'course_id' => $course->id,
- //// 'title' => str_replace('.mp4', '', $video[0]['name']),
- //// 'language' => 'en',
- //// ], [
- //// 'status' => ModelStatusEnum::OK
- //// ]);
- //// foreach ($video as $item) {
- ////
- //// $resource = Resource::query()->updateOrCreate([
- //// 'name' => $item['name'],
- //// 'original_name' => $item['name'],
- //// 'path' => $item['path'],
- //// ], [
- //// 'disk' => 'qiniu',
- //// 'url' => 'http://zhongma.qiniu.xmnk.cn/' . $item['path'],
- //// 'size' => 0,
- //// 'language' => 'en',
- //// 'status' => ModelStatusEnum::OK,
- //// ]);
- //// $subtitle_resource = null;
- ////
- //// Video::query()->updateOrCreate([
- //// 'course_id' => $course->id,
- //// 'course_chapter_id' => $chater->id,
- //// 'title' => $item['video'],
- //// ], [
- //// 'slug' => Str::random(),
- //// 'language' => 'en',
- //// 'url' => $resource->id,
- //// 'published_at' => Carbon::now()->toDateTimeString(),
- //// 'subtitle_zh_path' => $subtitle_resource ? $subtitle_resource->id : '',
- //// 'subtitle_en_path' => $subtitle_resource ? $subtitle_resource->id : '',
- //// 'status' => ModelStatusEnum::OK
- //// ]);
- //// }
- //// }
- //
- // $s_courses = "《中医基础理论》片花.mp4&0 Preface of Learing(序言).mp4&1.1 Breif History of TCM Theory System(中医理论体系简史).mp4&1.2 Wholism Concept(整体观念).mp4&1.3 Treatment Based on Syndrome Differentiation(辨证论治).mp4&2.1 Concept and Theory Contents of Yin-Yang(阴阳概念及阴阳学说内容).mp4&2.2 Application of Yin-Yang Theory in Chinese Medicine(阴阳学说的应用).mp4&2.3 Notion of the Five Elements(五行概念).mp4&2.4 Application of the Five Elements Theory in Chinese Medicine(五行学说的应用).mp4&3.1 Visceral Picture Theory Overview(藏象概述).mp4&3.2 The Heart(心).mp4&3.3 The Lung(肺).mp4&3.4 The Spleen(脾).mp4&3.5 The Liver(肝).mp4&3.6 The Kidney.mp4&3.7 The Six Fu Organs(六腑).mp4&4.1 Qi(气).mp4&4.2 The Blood(血).mp4&4.3 Body Fluid(津液).mp4&4.4 Relationships among Qi, Blood, and Body Fluid(气血津液的相互关系).mp4&5.1 Overview of the Meridian System(经络学说概述).mp4&5.2 The Twelve Meridians(十二经脉).mp4&5.3 The Eight Extraordinary Meridians(奇经八脉).mp4&6.0 Constitution Theory(体质).mp4&7.1 Etiology Introduction(病因概述).mp4&7.10 Improper Diet and Maladjustment of Work and Leisure(饮食失宜及劳逸失度).mp4&7.11 Phlegm and Stagnant Fluid(痰饮).mp4&7.12 Stagnant Blood(瘀血).mp4&7.2 Wind Pathogen(风邪).mp4&7.3 Cold Pathogen(寒邪).mp4&7.4 Summer-heat Pathogen(暑邪).mp4&7.5 Dampness Pathogen(湿邪).mp4&7.6 Dryness Pathogen(燥邪).mp4&7.7 Fire Pathogen(火邪).mp4&7.8 Pestilent Pathogens(疠气).mp4&7.9 Endogenous Seven Affects(内伤七情).mp4&8.1 Basic Pathogenesis I(病机一).mp4&8.2 Basic Pathogenesis II(病机二).mp4&9.1 Principles for Prevention of Disease(预防).mp4&9.2 Principles for Treatment of Disease(治则).mp4";
- // $courses = [];
- //
- // foreach (str2arr($s_courses, '&') as $key => $course) {
- //// $courses[$key]['section'] = is_numeric(substr($course, 0, 1)) ? substr($course, 0, 1) : 0;
- //// $courses[$key]['path'] = "zhongyijichulilun-20220905/" . $course;
- //// $courses[$key]['name'] = $course;
- // $item['section'] = is_numeric(substr($course, 0, 1)) ? substr($course, 0, 1) : 0;
- // $item['path'] = "zhongyijichulilun-20220905/" . $course;
- // $item['name'] = $course;
- // $courses[$item['section']][] = $item;
- // }
- // //创建课程
- //// $course = Course::query()->updateOrCreate([
- //// 'title' => 'TCM BASIC THEORY',
- //// 'language' => 'en',
- //// ], [
- //// 'status' => ModelStatusEnum::OK
- //// ]);
- //
- // $course = Course::query()->where('id', 3)->first();
- //
- //
- // $chaters = Chapter::query()->where('course_id', $course->id)->orderBy('id')->get()->toArray();
- //// $chaters = Chapter::query()->where('course_id', $course->id)->orderBy('id')->delete();
- //// Video::query()->where('course_id', $course->id)->delete();
- // foreach ($courses as $key => $video) {
- //// $chater = Chapter::query()->updateOrCreate([
- //// 'course_id' => $course->id,
- //// 'title' => str_replace('.mp4', '', $video[0]['name']),
- //// 'language' => 'en',
- //// ], [
- //// 'status' => ModelStatusEnum::OK
- //// ]);
- // $chater = $chaters[$key];
- // foreach ($video as $item) {
- // $resource = Resource::query()->updateOrCreate([
- // 'name' => $item['name'],
- // 'original_name' => $item['name'],
- // 'path' => $item['path'],
- // ], [
- // 'disk' => 'qiniu',
- // 'url' => 'http://zhongma.qiniu.xmnk.cn/' . $item['path'],
- // 'size' => 0,
- // 'language' => 'en',
- //// 'language' => 'zh_CN',
- // 'status' => ModelStatusEnum::OK,
- // ]);
- // $subtitle_resource = null;
- //
- // Video::query()->updateOrCreate([
- // 'course_id' => $course->id,
- // 'course_chapter_id' => $chater['id'],
- // 'title' => $item['name'],
- // ], [
- // 'slug' => Str::random(),
- // 'language' => 'en',
- //// 'language' => 'zh_CN',
- // 'url' => $resource->id,
- // 'published_at' => Carbon::now()->toDateTimeString(),
- // 'subtitle_zh_path' => $subtitle_resource ? $subtitle_resource->id : '',
- // 'subtitle_en_path' => $subtitle_resource ? $subtitle_resource->id : '',
- // 'status' => ModelStatusEnum::OK
- // ]);
- // }
- // }
- //
- // }
- public function urlMove()
- {
- $course_id = 1;
- $videos = Video::query()->where('course_id', $course_id)->where('status', ModelStatusEnum::OK)->pluck('url');
- foreach ($videos as $url) {
- $resource = Resource::query()->find($url);
- $this->line($url);
- $resource->disk = 'qiniu';
- $resource->path = str_replace('course_video/', '', $resource->path);
- $resource->url = 'http://zhongma.qiniu.xmnk.cn/' . $resource->path;
- $resource->save();
- }
- $this->line('ok');
- }
- }
|