diff --git a/.env.test b/.env.test index afb777c..1879950 100644 --- a/.env.test +++ b/.env.test @@ -1,3 +1,4 @@ # VITE_API_BASE='https://hwjb.homilychart.com/gold_htms_prod' VITE_API_BASE='https://hwjb.homilychart.com/admin/' -# VITE_API_BASE='http://18.143.76.3:10704/' \ No newline at end of file +# VITE_API_BASE='http://18.143.76.3:10704/' +VITE_UPLOAD_URL=https://api.homilychart.com/hljw/api/aws/upload \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index d981d98..de43ca2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -3522,9 +3522,8 @@ }, "node_modules/dayjs-plugin-utc": { "version": "0.1.2", - "resolved": "https://registry.npmjs.org/dayjs-plugin-utc/-/dayjs-plugin-utc-0.1.2.tgz", - "integrity": "sha512-ExERH5o3oo6jFOdkvMP3gytTCQ9Ksi5PtylclJWghr7k7m3o2U5QrwtdiJkOxLOH4ghr0EKhpqGefzGz1VvVJg==", - "license": "MIT" + "resolved": "https://registry.npmmirror.com/dayjs-plugin-utc/-/dayjs-plugin-utc-0.1.2.tgz", + "integrity": "sha512-ExERH5o3oo6jFOdkvMP3gytTCQ9Ksi5PtylclJWghr7k7m3o2U5QrwtdiJkOxLOH4ghr0EKhpqGefzGz1VvVJg==" }, "node_modules/de-indent": { "version": "1.0.2", diff --git a/src/views/refund/addCoinRefund.vue b/src/views/refund/addCoinRefund.vue index 4504f1e..c7e398c 100644 --- a/src/views/refund/addCoinRefund.vue +++ b/src/views/refund/addCoinRefund.vue @@ -152,12 +152,31 @@ const rules = reactive({ ] }) + +// 取消按钮 +const cancelExceptJwcode = function () { + addRefund.value = { + jwcode: addRefund.value.jwcode, // 保留精网号 + goodsName: '', + refundType: '', + refundModel: 0, + permanentGold: '', + freeGold: '', + taskGold: '', + sumGold: 0, + remark: '', + adminId: adminData.value.id + } + addRe.value.typeR = '0' +} + // 查找客户信息的方法 const user = ref({ firstRechargeTime: '' }) const getUser = async function (jwcode) { trimJwCode(); + cancelExceptJwcode(); try { // 发送POST请求 const result = await API({ @@ -190,7 +209,7 @@ const getUser = async function (jwcode) { } catch (error) { console.log("请求失败", error); ElMessage.error("查询失败,请检查精网号是否正确"); - // 在这里可以处理错误逻辑,比如显示错误提示等 + } } @@ -222,10 +241,14 @@ const getRefundTypes = async function () { } } + + + // 根据精网号查询商品 const goodsName = ref([]) const getGoods = async function (jwcode) { trimJwCode(); + // 只有精网号存在时才发送请求 if (!addRefund.value.jwcode) { goodsName.value = []; // 清空商品数据 @@ -234,7 +257,6 @@ const getGoods = async function (jwcode) { try { // 发送POST请求 const result = await API({ - // url: 'http://39.101.133.168:8828/live_mall/api/product/all', //需要接口 url: '/refund/selectGoods', data: { jwcode: addRefund.value.jwcode