shopdetail.vue 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825
  1. <template>
  2. <view class="shopdetail">
  3. <Header :title="title"></Header>
  4. <view class="" style="height: 94upx;"></view>
  5. <view class="shopdetail-content">
  6. <!-- 所属店铺 -->
  7. <view class="shop detail-list">
  8. <view class="menu">
  9. <view class="uni-list-cell">
  10. <view class="uni-list-cell-db">
  11. <picker
  12. class="selectlist"
  13. mode="selector"
  14. @change="changeStore"
  15. :value="storeIndex"
  16. :range="storeList"
  17. range-key="name"
  18. >
  19. <view class="uni-input title">{{
  20. storeList[storeIndex].name
  21. }}</view>
  22. </picker>
  23. <image
  24. src="../../static/images/moreicon.png"
  25. class="more"
  26. ></image>
  27. </view>
  28. </view>
  29. </view>
  30. </view>
  31. <!-- 商品类型 -->
  32. <view class="shoptype detail-list noborder">
  33. <view class="menu">
  34. <view class="uni-list-cell">
  35. <view class="uni-list-cell-db">
  36. <picker
  37. @change="changeType"
  38. :value="typeIndex"
  39. :range="typeList"
  40. range-key="name"
  41. class="selectlist"
  42. >
  43. <view class="uni-input title">{{
  44. typeList[typeIndex].name
  45. }}</view>
  46. </picker>
  47. <image
  48. src="../../static/images/moreicon.png"
  49. class="more"
  50. ></image>
  51. </view>
  52. </view>
  53. </view>
  54. </view>
  55. <!-- 商品名称 -->
  56. <view class="shopname detail-list">
  57. <view class="menu" v-if="hasNameList === 1">
  58. <view class="uni-list-cell">
  59. <view class="uni-list-cell-db">
  60. <picker
  61. @change="changeShop"
  62. :value="shopIndex"
  63. :range="shopList"
  64. range-key="name"
  65. class="selectlist"
  66. >
  67. <view class="uni-input title">{{
  68. shopList[shopIndex].name
  69. }}</view>
  70. </picker>
  71. <image
  72. src="../../static/images/moreicon.png"
  73. class="more"
  74. ></image>
  75. </view>
  76. </view>
  77. </view>
  78. <view class="menu" v-if="hasNameList === 0">
  79. <input
  80. class="input-shopname"
  81. type="text"
  82. v-model="shopname"
  83. placeholder-style="color:#a2a8a8;font-size:30upx"
  84. placeholder="请输入商品名称"
  85. />
  86. </view>
  87. </view>
  88. <!-- 自定义分类 -->
  89. <view class="classify detail-list noborder">
  90. <view class="menu">
  91. <view class="title bigtitle">自定义分类</view>
  92. <view class="txt" @tap="toClassify">管理分类</view>
  93. </view>
  94. </view>
  95. <!-- 西线推荐 -->
  96. <view class="xiline detail-list noborder">
  97. <view class="menu">
  98. <view class="uni-list-cell">
  99. <view class="uni-list-cell-db">
  100. <picker
  101. @change="changeClassify"
  102. :value="lineIndex"
  103. :range="lineList"
  104. range-key="name"
  105. class="selectlist"
  106. >
  107. <view class="uni-input title">{{
  108. lineList[lineIndex].name
  109. }}</view>
  110. </picker>
  111. <image
  112. src="../../static/images/moreicon.png"
  113. class="more"
  114. ></image>
  115. </view>
  116. </view>
  117. </view>
  118. </view>
  119. <!-- 账号限制 -->
  120. <view class="idastrict detail-list noborder">
  121. <view class="menu">
  122. <view class="title astricttitle">账号限制</view>
  123. <switch :checked="showoperat" @change="Change" />
  124. </view>
  125. </view>
  126. <!-- 账号限制 -->
  127. <view class="detail-list noborder operat" v-if="showoperat">
  128. <view class="menu">
  129. <view class="title">同一账号在</view>
  130. <view class="sub" @tap="subtractUser">-</view>
  131. <text class="num1">{{ num1 }}</text>
  132. <view class="add" @tap="addUser">+</view>
  133. <view class="txt">天内最多购买</view>
  134. <view class="sub" @tap="subtractDate">-</view
  135. ><text class="num2">{{ num2 }}</text
  136. ><view class="add" @tap="addDate">+</view><text class="unit">张</text>
  137. </view>
  138. </view>
  139. <!-- 商品图标 -->
  140. <view class="shopicon">商品图标</view>
  141. <view class="iconcontent">
  142. <image class="shopLogo" :src="iconurl" v-if="iconurl"></image>
  143. <text class="icon" @tap="uploadImg">点击上传</text>
  144. </view>
  145. <view class="shopicon">商品图册</view>
  146. <view class="uploading">
  147. <view class="item-warp" v-for="(item, index) in pickList" :key="index">
  148. <view class="img-warp">
  149. <image :src="item" class="item list"></image>
  150. <view class="delete">
  151. <image
  152. src="../../static/images/delete.png"
  153. class="delete-icon"
  154. @tap="deleteThisImg(index)"
  155. ></image>
  156. </view>
  157. </view>
  158. </view>
  159. <view class="item-warp">
  160. <image
  161. src="../../static/images/upload.png"
  162. class="item upload"
  163. @tap="uploadList"
  164. ></image>
  165. </view>
  166. </view>
  167. <!-- 购票须知 -->
  168. <view class="shopicon">商品描述(购票须知)</view>
  169. <view class="know">
  170. <view class="container">
  171. <editor
  172. id="editor"
  173. class="ql-container"
  174. :placeholder="placeholder"
  175. @input="saveTxt"
  176. @ready="onEditorReady"
  177. ></editor>
  178. </view>
  179. </view>
  180. <view class="btn" @tap="submitMesage">确认</view>
  181. <rf-loading v-if="loading"></rf-loading>
  182. </view>
  183. </view>
  184. </template>
  185. <script>
  186. let myCloud;
  187. import Header from '../components/header.vue';
  188. export default {
  189. components: {
  190. Header,
  191. },
  192. data() {
  193. return {
  194. loading: false,
  195. scenicId: uni.getStorageSync('scenicId'),
  196. title: '商品详情',
  197. num1: 1,
  198. num2: 10,
  199. showoperat: false,
  200. placeholder: '请输入内容...',
  201. mastKnow: '',
  202. storeList: [{ name: '所属店铺', id: '' }],
  203. storeIndex: 0,
  204. storeId: '',
  205. typeList: [{ name: '商品类型(请先选择所属店铺)', id: '' }],
  206. typeIndex: 0,
  207. typeId: '',
  208. shopList: [{ name: '商品名称(请先选择商品类型)', id: '' }],
  209. shopIndex: 0,
  210. shopId: '',
  211. shopname: '',
  212. hasNameList: 0, // 判断是否有商品名称列表
  213. lineList: [{ name: '分类(请先选择所属商品)', id: '' }],
  214. lineIndex: 0,
  215. lineId: '',
  216. // 图标上传
  217. iconurl: '',
  218. pickList: [],
  219. Icon: '',
  220. Imglist: [],
  221. // -------------- 编辑分界线 ------------------------------------
  222. SHOPID: 0,
  223. shopData: {},
  224. };
  225. },
  226. onUnload() {
  227. uni.removeStorageSync('Id');
  228. },
  229. onLoad() {
  230. // 初始化阿里云
  231. myCloud = uniCloud.init({
  232. provider: 'aliyun',
  233. spaceId: 'db8671a1-69bd-470d-ad59-ba927c88f4a4',
  234. clientSecret: '8nOzV70edtpCd0El6qce3g==',
  235. });
  236. this.getShopList();
  237. // ---------------------------------------------------
  238. this.SHOPID = uni.getStorageSync('Id');
  239. if (this.SHOPID) {
  240. this.getShopBuyId();
  241. }
  242. },
  243. methods: {
  244. // 获取单个商品信息
  245. async getShopBuyId() {
  246. if (!this.SHOPID) return;
  247. await this.$http
  248. .get('/goods/getById/' + this.SHOPID)
  249. .then(async (res) => {
  250. if (res.code === 200 && res.msg === 'OK') {
  251. console.log(res);
  252. this.shopData = res.data;
  253. this.getShopList()
  254. // 限制购票回显
  255. if (this.shopData.saleRule === '1') {
  256. let sale = JSON.parse(this.shopData.saleRuleJson);
  257. this.showoperat = true;
  258. this.num1 = sale.data.saleDay;
  259. this.num2 = sale.data.saleNum;
  260. } else {
  261. this.showoperat = false;
  262. }
  263. // 图标回显
  264. if (this.shopData.icon) {
  265. console.log('有图标');
  266. this.iconurl = this.shopData.icon;
  267. } else {
  268. this.iconurl = ''
  269. }
  270. }
  271. });
  272. },
  273. // 所属店铺怎么回显???
  274. // 初始化编辑器
  275. onEditorReady() {
  276. uni
  277. .createSelectorQuery()
  278. .select('#editor')
  279. .context((res) => {
  280. this.editorCtx = res.context;
  281. this.editorCtx.setContents({
  282. html: this.shopData.describ, //this.EditGoodsDetail.content为赋值内容。
  283. });
  284. })
  285. .exec();
  286. },
  287. // -----------------------------------------------------------------
  288. // 跳转到管理分类页面
  289. toClassify() {
  290. if (this.storeId) {
  291. uni.setStorageSync('shopid', this.storeId);
  292. this.$mRouter.push({ route: '/pages/shop/classify' });
  293. } else {
  294. this.$mHelper.toast('请选择所属店铺后再进行自定义分类管理');
  295. }
  296. },
  297. // 选择店铺
  298. changeStore(e) {
  299. this.storeIndex = e.detail.value;
  300. this.storeId = this.storeList[this.storeIndex].id;
  301. // 未选择商铺不能进行商铺类型选择
  302. if (this.storeId != '') {
  303. this.getType();
  304. this.getLine(); // 判断是否有商品名称列表
  305. }
  306. },
  307. // 选择商品类型
  308. changeType(e) {
  309. this.typeIndex = e.detail.value;
  310. this.typeId = this.typeList[this.typeIndex].id;
  311. if (this.typeId != '') {
  312. this.getShopName();
  313. }
  314. },
  315. // 商品名称选择
  316. changeShop(e) {
  317. this.shopIndex = e.detail.value;
  318. this.shopId = this.shopList[this.shopIndex].id;
  319. },
  320. // 分类
  321. changeClassify(e) {
  322. this.lineIndex = e.detail.value;
  323. this.lineId = this.lineList[this.lineIndex].id;
  324. },
  325. // 所属店铺
  326. async getShopList() {
  327. this.storeList = [{ name: '所属店铺', id: '' }];
  328. await this.$http
  329. .get('/shop/getList', {
  330. mid: this.scenicId,
  331. })
  332. .then(async (res) => {
  333. if (res.data) {
  334. let arr = [];
  335. res.data.forEach((element) => {
  336. arr.push({ name: element.name, id: element.id });
  337. });
  338. this.storeList = this.storeList.concat(arr);
  339. console.log(this.storeList);
  340. // 所属店铺回显
  341. if (this.shopData.shopId) {
  342. this.storeList.forEach((item, index) => {
  343. if (this.shopData.shopId === item.id) {
  344. this.storeIndex = index;
  345. }
  346. });
  347. this.storeId = this.storeList[this.storeIndex].id;
  348. // 商品类型回显
  349. this.getType();
  350. this.getLine();
  351. }
  352. }
  353. });
  354. },
  355. // 商品类型
  356. async getType() {
  357. this.typeList = [{ name: '商品类型(请先选择所属店铺)', id: '' }];
  358. this.$http
  359. .get('/type/getTypeListByShopId', {
  360. id: this.storeId,
  361. })
  362. .then((res) => {
  363. let arr = [];
  364. res.data[0].children.forEach((element) => {
  365. arr.push({ name: element.name, id: element.id });
  366. });
  367. this.typeList = this.typeList.concat(arr);
  368. // 商品类型回显
  369. if (this.shopData.typeId) {
  370. this.typeList.forEach((item, index) => {
  371. if (this.shopData.typeId === item.id) {
  372. this.typeIndex = index;
  373. }
  374. });
  375. this.typeId = this.typeList[this.typeIndex].id;
  376. this.shopname = this.shopData.name;
  377. }
  378. });
  379. },
  380. // 商品名称
  381. async getShopName() {
  382. this.shopList = [{ name: '商品名称(请先选择商品类型)', id: '' }];
  383. await this.$http
  384. .get('/goods/getTicketGoods', {
  385. typeId: this.typeId,
  386. shopId: this.storeId,
  387. })
  388. .then(async (res) => {
  389. let arr = [];
  390. res.data.forEach((element) => {
  391. arr.push({ name: element.ticket_name, id: element.ticket_no });
  392. });
  393. this.shopList = this.shopList.concat(arr);
  394. });
  395. },
  396. // 线路分配
  397. async getLine() {
  398. await this.$http
  399. .get('/goods/getCustomGroupList', {
  400. shopId: this.storeId,
  401. })
  402. .then(async (res) => {
  403. let arr = [];
  404. this.hasNameList = +res.data.shopFrom;
  405. res.data.customGroupList.forEach((element) => {
  406. arr.push({ name: element.name, id: element.id });
  407. });
  408. this.lineList = this.lineList.concat(arr);
  409. // 可选择商品名称回显
  410. if (this.shopData.name) {
  411. this.getShopName();
  412. this.shopList.forEach((item, index) => {
  413. if (this.shopData.name === item.name) {
  414. this.shopIndex = index;
  415. } else {
  416. this.shopIndex = 0;
  417. }
  418. });
  419. this.shopId = this.shopList[this.shopIndex].id;
  420. }
  421. // 分类回显
  422. if (this.shopData.customGroupId) {
  423. this.lineList.forEach((item, index) => {
  424. if (this.shopData.customGroupId === item.id) {
  425. this.lineIndex = index;
  426. }
  427. });
  428. this.lineId = this.lineList[this.lineIndex].id;
  429. }
  430. });
  431. },
  432. // 账号限制
  433. Change(e) {
  434. this.showoperat = e.detail.value;
  435. },
  436. subtractUser() {
  437. if (this.num1 <= 1) {
  438. this.$mHelper.toast('最少一天');
  439. return;
  440. } else {
  441. this.num1--;
  442. }
  443. },
  444. addUser() {
  445. this.num1++;
  446. },
  447. subtractDate() {
  448. if (this.num2 <= 1) {
  449. this.$mHelper.toast('最少一张票');
  450. return;
  451. } else {
  452. this.num2--;
  453. }
  454. },
  455. addDate() {
  456. this.num2++;
  457. },
  458. // 图标上传
  459. uploadImg() {
  460. let _self = this;
  461. uni.chooseImage({
  462. count: 1,
  463. sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
  464. sourceType: ['album'], // camera 使用相机 album 从相册中选
  465. success: function (res) {
  466. // 成功则返回图片的本地文件路径列表 tempFilePaths
  467. _self.iconurl = res.tempFilePaths[0];
  468. myCloud.uploadFile({
  469. url: 'http://192.168.100.135:83/merch/common/upload/oss',
  470. filePath: _self.iconurl, // 要上传的文件对象
  471. cloudPath: _self.iconurl,
  472. name: 'file',
  473. onUploadProgress: function (progressEvent) {
  474. // 上传进度回调
  475. let percentCompleted = Math.round(
  476. (progressEvent.loaded * 100) / progressEvent.total
  477. );
  478. },
  479. success: (res) => {
  480. if (res.fileID) {
  481. _self.Icon = res.fileID;
  482. }
  483. },
  484. });
  485. },
  486. });
  487. },
  488. // 图册上传
  489. uploadList() {
  490. let _self = this;
  491. uni.chooseImage({
  492. count: 6,
  493. sizeType: ['original', 'compressed'], //可以指定是原图还是压缩图,默认二者都有
  494. sourceType: ['album'], // camera 使用相机 album 从相册中选
  495. success: function (res) {
  496. // 成功则返回图片的本地文件路径列表 tempFilePaths
  497. let img = [];
  498. img.push(res.tempFilePaths);
  499. if (_self.pickList.length >= 6) {
  500. _self.$mHelper.toast('最多只可上传6张图片');
  501. } else {
  502. _self.pickList = _self.pickList.concat(img);
  503. // for (let i = 0; i < _self.pickList.length; i++) {
  504. // let element = _self.pickList[i];
  505. // myCloud.uploadFile({
  506. // url: 'http://192.168.100.135:83/merch/common/upload/oss',
  507. // filePath: element, // 要上传的文件对象
  508. // cloudPath: element,
  509. // name: 'file',
  510. // onUploadProgress: function (progressEvent) {
  511. // // 上传进度回调
  512. // let percentCompleted = Math.round(
  513. // (progressEvent.loaded * 100) / progressEvent.total
  514. // );
  515. // },
  516. // success: (res) => {
  517. // },
  518. // });
  519. // }
  520. }
  521. },
  522. });
  523. },
  524. // 删除图册中的图片
  525. deleteThisImg(index) {
  526. this.pickList.splice(index, 1);
  527. },
  528. // 富文本失去焦点保存内容
  529. saveTxt(e) {
  530. this.mastKnow = e.detail.html;
  531. },
  532. // 内容提交
  533. submitMesage() {
  534. let _this = this;
  535. this.loading = true;
  536. let astrictDate = {};
  537. // 判断是否限制账号购买
  538. if (this.showoperat) {
  539. this.showoperat = '1';
  540. astrictDate = {
  541. data: {
  542. saleDay: this.num1,
  543. saleNum: this.num2,
  544. },
  545. };
  546. } else {
  547. this.showoperat = '0';
  548. astrictDate = '';
  549. }
  550. // 判断是否可以自定义商品名称
  551. let name = '';
  552. if (this.shopList.length === 1) {
  553. name = this.shopname;
  554. } else {
  555. name = this.shopList[this.shopIndex].id;
  556. }
  557. if (!this.storeId) {
  558. this.$mHelper.toast('请选择所属商铺');
  559. this.loading = false;
  560. return;
  561. }
  562. if (!this.typeId) {
  563. this.$mHelper.toast('请选择商品类型');
  564. this.loading = false;
  565. return;
  566. }
  567. if (!name) {
  568. this.$mHelper.toast('请选择商品名称或者输入商品名称');
  569. this.loading = false;
  570. return;
  571. }
  572. console.log(this.shopData.id);
  573. console.log(this.scenicId);
  574. console.log(this.storeId);
  575. console.log(this.typeId);
  576. console.log(name);
  577. console.log(this.lineId);
  578. console.log(this.showoperat);
  579. console.log( JSON.stringify(astrictDate));
  580. console.log(this.mastKnow);
  581. console.log(this.Icon);
  582. this.$http
  583. .post('/goods/add', {
  584. id: this.shopData.id || '',
  585. mid: this.scenicId,
  586. shopId: this.storeId,
  587. typeId: this.typeId,
  588. name: name,
  589. customGroupId: this.lineId,
  590. saleRule: this.showoperat,
  591. saleRuleJson: JSON.stringify(astrictDate),
  592. describ: this.mastKnow,
  593. icon: this.Icon || '',
  594. })
  595. .then((res) => {
  596. if (res.code === 200 && res.msg === 'OK') {
  597. if (this.shopData.id) {
  598. this.$mHelper.toast('保存成功,请联系管理员进行审核');
  599. } else {
  600. this.$mHelper.toast('添加成功');
  601. }
  602. this.loading = false;
  603. setTimeout(() => {
  604. this.$mRouter.back();
  605. }, 500);
  606. }
  607. });
  608. },
  609. },
  610. };
  611. </script>
  612. <style lang="scss" scoped>
  613. .shopdetail {
  614. .shopdetail-content {
  615. padding: 24upx 0 0upx;
  616. .detail-list {
  617. padding: 0 33upx;
  618. background-color: #ffffff;
  619. border-bottom: 1px solid #e7e7e7;
  620. box-sizing: border-box;
  621. .menu {
  622. display: flex;
  623. justify-content: space-between;
  624. align-items: center;
  625. height: 93upx;
  626. .uni-list-cell {
  627. width: 100%;
  628. display: flex;
  629. align-items: center;
  630. height: 93upx;
  631. .uni-list-cell-db {
  632. height: 100%;
  633. display: flex;
  634. justify-content: space-between;
  635. align-items: center;
  636. .selectlist {
  637. width: 100%;
  638. }
  639. }
  640. }
  641. .title {
  642. font-size: 30upx;
  643. color: #a3a8a8;
  644. }
  645. .more {
  646. width: 15upx;
  647. height: 26upx;
  648. }
  649. .bigtitle {
  650. font-size: 34upx;
  651. color: #232828;
  652. font-weight: 700;
  653. }
  654. .input-shopname {
  655. width: 100%;
  656. height: 100%;
  657. }
  658. .txt {
  659. color: #a95cff;
  660. font-weight: 700;
  661. }
  662. .linetitle {
  663. color: #232828;
  664. }
  665. .astricttitle {
  666. font-weight: 700;
  667. font-size: 32upx;
  668. color: #232828;
  669. }
  670. }
  671. }
  672. .noborder {
  673. border-bottom: none;
  674. }
  675. .classify {
  676. background-color: #f9f9f9;
  677. }
  678. .idastrict {
  679. background-color: #fff;
  680. }
  681. .operat {
  682. background-color: #f9f9f9;
  683. .menu {
  684. .title {
  685. font-size: 28upx;
  686. color: #232828;
  687. }
  688. .sub,
  689. .add {
  690. width: 44upx;
  691. height: 44upx;
  692. border-radius: 50%;
  693. border: 1px solid #b4b8b7;
  694. color: #b4b8b7;
  695. text-align: center;
  696. line-height: 40upx;
  697. font-weight: 700;
  698. }
  699. .txt {
  700. color: #232828;
  701. font-weight: normal;
  702. }
  703. .unit {
  704. color: #232828;
  705. }
  706. }
  707. }
  708. .shopicon {
  709. height: 100upx;
  710. padding: 0 33upx;
  711. font-size: 32upx;
  712. color: #232828;
  713. font-weight: 700;
  714. line-height: 100upx;
  715. }
  716. .iconcontent {
  717. padding: 25upx 33upx;
  718. background-color: #f9f9f9;
  719. display: flex;
  720. align-items: center;
  721. .icon {
  722. display: inline-block;
  723. height: 56upx;
  724. font-size: 28upx;
  725. color: #a3a8a8;
  726. border-radius: 50%;
  727. margin-left: 20upx;
  728. border: 1px dashed #ccc;
  729. border-radius: 5%;
  730. text-align: center;
  731. line-height: 56upx;
  732. padding: 0 15upx;
  733. }
  734. .shopLogo {
  735. width: 56upx;
  736. height: 56upx;
  737. border-radius: 50%;
  738. }
  739. }
  740. .uploading {
  741. padding: 25upx 33upx;
  742. display: flex;
  743. align-items: center;
  744. flex-wrap: wrap;
  745. background-color: #fff;
  746. .item-warp {
  747. border-radius: 17upx;
  748. margin-right: 15upx;
  749. margin-bottom: 15upx;
  750. box-sizing: border-box;
  751. overflow: hidden;
  752. .img-warp {
  753. position: relative;
  754. }
  755. .item {
  756. width: 160upx;
  757. height: 160upx;
  758. }
  759. &:nth-child(4) {
  760. margin-right: 0;
  761. }
  762. .delete {
  763. position: absolute;
  764. right: -35upx;
  765. top: -35upx;
  766. width: 70upx;
  767. height: 70upx;
  768. border-radius: 50%;
  769. background-color: #8064f7;
  770. .delete-icon {
  771. position: absolute;
  772. left: 13upx;
  773. bottom: 13upx;
  774. width: 14upx;
  775. height: 14upx;
  776. }
  777. }
  778. }
  779. }
  780. .know {
  781. padding: 24upx 33upx;
  782. background-color: #fff;
  783. #editor {
  784. width: 100%;
  785. height: 300px;
  786. }
  787. }
  788. .btn {
  789. width: 100%;
  790. height: 98upx;
  791. color: #ffffff;
  792. font-size: 32upx;
  793. text-align: center;
  794. line-height: 98upx;
  795. background-color: #8064f7;
  796. margin-top: 27upx;
  797. letter-spacing: 2upx;
  798. }
  799. }
  800. }
  801. </style>