diff --git a/src/assets/css/base.scss b/src/assets/css/base.scss index 501047c..d8616ea 100644 --- a/src/assets/css/base.scss +++ b/src/assets/css/base.scss @@ -22,6 +22,9 @@ --status-bar-height: 20px; --sticky-top-height: calc(var(--status-bar-height) + calc(var(--van-nav-bar-height) + 13px)); --van-radius-sm: 16px; + --van-tabs-line-height: 30px; + --van-tabs-bottom-bar-height: 2px; + --van-tabs-bottom-bar-width: 28px; } /* semantic color variables for this project */ diff --git a/src/assets/css/public.scss b/src/assets/css/public.scss index 27a36fb..a557ca5 100644 --- a/src/assets/css/public.scss +++ b/src/assets/css/public.scss @@ -17,6 +17,20 @@ background: #f2f2f2; } +.van-tabs__nav--line.van-tabs__nav--shrink, +.van-tabs__nav--line.van-tabs__nav--complete { + padding-left: 0; +} + +.van-tab--grow { + margin: 0 20px 0 0; + padding: 0; +} + +.van-tab--grow:last-child { + margin-right: 0; +} + .van-radio-group { & .van-radio { .van-radio__icon--checked { diff --git a/src/assets/img/home/home-back.png b/src/assets/img/home/home-back.png new file mode 100644 index 0000000..fcb37f9 Binary files /dev/null and b/src/assets/img/home/home-back.png differ diff --git a/src/assets/img/home/home-pen.png b/src/assets/img/home/home-pen.png new file mode 100644 index 0000000..7212b5f Binary files /dev/null and b/src/assets/img/home/home-pen.png differ diff --git a/src/fonts/iconfont.css b/src/fonts/iconfont.css index 8d53a6b..a7b45e4 100644 --- a/src/fonts/iconfont.css +++ b/src/fonts/iconfont.css @@ -138,6 +138,6 @@ content: '\e6a0'; } -.mobilefont-fasong:before { +.mobilefont-fasong::before { content: '\e647'; } diff --git a/src/layouts/index.vue b/src/layouts/index.vue index 05e1744..3f142ed 100644 --- a/src/layouts/index.vue +++ b/src/layouts/index.vue @@ -3,7 +3,7 @@
@@ -36,16 +36,28 @@ function goBack() { diff --git a/src/layouts/utils.js b/src/layouts/utils.js index d8d5538..f2d52b8 100644 --- a/src/layouts/utils.js +++ b/src/layouts/utils.js @@ -30,13 +30,13 @@ function showModal(options) { * @param {*} data * @returns */ -const canPlanetPublishPSM = function (data) { +const canPlanetPublishPSM = function(data) { let isFb = true; let message = ''; let title = '题目设置未完成'; const incompleteQuestionList = []; - data.questions && - data.questions.forEach((s) => { + data.questions + && data.questions.forEach((s) => { if (s.question_type === 101 && s.config.price_gradient.length <= 0) { isFb = false; message = 'psm题目未完成设置,请设置价格区间后投放'; @@ -60,15 +60,15 @@ const canPlanetPublishPSM = function (data) { * @param {*} data * @returns */ -const canPlanetPublishMxdAndHotArea = function (data) { +const canPlanetPublishMxdAndHotArea = function(data) { let isFb = true; let message = ''; const qSteams = []; const incompleteQuestionList = []; let type = 0; let title = '题目设置未完成'; - data.questions && - data.questions.forEach((s) => { + data.questions + && data.questions.forEach((s) => { if (s.question_type === 105 && s.config.design_version <= 0) { isFb = false; message = 'maxdiff题目未完成设置,请生成设计后投放'; @@ -107,14 +107,14 @@ const canPlanetPublishMxdAndHotArea = function (data) { * @param {*} data * @returns */ -const canPlanetPublish3D = function (data) { +const canPlanetPublish3D = function(data) { { let canFB = true; let message = ''; const qSteams = []; let title = ''; - data.questions && - data.questions.forEach((s) => { + data.questions + && data.questions.forEach((s) => { if (QUESTION_TYPE.contains(s.question_type)) { try { if (s.config.is_three_dimensions && !s.config.scene) { @@ -144,15 +144,15 @@ const canPlanetPublish3D = function (data) { let message = ''; const qSteams = []; let title = ''; - data.questions && - data.questions.forEach((s) => { + data.questions + && data.questions.forEach((s) => { if (QUESTION_TYPE.contains(s.question_type)) { try { if (s.config.is_three_dimensions && s.config.is_binding_goods) { const wares = []; const _sceneInformation = s.config.scene_information; - const sceneInformation = - typeof _sceneInformation === 'string' + const sceneInformation + = typeof _sceneInformation === 'string' ? JSON.parse(_sceneInformation) : _sceneInformation; sceneInformation.shelves.forEach((shelf) => { @@ -202,14 +202,14 @@ const canPlanetPublish3D = function (data) { * @param {*} data * @returns */ -const canPlanetPublishImage = function (data) { +const canPlanetPublishImage = function(data) { { let canFB = true; let message = ''; const qSteams = []; let title = ''; - data.questions && - data.questions.forEach((s) => { + data.questions + && data.questions.forEach((s) => { if (s.question_type === 13) { try { if (s.options.length <= 0 || s.options.some((y) => y.length <= 0)) { @@ -304,8 +304,8 @@ function canPublishRandom(data, publishType) { if (!isValidated) { errors.push({ message: - field.message || - `请填写"${random.title}"中第${index + 1}组"随机题组"的"${field.name}"` + field.message + || `请填写"${random.title}"中第${index + 1}组"随机题组"的"${field.name}"` }); } }); @@ -384,11 +384,11 @@ function isLoopingLogicValid(data, publishType) { if ( (data?.cycle_pages || []).every((i) => { return ( - i.question_index && - i.relation_type !== undefined && - i.relation_type !== null && - i.first_page && - i.last_page + i.question_index + && i.relation_type !== undefined + && i.relation_type !== null + && i.first_page + && i.last_page ); }) ) { @@ -412,7 +412,7 @@ function isLoopingLogicValid(data, publishType) { * @param sn * @param publishType undefined投放;null投放;0投放;1预览;2投放;3测试 */ -export const canPlanetPublish = async function (sn, publishType) { +export const canPlanetPublish = async function(sn, publishType) { const parsedPublishType = !publishType ? 2 : publishType; const num = window.location.href.indexOf('code='); let code; diff --git a/src/router/index.ts b/src/router/index.ts index 9bb275c..fecb8c5 100644 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -1,6 +1,7 @@ import { createRouter, createWebHistory } from 'vue-router'; import layout from '@/layouts/index.vue'; import Design from '@/views/Design/Index.vue'; +import Redirect from '@/layouts/redirect.vue'; const router = createRouter({ history: createWebHistory(import.meta.env.BASE_URL), routes: [ @@ -20,7 +21,18 @@ const router = createRouter({ title: '伊调研' }, component: () => import('../views/Home/Index.vue') - }, + } + ] + }, + { + path: '/redirect', + name: '/redirect', + component: Redirect, + redirect: '/survey', + meta: { + title: '伊调研' + }, + children: [ { path: '/survey', name: 'survey', diff --git a/src/views/Design/components/Questions/NPS.vue b/src/views/Design/components/Questions/NPS.vue index 63a6294..37fa60c 100644 --- a/src/views/Design/components/Questions/NPS.vue +++ b/src/views/Design/components/Questions/NPS.vue @@ -46,7 +46,7 @@ import { ref } from 'vue'; import RateCharacter from './RateCharacter.vue'; const isPreview = defineModel('isPreview', { default: false, type: Boolean }); -/*const props = */ defineProps({ +/* const props = */ defineProps({ index: { type: Number, default: 0 diff --git a/src/views/Home/Index.vue b/src/views/Home/Index.vue index 254f691..c104cde 100644 --- a/src/views/Home/Index.vue +++ b/src/views/Home/Index.vue @@ -9,7 +9,7 @@ import { showFailToast } from 'vant'; const contentShow = ref(false); const show = ref(false); -onMounted(async() => { +onMounted(async () => { if (utils.getSessionStorage('xToken')) { const appToken = utils.getSessionStorage('xToken'); getUserInfo(appToken) @@ -40,16 +40,21 @@ function create() { diff --git a/src/views/Home/components/Market/Index.vue b/src/views/Home/components/Market/Index.vue index d415552..f352511 100644 --- a/src/views/Home/components/Market/Index.vue +++ b/src/views/Home/components/Market/Index.vue @@ -3,9 +3,10 @@
模板市场
- + + + -

-更多模板期待您的探索-

@@ -70,11 +71,12 @@ onMounted(() => { .market { margin-top: 10px; - padding: 15px 15px 0; - border-radius: 10px; + padding: 10px 12px 0; + border-radius: 16px; background: #fff; .market_title { + margin-bottom: 5px; color: #000; font-size: 15px; } diff --git a/src/views/Home/components/Market/components/MarketItem.vue b/src/views/Home/components/Market/components/MarketItem.vue index 938ffe5..fe3ffaf 100644 --- a/src/views/Home/components/Market/components/MarketItem.vue +++ b/src/views/Home/components/Market/components/MarketItem.vue @@ -26,11 +26,12 @@ style="color: #c1c1c1" />
-
+

创建人

{{ item.created_user }}

+

引用次数

{{ item.quote_nums }}

@@ -93,23 +94,36 @@ onMounted(() => { display: flex; flex-wrap: wrap; justify-content: space-between; + padding: 10px 0; } .market-item { //margin-right: 4%; + flex: 1; box-sizing: border-box; - width: 49%; - margin-bottom: 12px; - padding: 10px; - border-radius: 8px; - background: #fff; - box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); + max-width: 50%; + margin-bottom: 5px; + margin-left: 7px; + padding: 15px 12px; + border: 1px solid #fff; + border-radius: 10px; + background: rgba(241, 241, 241, 0.39); - // 偶数项的 margin-right 设置为 0 - &:nth-child(even) { + &:nth-child(n-1) { + margin-right: 7px; + margin-left: 0; + } + + &:nth-child(2n) { margin-right: 0; } + //width: 49%; + //margin-bottom: 12px; + //padding: 10px; + //border-radius: 8px; + //background: #fff; + //box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); .content { .title { display: flex; @@ -137,6 +151,13 @@ onMounted(() => { color: #666; font-size: 12px; + .line { + width: 1px; + height: 20px; + background: #979797; + opacity: 0.1; + } + div p:last-child { color: #000; } diff --git a/src/views/Survey/Index.vue b/src/views/Survey/Index.vue index af21793..b737ff5 100644 --- a/src/views/Survey/Index.vue +++ b/src/views/Survey/Index.vue @@ -1,10 +1,10 @@