diff --git a/package.json b/package.json index 473f030..f2eec08 100644 --- a/package.json +++ b/package.json @@ -20,15 +20,18 @@ "core-js": "3.6.5", "echarts": "^4.2.1", "element-ui": "2.13.2", + "gsap": "^3.12.5", "js-cookie": "2.2.0", "less-loader": "^5.0.0", "moment": "^2.29.2", "normalize.css": "7.0.0", "nprogress": "0.2.0", "path-to-regexp": "2.4.0", + "three": "^0.168.0", "tinymce": "^5.10.7", "view-design": "^4.7.0", "vue": "2.6.10", + "vue-carousel-3d": "^1.0.1", "vue-count-to": "^1.0.13", "vue-router": "3.0.6", "vuex": "3.1.0", diff --git a/src/api/activity/activityUser.js b/src/api/activity/activityUser.js index fbdb163..4428f82 100644 --- a/src/api/activity/activityUser.js +++ b/src/api/activity/activityUser.js @@ -1,34 +1,35 @@ -import request from "@/utils/request"; - -export function index(params) { - return request({ - method: 'get', - url: '/api/admin/user/index', - params - }) -} - - -export function save(data) { - return request({ - url: '/api/admin/user/save', - method: 'post', - data - }) -} - -export function show(params) { - return request({ - method: 'get', - url: '/api/admin/user/show', - params - }) -} - -export function destroy(params) { - return request({ - method: 'get', - url: '/api/admin/user/destroy', - params - }) +import request from "@/utils/request"; + +export function index(params,isLoading=true) { + return request({ + method: 'get', + url: '/api/admin/user/index', + params, + isLoading + }) +} + + +export function save(data) { + return request({ + url: '/api/admin/user/save', + method: 'post', + data + }) +} + +export function show(params) { + return request({ + method: 'get', + url: '/api/admin/user/show', + params + }) +} + +export function destroy(params) { + return request({ + method: 'get', + url: '/api/admin/user/destroy', + params + }) } diff --git a/src/assets/xhxcelsh/avatar.png b/src/assets/xhxcelsh/avatar.png new file mode 100644 index 0000000..79b6159 Binary files /dev/null and b/src/assets/xhxcelsh/avatar.png differ diff --git a/src/assets/xhxcelsh/bkg.png b/src/assets/xhxcelsh/bkg.png new file mode 100644 index 0000000..5de9a23 Binary files /dev/null and b/src/assets/xhxcelsh/bkg.png differ diff --git a/src/assets/xhxcelsh/btn-end.png b/src/assets/xhxcelsh/btn-end.png new file mode 100644 index 0000000..bd33406 Binary files /dev/null and b/src/assets/xhxcelsh/btn-end.png differ diff --git a/src/assets/xhxcelsh/btn-start.png b/src/assets/xhxcelsh/btn-start.png new file mode 100644 index 0000000..308218e Binary files /dev/null and b/src/assets/xhxcelsh/btn-start.png differ diff --git a/src/assets/xhxcelsh/logo.png b/src/assets/xhxcelsh/logo.png new file mode 100644 index 0000000..46a81cc Binary files /dev/null and b/src/assets/xhxcelsh/logo.png differ diff --git a/src/assets/xhxcelsh/result-bkg.png b/src/assets/xhxcelsh/result-bkg.png new file mode 100644 index 0000000..38285d4 Binary files /dev/null and b/src/assets/xhxcelsh/result-bkg.png differ diff --git a/src/assets/xhxcelsh/result-title.png b/src/assets/xhxcelsh/result-title.png new file mode 100644 index 0000000..e6c39c9 Binary files /dev/null and b/src/assets/xhxcelsh/result-title.png differ diff --git a/src/assets/xhxcelsh/start-title-bkg.png b/src/assets/xhxcelsh/start-title-bkg.png new file mode 100644 index 0000000..941dec3 Binary files /dev/null and b/src/assets/xhxcelsh/start-title-bkg.png differ diff --git a/src/assets/xhxcelsh/title.png b/src/assets/xhxcelsh/title.png new file mode 100644 index 0000000..34fc1b8 Binary files /dev/null and b/src/assets/xhxcelsh/title.png differ diff --git a/src/mixins/drawMixin.js b/src/mixins/drawMixin.js new file mode 100644 index 0000000..fdcb235 --- /dev/null +++ b/src/mixins/drawMixin.js @@ -0,0 +1,57 @@ +// 屏幕适配 mixin 函数 + +// * 默认缩放值 +const scale = { + width: '1', + height: '1', +} + +// * 设计稿尺寸(px) +const baseWidth = 3584 +const baseHeight = 2048 + +// * 需保持的比例(默认1.77778) +const baseProportion = parseFloat((baseWidth / baseHeight).toFixed(5)) + +export default { + data() { + return { + // * 定时函数 + drawTiming: null + } + }, + mounted () { + this.calcRate() + window.addEventListener('resize', this.resize) + }, + beforeDestroy () { + window.removeEventListener('resize', this.resize) + }, + methods: { + calcRate () { + const appRef = this.$refs["appRef"] + if (!appRef) return + // 当前宽高比 + const currentRate = parseFloat((window.innerWidth / window.innerHeight).toFixed(5)) + if (appRef) { + if (currentRate > baseProportion) { + // 表示更宽 + scale.width = ((window.innerHeight * baseProportion) / baseWidth).toFixed(5) + scale.height = (window.innerHeight / baseHeight).toFixed(5) + appRef.style.transform = `scale(${scale.width}, ${scale.height}) translate(-50%, -50%)` + } else { + // 表示更高 + scale.height = ((window.innerWidth / baseProportion) / baseHeight).toFixed(5) + scale.width = (window.innerWidth / baseWidth).toFixed(5) + appRef.style.transform = `scale(${scale.width}, ${scale.height}) translate(-50%, -50%)` + } + } + }, + resize () { + clearTimeout(this.drawTiming) + this.drawTiming = setTimeout(() => { + this.calcRate() + }, 200) + } + }, +} diff --git a/src/router/index.js b/src/router/index.js index 733963e..3ee5cf7 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -46,6 +46,11 @@ export const constantRoutes = [{ component:() => import('@/views/page/MidAutumnLotteryDraw.vue'), hidden: true }, + { + path: '/xhxcelshDraw/:id', + component:() => import('@/views/page/xhxcelshDraw.vue'), + hidden: true + }, { path: '/info', component: Layout, diff --git a/src/views/activity/components/addDrawPrize.vue b/src/views/activity/components/addDrawPrize.vue index 506e6f7..a0a9481 100644 --- a/src/views/activity/components/addDrawPrize.vue +++ b/src/views/activity/components/addDrawPrize.vue @@ -48,6 +48,18 @@ + + + + 中奖用户类型 + + + + + + + + @@ -130,7 +142,7 @@ *相关项目 - + @@ -184,6 +196,7 @@ status: 1, image_id: "", total: 0, + user_type: "", has_total: 0, image_id_url: "", sort:1, diff --git a/src/views/activity/drawPrize.vue b/src/views/activity/drawPrize.vue index 13bbe7c..d03bd73 100644 --- a/src/views/activity/drawPrize.vue +++ b/src/views/activity/drawPrize.vue @@ -47,11 +47,11 @@ @click="$refs['addDrawPrize'].id = row.id,$refs['addDrawPrize'].isShow = true,$refs['addDrawPrize'].type = 'editor'">编辑 - 抽奖 - 中奖结果 @@ -149,10 +149,19 @@ this.select.keyword=""; }, toDraw (type = 1, row) { - if (type === 1) { - window.open(this.$router.resolve({path: '/mdLotteryDraw/'+row.id}).href,'_blank') - } else { - window.open(this.$router.resolve({path: '/mdLotteryDraw/'+row.id+'?result=1'}).href,'_blank') + if(row.activity_list_id === 8) { + if (type === 1) { + window.open(this.$router.resolve({path: '/mdLotteryDraw/'+row.id}).href,'_blank') + } else { + window.open(this.$router.resolve({path: '/mdLotteryDraw/'+row.id+'?result=1'}).href,'_blank') + } + } + if(row.activity_list_id === 16) { + if (type === 1) { + window.open(this.$router.resolve({path: '/xhxcelshDraw/'+row.id}).href,'_blank') + } else { + window.open(this.$router.resolve({path: '/xhxcelshDraw/'+row.id+'?result=1'}).href,'_blank') + } } }, diff --git a/src/views/page/xhxcelshDraw.vue b/src/views/page/xhxcelshDraw.vue new file mode 100644 index 0000000..131292f --- /dev/null +++ b/src/views/page/xhxcelshDraw.vue @@ -0,0 +1,533 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 三等奖{{ product.total }}名 + + + + + + 奖品:{{ product.name }} + + + + 赞助商 : {{ product.apply }} + + + + + + + + + + + + + + + + 三等奖{{ product.total }}名 + + + + + + abc + + + + + + + + + + +