first commit
This commit is contained in:
1
衣莎项目/源码/YiShaXiYi/component/.pydio
Normal file
1
衣莎项目/源码/YiShaXiYi/component/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
f4ba4205-04e9-4df7-840c-37467116a2f7
|
||||
1
衣莎项目/源码/YiShaXiYi/component/TabBar/.pydio
Normal file
1
衣莎项目/源码/YiShaXiYi/component/TabBar/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
59c5fd67-4518-4cd7-96d2-43b7f7fdfa59
|
||||
23
衣莎项目/源码/YiShaXiYi/component/TabBar/TabBar.js
Normal file
23
衣莎项目/源码/YiShaXiYi/component/TabBar/TabBar.js
Normal file
@@ -0,0 +1,23 @@
|
||||
// component/TabBar/TabBar.js
|
||||
Component({
|
||||
/**
|
||||
* 组件的属性列表
|
||||
*/
|
||||
properties: {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 组件的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 组件的方法列表
|
||||
*/
|
||||
methods: {
|
||||
|
||||
}
|
||||
})
|
||||
4
衣莎项目/源码/YiShaXiYi/component/TabBar/TabBar.json
Normal file
4
衣莎项目/源码/YiShaXiYi/component/TabBar/TabBar.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
||||
32
衣莎项目/源码/YiShaXiYi/component/TabBar/TabBar.wxml
Normal file
32
衣莎项目/源码/YiShaXiYi/component/TabBar/TabBar.wxml
Normal file
@@ -0,0 +1,32 @@
|
||||
<!-- component/TabBar/TabBar.wxml -->
|
||||
<!-- tabbar -->
|
||||
<view class="TabBar">
|
||||
<view class="cu-bar tabbar bg-white">
|
||||
<view data-index="1" bind:tap="tabSwitch" class="action {{index == 1?'text-green':'text-gray'}}">
|
||||
<view class="cuIcon-homefill"></view>
|
||||
首页
|
||||
</view>
|
||||
<view data-index="2" bind:tap="tabSwitch" class="action {{index == 2?'text-green':'text-gray'}}">
|
||||
<view class="cuIcon-similar"></view>
|
||||
价目表
|
||||
</view>
|
||||
<view data-index="3" bind:tap="tabSwitch" class="action {{index == 3?'text-green':'text-gray'}} add-action">
|
||||
<view class="live">
|
||||
<view class="my-icno">
|
||||
<image src="/static/img/icon/asdferfhrthjtr.png" />
|
||||
</view>
|
||||
<span></span>
|
||||
<span></span>
|
||||
</view>
|
||||
一键下单
|
||||
</view>
|
||||
<view data-index="4" bind:tap="tabSwitch" class="action {{index == 4?'text-green':'text-gray'}}">
|
||||
<view class="cuIcon-cart"></view>
|
||||
商城
|
||||
</view>
|
||||
<view data-index="5" bind:tap="tabSwitch" class="action {{index == 5?'text-green':'text-gray'}}">
|
||||
<view class="cuIcon-my"></view>
|
||||
我的
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
2
衣莎项目/源码/YiShaXiYi/component/TabBar/TabBar.wxss
Normal file
2
衣莎项目/源码/YiShaXiYi/component/TabBar/TabBar.wxss
Normal file
@@ -0,0 +1,2 @@
|
||||
@import "../../extend/ColorUI/css/main.wxss";
|
||||
@import "../../extend/ColorUI/css/icon.wxss";
|
||||
1
衣莎项目/源码/YiShaXiYi/component/loading-prog/.pydio
Normal file
1
衣莎项目/源码/YiShaXiYi/component/loading-prog/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
8560d1d5-f21b-4e20-bcee-6284751a16e3
|
||||
52
衣莎项目/源码/YiShaXiYi/component/loading-prog/loading-prog.js
Normal file
52
衣莎项目/源码/YiShaXiYi/component/loading-prog/loading-prog.js
Normal file
@@ -0,0 +1,52 @@
|
||||
// component/loading-prog/loading-prog.js
|
||||
const app = getApp();
|
||||
Component({
|
||||
/**
|
||||
* 组件的属性列表
|
||||
*/
|
||||
properties: {
|
||||
isLoading: {
|
||||
type: Boolean,
|
||||
value: true
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 组件的初始数据
|
||||
*/
|
||||
data: {
|
||||
loadProgress: 0,
|
||||
system: app.globalData.system, //设备相关信息
|
||||
},
|
||||
/**
|
||||
* 在组件实例刚刚被创建时执行
|
||||
*/
|
||||
created() {
|
||||
this.loadProgress()
|
||||
},
|
||||
/**
|
||||
* 组件的方法列表
|
||||
*/
|
||||
methods: {
|
||||
// 加载动画
|
||||
loadProgress() {
|
||||
this.setData({
|
||||
loadProgress: this.data.loadProgress + 3
|
||||
})
|
||||
if (this.data.loadProgress < 100) {
|
||||
setTimeout(() => {
|
||||
this.loadProgress();
|
||||
}, 70)
|
||||
} else {
|
||||
this.setData({
|
||||
loadProgress: 0
|
||||
})
|
||||
}
|
||||
if (!this.properties.isLoading) {
|
||||
this.setData({
|
||||
loadProgress: 100
|
||||
})
|
||||
}
|
||||
},
|
||||
}
|
||||
})
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
<!-- component/loading-prog/loading-prog.wxml -->
|
||||
<!-- 加载动画 -->
|
||||
<view class='load-progress load-all {{isLoading?"show":"hide"}}' style="top:{{system.statusHeight+system.titleHeight}}px;">
|
||||
<view class='load-progress-bar bg-green' style="transform: translate3d(-{{100-loadProgress}}%, 0px, 0px);"></view>
|
||||
<view class="load-bac"></view>
|
||||
</view>
|
||||
@@ -0,0 +1,3 @@
|
||||
/* component/loading-prog/loading-prog.wxss */
|
||||
@import "../../extend/ColorUI/css/main.wxss";
|
||||
@import "../../css/_main.wxss";
|
||||
1
衣莎项目/源码/YiShaXiYi/component/loading/.pydio
Normal file
1
衣莎项目/源码/YiShaXiYi/component/loading/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
8dff8546-bd7a-4bb4-a798-1dee8cf77bbb
|
||||
23
衣莎项目/源码/YiShaXiYi/component/loading/loading.js
Normal file
23
衣莎项目/源码/YiShaXiYi/component/loading/loading.js
Normal file
@@ -0,0 +1,23 @@
|
||||
// component/loading/loading.js
|
||||
Component({
|
||||
/**
|
||||
* 组件的属性列表
|
||||
*/
|
||||
properties: {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 组件的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 组件的方法列表
|
||||
*/
|
||||
methods: {
|
||||
|
||||
}
|
||||
})
|
||||
4
衣莎项目/源码/YiShaXiYi/component/loading/loading.json
Normal file
4
衣莎项目/源码/YiShaXiYi/component/loading/loading.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
||||
2
衣莎项目/源码/YiShaXiYi/component/loading/loading.wxml
Normal file
2
衣莎项目/源码/YiShaXiYi/component/loading/loading.wxml
Normal file
@@ -0,0 +1,2 @@
|
||||
<!--component/loading/loading.wxml-->
|
||||
<text>component/loading/loading.wxml</text>
|
||||
1
衣莎项目/源码/YiShaXiYi/component/loading/loading.wxss
Normal file
1
衣莎项目/源码/YiShaXiYi/component/loading/loading.wxss
Normal file
@@ -0,0 +1 @@
|
||||
/* component/loading/loading.wxss */
|
||||
1
衣莎项目/源码/YiShaXiYi/component/navbar/.pydio
Normal file
1
衣莎项目/源码/YiShaXiYi/component/navbar/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
7d98dc12-1217-4f78-9dc2-dbec623b916f
|
||||
112
衣莎项目/源码/YiShaXiYi/component/navbar/navbar.js
Normal file
112
衣莎项目/源码/YiShaXiYi/component/navbar/navbar.js
Normal file
@@ -0,0 +1,112 @@
|
||||
const app = getApp();
|
||||
const model = app.loadModel("index")
|
||||
const regeneratorRuntime = app.loadAsync()
|
||||
Component({
|
||||
/**
|
||||
* 组件的属性列表
|
||||
*/
|
||||
properties: {
|
||||
isLogin: {
|
||||
type: Boolean
|
||||
},
|
||||
propData: {
|
||||
type: Number
|
||||
},
|
||||
cityInfo: {
|
||||
type: Object,
|
||||
value: {
|
||||
city: "未定位",
|
||||
city_code: ""
|
||||
}
|
||||
},
|
||||
system: {
|
||||
type: Object,
|
||||
value: {
|
||||
titleHeight: "",
|
||||
statusHeight: ""
|
||||
}
|
||||
},
|
||||
pageTitle: {
|
||||
type: String,
|
||||
value: "伊莎洗衣"
|
||||
},
|
||||
isBack: {
|
||||
type: Boolean,
|
||||
value: false
|
||||
},
|
||||
isLocation: {
|
||||
type: Boolean,
|
||||
value: false
|
||||
},
|
||||
isContact: {
|
||||
type: Boolean,
|
||||
value: false
|
||||
},
|
||||
titleColor: {
|
||||
type: Object,
|
||||
value: {
|
||||
bColor: "#ffffff",
|
||||
tColor: "#333333"
|
||||
}
|
||||
},
|
||||
backColor: {
|
||||
type: String,
|
||||
value: null
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 组件的初始数据
|
||||
*/
|
||||
data: {
|
||||
isCount: 0
|
||||
},
|
||||
/**
|
||||
* 组件的方法列表
|
||||
*/
|
||||
methods: {
|
||||
goBack: function (e) {
|
||||
var pages = getCurrentPages();
|
||||
var prevPage = pages[pages.length - 2]
|
||||
if (!!prevPage) {
|
||||
wx.navigateBack({
|
||||
delta: 1
|
||||
})
|
||||
} else {
|
||||
wx.reLaunch({
|
||||
url: '/pages/auth/auth'
|
||||
})
|
||||
}
|
||||
},
|
||||
changePhone: function () {
|
||||
var that = this;
|
||||
var isCount = that.data.isCount;
|
||||
that.setData({
|
||||
isCount: isCount == 0 ? 1 : 0
|
||||
})
|
||||
this.triggerEvent('changeInput', {
|
||||
isCount: isCount == 0 ? 1 : 0
|
||||
})
|
||||
},
|
||||
storeJump: async function (e) {
|
||||
let getSetting = await model.getauth.getSetting() //获取已经授权的信息
|
||||
let url = e.currentTarget.dataset.url
|
||||
if (!getSetting.authSetting['scope.userLocation']) {
|
||||
// 用户取消授权的处理
|
||||
wx.showModal({
|
||||
title: '你拒绝了地理位置授权',
|
||||
content: '请点击确定,到权限表设置',
|
||||
success(res) {
|
||||
if (res.confirm) {
|
||||
wx.openSetting()
|
||||
}
|
||||
}
|
||||
})
|
||||
return
|
||||
}
|
||||
wx.navigateTo({
|
||||
url: url
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
4
衣莎项目/源码/YiShaXiYi/component/navbar/navbar.json
Normal file
4
衣莎项目/源码/YiShaXiYi/component/navbar/navbar.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
||||
18
衣莎项目/源码/YiShaXiYi/component/navbar/navbar.wxml
Normal file
18
衣莎项目/源码/YiShaXiYi/component/navbar/navbar.wxml
Normal file
@@ -0,0 +1,18 @@
|
||||
<!-- component/navber/navber.wxml -->
|
||||
<!-- components/header/header.wxml -->
|
||||
<view style="padding-top:{{system.statusHeight+'px'}};background: {{titleColor.bColor}};color: {{titleColor.tColor}};" class='customTitleBox'>
|
||||
<view class='customBot' style="height:{{system.titleHeight+'px'}}">
|
||||
<view wx:if="{{isLocation}}" data-url='{{cityInfo.location}}' class="cityBox" bind:tap="storeJump">
|
||||
<image class='arrowBottom' src='/static/img/icon/dw.png'></image>
|
||||
{{cityInfo.city}}
|
||||
<!-- <image class='arrowBottom1' src='/static/img/icon/inverted-icon.png'></image> -->
|
||||
</view>
|
||||
<view data-propdata="{{propData}}" data-islogin="{{isLogin}}" style="width:{{system.titleHeight+'px'}}" wx:if="{{isBack}}" bindtap='goBack' class='backBtn'>
|
||||
<image wx:if="{{backColor == null}}" class='backIcon' src='/static/img/icon/asdwgyjtyj.png'></image>
|
||||
<image wx:else class='backIcon' src='/static/img/icon/left-fff.png'></image>
|
||||
</view>
|
||||
<view bindtap='changePhone' wx:if="{{isContact}}" class='addChange'>添加账户联系人</view>
|
||||
<view class='customTitle'>{{pageTitle}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view style="height:{{system.statusHeight+system.titleHeight+'px'}}"></view>
|
||||
77
衣莎项目/源码/YiShaXiYi/component/navbar/navbar.wxss
Normal file
77
衣莎项目/源码/YiShaXiYi/component/navbar/navbar.wxss
Normal file
@@ -0,0 +1,77 @@
|
||||
/* component/navber/navber.wxss */
|
||||
/* 顶部要固定定位 标题要居中 自定义按钮和标题要和右边微信原生的胶囊上下对齐 */
|
||||
.customTitleBox {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0;
|
||||
right: 0;
|
||||
z-index: 1001;
|
||||
}
|
||||
|
||||
.customTitle {
|
||||
font-size: 36rpx;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
transform: translateX(-50%);
|
||||
width: 750rpx;
|
||||
text-align: center;
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.customBot {
|
||||
display: flex;
|
||||
display: -webkit-flex;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.arrowBottom {
|
||||
width: 28rpx;
|
||||
/* width: 32rpx; */
|
||||
height: 32rpx;
|
||||
margin: 0 10rpx;
|
||||
}
|
||||
|
||||
.arrowBottom1 {
|
||||
width: 26rpx;
|
||||
height: 16rpx;
|
||||
margin: 0 10rpx;
|
||||
}
|
||||
|
||||
.cityBox {
|
||||
font-size: 32rpx;
|
||||
display: flex;
|
||||
display: -webkit-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
height: 100%;
|
||||
margin-left: 30rpx;
|
||||
position: relative;
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
.backBtn {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
display: -webkit-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin-left: -10rpx;
|
||||
position: relative;
|
||||
z-index: 1000;
|
||||
}
|
||||
|
||||
.backIcon {
|
||||
width: 44rpx;
|
||||
height: 44rpx;
|
||||
}
|
||||
|
||||
.addChange {
|
||||
font-size: 26rpx;
|
||||
height: 44rpx;
|
||||
}
|
||||
|
||||
.addChange {
|
||||
font-size: 26rpx;
|
||||
color: #fff;
|
||||
}
|
||||
1
衣莎项目/源码/YiShaXiYi/component/popup/.pydio
Normal file
1
衣莎项目/源码/YiShaXiYi/component/popup/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
ad4676e5-cb8d-402a-ab3d-f2369f5cc401
|
||||
36
衣莎项目/源码/YiShaXiYi/component/popup/popup.js
Normal file
36
衣莎项目/源码/YiShaXiYi/component/popup/popup.js
Normal file
@@ -0,0 +1,36 @@
|
||||
// component/popup/popup.js
|
||||
Component({
|
||||
/**
|
||||
* 组件的属性列表
|
||||
*/
|
||||
options:{
|
||||
multipleSlots: true
|
||||
},
|
||||
properties: {
|
||||
isPopup:{ //是否显示弹出层
|
||||
type: Boolean,
|
||||
value: true
|
||||
},
|
||||
backClick:{ // 点击背景是否关闭
|
||||
type: Boolean,
|
||||
value: true
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 组件的初始数据
|
||||
*/
|
||||
data: {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 组件的方法列表
|
||||
*/
|
||||
methods: {
|
||||
isBackClick () {
|
||||
if(this.properties.backClick) return;
|
||||
this.properties.isPopup = false
|
||||
}
|
||||
}
|
||||
})
|
||||
4
衣莎项目/源码/YiShaXiYi/component/popup/popup.json
Normal file
4
衣莎项目/源码/YiShaXiYi/component/popup/popup.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
||||
10
衣莎项目/源码/YiShaXiYi/component/popup/popup.wxml
Normal file
10
衣莎项目/源码/YiShaXiYi/component/popup/popup.wxml
Normal file
@@ -0,0 +1,10 @@
|
||||
<!--component/popup/popup.wxml-->
|
||||
<view
|
||||
catchtouchmove='{{ isPopup }}'
|
||||
wx:if="{{ isPopup }}"
|
||||
class="popup"
|
||||
bindtap="isBackClick"
|
||||
>
|
||||
<slot/>
|
||||
</view>
|
||||
|
||||
15
衣莎项目/源码/YiShaXiYi/component/popup/popup.wxss
Normal file
15
衣莎项目/源码/YiShaXiYi/component/popup/popup.wxss
Normal file
@@ -0,0 +1,15 @@
|
||||
/* component/popup/popup.wxss */
|
||||
.popup {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
z-index: 9999999;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
background-color: rgba(0, 0, 0, 0.75);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
1
衣莎项目/源码/YiShaXiYi/component/quantityClothes/.pydio
Normal file
1
衣莎项目/源码/YiShaXiYi/component/quantityClothes/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
3c856ec5-0e6d-4df8-baa9-716b12cae1ef
|
||||
@@ -0,0 +1,43 @@
|
||||
// component/quantityClothes/quantityClothes.js
|
||||
Component({
|
||||
/**
|
||||
* 组件的属性列表
|
||||
*/
|
||||
properties: {
|
||||
isTips: {
|
||||
type: Boolean,
|
||||
value: false
|
||||
}
|
||||
},
|
||||
|
||||
/**
|
||||
* 组件的初始数据
|
||||
*/
|
||||
data: {
|
||||
num: 0
|
||||
},
|
||||
|
||||
/**
|
||||
* 组件的方法列表
|
||||
*/
|
||||
methods: {
|
||||
reduce() {
|
||||
let num = --this.data.num
|
||||
this.setData({
|
||||
num: num <= 0 ? 0 : num
|
||||
})
|
||||
},
|
||||
add() {
|
||||
this.setData({
|
||||
num: ++this.data.num
|
||||
})
|
||||
},
|
||||
chCount() {
|
||||
this.triggerEvent('chCount', { num: this.data.num })
|
||||
},
|
||||
closeTips() {
|
||||
this.properties.isTips = false
|
||||
this.triggerEvent('chCount', { isTips: 'close' })
|
||||
}
|
||||
}
|
||||
})
|
||||
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
<!-- component/quantityClothes/quantityClothes.wxml -->
|
||||
<!-- 增减衣物 -->
|
||||
<view wx:if="{{isTips}}" class="backwash_tips flex-con3 tips">
|
||||
<view>
|
||||
<view class="tips_cen">
|
||||
<view class="tips_cen_tit">本次洗护数量</view>
|
||||
<view class="flex-con3 mt30">
|
||||
<view class="tips_cen_num flex-con3">
|
||||
<view class="num_img" catchtap="reduce">
|
||||
<image src="/static/img/icon/j1.png" />
|
||||
</view>
|
||||
<view class="num_text">{{num}}</view>
|
||||
<view class="num_img" catchtap="add">
|
||||
<image src="/static/img/icon/j2.png" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view data-type="remarks" class="tips_remarks">
|
||||
<view class="flex1 clamp1">{{changeCount.remarks}}</view>
|
||||
<view class="remarks_xiu">修改</view>
|
||||
</view> -->
|
||||
<view class="tips_cen_sub" catchtap="chCount">提交</view>
|
||||
<!-- <view class="mt20 tips_ts">提示:请在洗衣柜附近开柜!</view> -->
|
||||
</view>
|
||||
<view class="tips_img" data-type="num" catchtap="closeTips">
|
||||
<image src="/static/img/icon/colse_tips.png" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
115
衣莎项目/源码/YiShaXiYi/component/quantityClothes/quantityClothes.wxss
Normal file
115
衣莎项目/源码/YiShaXiYi/component/quantityClothes/quantityClothes.wxss
Normal file
@@ -0,0 +1,115 @@
|
||||
@import '../../css/_main.wxss';
|
||||
/* component/quantityClothes/quantityClothes.wxss */
|
||||
/* 弹出层 */
|
||||
.tips{
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
background-color: rgba(0, 0, 0, 0.5);
|
||||
z-index: 9999;
|
||||
}
|
||||
.tips_cen{
|
||||
width: 600rpx;
|
||||
background-color: #ffffff;
|
||||
border-radius: 10rpx;
|
||||
padding-top: 58rpx;
|
||||
padding-bottom: 50rpx;
|
||||
}
|
||||
.tips_cen_tit{
|
||||
font-family: PingFang-SC-Bold;
|
||||
font-size: 36rpx;
|
||||
color: #000000;
|
||||
font-weight: 600;
|
||||
text-align: center;
|
||||
}
|
||||
.tips_cen_tit1{
|
||||
text-align: center;
|
||||
font-size: 28rpx;
|
||||
color: #666666;
|
||||
}
|
||||
.tips_cen_tit1 span{
|
||||
color: #ff4838;
|
||||
}
|
||||
.tips_cen_text{
|
||||
width: 520rpx;
|
||||
height: 200rpx;
|
||||
background-color: #f5f5f5;
|
||||
border-radius: 5rpx;
|
||||
position: relative;
|
||||
padding: 34rpx 25rpx;
|
||||
}
|
||||
.tips_cen_text textarea{
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
.tips_cen_num{
|
||||
width: 520rpx;
|
||||
height: 120rpx;
|
||||
background-color: #f5f5f5;
|
||||
border-radius: 5rpx;
|
||||
margin: 0 auto;
|
||||
}
|
||||
.tips_text_span{
|
||||
position: absolute;
|
||||
right: 16rpx;
|
||||
bottom: 13rpx;
|
||||
font-family: PingFang-SC-Medium;
|
||||
font-size: 20rpx;
|
||||
color: #999999;
|
||||
}
|
||||
.tips_cen_sub{
|
||||
margin: 45rpx auto 0;
|
||||
width: 550rpx;
|
||||
height: 80rpx;
|
||||
line-height: 80rpx;
|
||||
text-align: center;
|
||||
background-color: #36d96c;
|
||||
border-radius: 40rpx;
|
||||
font-family: PingFang-SC-Medium;
|
||||
font-size: 32rpx;
|
||||
color: #ffffff;
|
||||
}
|
||||
.tips_img{
|
||||
margin-top: 50rpx;
|
||||
text-align: center;
|
||||
}
|
||||
.tips_img image{
|
||||
width: 69rpx;
|
||||
height: 69rpx;
|
||||
}
|
||||
.tips_ts{
|
||||
text-align: center;
|
||||
font-family: PingFang-SC-Medium;
|
||||
font-size: 26rpx;
|
||||
color: #999999;
|
||||
}
|
||||
.tips_remarks{
|
||||
width: 526rpx;
|
||||
display: flex;
|
||||
margin: 20rpx auto 0;
|
||||
font-family: PingFang-SC-Medium;
|
||||
font-size: 26rpx;
|
||||
color: #333333;
|
||||
}
|
||||
.remarks_xiu{
|
||||
display: inline-block;
|
||||
font-family: PingFang-SC-Medium;
|
||||
font-size: 26rpx;
|
||||
color: #1dbf53;
|
||||
}
|
||||
.num_img image{
|
||||
width: 45rpx;
|
||||
height: 45rpx;
|
||||
}
|
||||
.num_text{
|
||||
line-height: 45rpx;
|
||||
width: 70rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.tipsRemarks{
|
||||
z-index: 99999;
|
||||
}
|
||||
1
衣莎项目/源码/YiShaXiYi/component/skeleton/.pydio
Normal file
1
衣莎项目/源码/YiShaXiYi/component/skeleton/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
c82a22ae-e8a0-40ae-a271-88481086efcf
|
||||
78
衣莎项目/源码/YiShaXiYi/component/skeleton/skeleton.js
Normal file
78
衣莎项目/源码/YiShaXiYi/component/skeleton/skeleton.js
Normal file
@@ -0,0 +1,78 @@
|
||||
Component({
|
||||
properties: {
|
||||
bgcolor: {
|
||||
type: String,
|
||||
value: '#FFF'
|
||||
},
|
||||
selector: {
|
||||
type: String,
|
||||
value: 'skeleton'
|
||||
},
|
||||
loading: {
|
||||
type: String,
|
||||
value: 'spin'
|
||||
}
|
||||
},
|
||||
data: {
|
||||
loadingAni: ['spin', 'chiaroscuro'],
|
||||
systemInfo: {},
|
||||
skeletonRectLists: [],
|
||||
skeletonCircleLists: []
|
||||
},
|
||||
attached: function () {
|
||||
//默认的首屏宽高,防止内容闪现
|
||||
const systemInfo = wx.getSystemInfoSync();
|
||||
this.setData({
|
||||
systemInfo: {
|
||||
width: systemInfo.windowWidth,
|
||||
height: systemInfo.windowHeight
|
||||
},
|
||||
loading: this.data.loadingAni.includes(this.data.loading) ? this.data.loading : 'spin'
|
||||
})
|
||||
|
||||
|
||||
|
||||
},
|
||||
ready: function () {
|
||||
const that = this;
|
||||
|
||||
//绘制背景
|
||||
wx.createSelectorQuery().selectAll(`.${this.data.selector}`).boundingClientRect().exec(function(res){
|
||||
that.setData({
|
||||
'systemInfo.height': res[0][0].height + res[0][0].top
|
||||
})
|
||||
});
|
||||
|
||||
//绘制矩形
|
||||
this.rectHandle();
|
||||
|
||||
//绘制圆形
|
||||
this.radiusHandle();
|
||||
|
||||
},
|
||||
methods: {
|
||||
rectHandle: function () {
|
||||
const that = this;
|
||||
|
||||
//绘制不带样式的节点
|
||||
wx.createSelectorQuery().selectAll(`.${this.data.selector} >>> .${this.data.selector}-rect`).boundingClientRect().exec(function(res){
|
||||
that.setData({
|
||||
skeletonRectLists: res[0]
|
||||
})
|
||||
});
|
||||
|
||||
},
|
||||
radiusHandle: function () {
|
||||
const that = this;
|
||||
|
||||
wx.createSelectorQuery().selectAll(`.${this.data.selector} >>> .${this.data.selector}-radius`).boundingClientRect().exec(function(res){
|
||||
// console.log(res);
|
||||
that.setData({
|
||||
skeletonCircleLists: res[0]
|
||||
})
|
||||
});
|
||||
},
|
||||
|
||||
}
|
||||
|
||||
})
|
||||
3
衣莎项目/源码/YiShaXiYi/component/skeleton/skeleton.json
Normal file
3
衣莎项目/源码/YiShaXiYi/component/skeleton/skeleton.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"component": true
|
||||
}
|
||||
17
衣莎项目/源码/YiShaXiYi/component/skeleton/skeleton.wxml
Normal file
17
衣莎项目/源码/YiShaXiYi/component/skeleton/skeleton.wxml
Normal file
@@ -0,0 +1,17 @@
|
||||
<!--<canvas canvas-id="skeleton" disable-scroll="true"></canvas>-->
|
||||
<view style="width: {{systemInfo.width}}px; height: {{systemInfo.height}}px; background-color: {{bgcolor}}; position: absolute; left:0; top:0; z-index:9998; overflow: hidden;">
|
||||
|
||||
<view wx:for="{{skeletonRectLists}}" wx:key="{{index}}" class="{{loading == 'chiaroscuro' ? 'chiaroscuro' : ''}}" style="width: {{item.width}}px; height: {{item.height}}px; background-color: rgb(238,238,238); position: absolute; left: {{item.left}}px; top: {{item.top}}px">
|
||||
|
||||
</view>
|
||||
<view wx:for="{{skeletonCircleLists}}" wx:key="{{index}}" class="{{loading == 'chiaroscuro' ? 'chiaroscuro' : ''}}" style="width: {{item.width}}px; height: {{item.height}}px; background-color: rgb(238,238,238); border-radius: {{item.width}}px; position: absolute; left: {{item.left}}px; top: {{item.top}}px">
|
||||
|
||||
</view>
|
||||
|
||||
<view class="spinbox" wx:if="{{loading == 'spin'}}">
|
||||
<view class="spin"></view>
|
||||
|
||||
</view>
|
||||
|
||||
|
||||
</view>
|
||||
78
衣莎项目/源码/YiShaXiYi/component/skeleton/skeleton.wxss
Normal file
78
衣莎项目/源码/YiShaXiYi/component/skeleton/skeleton.wxss
Normal file
@@ -0,0 +1,78 @@
|
||||
.spinbox{
|
||||
position: fixed;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
z-index: 9999
|
||||
}
|
||||
.spin {
|
||||
display: inline-block;
|
||||
width: 64rpx;
|
||||
height: 64rpx;
|
||||
}
|
||||
.spin:after {
|
||||
content: " ";
|
||||
display: block;
|
||||
width: 46rpx;
|
||||
height: 46rpx;
|
||||
margin: 1rpx;
|
||||
border-radius: 50%;
|
||||
border: 5rpx solid #409eff;
|
||||
border-color: #409eff transparent #409eff transparent;
|
||||
animation: spin 1.2s linear infinite;
|
||||
}
|
||||
@keyframes spin {
|
||||
0% {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
100% {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
.chiaroscuro{
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: rgb(194, 207, 214);
|
||||
animation-duration: 2s;
|
||||
animation-name: blink;
|
||||
animation-iteration-count: infinite;
|
||||
}
|
||||
|
||||
@keyframes blink {
|
||||
0% {
|
||||
opacity: .4;
|
||||
}
|
||||
50% {
|
||||
opacity: 1;
|
||||
}
|
||||
100% {
|
||||
opacity: .4;
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes flush {
|
||||
0% {
|
||||
left: -100%;
|
||||
}
|
||||
50% {
|
||||
left: 0;
|
||||
}
|
||||
100% {
|
||||
left: 100%;
|
||||
}
|
||||
}
|
||||
.shine {
|
||||
animation: flush 2s linear infinite;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
background: linear-gradient(to left,
|
||||
rgba(255, 255, 255, 0) 0%,
|
||||
rgba(255, 255, 255, .85) 50%,
|
||||
rgba(255, 255, 255, 0) 100%
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user