-
![]()
+
{{ goodsInfo.name }}
¥{{ goodsInfo.price }}
@@ -387,6 +387,7 @@ import {
doPay,
getMemberInfoById,
} from '@/api/cashier'
+import { resolveImageUrl } from '@/utils/image'
import { getOrderInfo } from '@/api/order'
import { getUserId, setUserId, removeUserId } from '@/utils/auth'
import switchMemberDialog from './components/switchMemberDialog'
@@ -560,6 +561,9 @@ export default {
this.getCartList()
},
methods: {
+ getImageUrl(path) {
+ return resolveImageUrl(this.imagePath, path)
+ },
// 初始化数据
initCashier() {
const app = this
diff --git a/src/views/content/article/index.vue b/src/views/content/article/index.vue
index 42139bb..7f2cb64 100644
--- a/src/views/content/article/index.vue
+++ b/src/views/content/article/index.vue
@@ -165,7 +165,7 @@
>
@@ -243,6 +243,8 @@ import {
saveArticle,
} from '@/api/article'
import { getToken } from '@/utils/auth'
+import { resolveImageUrl } from '@/utils/image'
+import { getUploadFileName } from '@/utils/upload'
export default {
name: 'ContentArticleIndex',
data() {
@@ -304,6 +306,9 @@ export default {
this.getList()
},
methods: {
+ getImageUrl(path) {
+ return resolveImageUrl(this.imagePath, path)
+ },
// 查询文章列表
getList() {
this.loading = true
@@ -366,8 +371,10 @@ export default {
})
},
// 图片上传成功
- handleUploadSuccess(file) {
- this.form.image = file.data.fileName
+ handleUploadSuccess(res) {
+ const fileName = getUploadFileName(res)
+ if (!fileName) return
+ this.form.image = fileName
},
// 新增按钮操作
handleAdd() {
diff --git a/src/views/content/banner/list.vue b/src/views/content/banner/list.vue
index fff4a77..71226d4 100644
--- a/src/views/content/banner/list.vue
+++ b/src/views/content/banner/list.vue
@@ -93,7 +93,7 @@
-
+
@@ -221,7 +221,7 @@
>
@@ -279,6 +279,8 @@ import {
getBannerInfo,
saveBanner,
} from '@/api/banner'
+import { resolveImageUrl } from '@/utils/image'
+import { getUploadFileName } from '@/utils/upload'
export default {
name: 'ContentBannerList',
data() {
@@ -341,6 +343,9 @@ export default {
this.getList()
},
methods: {
+ getImageUrl(path) {
+ return resolveImageUrl(this.imagePath, path)
+ },
// 查询列表
getList() {
this.loading = true
@@ -440,7 +445,7 @@ export default {
this.form = response.data.bannerInfo
this.uploadFiles = [
{
- url: response.data.imagePath + this.form.image,
+ url: resolveImageUrl(response.data.imagePath, this.form.image),
status: 'finished',
},
]
@@ -462,8 +467,10 @@ export default {
})
.catch(() => {})
},
- handleUploadSuccess(file) {
- this.form.image = file.data.fileName
+ handleUploadSuccess(res) {
+ const fileName = getUploadFileName(res)
+ if (!fileName) return
+ this.form.image = fileName
},
},
}
diff --git a/src/views/content/look/index.vue b/src/views/content/look/index.vue
new file mode 100644
index 0000000..9080859
--- /dev/null
+++ b/src/views/content/look/index.vue
@@ -0,0 +1,140 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 搜索
+ 重置
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ parseTime(scope.row.createTime) }}
+
+
+
+
+ 下架
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/content/navigation/index.vue b/src/views/content/navigation/index.vue
index a68684f..2b36a57 100644
--- a/src/views/content/navigation/index.vue
+++ b/src/views/content/navigation/index.vue
@@ -27,7 +27,7 @@
-
+
@@ -169,6 +169,8 @@ import {
saveNavigation
} from '@/api/navigation'
import { getToken } from '@/utils/auth'
+import { resolveImageUrl } from '@/utils/image'
+import { getUploadFileName } from '@/utils/upload'
export default {
name: 'ContentNavigationIndex',
data() {
@@ -203,6 +205,7 @@ export default {
// 表单参数
form: {
id: '',
+ oldName: '',
name: '',
tips: '',
url: '',
@@ -222,6 +225,9 @@ export default {
this.getNavigation()
},
methods: {
+ getImageUrl(path) {
+ return resolveImageUrl(this.imagePath, path)
+ },
// 查询导航栏
getNavigation() {
this.loading = true
@@ -240,10 +246,13 @@ export default {
reset() {
this.form = {
id: '',
+ oldName: '',
name: '',
+ tips: '',
icon: '',
url: '',
- sort: 0
+ sort: 0,
+ status: 'A'
}
this.resetForm('form')
},
@@ -257,8 +266,10 @@ export default {
this.handleQuery()
},
// 图片上传成功
- handleUploadSuccess(file) {
- this.form.icon = file.data.fileName
+ handleUploadSuccess(res) {
+ const fileName = getUploadFileName(res)
+ if (!fileName) return
+ this.form.icon = fileName
},
// 新增按钮操作
handleAdd() {
@@ -299,7 +310,7 @@ export default {
handleUpdate(row) {
this.reset();
this.open = true;
- this.form = row;
+ this.form = { ...row, oldName: row.name };
this.title = '修改导航';
},
// 状态修改
diff --git a/src/views/content/task/index.vue b/src/views/content/task/index.vue
new file mode 100644
index 0000000..94536c7
--- /dev/null
+++ b/src/views/content/task/index.vue
@@ -0,0 +1,766 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 搜索
+ 重置
+ 新增
+ 任务导入
+ 完成记录
+
+
+
+
+
+
+
+
+
+ {{ getTaskTypeName(scope.row.taskType) }}
+
+
+
+
+ {{ getName(storeList, scope.row.storeId) }}
+ 公共所有
+
+
+
+
+
+
+
+
+ {{ scope.row.targetGoodsIds || '全部商品' }}
+
+
+
+
+
+
+ {{ parseTime(scope.row.updateTime) }}
+
+
+
+
+
+
+
+
+
+ 完成记录
+ 修改
+ 删除
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 启用
+ 禁用
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 搜索
+ 重置
+
+
+
+
+
+
+
+
+
+ {{ getTaskTypeName(scope.row.taskType) }}
+
+
+
+
+
+
+
+ {{ scope.row.status === 'A' ? '启用' : '禁用' }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 搜索
+ 重置
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ parseTime(scope.row.lastCompleteTime) || '--' }}
+
+
+
+
+ {{ parseTime(scope.row.lastClaimTime) || '--' }}
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/coupon/coupon/index.vue b/src/views/coupon/coupon/index.vue
index 6c23dde..5d8a1a4 100644
--- a/src/views/coupon/coupon/index.vue
+++ b/src/views/coupon/coupon/index.vue
@@ -87,7 +87,7 @@
-
+
@@ -430,11 +430,11 @@
-
+
@@ -593,11 +593,11 @@
-
+
@@ -659,7 +659,7 @@
>
@@ -815,6 +815,8 @@ import {
import { getAllGroupList } from '@/api/coupon/group'
import { getTotalMember } from '@/api/statistic'
import { parseTime } from '@/utils/fuint'
+import { resolveImageUrl } from '@/utils/image'
+import { getUploadFileName } from '@/utils/upload'
// 初始表单
const initForm = {
@@ -1018,6 +1020,9 @@ export default {
this.getTotalMember()
},
methods: {
+ getImageUrl(path) {
+ return resolveImageUrl(this.imagePath, path)
+ },
// 查询列表
getList() {
this.loading = true
@@ -1332,8 +1337,10 @@ export default {
this.storeItem = newStoreItem
},
// 上传成功
- handleUploadSuccess(file) {
- this.form.image = file.data.fileName
+ handleUploadSuccess(res) {
+ const fileName = getUploadFileName(res)
+ if (!fileName) return
+ this.form.image = fileName
},
handleRemove(file, fileList) {
setTimeout(() => {
diff --git a/src/views/goods/cate/index.vue b/src/views/goods/cate/index.vue
index 960b9a5..e8929cc 100644
--- a/src/views/goods/cate/index.vue
+++ b/src/views/goods/cate/index.vue
@@ -91,7 +91,7 @@
-
+
@@ -220,7 +220,7 @@
>
@@ -267,6 +267,8 @@ import {
saveGoodsCate,
updateGoodsCateStatus,
} from '@/api/goodsCate'
+import { resolveImageUrl } from '@/utils/image'
+import { getUploadFileName } from '@/utils/upload'
export default {
name: 'GoodsCateIndex',
data() {
@@ -336,6 +338,9 @@ export default {
this.getList()
},
methods: {
+ getImageUrl(path) {
+ return resolveImageUrl(this.imagePath, path)
+ },
// 查询分类列表
getList() {
this.loading = true
@@ -439,7 +444,7 @@ export default {
getGoodsCateInfo(id).then((response) => {
this.form = response.data.cateInfo
this.uploadFiles = [
- { url: response.data.imagePath + this.form.logo, status: 'finished' },
+ { url: resolveImageUrl(response.data.imagePath, this.form.logo), status: 'finished' },
]
this.open = true
this.title = '编辑商品分类'
@@ -459,8 +464,10 @@ export default {
})
.catch(() => {})
},
- handleUploadSuccess(file) {
- this.form.logo = file.data.fileName
+ handleUploadSuccess(res) {
+ const fileName = getUploadFileName(res)
+ if (!fileName) return
+ this.form.logo = fileName
},
},
}
diff --git a/src/views/goods/components/Sku.vue b/src/views/goods/components/Sku.vue
index b4ce032..b262c18 100644
--- a/src/views/goods/components/Sku.vue
+++ b/src/views/goods/components/Sku.vue
@@ -347,12 +347,15 @@ export default {
let sn = (Math.random() + 1) * 10000000000000
this.batch.skuNo = sn.toFixed(0)
},
- onUploadImgSuccess(file, index) {
- if (!file) {
+ onUploadImgSuccess(res, index) {
+ if (!res) {
return
}
- this.uploadDomain = file.data.domain
- this.skuData.skuList[index].logo = file.data.fileName
+ const data = res.data || res
+ this.uploadDomain = data.domain || this.uploadDomain
+ const fileName = data.fileName || data.file || data.path || data.url || ''
+ if (!fileName) return
+ this.skuData.skuList[index].logo = fileName
this.$emit('skuChange', this.skuData)
},
getTable() {
diff --git a/src/views/goods/goods/goodsForm.vue b/src/views/goods/goods/goodsForm.vue
index f4cd459..74ef00b 100644
--- a/src/views/goods/goods/goodsForm.vue
+++ b/src/views/goods/goods/goodsForm.vue
@@ -146,7 +146,7 @@
>
-
+
可用
不可用
@@ -366,6 +366,8 @@
diff --git a/src/views/raffle/components/raffleTypeForm.vue b/src/views/raffle/components/raffleTypeForm.vue
new file mode 100644
index 0000000..997c372
--- /dev/null
+++ b/src/views/raffle/components/raffleTypeForm.vue
@@ -0,0 +1,179 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 提示:数值越小,排行越靠前
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 启用
+ 禁用
+
+
+
+
+
+
+
+
+
diff --git a/src/views/raffle/detail.vue b/src/views/raffle/detail.vue
new file mode 100644
index 0000000..38e1bfa
--- /dev/null
+++ b/src/views/raffle/detail.vue
@@ -0,0 +1,441 @@
+
+
+
+ 基本信息
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 用户抽奖需要消耗的银币
+
+
+
+
+
+ 用户转发获得的银币
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 特殊奖品设置
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 奖品配置
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
添加奖品
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 上传图片
+
+
+
+
+
+
+ 删除
+
+
+
+
+
+
+
+ 保存
+ 取消
+
+
+
+
+
+
+
+
diff --git a/src/views/raffle/index.vue b/src/views/raffle/index.vue
new file mode 100644
index 0000000..e9e6596
--- /dev/null
+++ b/src/views/raffle/index.vue
@@ -0,0 +1,303 @@
+
+
+
+
+
+
+
+
+
+
+
+
+ 搜索
+ 重置
+ 新增
+ 抽奖类型管理
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+ {{ scope.row.title }}
+
+
+
+
+ {{ scope.row.brief }}
+
+
+
+
+ {{ scope.row.raffleType }}
+
+
+
+
+ {{ scope.row.rafflePoint || 0 }}
+
+
+
+
+ {{ scope.row.allCnt }}
+
+
+
+
+ {{ scope.row.nowCnt }}
+
+
+
+
+ {{ scope.row.click }}
+
+
+
+
+ {{ parseTime(scope.row.createTime) }}
+
+
+
+
+
+ {{ scope.row.status === 'A' ? '正常' : '禁用' }}
+
+
+
+
+
+ 查看
+ 编辑
+ 记录
+
+ {{ scope.row.status === 'A' ? '禁用' : '启用' }}
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/raffle/record.vue b/src/views/raffle/record.vue
new file mode 100644
index 0000000..0faca3f
--- /dev/null
+++ b/src/views/raffle/record.vue
@@ -0,0 +1,228 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 搜索
+ 重置
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ {{ scope.row.point || 0 }}
+
+
+
+
+
+ {{ scope.row.win === 1 ? '已中奖' : '未中奖' }}
+
+
+
+
+
+ 未领取
+ 已领取
+ 已换分
+ 已邮寄
+
+
+
+
+ {{ parseTime(scope.row.createTime) }}
+
+
+
+
+ 标记领取
+ -
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/stock/index.vue b/src/views/stock/index.vue
index 5275422..66769c5 100644
--- a/src/views/stock/index.vue
+++ b/src/views/stock/index.vue
@@ -219,7 +219,7 @@
-
+
@@ -287,6 +287,7 @@