创建
This commit is contained in:
59
template/headSwiper/headSwiper.js
Normal file
59
template/headSwiper/headSwiper.js
Normal file
@@ -0,0 +1,59 @@
|
||||
var t, e = require("../../@babel/runtime/helpers/defineProperty");
|
||||
|
||||
Component({
|
||||
properties: {
|
||||
banner: Array
|
||||
},
|
||||
lifetimes: {
|
||||
attached: function() {
|
||||
this.attachedIn();
|
||||
}
|
||||
},
|
||||
attached: function() {
|
||||
this.attachedIn();
|
||||
},
|
||||
data: (t = {
|
||||
autoplay: !0
|
||||
}, e(t, "autoplay", !0), e(t, "interval", 3e3), e(t, "duration", 500), e(t, "circular", !0),
|
||||
e(t, "swiperHeight", 100), e(t, "swiperWidth", 300), e(t, "imgUrl", []), t),
|
||||
observers: {
|
||||
banner: function(t) {
|
||||
0 == t.length && this.setData({
|
||||
swiperHeight: 0
|
||||
});
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
attachedIn: function() {
|
||||
var t = this, e = this.createSelectorQuery();
|
||||
e.select(".swiper").boundingClientRect(), e.exec(function(e) {
|
||||
t.setData({
|
||||
swiperWidth: e[0].width
|
||||
});
|
||||
});
|
||||
},
|
||||
previewImg: function(t) {
|
||||
var e = t.currentTarget.dataset.url;
|
||||
if (e) return wx.navigateTo({
|
||||
url: "/" + e
|
||||
}), !1;
|
||||
if (0 == this.data.imgUrl.length) {
|
||||
var i = [];
|
||||
this.properties.banner.map(function(t) {
|
||||
i.push(t.image);
|
||||
}), this.setData({
|
||||
imgUrl: i
|
||||
});
|
||||
}
|
||||
wx.previewImage({
|
||||
current: this.data.imgUrl[this.data.current],
|
||||
urls: this.data.imgUrl
|
||||
});
|
||||
},
|
||||
load: function(t) {
|
||||
this.setData({
|
||||
swiperHeight: this.data.swiperWidth * t.detail.height / t.detail.width
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
4
template/headSwiper/headSwiper.json
Normal file
4
template/headSwiper/headSwiper.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
||||
7
template/headSwiper/headSwiper.wxml
Normal file
7
template/headSwiper/headSwiper.wxml
Normal file
@@ -0,0 +1,7 @@
|
||||
<view>
|
||||
<swiper autoplay="{{autoplay}}" circular="{{circular}}" class="swiper" duration="{{duration}}" indicatorActiveColor="#4cadf1" indicatorColor="#eee" indicatorDots="true" interval="{{interval}}" style="height:{{swiperHeight}}px">
|
||||
<swiper-item wx:for="{{banner}}" wx:key="{{ index }}">
|
||||
<image bindload="load" bindtap="previewImg" class="slide-image" data-index="{{index}}" data-url="{{item.url}}" mode="widthFix" src="{{item.image}}"></image>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
</view>
|
||||
11
template/headSwiper/headSwiper.wxss
Normal file
11
template/headSwiper/headSwiper.wxss
Normal file
@@ -0,0 +1,11 @@
|
||||
.slide-image {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.swiper {
|
||||
margin: 34rpx 27rpx 0;
|
||||
}
|
||||
|
||||
image {
|
||||
height: 20px;
|
||||
}
|
||||
7
template/myMoney/myMoney.js
Normal file
7
template/myMoney/myMoney.js
Normal file
@@ -0,0 +1,7 @@
|
||||
Component({
|
||||
properties: {
|
||||
user: Object
|
||||
},
|
||||
data: {},
|
||||
methods: {}
|
||||
});
|
||||
4
template/myMoney/myMoney.json
Normal file
4
template/myMoney/myMoney.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
||||
8
template/myMoney/myMoney.wxml
Normal file
8
template/myMoney/myMoney.wxml
Normal file
@@ -0,0 +1,8 @@
|
||||
<view class="money-box">
|
||||
<block wx:if="{{user.uid>0}}">
|
||||
<view class="l">余额:{{user.money}}</view>
|
||||
<view class="r">洗车金:{{user.principal}},赠送:{{user.givenamount}}</view>
|
||||
</block>
|
||||
<navigator class="l" hoverClass="hover" url="/pages/login/login" wx:if="{{user.uid==0}}">余额: <view class="red">点击同步</view>
|
||||
</navigator>
|
||||
</view>
|
||||
30
template/myMoney/myMoney.wxss
Normal file
30
template/myMoney/myMoney.wxss
Normal file
@@ -0,0 +1,30 @@
|
||||
.money-box {
|
||||
background: #eee;
|
||||
color: #333;
|
||||
justify-content: space-between;
|
||||
margin: 0;
|
||||
padding: 0 18rpx;
|
||||
}
|
||||
|
||||
.money-box,.money-box .l {
|
||||
align-items: center;
|
||||
display: flex;
|
||||
height: 64rpx;
|
||||
}
|
||||
|
||||
.money-box .l {
|
||||
flex: 1;
|
||||
font-size: 29rpx;
|
||||
}
|
||||
|
||||
.money-box .r {
|
||||
font-size: 22rpx;
|
||||
}
|
||||
|
||||
.hover {
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.red {
|
||||
color: #f50;
|
||||
}
|
||||
21
template/pageLoding/pageLoding.js
Normal file
21
template/pageLoding/pageLoding.js
Normal file
@@ -0,0 +1,21 @@
|
||||
getApp(), require("../../utils/login.js");
|
||||
|
||||
Component({
|
||||
properties: {},
|
||||
data: {
|
||||
status: 0,
|
||||
timer: null,
|
||||
isUserAuthorization: 0
|
||||
},
|
||||
lifetimes: {
|
||||
attached: function() {
|
||||
this.attachedIn();
|
||||
}
|
||||
},
|
||||
attached: function() {
|
||||
this.attachedIn();
|
||||
},
|
||||
methods: {
|
||||
attachedIn: function() {}
|
||||
}
|
||||
});
|
||||
4
template/pageLoding/pageLoding.json
Normal file
4
template/pageLoding/pageLoding.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
||||
10
template/pageLoding/pageLoding.wxml
Normal file
10
template/pageLoding/pageLoding.wxml
Normal file
@@ -0,0 +1,10 @@
|
||||
<view>
|
||||
<view class="loading">
|
||||
<view class="circle">
|
||||
<view class="load-container load6">
|
||||
<view class="loader"></view>
|
||||
</view>
|
||||
</view>
|
||||
<image class="logo" src="/img/logo2.jpeg"></image>
|
||||
</view>
|
||||
</view>
|
||||
110
template/pageLoding/pageLoding.wxss
Normal file
110
template/pageLoding/pageLoding.wxss
Normal file
@@ -0,0 +1,110 @@
|
||||
.loading {
|
||||
align-items: center;
|
||||
background: #fff;
|
||||
color: #333;
|
||||
display: flex;
|
||||
font-size: 26rpx;
|
||||
height: 100vh;
|
||||
justify-content: center;
|
||||
position: fixed;
|
||||
width: 100vw;
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
.logo {
|
||||
display: inline-flex;
|
||||
height: 120rpx;
|
||||
width: 120rpx;
|
||||
}
|
||||
|
||||
.circle {
|
||||
border-radius: 50%;
|
||||
box-sizing: border-box;
|
||||
display: block;
|
||||
left: calc(50vw - 120px);
|
||||
position: fixed;
|
||||
top: calc(50vh - 120px);
|
||||
}
|
||||
|
||||
.circle,.load-container {
|
||||
height: 240px;
|
||||
width: 240px;
|
||||
}
|
||||
|
||||
.load-container {
|
||||
border: 1px solid hsla(0,0%,100%,.2);
|
||||
box-sizing: border-box;
|
||||
float: left;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.loader {
|
||||
transform: translateZ(0);
|
||||
}
|
||||
|
||||
.load7 .loader:before,.loader:after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
top: 0;
|
||||
}
|
||||
|
||||
.load6 .loader {
|
||||
animation: load6 1.7s ease infinite;
|
||||
border-radius: 50%;
|
||||
font-size: 90px;
|
||||
height: 1em;
|
||||
margin: .8em auto;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
text-indent: -9999em;
|
||||
width: 1em;
|
||||
}
|
||||
|
||||
@-webkit-keyframes load6 {
|
||||
0% {
|
||||
box-shadow: -.11em -.83em 0 -.4em #e8e8e8,-.11em -.83em 0 -.42em #e8e8e8,-.11em -.83em 0 -.44em #e8e8e8,-.11em -.83em 0 -.46em #e8e8e8,-.11em -.83em 0 -.477em #e8e8e8;
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
|
||||
5%,95% {
|
||||
box-shadow: -.11em -.83em 0 -.4em #e8e8e8,-.11em -.83em 0 -.42em #e8e8e8,-.11em -.83em 0 -.44em #e8e8e8,-.11em -.83em 0 -.46em #e8e8e8,-.11em -.83em 0 -.477em #e8e8e8;
|
||||
}
|
||||
|
||||
30% {
|
||||
box-shadow: -.11em -.83em 0 -.4em #e8e8e8,-.51em -.66em 0 -.42em #e8e8e8,-.75em -.36em 0 -.44em #e8e8e8,-.83em -.03em 0 -.46em #e8e8e8,-.81em .21em 0 -.477em #e8e8e8;
|
||||
}
|
||||
|
||||
55% {
|
||||
box-shadow: -.11em -.83em 0 -.4em #e8e8e8,-.29em -.78em 0 -.42em #e8e8e8,-.43em -.72em 0 -.44em #e8e8e8,-.52em -.65em 0 -.46em #e8e8e8,-.57em -.61em 0 -.477em #e8e8e8;
|
||||
}
|
||||
|
||||
100% {
|
||||
box-shadow: -.11em -.83em 0 -.4em #e8e8e8,-.11em -.83em 0 -.42em #e8e8e8,-.11em -.83em 0 -.44em #e8e8e8,-.11em -.83em 0 -.46em #e8e8e8,-.11em -.83em 0 -.477em #e8e8e8;
|
||||
transform: rotate(1turn);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes load6 {
|
||||
0% {
|
||||
box-shadow: -.11em -.83em 0 -.4em #e8e8e8,-.11em -.83em 0 -.42em #e8e8e8,-.11em -.83em 0 -.44em #e8e8e8,-.11em -.83em 0 -.46em #e8e8e8,-.11em -.83em 0 -.477em #e8e8e8;
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
|
||||
5%,95% {
|
||||
box-shadow: -.11em -.83em 0 -.4em #e8e8e8,-.11em -.83em 0 -.42em #e8e8e8,-.11em -.83em 0 -.44em #e8e8e8,-.11em -.83em 0 -.46em #e8e8e8,-.11em -.83em 0 -.477em #e8e8e8;
|
||||
}
|
||||
|
||||
30% {
|
||||
box-shadow: -.11em -.83em 0 -.4em #e8e8e8,-.51em -.66em 0 -.42em #e8e8e8,-.75em -.36em 0 -.44em #e8e8e8,-.83em -.03em 0 -.46em #e8e8e8,-.81em .21em 0 -.477em #e8e8e8;
|
||||
}
|
||||
|
||||
55% {
|
||||
box-shadow: -.11em -.83em 0 -.4em #e8e8e8,-.29em -.78em 0 -.42em #e8e8e8,-.43em -.72em 0 -.44em #e8e8e8,-.52em -.65em 0 -.46em #e8e8e8,-.57em -.61em 0 -.477em #e8e8e8;
|
||||
}
|
||||
|
||||
100% {
|
||||
box-shadow: -.11em -.83em 0 -.4em #e8e8e8,-.11em -.83em 0 -.42em #e8e8e8,-.11em -.83em 0 -.44em #e8e8e8,-.11em -.83em 0 -.46em #e8e8e8,-.11em -.83em 0 -.477em #e8e8e8;
|
||||
transform: rotate(1turn);
|
||||
}
|
||||
}
|
||||
36
template/serviceTel/serviceTel.js
Normal file
36
template/serviceTel/serviceTel.js
Normal file
@@ -0,0 +1,36 @@
|
||||
var t = getApp();
|
||||
|
||||
Component({
|
||||
properties: {},
|
||||
data: {
|
||||
tel: ""
|
||||
},
|
||||
lifetimes: {
|
||||
attached: function() {
|
||||
this.attachedIn();
|
||||
}
|
||||
},
|
||||
attached: function() {
|
||||
this.attachedIn();
|
||||
},
|
||||
methods: {
|
||||
attachedIn: function() {
|
||||
this.getTel();
|
||||
},
|
||||
getTel: function() {
|
||||
var e = this;
|
||||
if (!t.globalData.canGetData) return setTimeout(function() {
|
||||
e.getTel();
|
||||
}, 300), !1;
|
||||
this.setData({
|
||||
tel: t.globalData.servicetel
|
||||
});
|
||||
},
|
||||
callUs: function() {
|
||||
if (!t.globalData.servicetel) return !1;
|
||||
wx.makePhoneCall({
|
||||
phoneNumber: "" + t.globalData.servicetel
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
4
template/serviceTel/serviceTel.json
Normal file
4
template/serviceTel/serviceTel.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
||||
4
template/serviceTel/serviceTel.wxml
Normal file
4
template/serviceTel/serviceTel.wxml
Normal file
@@ -0,0 +1,4 @@
|
||||
<view bindtap="callUs" class="service-tel">
|
||||
<view>=客服电话=</view>
|
||||
<view>{{tel}}</view>
|
||||
</view>
|
||||
9
template/serviceTel/serviceTel.wxss
Normal file
9
template/serviceTel/serviceTel.wxss
Normal file
@@ -0,0 +1,9 @@
|
||||
.service-tel {
|
||||
align-items: center;
|
||||
color: #999;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
font-size: 26rpx;
|
||||
justify-content: center;
|
||||
line-height: 40rpx;
|
||||
}
|
||||
Reference in New Issue
Block a user