mall.php 29 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874
  1. <?php
  2. $currentRoute = Yii::$app->controller->route;
  3. ?>
  4. <div id="app" v-cloak>
  5. <el-card v-loading="loading">
  6. <div class="nav">
  7. {{ routeType == 'mall_template' ? '我的模板' : '模板市场' }}
  8. <el-button v-if="routeType == 'template'" type="primary" style="float: right;position: relative;top: -5px;" size="small" @click="$navigate({r: 'admin/template/edit'})">新建模板</el-button>
  9. </div>
  10. <div class="header_box">
  11. <!-- <div class="cate_header flex flex-y-center">-->
  12. <!-- <span class="cate_title">模板类型:</span>-->
  13. <!-- <div class="flex" style="flex-wrap: wrap;flex:1">-->
  14. <!-- <div :class="{cate_item_active:template_index==0}" class="cate_item" @click='selectTemplate(0)'>全部</div>-->
  15. <!-- <div v-for="(name,index) in template_type" :class="{cate_item_active:template_index==index}" class="cate_item" @click='selectTemplate(index)'>{{ name }}</div>-->
  16. <!-- </div>-->
  17. <!-- </div>-->
  18. <div class="cate_header flex flex-y-center">
  19. <span class="cate_title">行业分类:</span>
  20. <div class="flex" style="flex-wrap: wrap;flex:1">
  21. <div :class="{cate_item_active:cate_index==0}" class="cate_item" @click='selectCate(0)'>全部</div>
  22. <div v-for="(name,index) in cate_arr" :class="{cate_item_active:cate_index==index}" class="cate_item" @click='selectCate(index)'>{{ name }}</div>
  23. </div>
  24. </div>
  25. <div class="add_temp_box flex flex-x-between flex-y-center">
  26. <div class="add_temp_right">
  27. <el-input placeholder="输入页面关键词搜索" v-model='title' size="small" suffix-icon="el-icon-search" @change='changeName'></el-input>
  28. </div>
  29. </div>
  30. </div>
  31. <div class="template_body">
  32. <div class="flex" style="flex-wrap: wrap;">
  33. <div class='template_item' v-for="(item,index) in temp_list">
  34. <div class="template_img_box">
  35. <div class="template-text-top">
  36. <div class="template_title flex flex-y-center">
  37. <div style="margin-right: 12px;"> <div v-if="item.status == 0" class="template-disable">已禁用</div>{{item.title}}</div>
  38. <div v-if="routeType == 'template'" class="template-switch">
  39. <el-switch v-model="item.is_on_sale" :active-value="1" :inactive-value="0" @change="handle('sell',item)"></el-switch>
  40. </div>
  41. </div>
  42. </div>
  43. <div class="template_img_block">
  44. <img class="template_img" :src="item.cover" alt="">
  45. </div>
  46. <div class='mask flex flex-x-center flex-y-center'>
  47. <div class="temp_preview" @click="handle('showImg',item)">预览</div>
  48. <div v-if="routeType == 'template'" class="temp_preview" @click="handle('edit',item)">编辑</div>
  49. <div v-if="routeType == 'template'" class="temp_preview" @click="handle('delete',item)">删除</div>
  50. </div>
  51. <div class="template_text">
  52. <div class="template_title flex flex-y-center">
  53. <div style="margin-right: 12px;"> 分类:{{ cate_arr[item.cate_id] }}</div>
  54. </div>
  55. <div class="template_title flex flex-y-center" style="margin-bottom: 5px;" v-if="mall_template_ids.includes(item.id)">
  56. <span class="buyed"><i class="el-icon-check"></i> 已购买</span>
  57. <span class="expire_time" v-if="mall_template_arr[item.id] == -1">永久有效</span>
  58. <span class="expire_time" v-else>{{ mall_template_arr[item.id] | dateTimeFormat('Y-m-d') }} 到期</span>
  59. </div>
  60. <div class="use_number" v-if="routeType == 'mall_template'">
  61. <el-button type="primary" size="mini" style="width: 100%;" @click="handle('use',item)">使用模板</el-button>
  62. <div class="price-bottom">
  63. <span v-if="item.expire_time == -1">永久有效</span>
  64. <span v-else>{{ item.expire_time | dateTimeFormat('Y-m-d') }} 到期</span>
  65. </div>
  66. </div>
  67. <div class="use_number" v-else>
  68. <div class="price-top" flex>
  69. <div class="price-li"
  70. v-for="(val, index) in item.setting"
  71. :key="item.id+'_'+index"
  72. @click="tabClick(index,item,val)"
  73. :class="current[item.id] == index ? 'active' : ''"
  74. >{{ val.duration == -1 ? val.unit : val.duration + '个' + val.unit }}</div>
  75. </div>
  76. <div class="price-bottom">
  77. <span class="template-price">{{ setting_arr[item.id].money }}元</span> / {{ setting_arr[item.id].duration == -1 ? setting_arr[item.id].unit : setting_arr[item.id].duration+'个'+setting_arr[item.id].unit }}
  78. </div>
  79. </div>
  80. <!-- -->
  81. <!-- 购买按钮处理 -->
  82. <div v-if="routeType == 'market'">
  83. <div v-if="mall_template_ids.includes(item.id) == true">
  84. <el-button v-if="mall_template_arr[item.id] != -1" class="template-setting" type="text" @click="handle('buy',item)">购买</el-button>
  85. </div>
  86. <div v-else>
  87. <el-button class="template-setting" type="text" @click="handle('buy',item)">购买</el-button>
  88. </div>
  89. </div>
  90. <el-button v-else-if="routeType == 'mall_template' && item.status == 2" class="template-setting" type="text" @click="handle('buy',item)">续费</el-button>
  91. <el-button v-else-if="routeType == 'template'" class="template-setting" type="text" @click="handle('setting',item)">设置</el-button>
  92. </div>
  93. </div>
  94. </div>
  95. </div>
  96. <div class="pagination flex flex-x-between">
  97. <el-pagination @current-change="pagination" background layout="prev, pager, next" :page-count="pageCount"></el-pagination>
  98. </div>
  99. </div>
  100. <!-- 预览框 -->
  101. <el-dialog :visible.sync="dialogVisible" width="24%" :before-close="handleClose" class="preview">
  102. <div class="preview_box">
  103. <div class="preview_content">
  104. <img class="preview_img" :src="selectObj.cover" alt="">
  105. </div>
  106. </div>
  107. </el-dialog>
  108. <!-- 支付 -->
  109. <el-dialog :visible.sync="payVisible" width="40%" title="支付" :close-on-click-modal="false">
  110. <div class="pay-box">
  111. <el-descriptions :column="1" direction="horizontal" v-loading="payLoading">
  112. <el-descriptions-item label="模板名称">{{ payInfo.template.title }}</el-descriptions-item>
  113. <el-descriptions-item label="购买时长">{{ payInfo.duration == -1 ? '永久' : payInfo.duration + '个月' }}</el-descriptions-item>
  114. <el-descriptions-item label="支付金额">{{ payInfo.pay_money.toFixed(2) }}</el-descriptions-item>
  115. <el-descriptions-item label="支付方式" :content-style="{display: 'flex', alignItems: 'center'}">
  116. <el-radio
  117. @input="radioChange"
  118. v-model="payType"
  119. :label="item.payment_way"
  120. v-for="(item, index) in payInfo.extra_info.payment_arr"
  121. :key="index"
  122. >{{ item.payment_name }}</el-radio>
  123. </el-descriptions-item>
  124. <el-descriptions-item label="微信扫码支付" v-if="payType == 'scan'">
  125. <div id="qrcode-info">
  126. <div id="qrcode"></div>
  127. </div>
  128. </el-descriptions-item>
  129. <el-descriptions-item label="支付宝跳转支付" v-if="payType == 'navigate'">
  130. <el-button size="small" @click="alipay()">点击跳转支付宝支付</el-button>
  131. </el-descriptions-item>
  132. </el-descriptions>
  133. <div v-if="payType == 'scan'">
  134. <el-button @click="toMyTemplate()">完成支付</el-button>
  135. </div>
  136. </div>
  137. </el-dialog>
  138. </el-card>
  139. </div>
  140. <script>
  141. new Vue({
  142. el: '#app',
  143. data() {
  144. return {
  145. current: {},
  146. setting_arr: {},
  147. loading: '',
  148. temp_list: [],
  149. cate_arr: [],
  150. template_type: {
  151. 'home_page': '首页',
  152. 'goods_detail': '商品详情',
  153. 'user_center': '会员中心',
  154. 'custom_page': '普通页面',
  155. },
  156. cate_index: 0,
  157. template_index: 0,
  158. temp_index: -1,
  159. page: 1,
  160. pageCount: 0,
  161. dialogVisible: false,
  162. dialogSettingVisible: false,
  163. title: null,
  164. selectObj: {},
  165. form: {},
  166. mall_template_ids: [],
  167. mall_template_arr: {},
  168. currentRoute: "<?= $currentRoute; ?>",
  169. mid: "<?= isset($mid) ? $mid : ''; ?>",
  170. routeType: 'market',
  171. list_route: 'admin/template/mall',
  172. payVisible: false,
  173. payInfo: {
  174. pay_money: 0,
  175. template: {},
  176. extra_info: {},
  177. },
  178. payLoading: false,
  179. payType: 'scan', // 支付方式
  180. }
  181. },
  182. created() {
  183. if (this.currentRoute === 'admin/template/mall') {
  184. this.routeType = 'template';
  185. } else if (this.currentRoute === 'mall/diy/my-template') {
  186. this.routeType = 'mall_template';
  187. // this.list_route = 'mall/diy/my-template';
  188. }
  189. this.list_route = this.currentRoute;
  190. this.getList();
  191. },
  192. watch: {
  193. payInfo: {
  194. handler(newInfo, oldInfo) {
  195. if (newInfo.extra_info && newInfo.extra_info.payment_arr) {
  196. let scanPay = newInfo.extra_info.payment_arr.find(function (item) {
  197. return item.payment_way == 'scan'
  198. })
  199. scanPay && this.createQrcode(scanPay.payment_url)
  200. }
  201. },
  202. immediate: true,
  203. deep: true
  204. },
  205. },
  206. methods: {
  207. tabClick(i,item,val) {
  208. Object.assign(this.current, {[item.id]:i});
  209. Object.assign(this.setting_arr, {[item.id]:val});
  210. this.$forceUpdate();// 强制更新视图
  211. },
  212. handle(type, data = null) {
  213. let id = data ? parseInt(data.id) : '';
  214. let params = {};
  215. switch (type) {
  216. case 'edit':// 编辑
  217. params = {
  218. r: 'admin/template/edit'
  219. };
  220. if (id) params = Object.assign(params, {
  221. id: id
  222. });
  223. navigateTo(params);
  224. break;
  225. case 'setting':// 前往设置
  226. params = {
  227. r: 'admin/template/setting'
  228. };
  229. if (id) params = Object.assign(params, {
  230. id: id
  231. });
  232. navigateTo(params);
  233. break;
  234. case 'showImg':// 预览
  235. this.dialogVisible = true;
  236. this.selectObj = data;
  237. break;
  238. case 'sell':// 上下架
  239. this.send(data,'admin/template/handle');
  240. break;
  241. case 'buy':// 购买模板
  242. let duration = this.setting_arr[data.id].duration;
  243. params = {'template_id': data.id, duration: duration};
  244. this.$confirm('是否继续购买此模板?', '提示', {
  245. type: 'warning'
  246. }).then(() => {
  247. // this.send(params,'mall/diy/buy-template');
  248. this.createOrder(id)
  249. })
  250. break;
  251. case 'use':// 使用模板
  252. params = {'id': data.id,};
  253. this.send(params,'mall/diy/use-template', (resp) => {
  254. console.log(resp,'use');
  255. // 模板复制成功跳转到编辑页面
  256. if (resp.code == 0) {
  257. navigateTo({
  258. r: 'mall/diy/edit',
  259. id:resp.data
  260. });
  261. }
  262. });
  263. break;
  264. case 'delete':// 使用模板
  265. this.$confirm('确认删除?', '提示', {
  266. type: 'warning'
  267. }).then(() => {
  268. this.send(data,'admin/template/delete');
  269. })
  270. break;
  271. }
  272. },
  273. send(params, url = '', callback = null) {
  274. let self = this;
  275. request({
  276. params: {
  277. r: url,
  278. },
  279. method: 'post',
  280. data: params
  281. }).then(e => {
  282. if (e.data.code == 0) {
  283. self.$message.success(e.data.msg);
  284. self.getList();
  285. } else {
  286. self.$message.error(e.data.msg);
  287. }
  288. if (callback) callback(e.data);
  289. }).catch(e => {
  290. console.log(e);
  291. });
  292. },
  293. changeName(e) {
  294. this.title = e;
  295. this.getList();
  296. },
  297. getList() {
  298. let self = this;
  299. self.loading = true;
  300. self.$request({
  301. params: {
  302. r: self.list_route,
  303. mid: self.mid ?? null,
  304. title: self.title,
  305. cate_id: self.cate_index,
  306. template: self.template_index,
  307. route_type: self.routeType,
  308. page: self.page,
  309. },
  310. method: 'get',
  311. }).then(e => {
  312. self.loading = false;
  313. if (e.data.code == 0) {
  314. self.temp_list = e.data.data.list.list;
  315. self.cate_arr = e.data.data.cate_arr;
  316. self.pageCount = e.data.data.list.page_count;
  317. if (!isEmpty(e.data.data.mall_template)) {
  318. e.data.data.mall_template.forEach(function(item) {
  319. self.mall_template_ids.push(item.template_id);
  320. self.mall_template_arr[item.template_id] = item.expire_time;
  321. });
  322. }
  323. if (!isEmpty(self.temp_list)) {
  324. let setting = [];
  325. self.temp_list.forEach(function (item, index) {
  326. if (!isEmpty(item.setting)) {
  327. setting = JSON.parse(item.setting);
  328. self.temp_list[index].setting = setting;
  329. Object.assign(self.current, {[item.id]:0});
  330. Object.assign(self.setting_arr, {[item.id]: setting[0]});
  331. }
  332. })
  333. }
  334. }
  335. });
  336. },
  337. pagination(currentPage) {
  338. let self = this;
  339. self.page = currentPage;
  340. self.getList();
  341. },
  342. handleClose(done) {
  343. this.dialogVisible = false;
  344. },
  345. selectCate(index) {
  346. this.cate_index = index;
  347. this.page = 1;
  348. this.getList();
  349. },
  350. selectTemplate(index) {
  351. this.template_index = index;
  352. this.page = 1;
  353. this.getList();
  354. },
  355. /**
  356. * 创建订单
  357. */
  358. createOrder(id) {
  359. request({
  360. params: {
  361. r: 'mall/diy/create-order',
  362. id: id,
  363. index: this.current[id]
  364. },
  365. method: 'get',
  366. }).then(e => {
  367. if (e.data.code == 0) {
  368. this.toPay(e.data.data.id)
  369. } else {
  370. this.$message.error(e.data.msg);
  371. }
  372. })
  373. },
  374. /**
  375. * 支付
  376. */
  377. toPay(id) {
  378. this.payVisible = true
  379. this.payLoading = true
  380. request({
  381. params: {
  382. r: 'mall/diy/pay',
  383. id: id,
  384. },
  385. method: 'get',
  386. }).then(e => {
  387. if (e.data.code == 0) {
  388. this.payLoading = false
  389. this.payInfo = e.data.data
  390. if (this.payInfo.pay_status == 1) {
  391. this.toMyTemplate()
  392. return
  393. }
  394. }
  395. })
  396. },
  397. radioChange(e) {
  398. let scanPay = this.payInfo.extra_info.payment_arr.find(function (item) {
  399. return item.payment_way == 'scan'
  400. })
  401. setTimeout(() => {
  402. scanPay && this.createQrcode(scanPay.payment_url)
  403. }, 100)
  404. },
  405. /**
  406. * 刻画二维码
  407. */
  408. createQrcode(url) {
  409. let qrcodeInfo = document.getElementById("qrcode-info");
  410. document.getElementById("qrcode").remove(); //删除生成的二维码
  411. let addCodeDom = document.createElement("div");
  412. addCodeDom.setAttribute("id", "qrcode");
  413. addCodeDom.setAttribute("style", "width:200px; height:200px;");
  414. qrcodeInfo.appendChild(addCodeDom) //添加标签
  415. let qrCodeDom = document.getElementById("qrcode");
  416. var qrcode = new QRCode(qrCodeDom, {
  417. width: 200,
  418. height: 200,
  419. });
  420. qrcode.makeCode(url);
  421. // 获取二维码生成的图片信息
  422. return new Promise((req, rej) => {
  423. setTimeout(() => {
  424. src = qrCodeDom.getElementsByTagName("img")[0].src;
  425. req(src);
  426. }, 200);
  427. })
  428. },
  429. /**
  430. * 支付宝支付
  431. */
  432. alipay() {
  433. let navigate = this.payInfo.extra_info.payment_arr.find(function (item) {
  434. return item.payment_way == 'navigate'
  435. })
  436. window.open(navigate.payment_url, '_self')
  437. },
  438. /**
  439. * 去我的模板页面
  440. */
  441. toMyTemplate() {
  442. navigateTo({
  443. r: 'mall/diy/paid'
  444. })
  445. },
  446. }
  447. })
  448. </script>
  449. <style scoped>
  450. img {
  451. display: block;
  452. }
  453. .buyed {
  454. background-color: #1A73E8;
  455. padding: 5px 10px;
  456. color: #fff;
  457. border-radius: 5px 0 0 5px;
  458. font-size: 12px;
  459. width: 35%;
  460. }
  461. .expire_time {
  462. border: 1px solid #1A73E8;
  463. padding: 4px 0px;
  464. font-size: 12px;
  465. border-radius: 0 5px 5px 0;
  466. color: #1A73E8;
  467. width: 65%;
  468. text-align: center;
  469. }
  470. .price-top {
  471. border-radius: 5px;
  472. overflow: hidden;
  473. border: 1px solid #f1f1f1;
  474. }
  475. .price-bottom {
  476. padding-top: 10px;
  477. }
  478. .price-li {
  479. border-right: 1px solid #f1f1f1;
  480. padding: 5px;
  481. flex: 1;
  482. text-align: center
  483. }
  484. .price-li.active {
  485. background-color: #1A73E8;
  486. color: #fff;
  487. }
  488. .price-li:last-child {
  489. border-right: 0;
  490. }
  491. .cate_item {
  492. padding: 3px 10px;
  493. border-radius: 20px;
  494. margin-right: 20px;
  495. cursor: pointer;
  496. }
  497. .cate_item_active {
  498. color: #5DA8FC;
  499. background: #EDF6FF;
  500. }
  501. .nav {
  502. background: #ffffff;
  503. border-radius: 5px;
  504. padding: 26px 24px;
  505. margin-bottom: 10px;
  506. /*color: #808695;*/
  507. }
  508. .cate_header {
  509. font-size: 14px;
  510. color: #808695;
  511. padding: 10px 0;
  512. }
  513. .cate_title {
  514. margin-right: 24px;
  515. color: #303133;
  516. }
  517. .cate_item_active {
  518. color: #2DB7F5;
  519. background: #EDF6FF;
  520. }
  521. .template_body {
  522. background: #fff;
  523. border-radius: 5px;
  524. padding: 20px 25px 70px;
  525. }
  526. .template_item {
  527. width: 280px;
  528. margin: 0 20px 60px 0;
  529. cursor: pointer;
  530. }
  531. .template_img_box {
  532. width: 260px;
  533. height: 430px;
  534. /* border: 1px solid #BFBFBF; */
  535. border-radius: 5px;
  536. overflow: hidden;
  537. position: relative;
  538. /*background: url('resources/img/mall/decorate/duihuakuang240.png');*/
  539. background-size: 100% 100%;
  540. padding: 0 10px 10px 10px;
  541. border: 1px solid #f1f1f1;
  542. }
  543. .template_img_block {
  544. width: 95.7%;
  545. height: 271px;
  546. /*height: 100%;*/
  547. position: absolute;
  548. left: 50%;
  549. transform: translateX(-50%);
  550. top: 55px;
  551. overflow: hidden;
  552. border: 1px solid #f1f1f1;
  553. }
  554. .template_img {
  555. width: 100%;
  556. position: absolute;
  557. left: 50%;
  558. transform: translateX(-50%);
  559. }
  560. .mask {
  561. background: rgba(0, 0, 0, 0.5);
  562. width: 100%;
  563. height: 271px;
  564. /*height: 100%;*/
  565. position: absolute;
  566. top: 55px;
  567. left: 0;
  568. z-index: 5;
  569. opacity: 0;
  570. transition: all 0.3s;
  571. flex-direction: column;
  572. }
  573. .template_item:hover .mask {
  574. opacity: 1;
  575. }
  576. .temp_preview_small {
  577. width: 80px;
  578. height: 30px;
  579. /*border-radius: 5px;*/
  580. text-align: center;
  581. line-height: 30px;
  582. background: #ffffff;
  583. color: #313131;
  584. font-size: 12px;
  585. }
  586. .temp_preview {
  587. width: 170px;
  588. height: 36px;
  589. border-radius: 5px;
  590. /*background: #2DB7F5;*/
  591. color: #ffffff;
  592. text-align: center;
  593. line-height: 36px;
  594. font-size: 12px;
  595. margin-bottom: 8px;
  596. border: 1px solid #fff;
  597. }
  598. .temp_preview:hover {
  599. background: #2DB7F5;
  600. border: 1px solid #2DB7F5;
  601. }
  602. .template_text {
  603. font-size: 14px;
  604. color: #515A6E;
  605. padding: 0 10px 10px;
  606. position: absolute;
  607. bottom: 0;
  608. left: 0;
  609. z-index: 7;
  610. background-color: #fff;
  611. width: 258px;
  612. }
  613. .template-text-top {
  614. font-size: 14px;
  615. color: #515A6E;
  616. padding: 10px;
  617. position: absolute;
  618. top: 0;
  619. left: 0;
  620. z-index: 7;
  621. background-color: #fff;
  622. width: 280px;
  623. }
  624. .template-disable {
  625. font-size: 12px;
  626. color: #ffffff;
  627. display: inline-block;
  628. background-color: #ff2626;
  629. width: 50px;
  630. height: 20px;
  631. line-height: 20px;
  632. text-align: center;
  633. margin-right: 10px;
  634. border-radius: 5px;
  635. }
  636. .template_title {
  637. margin: 10px 0 6px;
  638. }
  639. .use_number {
  640. font-size: 12px !important;
  641. align-items: center;
  642. }
  643. .use_number .template-price {
  644. font-size: 14px !important;
  645. align-items: center;
  646. color: #fb6638;
  647. margin-right: 5px;
  648. }
  649. .template-setting {
  650. position: absolute;
  651. right: 35px;
  652. bottom: 0px;
  653. }
  654. .template-switch {
  655. position: absolute;
  656. right: 35px;
  657. top: 18px;
  658. }
  659. /* 公共样式 */
  660. .flex {
  661. display: -webkit-box;
  662. display: -webkit-flex;
  663. /* #ifndef APP-NVUE */
  664. display: flex;
  665. /* #endif */
  666. }
  667. .flex-x-center {
  668. display: -webkit-box;
  669. display: -webkit-flex;
  670. /* #ifndef APP-NVUE */
  671. display: flex;
  672. /* #endif */
  673. -webkit-box-pack: center;
  674. -webkit-justify-content: center;
  675. -ms-flex-pack: center;
  676. justify-content: center;
  677. }
  678. .flex-x-between {
  679. display: -webkit-box;
  680. display: -webkit-flex;
  681. /* #ifndef APP-NVUE */
  682. display: flex;
  683. /* #endif */
  684. -webkit-box-pack: space-between;
  685. -webkit-justify-content: space-between;
  686. -ms-flex-pack: space-between;
  687. justify-content: space-between;
  688. }
  689. .flex-y-center {
  690. display: -webkit-box;
  691. display: -webkit-flex;
  692. /* #ifndef APP-NVUE */
  693. display: flex;
  694. /* #endif */
  695. -webkit-box-align: center;
  696. -webkit-align-items: center;
  697. -ms-flex-align: center;
  698. -ms-grid-row-align: center;
  699. align-items: center;
  700. }
  701. /* 溢出隐藏 */
  702. .over1 {
  703. text-overflow: -o-ellipsis-lastline;
  704. overflow: hidden;
  705. text-overflow: ellipsis;
  706. display: -webkit-box;
  707. -webkit-line-clamp: 1;
  708. -webkit-box-orient: vertical;
  709. }
  710. .over2 {
  711. text-overflow: -o-ellipsis-lastline;
  712. overflow: hidden;
  713. text-overflow: ellipsis;
  714. display: -webkit-box;
  715. -webkit-line-clamp: 2;
  716. -webkit-box-orient: vertical;
  717. }
  718. .pagination {
  719. width: 100%;
  720. flex-direction: row-reverse;
  721. }
  722. .pop {
  723. position: absolute;
  724. width: 100%;
  725. height: 100%;
  726. top: 0;
  727. left: 0;
  728. background: rgba(0, 0, 0, 0.5);
  729. }
  730. /* 预览框 */
  731. .preview_box {
  732. width: 377px;
  733. height: 760px;
  734. /*background: url('resources/img/mall/decorate/duihuakuang.png')no-repeat;*/
  735. background: url('resources/img/decorate/phone.png')no-repeat;
  736. position: relative;
  737. }
  738. .preview_content {
  739. background: #ffffff;
  740. width: 339px;
  741. height: 594px;
  742. position: absolute;
  743. top: 82px;
  744. left: 49.8%;
  745. transform: translateX(-50%);
  746. scrollbar-width: none;
  747. /* firefox */
  748. -ms-overflow-style: none;
  749. /* IE 10+ */
  750. overflow-x: hidden;
  751. overflow-y: auto;
  752. }
  753. .preview_content::-webkit-scrollbar {
  754. display: none;
  755. /* Chrome Safari */
  756. }
  757. .preview_img {
  758. width: 100%;
  759. }
  760. .preview .el-dialog__body {
  761. padding: 0;
  762. width: 377px;
  763. height: 760px;
  764. }
  765. .preview .el-dialog__header {
  766. display: none;
  767. }
  768. .preview .el-dialog {
  769. min-width: 377px;
  770. max-width: 377px;
  771. background: transparent;
  772. border: 0;
  773. box-shadow: none;
  774. }
  775. .header_box {
  776. padding: 25px;
  777. background: #fff;
  778. border-radius: 5px;
  779. color: #808695;
  780. margin-bottom: 10px;
  781. }
  782. .add_temp_right {
  783. width: 400px;
  784. padding: 10px 0;
  785. }
  786. .el-card {
  787. background: transparent;
  788. box-shadow: none !important;
  789. border: 0;
  790. }
  791. .el-card__body {
  792. padding: 0;
  793. }
  794. .logo_text {
  795. width: 56px;
  796. height: 21px;
  797. border-radius: 30px;
  798. background: #FF7161;
  799. text-align: center;
  800. line-height: 21px;
  801. color: #fff;
  802. }
  803. .logo_text2 {
  804. background: #C5C8CE;
  805. }
  806. .pay-box {
  807. padding: 0 30px;
  808. }
  809. </style>