Browse Source

撤回提交->目前存在很多问题

zyh
xuwenbo 4 years ago
parent
commit
5800da20d2
  1. 78
      App.vue
  2. 2
      assets/css/style.css
  3. 2
      assets/css/style.css.map
  4. 596
      assets/css/style.less
  5. 207
      components/Adv.vue
  6. 155
      components/Menu.vue
  7. 228
      components/PromotionGood.vue
  8. 87
      components/sh-activity-goods.vue
  9. 260
      components/sh-adv.vue
  10. 197
      components/sh-groupon.vue
  11. 4
      config/index.js
  12. 3
      libs/wechat.js
  13. 3
      manifest.json
  14. 13
      package-lock.json
  15. 1
      package.json
  16. 10
      pages.json
  17. 8
      pages/Loading/index.vue
  18. 904
      pages/activity/DargainDetails/index.vue
  19. 375
      pages/activity/GoodsSeckill/index.vue
  20. 342
      pages/authorization/index.vue
  21. 392
      pages/home/index.vue
  22. BIN
      static/images/logo_bg.png
  23. BIN
      static/images/title1.png
  24. 510
      uni.css
  25. 9
      uni.css.map
  26. 1
      uni.min.css
  27. 56
      uni.scss
  28. 7
      utils/index.js
  29. 8
      utils/request.js

78
App.vue

@ -1,64 +1,24 @@
<script>
import Vue from 'vue'
export default {
onLaunch: function () {
console.log("App Launch");
},
onShow: function () {
console.log("App Show");
},
onHide: function () {
console.log("App Hide");
},
mounted() {
this.setAppInfo()
},
methods: {
//
async setAppInfo() {
let that = this;
return new Promise((resolve, reject) => {
uni.getSystemInfo({
success: function (e) {
Vue.prototype.StatusBar = e.statusBarHeight;
// #ifdef H5
Vue.prototype.CustomBar = e.statusBarHeight + 45;
// #endif
export default {
onLaunch: function() {
console.log('App Launch')
},
onShow: function() {
console.log('App Show')
},
onHide: function() {
// #ifdef APP-PLUS
if (e.platform == "android") {
Vue.prototype.CustomBar = e.statusBarHeight + 50;
} else {
Vue.prototype.CustomBar = e.statusBarHeight + 45;
}
// #endif
// #ifdef MP-WEIXIN
let custom = wx.getMenuButtonBoundingClientRect();
Vue.prototype.Custom = custom;
Vue.prototype.CustomBar =
custom.bottom + custom.top - e.statusBarHeight;
// #endif
},
});
});
},
//
async autoLogin(data) {
},
},
};
console.log('App Hide')
}
}
</script>
<style lang="less">
/*每个页面公共css */
@import "animate.css";
@import "./assets/iconfont/iconfont.css";
@import "./assets/css/base.less";
@import "./assets/css/reset.less";
@import "./assets/css/style.less";
</style>
/*每个页面公共css */
@import "animate.css";
@import "./assets/iconfont/iconfont.css";
@import "./assets/css/base.less";
@import "./assets/css/reset.less";
@import "./assets/css/style.less";
</style>

2
assets/css/style.css

File diff suppressed because one or more lines are too long

2
assets/css/style.css.map

File diff suppressed because one or more lines are too long

596
assets/css/style.less

@ -1,19 +1,5 @@
view,
scroll-view,
swiper,
button,
input,
textarea,
label,
navigator,
image {
box-sizing: border-box;
}
page {
background: #f5f5f5;
height: 100%;
}
.newsList .newsSwitch .van-hairline--top-bottom::after {
@ -3681,7 +3667,6 @@ page {
height: 100%;
border-radius: 50%;
}
.personal-data .wrapper .wrapList .item .picTxt .pictrue img {
width: 100%;
height: 100%;
@ -6961,7 +6946,7 @@ page {
}
.flash-sale .list .item .text {
width: 4.7*100rpx;
width: 5*100rpx;
font-size: 0.3*100rpx;
color: #333;
height: 1.66*100rpx;
@ -7499,15 +7484,7 @@ page {
position: fixed;
left: 0;
right: 0;
// #ifdef H5
top: 88rpx;
// #endif
// #ifndef H5
top: 0;
// #endif
z-index: 9;
border-bottom: 1px solid #f5f5f5;
}
@ -8626,574 +8603,3 @@ rich-text {
}
/*单行文本溢出省略号*/
.one-t {
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
transition: all linear 0.2s;
}
/*多行文本溢出省略号*/
.more-t {
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
transition: all linear 0.2s;
}
/* ==================
flex布局(colorui里面也有相关基础样式)
==================== */
/* x水平排列*/
.x-f {
display: flex;
align-items: center;
}
/*x两端且水平居中*/
.x-bc {
display: flex;
justify-content: space-between;
align-items: center;
}
/*x平分且水平居中*/
.x-ac {
display: flex;
justify-content: space-around;
align-items: center;
}
/*x水平靠上对齐*/
.x-start {
display: flex;
align-items: flex-start;
}
/*x水平靠下对齐*/
.x-end {
display: flex;
align-items: flex-end;
}
/*上下左右居中*/
.x-c {
display: flex;
justify-content: center;
align-items: center;
}
/*y竖直靠左*/
.y-start {
display: flex;
flex-direction: column;
align-items: flex-start;
}
/*y竖直靠右*/
.y-end {
display: flex;
flex-direction: column;
align-items: flex-end;
}
/*y竖直居中*/
.y-f {
display: flex;
flex-direction: column;
align-items: center;
}
// y竖直两端
.y-b {
display: flex;
flex-direction: column;
justify-content: space-between;
}
/*y竖直两端居中*/
.y-bc {
display: flex;
flex-direction: column;
align-items: center;
justify-content: space-between;
}
/* ==================
自定义变量
==================== */
/*盒子模型*/
.mt2 {
margin-top: 2rpx;
}
.mr2 {
margin-right: 2rpx;
}
.mb2 {
margin-bottom: 2rpx;
}
.ml2 {
margin-left: 2rpx;
}
.mx2 {
margin-left: 2rpx;
margin-right: 2rpx;
}
.my2 {
margin-top: 2rpx;
margin-bottom: 2rpx;
}
.ma2 {
margin: 2rpx;
}
.mt4 {
margin-top: 4rpx;
}
.mr4 {
margin-right: 4rpx;
}
.mb4 {
margin-bottom: 4rpx;
}
.ml4 {
margin-left: 4rpx;
}
.mx4 {
margin-left: 4rpx;
margin-right: 4rpx;
}
.my4 {
margin-top: 4rpx;
margin-bottom: 4rpx;
}
.ma4 {
margin: 4rpx;
}
.mt8 {
margin-top: 8rpx;
}
.mr8 {
margin-right: 8rpx;
}
.mb8 {
margin-bottom: 8rpx;
}
.ml8 {
margin-left: 8rpx;
}
.mx8 {
margin-left: 8rpx;
margin-right: 8rpx;
}
.my8 {
margin-top: 8rpx;
margin-bottom: 8rpx;
}
.ma8 {
margin: 8rpx;
}
.mt10 {
margin-top: 10rpx;
}
.mr10 {
margin-right: 10rpx;
}
.mb10 {
margin-bottom: 10rpx;
}
.ml10 {
margin-left: 10rpx;
}
.mx10 {
margin-left: 10rpx;
margin-right: 10rpx;
}
.my10 {
margin-top: 10rpx;
margin-bottom: 10rpx;
}
.ma10 {
margin: 10rpx;
}
.mt15 {
margin-top: 15rpx;
}
.mr15 {
margin-right: 15rpx;
}
.mb15 {
margin-bottom: 15rpx;
}
.ml15 {
margin-left: 15rpx;
}
.mx15 {
margin-left: 15rpx;
margin-right: 15rpx;
}
.my15 {
margin-top: 15rpx;
margin-bottom: 15rpx;
}
.ma15 {
margin: 15rpx;
}
.mt20 {
margin-top: 20rpx;
}
.mr20 {
margin-right: 20rpx;
}
.mb20 {
margin-bottom: 20rpx;
}
.ml20 {
margin-left: 20rpx;
}
.mx20 {
margin-left: 20rpx;
margin-right: 20rpx;
}
.my20 {
margin-top: 20rpx;
margin-bottom: 20rpx;
}
.ma20 {
margin: 20rpx;
}
.mt24 {
margin-top: 24rpx;
}
.mr24 {
margin-right: 24rpx;
}
.mb24 {
margin-bottom: 24rpx;
}
.ml24 {
margin-left: 24rpx;
}
.mx24 {
margin-left: 24rpx;
margin-right: 24rpx;
}
.my24 {
margin-top: 24rpx;
margin-bottom: 24rpx;
}
.ma24 {
margin: 24rpx;
}
.mt30 {
margin-top: 30rpx;
}
.mr30 {
margin-right: 30rpx;
}
.mb30 {
margin-bottom: 30rpx;
}
.ml30 {
margin-left: 30rpx;
}
.mx30 {
margin-left: 30rpx;
margin-right: 30rpx;
}
.my30 {
margin-top: 30rpx;
margin-bottom: 30rpx;
}
.ma30 {
margin: 30rpx;
}
.pt2 {
padding-top: 2rpx;
}
.pr2 {
padding-right: 2rpx;
}
.pb2 {
padding-bottom: 2rpx;
}
.pl2 {
padding-left: 2rpx;
}
.px2 {
padding-left: 2rpx;
padding-right: 2rpx;
}
.py2 {
padding-top: 2rpx;
padding-bottom: 2rpx;
}
.pa2 {
padding: 2rpx;
}
.pt4 {
padding-top: 4rpx;
}
.pr4 {
padding-right: 4rpx;
}
.pb4 {
padding-bottom: 4rpx;
}
.pl4 {
padding-left: 4rpx;
}
.px4 {
padding-left: 4rpx;
padding-right: 4rpx;
}
.py4 {
padding-top: 4rpx;
padding-bottom: 4rpx;
}
.pa4 {
padding: 4rpx;
}
.pt8 {
padding-top: 8rpx;
}
.pr8 {
padding-right: 8rpx;
}
.pb8 {
padding-bottom: 8rpx;
}
.pl8 {
padding-left: 8rpx;
}
.px8 {
padding-left: 8rpx;
padding-right: 8rpx;
}
.py8 {
padding-top: 8rpx;
padding-bottom: 8rpx;
}
.pa8 {
padding: 8rpx;
}
.pt10 {
padding-top: 10rpx;
}
.pr10 {
padding-right: 10rpx;
}
.pb10 {
padding-bottom: 10rpx;
}
.pl10 {
padding-left: 10rpx;
}
.px10 {
padding-left: 10rpx;
padding-right: 10rpx;
}
.py10 {
padding-top: 10rpx;
padding-bottom: 10rpx;
}
.pa10 {
padding: 10rpx;
}
.pt15 {
padding-top: 15rpx;
}
.pr15 {
padding-right: 15rpx;
}
.pb15 {
padding-bottom: 15rpx;
}
.pl15 {
padding-left: 15rpx;
}
.px15 {
padding-left: 15rpx;
padding-right: 15rpx;
}
.py15 {
padding-top: 15rpx;
padding-bottom: 15rpx;
}
.pa15 {
padding: 15rpx;
}
.pt20 {
padding-top: 20rpx;
}
.pr20 {
padding-right: 20rpx;
}
.pb20 {
padding-bottom: 20rpx;
}
.pl20 {
padding-left: 20rpx;
}
.px20 {
padding-left: 20rpx;
padding-right: 20rpx;
}
.py20 {
padding-top: 20rpx;
padding-bottom: 20rpx;
}
.pa20 {
padding: 20rpx;
}
.pt24 {
padding-top: 24rpx;
}
.pr24 {
padding-right: 24rpx;
}
.pb24 {
padding-bottom: 24rpx;
}
.pl24 {
padding-left: 24rpx;
}
.px24 {
padding-left: 24rpx;
padding-right: 24rpx;
}
.py24 {
padding-top: 24rpx;
padding-bottom: 24rpx;
}
.pa24 {
padding: 24rpx;
}
.pt30 {
padding-top: 30rpx;
}
.pr30 {
padding-right: 30rpx;
}
.pb30 {
padding-bottom: 30rpx;
}
.pl30 {
padding-left: 30rpx;
}
.px30 {
padding-left: 30rpx;
padding-right: 30rpx;
}
.py30 {
padding-top: 30rpx;
padding-bottom: 30rpx;
}
.pa30 {
padding: 30rpx;
}

207
components/Adv.vue

@ -1,207 +0,0 @@
<template>
<view class="adv-box mx20 mb10">
<!-- 模板1-->
<view class="x-f" v-if="detail.style == 1">
<image style="width:710rpx;height: 220rpx;" @tap="jump(detail.list[0].path)" :src="detail.list[0].image" mode="aspectFill"></image>
</view>
<!-- 模板2-->
<view class="type1 x-f" v-if="detail.style == 2">
<image class="type1-img" @tap="jump(detail.list[0].path)" :src="detail.list[0].image" mode="aspectFill"></image>
<image class="type1-img" @tap="jump(detail.list[1].path)" :src="detail.list[1].image" mode="aspectFill"></image>
</view>
<!-- 模板3-->
<view class="type2 x-bc" v-if="detail.style == 3">
<image class="type2-img1" @tap="jump(detail.list[0].path)" :src="detail.list[0].image" mode="aspectFill"></image>
<view class="y-f type2-box">
<image class="type2-img2" @tap="jump(detail.list[1].path)" :src="detail.list[1].image" mode="aspectFill" style="border-bottom:1rpx solid #f6f6f6"></image>
<image class="type2-img2" @tap="jump(detail.list[2].path)" :src="detail.list[2].image" mode="aspectFill"></image>
</view>
</view>
<!-- 模板4-->
<view class="type3 x-bc" v-if="detail.style == 4">
<view class="type3-box y-f">
<image class="type3-img1" @tap="jump(detail.list[0].path)" :src="detail.list[0].image" mode="aspectFill"></image>
<image class="type3-img1" @tap="jump(detail.list[1].path)" :src="detail.list[1].image" mode="aspectFill"></image>
</view>
<image class="type3-img2" @tap="jump(detail.list[2].path)" :src="detail.list[2].image" mode="aspectFill"></image>
</view>
<!-- 模板5-->
<view class="type4 y-f" v-if="detail.style == 5">
<view class="type4-box x-f">
<image class="type4-img1" @tap="jump(detail.list[0].path)" :src="detail.list[0].image" mode="aspectFill"></image>
<image class="type4-img1" @tap="jump(detail.list[1].path)" :src="detail.list[1].image" mode="aspectFill"></image>
</view>
<image class="type4-img2" @tap="jump(detail.list[2].path)" :src="detail.list[2].image" mode="aspectFill"></image>
</view>
<!-- 模板6-->
<view class="type5 y-f" v-if="detail.style == 6">
<image class="type5-img1" @tap="jump(detail.list[0].path)" :src="detail.list[0].image" mode="aspectFill"></image>
<view class="type5-box x-bc">
<image class="type5-img2" @tap="jump(detail.list[1].path)" :src="detail.list[1].image" mode="aspectFill" style="border-bottom:1rpx solid #f6f6f6"></image>
<image class="type5-img2" @tap="jump(detail.list[2].path)" :src="detail.list[2].image" mode="aspectFill"></image>
</view>
</view>
<!-- 模板7-->
<view class="type6 y-f" v-if="detail.style == 7">
<view class="x-f type6-box1">
<image class="type6-img1" @tap="jump(detail.list[0].path)" :src="detail.list[0].image" mode="aspectFill"></image>
<image class="type6-img1" @tap="jump(detail.list[1].path)" :src="detail.list[1].image" mode="aspectFill"></image>
</view>
<view class="x-f type6-box2">
<image class="type6-img2" @tap="jump(detail.list[2].path)" :src="detail.list[2].image" mode="aspectFill"></image>
<image class="type6-img2" @tap="jump(detail.list[3].path)" :src="detail.list[3].image" mode="aspectFill"></image>
<image class="type6-img2" @tap="jump(detail.list[4].path)" :src="detail.list[4].image" mode="aspectFill"></image>
</view>
</view>
</view>
</template>
<script>
export default {
components: {},
data() {
return {};
},
props: {
detail: {}
},
computed: {},
created() {},
methods: {
//
jump(path) {
this.$tools.routerTo(path);
}
}
};
</script>
<style lang="scss">
.adv-box {
background-color: #fff;
border-radius: 20rpx;
overflow: hidden;
.type1 {
.type1-img {
flex: 1;
height: 220rpx;
&:first-child {
border-right: 1rpx solid #f6f6f6;
}
}
}
.type2 {
.type2-img1 {
width: (710rpx/2);
height: 340rpx;
border-right: 1rpx solid #f6f6f6;
}
.type2-box {
flex: 1;
height: 340rpx;
width: (710rpx/2);
.type2-img2 {
height: (340rpx/2);
}
}
}
.type3 {
.type3-box {
width: (710rpx/2);
border-right: 1rpx solid #f6f6f6;
.type3-img1 {
flex: 1;
height: (340rpx/2);
&:first-child {
border-bottom: 1rpx solid #f6f6f6;
}
}
}
.type3-img2 {
flex: 1;
height: 340rpx;
width: (710rpx/2);
}
}
.type4 {
.type4-box {
border-bottom: 1rpx solid #f6f6f6;
.type4-img1 {
flex: 1;
height: (340rpx/2);
&:first-child {
border-right: 1rpx solid #f6f6f6;
}
}
}
.type4-img2 {
flex: 1;
height: (340rpx/2);
width: 710rpx;
}
}
.type5 {
.type5-img1 {
width: 710rpx;
height: (340rpx/2);
border-bottom: 1rpx solid #f6f6f6;
}
.type5-box {
flex: 1;
height: (340rpx/2);
width: 710rpx;
.type5-img2 {
height: (340rpx/2);
&:first-child {
border-right: 1rpx solid #f6f6f6;
}
}
}
}
.type6 {
.type6-box1 {
.type6-img1 {
width: (710rpx/2);
height: (340rpx/2);
&:first-child {
border-right: 1rpx solid #f6f6f6;
}
}
}
.type6-box2 {
border-top: 1rpx solid #f6f6f6;
.type6-img2 {
width: (710rpx/3);
height: (340rpx/2);
border-right: 1rpx solid #f6f6f6;
&:last-child {
border-right: 0;
}
}
}
}
image {
// background-color: #ccc;
}
}
</style>

155
components/Menu.vue

@ -1,155 +0,0 @@
<template>
<!-- 产品分类导航 -->
<view class="menu-category-box mb10" v-if="carousel" :style="list.length <= menu ? `height:200rpx` : `height:360rpx`">
<swiper
class="menu-swiper-box"
:style="list.length <= menu ? `height:160rpx` : `height:320rpx`"
@change="onSwiper"
circular
:autoplay="false"
:interval="3000"
:duration="1000"
>
<swiper-item class="menu-swiper-item" v-for="(itemList, index) in carousel" :key="index" :style="list.length <= menu ? `height:200rpx` : `height:340rpx`">
<view class="menu-tab-box">
<view class="tab-list y-f" :style="{ width: 690 / menu + 'rpx' }" v-for="item in itemList" :key="item.name" @tap="routerTo(item)">
<image class="tab-img shopro-selector-circular" :style="{ width: imgW + 'rpx', height: imgW + 'rpx' }" :src="item.pic"></image>
<text class="shopro-selector-rect">{{ item.name }}</text>
</view>
</view>
</swiper-item>
</swiper>
<view class="menu-category-dots" v-if="carousel.length > 1">
<text :class="categoryCurrent === index ? 'category-dot-active' : 'category-dot'" v-for="(dot, index) in carousel.length" :key="index"></text>
</view>
</view>
</template>
<script>
export default {
components: {},
data() {
return {
categoryCurrent: 0 //
};
},
props: {
list: {
type: Array,
default: []
},
menu: {
default: 5
},
imgW: {
type: Number,
default: 88
}
},
computed: {
carousel() {
if (this.list) {
let list = this.sortData(this.list, this.menu * 2);
return list;
}
}
},
created() {},
methods: {
//
sortData(oArr, length) {
let arr = [];
let minArr = [];
oArr.forEach(c => {
if (minArr.length === length) {
minArr = [];
}
if (minArr.length === 0) {
arr.push(minArr);
}
minArr.push(c);
});
return arr;
},
//
onSwiper(e) {
this.categoryCurrent = e.detail.current;
},
//
routerTo(item) {
this.$yrouter.push(item.uniapp_url);
}
}
};
</script>
<style lang="scss">
//
.y-f {
display: -webkit-box;
display: -webkit-flex;
display: flex;
-webkit-box-orient: vertical;
-webkit-box-direction: normal;
-webkit-flex-direction: column;
flex-direction: column;
-webkit-box-align: center;
-webkit-align-items: center;
align-items: center;
}
.menu-category-box {
padding: 30rpx 30rpx 0 30rpx;
background: #fff;
box-sizing: border-box;
}
.menu-category-box,
.menu-swiper-box {
position: relative;
background: #fff;
.menu-swiper-item {
background: #fff;
height: 100%;
width: 100%;
}
.menu-tab-box {
display: flex;
flex-wrap: wrap;
.tab-list {
font-size: 22rpx;
font-family: PingFang SC;
font-weight: 500;
color: rgba(51, 51, 51, 1);
padding-bottom: 30rpx;
.tab-img {
border-radius: 25rpx;
margin-bottom: 10rpx;
}
}
}
.menu-category-dots {
display: flex;
position: absolute;
left: 50%;
transform: translateX(-50%);
bottom: 20rpx;
.category-dot {
width: 40rpx;
height: 3rpx;
background: #eeeeee;
margin-right: 10rpx;
}
.category-dot-active {
width: 40rpx;
height: 3rpx;
background: #a8700d;
margin-right: 10rpx;
}
}
}
</style>

228
components/PromotionGood.vue

@ -1,212 +1,36 @@
<template>
<view>
<view class="sh-title-card mb10">
<view class="title-box">
<image class="title-bg" src="@/static/images/title1.png" mode="aspectFill"></image>
<view class="title-text">为你推荐</view>
<!-- <view class="title-text" :style="{ color: detail.color }">为你推荐</view> -->
</view>
</view>
<view class="hot-goods mx20 mb10" v-if="benefit.length">
<view class="goods-list x-f">
<view class="goods-item" v-for="(item, promotionGoodIndex) in benefit" :key="promotionGoodIndex">
<view class="goods-box" @tap="routerGo(item)">
<view class="img-box">
<!-- <image class="tag-img" :src="item.image" mode=""></image> -->
<image class="img" :src="item.image" lazy-load mode="aspectFill"></image>
</view>
<view class="tip one-t">{{ item.storeName }}</view>
<view class="title more-t">{{ item.storeName }}</view>
<view class="price-box">
<view class="flex x-bc align-end">
<view class="current">{{ item.activity_type === 'groupon' ? item.price : item.otPrice }}
</view>
<view class="sales miso-font">仅剩{{ item.stock }}{{ item.unitName }}</view>
</view>
<view class="x-f tag-box">
<!-- <view class="discount">新人礼</view>
<view class="discount">满100减60</view> -->
</view>
<view class="promotionGood" v-if="benefit.length > 0">
<view class="item acea-row row-between-wrapper" v-for="(item, promotionGoodIndex) in benefit" :key="promotionGoodIndex" @click="routerGo(item)">
<view class="pictrue"><image :src="item.image" class="image" /></view>
<view class="text">
<view class="name line1">{{ item.storeName }}</view>
<view class="sp-money acea-row">
<view class="moneyCon">
促销价:
<text class="num">{{ item.price }}</text>
</view>
</view>
<view class="acea-row row-between-wrapper">
<view class="money">日常价{{ item.otPrice }}</view>
<view>仅剩{{ item.stock }}{{ item.unitName }}</view>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
name: 'PromotionGood',
props: ['benefit'],
data: function () {
return {};
},
methods: {
routerGo(item) {
this.$yrouter.push({
path: '/pages/shop/GoodsCon/index',
query: {
id: item.id
}
});
}
},
mounted() {}
};
</script>
<style lang="scss">
.sh-title-card {
width: 750rpx;
}
.title-box {
width: 710rpx;
height: 88rpx;
margin: 0 auto;
position: relative;
border-radius: 30rpx;
.title-bg {
width: 100%;
height: 100%;
}
.title-text {
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
font-weight: bold;
}
}
.goods-box {
width: 345rpx;
background: #fff;
padding-bottom: 20rpx;
border-radius: 20rpx;
overflow: hidden;
.img-box {
width: 345rpx;
height: 345rpx;
overflow: hidden;
position: relative;
.tag-img {
position: absolute;
left: 0;
top: 0;
z-index: 2;
width: 80rpx;
height: 40rpx;
}
.img {
width: 345rpx;
height: 345rpx;
background-color: #ccc;
}
}
.tip {
width: 346rpx;
line-height: 56rpx;
background: rgba(246, 242, 234, 1);
font-size: 22rpx;
font-family: PingFang SC;
font-weight: 400;
color: rgba(168, 112, 13, 1);
padding: 0 20rpx;
}
.title {
font-size: 24rpx;
font-family: PingFang SC;
font-weight: 500;
line-height: 36rpx;
height: 72rpx;
margin: 20rpx 20rpx 10rpx;
}
.price-box {
padding: 10rpx 20rpx 0;
width: 344rpx;
box-sizing: border-box;
.sales {
font-size: 20rpx;
font-family: PingFang SC;
font-weight: 400;
color: rgba(153, 153, 153, 1);
line-height: 20rpx;
margin-bottom: 20rpx;
}
.current {
font-size: 30rpx;
font-weight: 500;
color: rgba(225, 33, 43, 1);
line-height: 30rpx;
margin-bottom: 20rpx;
&:before {
content: '¥';
font-size: 26rpx;
}
}
.original {
font-size: 22rpx;
font-weight: 400;
text-decoration: line-through;
color: rgba(153, 153, 153, 1);
margin-left: 14rpx;
line-height: 22rpx;
margin-bottom: 10rpx;
&:before {
content: '¥';
font-size: 20rpx;
}
}
.tag-box {
.discount {
line-height: 28rpx;
border: 1rpx solid rgba(225, 33, 43, 1);
border-radius: 8rpx;
font-size: 18rpx;
font-family: PingFang SC;
font-weight: 500;
color: rgba(225, 33, 43, 1);
padding: 0 8rpx;
margin-right: 10rpx;
}
}
export default {
name: 'PromotionGood',
props: ['benefit'],
data: function() {
return {};
},
methods: {
routerGo(item) {
this.$yrouter.push({ path: '/pages/shop/GoodsCon/index', query: { id: item.id } });
}
},
mounted() {
}
//
.hot-goods {
background: linear-gradient(#fff 200rpx, #f6f6f6 500rpx, #f6f6f6);
border-radius: 20rpx;
.goods-list {
flex-wrap: wrap;
width: 710rpx;
.goods-item {
margin-right: 20rpx;
margin-bottom: 20rpx;
width: 345rpx;
box-shadow: 0px 0px 10rpx 4rpx rgba(199, 199, 199, 0.22);
border-radius: 20rpx;
&:nth-child(2n) {
margin-right: 0;
}
}
}
}
</style>
};
</script>

87
components/sh-activity-goods.vue

@ -1,87 +0,0 @@
<template>
<view class="min-goods" @tap="jump('/pages/activity/GroupDetails/index', { id: detail.id })">
<view class="img-box">
<view class="tag" >{{ detail.people}}人团</view>
<image class="img" :src="detail.image" mode="widthFix"></image>
</view>
<view class="price-box">
<view class="y-f">
<text class="seckill-current">{{ detail.price }}</text>
<text class="original">{{ detail.browse }}人浏览</text>
</view>
</view>
<view class="title"><slot name="titleText"></slot></view>
</view>
</template>
<script>
export default {
components: {},
data() {
return {};
},
props: {
detail: Object
},
computed: {},
methods: {
//
jump(path, query) {
this.$yrouter.push({
path,
query
});
}
}
};
</script>
<style lang="scss">
.min-goods {
width: 152rpx;
background: #fff;
.img-box {
width: 152rpx;
height: 152rpx;
overflow: hidden;
position: relative;
.tag {
position: absolute;
left: 0;
bottom: 0rpx;
z-index: 2;
line-height: 35rpx;
background: linear-gradient(132deg, rgba(243, 223, 177, 1), rgba(243, 223, 177, 1), rgba(236, 190, 96, 1));
border-radius: 0px 18rpx 18rpx 0px;
padding: 0 10rpx;
font-size: 24rpx;
font-family: PingFang SC;
font-weight: bold;
color: rgba(120, 79, 6, 1);
}
.img {
width: 100%;
background-color: #ccc;
}
}
.price-box {
width: 100%;
margin-top: 10rpx;
.seckill-current {
font-size: 30rpx;
font-weight: 500;
color: rgba(225, 33, 43, 1);
}
.original {
font-size: 20rpx;
font-weight: 400;
text-decoration: line-through;
color: rgba(153, 153, 153, 1);
margin-left: 14rpx;
}
}
.title {
font-size: 26rpx;
}
}
</style>

260
components/sh-adv.vue

@ -1,260 +0,0 @@
<template>
<view class="adv-box mx20 mb10">
<!-- 模板1-->
<view class="x-f" v-if="detail.style == 1">
<image style="width:710rpx;height: 220rpx;" @tap="jump(detail.list[0].path)" :src="detail.list[0].image"
mode="aspectFill"></image>
</view>
<!-- 模板2-->
<view class="type1 x-f" v-if="detail.style == 2">
<image class="type1-img" @tap="jump(detail.list[0].path)" :src="detail.list[0].image" mode="aspectFill">
</image>
<image class="type1-img" @tap="jump(detail.list[1].path)" :src="detail.list[1].image" mode="aspectFill">
</image>
</view>
<!-- 模板3-->
<view class="type2 x-bc" v-if="detail.style == 3">
<image class="type2-img1" @tap="jump(detail.list[0].path)" :src="detail.list[0].image" mode="aspectFill">
</image>
<view class="y-f type2-box">
<image class="type2-img2" @tap="jump(detail.list[1].path)" :src="detail.list[1].image" mode="aspectFill"
style="border-bottom:1rpx solid #f6f6f6"></image>
<image class="type2-img2" @tap="jump(detail.list[2].path)" :src="detail.list[2].image"
mode="aspectFill"></image>
</view>
</view>
<!-- 模板4-->
<view class="type3 x-bc" v-if="detail.style == 4">
<view class="type3-box y-f">
<image class="type3-img1" @tap="jump(detail.list[0].path)" :src="detail.list[0].image"
mode="aspectFill"></image>
<image class="type3-img1" @tap="jump(detail.list[1].path)" :src="detail.list[1].image"
mode="aspectFill"></image>
</view>
<image class="type3-img2" @tap="jump(detail.list[2].path)" :src="detail.list[2].image" mode="aspectFill">
</image>
</view>
<!-- 模板5-->
<view class="type4 y-f" v-if="detail.style == 5">
<view class="type4-box x-f">
<image class="type4-img1" @tap="jump(detail.list[0].path)" :src="detail.list[0].image"
mode="aspectFill"></image>
<image class="type4-img1" @tap="jump(detail.list[1].path)" :src="detail.list[1].image"
mode="aspectFill"></image>
</view>
<image class="type4-img2" @tap="jump(detail.list[2].path)" :src="detail.list[2].image" mode="aspectFill">
</image>
</view>
<!-- 模板6-->
<view class="type5 y-f" v-if="detail.style == 6">
<image class="type5-img1" @tap="jump(detail.list[0].path)" :src="detail.list[0].image" mode="aspectFill">
</image>
<view class="type5-box x-bc">
<image class="type5-img2" @tap="jump(detail.list[1].path)" :src="detail.list[1].image" mode="aspectFill"
style="border-bottom:1rpx solid #f6f6f6"></image>
<image class="type5-img2" @tap="jump(detail.list[2].path)" :src="detail.list[2].image"
mode="aspectFill"></image>
</view>
</view>
<!-- 模板7-->
<view class="type6 y-f" v-if="detail.style == 7">
<view class="x-f type6-box1">
<image class="type6-img1" @tap="jump(detail.list[0].path)" :src="detail.list[0].image"
mode="aspectFill"></image>
<image class="type6-img1" @tap="jump(detail.list[1].path)" :src="detail.list[1].image"
mode="aspectFill"></image>
</view>
<view class="x-f type6-box2">
<image class="type6-img2" @tap="jump(detail.list[2].path)" :src="detail.list[2].image"
mode="aspectFill"></image>
<image class="type6-img2" @tap="jump(detail.list[3].path)" :src="detail.list[3].image"
mode="aspectFill"></image>
<image class="type6-img2" @tap="jump(detail.list[4].path)" :src="detail.list[4].image"
mode="aspectFill"></image>
</view>
</view>
</view>
</template>
<script>
export default {
components: {},
data() {
return {
detail: {
"list": [{
"image": "https:\/\/shopro-1253949872.file.myqcloud.com\/uploads\/20200704\/0669a6adec3f35d45ec66a082e03774f.png",
"name": "",
"path": "\/pages\/app\/coupon\/list",
"path_name": "优惠券-优惠劵中心",
"path_type": 1
}, {
"image": "https:\/\/shopro-1253949872.file.myqcloud.com\/uploads\/20200704\/cddb5d90a4241f6235d16368534bc730.png",
"name": "",
"path": "\/pages\/activity\/groupon\/list",
"path_name": "活动-今日必拼",
"path_type": 1
}, {
"image": "https:\/\/shopro-1253949872.file.myqcloud.com\/uploads\/20200704\/e047d312fb5930de972ae288b9b3bae7.png",
"name": "",
"path": "\/pages\/app\/score\/list",
"path_name": "应用-积分商城",
"path_type": 1
}],
"name": "",
"style": 3
}
};
},
props: {},
computed: {},
created() {},
methods: {
//
jump(path) {
this.$yrouter.push({
path: '/pages/shop/GoodsCon/index',
query: {
id: item.id
}
});
this.$tools.routerTo(path);
}
}
};
</script>
<style lang="scss">
.adv-box {
background-color: #fff;
border-radius: 20rpx;
overflow: hidden;
image{
width: 100%;
}
.type1 {
.type1-img {
flex: 1;
height: 220rpx;
&:first-child {
border-right: 1rpx solid #f6f6f6;
}
}
}
.type2 {
.type2-img1 {
width: (710rpx/2);
height: 340rpx;
border-right: 1rpx solid #f6f6f6;
}
.type2-box {
flex: 1;
height: 340rpx;
width: (710rpx/2);
.type2-img2 {
height: (340rpx/2);
}
}
}
.type3 {
.type3-box {
width: (710rpx/2);
border-right: 1rpx solid #f6f6f6;
.type3-img1 {
flex: 1;
height: (340rpx/2);
&:first-child {
border-bottom: 1rpx solid #f6f6f6;
}
}
}
.type3-img2 {
flex: 1;
height: 340rpx;
width: (710rpx/2);
}
}
.type4 {
.type4-box {
border-bottom: 1rpx solid #f6f6f6;
.type4-img1 {
flex: 1;
height: (340rpx/2);
&:first-child {
border-right: 1rpx solid #f6f6f6;
}
}
}
.type4-img2 {
flex: 1;
height: (340rpx/2);
width: 710rpx;
}
}
.type5 {
.type5-img1 {
width: 710rpx;
height: (340rpx/2);
border-bottom: 1rpx solid #f6f6f6;
}
.type5-box {
flex: 1;
height: (340rpx/2);
width: 710rpx;
.type5-img2 {
height: (340rpx/2);
&:first-child {
border-right: 1rpx solid #f6f6f6;
}
}
}
}
.type6 {
.type6-box1 {
.type6-img1 {
width: (710rpx/2);
height: (340rpx/2);
&:first-child {
border-right: 1rpx solid #f6f6f6;
}
}
}
.type6-box2 {
border-top: 1rpx solid #f6f6f6;
.type6-img2 {
width: (710rpx/3);
height: (340rpx/2);
border-right: 1rpx solid #f6f6f6;
&:last-child {
border-right: 0;
}
}
}
}
image {
// background-color: #ccc;
}
}
</style>

197
components/sh-groupon.vue

@ -1,197 +0,0 @@
<template>
<!-- 今日必拼 -->
<view class="group-goods pa20 mx20 mb10">
<view class="title-box x-bc" @tap="jump('/pages/activity/GoodsGroup/index')">
<text class="title">超值拼团</text>
<view class="group-people x-f">
<text class="tip">更多</text>
<text class="cuIcon-right"></text>
</view>
</view>
<view class="goods-box swiper-box x-f">
<swiper class="carousel" circular @change="swiperChange" :autoplay="true" duration="2000">
<swiper-item v-for="(goods, index) in goodsList" :key="index" class="carousel-item">
<view class="goods-list-box x-f">
<block v-for="mgoods in goods" :key="mgoods.id">
<sh-activity-goods :detail="mgoods" class="goods-item">
<!-- <block slot="titleText">立减8.5</block> -->
</sh-activity-goods>
</block>
</view>
</swiper-item>
</swiper>
<view class="swiper-dots" v-if="goodsList.length > 1">
<text :class="swiperCurrent === index ? 'dot-active' : 'dot'" v-for="(dot, index) in goodsList.length"
:key="index"></text>
</view>
</view>
</view>
</template>
<script>
import shActivityGoods from './sh-activity-goods.vue';
export default {
name: 'shGroupon',
components: {
shActivityGoods
},
data() {
return {
goodsList: [],
swiperCurrent: 0
};
},
props: {
detail: Array
},
computed: {},
created() {},
watch: {
detail(next) {
this.goodsList = this.sortData(next, 4);
}
},
methods: {
swiperChange(e) {
this.swiperCurrent = e.detail.current;
},
//
sortData(oArr, length) {
let arr = [];
let minArr = [];
oArr.forEach(c => {
if (minArr.length === length) {
minArr = [];
}
if (minArr.length === 0) {
arr.push(minArr);
}
minArr.push(c);
});
return arr;
},
jump(path, query) {
this.$yrouter.push({
path,
query,
});
},
}
};
</script>
<style lang="scss">
.swiper-box,
.carousel {
width: 700rpx;
height: 240upx;
position: relative;
border-radius: 20rpx;
.carousel-item {
width: 100%;
height: 100%;
// padding: 0 28upx;
overflow: hidden;
}
.swiper-image {
width: 100%;
height: 100%;
// border-radius: 10upx;
background: #ccc;
}
}
.swiper-dots {
display: flex;
position: absolute;
left: 50%;
transform: translateX(-50%);
bottom: 0rpx;
z-index: 66;
.dot {
width: 45rpx;
height: 3rpx;
background: #eee;
border-radius: 50%;
margin-right: 10rpx;
}
.dot-active {
width: 45rpx;
height: 3rpx;
background: #a8700d;
border-radius: 50%;
margin-right: 10rpx;
}
}
// +
.group-goods {
background: #fff;
border-radius: 20rpx;
overflow: hidden;
.title-box {
padding-bottom: 20rpx;
.title {
font-size: 32rpx;
font-weight: bold;
}
.group-people {
.time-box {
font-size: 26rpx;
color: #edbf62;
.count-text-box {
width: 30rpx;
height: 34rpx;
background: #edbf62;
text-align: center;
line-height: 34rpx;
font-size: 24rpx;
border-radius: 6rpx;
color: rgba(#fff, 0.9);
margin: 0 8rpx;
}
}
.head-box {
.head-img {
width: 40rpx;
height: 40rpx;
border-radius: 50%;
background: #ccc;
}
}
.tip {
font-size: 28rpx;
padding-left: 30rpx;
color: #666;
}
.cuIcon-right {
font-size: 30rpx;
line-height: 28rpx;
color: #666;
}
}
}
.goods-box {
.goods-item {
margin-right: 22rpx;
&:nth-child(4n) {
margin-right: 0;
}
}
}
}
</style>

4
config/index.js

@ -1,5 +1,5 @@
// export const VUE_APP_API_URL = 'http://natapp.xinxintuan.co/api';
// export const VUE_APP_API_URL = 'https://wxapi.yixiang.co/api';
export const VUE_APP_API_URL = 'https://h5api.xinxintuan.co/api';
export const VUE_APP_API_URL = 'https://wxapi.yixiang.co/api';
// export const VUE_APP_API_URL = 'https://h5api.dayouqiantu.cn/api';
export const VUE_APP_RESOURCES_URL = 'https://h5.yixiang.co/static';

3
libs/wechat.js

@ -142,6 +142,7 @@ export function auth(code) {
console.log('获取微信授权')
return new Promise((resolve, reject) => {
let loginType = cookie.get(LOGINTYPE);
debugger
wechatAuth(code, parseInt(cookie.get("spread")), loginType)
.then(({ data }) => {
console.log(data)
@ -151,10 +152,12 @@ export function auth(code) {
cookie.set(WX_AUTH, code, expires_time);
cookie.remove(STATE_KEY);
loginType && cookie.remove(LOGINTYPE);
debugger
resolve();
})
.catch(reject);
}).catch(error => {
debugger
console.log(error)
})
}

3
manifest.json

@ -164,7 +164,6 @@
"key" : ""
}
}
},
"domain" : "h5.yixiang.co"
}
}
}

13
package-lock.json generated

@ -193,14 +193,6 @@
"resolved": "https://registry.npm.taobao.org/mimic-response/download/mimic-response-1.0.1.tgz?cache=0&sync_timestamp=1589481629775&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fmimic-response%2Fdownload%2Fmimic-response-1.0.1.tgz",
"integrity": "sha1-SSNTiHju9CBjy4o+OweYeBSHqxs="
},
"miniapp-color-thief": {
"version": "1.0.5",
"resolved": "https://registry.npm.taobao.org/miniapp-color-thief/download/miniapp-color-thief-1.0.5.tgz",
"integrity": "sha1-CdeHKwTUHIERDK9FbfVAOuOZ7iw=",
"requires": {
"quantize": "^1.0.2"
}
},
"mongodb": {
"version": "3.4.1",
"resolved": "https://registry.npm.taobao.org/mongodb/download/mongodb-3.4.1.tgz",
@ -304,11 +296,6 @@
"once": "^1.3.1"
}
},
"quantize": {
"version": "1.0.2",
"resolved": "https://registry.npm.taobao.org/quantize/download/quantize-1.0.2.tgz",
"integrity": "sha1-0lrCAKd7bXD0ASfKFxoQ4zyFRt4="
},
"regexp-clone": {
"version": "1.0.0",
"resolved": "https://registry.npm.taobao.org/regexp-clone/download/regexp-clone-1.0.0.tgz",

1
package.json

@ -14,7 +14,6 @@
"async-validator": "^3.2.4",
"dayjs": "^1.8.22",
"jweixin-module": "^1.6.0",
"miniapp-color-thief": "^1.0.5",
"vue-ydui": "^1.2.6",
"wechat-jssdk": "^5.0.4"
}

10
pages.json

@ -39,10 +39,7 @@
{
"path": "pages/home/index",
"style": {
"navigationBarTitleText": "yshop商城",
"navigationBarTextStyle": "white",
// "enablePullDownRefresh": true,
"navigationStyle": "custom"
"navigationBarTitleText": "yshop商城"
}
},
{
@ -408,10 +405,9 @@
],
"globalStyle": {
"navigationBarTextStyle": "black",
"navigationBarTitleText": "Yshop",
"navigationBarTitleText": "uni-app",
"navigationBarBackgroundColor": "#F8F8F8",
"backgroundColor": "#F8F8F8",
"navigationStyle": "default"
"backgroundColor": "#F8F8F8"
},
"tabBar": {
"color": "#282828",

8
pages/Loading/index.vue

@ -44,7 +44,7 @@ export default {
}
cookie.get("spread");
// this.toLaunch();
if (this.$deviceType == "app"||this.$deviceType == "h5") {
if (this.$deviceType == "app") {
// this.toLaunch();
this.$yrouter.switchTab({
path: "/pages/home/index"
@ -52,9 +52,9 @@ export default {
return;
}
login().finally(() => {
this.$yrouter.switchTab({
path: "/pages/home/index"
});
// this.$yrouter.switchTab({
// path: "/pages/home/index"
// });
});
},
methods: {

904
pages/activity/DargainDetails/index.vue

File diff suppressed because it is too large Load Diff

375
pages/activity/GoodsSeckill/index.vue

@ -5,9 +5,6 @@
</view>
<scroll-view scroll-y="false" scroll-x="true">
<view class="timeScroll">
<div class="logoPic">
<image src="https://wx.yixiang.co/h5/img/baokuan.6313c8c8.png">
</div>
<view v-for="(item, index) in timeList" :key="index">
<view v-if="active==index" class="timeItem active" @click="setTime(index)">
<view class="time">{{ item.time }}</view>
@ -22,15 +19,26 @@
</scroll-view>
<view v-for="(item, index) in timeList" :key="index">
<view v-if="active == index">
<!-- <view class="countDown font-color-red acea-row row-center-wrapper">
<view class="countDown font-color-red acea-row row-center-wrapper">
<view v-if="item.status === 0" class="activity">活动已结束</view>
<count-down :isDay="false" :tipText="'距结束仅剩 '" :dayText="false" :hourText="' : '" :minuteText="' : '"
:secondText="false" :datatime="datatime" v-if="item.status === 1"></count-down>
<count-down
:isDay="false"
:tipText="'距结束仅剩 '"
:dayText="false"
:hourText="' : '"
:minuteText="' : '"
:secondText="false"
:datatime="datatime"
v-if="item.status === 1"
></count-down>
<view v-if="item.status === 2" class="activity">活动即将开始</view>
</view> -->
</view>
<view class="list">
<view class="item acea-row row-between-wrapper" v-for="(itemSeckill, indexSeckill) in seckillList"
:key="indexSeckill">
<view
class="item acea-row row-between-wrapper"
v-for="(itemSeckill, indexSeckill) in seckillList"
:key="indexSeckill"
>
<view class="pictrue">
<image :src="itemSeckill.image" />
</view>
@ -45,14 +53,21 @@
<view class="piece font-color-red" v-text="'仅剩' + itemSeckill.stock + '件'"></view>
</view>
</view>
<view class="grab bg-color-red" v-if="item.status === 1 && itemSeckill.stock > 0"
@click="goDetail(itemSeckill.id)">马上抢</view>
<view
class="grab bg-color-red"
v-if="item.status === 1 && itemSeckill.stock > 0"
@click="goDetail(itemSeckill.id)"
>马上抢</view>
<view class="grab" v-if="item.status === 1 && itemSeckill.stock <= 0">已售磬</view>
<view class="grab bg-color-red" v-if="item.status === 2">即将开始</view>
<view class="grab bg-color-red" v-if="item.status === 0">已结束</view>
</view>
</view>
<view class="noCommodity" style="background-color: #f5f5f5;" v-if="seckillList.length === 0 && page > 1">
<view
class="noCommodity"
style="background-color: #fff;"
v-if="seckillList.length === 0 && page > 1"
>
<view class="noPictrue">
<image src="@/static/images/noGood.png" class="image" />
</view>
@ -62,211 +77,185 @@
</view>
</template>
<script>
import {
getSeckillConfig,
getSeckillList
} from "@/api/activity";
import CountDown from "@/components/CountDown";
// import { Tab, Tabs } from "vant-weapp";
import Loading from "@/components/Loading";
import { getSeckillConfig, getSeckillList } from "@/api/activity";
import CountDown from "@/components/CountDown";
// import { Tab, Tabs } from "vant-weapp";
import Loading from "@/components/Loading";
export default {
name: "GoodsSeckill",
components: {
CountDown
},
props: {},
data: function () {
return {
headerImg: "",
timeList: [],
sticky: false,
loading: false,
datatime: 0,
active: 0,
seckillList: [],
status: false, // false true
loadingList: false, // false true
page: 1, //
limit: 5, //
title: []
};
},
mounted: function () {
this.mountedStart();
},
onReachBottom() {
!this.loadingList && this.getSeckillList();
export default {
name: "GoodsSeckill",
components: {
CountDown
},
props: {},
data: function() {
return {
headerImg: "",
timeList: [],
sticky: false,
loading: false,
datatime: 0,
active: 0,
seckillList: [],
status: false, // false true
loadingList: false, // false true
page: 1, //
limit: 5, //
title: []
};
},
mounted: function() {
this.mountedStart();
},
onReachBottom() {
!this.loadingList && this.getSeckillList();
},
methods: {
changeTime: function(index) {
this.active = index;
this.getSeckillList();
},
methods: {
changeTime: function (index) {
this.active = index;
this.getSeckillList();
},
mountedStart: function () {
var that = this;
uni.showLoading();
getSeckillConfig().then(res => {
that.$set(that, "headerImg", res.data.lovely);
that.$set(that, "timeList", res.data.seckillTime);
that.$set(that, "active", res.data.seckillTimeIndex);
mountedStart: function() {
var that = this;
uni.showLoading();
getSeckillConfig().then(res => {
that.$set(that, "headerImg", res.data.lovely);
that.$set(that, "timeList", res.data.seckillTime);
that.$set(that, "active", res.data.seckillTimeIndex);
let title = [];
title = res.data.seckillTime.map((item, index) => {
return {
name: "div",
attrs: {
class: "timeItem"
},
children: [{
name: "div",
attrs: {
class: "time"
},
children: [{
let title = [];
title = res.data.seckillTime.map((item, index) => {
return {
name: "div",
attrs: {
class: "timeItem"
},
children: [
{
name: "div",
attrs: {
class: "time"
},
children: [
{
type: "text",
text: item.time
}]
}
]
},
{
name: "div",
attrs: {
class: "state"
},
{
name: "div",
attrs: {
class: "state"
},
children: [{
children: [
{
type: "text",
text: item.state
}]
}
]
};
});
that.$set(that, "title", title);
that.datatime = that.timeList[that.active].stop;
that.getSeckillList();
that.$nextTick(function () {
that.sticky = true;
uni.hideLoading();
});
}
]
}
]
};
});
},
setTime: function (index) {
var that = this;
that.page = 1;
that.loadingList = false;
that.status = false;
that.active = index;
that.$set(that, "title", title);
that.datatime = that.timeList[that.active].stop;
this.seckillList = [];
that.getSeckillList();
},
getSeckillList: function () {
var that = this;
if (that.loadingList) return;
if (that.status) return;
var time = that.timeList[that.active].id;
getSeckillList(time, {
page: that.page,
limit: that.limit
}).then(res => {
that.status = res.data.length < that.limit;
that.seckillList.push.apply(that.seckillList, res.data);
that.page++;
that.$nextTick(function() {
that.sticky = true;
uni.hideLoading();
});
},
goDetail: function (id) {
var that = this;
var time = that.timeList[that.active].stop;
this.$yrouter.push({
path: "/pages/activity/SeckillDetails/index",
query: {
id,
time
}
});
}
});
},
setTime: function(index) {
var that = this;
that.page = 1;
that.loadingList = false;
that.status = false;
that.active = index;
that.datatime = that.timeList[that.active].stop;
this.seckillList = [];
that.getSeckillList();
},
getSeckillList: function() {
var that = this;
if (that.loadingList) return;
if (that.status) return;
var time = that.timeList[that.active].id;
getSeckillList(time, {
page: that.page,
limit: that.limit
}).then(res => {
that.status = res.data.length < that.limit;
that.seckillList.push.apply(that.seckillList, res.data);
that.page++;
uni.hideLoading();
});
},
goDetail: function(id) {
var that = this;
var time = that.timeList[that.active].stop;
this.$yrouter.push({
path: "/pages/activity/SeckillDetails/index",
query: {
id,
time
}
});
}
};
}
};
</script>
<style scoped lang="less">
.flash-sale {
background: #f5f5f5!important;
height: 100%;
}
.timeScroll {
display: flex;
align-items: center;
flex-direction: row;
}
.list{
padding: 0 20rpx;
.item{
padding: .25*100rpx;
border-bottom: 1px solid #f0f0f0;
height: auto;
position: relative;
background: #fff;
margin-bottom: .2*100rpx;
border-radius: .2*100rpx;
}
.timeScroll {
display: flex;
align-items: center;
flex-direction: row;
}
.logoPic {
width: 75rpx;
height: 70rpx;
margin-left: 20rpx;
margin-right: 20rpx;
image {
width: 75rpx;
height: 70rpx;
}
}
.timeItem {
font-size: 0.22 * 100rpx;
color: #282828;
width: 150rpx;
text-align: center;
padding: 20rpx 0;
background-color: none;
.timeItem {
font-size: 0.22 * 100rpx;
color: #282828;
width: 150rpx;
text-align: center;
padding: 0.11 * 100rpx 0;
background-color: none;
&.active {
.time {
color: #eb3729;
}
&.active {
.time {
color: #eb3729;
}
.state {
background: linear-gradient(90deg,#00c17b,#00c17b);
color: #fff;
opacity: 1;
border-radius: 30rpx;
padding: 0 0.2 * 100rpx;
font-weight: 800;
height: 0.37 * 100rpx;
line-height: 0.37 * 100rpx;
}
.state {
background-color: #eb3729;
color: #fff;
opacity: 1;
border-radius: 30rpx;
padding: 0 0.2 * 100rpx;
font-weight: 800;
height: 0.37 * 100rpx;
line-height: 0.37 * 100rpx;
}
}
}
.timeItem .time {
font-size: 0.32 * 100rpx;
font-weight: bold;
height: .5 * 100rpx;
line-height: .5 * 100rpx;
}
.timeItem .time {
font-size: 0.32 * 100rpx;
font-weight: bold;
height: 0.37 * 100rpx;
line-height: 0.37 * 100rpx;
}
.timeItem .state {
height: 0.37 * 100rpx;
line-height: 0.37 * 100rpx;
}
.timeItem .state {
height: 0.37 * 100rpx;
line-height: 0.37 * 100rpx;
}
.activity {
color: #333;
}
.activity {
color: #333;
}
.flash-sale .list .item .grab {
background-color: #999;
}
.flash-sale .list .item .grab {
background-color: #999;
}
</style>

342
pages/authorization/index.vue

@ -1,193 +1,219 @@
<template>
<view class="container">
<!-- #ifdef MP-WEIXIN -->
<view v-if="!token" class="force-login-wrap">
<image class="logo-bg" src="@/static/images/logo_bg.png" mode="aspectFill"></image>
<view class="force-login__content y-f">
<open-data class="user-avatar" type="userAvatarUrl"></open-data>
<open-data class="user-name" type="userNickName"></open-data>
<view class="login-notice">为了提供更优质的服务需要获取您的头像昵称</view>
<button class="cu-btn author-btn" @getuserinfo="getUserInfo" open-type="getUserInfo">授权并查看</button>
<button class="cu-btn close-btn" @tap="back">暂不授权</button>
<view v-if="!token">
<!-- #ifdef MP-WEIXIN -->
<view>
<view class="getUserInfo">
<text>您还未允许微信登录授权请点击下方按钮允许微信授权登录</text>
<button type="primary" open-type="getUserInfo" @getuserinfo="getUserInfo">允许微信登录授权</button>
<view style="height:20rpx"></view>
<button @click="back">取消微信登录授权</button>
</view>
</view>
</view>
<!-- #endif -->
<!-- #ifndef MP-WEIXIN -->
<view class="force-login-wrap">
<image class="logo-bg" src="@/static/images/logo_bg.png" mode="aspectFill"></image>
<view class="force-login__content y-f">
<view class="login-notice">为了提供更优质的服务请先登录</view>
<button class="cu-btn author-btn" @tap="toLogin">去登录</button>
<!-- #endif -->
<!-- #ifndef MP-WEIXIN -->
<view>
<view class="getUserInfo">
<text>请先登录</text>
<button type="primary" @tap="toLogin">去登录</button>
</view>
</view>
<!-- #endif -->
</view>
<!-- #endif -->
</view>
</template>
<script>
import {
mapState,
mapMutations,
mapActions
} from "vuex";
import {
wxappAuth,
getUser
} from "@/api/user";
import dayjs from "dayjs";
import cookie from "@/utils/store/cookie";
import {
login,
authorize
} from "@/utils";
export default {
data() {
return {
authorize: false,
};
},
computed: {
...mapState(["isAuthorization", "$deviceType", "token"]),
},
onShow() {
// //
},
onHide() {
this.updateAuthorizationPage(false);
this.changeAuthorization(false);
import { mapState, mapMutations, mapActions } from "vuex";
import { wxappAuth, getUser } from "@/api/user";
import dayjs from "dayjs";
import cookie from "@/utils/store/cookie";
import { login, authorize } from "@/utils";
export default {
data() {
return {
authorize: false,
};
},
computed: {
...mapState(["isAuthorization", "$deviceType", "token"]),
},
onShow() {
// //
},
onHide() {
this.updateAuthorizationPage(false);
this.changeAuthorization(false);
},
onUnload() {
this.updateAuthorizationPage(false);
this.changeAuthorization(false);
},
methods: {
...mapActions(["changeAuthorization", "setUserInfo"]),
...mapMutations(["updateAuthorizationPage"]),
toLogin() {
this.$yrouter.push({
path: "/pages/user/Login/index",
query: {},
});
},
onUnload() {
this.updateAuthorizationPage(false);
this.changeAuthorization(false);
back() {
this.$yrouter.switchTab({
path: "/pages/home/index",
query: {},
});
},
methods: {
...mapActions(["changeAuthorization", "setUserInfo"]),
...mapMutations(["updateAuthorizationPage"]),
toLogin() {
this.$yrouter.push({
path: "/pages/user/Login/index",
query: {},
getUserInfo(data) {
if (data.detail.errMsg == "getUserInfo:fail auth deny") {
uni.showToast({
title: "取消授权",
icon: "none",
duration: 2000,
});
},
back() {
this.$yrouter.switchTab({
path: "/pages/home/index",
query: {},
});
},
getUserInfo(data) {
if (data.detail.errMsg == "getUserInfo:fail auth deny") {
return;
}
uni.showLoading({
title: "登录中",
});
login()
.then((res) => {
this.$yrouter.replace({ path: cookie.get("redirect") });
})
.catch((error) => {
console.log(error);
uni.showToast({
title: "取消授权",
title: error,
icon: "none",
duration: 2000,
});
return;
}
uni.showLoading({
title: "登录中",
});
login()
.then((res) => {
this.$yrouter.replace({
path: cookie.get("redirect")
});
})
.catch((error) => {
console.log(error);
uni.showToast({
title: error,
icon: "none",
duration: 2000,
});
});
},
},
mounted() {},
};
},
mounted() {},
};
</script>
<style lang="less">
.container {
.sp-cell {
height: 20rpx;
}
.getUserInfo {
display: flex;
align-items: center;
flex-direction: column;
padding: 30px;
text {
font-size: 30rpx;
text-align: center;
margin-bottom: 20px;
}
}
.container {
flex: 1;
display: flex;
flex-direction: column;
justify-content: flex-start;
position: relative;
}
.tab-bar {
font-size: 0;
display: flex;
align-items: center;
background: rgba(255, 255, 255, 0.9);
position: fixed;
bottom: 0;
left: 0;
right: 0;
z-index: 99;
border-top: 1px solid rgba(248, 248, 248, 1);
.tab-bar-item {
flex: 1;
height: 49px;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
justify-content: flex-start;
position: relative;
}
.force-login-wrap {
position: fixed;
width: 100vw;
height: 100vh;
overflow: hidden;
z-index: 11111;
top: 0;
background: linear-gradient(180deg, rgba(239, 196, 128, 1) 0%, rgba(248, 220, 165, 1) 25%, rgba(255, 255, 255, 1) 98%);
.logo-bg {
width: 640rpx;
height: 300rpx;
}
.force-login__content {
position: absolute;
left: 50%;
top: 50%;
transform: translate(-50%, -50%);
.user-avatar {
width: 160rpx;
height: 160rpx;
border-radius: 50%;
overflow: hidden;
margin-bottom: 40rpx;
&.active {
text {
color: #ee7559;
}
.user-name {
font-size: 35rpx;
font-family: PingFang SC;
font-weight: bold;
color: rgba(132, 87, 8, 1);
margin-bottom: 30rpx;
}
.tab-bar-pic {
display: none;
background: #f9f9f9;
.login-notice {
font-size: 28rpx;
font-family: PingFang SC;
font-weight: 400;
color: rgba(200, 150, 61, 1);
line-height: 44rpx;
width: 500rpx;
text-align: center;
margin-bottom: 80rpx;
&.active {
display: block;
}
}
}
.author-btn {
width: 630rpx;
height: 80rpx;
background: linear-gradient(90deg, rgba(233, 180, 97, 1), rgba(238, 204, 137, 1));
box-shadow: 0px 7rpx 6rpx 0px rgba(229, 138, 0, 0.22);
border-radius: 40rpx;
font-size: 30rpx;
font-family: PingFang SC;
font-weight: 500;
color: rgba(255, 255, 255, 1);
}
.tab-bar-pic {
display: block;
background: #f9f9f9;
.close-btn {
width: 630rpx;
height: 80rpx;
margin-top: 30rpx;
border-radius: 40rpx;
border: 2rpx solid rgba(233, 180, 97, 1);
background: none;
font-size: 30rpx;
font-family: PingFang SC;
font-weight: 500;
color: rgba(233, 180, 97, 1);
&.active {
display: none;
}
}
}
.tab-bar-pic {
width: 25px;
height: 25px;
background: #f9f9f9;
image {
width: 25px;
height: 25px;
}
}
.tab-bar-pic-active {
}
text {
font-size: 10px;
color: rgb(160, 160, 160);
line-height: 10px;
margin-top: 5px;
}
}
.tab-bar-bg {
padding-top: 46px;
width: 100%;
}
.view-item {
display: none;
width: 100%;
}
.view-item-active {
display: block;
}
.getUserInfo {
display: flex;
align-items: center;
flex-direction: column;
padding: 30px;
p {
margin-bottom: 20px;
}
}
._van-dialog {
z-index: 99999999999;
}
</style>

392
pages/home/index.vue

@ -1,20 +1,6 @@
<template>
<view class="index">
<!-- 导航栏 -->
<view class="head_box " :style="{ background: bgcolor }" :class="{ active: bgcolor }">
<view class="cu-custom" :style="[{height:CustomBar+ 'px',}]">
<view class="cu-bar fixed" :style="customStyle"
:class="[bgcolor]">
<view class="action">
<text class="nav-title shopro-selector-rect">{{ 'yshop商城' }}</text>
</view>
<view class="content" :style="[{top:StatusBar + 'px'}]">
</view>
</view>
</view>
</view>
<view class="header header-search acea-row row-center-wrapper" :style="{ background: bgcolor }">
<view class="header fixed-header acea-row row-center-wrapper">
<view @click="goGoodSearch()" class="search acea-row row-middle">
<text class="iconfont icon-xiazai5"></text>
搜索商品
@ -23,34 +9,138 @@
<image src="@/static/images/qr.png" />
</view>
</view>
<view class="banner-swiper-box mb10" v-if="banner.length>0">
<canvas canvas-id="colorThief" class="hide-canvas"></canvas>
<swiper class="banner-carousel shopro-selector-rect" circular @change="swiperChange" :autoplay="true">
<swiper-item v-for="(item, index) in banner" :key="index" class="carousel-item "
@tap="routerTo(item.path)">
<image class="swiper-image " :src="item.pic" @click="goRoll(item)" mode="widthFix" lazy-load>
</image>
</swiper-item>
<view class="fixed-header-box"></view>
<view class="slider-banner banner">
<swiper indicatorDots="true" v-if="banner.length > 0" autoplay circular>
<block v-for="(item, bannerIndex) in banner" :key="bannerIndex">
<swiper-item>
<view @click="goRoll(item)" class="swiper-item">
<image :src="item.pic" />
</view>
</swiper-item>
</block>
</swiper>
<view class="banner-swiper-dots">
<text :class="swiperCurrent === index ? 'banner-dot-active' : 'banner-dot'"
v-for="(dot, index) in banner.length" :key="index"></text>
</view>
<view class="nav acea-row">
<view @click="goWxappUrl(item)" class="item" v-for="(item, menusIndex) in menus" :key="menusIndex">
<view class="pictrue">
<image :src="item.pic" />
</view>
<view>{{ item.name }}</view>
</view>
</view>
<!-- <view class="news acea-row ">
<view class="pictrue" v-if="$VUE_APP_RESOURCES_URL">
<image src="@/static/images/news.png" />
</view>
<view class="swiper-no-swiping new-banner">
<swiper class="swiper-wrapper" v-if="roll.length > 0" :indicator-dots="false" autoplay circular vertical>
<block v-for="(item, rollIndex) in roll" :key="rollIndex">
<swiper-item class="swiper-slide">
<view @click="goRoll(item)" class="swiper-item acea-row row-between-wrapper">
<view class="text acea-row row-between-wrapper">
<view class="label" v-if="item.show === '是'">最新</view>
<view class="newsTitle line1">{{ item.info }}</view>
</view>
<view class="iconfont icon-xiangyou"></view>
</view>
</swiper-item>
</block>
</swiper>
</view>
</view> -->
<!-- <view class="wrapper hot" v-if="likeInfo.length > 0"> -->
<uni-notice-bar scrollable="true" @click="goRoll(singNew)" single="true" :speed="10" showIcon="true" :text="singNew.info"></uni-notice-bar>
<view class="wrapper hot" v-if="bastList.length > 0">
<image class="bg" src="../../static/images/index-bg.png" mode="widthFix"></image>
<view class="title no-border acea-row row-between-wrapper">
<div class="text line1">
<span class="iconfont icon-remen"></span>
<span class="label">热门榜单</span>
</div>
<view @click="goHotNewGoods(2)" class="more">
更多
<text class="iconfont icon-jiantou"></text>
</view>
</view>
<view class="newProducts">
<scroll-view :show-scrollbar="false" scroll-y="false" scroll-x="true">
<view class="newProductsScroll">
<view @click="goGoodsCon(item)" class="newProductsItem" v-for="(item, likeInfoIndex) in likeInfo" :key="likeInfoIndex">
<view class="img-box">
<image :src="item.image" />
</view>
<view class="pro-info line1"><text>{{ item.storeName }}</text></view>
<view class="money font-color-red"><text>{{ item.price }}</text></view>
</view>
</view>
</scroll-view>
</view>
</view>
<view class="content_box">
<Menu :list="menus"></Menu>
<Adv />
<Groupon :detail="combinationList" />
<PromotionGood :benefit="benefit"></PromotionGood>
<view class="wrapper" v-if="bastList.length > 0">
<view class="title no-border acea-row row-between-wrapper">
<view class="text">
<div class="name line1">
<span class="iconfont icon-jingpintuijian"></span>
<span class="label">精品推荐</span>
</div>
</view>
<view @click="goHotNewGoods(1)" class="more">
更多
<text class="iconfont icon-jiantou"></text>
</view>
</view>
<Good-list :good-list="bastList" :is-sort="false"></Good-list>
</view>
<Coupon-window :coupon-list="couponList" v-if="showCoupon" @checked="couponClose" @close="couponClose">
</Coupon-window>
<view class="wrapper" v-if="firstList.length > 0">
<view class="title acea-row row-between-wrapper">
<view class="text">
<view class="name line1">
<span class="iconfont icon-xinpin"></span>
<span class="label">首发新品</span>
</view>
</view>
<view @click="goHotNewGoods(3)" class="more">
更多
<text class="iconfont icon-jiantou"></text>
</view>
</view>
<view class="newProducts">
<scroll-view :show-scrollbar="false" scroll-y="false" scroll-x="true">
<view class="newProductsScroll">
<view @click="goGoodsCon(item)" class="newProductsItem" v-for="(item, firstListIndex) in firstList" :key="firstListIndex">
<view class="img-box">
<image :src="item.image" />
</view>
<view class="pro-info line1">{{ item.storeName }}</view>
<view class="money font-color-red">{{ item.price }}</view>
</view>
</view>
</scroll-view>
</view>
</view>
<view class="wrapper" v-if="benefit.length > 0">
<view class="title acea-row row-center">
<view class="text text-center">
<div class="name line1 new-name">
<span class="iconfont icon-shoucang"></span>
<span class="txt">猜你喜欢</span>
</div>
</view>
<!-- <view @click="goGoodsPromotion(4)" class="more">
更多
<text class="iconfont icon-jiantou"></text>
</view> -->
</view>
</view>
<PromotionGood :benefit="benefit"></PromotionGood>
<Coupon-window :coupon-list="couponList" v-if="showCoupon" @checked="couponClose" @close="couponClose"></Coupon-window>
</view>
</template>
<script>
import colorThief from 'miniapp-color-thief';
// import { swiper, swiperSlide } from "vue-awesome-swiper";
import {
mapState,
mapMutations,
@ -59,10 +149,7 @@
import GoodList from '@/components/GoodList';
import PromotionGood from '@/components/PromotionGood';
import CouponWindow from '@/components/CouponWindow';
import Menu from '@/components/Menu';
import UniNoticeBar from '@/components/uni-notice-bar/uni-notice-bar'
import Adv from '@/components/sh-adv'
import Groupon from '@/components/sh-groupon.vue'
import uniNoticeBar from '@/components/uni-notice-bar/uni-notice-bar.vue'
import {
getHomeData,
getShare
@ -80,32 +167,18 @@
components: {
// swiper,
// swiperSlide,
UniNoticeBar,
uniNoticeBar,
GoodList,
PromotionGood,
CouponWindow,
Menu,
Adv,
Groupon
CouponWindow
},
props: {},
data: function () {
data: function() {
return {
CustomBar: this.CustomBar,
StatusBar: this.StatusBar,
formatMenus: [],
bgcolorAry: [],
categoryCurrent: 0,
menuNum: 5,
bgcolor: '',
bgColor: '',
swiperCurrent: 0, //
webviewId: 0,
showCoupon: false,
logoUrl: '',
banner: [],
menus: [],
combinationList: [],
roll: [],
activity: [],
activityOne: {},
@ -173,26 +246,15 @@
slidesPerView: 'auto',
observer: true,
observeParents: true
},
bgImage:''
}
};
},
computed: {
singNew() {
return this.roll.length > 0 ? this.roll[0] : "你还没添加通知哦!";
},
customStyle() {
var bgImage = this.bgImage;
// var style = `height:${this.CustomBar}px;padding-top:${0}px;background: ${this.bgcolor}`;
var style = `height:${this.CustomBar}px;padding-top:${this.StatusBar}px;background: ${this.bgcolor}`;
if (this.bgImage) {
style = `${style}background-image:url(${bgImage});`;
}
return style
},
}
},
onShow: function () {
onShow: function() {
this.getLocation()
let that = this;
uni.showLoading({
@ -210,10 +272,8 @@
that.$set(that, 'lovely', res.data.lovely);
that.$set(that, 'benefit', res.data.benefit);
that.$set(that, 'couponList', res.data.couponList);
that.$set(that, 'combinationList', res.data.combinationList);
uni.hideLoading();
that.setOpenShare();
that.doColorThief()
});
},
methods: {
@ -249,7 +309,7 @@
goGoodsPromotion() {
this.$yrouter.push('/pages/shop/GoodsPromotion/index');
},
setOpenShare: function () {
setOpenShare: function() {
if (this.$deviceType == 'weixin') {
getShare().then(res => {
var data = res.data.data;
@ -263,10 +323,15 @@
})
}
},
startQr: function () {
startQr: function() {
uni.scanCode({
success: (res) => {
let option = handleUrlParam(res.result)
console.log(option)
// {productId: "19", spread: "21", codeType: "routine"}
// {productId: "19", spread: "21", pageType: "good", codeType: "routine"}
switch (option.pageType) {
case 'good':
//
@ -309,63 +374,11 @@
}
});
},
async doColorThief() {
let that = this;
let bannerItem = this.banner[this.swiperCurrent]
let bgcolorItem = this.bgcolorAry[this.swiperCurrent]
if (!bgcolorItem) {
let ctx = uni.createCanvasContext('colorThief', that);
if (0 === that.webviewId || ctx.webviewId === that.webviewId) {
that.webviewId = ctx.webviewId;
uni.getImageInfo({
src: bannerItem.pic,
success: function (image) {
ctx.drawImage(image.path, 0, 0, image.width, image.height);
ctx.draw(true, function (e) {
uni.canvasGetImageData({
canvasId: 'colorThief',
x: 0,
y: 0,
width: parseInt(image.width),
height: parseInt(image.height),
success(res) {
let bgcolor = colorThief(res.data).color()
.getHex();
that.bgcolorAry[that.swiperCurrent] = bgcolor
that.getbgcolor(bgcolor)
}
}, );
});
}
});
}
} else {
this.getbgcolor(bgcolorItem)
}
},
swiperChange(e) {
this.swiperCurrent = e.detail.current;
this.doColorThief();
let bgcolor = this.bgcolorAry[this.swiperCurrent];
this.getbgcolor(bgcolor)
},
getbgcolor(e) {
this.bgcolor = e;
},
},
created: async function () {
await this.doColorThief();
},
}
}
};
</script>
<style scoped lang="less">
.content_box {
background: #f6f6f6;
}
.index {
background-color: #fff;
}
@ -377,13 +390,7 @@
.fixed-header {
position: fixed;
z-index: 99;
// #ifdef H5
top: 88rpx;
// #endif
// #ifndef H5
top: 0;
// #endif
left: 0;
right: 0;
background: #fff;
@ -393,119 +400,4 @@
height: 98rpx
}
}
.head_box {
position: relative;
z-index: 10;
width: 100%;
// background: #fff;
transition: all linear 0.3s;
/deep/.cuIcon-back {
display: none;
}
.nav-title {
font-size: 38rpx;
font-family: PingFang SC;
font-weight: 500;
color: #fff;
}
}
.hide-canvas {
position: fixed !important;
top: -99999upx;
left: -99999upx;
z-index: -99999;
}
//
.banner-swiper-box {
background: #fff;
}
.banner-swiper-box,
.banner-carousel {
width: 750rpx;
height: 350upx;
position: relative;
.carousel-item {
width: 100%;
height: 100%;
// padding: 0 28upx;
overflow: hidden;
}
.swiper-image {
width: 100%;
height: 100%;
// border-radius: 10upx;
// background: #ccc;
}
}
.banner-swiper-dots {
display: flex;
position: absolute;
left: 50%;
transform: translateX(-50%);
bottom: 20rpx;
z-index: 66;
.banner-dot {
width: 14rpx;
height: 14rpx;
background: rgba(255, 255, 255, 1);
border-radius: 50%;
margin-right: 10rpx;
}
.banner-dot-active {
width: 14rpx;
height: 14rpx;
background: #a8700d;
border-radius: 50%;
margin-right: 10rpx;
}
}
.cu-bar.fixed {
position: fixed;
width: 100%;
top: 0;
z-index: 1024;
// box-shadow: 0 1upx 6upx rgba(0, 0, 0, 0.1);
}
.cu-bar {
box-sizing: border-box;
.index .header {
height: 64rpx;
// width: 100%;
// padding: 0 30rpx;
// box-sizing: border-box;
}
}
.header-search {
transition: all linear 0.3s;
}
.cu-bar .action {
display: -webkit-box;
display: -webkit-flex;
display: flex;
align-items: center;
height: 100%;
max-height: 100%;
&:first-child {
margin-left: 15px;
font-size: 15px;
}
}
</style>

BIN
static/images/logo_bg.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.8 KiB

BIN
static/images/title1.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.2 KiB

510
uni.css

@ -1,510 +0,0 @@
@charset "UTF-8";
/**
* 这里是uni-app内置的常用样式变量
*
* uni-app 官方扩展插件及插件市场https://ext.dcloud.net.cn上很多三方插件均使用了这些样式变量
* 如果你是插件开发者建议你使用scss预处理并在插件代码中直接使用这些变量无需 import 这个文件方便用户通过搭积木的方式开发整体风格一致的App
*
*/
/**
* 如果你是App开发者插件使用者你可以通过修改这些变量来定制自己的插件主题实现自定义主题功能
*
* 如果你的项目同样使用了scss预处理你也可以直接在你的 scss 代码中使用如下变量同时无需 import 这个文件
*/
/* 颜色变量 */
/* 行为相关颜色 */
/* 文字基本颜色 */
/* 背景颜色 */
/* 边框颜色 */
/* 尺寸变量 */
/* 文字尺寸 */
/* 图片尺寸 */
/* Border Radius */
/* 水平间距 */
/* 垂直间距 */
/* 透明度 */
/* 文章场景相关 */
/* ==================
自定义变量
==================== */
/*盒子模型*/
.mt2 {
margin-top: 2rpx;
}
.mr2 {
margin-right: 2rpx;
}
.mb2 {
margin-bottom: 2rpx;
}
.ml2 {
margin-left: 2rpx;
}
.mx2 {
margin-left: 2rpx;
margin-right: 2rpx;
}
.my2 {
margin-top: 2rpx;
margin-bottom: 2rpx;
}
.ma2 {
margin: 2rpx;
}
.mt4 {
margin-top: 4rpx;
}
.mr4 {
margin-right: 4rpx;
}
.mb4 {
margin-bottom: 4rpx;
}
.ml4 {
margin-left: 4rpx;
}
.mx4 {
margin-left: 4rpx;
margin-right: 4rpx;
}
.my4 {
margin-top: 4rpx;
margin-bottom: 4rpx;
}
.ma4 {
margin: 4rpx;
}
.mt8 {
margin-top: 8rpx;
}
.mr8 {
margin-right: 8rpx;
}
.mb8 {
margin-bottom: 8rpx;
}
.ml8 {
margin-left: 8rpx;
}
.mx8 {
margin-left: 8rpx;
margin-right: 8rpx;
}
.my8 {
margin-top: 8rpx;
margin-bottom: 8rpx;
}
.ma8 {
margin: 8rpx;
}
.mt10 {
margin-top: 10rpx;
}
.mr10 {
margin-right: 10rpx;
}
.mb10 {
margin-bottom: 10rpx;
}
.ml10 {
margin-left: 10rpx;
}
.mx10 {
margin-left: 10rpx;
margin-right: 10rpx;
}
.my10 {
margin-top: 10rpx;
margin-bottom: 10rpx;
}
.ma10 {
margin: 10rpx;
}
.mt15 {
margin-top: 15rpx;
}
.mr15 {
margin-right: 15rpx;
}
.mb15 {
margin-bottom: 15rpx;
}
.ml15 {
margin-left: 15rpx;
}
.mx15 {
margin-left: 15rpx;
margin-right: 15rpx;
}
.my15 {
margin-top: 15rpx;
margin-bottom: 15rpx;
}
.ma15 {
margin: 15rpx;
}
.mt20 {
margin-top: 20rpx;
}
.mr20 {
margin-right: 20rpx;
}
.mb20 {
margin-bottom: 20rpx;
}
.ml20 {
margin-left: 20rpx;
}
.mx20 {
margin-left: 20rpx;
margin-right: 20rpx;
}
.my20 {
margin-top: 20rpx;
margin-bottom: 20rpx;
}
.ma20 {
margin: 20rpx;
}
.mt24 {
margin-top: 24rpx;
}
.mr24 {
margin-right: 24rpx;
}
.mb24 {
margin-bottom: 24rpx;
}
.ml24 {
margin-left: 24rpx;
}
.mx24 {
margin-left: 24rpx;
margin-right: 24rpx;
}
.my24 {
margin-top: 24rpx;
margin-bottom: 24rpx;
}
.ma24 {
margin: 24rpx;
}
.mt30 {
margin-top: 30rpx;
}
.mr30 {
margin-right: 30rpx;
}
.mb30 {
margin-bottom: 30rpx;
}
.ml30 {
margin-left: 30rpx;
}
.mx30 {
margin-left: 30rpx;
margin-right: 30rpx;
}
.my30 {
margin-top: 30rpx;
margin-bottom: 30rpx;
}
.ma30 {
margin: 30rpx;
}
.pt2 {
padding-top: 2rpx;
}
.pr2 {
padding-right: 2rpx;
}
.pb2 {
padding-bottom: 2rpx;
}
.pl2 {
padding-left: 2rpx;
}
.px2 {
padding-left: 2rpx;
padding-right: 2rpx;
}
.py2 {
padding-top: 2rpx;
padding-bottom: 2rpx;
}
.pa2 {
padding: 2rpx;
}
.pt4 {
padding-top: 4rpx;
}
.pr4 {
padding-right: 4rpx;
}
.pb4 {
padding-bottom: 4rpx;
}
.pl4 {
padding-left: 4rpx;
}
.px4 {
padding-left: 4rpx;
padding-right: 4rpx;
}
.py4 {
padding-top: 4rpx;
padding-bottom: 4rpx;
}
.pa4 {
padding: 4rpx;
}
.pt8 {
padding-top: 8rpx;
}
.pr8 {
padding-right: 8rpx;
}
.pb8 {
padding-bottom: 8rpx;
}
.pl8 {
padding-left: 8rpx;
}
.px8 {
padding-left: 8rpx;
padding-right: 8rpx;
}
.py8 {
padding-top: 8rpx;
padding-bottom: 8rpx;
}
.pa8 {
padding: 8rpx;
}
.pt10 {
padding-top: 10rpx;
}
.pr10 {
padding-right: 10rpx;
}
.pb10 {
padding-bottom: 10rpx;
}
.pl10 {
padding-left: 10rpx;
}
.px10 {
padding-left: 10rpx;
padding-right: 10rpx;
}
.py10 {
padding-top: 10rpx;
padding-bottom: 10rpx;
}
.pa10 {
padding: 10rpx;
}
.pt15 {
padding-top: 15rpx;
}
.pr15 {
padding-right: 15rpx;
}
.pb15 {
padding-bottom: 15rpx;
}
.pl15 {
padding-left: 15rpx;
}
.px15 {
padding-left: 15rpx;
padding-right: 15rpx;
}
.py15 {
padding-top: 15rpx;
padding-bottom: 15rpx;
}
.pa15 {
padding: 15rpx;
}
.pt20 {
padding-top: 20rpx;
}
.pr20 {
padding-right: 20rpx;
}
.pb20 {
padding-bottom: 20rpx;
}
.pl20 {
padding-left: 20rpx;
}
.px20 {
padding-left: 20rpx;
padding-right: 20rpx;
}
.py20 {
padding-top: 20rpx;
padding-bottom: 20rpx;
}
.pa20 {
padding: 20rpx;
}
.pt24 {
padding-top: 24rpx;
}
.pr24 {
padding-right: 24rpx;
}
.pb24 {
padding-bottom: 24rpx;
}
.pl24 {
padding-left: 24rpx;
}
.px24 {
padding-left: 24rpx;
padding-right: 24rpx;
}
.py24 {
padding-top: 24rpx;
padding-bottom: 24rpx;
}
.pa24 {
padding: 24rpx;
}
.pt30 {
padding-top: 30rpx;
}
.pr30 {
padding-right: 30rpx;
}
.pb30 {
padding-bottom: 30rpx;
}
.pl30 {
padding-left: 30rpx;
}
.px30 {
padding-left: 30rpx;
padding-right: 30rpx;
}
.py30 {
padding-top: 30rpx;
padding-bottom: 30rpx;
}
.pa30 {
padding: 30rpx;
}
/*# sourceMappingURL=uni.css.map */

9
uni.css.map

File diff suppressed because one or more lines are too long

1
uni.min.css vendored

@ -1 +0,0 @@
.mt2{margin-top:2rpx}.mr2{margin-right:2rpx}.mb2{margin-bottom:2rpx}.ml2{margin-left:2rpx}.mx2{margin-left:2rpx;margin-right:2rpx}.my2{margin-top:2rpx;margin-bottom:2rpx}.ma2{margin:2rpx}.mt4{margin-top:4rpx}.mr4{margin-right:4rpx}.mb4{margin-bottom:4rpx}.ml4{margin-left:4rpx}.mx4{margin-left:4rpx;margin-right:4rpx}.my4{margin-top:4rpx;margin-bottom:4rpx}.ma4{margin:4rpx}.mt8{margin-top:8rpx}.mr8{margin-right:8rpx}.mb8{margin-bottom:8rpx}.ml8{margin-left:8rpx}.mx8{margin-left:8rpx;margin-right:8rpx}.my8{margin-top:8rpx;margin-bottom:8rpx}.ma8{margin:8rpx}.mt10{margin-top:10rpx}.mr10{margin-right:10rpx}.mb10{margin-bottom:10rpx}.ml10{margin-left:10rpx}.mx10{margin-left:10rpx;margin-right:10rpx}.my10{margin-top:10rpx;margin-bottom:10rpx}.ma10{margin:10rpx}.mt15{margin-top:15rpx}.mr15{margin-right:15rpx}.mb15{margin-bottom:15rpx}.ml15{margin-left:15rpx}.mx15{margin-left:15rpx;margin-right:15rpx}.my15{margin-top:15rpx;margin-bottom:15rpx}.ma15{margin:15rpx}.mt20{margin-top:20rpx}.mr20{margin-right:20rpx}.mb20{margin-bottom:20rpx}.ml20{margin-left:20rpx}.mx20{margin-left:20rpx;margin-right:20rpx}.my20{margin-top:20rpx;margin-bottom:20rpx}.ma20{margin:20rpx}.mt24{margin-top:24rpx}.mr24{margin-right:24rpx}.mb24{margin-bottom:24rpx}.ml24{margin-left:24rpx}.mx24{margin-left:24rpx;margin-right:24rpx}.my24{margin-top:24rpx;margin-bottom:24rpx}.ma24{margin:24rpx}.mt30{margin-top:30rpx}.mr30{margin-right:30rpx}.mb30{margin-bottom:30rpx}.ml30{margin-left:30rpx}.mx30{margin-left:30rpx;margin-right:30rpx}.my30{margin-top:30rpx;margin-bottom:30rpx}.ma30{margin:30rpx}.pt2{padding-top:2rpx}.pr2{padding-right:2rpx}.pb2{padding-bottom:2rpx}.pl2{padding-left:2rpx}.px2{padding-left:2rpx;padding-right:2rpx}.py2{padding-top:2rpx;padding-bottom:2rpx}.pa2{padding:2rpx}.pt4{padding-top:4rpx}.pr4{padding-right:4rpx}.pb4{padding-bottom:4rpx}.pl4{padding-left:4rpx}.px4{padding-left:4rpx;padding-right:4rpx}.py4{padding-top:4rpx;padding-bottom:4rpx}.pa4{padding:4rpx}.pt8{padding-top:8rpx}.pr8{padding-right:8rpx}.pb8{padding-bottom:8rpx}.pl8{padding-left:8rpx}.px8{padding-left:8rpx;padding-right:8rpx}.py8{padding-top:8rpx;padding-bottom:8rpx}.pa8{padding:8rpx}.pt10{padding-top:10rpx}.pr10{padding-right:10rpx}.pb10{padding-bottom:10rpx}.pl10{padding-left:10rpx}.px10{padding-left:10rpx;padding-right:10rpx}.py10{padding-top:10rpx;padding-bottom:10rpx}.pa10{padding:10rpx}.pt15{padding-top:15rpx}.pr15{padding-right:15rpx}.pb15{padding-bottom:15rpx}.pl15{padding-left:15rpx}.px15{padding-left:15rpx;padding-right:15rpx}.py15{padding-top:15rpx;padding-bottom:15rpx}.pa15{padding:15rpx}.pt20{padding-top:20rpx}.pr20{padding-right:20rpx}.pb20{padding-bottom:20rpx}.pl20{padding-left:20rpx}.px20{padding-left:20rpx;padding-right:20rpx}.py20{padding-top:20rpx;padding-bottom:20rpx}.pa20{padding:20rpx}.pt24{padding-top:24rpx}.pr24{padding-right:24rpx}.pb24{padding-bottom:24rpx}.pl24{padding-left:24rpx}.px24{padding-left:24rpx;padding-right:24rpx}.py24{padding-top:24rpx;padding-bottom:24rpx}.pa24{padding:24rpx}.pt30{padding-top:30rpx}.pr30{padding-right:30rpx}.pb30{padding-bottom:30rpx}.pl30{padding-left:30rpx}.px30{padding-left:30rpx;padding-right:30rpx}.py30{padding-top:30rpx;padding-bottom:30rpx}.pa30{padding:30rpx}

56
uni.scss

@ -73,58 +73,4 @@ $uni-font-size-title:40upx;
$uni-color-subtitle: #555555; // 二级标题颜色
$uni-font-size-subtitle:36upx;
$uni-color-paragraph: #3F536E; // 文章段落颜色
$uni-font-size-paragraph:30upx;
/* ==================
自定义变量
==================== */
$spaceTypes: (
m: margin,
p: padding
);
$spaceDirections: (
t: top,
r: right,
b: bottom,
l: left
);
$spaceSizes: (
2: 2rpx,
4: 4rpx,
8: 8rpx,
10: 10rpx,
15: 15rpx,
20: 20rpx,
24: 24rpx,
30: 30rpx
);
/*盒子模型*/
@each $typeKey, $type in $spaceTypes {
@each $sizeKey, $size in $spaceSizes {
// margin-top:10rpx
@each $directionKey, $direction in $spaceDirections {
.#{$typeKey}#{$directionKey}#{$sizeKey} {
#{$type}-#{$direction}: $size;
}
}
// margin: 10rpx 0;
.#{$typeKey}x#{$sizeKey} {
#{$type}-left: $size;
#{$type}-right: $size;
}
.#{$typeKey}y#{$sizeKey} {
#{$type}-top: $size;
#{$type}-bottom: $size;
}
// margin: 10rpx ;
.#{$typeKey}a#{$sizeKey} {
#{$type}: $size;
}
}
}
$uni-font-size-paragraph:30upx;

7
utils/index.js

@ -62,10 +62,7 @@ export function isType(arg, type) {
}
export function isWeixin() {
if(navigator&&navigator.userAgent.toLowerCase().indexOf("micromessenger") !== -1){
return true
}
return false
return navigator.userAgent.toLowerCase().indexOf("micromessenger") !== -1;
}
export function parseQuery() {
@ -185,11 +182,13 @@ export const login = () => {
// } else {
// // wechat().then(() => oAuth().then((code) => {
// // // const { code } = parseQuery()
// // debugger
// // auth(code)
// // .then(() => {
// // // location.replace(
// // // decodeURIComponent(decodeURIComponent(this.$route.params.url))
// // // );
// // debugger
// // location.href = decodeURIComponent(
// // decodeURIComponent(this.$route.params.url)
// // );

8
utils/request.js

@ -1,13 +1,7 @@
// #ifdef H5
// h5端
// #ifndef MP-WEIXIN
import Fly from "flyio/dist/npm/fly";
// #endif
// #ifdef APP-PLUS
// app端
import Fly from "flyio/dist/npm/wx";
// #endif
// #ifdef MP-WEIXIN
import Fly from "flyio/dist/npm/wx";
// #endif

Loading…
Cancel
Save