酷炫直播运营系统小程序版本

editPlan.vue 24KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851
  1. <template>
  2. <view style="background: #F1F5F7;min-height: 100vh;">
  3. <view class="accountBox">
  4. <text class="text">账号</text>
  5. <image class="accountImg" :src="accountInfo.head" mode="widthFix"></image>
  6. <text class="accountName">{{accountInfo.name}}</text>
  7. </view>
  8. <view class="liveTimeBox">
  9. <view class="itmeIconFont iconfont icon-shijian_icon"></view>
  10. <view class="flex" :class="main_time_falg?'errTime':''" @click="editEvent('all')">
  11. <view class="no_worder" v-if="startLiveTime.time==''&&startLiveTime.date==''">开播时间</view>
  12. <view class="liveStartTimeBox" v-else>
  13. <view class="time">{{startLiveTime.time}}</view>
  14. <view class="date">{{startLiveTime.date}}</view>
  15. </view>
  16. <image class="liveTimeImg" src="../../static/img/you_icon@2x.png" mode="widthFix"></image>
  17. <view class="no_worder" v-if="endLiveTime.time==''&&endLiveTime.date==''">下播时间</view>
  18. <view class="liveStartTimeBox" v-else>
  19. <view class="time">{{endLiveTime.time}}</view>
  20. <view class="date">{{endLiveTime.date}}</view>
  21. </view>
  22. </view>
  23. </view>
  24. <scroll-view scroll-y="true" style="height:calc(100vh - 258rpx);margin-top:10rpx">
  25. <view class="workerBox" style="margin-top:6rpx">
  26. <view class="wirkerTitle">
  27. <view class="title">主播</view>
  28. <view class="iconfont icon-tianjia_icon" @click="addStaffInfo('staff_info_anchor')"></view>
  29. </view>
  30. <uni-swipe-action>
  31. <uni-swipe-action-item :right-options="options" :key="index+'anchorliveTimeBoxInfo'"
  32. v-for="(item,index) in staff_info_anchor" @click="swipeClick(index,'staff_info_anchor')">
  33. <view class="liveTimeBox">
  34. <view class="itmeIconFont iconfont icon-shijian_icon"></view>
  35. <view class="flex" :class="item.err_time?'errTime':''" @click="editEvent('staff_info_anchor',index)">
  36. <view class="liveStartTimeBox">
  37. <view class="time">{{item.slefStartTime.time}}</view>
  38. <view class="date">{{item.slefStartTime.date}}</view>
  39. </view>
  40. <image class="liveTimeImg" src="../../static/img/you_icon@2x.png" mode="widthFix"></image>
  41. <view class="liveStartTimeBox">
  42. <view class="time">{{item.slefEndTime.time}}</view>
  43. <view class="date">{{item.slefEndTime.date}}</view>
  44. </view>
  45. </view>
  46. </view>
  47. <view class="worderSelectBox" @click="plan_enableStaffList('staff_info_anchor',index)">
  48. <view class="no_worder" v-if="item.staff_name_list&&item.staff_name_list.length==0">请选择主播
  49. </view>
  50. <view class="worder" v-else>{{item.staff_name_list.join(',')}}</view>
  51. <view class="iconfont icon-down_icon"></view>
  52. </view>
  53. </uni-swipe-action-item>
  54. </uni-swipe-action>
  55. </view>
  56. <view class="workerBox">
  57. <view class="wirkerTitle">
  58. <view class="title">工作人员</view>
  59. <view class="iconfont icon-tianjia_icon" @click="addStaffInfo('staff_info_worker')"></view>
  60. </view>
  61. <uni-swipe-action>
  62. <uni-swipe-action-item :right-options="options" :key="index+'staff_info_workermeBoxInfo'"
  63. v-for="(item,index) in staff_info_worker" @click="swipeClick(index,'staff_info_worker')">
  64. <view class="liveTimeBox" :key="index+'staff_info_workermeBoxInfo'">
  65. <view class="itmeIconFont iconfont icon-shijian_icon"></view>
  66. <view class="flex" :class="item.err_time?'errTime':''" @click="editEvent('staff_info_worker',index)">
  67. <view class="liveStartTimeBox">
  68. <view class="time">{{item.slefStartTime.time}}</view>
  69. <view class="date">{{item.slefStartTime.date}}</view>
  70. </view>
  71. <image class="liveTimeImg" src="../../static/img/you_icon@2x.png" mode="widthFix"></image>
  72. <view class="liveStartTimeBox">
  73. <view class="time">{{item.slefEndTime.time}}</view>
  74. <view class="date">{{item.slefEndTime.date}}</view>
  75. </view>
  76. </view>
  77. </view>
  78. <view class="worderSelectBox" @click="plan_enableStaffList('staff_info_worker',index)">
  79. <view class="no_worder" v-if="item.staff_name_list&&item.staff_name_list.length==0">请选择工作人员
  80. </view>
  81. <view class="worder" v-else>{{item.staff_name_list.join(',')}}</view>
  82. <view class="iconfont icon-down_icon"></view>
  83. </view>
  84. </uni-swipe-action-item>
  85. </uni-swipe-action>
  86. </view>
  87. <view class="buttons">
  88. <view class="button button1" @click="goBack">取消</view>
  89. <view class="button button2" @click="livePlan_edit">提交</view>
  90. <view class="button button3" @click="deleteFlagEvent">删除计划</view>
  91. </view>
  92. </scroll-view>
  93. <!-- 时间选择 -->
  94. <editPlanTime v-if="editPlanTimeFlag" :editTimeData='editTimeData' @changeTime='changeTime'
  95. @closeEvent='editPlanTimeFlag=false'></editPlanTime>
  96. <!-- 工作人员选择 -->
  97. <view class="worker_mask" v-if="checkboxFlag" @touchmove.stop.prevent="moveStop" @click="clearMask">
  98. <view class="worker_mask_container" @click.stop="moveStop">
  99. <view class="operationBox">
  100. <view class="cancel" @click="clearMask">取消</view>
  101. <view class="define" @click="submitEvent">确定</view>
  102. </view>
  103. <no-data v-if="workerList.length==0" fcolor='#ccc'></no-data>
  104. <scroll-view scroll-y="true" class="checkboxGroup">
  105. <checkbox-group @change="checkboxChange" style="display: flex;flex-wrap: wrap;">
  106. <label class="list_cell" v-for="item in workerList" :key="item.id">
  107. <view>
  108. <checkbox style="transform:scale(0.7)" :value="item.id" :checked="item.checked" />
  109. </view>
  110. <view>{{item.real_name}}</view>
  111. </label>
  112. </checkbox-group>
  113. </scroll-view>
  114. </view>
  115. </view>
  116. <wm-watermark :text="real_name" :opacity="editPlanTimeFlag?0.1:0.2"></wm-watermark>
  117. </view>
  118. </template>
  119. <script>
  120. import editPlanTime from './editPlanTime.vue'
  121. export default {
  122. components: {
  123. editPlanTime
  124. },
  125. data() {
  126. return {
  127. real_name:'',
  128. options: [{
  129. text: '删除',
  130. style: {
  131. backgroundColor: '#dd524d'
  132. }
  133. }],
  134. accountInfo: {},
  135. date: '',
  136. editInfo: {},
  137. startLiveTime: {
  138. date: '',
  139. time: ''
  140. },
  141. endLiveTime: {
  142. date: '',
  143. time: ''
  144. },
  145. staff_info_worker: [],
  146. staff_info_anchor: [],
  147. editTimeData: {
  148. type: '',
  149. index: 0,
  150. startLiveTime: {
  151. date: '',
  152. time: ''
  153. },
  154. endLiveTime: {
  155. date: '',
  156. time: ''
  157. },
  158. },
  159. editPlanTimeFlag: false,
  160. workerList: [],
  161. checkboxFlag: false,
  162. checkboxData: {},
  163. main_time_falg:false
  164. }
  165. },
  166. async onLoad(option) {
  167. await this.$onLaunched;
  168. this.real_name = uni.getStorageSync('userInfo').info.real_name;
  169. this.accountInfo = {
  170. head: decodeURIComponent(option.head),
  171. name:option.name,
  172. platform: option.platform,
  173. ruled: option.ruled,
  174. seller_id: option.seller_id
  175. }
  176. console.log(this.accountInfo)
  177. this.date = option.date;
  178. this.plan_staffInfo()
  179. },
  180. methods: {
  181. moveStop() {},
  182. checkboxChange(e) {
  183. this.checkboxData.data = e.detail.value
  184. },
  185. submitEvent() {
  186. let staff_name_list = []
  187. this.workerList.forEach((item) => {
  188. if (this.checkboxData.data.indexOf(JSON.stringify(item.id)) != -1) {
  189. staff_name_list.push(item.real_name)
  190. }
  191. })
  192. this[this.checkboxData.type][this.checkboxData.index].staff_name_list = staff_name_list;
  193. this[this.checkboxData.type][this.checkboxData.index].staff_ids = this.checkboxData.data;
  194. this.checkboxFlag = false;
  195. },
  196. clearMask() {
  197. this.checkboxFlag = false
  198. },
  199. plan_enableStaffList(type, index) {
  200. let operation_data = this[type][index]
  201. uni.showLoading({
  202. title: '加载中'
  203. });
  204. let params = {
  205. start_time: operation_data.slefStartTime.date + ' ' + operation_data.slefStartTime.time,
  206. end_time: operation_data.slefEndTime.date + ' ' + operation_data.slefEndTime.time,
  207. station_type: type == 'staff_info_anchor' ? 1 : 2, //通过主播、工作人员判断
  208. seller_id: this.accountInfo.seller_id,
  209. platform: this.accountInfo.platform,
  210. }
  211. if(this.editInfo.plan_id){
  212. params.plan_id = this.editInfo.plan_id
  213. }
  214. this.$req(this.$api.plan_enableStaffList, 'get', params, (res) => {
  215. uni.hideLoading()
  216. if (res && res.errno == 0) {
  217. let data = res.rst;
  218. let checked_list = [],
  219. no_checked_list = []
  220. data.forEach((item, index) => {
  221. if (operation_data.staff_ids.indexOf(item.id) != -1 || operation_data.staff_ids
  222. .indexOf(JSON.stringify(item.id)) != -1) {
  223. item.checked = true
  224. checked_list.push(item)
  225. } else {
  226. no_checked_list.push(item)
  227. }
  228. })
  229. this.workerList = [].concat(checked_list, no_checked_list)
  230. this.checkboxFlag = true;
  231. this.checkboxData = {
  232. type: type,
  233. index: index
  234. }
  235. } else if (res.errno != 4002) {
  236. uni.showToast({
  237. title: res.err,
  238. icon: 'none'
  239. });
  240. }
  241. }, (err) => {
  242. uni.hideLoading()
  243. })
  244. },
  245. changeTime(val) {
  246. if (val.type == 'all') {
  247. this.startLiveTime = val.startLiveTime;
  248. this.endLiveTime = val.endLiveTime;
  249. } else {
  250. this[val.type][val.index].slefStartTime = val.startLiveTime;
  251. this[val.type][val.index].slefEndTime = val.endLiveTime;
  252. }
  253. this.judgeTimeToast(val)
  254. },
  255. judgeTimeToast(val){//修改时间后,点击确认时间区间判断
  256. let start_time = new Date((val.startLiveTime.date + ' ' + val.startLiveTime.time)).getTime();
  257. let end_time = new Date((val.endLiveTime.date + ' ' + val.endLiveTime.time)).getTime();
  258. if(start_time >= end_time){
  259. uni.showToast({
  260. title: '开始时间大于结束时间,请正确选择时间!',
  261. icon: 'none'
  262. });
  263. return
  264. }
  265. if(val.type != 'all'){//非主时间段
  266. let main_start_time = new Date((this.startLiveTime.date + ' ' + this.startLiveTime.time)).getTime();
  267. let main_end_time = new Date((this.endLiveTime.date + ' ' + this.endLiveTime.time)).getTime();
  268. if(start_time<main_start_time||end_time>main_end_time){
  269. uni.showToast({
  270. title: '工作时间 超出 直播总时间,请正确选择时间!',
  271. icon: 'none'
  272. });
  273. return
  274. }
  275. }
  276. this.editPlanTimeFlag = false
  277. this.judgeTime()
  278. },
  279. editEvent(type, index) { //时间更改
  280. if (type == 'all') { //主开播结束时间
  281. this.editTimeData = {
  282. type: 'all',
  283. index: 0,
  284. startLiveTime: {
  285. date: this.startLiveTime.date,
  286. time: this.startLiveTime.time
  287. },
  288. endLiveTime: {
  289. date: this.endLiveTime.date,
  290. time: this.endLiveTime.time
  291. }
  292. }
  293. } else { //主播、工作人员的开始结束时间
  294. let data = this[type][index]
  295. this.editTimeData = {
  296. type: type,
  297. index: index,
  298. startLiveTime: {
  299. date: data.slefStartTime.date,
  300. time: data.slefStartTime.time
  301. },
  302. endLiveTime: {
  303. date: data.slefEndTime.date,
  304. time: data.slefEndTime.time
  305. }
  306. }
  307. }
  308. this.editPlanTimeFlag = true;
  309. },
  310. addStaffInfo(type) { //添加工作人员时间
  311. if (this.startLiveTime.date == '' || this.startLiveTime.time == '' || this.endLiveTime.date == '' || this
  312. .endLiveTime.time == '') {
  313. uni.showToast({
  314. title: '请正确选择开播/下播时间',
  315. icon: 'none'
  316. });
  317. return
  318. }
  319. if (type == 'staff_info_anchor') {
  320. this.staff_info_anchor.push({
  321. slefStartTime: {
  322. date: this.startLiveTime.date,
  323. time: this.startLiveTime.time
  324. },
  325. slefEndTime: {
  326. date: this.endLiveTime.date,
  327. time: this.endLiveTime.time
  328. },
  329. begin_time: '',
  330. finish_time: '',
  331. staff_ids: [],
  332. staff_name_list: [],
  333. charge_person: 1,
  334. staff_role: 1,
  335. timeFlag: false,
  336. })
  337. }
  338. if (type == 'staff_info_worker') {
  339. this.staff_info_worker.push({
  340. slefStartTime: {
  341. date: this.startLiveTime.date,
  342. time: this.startLiveTime.time
  343. },
  344. slefEndTime: {
  345. date: this.endLiveTime.date,
  346. time: this.endLiveTime.time
  347. },
  348. begin_time: '',
  349. finish_time: '',
  350. staff_ids: [],
  351. staff_name_list: [],
  352. charge_person: 1,
  353. staff_role: 4,
  354. timeFlag: false,
  355. })
  356. }
  357. },
  358. swipeClick(index, type) {
  359. this[type].splice(index, 1)
  360. },
  361. judgeTime(){
  362. // 主时间时间段判断
  363. let main_start_time = new Date((this.startLiveTime.date + ' ' + this.startLiveTime.time)).getTime();
  364. let main_end_time = new Date((this.endLiveTime.date + ' ' + this.endLiveTime.time)).getTime();
  365. if(main_start_time>=main_end_time){
  366. this.main_time_falg = true
  367. return
  368. }
  369. this.main_time_falg = false;
  370. // 主播和工作人员时间判断
  371. this.staff_info_anchor.forEach((item)=>{
  372. item.err_time = false
  373. let start_time = new Date((item.slefStartTime.date + ' ' + item.slefStartTime.time)).getTime();
  374. let end_time = new Date((item.slefEndTime.date + ' ' + item.slefEndTime.time)).getTime();
  375. if(start_time > end_time){
  376. item.err_time = true
  377. }
  378. if(start_time < main_start_time || end_time > main_end_time){
  379. item.err_time = true
  380. }
  381. })
  382. this.staff_info_worker.forEach((item)=>{
  383. item.err_time = false
  384. let start_time = new Date((item.slefStartTime.date + ' ' + item.slefStartTime.time)).getTime();
  385. let end_time = new Date((item.slefEndTime.date + ' ' + item.slefEndTime.time)).getTime();
  386. if(start_time > end_time){
  387. item.err_time = true
  388. }
  389. if(start_time < main_start_time || end_time > main_end_time){
  390. item.err_time = true
  391. }
  392. })
  393. },
  394. plan_staffInfo() {
  395. uni.showLoading({
  396. title: '加载中'
  397. });
  398. this.$req(this.$api.plan_staffInfo, 'post', {
  399. date: this.date,
  400. company_id: uni.getStorageSync('userInfo').info.company_id,
  401. sellerId: this.accountInfo.seller_id
  402. }, (res) => {
  403. uni.hideLoading()
  404. if (res && res.errno == 0) {
  405. let data = res.rst;
  406. if (!data || data.length == 0) {
  407. this.startLiveTime.date = this.date;
  408. this.startLiveTime.time = '00:00';
  409. this.endLiveTime.date = this.date;
  410. this.endLiveTime.time = '23:00';
  411. return
  412. };
  413. this.editInfo = data;
  414. // 直播开始 - 结束时间
  415. this.startLiveTime.date = data.complete_start_time.split(' ')[0]
  416. this.startLiveTime.time = data.complete_start_time.split(' ')[1]
  417. this.endLiveTime.date = data.complete_end_time.split(' ')[0]
  418. this.endLiveTime.time = data.complete_end_time.split(' ')[1]
  419. // 主播
  420. if (data.anchor.length != 0) {
  421. this.staff_info_anchor = []
  422. data.anchor.forEach((item) => {
  423. let staff_list = [];
  424. let staff_name_list = [];
  425. item.staff_list.forEach((item) => {
  426. staff_list.push(item.staff_id)
  427. staff_name_list.push(item.staff_name)
  428. })
  429. this.staff_info_anchor.push({
  430. slefStartTime: {
  431. date: item.time.complete_start_time.split(' ')[0],
  432. time: item.time.complete_start_time.split(' ')[1],
  433. },
  434. slefEndTime: {
  435. date: item.time.complete_end_time.split(' ')[0],
  436. time: item.time.complete_end_time.split(' ')[1],
  437. },
  438. begin_time: '',
  439. finish_time: '',
  440. staff_ids: staff_list,
  441. staff_name_list: staff_name_list,
  442. charge_person: 1,
  443. staff_role: 1,
  444. timeFlag: false
  445. })
  446. })
  447. }
  448. // 工作人员
  449. if (data.normal.length != 0) {
  450. this.staff_info_worker = []
  451. data.normal.forEach((item) => {
  452. let staff_list = [];
  453. let staff_name_list = [];
  454. item.staff_list.forEach((item1) => {
  455. staff_list.push(item1.staff_id)
  456. staff_name_list.push(item1.staff_name)
  457. })
  458. this.staff_info_worker.push({
  459. slefStartTime: {
  460. date: item.time.complete_start_time.split(' ')[0],
  461. time: item.time.complete_start_time.split(' ')[1],
  462. },
  463. slefEndTime: {
  464. date: item.time.complete_end_time.split(' ')[0],
  465. time: item.time.complete_end_time.split(' ')[1],
  466. },
  467. begin_time: '',
  468. finish_time: '',
  469. staff_ids: staff_list,
  470. staff_name_list: staff_name_list,
  471. charge_person: 1,
  472. staff_role: 4,
  473. timeFlag: false
  474. })
  475. })
  476. }
  477. this.judgeTime()
  478. } else if (res.errno != 4002) {
  479. uni.showToast({
  480. title: res.err,
  481. icon: 'none'
  482. });
  483. }
  484. }, (err) => {
  485. uni.hideLoading()
  486. })
  487. },
  488. livePlan_edit() { //提交计划
  489. if (this.main_time_falg || this.startLiveTime.date == '' || this.startLiveTime.time == '' || this.endLiveTime.date == '' || this
  490. .endLiveTime.time == '') {
  491. uni.showToast({
  492. title: '请正确选择开播/下播时间',
  493. icon: 'none'
  494. });
  495. return
  496. }
  497. let anchor_flag = false;
  498. let err_time_flag = false;
  499. let worker_arr = [];
  500. worker_arr = worker_arr.concat(this.staff_info_anchor, this.staff_info_worker)
  501. worker_arr.forEach((item) => {
  502. if(item.err_time){
  503. err_time_flag = true
  504. }
  505. if (!item.staff_ids || item.staff_ids == '' || item.staff_ids.length == 0) {
  506. anchor_flag = true
  507. }
  508. item.begin_time = item.slefStartTime.date + ' ' + item.slefStartTime.time;
  509. item.finish_time = item.slefEndTime.date + ' ' + item.slefEndTime.time;
  510. })
  511. if(err_time_flag){
  512. uni.showToast({
  513. title: '请正确选择工作时间!',
  514. icon: 'none'
  515. });
  516. return
  517. }
  518. if (anchor_flag) {
  519. uni.showToast({
  520. title: '请正确填写工作时间设置!工作时间对应工作人员必填!',
  521. icon: 'none'
  522. });
  523. return
  524. }
  525. let rule_id = false;
  526. let old_time_arr = [];
  527. if (this.editInfo && this.editInfo.length != 0) {
  528. this.editInfo.anchor&&this.editInfo.anchor.forEach((item) => {
  529. old_time_arr.push(item.time.complete_start_time + ' ~ ' + item.time.complete_end_time)
  530. })
  531. this.editInfo.normal&&this.editInfo.normal.forEach((item) => {
  532. old_time_arr.push(item.time.complete_start_time + ' ~ ' + item.time.complete_end_time)
  533. })
  534. }
  535. let now_time_arr = []
  536. worker_arr.forEach((item) => {
  537. now_time_arr.push(item.begin_time + ' ~ ' + item.finish_time)
  538. })
  539. if (JSON.stringify(old_time_arr) == JSON.stringify(now_time_arr)) {
  540. rule_id = true
  541. }
  542. var params = {
  543. start_time: this.startLiveTime.date + ' ' + this.startLiveTime.time,
  544. end_time: this.endLiveTime.date + ' ' + this.endLiveTime.time,
  545. company_id: uni.getStorageSync('userInfo').info.company_id,
  546. sellerId: this.accountInfo.seller_id,
  547. plat_type: this.accountInfo.platform,
  548. staff_info: JSON.stringify(worker_arr),
  549. rule_id: rule_id ? (this.editInfo.rule_id ? this.editInfo.rule_id : 0) : 0,
  550. id: this.editInfo.plan_id
  551. }
  552. uni.showLoading({
  553. title: '加载中'
  554. });
  555. this.$req(this.$api.livePlan_edit, 'post', params, (res) => {
  556. uni.hideLoading()
  557. if (res && res.errno == 0) {
  558. uni.showToast({
  559. title: '编辑成功!',
  560. icon: 'none'
  561. });
  562. this.goBack('load')
  563. } else if (res.errno != 4002) {
  564. uni.showToast({
  565. title: res.err,
  566. icon: 'none'
  567. });
  568. }
  569. }, (err) => {
  570. uni.hideLoading()
  571. })
  572. },
  573. deleteFlagEvent() { //删除计划
  574. uni.showModal({
  575. title: '提示',
  576. content: '确定要删除该直播计划?',
  577. confirmText: '确定',
  578. success: (res) => {
  579. if (res.confirm) {
  580. uni.showLoading({
  581. title: '加载中'
  582. });
  583. this.$req(this.$api.plan_livePlanDestroyV2, 'post', {
  584. seller_id: this.accountInfo.seller_id,
  585. plat_type: this.accountInfo.platform,
  586. date: this.date
  587. }, (res) => {
  588. uni.hideLoading()
  589. if (res && res.errno == 0) {
  590. uni.showToast({
  591. title: '删除成功!',
  592. icon: 'none'
  593. });
  594. this.goBack('load')
  595. } else if (res.errno != 4002) {
  596. uni.showToast({
  597. title: res.err,
  598. icon: 'none'
  599. });
  600. }
  601. }, (err) => {
  602. uni.hideLoading()
  603. })
  604. } else if (res.cancel) {}
  605. }
  606. })
  607. },
  608. goBack(type) {
  609. if (type == 'load') {
  610. let pages = getCurrentPages(); // 当前页面
  611. let beforePage = pages[pages.length - 2]; // 前一个页面
  612. uni.navigateBack({
  613. success: function() {
  614. beforePage.onLoad(); // 执行前一个页面的onLoad方法
  615. },
  616. });
  617. } else {
  618. uni.navigateBack()
  619. }
  620. }
  621. }
  622. }
  623. </script>
  624. <style scoped lang="scss">
  625. .accountBox {
  626. background: #FFFFFF;
  627. display: flex;
  628. align-items: center;
  629. padding: 32rpx 28rpx 20rpx;
  630. border-bottom: 2rpx solid #E8E8E8;
  631. .text {
  632. color: #303239;
  633. font-size: 32rpx;
  634. line-height: 44rpx;
  635. font-weight: bold;
  636. }
  637. .accountImg {
  638. margin-left: 36rpx;
  639. height: 70rpx;
  640. width: 70rpx;
  641. border-radius: 50%;
  642. margin-right: 18rpx;
  643. }
  644. .accountName {
  645. color: #303239;
  646. font-size: 32rpx;
  647. line-height: 44rpx;
  648. }
  649. }
  650. .liveTimeBox {
  651. padding: 20rpx 28rpx;
  652. background: #FFFFFF;
  653. display: flex;
  654. align-items: center;
  655. .itmeIconFont {
  656. font-size: 34rpx;
  657. color: #979797;
  658. width: 80rpx;
  659. }
  660. .liveTimeImg {
  661. width: 20rpx;
  662. margin-left: -40rpx;
  663. margin-right: 40rpx;
  664. }
  665. .liveStartTimeBox {
  666. flex: 1;
  667. .time {
  668. color: #000000;
  669. font-size: 32rpx;
  670. line-height: 44rpx;
  671. font-weight: bold;
  672. }
  673. .date {
  674. color: #34383A;
  675. font-size: 32rpx;
  676. line-height: 44rpx;
  677. margin-top: 4rpx;
  678. }
  679. }
  680. }
  681. .errTime{
  682. .liveStartTimeBox{
  683. .time,.date{
  684. color: red;
  685. }
  686. }
  687. }
  688. .no_worder {
  689. color: #9FA3AB;
  690. font-size: 28rpx;
  691. line-height: 40rpx;
  692. flex: 1
  693. }
  694. .workerBox {
  695. background: #FFFFFF;
  696. margin-top: 16rpx;
  697. .wirkerTitle {
  698. padding: 20rpx 28rpx;
  699. display: flex;
  700. align-items: center;
  701. justify-content: space-between;
  702. .title {
  703. color: #303239;
  704. font-size: 32rpx;
  705. line-height: 44rpx;
  706. }
  707. .iconfont {
  708. color: #646E8E;
  709. font-size: 32rpx;
  710. }
  711. }
  712. .liveTimeBox {
  713. border-top: 2rpx solid #E8E8E8;
  714. }
  715. .worderSelectBox {
  716. margin-left: 108rpx;
  717. width: calc(100vw - 140rpx);
  718. display: flex;
  719. align-items: center;
  720. justify-content: space-between;
  721. border-top: 2rpx solid #E8E8E8;
  722. padding: 14rpx 0 26rpx;
  723. .worder {
  724. font-size: 28rpx;
  725. line-height: 40rpx;
  726. font-weight: 500;
  727. color: #447CFD;
  728. }
  729. .iconfont {
  730. color: #616161;
  731. font-size: 14rpx;
  732. }
  733. }
  734. }
  735. .buttons {
  736. display: flex;
  737. align-items: center;
  738. justify-content: center;
  739. background: #FFFFFF;
  740. padding: 90rpx 0;
  741. margin-top: 15rpx;
  742. .button {
  743. width: 156rpx;
  744. height: 70rpx;
  745. border-radius: 8rpx;
  746. border: 2rpx solid #979797;
  747. color: #747474;
  748. font-size: 28rpx;
  749. line-height: 66rpx;
  750. text-align: center;
  751. margin: 0 22rpx;
  752. }
  753. .button2 {
  754. background: #5B80F4;
  755. border-color: #5B80F4;
  756. color: #FFFFFF;
  757. }
  758. .button3 {
  759. background: #E7605A;
  760. border-color: #E7605A;
  761. color: #FFFFFF;
  762. }
  763. }
  764. .worker_mask {
  765. width: 100%;
  766. height: 100vh;
  767. background: rgba(0, 0, 0, 0.5);
  768. position: fixed;
  769. bottom: 0;
  770. left: 0;
  771. z-index: 3;
  772. .worker_mask_container {
  773. position: absolute;
  774. left: 0;
  775. bottom: 0;
  776. background: #FFFFFF;
  777. width: 100%;
  778. height: 700rpx;
  779. border-top-left-radius: 38rpx;
  780. border-top-right-radius: 38rpx;
  781. .operationBox {
  782. display: flex;
  783. align-items: center;
  784. justify-content: space-between;
  785. padding: 36rpx;
  786. border-bottom: 2rpx solid #E8E8E8;
  787. .cancel,
  788. .define {
  789. font-size: 28rpx;
  790. line-height: 40rpx;
  791. }
  792. .cancel {
  793. color: #747474;
  794. }
  795. .define {
  796. color: #1F2126;
  797. }
  798. }
  799. .checkboxGroup {
  800. height: 570rpx;
  801. overflow-y: auto;
  802. }
  803. .list_cell {
  804. display: flex;
  805. align-items: center;
  806. font-size: 28rpx;
  807. color: #555555;
  808. padding: 30rpx 0 30rpx 20rpx;
  809. border-bottom: 2rpx solid #E8E8E8;
  810. width: 25%;
  811. box-sizing: border-box;
  812. }
  813. }
  814. }
  815. </style>