index.vue 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848
  1. <template>
  2. <div class="peripheral">
  3. <van-tabs
  4. :active="active"
  5. title-active-color="#6600FF"
  6. color="#6600FF"
  7. title-inactive-color="#666666"
  8. line-width="120px"
  9. @click="changeTopTabs"
  10. >
  11. <van-tab title="新增发布">
  12. <div class="tabs-box">
  13. <div class="white-box part-1">
  14. <div class="custom-white-box-content">
  15. <div class="custom-input-box">
  16. <input
  17. type="text"
  18. placeholder="请填写店名"
  19. v-model="form.businessName"
  20. />
  21. </div>
  22. </div>
  23. <ul class="custom-select-list">
  24. <li
  25. style="width: 25%"
  26. v-for="item in quickList"
  27. v-if="item.value !== ''"
  28. :key="item.value"
  29. :class="[
  30. quickSleced.value && item.value === quickSleced.value
  31. ? 'active'
  32. : '',
  33. ]"
  34. @click="quickSelect(item)"
  35. >
  36. {{ item.label }}
  37. </li>
  38. </ul>
  39. </div>
  40. <div class="white-box page-2">
  41. <div class="custom-item-tit">
  42. <p class="tit">商家地址</p>
  43. </div>
  44. <div class="address custom-input-box">
  45. <input
  46. type="text"
  47. v-model="form.businessAddress"
  48. placeholder="请输入商家地址"
  49. />
  50. </div>
  51. <div class="custom-item-tit">
  52. <p class="tit">商家电话</p>
  53. </div>
  54. <div class="custom-white-box-content">
  55. <div class="icon-input-box">
  56. <div class="inp custom-input-box">
  57. <input
  58. type="text"
  59. v-model="form.businessPhone"
  60. placeholder="请输入商家电话"
  61. />
  62. </div>
  63. <div class="icon">
  64. <i class="iconfont icon-dianhua1"></i>
  65. </div>
  66. </div>
  67. </div>
  68. <div class="block-cell-item">
  69. <div class="custom-item-tit">
  70. <p class="tit">商家简介</p>
  71. </div>
  72. <div class="tit">
  73. <van-uploader
  74. :max-count="12"
  75. @delete="deleteFileList"
  76. :file-list="fileUrlList"
  77. @after-read="afterRead"
  78. :show-upload="true"
  79. >
  80. </van-uploader>
  81. </div>
  82. </div>
  83. <div class="custom-textarea-box">
  84. <van-field
  85. autosize
  86. type="textarea"
  87. placeholder="请填写简介"
  88. :value="form.introduction"
  89. :maxlength="500"
  90. show-word-limit
  91. @change="getIntroduction"
  92. >
  93. </van-field>
  94. </div>
  95. </div>
  96. </div>
  97. <div class="repair-bottom bottom-button" @click="save()">
  98. <div class="btn">发布</div>
  99. </div>
  100. </van-tab>
  101. <van-tab title="发布记录">
  102. <div class="tabs-box">
  103. <van-tabs
  104. id="activeName"
  105. :active="activeName"
  106. color="#6600FF"
  107. title-active-color="#6600FF"
  108. title-inactive-color="#666666"
  109. @change="selectChange"
  110. >
  111. <van-tab
  112. v-if="tabsList.length != 0"
  113. v-for="item in tabsList"
  114. :title="item.label"
  115. :name="item.value"
  116. >
  117. <div class="tab-tab-box">
  118. <div class="tab-tab-card" v-for="item in list">
  119. <div class="card-top">
  120. <div class="left">
  121. <div class="top">{{ item.businessName }}</div>
  122. <div class="bottom">入驻时间:{{ item.releaseTime }}</div>
  123. </div>
  124. <div class="right">
  125. <span class="normal-tip z-bg yd">{{ item.type }}</span>
  126. <div class="bottom"></div>
  127. </div>
  128. </div>
  129. <div class="card-bottom">
  130. <span
  131. class="normal-button-app z-bt"
  132. v-if="item.source === '2'"
  133. @click.stop="editPeripheral(item.id)"
  134. >编辑</span
  135. >
  136. <span
  137. class="normal-button-app y-bt"
  138. @click.stop="offShelf(item.id)"
  139. >下架</span
  140. >
  141. </div>
  142. </div>
  143. </div>
  144. </van-tab>
  145. </van-tabs>
  146. </div>
  147. </van-tab>
  148. </van-tabs>
  149. </div>
  150. </template>
  151. <script>
  152. // import PositionNav from "@/components/position-nav";
  153. // import Base from "@/pages/base/base";
  154. // import { Dialog, Toast } from "vant";
  155. // import axios from "axios";
  156. import { add, list, edit, getById } from "@/js_sdk/api_periphery.js";
  157. import { getByCodes, getUserLocalStorageInfo } from "@/js_sdk/http.js";
  158. import common from "../../utils/common.js";
  159. // import TelNum from "@/components/tel-number";
  160. // import auth from "@/service/auth";
  161. export default {
  162. // components: {
  163. // PositionNav,
  164. // TelNum,
  165. // },
  166. data() {
  167. return {
  168. dc_key: ["periphery_type"],
  169. active: 0,
  170. tabActive: "",
  171. quickSleced: {},
  172. quickList: [],
  173. fileList: [],
  174. activeName: "",
  175. tabsList: [],
  176. list: [],
  177. dic_SelectList: {},
  178. fileUrlList: [],
  179. form: {},
  180. params: {
  181. pageNum: 1,
  182. pageSize: 10,
  183. releaseType: "periphery",
  184. status: "published",
  185. type: "",
  186. },
  187. totalPage: 1,
  188. };
  189. },
  190. onLoad() {
  191. // this.active = this.$route.query.active ? this.$route.query.active : 0;
  192. // this.initDict(this.dc_key).then((res) => {
  193. // this.quickList = this.dc_data.periphery_type;
  194. // this.tabsList = this.dc_data.periphery_type;
  195. // this.selectData();
  196. // });
  197. this.getByCodes();
  198. this.initForm();
  199. },
  200. onReachBottom() {
  201. // this.params.pageNum += 1;
  202. // this.selectData();
  203. // console.log("滑动到距离底部100px的时候触发,可以放 。。业务逻辑");
  204. }, //下拉执行的时候触发 (下拉刷新)
  205. methods: {
  206. getIntroduction(e) {
  207. console.log(e.detail);
  208. this.form.introduction = e.detail;
  209. },
  210. async getByCodes() {
  211. let that = this;
  212. let data = await getByCodes(JSON.stringify(this.dc_key));
  213. that.dic_SelectList = common.handleDicList(data);
  214. that.quickList = this.dic_SelectList.periphery_type;
  215. that.tabsList = [
  216. { label: "全部", value: "" },
  217. ...this.dic_SelectList.periphery_type,
  218. ];
  219. // that.selectData();
  220. this.selectData();
  221. },
  222. go() {
  223. this.$common.goBack();
  224. },
  225. // addressChange(childValue) {
  226. // this.form.businessAddress = childValue;
  227. // },
  228. offShelf(id) {
  229. wx.showModal({
  230. title: "提示",
  231. content: "确认下架该信息吗?",
  232. })
  233. .then((res) => {
  234. edit({ id: id, status: "off_shelf" }).then((res) => {
  235. this.$showToast("下架成功");
  236. this.list = [];
  237. this.selectData();
  238. });
  239. })
  240. .catch((err) => {
  241. this.$showToast("已取消");
  242. });
  243. },
  244. changeTopTabs(name) {
  245. console.log(this.active);
  246. console.log(name);
  247. this.active = name.detail.index;
  248. if (this.active === 1) {
  249. this.selectComponent("#activeName").resize();
  250. this.initForm();
  251. this.fileList = [];
  252. this.quickSleced = {};
  253. this.fileUrlList = [];
  254. }
  255. },
  256. editPeripheral(id) {
  257. const _this = this;
  258. getById({ id: id }).then((res) => {
  259. if (res.data) {
  260. _this.form = Object.assign({}, _this.form, res.data);
  261. _this.form.releaseTime = _this.$common.transDate(
  262. _this.form.releaseTime
  263. );
  264. const typeName = _this.dic_SelectList.periphery_type[_this.form.type];
  265. _this.quickSleced.value = _this.form.type;
  266. if (_this.form.fileUrl && _this.form.fileUrl.length > 2) {
  267. _this.fileList = [];
  268. const fileUrlList = JSON.parse(_this.form.fileUrl);
  269. fileUrlList.forEach((item) => {
  270. _this.fileList.push(
  271. JSON.parse(
  272. '{"url":"' +
  273. item.url.replace("/server", "/smartParkH5Server") +
  274. '","isImage": true}'
  275. )
  276. );
  277. });
  278. console.log(fileUrlList);
  279. _this.fileUrlList = fileUrlList;
  280. }
  281. _this.active = 0;
  282. }
  283. });
  284. },
  285. selectData() {
  286. const _this = this;
  287. list(_this.params).then((res) => {
  288. if (res.data) {
  289. res.data.forEach(function (item) {
  290. const jsonMap = _this.getItemJson(item);
  291. _this.list.push(jsonMap);
  292. });
  293. }
  294. console.log(_this.list);
  295. });
  296. },
  297. selectChange(name, title) {
  298. console.log(name.detail.name);
  299. console.log(
  300. "this.tabsList[this.activeName]",
  301. this.tabsList[this.activeName]
  302. );
  303. this.list = [];
  304. this.params.type = !name.detail.name ? "" : name.detail.name;
  305. console.log(this.params.type);
  306. this.selectData();
  307. },
  308. getItemJson: function (item) {
  309. item.releaseTime = this.$common.transDate(item.releaseTime);
  310. let obj = {};
  311. for (let i = 0; i < this.dic_SelectList.periphery_type.length; i++) {
  312. obj[this.dic_SelectList.periphery_type[i].value] =
  313. this.dic_SelectList.periphery_type[i].label;
  314. }
  315. item.type = obj[item.type];
  316. return item;
  317. },
  318. deleteFileList(event) {
  319. this.fileUrlList.splice(event.detail.index, 1);
  320. },
  321. afterRead(event) {
  322. console.log(event);
  323. let that = this;
  324. const { file } = event.detail;
  325. uni.uploadFile({
  326. url: that.$constant.BASE_URI + "/wx/fileController/upload2",
  327. filePath: file.url,
  328. name: "file",
  329. formData: { user: "test" },
  330. success(res) {
  331. // 上传完成需要更新 fileList
  332. let data = JSON.parse(res.data);
  333. that.fileUrlList.push({
  334. name: JSON.parse(data.data[0]).name,
  335. size: JSON.parse(data.data[0]).size,
  336. imgUrl: "/FileController/download/" + data.data[1],
  337. url:
  338. that.$constant.BASE_URI +
  339. "/FileController/download/" +
  340. data.data[1],
  341. isImage: true,
  342. });
  343. },
  344. fail(res) {},
  345. });
  346. },
  347. save() {
  348. let that = this;
  349. console.log(123123);
  350. console.log(that.form);
  351. console.log(that.fileUrlList);
  352. try {
  353. that.form.fileUrl = JSON.stringify(that.fileUrlList);
  354. that.form.type = that.quickSleced.value;
  355. that.form.releaseTime = that.$common.transServDate(new Date());
  356. if (this.form.id !== "") {
  357. edit(this.form).then((res) => {
  358. that.$showToast("发布成功");
  359. console.log(res);
  360. that.active = 1;
  361. that.initForm();
  362. that.fileList = [];
  363. that.quickSleced = {};
  364. that.fileUrlList = [];
  365. that.list = [];
  366. that.selectData();
  367. // this.$router.push({
  368. // path: '/peripheralService-app', query: { active: 1 }
  369. // })
  370. });
  371. } else {
  372. add(that.form).then((res) => {
  373. that.$showToast("发布成功");
  374. that.active = 1;
  375. that.initForm();
  376. that.fileList = [];
  377. that.quickSleced = {};
  378. that.fileUrlList = [];
  379. that.list = [];
  380. that.selectData();
  381. // this.$router.push({
  382. // path: '/peripheralService-app', query: { active: 1 }
  383. // })
  384. });
  385. }
  386. } catch (error) {
  387. console.log(error);
  388. }
  389. },
  390. initForm() {
  391. let form = {
  392. id: "",
  393. businessName: "",
  394. type: "",
  395. businessAddress: "",
  396. businessPhone: "",
  397. fileUrl: "",
  398. introduction: "",
  399. source: "2",
  400. releaseType: "periphery",
  401. publisherUserId: getUserLocalStorageInfo().user.id,
  402. status: "published",
  403. };
  404. this.form = form;
  405. },
  406. quickSelect(item) {
  407. if (this.quickSleced.value && this.quickSleced.value === item.value) {
  408. this.quickSleced = {};
  409. } else {
  410. this.quickSleced = item;
  411. }
  412. },
  413. beforeDelete(file, detail) {
  414. // this.handleImagUrlList = []
  415. const vm = this;
  416. // name.index代表图片的索引
  417. vm.fileUrlList.splice(detail.index, 1);
  418. return (file, name) => {
  419. const fileIndex = name.index;
  420. vm.fileUrlList[detail.index].splice(fileIndex, 1);
  421. };
  422. },
  423. /**
  424. * 上传图片
  425. */
  426. uploadImg(file) {
  427. const _this = this;
  428. const formParam = new FormData(); // 创建form对象
  429. formParam.append("file", file.file); // 通过append向form对象添加数据
  430. console.log(formParam.get("file")); // FormData私有类对象,访问不到,可以通过get判断值是否传进去
  431. // upload(formParam).then((res) => {
  432. // console.log(res)
  433. // })
  434. const config = {
  435. headers: {
  436. "Content-Type": "multipart/form-data",
  437. "MVVM-Key": String(new Date().getTime()),
  438. xx: "anything",
  439. }, // 这里是重点,需要和后台沟通好请求头,Content-Type不一定是这个值
  440. }; // 添加请求头
  441. return new Promise((resolve, reject) => {
  442. axios
  443. .post(
  444. "/smartParkH5Server/wx/fileController/upload",
  445. formParam,
  446. config
  447. )
  448. .then((response) => {
  449. debugger;
  450. let files = response.data.data.substring(
  451. 1,
  452. response.data.data.length
  453. );
  454. files = files.substring(0, files.length - 1);
  455. _this.fileUrlList.push(_this.$common.castEval(files));
  456. })
  457. .catch((err, x) => {
  458. reject(err, x);
  459. });
  460. });
  461. },
  462. },
  463. };
  464. </script>
  465. <style lang="scss" type="text/scss" scoped>
  466. .peripheral {
  467. /deep/.van-tabs__wrap {
  468. height: 100rpx;
  469. background: #ffffff;
  470. box-shadow: 0px 5rpx 10rpx 0px rgba(0, 0, 0, 0.05);
  471. margin-bottom: 10rpx;
  472. }
  473. .tel-num {
  474. margin: 0 25rpx;
  475. border-top: 1rpx solid rgba(242, 242, 242, 1);
  476. border-bottom: 1rpx solid rgba(242, 242, 242, 1);
  477. }
  478. .tabs-box {
  479. margin: 20rpx 0;
  480. .part-1 {
  481. background: #fff;
  482. padding: 40rpx 30rpx 20rpx;
  483. margin-bottom: 20rpx;
  484. }
  485. .page-2 {
  486. background: #fff;
  487. .block-cell-item {
  488. padding-top: 0;
  489. }
  490. .custom-textarea-box {
  491. padding-bottom: 40rpx;
  492. }
  493. .address {
  494. .position-nav {
  495. border-radius: 10rpx;
  496. }
  497. }
  498. }
  499. /deep/.van-tab {
  500. padding: 0 30rpx;
  501. span {
  502. display: inline-block;
  503. text-align: center;
  504. font-size: 30rpx;
  505. }
  506. }
  507. .tab-tab-box {
  508. padding: 30rpx 30rpx 0;
  509. .tab-tab-card {
  510. background: #ffffff;
  511. box-shadow: 0px 0px 15rpx 0px rgba(0, 0, 0, 0.1);
  512. border-radius: 10rpx;
  513. padding: 40rpx 30rpx 20rpx;
  514. margin-bottom: 20rpx;
  515. .card-top {
  516. @include flex;
  517. .left {
  518. width: 500rpx;
  519. .top {
  520. width: 500rpx;
  521. font-size: 32rpx;
  522. color: #333;
  523. // @include line-over;
  524. }
  525. .bottom {
  526. font-size: 28rpx;
  527. color: #999999;
  528. }
  529. }
  530. .right {
  531. align-self: flex-start;
  532. text-align: center;
  533. span {
  534. padding: 0 13rpx;
  535. font-size: 24rpx;
  536. line-height: 40rpx;
  537. }
  538. }
  539. }
  540. .card-bottom {
  541. text-align: right;
  542. height: 80rpx;
  543. display: flex;
  544. justify-content: flex-end;
  545. align-items: center;
  546. }
  547. &:last-child {
  548. margin-bottom: 0px;
  549. }
  550. }
  551. }
  552. }
  553. }
  554. </style>
  555. <style lang="scss">
  556. .custom-select-list {
  557. color: #666666;
  558. width: 100%;
  559. display: flex;
  560. flex-wrap: wrap;
  561. justify-content: space-between;
  562. li {
  563. font-size: 22rpx;
  564. margin-bottom: 25rpx;
  565. padding: 20rpx 0;
  566. width: 22%;
  567. text-align: center;
  568. overflow: hidden;
  569. text-overflow: ellipsis;
  570. white-space: nowrap;
  571. border-radius: 10rpx;
  572. border: 2rpx solid #cccccc;
  573. &.active {
  574. color: #6600ff;
  575. border-color: #6600ff;
  576. }
  577. }
  578. }
  579. .white-box {
  580. width: 100%;
  581. font-size: 28px;
  582. padding: 0 40px;
  583. background-color: #ffffff;
  584. box-sizing: border-box;
  585. &:not(:last-child) {
  586. margin-bottom: 30px;
  587. }
  588. .flex-item {
  589. align-items: center;
  590. .tel-box {
  591. display: flex;
  592. align-items: center;
  593. justify-content: flex-end;
  594. .custom-tel-component {
  595. margin-left: 20px;
  596. }
  597. }
  598. }
  599. .cell-item {
  600. color: var(--Black);
  601. padding: 30px 0;
  602. display: flex;
  603. justify-content: space-between;
  604. position: relative;
  605. &::after {
  606. position: absolute;
  607. box-sizing: border-box;
  608. content: " ";
  609. pointer-events: none;
  610. right: 0;
  611. bottom: 0;
  612. left: 0;
  613. border-bottom: 1px solid #ebedf0;
  614. -webkit-transform: scaleY(0.5);
  615. transform: scaleY(0.5);
  616. }
  617. > .label {
  618. flex: 1;
  619. width: 30%;
  620. .tips {
  621. font-size: 22px;
  622. color: var(--greyColor);
  623. }
  624. &.required {
  625. position: relative;
  626. &::after {
  627. content: "*";
  628. color: var(--Red);
  629. position: absolute;
  630. font-size: 30px;
  631. top: -15px;
  632. left: -15px;
  633. }
  634. }
  635. }
  636. > .tit {
  637. color: var(--Black);
  638. flex: 1;
  639. width: 70%;
  640. text-align: right;
  641. .van-radio-group {
  642. display: flex;
  643. justify-content: flex-end;
  644. .van-radio {
  645. &:not(:first-child) {
  646. margin-left: 30px;
  647. }
  648. }
  649. }
  650. }
  651. }
  652. .block-cell-item {
  653. color: var(--Black);
  654. padding: 30px 0;
  655. position: relative;
  656. &::after {
  657. position: absolute;
  658. box-sizing: border-box;
  659. content: " ";
  660. pointer-events: none;
  661. right: 16px;
  662. bottom: 0;
  663. left: 16px;
  664. border-bottom: 1px solid #ebedf0;
  665. -webkit-transform: scaleY(0.5);
  666. transform: scaleY(0.5);
  667. }
  668. .label {
  669. width: 100%;
  670. padding-bottom: 30px;
  671. &.required {
  672. position: relative;
  673. &::after {
  674. content: "*";
  675. color: var(--Red);
  676. position: absolute;
  677. font-size: 30px;
  678. top: -15px;
  679. left: -15px;
  680. }
  681. }
  682. .tips {
  683. font-size: 22px;
  684. color: var(--greyColor);
  685. }
  686. }
  687. .tit {
  688. width: 100%;
  689. color: var(--Black);
  690. .van-radio-group {
  691. display: flex;
  692. justify-content: flex-end;
  693. .van-radio {
  694. &:not(:first-child) {
  695. margin-left: 30px;
  696. }
  697. }
  698. }
  699. .textarea {
  700. background-color: #f8f8f8;
  701. font-size: 30px;
  702. color: #b7b7b7;
  703. border-radius: 10px;
  704. padding: 30px;
  705. word-break: break-all;
  706. }
  707. }
  708. }
  709. .custom-white-box-content {
  710. padding-bottom: 30px;
  711. }
  712. }
  713. .custom-item-tit {
  714. height: 100rpx;
  715. font-size: 32rpx;
  716. color: #333333;
  717. padding: 20rpx 0;
  718. position: relative;
  719. display: flex;
  720. justify-content: space-between;
  721. align-items: center;
  722. box-sizing: border-box;
  723. .tit {
  724. padding-left: 20rpx;
  725. position: relative;
  726. &::after {
  727. content: "";
  728. width: 6rpx;
  729. height: 90%;
  730. background-color: #976dec;
  731. position: absolute;
  732. border-radius: 3rpx;
  733. position: absolute;
  734. left: 0;
  735. top: 50%;
  736. transform: translateY(-50%);
  737. }
  738. }
  739. .more {
  740. font-size: 28rpx;
  741. color: #6600ff;
  742. display: flex;
  743. align-items: center;
  744. i {
  745. padding-left: 10rpx;
  746. color: #b5b5b5;
  747. }
  748. }
  749. }
  750. .bottom-button {
  751. position: fixed;
  752. bottom: 0;
  753. left: 0;
  754. width: 100%;
  755. height: 100rpx;
  756. font-size: 36rpx;
  757. color: #ffffff;
  758. background-color: #60f;
  759. display: flex;
  760. align-items: center;
  761. justify-content: center;
  762. .btn {
  763. color: #fff;
  764. background-color: #6600ff;
  765. font-size: 34rpx;
  766. border-radius: 10rpx;
  767. }
  768. }
  769. .custom-input-box {
  770. height: 80rpx;
  771. color: #333333;
  772. font-size: 30rpx;
  773. background: #f8f8f8;
  774. border-radius: 10rpx;
  775. .txt {
  776. width: 100%;
  777. height: 100%;
  778. text-align: center;
  779. padding: 0 20rpx;
  780. line-height: 80rpx;
  781. box-sizing: border-box;
  782. }
  783. input {
  784. width: 100%;
  785. height: 100%;
  786. background: transparent;
  787. border: transparent;
  788. padding: 0 20rpx;
  789. color: #333333;
  790. box-sizing: border-box;
  791. }
  792. }
  793. .normal-button-app {
  794. font-size: 26rpx;
  795. padding: 13rpx 35rpx;
  796. border-radius: 30rpx;
  797. margin-left: 26rpx;
  798. // 紫色
  799. &.z-bt {
  800. border: 1px solid #6600ff;
  801. background: #ecdfff;
  802. color: #6600ff;
  803. }
  804. // 黄色
  805. &.y-bt {
  806. border: 1px solid #ffa913;
  807. background: #fff7e8;
  808. color: #ffa913;
  809. }
  810. //绿色
  811. &.l-bt {
  812. border: 1px solid #54d478;
  813. background: #9bd8ac4d;
  814. color: #54d478;
  815. }
  816. //红色
  817. &.r-bt {
  818. border: 1px solid #f61212;
  819. background: #ffebeb;
  820. color: #e80f0f;
  821. }
  822. // 灰色
  823. &.h-bt {
  824. border: 1px solid #888888;
  825. background: #fafafa;
  826. color: #555555;
  827. }
  828. }
  829. </style>