addGoodDetils.vue 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <template>
  2. <view class="container">
  3. <input-goods-detils @getProductContent="getProductContent" title="填写商品描述" :prodectContent="goodsDis" :maxLength="200"></input-goods-detils>
  4. <view class="handle"><view class="handle_button" @click="save">保存</view></view>
  5. </view>
  6. </template>
  7. <script>
  8. // +----------------------------------------------------------------------
  9. // | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
  10. // +----------------------------------------------------------------------
  11. // | Copyright (c) 2016~2024 https://www.crmeb.com All rights reserved.
  12. // +----------------------------------------------------------------------
  13. // | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
  14. // +----------------------------------------------------------------------
  15. // | Author: CRMEB Team <admin@crmeb.com>
  16. // +----------------------------------------------------------------------
  17. import inputGoodsDetils from '../components/inputGoodsDetils.vue';
  18. import { navigateTo, navigateBack, setStorage, getStorage } from '../../../libs/uniApi.js';
  19. export default {
  20. components: {
  21. inputGoodsDetils
  22. },
  23. data() {
  24. return {
  25. goodsDis: {imageList: []},
  26. }
  27. },
  28. created() {
  29. this.initData();
  30. },
  31. methods: {
  32. initData() {
  33. if(getStorage('goodsDis')) {
  34. this.goodsDis = getStorage('goodsDis');
  35. }
  36. },
  37. getProductContent(obj) {
  38. this.goodsDis = obj;
  39. },
  40. save() {
  41. setStorage('goodsDis', this.goodsDis);
  42. navigateBack(1);
  43. }
  44. }
  45. }
  46. </script>
  47. <style lang="scss" scoped>
  48. .container {
  49. padding-top: 20rpx;
  50. }
  51. .handle {
  52. width: 100%;
  53. height: 126rpx;
  54. background: #ffffff;
  55. display: flex;
  56. align-items: center;
  57. justify-content: center;
  58. position: fixed;
  59. left: 0;
  60. bottom: 0;
  61. &_button {
  62. width: 690rpx;
  63. height: 86rpx;
  64. background: #e93323;
  65. border-radius: 43px;
  66. display: flex;
  67. align-items: center;
  68. justify-content: center;
  69. font-size: 32rpx;
  70. color: #ffffff;
  71. }
  72. }
  73. </style>