Răsfoiți Sursa

feat: 商品富文本encodeurl保存

Sun 3 ani în urmă
părinte
comite
4c66a68c8b
1 a modificat fișierele cu 2 adăugiri și 1 ștergeri
  1. 2 1
      src/views/business/goods/add.vue

+ 2 - 1
src/views/business/goods/add.vue

@@ -166,7 +166,8 @@ export default {
       this.$refs.addItem.validate((valid, items) => {
         if (valid) {
           this.addData.skuList = this.products
-          addGoods(this.addData).then(res => {
+          const { description, ...rest } = this.addData
+          addGoods({...rest, ...{description: encodeURI(description) }}).then(res => {
             if (res.code === 0) {
               this.$message({
                 message: this.addData.goodsId ? '修改成功!' : '添加成功!',