Browse Source

add upload code in env.test, and modified refund code

zhangrenyuan/feature-20250623164058-金币前端
zry 2 days ago
parent
commit
44b73c5b8b
  1. 1
      .env.test
  2. 5
      package-lock.json
  3. 26
      src/views/refund/addCoinRefund.vue

1
.env.test

@ -1,3 +1,4 @@
# VITE_API_BASE='https://hwjb.homilychart.com/gold_htms_prod' # VITE_API_BASE='https://hwjb.homilychart.com/gold_htms_prod'
VITE_API_BASE='https://hwjb.homilychart.com/admin/' VITE_API_BASE='https://hwjb.homilychart.com/admin/'
# VITE_API_BASE='http://18.143.76.3:10704/' # VITE_API_BASE='http://18.143.76.3:10704/'
VITE_UPLOAD_URL=https://api.homilychart.com/hljw/api/aws/upload

5
package-lock.json

@ -3522,9 +3522,8 @@
}, },
"node_modules/dayjs-plugin-utc": { "node_modules/dayjs-plugin-utc": {
"version": "0.1.2", "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": { "node_modules/de-indent": {
"version": "1.0.2", "version": "1.0.2",

26
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({ const user = ref({
firstRechargeTime: '' firstRechargeTime: ''
}) })
const getUser = async function (jwcode) { const getUser = async function (jwcode) {
trimJwCode(); trimJwCode();
cancelExceptJwcode();
try { try {
// POST // POST
const result = await API({ const result = await API({
@ -190,7 +209,7 @@ const getUser = async function (jwcode) {
} catch (error) { } catch (error) {
console.log("请求失败", error); console.log("请求失败", error);
ElMessage.error("查询失败,请检查精网号是否正确"); ElMessage.error("查询失败,请检查精网号是否正确");
//
} }
} }
@ -222,10 +241,14 @@ const getRefundTypes = async function () {
} }
} }
// //
const goodsName = ref([]) const goodsName = ref([])
const getGoods = async function (jwcode) { const getGoods = async function (jwcode) {
trimJwCode(); trimJwCode();
// //
if (!addRefund.value.jwcode) { if (!addRefund.value.jwcode) {
goodsName.value = []; // goodsName.value = []; //
@ -234,7 +257,6 @@ const getGoods = async function (jwcode) {
try { try {
// POST // POST
const result = await API({ const result = await API({
// url: 'http://39.101.133.168:8828/live_mall/api/product/all', //
url: '/refund/selectGoods', url: '/refund/selectGoods',
data: { data: {
jwcode: addRefund.value.jwcode jwcode: addRefund.value.jwcode

Loading…
Cancel
Save