edit.php 31 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797
  1. <?php
  2. /**
  3. * @link:http://www.gdqijianshi.com/
  4. * @copyright: Copyright (c) 2020 广东七件事集团
  5. * Created by PhpStorm
  6. * Author: lun
  7. * Date: 2021-09-15
  8. * Time: 12:36
  9. */
  10. use common\helpers\ComponentHelper;
  11. ComponentHelper::loadComponentView('com-upload');
  12. ?>
  13. <!-- 加载字体库 -->
  14. <div id="app" v-cloak>
  15. <el-card shadow='never' v-loading="posterLoading" style="background: transparent;padding:0;border:0">
  16. <div style="min-width: 1300px;">
  17. <div class="header_box">
  18. <div class="add_temp_box" style="background: #fff;border-radius:5px;overflow:hidden">
  19. <el-tabs v-model="activeName">
  20. <el-tab-pane label="编辑海报" name="1"></el-tab-pane>
  21. </el-tabs>
  22. </div>
  23. <div class="flex flex-y-center" style="background: #fff;padding: 25px;border-radius:5px 5px 0 0">
  24. <div class="template_data_left flex flex-y-center" style="margin-right: 40px;">
  25. <div class="template_data_left_title">海报名称</div>
  26. <el-input placeholder="请输入名称,不超过10个文字" maxlength='10' v-model="sendData.name" clearable></el-input>
  27. </div>
  28. <div class="template_data_left flex flex-y-center" style="margin-right: 40px;">
  29. <div class="template_data_left_title">关键词</div>
  30. <el-input placeholder="请输入关键词,不超过10个文字" maxlength='10' v-model="sendData.key_word" clearable></el-input>
  31. </div>
  32. <div class="template_data_left flex flex-y-center" style="margin-right: 40px;">
  33. <div class="template_data_left_title">序号</div>
  34. <el-input v-model="sendData.sort" type="number" min="0" @input="handleInput" controls-position="right" placeholder="请输入序号" style="width: 80px"></el-input>
  35. </div>
  36. </div>
  37. </div>
  38. <div class="main_box flex">
  39. <div class="main_img_box">
  40. <img class="main_img" src="resources/img/mall/decorate/duihuakuangSmall.png" alt="">
  41. <div class="main_content">
  42. <img class="main_content_img" :src="sendData.share.bg_pic.url" v-if='sendData.share.bg_pic.url' alt="">
  43. <div v-else class="default_tips">暂时未设置海报背景</div>
  44. <!-- 自定义海报内容插件 -->
  45. <div class="diy_avatar iconfont icon-weibiaoti-1" v-if='selectBool(1)' :style="{fontSize:sendData.share.head.size+'px','line-height':sendData.share.head.size+'px',top:sendData.share.head.top+'px',left:sendData.share.head.left+'px'}"></div>
  46. <div class="diy_avatar" ref="nameAttr" v-if='selectBool(2)' :style="{color:sendData.share.name.color,fontSize:sendData.share.name.font+'px',top:sendData.share.name.top+'px',left:sendData.share.name.left+'px'}">昵称设置</div>
  47. <!-- <img class="diy_avatar" src="resources/img/mall/decorate/code.jpg" v-if='selectBool(3)' :style="{width:sendData.share.qr_code.size+'px',top:sendData.share.qr_code.top+'px',left:sendData.share.qr_code.left+'px','border-radius':sendData.share.qr_code.type == 1?'50%':''}">-->
  48. <img class="diy_avatar" src="resources/img/mall/decorate/code.jpg" v-if='selectBool(3)' :style="{width:sendData.share.qr_code.size+'px',top:sendData.share.qr_code.top+'px',left:sendData.share.qr_code.left+'px'}">
  49. <div
  50. class="diy_avatar"
  51. ref="nameAttr"
  52. v-if='selectBool(4)'
  53. :style="{
  54. color: sendData.share.memberid.color,
  55. fontSize: sendData.share.memberid.font+'px',
  56. top: sendData.share.memberid.top+'px',
  57. left: sendData.share.memberid.left+'px'
  58. }"
  59. >会员ID:0001</div>
  60. </div>
  61. </div>
  62. <div class="edit_box">
  63. <com-attachment v-model="sendData.share.bg_pic.url" :multiple="false" :max="1">
  64. <el-tooltip class="item" effect="dark" content="建议尺寸:750 * 1334"
  65. placement="top">
  66. <el-button size="mini">更换海报背景</el-button>
  67. </el-tooltip>
  68. </com-attachment>
  69. <!-- <com-upload @success="handleSuccess" @start='beginAddImg' accept="image/*" :fields="fields" :simple="true">-->
  70. <!-- <el-button type="primary" :loading="addImgLoad" @click='beginAddImg'>更换海报背景</el-button>-->
  71. <!-- <el-tooltip class="item" effect="dark" content="建议尺寸为750*1334" placement="right">-->
  72. <!-- <i class="el-icon-info"></i>-->
  73. <!-- </el-tooltip>-->
  74. <!-- </com-upload>-->
  75. <div class="btn_list_box flex">
  76. <div class="btn_list" @click='selectItem(1)' :class="{btn_active:select_index == 1}">
  77. <i class="iconfont icon-weibiaoti-1 btn_icon" :class="{btn_icon_close_active:select_index == 1}" style="font-size: 50px;"></i>
  78. <i class="el-icon-close btn_icon_close" @click.stop='deleteSelect(1)' v-if='selectBool(1)' :class="{btn_icon_close_active:select_index == 1}"></i>
  79. </div>
  80. <div class="btn_list" @click='selectItem(2)' :class="{btn_active:select_index == 2}">
  81. <i class="iconfont icon-username btn_icon" :class="{btn_icon_close_active:select_index == 2}"></i>
  82. <i class="el-icon-close btn_icon_close" @click.stop='deleteSelect(2)' v-if='selectBool(2)' :class="{btn_icon_close_active:select_index == 2}"></i>
  83. </div>
  84. <div class="btn_list" @click.stop='selectItem(3)' class="{btn_active:select_index == 3}">
  85. <i class="iconfont icon-a-31erweima btn_icon" :class="{btn_icon_close_active:select_index == 3}"></i>
  86. <i class="el-icon-close btn_icon_close" @click.stop='deleteSelect(3)' v-if='selectBool(3)' :class="{btn_icon_close_active:select_index == 3}"></i>
  87. </div>
  88. <div class="btn_list" @click.stop='selectItem(4)' :class="{btn_active:select_index == 4}" style="margin-right: 0;">
  89. <i class="iconfont icon-account-unselected btn_icon" :class="{btn_icon_close_active:select_index == 4}"></i>
  90. <i class="el-icon-close btn_icon_close" @click.stop='deleteSelect(4)' v-if='selectBool(4)' :class="{btn_icon_close_active:select_index == 4}"></i>
  91. </div>
  92. </div>
  93. <div class="set_box">
  94. <!-- 头像设置 -->
  95. <div class="set_avatar" v-if="select_index == 1">
  96. <div class="set_title">头像设置</div>
  97. <div style="padding-left: 16px;width:500px">
  98. <div class="flex flex-y-center">
  99. <span class="slider_title">大小</span>
  100. <!-- :disabled='!selectBool(1)' 用来判断是否禁用,暂没用到-->
  101. <el-slider v-model="sendData.share.head.size" @input="attarController($event,'avatarSize')" :min="40" :max='350' style="flex: 1;" show-input :show-input-controls='false'></el-slider>
  102. </div>
  103. <div class="flex flex-y-center">
  104. <span class="slider_title">上间距</span>
  105. <el-slider v-model="sendData.share.head.top" :max="avatar_max_top" style="flex: 1;" show-input :show-input-controls='false'></el-slider>
  106. </div>
  107. <div class="flex flex-y-center">
  108. <span class="slider_title">左间距</span>
  109. <el-slider v-model="sendData.share.head.left" :max='avatar_max_left' style="flex: 1;" show-input :show-input-controls='false'></el-slider>
  110. </div>
  111. </div>
  112. </div>
  113. <!-- 昵称设置 -->
  114. <div class="set_nickname" v-if="select_index == 2">
  115. <div class="set_title">昵称设置</div>
  116. <div style="padding-left: 16px;width:500px">
  117. <div class="flex flex-y-center">
  118. <span class="slider_title" style="position: relative;top:-5px">昵称颜色</span>
  119. <el-color-picker v-model="sendData.share.name.color"></el-color-picker>
  120. </div>
  121. <div class="flex flex-y-center">
  122. <span class="slider_title">大小</span>
  123. <el-slider v-model="sendData.share.name.font" @input="attarController($event,'nameSize')" :min="12" :max='100' style="flex: 1;" show-input :show-input-controls='false'></el-slider>
  124. </div>
  125. <div class="flex flex-y-center">
  126. <span class="slider_title">上间距</span>
  127. <el-slider v-model="sendData.share.name.top" :max="avatar_max_top" style="flex: 1;" show-input :show-input-controls='false'></el-slider>
  128. </div>
  129. <div class="flex flex-y-center">
  130. <span class="slider_title">左间距</span>
  131. <el-slider v-model="sendData.share.name.left" :max='avatar_max_left' style="flex: 1;" show-input :show-input-controls='false'></el-slider>
  132. </div>
  133. </div>
  134. </div>
  135. <!-- 二维码设置 -->
  136. <div class="set_avatar" v-if="select_index == 3">
  137. <div class="set_title">二维码设置</div>
  138. <div style="padding-left: 16px;width:500px">
  139. <!-- <div class="flex flex-y-center" style="margin-bottom: 4px;">-->
  140. <!-- <span class="slider_title">样式</span>-->
  141. <!-- <el-radio v-model="sendData.share.qr_code.type" :label="1">圆形</el-radio>-->
  142. <!-- <el-radio v-model="sendData.share.qr_code.type" :label="2">方形</el-radio>-->
  143. <!-- </div>-->
  144. <div class="flex flex-y-center">
  145. <span class="slider_title">大小</span>
  146. <el-slider v-model="sendData.share.qr_code.size" @input="attarController($event,'codeSize')" :min="80" :max='400' style="flex: 1;" show-input :show-input-controls='false'></el-slider>
  147. </div>
  148. <div class="flex flex-y-center">
  149. <span class="slider_title">上间距</span>
  150. <el-slider v-model="sendData.share.qr_code.top" :max="avatar_max_top" style="flex: 1;" show-input :show-input-controls='false'></el-slider>
  151. </div>
  152. <div class="flex flex-y-center">
  153. <span class="slider_title">左间距</span>
  154. <el-slider v-model="sendData.share.qr_code.left" :max='avatar_max_left' style="flex: 1;" show-input :show-input-controls='false'></el-slider>
  155. </div>
  156. </div>
  157. </div>
  158. </div>
  159. <!-- 会员ID设置 -->
  160. <div class="set_memberid" v-if="select_index == 4">
  161. <div class="set_title">会员ID设置</div>
  162. <div style="padding-left: 16px;width:500px">
  163. <div class="flex flex-y-center">
  164. <span class="slider_title" style="position: relative;top:-5px">ID颜色</span>
  165. <el-color-picker v-model="sendData.share.memberid.color"></el-color-picker>
  166. </div>
  167. <div class="flex flex-y-center">
  168. <span class="slider_title">大小</span>
  169. <el-slider v-model="sendData.share.memberid.font" @input="attarController($event, 'nameSize')" :min="12" :max='100' style="flex: 1;" show-input :show-input-controls='false'></el-slider>
  170. </div>
  171. <div class="flex flex-y-center">
  172. <span class="slider_title">上间距</span>
  173. <el-slider v-model="sendData.share.memberid.top" :max="avatar_max_top" style="flex: 1;" show-input :show-input-controls='false'></el-slider>
  174. </div>
  175. <div class="flex flex-y-center">
  176. <span class="slider_title">左间距</span>
  177. <el-slider v-model="sendData.share.memberid.left" :max='avatar_max_left' style="flex: 1;" show-input :show-input-controls='false'></el-slider>
  178. </div>
  179. </div>
  180. </div>
  181. <div class="save_btn">
  182. <el-button type="primary" @click="savePoster">点击保存</el-button>
  183. </div>
  184. </div>
  185. </div>
  186. </div>
  187. </el-card>
  188. </div>
  189. <script>
  190. new Vue({
  191. el: '#app',
  192. data() {
  193. return {
  194. activeIndex: '1',
  195. activeName: '1',
  196. select_index: 0,
  197. select_arr: [], //选择了那些属性
  198. addImgLoad: false, //是否在上传图片
  199. options: [],
  200. color1: '#000000',
  201. posterLoading: false,
  202. sendData: {
  203. share: {
  204. bg_pic: {
  205. url: '',
  206. is_show: 0
  207. },
  208. head: {
  209. is_show: 0,
  210. size: 40,
  211. top: 0,
  212. left: 0,
  213. file_type: 'image'
  214. },
  215. qr_code: {
  216. is_show: 0,
  217. size: 80,
  218. top: 0,
  219. left: 0,
  220. type: 1,
  221. file_type: 'image',
  222. },
  223. name: {
  224. is_show: 0,
  225. font: 12,
  226. top: 0,
  227. left: 0,
  228. color: '#000000',
  229. file_type: 'text'
  230. },
  231. memberid: {
  232. is_show: 0,
  233. font: 12,
  234. top: 0,
  235. left: 0,
  236. color: '#000000',
  237. file_type: 'text'
  238. },
  239. },
  240. name: '',
  241. sort: 0,
  242. key_word: '',
  243. },
  244. params: {},
  245. fields: {
  246. upload_type: 'images'
  247. },
  248. avatar_max_top: 1285,
  249. avatar_max_left: 610,
  250. id: '',
  251. }
  252. },
  253. computed: {
  254. selectBool() {
  255. return function(num) {
  256. if (JSON.stringify(this.select_arr).indexOf(num) != -1) {
  257. return true;
  258. } else {
  259. return false;
  260. }
  261. }
  262. }
  263. },
  264. created() {
  265. this.id = getQuery('id');
  266. if (this.id) {
  267. this.getPosterDetail();
  268. }
  269. },
  270. methods: {
  271. handleInput(val) {
  272. this.sendData.sort = Math.max(val, 0);
  273. },
  274. getPosterDetail() {
  275. this.posterLoading = true;
  276. this.$request({
  277. params: {
  278. r: 'mall/poster/edit',
  279. id: this.id
  280. },
  281. method: 'get',
  282. }).then(e => {
  283. this.posterLoading = false;
  284. if (e.data.code == 0) {
  285. this.sendData.name = e.data.data.name;
  286. this.sendData.key_word = e.data.data.key_word;
  287. this.sendData.sort = e.data.data.sort;
  288. this.sendData.share.bg_pic = e.data.data.poster_content.bg_pic;
  289. this.sendData.share.frame = e.data.data.poster_content.frame;
  290. this.sendData.share.qr_code = e.data.data.poster_content.qr_code;
  291. if(e.data.data.poster_content.name){
  292. this.sendData.share.name = e.data.data.poster_content.name;
  293. e.data.data.poster_content.name.font = e.data.data.poster_content.name.font * 1;
  294. if (this.sendData.share.name.is_show == 1) {
  295. this.select_arr.push(2);
  296. }
  297. }
  298. if(e.data.data.poster_content.memberid) {
  299. this.sendData.share.memberid = e.data.data.poster_content.memberid;
  300. e.data.data.poster_content.memberid.font = e.data.data.poster_content.memberid.font * 1;
  301. if (this.sendData.share.memberid.is_show == 1) {
  302. this.select_arr.push(4);
  303. }
  304. }
  305. if(e.data.data.poster_content.head){
  306. this.sendData.share.head = e.data.data.poster_content.head;
  307. if (this.sendData.share.head.is_show == 1) {
  308. this.select_arr.push(1);
  309. }
  310. }
  311. if (this.sendData.share.qr_code.is_show == 1) {
  312. this.select_arr.push(3);
  313. }
  314. } else {
  315. this.$message.error(e.data.msg);
  316. }
  317. });
  318. },
  319. savePoster() {
  320. if (this.sendData.name == '') {
  321. this.$message.error('请输入海报名称');
  322. return;
  323. }
  324. if (this.sendData.share.bg_pic.url == '') {
  325. this.$message.error('请添加海报背景');
  326. return;
  327. }
  328. if (this.sendData.share.bg_pic.url) {
  329. this.sendData.share.bg_pic.is_show = 1;
  330. } else {
  331. this.sendData.share.bg_pic.is_show = 0;
  332. }
  333. this.select_arr.forEach((item, index) => {
  334. if (item == 1) {
  335. this.sendData.share.head.is_show = 1;
  336. } else if (item == 2) {
  337. this.sendData.share.name.is_show = 1;
  338. } else if (item == 3) {
  339. this.sendData.share.qr_code.is_show = 1;
  340. } else if (item == 4) {
  341. this.sendData.share.memberid.is_show = 1;
  342. }
  343. })
  344. if (!this.sendData.share.qr_code.is_show) {
  345. this.$message.error('请添加二维码');
  346. return;
  347. }
  348. // 计算百分比
  349. let share = this.sendData.share;
  350. for (let key in share) {
  351. if (key == 'bg_pic') {
  352. let img = document.getElementsByClassName("main_content_img");
  353. this.sendData.share[key].width = img[0].width;
  354. this.sendData.share[key].height = img[0].height;
  355. } else {
  356. this.sendData.share[key].top_ratio = Math.floor(share[key].top / share[key].max_top * 100) / 100;
  357. this.sendData.share[key].left_ratio = Math.floor(share[key].left / share[key].max_left * 100) / 100;
  358. }
  359. }
  360. this.sendData.share.frame = {width: 750, height: 1334};
  361. var obj = {
  362. poster_content: {
  363. share: ''
  364. },
  365. name: '',
  366. key_word: '',
  367. id: this.id
  368. };
  369. obj.poster_content.share = this.sendData.share;
  370. obj.name = this.sendData.name;
  371. obj.key_word = this.sendData.key_word;
  372. obj.sort = this.sendData.sort;
  373. obj.share_url = this.sendData.share.bg_pic.url;
  374. this.posterLoading = true;
  375. this.select_arr.forEach((item,index) =>{
  376. if (this.select_arr.indexOf(1) == -1) {
  377. delete obj.poster_content.share.head
  378. }
  379. if(this.select_arr.indexOf(2) == -1){
  380. delete obj.poster_content.share.name
  381. }
  382. })
  383. this.$request({
  384. params: {
  385. r: 'mall/poster/edit',
  386. },
  387. method: 'post',
  388. data: obj
  389. }).then(e => {
  390. this.posterLoading = false;
  391. if (e.data.code == 0) {
  392. this.$message({
  393. message: '保存成功!',
  394. type: 'success'
  395. });
  396. setTimeout(() => {
  397. this.$navigate({
  398. r: 'mall/poster/index'
  399. })
  400. }, 1000)
  401. } else {
  402. this.$message.error(e.data.msg);
  403. }
  404. });
  405. },
  406. attarController(e, str) { //属性控制器
  407. if (str == 'avatarSize') {
  408. this.avatar_max_top = 1334 - (e + 4);
  409. this.avatar_max_left = 750 - e;
  410. this.sendData.share.head.max_top = this.avatar_max_top;
  411. this.sendData.share.head.max_left = this.avatar_max_left;
  412. } else if (str == 'nameSize') {
  413. this.avatar_max_top = 1334 - (this.$refs.nameAttr.offsetHeight + 4);
  414. this.avatar_max_left = 750 - this.$refs.nameAttr.offsetWidth - 4;
  415. this.sendData.share.name.max_top = this.avatar_max_top;
  416. this.sendData.share.name.max_left = this.avatar_max_left;
  417. this.sendData.share.memberid.max_top = this.avatar_max_top;
  418. this.sendData.share.memberid.max_left = this.avatar_max_left;
  419. } else {
  420. this.avatar_max_top = 1334 - e;
  421. this.avatar_max_left = 750 - e;
  422. this.sendData.share.qr_code.max_top = this.avatar_max_top;
  423. this.sendData.share.qr_code.max_left = this.avatar_max_left;
  424. }
  425. },
  426. selectItem(num) { //选中了哪一个海报属性
  427. console.log('xaunzhong ', num, this.sendData.share)
  428. this.select_index = num;
  429. if (JSON.stringify(this.select_arr).indexOf(num) == -1) {
  430. this.select_arr.push(num);
  431. }
  432. console.log(this.sendData.share.name.top,'share3')
  433. },
  434. deleteSelect(num) { //删除所选择的属性
  435. this.select_arr.forEach((item, index) => {
  436. if (item == num) {
  437. this.select_arr.splice(index, 1);
  438. if (num == 1) {
  439. this.sendData.share.head.is_show = 0;
  440. } else if (num == 2) {
  441. this.sendData.share.name.is_show = 0;
  442. } else if (num == 3) {
  443. this.sendData.share.qr_code.is_show = 0;
  444. } else if (num == 4) {
  445. this.sendData.share.memberid.is_show = 0;
  446. }
  447. }
  448. })
  449. if (this.select_index == num) {
  450. this.select_index = 0;
  451. }
  452. },
  453. beginAddImg(e) {
  454. if (e[0]) { //判断图片是否正在上传
  455. this.addImgLoad = true;
  456. }
  457. },
  458. handleSuccess(e) { //图片上传成功
  459. this.sendData.share.bg_pic.url = e.response.data.data.url;
  460. this.addImgLoad = false;
  461. this.$message({
  462. message: '图片上传成功!',
  463. type: 'success'
  464. });
  465. }
  466. }
  467. })
  468. </script>
  469. <style scoped>
  470. img {
  471. display: block;
  472. }
  473. .el-menu-item:hover {
  474. background: #ffffff !important;
  475. }
  476. .el-submenu__title:hover {
  477. background: #ffffff !important;
  478. }
  479. .header_box {
  480. border-radius: 5px 5px 0 0;
  481. color: #808695;
  482. }
  483. .add_temp_box {
  484. margin-bottom: 10px;
  485. }
  486. .el-tabs__header {
  487. margin: 0;
  488. }
  489. .el-tabs__item {
  490. height: 70px;
  491. line-height: 70px;
  492. width: 96px;
  493. text-align: center;
  494. padding: 0;
  495. }
  496. .el-tabs__active-bar {
  497. width: 96px !important;
  498. height: 4px;
  499. }
  500. .template_data_left_title {
  501. margin-right: 13px;
  502. }
  503. .el-input {
  504. height: 40px;
  505. width: 229px;
  506. }
  507. .main_box {
  508. background: #fff;
  509. padding: 0 25px 25px;
  510. }
  511. .main_img_box {
  512. width: 376px;
  513. height: 760px;
  514. position: relative;
  515. margin-right: 48px;
  516. }
  517. .main_img {
  518. position: absolute;
  519. top: 0;
  520. left: 0;
  521. }
  522. .main_content {
  523. background: #ffffff;
  524. width: 750px;
  525. height: 1334px;
  526. position: absolute;
  527. top: 137px;
  528. left: 49.1%;
  529. transform: translateX(-50%);
  530. border-radius: 0 0 77px 74px;
  531. scrollbar-width: none;
  532. zoom: 0.464;
  533. /* firefox */
  534. -ms-overflow-style: none;
  535. /* IE 10+ */
  536. overflow-x: hidden;
  537. overflow-y: hidden;
  538. }
  539. .main_content_img {
  540. width: 100%;
  541. }
  542. .add_img_title {
  543. font-size: 14px;
  544. font-weight: 700;
  545. margin-bottom: 30px;
  546. }
  547. .add_img_text {
  548. margin-right: 30px;
  549. color: #606266;
  550. }
  551. .edit_box .el-button {
  552. width: 158px;
  553. height: 35px;
  554. padding: 10px 20px;
  555. }
  556. .edit_box {
  557. padding-top: 40px;
  558. }
  559. .btn_list_box {
  560. margin: 40px 0;
  561. padding-bottom: 30px;
  562. width: 500px;
  563. border-bottom: 1px solid #F1F1F1;
  564. }
  565. .btn_list {
  566. border-radius: 5px;
  567. width: 80px;
  568. height: 80px;
  569. border: 2px solid #C5C8CE;
  570. position: relative;
  571. margin-right: 26px;
  572. cursor: pointer;
  573. }
  574. .btn_active {
  575. border: 2px solid #2DB7F5;
  576. background: #CBF3FF;
  577. }
  578. .btn_icon {
  579. color: #C5C8CE;
  580. font-size: 45px;
  581. position: absolute;
  582. top: 50%;
  583. left: 50%;
  584. transform: translate(-50%, -50%);
  585. }
  586. .btn_icon_close {
  587. position: absolute;
  588. right: 3px;
  589. top: 4px;
  590. color: #C5C8CE;
  591. }
  592. .btn_icon_close_active {
  593. color: #2DB7F5;
  594. }
  595. .set_title {
  596. font-weight: 700;
  597. color: #515A6E;
  598. font-size: 14px;
  599. margin-bottom: 19px;
  600. }
  601. .slider_title {
  602. width: 56px;
  603. text-align: right;
  604. margin-right: 17px;
  605. color: #606266;
  606. }
  607. .diy_avatar {
  608. position: absolute;
  609. color: #C5C8CE;
  610. }
  611. .save_btn {
  612. margin-top: 80px;
  613. }
  614. /* 修改原生element滑块的样式 */
  615. .el-input-number.is-without-controls .el-input__inner {
  616. padding-left: 10px;
  617. padding-right: 10px;
  618. }
  619. .el-input--small .el-input__inner {
  620. height: 20px;
  621. line-height: 20px;
  622. }
  623. .el-input-number .el-input {
  624. display: block;
  625. width: 45px;
  626. height: 20px;
  627. font-size: 12px;
  628. }
  629. .el-slider__button {
  630. width: 10px;
  631. height: 10px;
  632. border: 1px solid #03C5FF;
  633. }
  634. .el-slider__button-wrapper {
  635. top: -17px;
  636. }
  637. .el-slider__runway {
  638. height: 2px;
  639. }
  640. .el-slider__input {
  641. margin-top: 0;
  642. }
  643. .el-slider__bar {
  644. height: 3px;
  645. }
  646. /* 修改原生element颜色选择器样式 */
  647. .el-color-picker__trigger {
  648. border-radius: 50%;
  649. height: 30px;
  650. width: 30px;
  651. padding: 3px;
  652. }
  653. .el-color-picker__color {
  654. border: 0px;
  655. }
  656. .el-color-picker__icon {
  657. display: none;
  658. }
  659. .el-color-picker__color-inner {
  660. border-radius: 50%;
  661. }
  662. /* 公共样式 */
  663. .flex {
  664. display: -webkit-box;
  665. display: -webkit-flex;
  666. /* #ifndef APP-NVUE */
  667. display: flex;
  668. /* #endif */
  669. }
  670. .flex-x-center {
  671. display: -webkit-box;
  672. display: -webkit-flex;
  673. /* #ifndef APP-NVUE */
  674. display: flex;
  675. /* #endif */
  676. -webkit-box-pack: center;
  677. -webkit-justify-content: center;
  678. -ms-flex-pack: center;
  679. justify-content: center;
  680. }
  681. .flex-x-between {
  682. display: -webkit-box;
  683. display: -webkit-flex;
  684. /* #ifndef APP-NVUE */
  685. display: flex;
  686. /* #endif */
  687. -webkit-box-pack: space-between;
  688. -webkit-justify-content: space-between;
  689. -ms-flex-pack: space-between;
  690. justify-content: space-between;
  691. }
  692. .flex-y-center {
  693. display: -webkit-box;
  694. display: -webkit-flex;
  695. /* #ifndef APP-NVUE */
  696. display: flex;
  697. /* #endif */
  698. -webkit-box-align: center;
  699. -webkit-align-items: center;
  700. -ms-flex-align: center;
  701. -ms-grid-row-align: center;
  702. align-items: center;
  703. }
  704. /* 溢出隐藏 */
  705. .over1 {
  706. text-overflow: -o-ellipsis-lastline;
  707. overflow: hidden;
  708. text-overflow: ellipsis;
  709. display: -webkit-box;
  710. -webkit-line-clamp: 1;
  711. -webkit-box-orient: vertical;
  712. }
  713. .over2 {
  714. text-overflow: -o-ellipsis-lastline;
  715. overflow: hidden;
  716. text-overflow: ellipsis;
  717. display: -webkit-box;
  718. -webkit-line-clamp: 2;
  719. -webkit-box-orient: vertical;
  720. }
  721. .pagination {
  722. width: 100%;
  723. flex-direction: row-reverse;
  724. }
  725. .default_tips {
  726. text-align: center;
  727. margin-top: 200px;
  728. color: #D0D2D6;
  729. font-size: 35px;
  730. }
  731. </style>