1.首页优化

master
sws 2023-08-31 14:26:06 +08:00
parent 57bb158679
commit 7b5b798c96
14 changed files with 1025 additions and 741 deletions

View File

@ -69,9 +69,11 @@
"/pages/user/user"
],
//
request_url: 'https://d1.shopxo.vip/',
// request_url: 'https://d1.shopxo.vip/',
request_url: 'http://shopxo.com/',
// publicpublichttps://d1.shopxo.vip/public/
static_url: 'https://d1.shopxo.vip/',
// static_url: 'https://d1.shopxo.vip/',
static_url: 'http://shopxo.com/',
// default
system_type: 'default',
//

View File

@ -0,0 +1,40 @@
@font-face {
font-family: "iconfont"; /* Project id 4227145 */
src: url('iconfont.woff2?t=1693277237003') format('woff2'),
url('iconfont.woff?t=1693277237003') format('woff'),
url('iconfont.ttf?t=1693277237003') format('truetype'),
url('iconfont.svg?t=1693277237003#iconfont') format('svg');
}
.iconfont {
font-family: "iconfont" !important;
font-size: 16px;
font-style: normal;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
.icon-icon-applet-me-settings-acquiesce:before {
content: "\e6a6";
}
.icon-icon-applet-me-message-acquiesce:before {
content: "\e6a7";
}
.icon-icon-applet-me-acquiesce:before {
content: "\e6a2";
}
.icon-icon-applet-sort-acquiesce:before {
content: "\e6a5";
}
.icon-icon-applet-index-acquiesce:before {
content: "\e6a4";
}
.icon-icon-applet-shop-acquiesce:before {
content: "\e6a3";
}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,51 @@
{
"id": "4227145",
"name": "shopxo-小程序",
"font_family": "iconfont",
"css_prefix_text": "icon-",
"description": "",
"glyphs": [
{
"icon_id": "37113110",
"name": "icon-applet-me-settings-acquiesce",
"font_class": "icon-applet-me-settings-acquiesce",
"unicode": "e6a6",
"unicode_decimal": 59046
},
{
"icon_id": "37113109",
"name": "icon-applet-me-message-acquiesce",
"font_class": "icon-applet-me-message-acquiesce",
"unicode": "e6a7",
"unicode_decimal": 59047
},
{
"icon_id": "37112559",
"name": "icon-applet-me-acquiesce",
"font_class": "icon-applet-me-acquiesce",
"unicode": "e6a2",
"unicode_decimal": 59042
},
{
"icon_id": "37112562",
"name": "icon-applet-sort-acquiesce",
"font_class": "icon-applet-sort-acquiesce",
"unicode": "e6a5",
"unicode_decimal": 59045
},
{
"icon_id": "37112561",
"name": "icon-applet-index-acquiesce",
"font_class": "icon-applet-index-acquiesce",
"unicode": "e6a4",
"unicode_decimal": 59044
},
{
"icon_id": "37112560",
"name": "icon-applet-shop-acquiesce",
"font_class": "icon-applet-shop-acquiesce",
"unicode": "e6a3",
"unicode_decimal": 59043
}
]
}

View File

@ -0,0 +1,31 @@
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
<svg xmlns="http://www.w3.org/2000/svg">
<metadata>Created by iconfont</metadata>
<defs>
<font id="iconfont" horiz-adv-x="1024">
<font-face
font-family="iconfont"
font-weight="400"
font-stretch="normal"
units-per-em="1024"
ascent="896"
descent="-128"
/>
<missing-glyph />
<glyph glyph-name="icon-applet-me-settings-acquiesce" unicode="&#59046;" d="M367.709091 844.520727c24.669091 10.705455 57.809455 3.444364 76.008727-15.918545 13.265455-13.963636 58.88-53.992727 94.021818-53.992727 34.769455 0 80.244364 39.191273 93.463273 52.968727 18.245818 19.176727 51.665455 26.065455 76.148364 15.36l1.861818-0.930909 122.228364-68.747637c24.296727-17.221818 33.512727-50.688 21.504-78.010181-0.372364-0.930909-10.24-24.669091-10.24-45.47491 0-65.815273 52.968727-119.342545 118.132363-119.342545h4.189091c24.110545 0 42.961455-20.061091 48.733091-51.060364 0.465455-2.187636 10.24-54.644364 10.24-96.721454 0-42.030545-9.774545-94.487273-10.24-96.674909-5.771636-30.999273-24.669091-51.060364-48.034909-51.060364h-4.887273c-65.163636 0-118.132364-53.527273-118.132363-119.389091 0-21.038545 9.914182-44.590545 10.33309-45.614545a64.791273 64.791273 0 0 0-21.59709-77.824l-1.861819-1.163637-124.369454-69.259636c-7.866182-3.397818-16.477091-5.213091-25.553455-5.213091-19.456 0-38.446545 8.238545-50.827636 21.876364-13.405091 14.941091-59.904 57.483636-96.069818 57.483636-33.326545 0-78.708364-37.981091-95.464728-56.32-18.152727-20.014545-51.665455-27.182545-76.520727-16.151273l-1.815273 0.837819-119.947636 67.956363a64.837818 64.837818 0 0 0-21.410909 77.963637c0.325818 0.884364 10.24 24.529455 10.24 45.474909 0 65.815273-52.968727 119.342545-118.132364 119.342545h-4.189091c-24.110545 0-42.961455 20.014545-48.73309 51.060364-0.465455 2.187636-10.24 54.644364-10.24 96.674909S56.32 477.090909 56.785455 479.371636c5.771636 30.999273 24.622545 51.060364 47.941818 51.060364h4.980363c65.163636 0 118.132364 53.527273 118.132364 119.342545 0 21.085091-9.914182 44.590545-10.333091 45.614546a64.791273 64.791273 0 0 0 21.643636 77.824l1.861819 1.210182z m26.205091-66.932363L285.184 717.265455c4.701091-12.427636 13.544727-39.470545 13.544727-67.49091 0-99.746909-75.729455-182.272-173.428363-190.370909-2.513455-14.568727-7.866182-49.524364-7.866182-76.8 0-27.136 5.352727-62.091636 7.866182-76.660363 97.698909-8.098909 173.428364-90.624 173.428363-190.370909 0-27.973818-8.610909-54.597818-13.544727-67.630546l102.027636-57.716363c5.306182 5.632 20.526545 20.945455 41.425455 36.305454 36.631273 27.182545 71.68 40.96 104.122182 40.96 32.768 0 68.049455-14.103273 104.913454-41.704727 20.945455-15.732364 36.352-31.464727 41.565091-36.957091l106.123637 59.159273c-4.701091 12.427636-13.544727 39.377455-13.544728 67.584 0 99.746909 75.729455 182.272 173.474909 190.370909 2.466909 14.568727 7.819636 49.524364 7.819637 76.706909 0 27.042909-5.352727 62.138182-7.819637 76.8-97.745455 8.052364-173.474909 90.577455-173.474909 190.370909 0 28.253091 8.843636 55.202909 13.544728 67.490909l-104.634182 58.740364c-4.468364-4.282182-19.968-19.409455-41.332364-34.583273-35.886545-25.553455-70.097455-38.493091-101.608727-38.493091-31.837091 0-66.280727 13.218909-102.4 39.237818a337.314909 337.314909 0 0 0-41.425455 35.374546z m139.217454-218.624c95.883636 0 173.893818-78.801455 173.893819-175.662546 0-96.814545-78.010182-175.616-173.893819-175.616-95.883636 0-173.847273 78.754909-173.847272 175.616 0 96.814545 78.010182 175.662545 173.847272 175.662546z m0-71.68c-56.785455 0-102.912-46.638545-102.912-103.982546s46.126545-103.982545 102.912-103.982545c56.785455 0 103.005091 46.638545 103.005091 103.982545s-46.173091 104.029091-103.005091 104.029091z" horiz-adv-x="1070" />
<glyph glyph-name="icon-applet-me-message-acquiesce" unicode="&#59047;" d="M550.725818 786.152727c205.870545-18.711273 362.914909-180.503273 362.914909-373.946182h-0.465454a33.978182 33.978182 0 0 0 0.465454-5.166545v-249.297455h48.221091c21.457455 0 38.865455-16.290909 38.865455-36.352 0-20.107636-17.408-36.352-38.865455-36.352h-257.675636c-14.056727-89.227636-95.883636-155.322182-192.325818-155.322181-96.442182 0-178.269091 66.094545-192.372364 155.322181H62.138182c-21.457455 0-38.865455 16.290909-38.865455 36.305455 0 20.107636 17.408 36.398545 38.865455 36.398545h47.941818v249.297455a33.978182 33.978182 0 0 0 0.372364 5.166545h-0.372364c0 193.442909 156.997818 355.234909 362.868364 373.946182V824.32c0 20.061091 17.408 36.352 38.912 36.352 21.457455 0 38.865455-16.290909 38.865454-36.352v-38.120727zM187.810909 157.789091h648.052364v249.297454a33.978182 33.978182 0 0 0 0.418909 5.166546h-0.418909c0 167.330909-145.082182 303.010909-324.002909 303.010909-178.967273 0-324.049455-135.68-324.049455-303.010909h-0.418909a33.978182 33.978182 0 0 0 0.465455-5.166546v-249.297454z m437.154909-72.704h-226.210909c13.032727-48.500364 59.624727-82.478545 113.105455-82.478546 53.434182 0 100.072727 33.978182 113.105454 82.478546z" horiz-adv-x="1024" />
<glyph glyph-name="icon-applet-me-acquiesce" unicode="&#59042;" d="M512 896c175.895273 0 318.464-141.498182 318.464-315.997091 0-174.545455-142.568727-315.997091-318.464-315.997091-175.895273 0-318.464 141.498182-318.464 315.997091C193.536 754.548364 336.058182 896 512 896z m0-74.24c-134.842182 0-243.991273-108.311273-243.991273-241.757091S377.157818 338.245818 512 338.245818s243.991273 108.311273 243.991273 241.757091S646.842182 821.76 512 821.76z m293.236364-606.347636c95.092364 0 172.218182-76.893091 172.218181-171.752728A171.938909 171.938909 0 0 0 805.236364-128H218.763636A171.938909 171.938909 0 0 0 46.545455 43.706182a171.938909 171.938909 0 0 0 172.218181 171.706182h586.472728z m0-74.286546H218.763636c-53.992727 0-97.745455-43.613091-97.745454-97.419636s43.752727-97.466182 97.745454-97.466182h586.472728c53.992727 0 97.745455 43.659636 97.745454 97.466182s-43.752727 97.419636-97.745454 97.419636z" horiz-adv-x="1024" />
<glyph glyph-name="icon-applet-sort-acquiesce" unicode="&#59045;" d="M277.131636 896c102.027636 0 184.785455-83.316364 184.785455-186.181818v-93.090909c0-102.865455-82.757818-186.181818-184.785455-186.181818H184.785455C82.711273 430.545455 0 513.861818 0 616.727273V709.818182c0 102.865455 82.711273 186.181818 184.785455 186.181818h92.346181z m0-74.472727H184.785455A111.243636 111.243636 0 0 1 73.914182 709.818182v-93.090909a111.243636 111.243636 0 0 1 110.824727-111.709091h92.392727A111.243636 111.243636 0 0 1 388.002909 616.727273V709.818182a111.243636 111.243636 0 0 1-110.871273 111.709091zM831.394909 896c102.027636 0 184.785455-83.316364 184.785455-186.181818v-93.090909c0-102.865455-82.757818-186.181818-184.785455-186.181818h-92.392727c-102.027636 0-184.738909 83.316364-184.738909 186.181818V709.818182c0 102.865455 82.711273 186.181818 184.785454 186.181818h92.346182z m0-74.472727h-92.392727A111.243636 111.243636 0 0 1 628.177455 709.818182v-93.090909a111.243636 111.243636 0 0 1 110.824727-111.709091h92.392727A111.243636 111.243636 0 0 1 942.266182 616.727273V709.818182a111.243636 111.243636 0 0 1-110.871273 111.709091zM277.131636 337.454545c102.027636 0 184.785455-83.316364 184.785455-186.181818v-93.090909c0-102.865455-82.757818-186.181818-184.785455-186.181818H184.785455C82.711273-128 0-44.683636 0 58.181818v93.090909c0 102.865455 82.711273 186.181818 184.785455 186.181818h92.346181z m0-74.472727H184.785455A111.243636 111.243636 0 0 1 73.914182 151.272727v-93.090909a111.243636 111.243636 0 0 1 110.824727-111.709091h92.392727A111.243636 111.243636 0 0 1 388.002909 58.181818v93.090909a111.243636 111.243636 0 0 1-110.871273 111.709091zM831.394909 337.454545c102.027636 0 184.785455-83.316364 184.785455-186.181818v-93.090909c0-102.865455-82.757818-186.181818-184.785455-186.181818h-92.392727c-102.027636 0-184.738909 83.316364-184.738909 186.181818v93.090909c0 102.865455 82.711273 186.181818 184.785454 186.181818h92.346182z m0-74.472727h-92.392727a111.243636 111.243636 0 0 1-110.824727-111.709091v-93.090909a111.243636 111.243636 0 0 1 110.824727-111.709091h92.392727a111.243636 111.243636 0 0 1 110.871273 111.709091v93.090909a111.243636 111.243636 0 0 1-110.871273 111.709091z" horiz-adv-x="1024" />
<glyph glyph-name="icon-applet-index-acquiesce" unicode="&#59044;" d="M625.458202 859.66543l336.652714-259.25005c39.748572-28.345293 62.601673-71.677752 61.856969-117.290867v-457.434381c0-40.865627-18.152158-80.055671-50.360603-108.912947-32.254988-28.857277-75.913255-44.961499-121.433282-44.775323h-144.286384a117.616675 117.616675 0 0 0-78.752439 30.579404 94.717029 94.717029 0 0 0-31.184476 71.910472v169.047789a85.87367 85.87367 0 0 1-171.747341 0v-169.047789C424.434688-82.385023 372.770854-127.67233 309.471021-127.998138h-144.286384c-46.590539 1.210144-88.387046 19.176126-118.221746 47.42833-29.229629 27.647133-47.009435 65.161593-46.637083 106.25994V457.851124c-2.978816 43.565179 17.453998 85.780582 54.921914 113.567347l343.541225 283.918368C462.368044 907.838465 559.458817 909.700225 625.458202 859.758518zM446.217278 798.041181L99.557605 511.51635c-17.453998-12.939231-26.204269-30.951757-24.994125-48.685019l0.186176-5.026751v-432.859151c-0.186176-18.75723 7.912479-36.909388 23.365085-51.477659 17.221278-16.336942 41.796507-26.390445 67.023352-27.042061h143.960576c22.760013 0.093088 39.283132 12.939231 42.261947 26.669709l0.372352 3.397712v166.999853a160.344062 160.344062 0 0 0 151.593791 160.111342l8.796815 0.23272a160.344062 160.344062 0 0 0 160.344062-160.344062v-171.095725c-0.186176-5.026751 2.187568-10.472399 7.447039-15.359518a42.773931 42.773931 0 0 1 28.019485-10.612031h144.519104c27.321325-0.093088 53.153242 9.448431 71.491576 25.831917 16.709294 14.894078 25.552653 34.070204 25.552653 53.385962V484.381201c0.325808 20.572446-10.425855 41.005259-32.813516 57.062937l-336.14073 258.877699c-38.584972 29.183085-97.463125 28.066029-134.325969-2.3272z" horiz-adv-x="1024" />
<glyph glyph-name="icon-applet-shop-acquiesce" unicode="&#59043;" d="M424.401455-91.927273a60.369455 60.369455 0 1 1 0 120.692364 60.369455 60.369455 0 0 1 0-120.692364z m371.386181 0a60.369455 60.369455 0 1 1 0 120.692364 60.369455 60.369455 0 0 1 0-120.692364zM53.061818 896c69.864727 0 154.996364-64.977455 180.689455-139.636364 10.24-29.742545 11.776-74.193455 12.008727-217.367272v-13.265455l0.046545-5.306182v-13.265454l0.046546-4.189091c0.465455-129.396364 4.468364-199.214545 14.615273-222.766546 42.263273-98.350545 123.438545-164.398545 255.534545-164.398545 202.705455 0 270.987636 12.567273 332.194909 68.421818 69.12 63.069091 93.463273 141.218909 93.463273 308.782546 0 115.2-83.130182 166.027636-181.666909 166.027636H351.232a37.236364 37.236364 0 1 0 0 74.472727h408.762182c134.376727 0 256.139636-74.472727 256.139636-240.500363 0-186.461091-30.394182-284.113455-117.76-363.799273-79.872-72.843636-161.373091-87.877818-382.417454-87.877818-165.236364 0-270.894545 85.969455-323.956364 209.454545-16.151273 37.701818-20.107636 106.309818-20.619636 251.904v2.141091l-0.046546 15.406545V538.856727c-0.279273 125.486545-2.048 175.848727-8.052363 193.303273C147.688727 777.634909 90.158545 821.527273 53.061818 821.527273A37.236364 37.236364 0 1 0 53.061818 896z m691.525818-542.254545a37.236364 37.236364 0 1 0 0-74.472728H447.674182a37.236364 37.236364 0 1 0 0 74.472728h296.96z m0 185.716363a37.236364 37.236364 0 1 0 0-74.472727H447.674182a37.236364 37.236364 0 1 0 0 74.472727h296.96z" horiz-adv-x="1070" />
</font>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

View File

@ -0,0 +1,23 @@
<template>
<text class="iconfont" :class="name" :style="[{color: color}]" @click="$emit('click', $event)"></text>
</template>
<script>
export default {
props: {
name: String,
color: String
}
}
</script>
<style scoped>
@import url("./iconfont.css");
.iconfont {
display: flex;
align-items: center;
justify-content: center;
font-size: inherit;
}
</style>

Binary file not shown.

Binary file not shown.

View File

@ -1,153 +1,176 @@
<template>
<view>
<view class="search-content pr">
<view class="search-icon dis-inline-block pa" @tap="search_icon_event">
<uni-icons :type="propIcon" size="24rpx" :color="propIconColor"></uni-icons>
</view>
<input type="text" confirm-type="search" class="round wh-auto dis-block" :placeholder="propPlaceholder" :placeholder-class="propPlaceholderClass" :value="propDefaultValue" @input="search_input_value_event" @confirm="search_submit_confirm_event" @focus="search_input_focus_event" @blur="search_input_blur_event" :style="'color:'+propTextColor+';background:'+propBgColor+';'+((propBrColor || null) != null ? 'border:1px solid '+propBrColor+';' : '')">
</view>
</view>
<view>
<view class="search-content pr">
<view class="search-icon dis-inline-block pa" @tap="search_icon_event">
<uni-icons :type="propIcon" size="48rpx" :color="propIconColor"></uni-icons>
<iconfont name="icon-icon-applet-me-message-acquiesce"></iconfont>
</view>
<input type="text" confirm-type="search" class="round wh-auto dis-block" :placeholder="propPlaceholder"
:placeholder-class="propPlaceholderClass" :value="propDefaultValue" @input="search_input_value_event"
@confirm="search_submit_confirm_event" @focus="search_input_focus_event" @blur="search_input_blur_event"
:style="'color:'+propTextColor+';background:'+propBgColor+';'+((propBrColor || null) != null ? 'border:1px solid '+propBrColor+';' : '')">
<button v-if="propIsBtn" class="search-btn pa" size="mini" type="default"></button>
</view>
</view>
</template>
<script>
const app = getApp();
export default {
data() {
return {};
},
components: {},
props: {
propUrl: {
type: String,
default: '/pages/goods-search/goods-search'
},
propFormName: {
type: String,
default: 'keywords'
},
propPlaceholder: {
type: String,
default: '其实搜索很简单 ^_^!'
},
propDefaultValue: {
type: String,
default: ''
},
propPlaceholderClass: {
type: String,
default: 'cr-grey'
},
propTextColor: {
type: String,
default: '#666'
},
propBgColor: {
type: String,
default: '#f0f0f0'
},
propBrColor: {
type: String,
default: ''
},
propIsRequired: {
type: Boolean,
default: true
},
propIsOnEvent: {
type: Boolean,
default: false
},
propIsOnFocusEvent: {
type: Boolean,
default: false
},
propIsOnBlurEvent: {
type: Boolean,
default: false
},
propIsOnInputEvent: {
type: Boolean,
default: false
},
propIcon: {
type: String,
default: 'search'
},
propIconColor: {
type: String,
default: '#b7b7b7'
},
propIsIconOnEvent: {
type: Boolean,
default: false
}
},
methods: {
//
search_input_value_event(e) {
//
if(this.propIsOnInputEvent) {
this.$emit('oninput', e.detail.value);
}
},
//
search_input_blur_event(e) {
//
if(this.propIsOnBlurEvent) {
this.$emit('onblur', e.detail.value);
}
},
//
search_input_focus_event(e) {
//
if(this.propIsOnFocusEvent) {
this.$emit('onfocus', e.detail.value);
}
},
//
search_submit_confirm_event(e) {
//
if (this.propIsRequired && e.detail.value == '') {
app.globalData.showToast("请输入搜索关键字");
return false;
}
//
if(this.propIsOnEvent) {
this.$emit('onsearch', e.detail.value);
} else {
//
uni.navigateTo({
url: this.propUrl+'?'+this.propFormName+'=' + e.detail.value
});
}
},
// icon
search_icon_event(e) {
//
if(this.propIsIconOnEvent) {
this.$emit('onicon', {});
}
}
}
};
<script>
const app = getApp();
export default {
data() {
return {};
},
components: {},
props: {
propUrl: {
type: String,
default: '/pages/goods-search/goods-search'
},
propFormName: {
type: String,
default: 'keywords'
},
propPlaceholder: {
type: String,
default: '其实搜索很简单 ^_^!'
},
propDefaultValue: {
type: String,
default: ''
},
propPlaceholderClass: {
type: String,
default: 'cr-grey'
},
propTextColor: {
type: String,
default: '#666'
},
propBgColor: {
type: String,
default: '#f0f0f0'
},
propBrColor: {
type: String,
default: ''
},
propIsRequired: {
type: Boolean,
default: true
},
propIsOnEvent: {
type: Boolean,
default: false
},
propIsOnFocusEvent: {
type: Boolean,
default: false
},
propIsOnBlurEvent: {
type: Boolean,
default: false
},
propIsOnInputEvent: {
type: Boolean,
default: false
},
propIcon: {
type: String,
default: 'search'
},
propIconColor: {
type: String,
default: '#b7b7b7'
},
propIsIconOnEvent: {
type: Boolean,
default: false
},
propIsBtn: {
type: Boolean,
default: false
}
},
methods: {
//
search_input_value_event(e) {
//
if (this.propIsOnInputEvent) {
this.$emit('oninput', e.detail.value);
}
},
//
search_input_blur_event(e) {
//
if (this.propIsOnBlurEvent) {
this.$emit('onblur', e.detail.value);
}
},
//
search_input_focus_event(e) {
//
if (this.propIsOnFocusEvent) {
this.$emit('onfocus', e.detail.value);
}
},
//
search_submit_confirm_event(e) {
//
if (this.propIsRequired && e.detail.value == '') {
app.globalData.showToast("请输入搜索关键字");
return false;
}
//
if (this.propIsOnEvent) {
this.$emit('onsearch', e.detail.value);
} else {
//
uni.navigateTo({
url: this.propUrl + '?' + this.propFormName + '=' + e.detail.value
});
}
},
// icon
search_icon_event(e) {
//
if (this.propIsIconOnEvent) {
this.$emit('onicon', {});
}
}
}
};
</script>
<style>
.search-content .search-icon {
line-height: 24rpx;
left: 20rpx;
top: calc(50% - 22rpx);
z-index: 1;
padding: 10rpx;
}
.search-content input {
font-size: 24rpx;
padding: 0 30rpx 0 76rpx;
box-sizing: border-box;
height: 60rpx;
line-height: 60rpx;
}
<style>
.search-content .search-icon {
z-index: 1;
padding: 10rpx;
left: 20rpx;
top: 50%;
transform: translateY(-50%);
}
.search-content input {
font-size: 24rpx;
padding: 0 32rpx 0 76rpx;
box-sizing: border-box;
height: 62rpx;
line-height: 62rpx;
}
.search-content .search-btn {
width: 106rpx;
height: 56rpx;
background: linear-gradient(90deg, #FF426D 0%, #E20808 100%);
border-radius: 30rpx;
padding: 0;
color: #fff;
right: 4rpx;
top: 50%;
transform: translateY(-50%);
z-index: 1;
}
</style>

View File

@ -1,63 +1,71 @@
<template>
<view>
<swiper :indicator-dots="propData.length > 0" :indicator-color="indicator_color" :indicator-active-color="indicator_active_color" :autoplay="propData.length > 0" :circular="circular" :class="'banner border-radius-main oh bg-white spacing-mb banner-'+(propSize || 'default')" v-if="propData.length > 0">
<block v-for="(item, index) in propData" :key="index">
<swiper-item>
<image :src="item.images_url" mode="widthFix" :data-value="item.event_value || item.url" :data-type="item.event_type == undefined ? 1 : item.event_type" @tap="banner_event"></image>
</swiper-item>
</block>
</swiper>
</view>
<view>
<swiper :indicator-dots="propData.length > 0" :indicator-color="indicator_color"
:indicator-active-color="indicator_active_color" :autoplay="propData.length > 0" :circular="circular"
:class="'banner border-radius-main oh bg-white spacing-mb banner-'+(propSize || 'default')"
v-if="propData.length > 0">
<block v-for="(item, index) in propData" :key="index">
<swiper-item>
<image :src="item.images_url" mode="widthFix" :data-value="item.event_value || item.url"
:data-type="item.event_type == undefined ? 1 : item.event_type" @tap="banner_event"></image>
</swiper-item>
</block>
</swiper>
</view>
</template>
<script>
const app = getApp();
export default {
data() {
return {
indicator_dots: false,
indicator_color: 'rgba(0, 0, 0, .2)',
indicator_active_color: '#666',
autoplay: true,
circular: true
};
},
const app = getApp();
export default {
data() {
return {
indicator_dots: false,
indicator_color: 'rgba(0, 0, 0, .2)',
indicator_active_color: '#666',
autoplay: true,
circular: true
};
},
components: {},
props: {
propData: {
type: Array,
default: []
},
propSize: {
type: String,
default: 'default'
}
},
methods: {
banner_event(e) {
app.globalData.operation_event(e);
}
components: {},
props: {
propData: {
type: Array,
default: []
},
propSize: {
type: String,
default: 'default'
}
},
methods: {
banner_event(e) {
app.globalData.operation_event(e);
}
}
};
}
};
</script>
<style>
.banner {
transform: translateY(0);
<style>
.banner {
transform: translateY(0);
}
.banner image {
min-width: 100%;
}
.banner-mini,
.banner-mini image {
height: 200rpx !important;
}
.banner-default,
.banner-default image {
height: 280rpx !important;
}
.banner-max,
.banner-max image {
height: 420rpx !important;
}
.banner image {
min-width: 100%;
}
.banner-mini,
.banner-mini image {
height: 200rpx !important;
}
.banner-default,
.banner-default image {
height: 320rpx !important;
}
.banner-max,
.banner-max image {
height: 420rpx !important;
}
</style>

11
main.js
View File

@ -2,16 +2,19 @@ import Vue from 'vue';
import App from './App';
// 全局mixins
import base from './common/js/common/base';
import base from './common/js/common/base';
import share from './common/js/common/share';
Vue.mixin(base);
import iconfont from './components/iconfont/iconfont'
Vue.mixin(base);
Vue.mixin(share);
Vue.config.productionTip = false;
// 注册到全局
Vue.component("iconfont", iconfont);
App.mpType = 'app';
const app = new Vue({
...App
...App
});
app.$mount();

View File

@ -282,7 +282,16 @@
"navigationBarTitleText": "账号注销"
}
}
],
,{
"path" : "components/iconfont/iconfont/iconfont",
"style" :
{
"navigationBarTitleText": "",
"enablePullDownRefresh": false
}
}
],
"subPackages": [
{
"root": "pages/plugins/seckill",

File diff suppressed because it is too large Load Diff