editor.vue 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820
  1. <template>
  2. <view class="padding">
  3. <view class="text-white padding bg radius">
  4. <u-form :model="form" ref="uForm" label-position="top" :label-style='lableStyle'>
  5. <u-form-item label="标题">
  6. <u-input v-model="form.myLevel" placeholder="请填写标题内容" />
  7. </u-form-item>
  8. <u-form-item label="个人经验">
  9. <u-input v-model="form.orderLevel" placeholder="请填写(必填)" disabled="true" @click="JYshow = true" />
  10. </u-form-item>
  11. <u-form-item label="服务地区">
  12. <u-input v-model="form.region" disabled="true" placeholder="请填写" @click="bindOpen()" />
  13. </u-form-item>
  14. <u-form-item label="技能">
  15. <!-- <u-input v-model="form.game" disabled placeholder="可商议" @click="show = true" /> -->
  16. <view v-if="game == ''" @click="openJn(game)">
  17. 选择技能分类(多选)
  18. </view>
  19. <view v-else style="display: inline-flex;">
  20. <view v-for="(item,index) in game" @click="openJn(game)"
  21. style="background: #557EFD;margin-right: 15rpx;color: #FFFFFF;padding: 0rpx 15rpx;border-radius: 15rpx;">
  22. {{item.gameName?item.gameName:item}}
  23. </view>
  24. </view>
  25. </u-form-item>
  26. <u-form-item label="期望薪资(月薪)">
  27. <u-input v-model="form.money" type="number" placeholder="请填写(必填)" />
  28. </u-form-item>
  29. </u-form>
  30. </view>
  31. <view class="text-white padding bg radius margin-tb">
  32. <view>
  33. <view class="text-lg">特长描述</view>
  34. <view class="margin-tb-sm">
  35. <u-input v-model="form.describes" type="textarea" height="200" placeholde="请描述一下您的特长" maxlengt="200"
  36. :clearable="false" />
  37. </view>
  38. </view>
  39. <view>
  40. <view class="text-lg margin-top-sm">头像上传</view>
  41. <view class="flex" style="overflow: hidden;flex-direction: initial;">
  42. <view v-if="headImg.length">
  43. <view class="margin-top flex margin-right-sm">
  44. <view class="flex"
  45. style="width: 200rpx;height: 200rpx;margin-right: 10rpx;position: relative;"
  46. v-for="(image,index) in headImg" :key="index">
  47. <image :src="image" style="width: 100%;height: 100%;"></image>
  48. <view style="z-index: 9;position: absolute;top: -15rpx;right: -15rpx;"
  49. @click="headImgremove(index)">
  50. <u-icon name="close-circle-fill" color="#2979ff" size="50rpx"></u-icon>
  51. </view>
  52. </view>
  53. </view>
  54. </view>
  55. <view class="margin-top" @click="addImage(1)" v-if="headImg.length<=0">
  56. <view style="width: 200rpx;height: 200rpx;background: #f4f5f6;"
  57. class="flex justify-center align-center">
  58. <view>
  59. <view class="text-center">
  60. <image src="../../static/images/my/add.png" style="width: 65rpx;height: 55rpx;">
  61. </image>
  62. </view>
  63. <view class="text-center">添加图片</view>
  64. </view>
  65. </view>
  66. </view>
  67. </view>
  68. </view>
  69. <view>
  70. <view class="text-lg margin-top-sm">持有资质证书 (可多张)</view>
  71. <view class="flex" style="overflow: hidden;flex-wrap: wrap;">
  72. <view v-if="certificateImg.length">
  73. <view class="margin-top flex margin-right-sm flex-wrap">
  74. <view class="flex"
  75. style="width: 200rpx;height: 200rpx;margin-right: 2rpx;position: relative;"
  76. v-for="(image,index) in certificateImg" :key="index">
  77. <image :src="image" style="width: 100%;height: 100%;"></image>
  78. <view style="z-index: 9;position: absolute;top: -15rpx;right: -15rpx;"
  79. @click="removeImg(index)">
  80. <u-icon name="close-circle-fill" color="#2979ff" size="50rpx"></u-icon>
  81. </view>
  82. </view>
  83. </view>
  84. </view>
  85. <view class="margin-top" @click="addImages(2)" v-if="certificateImg.length<=2">
  86. <view style="width: 200rpx;height: 200rpx;background: #f4f5f6;"
  87. class="flex justify-center align-center">
  88. <view>
  89. <view class="text-center">
  90. <image src="../../static/images/my/add.png" style="width: 65rpx;height: 55rpx;">
  91. </image>
  92. </view>
  93. <view class="text-center">添加图片</view>
  94. </view>
  95. </view>
  96. </view>
  97. </view>
  98. </view>
  99. <view>
  100. <view class="text-lg margin-top-sm">工作照片 (可多张)</view>
  101. <view class="flex" style="overflow: hidden;flex-wrap: wrap;">
  102. <view v-if="workImg.length">
  103. <view class="margin-top flex margin-right-sm flex-wrap">
  104. <view class="flex"
  105. style="width: 200rpx;height: 200rpx;margin-right: 2rpx;position: relative;"
  106. v-for="(image,index) in workImg" :key="index">
  107. <image :src="image" style="width: 100%;height: 100%;"></image>
  108. <view style="z-index: 9;position: absolute;top: -15rpx;right: -15rpx;"
  109. @click="workImgremove(index)">
  110. <u-icon name="close-circle-fill" color="#2979ff" size="50rpx"></u-icon>
  111. </view>
  112. </view>
  113. </view>
  114. </view>
  115. <view class="margin-top" @click="addImages(3)" v-if="workImg.length<=2">
  116. <view style="width: 200rpx;height: 200rpx;background: #f4f5f6;"
  117. class="flex justify-center align-center">
  118. <view>
  119. <view class="text-center">
  120. <image src="../../static/images/my/add.png" style="width: 65rpx;height: 55rpx;">
  121. </image>
  122. </view>
  123. <view class="text-center">添加图片</view>
  124. </view>
  125. </view>
  126. </view>
  127. </view>
  128. </view>
  129. <view>
  130. <view class="text-lg margin-top">服务详情图(最多6张)</view>
  131. <view class="flex" style="overflow: hidden;flex-wrap: wrap;">
  132. <view v-if="detailsImg.length">
  133. <view class="margin-top flex margin-right-sm flex-wrap">
  134. <view class="flex"
  135. style="width: 200rpx;height: 200rpx;margin-right: 5rpx;position: relative;"
  136. v-for="(image,index) in detailsImg" :key="index">
  137. <image :src="image" style="width: 100%;height: 100%;"></image>
  138. <view style="z-index: 9;position: absolute;top: -15rpx;right: -15rpx;"
  139. @click="removeImgdetail(index)">
  140. <u-icon name="close-circle-fill" color="#2979ff" size="50rpx"></u-icon>
  141. </view>
  142. </view>
  143. </view>
  144. </view>
  145. <view class="margin-top" @click="addImages(4)" v-if="detailsImg.length<=5">
  146. <view style="width: 200rpx;height: 200rpx;background: #f4f5f6;"
  147. class="flex justify-center align-center">
  148. <view>
  149. <view class="text-center">
  150. <image src="../../static/images/my/add.png" style="width: 65rpx;height: 55rpx;">
  151. </image>
  152. </view>
  153. <view class="text-center">选择图片</view>
  154. </view>
  155. </view>
  156. </view>
  157. </view>
  158. </view>
  159. </view>
  160. <!-- 经验筛选 -->
  161. <u-select v-model="JYshow" :list="list" @confirm="Getjy"></u-select>
  162. <!-- 地区选择 -->
  163. <u-picker v-model="Dqshow" mode="region" @confirm="bindRegion"></u-picker>
  164. <u-popup v-model="show" mode="bottom" border-radius="14" :closeable="true">
  165. <view class="fl_pop">
  166. <view class="flex flex-wrap" style="padding: 100rpx 60rpx;margin-bottom: 50rpx;">
  167. <view v-for="(item,index) in gameList" :key="index" class="flex margin-right-sm"
  168. @click="bindList(index,item)">
  169. <text class="tabBox margin-top-xs"
  170. :class="item.ischeck==true?'btnnum':''">{{item.gameName}}</text>
  171. </view>
  172. <u-button @click="bindGame()" :custom-style="customStyle1">确定</u-button>
  173. </view>
  174. </view>
  175. </u-popup>
  176. <u-button v-if="id" @click="update" class="margin-top" :custom-style="customStyle" shape="square"
  177. :hair-line="false">提交发布</u-button>
  178. <u-button v-else @click="submit" class="margin-top" :custom-style="customStyle" shape="square"
  179. :hair-line="false">提交发布</u-button>
  180. <!-- <u-action-sheet :list="actionSheetList" v-model="actionSheetShow" @click="actionSheetCallback"></u-action-sheet> -->
  181. </view>
  182. </template>
  183. <script>
  184. import configdata from '@/common/config.js';
  185. import jsfunRecord from '../components/jc-record/jc-record.vue'
  186. export default {
  187. components: {
  188. jsfunRecord
  189. },
  190. data() {
  191. return {
  192. form: {
  193. authentication: 1,
  194. game: '',
  195. gameId: '',
  196. money: '',
  197. //头像上传
  198. headImg: [],
  199. //资质证书
  200. certificateImg: [],
  201. //工作照片
  202. workImg: [],
  203. city: '',
  204. id: 0,
  205. unit: '小时',
  206. myLevel: '',
  207. //地区
  208. region: '',
  209. describes: '',
  210. detailsImg: '',
  211. orderLevel: ''
  212. },
  213. disabled: false,
  214. jiedanList: [{
  215. name: '小时',
  216. checked: true,
  217. disabled: 1
  218. }, {
  219. name: '天',
  220. checked: false,
  221. disabled: 2
  222. }],
  223. lableStyle: {
  224. // color: '#FFFFFF',
  225. fontSize: '32rpx'
  226. },
  227. customStyle: {
  228. backgroundColor: '#005DFF',
  229. color: '#FFFFFF',
  230. border: 0
  231. },
  232. status: 1,
  233. customStyle1: {
  234. color: '#FFFFFF',
  235. position: "fixed",
  236. bottom: "15rpx",
  237. left: "0rpx",
  238. right: "0rpx",
  239. margin: "0rpx 50rpx",
  240. backgroundColor: '#005DFF',
  241. },
  242. selarr: [],
  243. show: false,
  244. gameList: [],
  245. listgame: '',
  246. game: '',
  247. checked: false,
  248. disabled: false,
  249. number: 0,
  250. homepageImg: '',
  251. id: '',
  252. Imgo: [],
  253. //地区选择
  254. Dqshow: false,
  255. //头像上传
  256. headImg: [],
  257. //资质证书
  258. certificateImg: [],
  259. //工作照片
  260. workImg: [],
  261. detailsImg: [],
  262. region: '',
  263. count: 0,
  264. JYshow: false,
  265. list: [{
  266. value: '1',
  267. label: '无经验'
  268. }, {
  269. value: '2',
  270. label: '1年以下经验'
  271. }, {
  272. value: '3',
  273. label: '1-3年经验'
  274. }, {
  275. value: '4',
  276. label: '3-5年经验'
  277. },
  278. {
  279. value: '5',
  280. label: '5-8年经验'
  281. }, {
  282. value: '6',
  283. label: '8年以上经验'
  284. }
  285. ],
  286. }
  287. },
  288. onLoad(option) {
  289. this.id = option.id
  290. this.form.id = option.id
  291. this.form.city = uni.getStorageSync('city')
  292. this.form.latitude = uni.getStorageSync('latitude')
  293. this.form.longitude = uni.getStorageSync('longitude')
  294. this.getData(this.id)
  295. this.getGameList()
  296. },
  297. onShow() {
  298. },
  299. methods: {
  300. //经验筛选
  301. Getjy(e) {
  302. console.log(e);
  303. this.form.orderLevel = e[0].label
  304. },
  305. // 详情图删除
  306. headImgremove(index) {
  307. this.headImg.splice(index, 1)
  308. },
  309. // 详情图删除
  310. removeImg(index) {
  311. this.detailsImg.splice(index, 1)
  312. },
  313. removeImg(index) {
  314. // console.log(index,'111111111',this.form.headImg)
  315. this.certificateImg.splice(index, 1)
  316. },
  317. workImgremove(index) {
  318. this.workImg.splice(index, 1)
  319. },
  320. removeImgdetail(index){
  321. this.detailsImg.splice(index, 1)
  322. },
  323. // 技能列表
  324. bindList(index, item) {
  325. console.log(index)
  326. if (this.selarr.length > 1 && item.ischeck == false) {
  327. uni.showToast({
  328. title: '最多选择2个技能',
  329. icon: 'none'
  330. })
  331. return
  332. }
  333. if (item.ischeck == false) {
  334. item.ischeck = true;
  335. this.selarr.push(item)
  336. } else {
  337. item.ischeck = false;
  338. let index11 = this.selarr.indexOf(index)
  339. this.selarr.splice(index11, 1)
  340. }
  341. this.selarr = this.selarr;
  342. },
  343. openJn(item) {
  344. console.log(item)
  345. this.show = true
  346. // item.ischeck = true
  347. },
  348. //地区选择
  349. bindOpen() {
  350. this.Dqshow = true
  351. },
  352. bindRegion(e) {
  353. console.log(e)
  354. this.region = e.province.label + e.city.label + e.area.label
  355. this.form.region = e.province.label + ',' + e.city.label + ',' + e.area.label
  356. },
  357. // 选中提交
  358. bindGame() {
  359. this.game = this.selarr
  360. let gameId = "";
  361. for (var game in this.selarr) {
  362. gameId = gameId + "," + this.selarr[game].gameName
  363. }
  364. gameId = gameId.substring(1, gameId.length);
  365. this.form.gameId = gameId
  366. this.show = false
  367. },
  368. jiedanChange(e) {
  369. this.form.unit = e;
  370. },
  371. select(e) {
  372. this.status = e
  373. },
  374. endChange(e) {
  375. if (this.startHour >= e.hour) {
  376. uni.showToast({
  377. title: '结束时间必须大于开始时间一个小时以上',
  378. icon: "none"
  379. })
  380. return
  381. }
  382. this.endTime = e.hour + ':' + e.minute
  383. this.form.orderTakingTime = this.startTime + '~' + this.endTime
  384. },
  385. // 图片上传
  386. addImages(e) {
  387. let that = this
  388. uni.chooseImage({
  389. count: 6,
  390. sourceType: ['album', 'camera'],
  391. success: res => {
  392. for (let i = 0; i < res.tempFilePaths.length; i++) {
  393. that.$queue.showLoading("上传中...");
  394. uni.uploadFile({ // 上传接口
  395. url: that.config("APIHOST1") + '/alioss/upload', //真实的接口地址
  396. filePath: res.tempFilePaths[i],
  397. name: 'file',
  398. success: (uploadFileRes) => {
  399. if (e == 1) {
  400. // that.form.homepageImg = JSON.parse(uploadFileRes.data).data
  401. that.headImg.push(JSON.parse(uploadFileRes.data).data)
  402. } else if (e == 2) {
  403. if (that.certificateImg.length <= 5) {
  404. that.certificateImg.push(JSON.parse(uploadFileRes.data)
  405. .data)
  406. }
  407. } else if (e == 3) {
  408. if (that.workImg.length <= 5) {
  409. that.workImg.push(JSON.parse(uploadFileRes.data).data)
  410. }
  411. } else if (e == 4) {
  412. if (that.detailsImg.length <= 5) {
  413. that.detailsImg.push(JSON.parse(uploadFileRes.data)
  414. .data)
  415. }
  416. }
  417. uni.hideLoading();
  418. }
  419. });
  420. }
  421. }
  422. })
  423. },
  424. addImage(e) {
  425. let that = this
  426. uni.chooseImage({
  427. count: 1,
  428. sourceType: ['album', 'camera'],
  429. success: res => {
  430. for (let i = 0; i < res.tempFilePaths.length; i++) {
  431. that.$queue.showLoading("上传中...");
  432. uni.uploadFile({ // 上传接口
  433. url: that.config("APIHOST1") + '/alioss/upload', //真实的接口地址
  434. filePath: res.tempFilePaths[i],
  435. name: 'file',
  436. success: (uploadFileRes) => {
  437. if (e == 1) {
  438. // that.form.homepageImg = JSON.parse(uploadFileRes.data).data
  439. that.headImg.push(JSON.parse(uploadFileRes.data).data)
  440. }
  441. uni.hideLoading();
  442. }
  443. });
  444. }
  445. }
  446. })
  447. },
  448. config: function(name) {
  449. var info = null;
  450. if (name) {
  451. var name2 = name.split("."); //字符分割
  452. if (name2.length > 1) {
  453. info = configdata[name2[0]][name2[1]] || null;
  454. } else {
  455. info = configdata[name] || null;
  456. }
  457. if (info == null) {
  458. let web_config = cache.get("web_config");
  459. if (web_config) {
  460. if (name2.length > 1) {
  461. info = web_config[name2[0]][name2[1]] || null;
  462. } else {
  463. info = web_config[name] || null;
  464. }
  465. }
  466. }
  467. }
  468. return info;
  469. },
  470. // 发布
  471. submit() {
  472. this.form.headImg = this.headImg
  473. this.form.headImg = this.form.headImg.toString();
  474. this.form.certificateImg = this.certificateImg
  475. this.form.certificateImg = this.form.certificateImg.toString();
  476. this.form.workImg = this.workImg
  477. this.form.workImg = this.form.workImg.toString();
  478. this.form.detailsImg = this.detailsImg
  479. this.form.detailsImg = this.form.detailsImg.toString();
  480. if (!this.form.myLevel) {
  481. uni.showToast({
  482. title: '请填写发布标题',
  483. icon: 'none',
  484. duration: 1000
  485. })
  486. return
  487. }
  488. if (!this.form.orderLevel) {
  489. uni.showToast({
  490. title: '请填写经验',
  491. icon: 'none',
  492. duration: 1000
  493. })
  494. return
  495. }
  496. // if (!this.region) {
  497. // uni.showToast({
  498. // title: '请选择服务地区',
  499. // icon: 'none',
  500. // duration: 1000
  501. // })
  502. // return
  503. // }
  504. if (this.game == '') {
  505. uni.showToast({
  506. title: '请选择发布分类',
  507. icon: 'none',
  508. duration: 1000
  509. })
  510. return
  511. }
  512. if (!this.form.money) {
  513. uni.showToast({
  514. title: '请填写期望薪资',
  515. icon: 'none',
  516. duration: 1000
  517. })
  518. return
  519. }
  520. if (!this.form.describes) {
  521. uni.showToast({
  522. title: '请填写特长描述',
  523. icon: 'none',
  524. duration: 1000
  525. })
  526. return
  527. }
  528. if (!this.form.headImg) {
  529. uni.showToast({
  530. title: '请上传头像',
  531. icon: 'none',
  532. duration: 1000
  533. })
  534. return
  535. }
  536. if (!this.form.certificateImg) {
  537. uni.showToast({
  538. title: '请上传资质证书',
  539. icon: 'none',
  540. duration: 1000
  541. })
  542. return
  543. }
  544. if (!this.form.workImg) {
  545. uni.showToast({
  546. title: '请上传工作照片',
  547. icon: 'none',
  548. duration: 1000
  549. })
  550. return
  551. }
  552. if (!this.form.detailsImg) {
  553. uni.showToast({
  554. title: '请上传服务详情图',
  555. icon: 'none',
  556. duration: 1000
  557. })
  558. return
  559. }
  560. console.log(this.form)
  561. this.form.id = ''
  562. this.$Request.get("/app/orderTaking/insertOrderTaking", this.form).then(res => {
  563. if (res.code == 0) {
  564. uni.showToast({
  565. title: res.msg,
  566. icon: 'none'
  567. })
  568. setTimeout(function() {
  569. // uni.navigateBack()
  570. uni.navigateTo({
  571. url: '/my/publish/index'
  572. })
  573. }, 1000)
  574. } else {
  575. uni.showToast({
  576. title: res.msg,
  577. icon: 'none'
  578. })
  579. }
  580. });
  581. },
  582. // 重新编辑
  583. update() {
  584. this.form.headImg = this.headImg
  585. this.form.headImg = this.form.headImg.toString();
  586. this.form.certificateImg = this.certificateImg
  587. this.form.certificateImg = this.form.certificateImg.toString();
  588. this.form.workImg = this.workImg
  589. this.form.workImg = this.form.workImg.toString();
  590. this.form.detailsImg = this.detailsImg
  591. this.form.detailsImg = this.form.detailsImg.toString();
  592. if (!this.form.myLevel) {
  593. uni.showToast({
  594. title: '请填写发布标题',
  595. icon: 'none',
  596. duration: 1000
  597. })
  598. return
  599. }
  600. if (!this.form.orderLevel) {
  601. uni.showToast({
  602. title: '请填写经验',
  603. icon: 'none',
  604. duration: 1000
  605. })
  606. return
  607. }
  608. // if (!this.region) {
  609. // uni.showToast({
  610. // title: '请选择服务地区',
  611. // icon: 'none',
  612. // duration: 1000
  613. // })
  614. // return
  615. // }
  616. if (this.game == '') {
  617. uni.showToast({
  618. title: '请选择发布分类',
  619. icon: 'none',
  620. duration: 1000
  621. })
  622. return
  623. }
  624. if (!this.form.money) {
  625. uni.showToast({
  626. title: '请填写期望薪资',
  627. icon: 'none',
  628. duration: 1000
  629. })
  630. return
  631. }
  632. if (!this.form.describes) {
  633. uni.showToast({
  634. title: '请填写特长描述',
  635. icon: 'none',
  636. duration: 1000
  637. })
  638. return
  639. }
  640. if (!this.form.headImg) {
  641. uni.showToast({
  642. title: '请上传头像',
  643. icon: 'none',
  644. duration: 1000
  645. })
  646. return
  647. }
  648. if (!this.form.certificateImg) {
  649. uni.showToast({
  650. title: '请上传资质证书',
  651. icon: 'none',
  652. duration: 1000
  653. })
  654. return
  655. }
  656. if (!this.form.workImg) {
  657. uni.showToast({
  658. title: '请上传工作照片',
  659. icon: 'none',
  660. duration: 1000
  661. })
  662. return
  663. }
  664. if (!this.form.detailsImg) {
  665. uni.showToast({
  666. title: '请上传服务详情图',
  667. icon: 'none',
  668. duration: 1000
  669. })
  670. return
  671. }
  672. this.$Request.get("/app/orderTaking/updateTakingOrder", this.form).then(res => {
  673. if (res.code == 0) {
  674. uni.showToast({
  675. title: '编辑成功',
  676. icon: 'none'
  677. })
  678. setTimeout(function() {
  679. // uni.navigateBack()
  680. uni.navigateTo({
  681. url: '/my/publish/index'
  682. })
  683. }, 1000)
  684. }
  685. });
  686. },
  687. // 获取游戏列表
  688. getGameList() {
  689. this.$Request.get("/app/appGame/queryGameName").then(res => {
  690. if (res.code == 0) {
  691. res.data.forEach(res => {
  692. res.label = res.gameName
  693. res.value = res.id
  694. res.ischeck = false
  695. })
  696. if (this.id) {
  697. for (var i = 0; i < res.data.length; i++) {
  698. for (var a = 0; a < this.game.length; a++) {
  699. if (res.data[i].gameName == this.game[a]) {
  700. res.data[i].ischeck = true
  701. }
  702. }
  703. }
  704. }
  705. this.gameList = res.data
  706. console.log(this.gameList)
  707. }
  708. });
  709. },
  710. getData(e) {
  711. let data = {
  712. id: e
  713. }
  714. this.$Request.get("/app/orderTaking/queryTakingOrder", data).then(res => {
  715. if (res.code == 0) {
  716. this.game = res.data.gameId.split(',')
  717. this.form.gameId = res.data.gameId
  718. this.form.myLevel = res.data.myLevel
  719. this.form.region = res.data.region
  720. this.form.money = res.data.oldMoney
  721. this.form.describes = res.data.describes
  722. this.form.headImg = res.data.headImg ? res.data.headImg : ''
  723. this.headImg = res.data.headImg.split(',') ? res.data.headImg.split(',') : ''
  724. this.form.certificateImg = res.data.certificateImg ? res.data.certificateImg : ''
  725. this.certificateImg = res.data.certificateImg.split(',') ? res.data.certificateImg.split(
  726. ',') : ''
  727. this.workImg = res.data.workImg.split(',') ? res.data.workImg.split(',') : ''
  728. this.form.workImg = res.data.workImg ? res.data.workImg : ''
  729. this.detailsImg = res.data.detailsImg.split(',') ? res.data.detailsImg.split(',') : ''
  730. this.form.detailsImg = res.data.detailsImg ? res.data.detailsImg : ''
  731. this.form.authentication = res.data.authentication
  732. this.form.orderLevel = res.data.orderLevel
  733. this.region = res.data.region
  734. }
  735. });
  736. },
  737. // 清除录音
  738. clearAudio() {
  739. this.status = 1
  740. this.recordLength = 0
  741. this.form.voiceIntroduce = ''
  742. },
  743. }
  744. }
  745. </script>
  746. <style>
  747. page {
  748. background-color: #F5F5F5;
  749. }
  750. .bg {
  751. background-color: #FFFFFF;
  752. }
  753. .tabBox {
  754. border: 1rpx solid #999999;
  755. padding: 15rpx 20rpx;
  756. border-radius: 15rpx;
  757. font-size: 28rpx;
  758. }
  759. .btnnum {
  760. color: #005DFF;
  761. border: 1rpx solid #005DFF;
  762. }
  763. </style>