初始化项目
34
app.js
Executable file
@ -0,0 +1,34 @@
|
||||
var req = require('./utils/request.js')
|
||||
// app.js
|
||||
App({
|
||||
http: req,
|
||||
urls: req.apis,
|
||||
data: {
|
||||
|
||||
},
|
||||
onLaunch() {
|
||||
//获取状态栏高度
|
||||
var _self = this
|
||||
wx.getSystemInfo({
|
||||
success: e => {
|
||||
_self.globalData.StatusBar = e.statusBarHeight;
|
||||
let capsule = wx.getMenuButtonBoundingClientRect();
|
||||
if (capsule) {
|
||||
_self.globalData.Custom = capsule;
|
||||
_self.globalData.CustomBar = capsule.bottom + capsule.top - e.statusBarHeight;
|
||||
} else {
|
||||
_self.globalData.CustomBar = e.statusBarHeight + 50;
|
||||
}
|
||||
}
|
||||
})
|
||||
//获取手机屏幕高度、宽度
|
||||
_self.globalData.windowHeight = wx.getSystemInfoSync().windowHeight
|
||||
_self.globalData.windowWidth = wx.getSystemInfoSync().windowWidth
|
||||
},
|
||||
globalData: {
|
||||
userInfo: {},
|
||||
token: '',
|
||||
userId: '',
|
||||
showUserId: '', //当前浏览的人的ID
|
||||
},
|
||||
})
|
148
app.json
Executable file
@ -0,0 +1,148 @@
|
||||
{
|
||||
"pages": [
|
||||
"pages/index/index",
|
||||
"pages/serve/index/index",
|
||||
"pages/mine/index/index",
|
||||
"pages/mine/myCard/myCard",
|
||||
"pages/mine/myCardDetail/myCardDetail",
|
||||
"pages/mine/otherCard/othercarddetail",
|
||||
"pages/mine/setting/columnsetting",
|
||||
"pages/mine/shop/shopedit",
|
||||
"pages/mine/shop/shopauthentication",
|
||||
"pages/mine/shop/shopauthenticationedit",
|
||||
"pages/mine/shop/shopauthenticationdetail",
|
||||
"pages/mine/shop/addshop",
|
||||
"pages/mine/shop/choosetrade",
|
||||
"pages/mine/shop/mineshop",
|
||||
"pages/mine/shop/mineshopdetail",
|
||||
"pages/mine/manage/shopstaff",
|
||||
"pages/mine/manage/shopmember",
|
||||
"pages/mine/manage/shopposition",
|
||||
"pages/mine/manage/addposition",
|
||||
"pages/mine/product/catalogmanage/catalogmanage",
|
||||
"pages/mine/product/catalogmanage/addcatalog",
|
||||
"pages/mine/product/productmanage/addproduct",
|
||||
"pages/mine/product/productmanage/productlist",
|
||||
"pages/mine/product/productmanage/choosecatalog",
|
||||
"pages/mine/product/productmanage/productmanage",
|
||||
"pages/mine/product/productmanage/searchproduct",
|
||||
"pages/mine/order/ordersuccess",
|
||||
"pages/mine/order/orderlist",
|
||||
"pages/mine/order/orderdetail",
|
||||
"pages/mine/columnlist/columnlist",
|
||||
"pages/mine/product/recycle/catagoryrecycle",
|
||||
"pages/mine/product/coupon/addcoupon",
|
||||
"pages/mine/product/recycle/productrecycle",
|
||||
"pages/mine/product/coupon/couponlist",
|
||||
"pages/mine/product/coupon/editcoupon",
|
||||
"pages/mine/product/coupon/choosegoods",
|
||||
"pages/mine/vip/vipcenter",
|
||||
"pages/mine/income/incomelist"
|
||||
],
|
||||
"subPackages": [
|
||||
{
|
||||
"root": "packagecard",
|
||||
"pages": [
|
||||
"cardList/cardList",
|
||||
"cardDetail/cardDetail",
|
||||
"moments/publish/momentpublish",
|
||||
"moments/edit/momentedit",
|
||||
"moments/list/momentslist",
|
||||
"moments/publish/momentpublishline",
|
||||
"sharePage/sharePage",
|
||||
"moments/list/momentsshowlist",
|
||||
"moments/momentsdetail/momentsdetail",
|
||||
"moments/showlist/showlist",
|
||||
"shop/catalog/bannerlist/bannerlist",
|
||||
"shop/catalog/column/column",
|
||||
"shop/catalog/list/list",
|
||||
"shop/shopingcart/cart",
|
||||
"shop/product/product",
|
||||
"shop/bespeak/bespeak",
|
||||
"shop/product/goodsdetail",
|
||||
"shop/product/affirmorder",
|
||||
"shop/catalog/bannerlist/goodscataloglist",
|
||||
"common/corpperimg/cropperimg",
|
||||
"sharePage/cardcode",
|
||||
"paypage/paypage",
|
||||
"purse/takecash",
|
||||
"marketing/marketinginfo",
|
||||
"marketing/marketingposter",
|
||||
"marketing/marketingpublish",
|
||||
"marketing/posteredit",
|
||||
"paypage/paystate",
|
||||
"lucre/historylucre",
|
||||
"purse/recordlist"
|
||||
]
|
||||
}
|
||||
],
|
||||
"window": {
|
||||
"backgroundTextStyle": "light",
|
||||
"navigationBarBackgroundColor": "#E6B980",
|
||||
"navigationBarTitleText": "服务",
|
||||
"navigationBarTextStyle": "white",
|
||||
"navigationStyle": "custom"
|
||||
},
|
||||
"tabBar": {
|
||||
"color": "#000000",
|
||||
"selectedColor": "#000000",
|
||||
"borderStyle": "black",
|
||||
"list": [
|
||||
{
|
||||
"text": "首页",
|
||||
"pagePath": "pages/index/index",
|
||||
"iconPath": "images/ic_card_normal.png",
|
||||
"selectedIconPath": "images/ic_card_sel.png"
|
||||
},
|
||||
{
|
||||
"text": "服务",
|
||||
"pagePath": "pages/serve/index/index",
|
||||
"iconPath": "images/ic_serve_normal.png",
|
||||
"selectedIconPath": "images/ic_serve_sel.png"
|
||||
},
|
||||
{
|
||||
"text": "我的",
|
||||
"pagePath": "pages/mine/index/index",
|
||||
"iconPath": "images/ic_mine_normal.png",
|
||||
"selectedIconPath": "images/ic_mine_sel.png"
|
||||
}
|
||||
]
|
||||
},
|
||||
"style": "v2",
|
||||
"sitemapLocation": "sitemap.json",
|
||||
"usingComponents": {
|
||||
"cu-custom": "/components/cuicustom/cu-custom",
|
||||
"customcart": "/components/cartfoot/customcart",
|
||||
"van-tabbar": "/vant/dist/tabbar/index",
|
||||
"van-tabbar-item": "/vant/dist/tabbar-item/index",
|
||||
"van-swipe-cell": "/vant/dist/swipe-cell/index",
|
||||
"van-cell-group": "/vant/dist/cell-group/index",
|
||||
"van-cell": "/vant/dist/cell/index",
|
||||
"van-empty": "/vant/dist/empty/index",
|
||||
"van-action-sheet": "/vant/dist/action-sheet/index",
|
||||
"van-submit-bar": "/vant/dist/submit-bar/index",
|
||||
"van-stepper": "/vant/dist/stepper/index",
|
||||
"van-image": "/vant/dist/image/index",
|
||||
"van-loading": "/vant/dist/loading/index",
|
||||
"van-switch": "/vant/dist/switch/index",
|
||||
"van-tab": "/vant/dist/tab/index",
|
||||
"van-tabs": "/vant/dist/tabs/index",
|
||||
"van-picker": "/vant/dist/picker/index",
|
||||
"van-popup": "/vant/dist/popup/index",
|
||||
"van-dropdown-menu": "/vant/dist/dropdown-menu/index",
|
||||
"van-dropdown-item": "/vant/dist/dropdown-item/index",
|
||||
"van-collapse": "/vant/dist/collapse/index",
|
||||
"van-collapse-item": "/vant/dist/collapse-item/index"
|
||||
},
|
||||
"plugins": {
|
||||
"chooseLocation": {
|
||||
"version": "1.0.6",
|
||||
"provider": "wx76a9a06e5b4e693e"
|
||||
}
|
||||
},
|
||||
"permission": {
|
||||
"scope.userLocation": {
|
||||
"desc": "你的位置信息将用于小程序定位"
|
||||
}
|
||||
}
|
||||
}
|
153
app.wxss
Executable file
@ -0,0 +1,153 @@
|
||||
/**app.wxss**/
|
||||
@import "/class/main.wxss";
|
||||
@import "/class/icon.wxss";
|
||||
|
||||
|
||||
page {
|
||||
background-color: #f7f7f7;
|
||||
/* background-color: #00eeff; */
|
||||
}
|
||||
|
||||
|
||||
::-webkit-scrollbar {
|
||||
width: 0;
|
||||
height: 0;
|
||||
color: transparent;
|
||||
}
|
||||
|
||||
scroll-view {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.line-solid-gray {
|
||||
border-bottom-style: dashed;
|
||||
border-bottom-width: 2rpx;
|
||||
border-bottom-color: #dfdfdf;
|
||||
}
|
||||
|
||||
.line-so-gray {
|
||||
border-bottom-style: solid;
|
||||
border-bottom-width: 2rpx;
|
||||
border-bottom-color: #dfdfdf;
|
||||
width: 100%;
|
||||
margin: 15rpx;
|
||||
}
|
||||
|
||||
.nav-list {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
padding: 0px 40rpx 0px;
|
||||
justify-content: space-between;
|
||||
}
|
||||
|
||||
.nav-li {
|
||||
padding: 30rpx;
|
||||
border-radius: 12rpx;
|
||||
width: 45%;
|
||||
margin: 0 2.5% 40rpx;
|
||||
background-image: url(https://image.weilanwl.com/color2.0/cardBg.png);
|
||||
background-size: cover;
|
||||
background-position: center;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.icon-star-red {
|
||||
content: '*';
|
||||
color: red;
|
||||
}
|
||||
|
||||
.bottom-action {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
width: 75%;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.nav-li::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
z-index: -1;
|
||||
background-color: inherit;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
left: 0;
|
||||
bottom: -10%;
|
||||
border-radius: 10rpx;
|
||||
opacity: 0.2;
|
||||
transform: scale(0.9, 0.9);
|
||||
}
|
||||
|
||||
.nav-li.cur {
|
||||
color: #fff;
|
||||
background: rgb(94, 185, 94);
|
||||
box-shadow: 4rpx 4rpx 6rpx rgba(94, 185, 94, 0.4);
|
||||
}
|
||||
|
||||
.nav-title {
|
||||
font-size: 32rpx;
|
||||
font-weight: 300;
|
||||
}
|
||||
|
||||
.nav-title::first-letter {
|
||||
font-size: 40rpx;
|
||||
margin-right: 4rpx;
|
||||
}
|
||||
|
||||
.nav-name {
|
||||
font-size: 28rpx;
|
||||
text-transform: Capitalize;
|
||||
margin-top: 20rpx;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.nav-name::before {
|
||||
content: "";
|
||||
position: absolute;
|
||||
display: block;
|
||||
width: 40rpx;
|
||||
height: 6rpx;
|
||||
background: #fff;
|
||||
bottom: 0;
|
||||
right: 0;
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
.nav-name::after {
|
||||
content: "";
|
||||
position: absolute;
|
||||
display: block;
|
||||
width: 100rpx;
|
||||
height: 1px;
|
||||
background: #fff;
|
||||
bottom: 0;
|
||||
right: 40rpx;
|
||||
opacity: 0.3;
|
||||
}
|
||||
|
||||
.nav-name::first-letter {
|
||||
font-weight: bold;
|
||||
font-size: 36rpx;
|
||||
margin-right: 1px;
|
||||
}
|
||||
|
||||
.nav-li text {
|
||||
position: absolute;
|
||||
right: 30rpx;
|
||||
top: 30rpx;
|
||||
font-size: 52rpx;
|
||||
width: 60rpx;
|
||||
height: 60rpx;
|
||||
text-align: center;
|
||||
line-height: 60rpx;
|
||||
}
|
||||
|
||||
.text-light {
|
||||
font-weight: 300;
|
||||
}
|
||||
|
||||
.hint-msg {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
}
|
1226
class/icon.wxss
Executable file
4462
class/main.wxss
Executable file
228
components/cartfoot/customcart.js
Executable file
@ -0,0 +1,228 @@
|
||||
const app = getApp();
|
||||
Component({
|
||||
options: {
|
||||
addGlobalClass: true,
|
||||
multipleSlots: true
|
||||
},
|
||||
lifetimes: {
|
||||
attached() {
|
||||
let shopCartData = app.globalData.shopCart
|
||||
var amount = 0
|
||||
if (shopCartData.length > 0) {
|
||||
shopCartData.forEach(it => {
|
||||
if (it.shopId == this.properties.shopId) {
|
||||
this.data.shopCart = this.data.shopCart.concat(it)
|
||||
amount += it.buyNum
|
||||
}
|
||||
})
|
||||
}
|
||||
this.setData({
|
||||
shopId: this.properties.shopId,
|
||||
shopCart: this.data.shopCart,
|
||||
buyAmount: amount
|
||||
})
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 组件的对外属性
|
||||
*/
|
||||
properties: {
|
||||
shopCart: {
|
||||
type: Array,
|
||||
default: []
|
||||
},
|
||||
goods: {
|
||||
type: Object,
|
||||
default: null
|
||||
},
|
||||
shopId: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
showBtn: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 组件的初始数据
|
||||
*/
|
||||
data: {
|
||||
shopCart: [],
|
||||
show: false,
|
||||
buyAmount: 0
|
||||
},
|
||||
/**
|
||||
* 组件的方法列表
|
||||
*/
|
||||
methods: {
|
||||
//添加商品
|
||||
addCart(event) {
|
||||
var _self = this
|
||||
let goods = event.currentTarget.dataset.goods
|
||||
goods.buyNum = 0
|
||||
if (goods != null) {
|
||||
//判断是否存在
|
||||
var isExist = false
|
||||
for (var i = 0; i < _self.data.shopCart.length; ++i) {
|
||||
var it = _self.data.shopCart[i]
|
||||
if (it.goodsId == goods.goodsId) {
|
||||
//判断是否超出库存
|
||||
if (it.buyNum < goods.goodsTotal) {
|
||||
it.buyNum += 1
|
||||
} else {
|
||||
wx.showToast({
|
||||
title: '超出库存范围',
|
||||
icon: 'error'
|
||||
})
|
||||
}
|
||||
isExist = true
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!isExist) {
|
||||
//不存在
|
||||
goods.buyNum = 1
|
||||
_self.data.shopCart = _self.data.shopCart.concat(goods)
|
||||
}
|
||||
let amount = 0
|
||||
_self.data.shopCart.forEach(it => {
|
||||
amount += it.buyNum
|
||||
})
|
||||
_self.setData({
|
||||
shopCart: _self.data.shopCart,
|
||||
buyAmount: amount
|
||||
})
|
||||
app.globalData.shopCart = _self.data.shopCart
|
||||
this.triggerEvent('refreshShopCart')
|
||||
}
|
||||
},
|
||||
//显示购物车列表
|
||||
showCart() {
|
||||
let cart = {
|
||||
shopId: this.data.shopId,
|
||||
shopCart: this.data.shopCart
|
||||
}
|
||||
this.triggerEvent('showcart', cart)
|
||||
},
|
||||
//立即订购
|
||||
nowOrder(event) {
|
||||
if (this.data.shopCart.length > 0) {
|
||||
wx.navigateTo({
|
||||
url: '/pages/shop/product/affirmorder?shopId=' + this.data.shopId,
|
||||
})
|
||||
} else {
|
||||
wx.showToast({
|
||||
title: '购物车空空如也',
|
||||
icon: 'error'
|
||||
})
|
||||
}
|
||||
},
|
||||
onClose() {
|
||||
this.setData({
|
||||
show: false
|
||||
})
|
||||
},
|
||||
//外部添加商品
|
||||
listAddToCart(goods) {
|
||||
let _self = this
|
||||
goods.buyNum = 0
|
||||
if (goods != null) {
|
||||
//判断是否存在
|
||||
var isExist = false
|
||||
for (var i = 0; i < _self.data.shopCart.length; ++i) {
|
||||
var it = _self.data.shopCart[i]
|
||||
if (it.goodsId == goods.goodsId) {
|
||||
//判断是否超出库存
|
||||
if (it.buyNum < goods.goodsTotal) {
|
||||
it.buyNum += 1
|
||||
} else {
|
||||
wx.showToast({
|
||||
title: '超出库存范围',
|
||||
icon: 'error'
|
||||
})
|
||||
}
|
||||
isExist = true
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!isExist) {
|
||||
//不存在
|
||||
goods.buyNum = 1
|
||||
_self.data.shopCart = _self.data.shopCart.concat(goods)
|
||||
}
|
||||
let amount = 0
|
||||
_self.data.shopCart.forEach(it => {
|
||||
amount += it.buyNum
|
||||
})
|
||||
_self.setData({
|
||||
shopCart: _self.data.shopCart,
|
||||
buyAmount: amount
|
||||
})
|
||||
app.globalData.shopCart = _self.data.shopCart
|
||||
}
|
||||
},
|
||||
//移除商品
|
||||
listRemoveCart(goods) {
|
||||
let _self = this
|
||||
goods.buyNum = 0
|
||||
if (goods != null) {
|
||||
//判断是否存在
|
||||
var isExist = false
|
||||
for (var i = 0; i < _self.data.shopCart.length; ++i) {
|
||||
var it = _self.data.shopCart[i]
|
||||
if (it.goodsId == goods.goodsId) {
|
||||
//判断是否超出库存
|
||||
if (it.buyNum < goods.goodsTotal) {
|
||||
it.buyNum -= 1
|
||||
} else {
|
||||
wx.showToast({
|
||||
title: '超出库存范围',
|
||||
icon: 'error'
|
||||
})
|
||||
}
|
||||
isExist = true
|
||||
break;
|
||||
}
|
||||
}
|
||||
let amount = 0
|
||||
_self.data.shopCart.forEach(it => {
|
||||
amount += it.buyNum
|
||||
})
|
||||
_self.setData({
|
||||
shopCart: _self.data.shopCart,
|
||||
buyAmount: amount
|
||||
})
|
||||
if (amount == 0) {
|
||||
app.globalData.shopCart = []
|
||||
_self.setData({
|
||||
shopCart: []
|
||||
})
|
||||
} else {
|
||||
app.globalData.shopCart = _self.data.shopCart
|
||||
}
|
||||
}
|
||||
},
|
||||
//刷新
|
||||
refreshCart() {
|
||||
let shopCartData = app.globalData.shopCart
|
||||
this.setData({
|
||||
shopCart: []
|
||||
})
|
||||
var amount = 0
|
||||
if (shopCartData.length > 0) {
|
||||
shopCartData.forEach(it => {
|
||||
if (it.shopId == this.properties.shopId) {
|
||||
this.data.shopCart = this.data.shopCart.concat(it)
|
||||
amount += it.buyNum
|
||||
}
|
||||
})
|
||||
}
|
||||
this.setData({
|
||||
shopId: this.properties.shopId,
|
||||
shopCart: this.data.shopCart,
|
||||
buyAmount: amount
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
4
components/cartfoot/customcart.json
Executable file
@ -0,0 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
17
components/cartfoot/customcart.wxml
Executable file
@ -0,0 +1,17 @@
|
||||
<view class="cu-bar bg-white tabbar border shop foot">
|
||||
<view class="action">
|
||||
<view class="cuIcon-favor">
|
||||
</view>
|
||||
收藏
|
||||
</view>
|
||||
<view class="action" bindtap="showCart">
|
||||
<view class="cuIcon-cart">
|
||||
<view class="cu-tag badge">{{buyAmount}}</view>
|
||||
</view>
|
||||
购物车
|
||||
</view>
|
||||
<view class="cu-btn bg-orange round shadow-blur" bindtap="addCart" data-goods="{{goods}}" wx:if="{{showBtn}}">加入购物车
|
||||
</view>
|
||||
<view class="cu-btn bg-white round shadow-blur" wx:else></view>
|
||||
<view class="cu-btn bg-red round shadow-blur" bindtap="nowOrder">立即购买</view>
|
||||
</view>
|
1
components/cartfoot/customcart.wxss
Executable file
@ -0,0 +1 @@
|
||||
/* components/cartfoot/cuscart.wxss */
|
92
components/cuicustom/cu-custom.js
Executable file
@ -0,0 +1,92 @@
|
||||
const app = getApp();
|
||||
Component({
|
||||
/**
|
||||
* 组件的一些选项
|
||||
*/
|
||||
options: {
|
||||
addGlobalClass: true,
|
||||
multipleSlots: true
|
||||
},
|
||||
/**
|
||||
* 组件的对外属性
|
||||
*/
|
||||
properties: {
|
||||
bgColor: {
|
||||
type: String,
|
||||
default: '1'
|
||||
},
|
||||
isWhite: {
|
||||
type: [Boolean, String],
|
||||
default: false
|
||||
},
|
||||
isCustom: {
|
||||
type: [Boolean, String],
|
||||
default: false
|
||||
},
|
||||
isIndex: {
|
||||
type: [Boolean, String],
|
||||
default: false
|
||||
},
|
||||
isBack: {
|
||||
type: [Boolean, String],
|
||||
default: false
|
||||
},
|
||||
isRelaunch: {
|
||||
type: [Boolean, String],
|
||||
default: false
|
||||
},
|
||||
isClickTitle: {
|
||||
type: [Boolean, String],
|
||||
default: false
|
||||
},
|
||||
bgImage: {
|
||||
type: String,
|
||||
default: ''
|
||||
},
|
||||
},
|
||||
/**
|
||||
* 组件的初始数据
|
||||
*/
|
||||
data: {
|
||||
StatusBar: app.globalData.StatusBar,
|
||||
CustomBar: app.globalData.CustomBar,
|
||||
Custom: app.globalData.Custom,
|
||||
userIcon: wx.getStorageSync('userIcon') || '/images/ic_user_default.png'
|
||||
},
|
||||
/**
|
||||
* 组件的方法列表
|
||||
*/
|
||||
methods: {
|
||||
BackPage() {
|
||||
wx.navigateBack({
|
||||
delta: 1
|
||||
});
|
||||
},
|
||||
GoHome() {
|
||||
wx.navigateBack({
|
||||
delta: 1,
|
||||
})
|
||||
},
|
||||
toHome() {
|
||||
wx.reLaunch({
|
||||
url: '/pages/index/index',
|
||||
})
|
||||
},
|
||||
goCenter() {
|
||||
wx.switchTab({
|
||||
url: '/pages/mine/index/index',
|
||||
})
|
||||
},
|
||||
//刷新
|
||||
refreshCart() {
|
||||
let icon = app.globalData.userIcon
|
||||
this.setData({
|
||||
userIcon: icon
|
||||
})
|
||||
},
|
||||
// 点击标题
|
||||
showIcre() {
|
||||
this.triggerEvent('show', {}, {})
|
||||
}
|
||||
}
|
||||
})
|
4
components/cuicustom/cu-custom.json
Executable file
@ -0,0 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
27
components/cuicustom/cu-custom.wxml
Executable file
@ -0,0 +1,27 @@
|
||||
<view class="cu-custom" style="height:{{CustomBar}}px">
|
||||
<view
|
||||
class="cu-bar fixed {{bgImage!=''?'none-bg text-white bg-img':''}} {{isWhite ? 'title-bar-bg-white':'title-bar-bg'}}"
|
||||
style="height:{{CustomBar}}px;padding-top:{{StatusBar}}px;">
|
||||
<view class="action" bindtap="BackPage" wx:if="{{isBack}}">
|
||||
<text class="cuIcon-back"></text>
|
||||
<slot name="backText"></slot>
|
||||
</view>
|
||||
<view class="action" bindtap="GoHome" wx:if="{{isRelaunch}}">
|
||||
<text class="cuIcon-back"></text>
|
||||
<slot name="backText"></slot>
|
||||
</view>
|
||||
<view class="action border-custom" wx:if="{{isCustom}}"
|
||||
style="width:{{Custom.width}}px;height:{{Custom.height}}px;margin-left:calc(750rpx - {{Custom.right}}px)">
|
||||
<text class="cuIcon-back" bindtap="BackPage"></text>
|
||||
<text class="cuIcon-homefill" bindtap="toHome"></text>
|
||||
</view>
|
||||
<view class="content" style="top:{{StatusBar}}px" bindtap="showIcre">
|
||||
<slot name="content"></slot>
|
||||
</view>
|
||||
<view class="center" wx:if="{{isIndex}}" bindtap="goCenter">
|
||||
<image src="{{userIcon}}"></image>
|
||||
个人中心
|
||||
</view>
|
||||
<slot name="right"></slot>
|
||||
</view>
|
||||
</view>
|
38
components/cuicustom/cu-custom.wxss
Executable file
@ -0,0 +1,38 @@
|
||||
/* colorui/components/cu-custom.wxss */
|
||||
.center {
|
||||
padding: 5px 10rpx;
|
||||
border-radius: 60rpx;
|
||||
border: 1px solid #dddddd;
|
||||
width: 180rpx;
|
||||
height: 65rpx;
|
||||
box-sizing: border-box;
|
||||
line-height: 65rpx;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-left: 20rpx;
|
||||
}
|
||||
|
||||
.center image {
|
||||
width: 45rpx;
|
||||
height: 100%;
|
||||
border-radius: 50%;
|
||||
vertical-align: top;
|
||||
}
|
||||
|
||||
.title-bar-bg {
|
||||
background-color: #E6B980;
|
||||
/* background-color: #ffffff; */
|
||||
color: #fff;
|
||||
/* color: #000000; */
|
||||
}
|
||||
|
||||
.title-bar-bg-white {
|
||||
background-color: #ffffff;
|
||||
color: #000000;
|
||||
}
|
||||
|
||||
.title-bar-bg-dark {
|
||||
background-color: #000000;
|
||||
color: #ffffff;
|
||||
}
|
35
components/loadmore/index.js
Executable file
@ -0,0 +1,35 @@
|
||||
Component({
|
||||
properties: {
|
||||
mtype:{
|
||||
type:Number,
|
||||
value:1,
|
||||
observer: function (newVal, oldVal) {
|
||||
this.setData({
|
||||
mtype: newVal
|
||||
})
|
||||
}
|
||||
},
|
||||
nodata_str:{
|
||||
type:String,
|
||||
value:'暂无数据',
|
||||
observer: function (newVal, oldVal) {
|
||||
this.setData({
|
||||
nodata_str: newVal
|
||||
})
|
||||
}
|
||||
},
|
||||
hidden:{
|
||||
type:Boolean,
|
||||
value:true,
|
||||
observer: function (newVal, oldVal) {
|
||||
this.setData({
|
||||
hidden: newVal
|
||||
})
|
||||
}
|
||||
},
|
||||
tipcolor:{
|
||||
type:String,
|
||||
value:"#f9f9f9"
|
||||
}
|
||||
}
|
||||
})
|
3
components/loadmore/index.json
Executable file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"component": true
|
||||
}
|
21
components/loadmore/index.wxml
Executable file
@ -0,0 +1,21 @@
|
||||
<block wx:if="{{mtype==2}}">
|
||||
<view class="zan-loadmore zan-loadmore--nomore" hidden="{{hidden}}">
|
||||
<view class="zan-loadmore__tips" style="background-color:{{tipcolor}}">
|
||||
<view class="zan-loadmore__dot"></view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
<block wx:elif="{{mtype==3}}">
|
||||
<view class="zan-loadmore zan-loadmore--nodata" hidden="{{hidden}}">
|
||||
<view class="zan-loadmore__tips" style="background-color:{{tipcolor}}">{{ nodata_str}}</view>
|
||||
</view>
|
||||
</block>
|
||||
|
||||
<block wx:elif="{{mtype==1}}" >
|
||||
<view class="zan-loadmore" hidden="{{hidden}}">
|
||||
<image class="zan-loading" src="../../assets/imgs/loadmore.png"></image>
|
||||
<view class="zan-loadmore__tips" style="background-color:{{tipcolor}}">加载中...</view>
|
||||
</view>
|
||||
</block>
|
||||
|
||||
|
57
components/loadmore/index.wxss
Executable file
@ -0,0 +1,57 @@
|
||||
.zan-loadmore{
|
||||
position:relative;
|
||||
width:65%;
|
||||
margin:0 auto;
|
||||
line-height:20px;
|
||||
font-size:14px;
|
||||
text-align:center;
|
||||
display: block;
|
||||
vertical-align: middle
|
||||
}
|
||||
.zan-loading{
|
||||
width:20px;
|
||||
height:20px;
|
||||
display:inline-block;
|
||||
vertical-align:middle;
|
||||
animation:weuiLoading 1s steps(12,end) infinite;
|
||||
}
|
||||
.zan-loadmore .zan-loading{
|
||||
margin-right:4px
|
||||
}
|
||||
.zan-loadmore__tips{
|
||||
display:inline-block;
|
||||
vertical-align:middle;
|
||||
height:20px;
|
||||
line-height:20px;
|
||||
color:#999
|
||||
}
|
||||
.zan-loadmore--nodata,.zan-loadmore--nomore{
|
||||
border-top:1rpx solid #e5e5e5;
|
||||
}
|
||||
.zan-loadmore--nodata{
|
||||
margin-top:20rpx
|
||||
}
|
||||
.zan-loadmore--nodata .zan-loadmore__tips{
|
||||
position:relative;
|
||||
top:-11px;
|
||||
padding:0 6px
|
||||
}
|
||||
.zan-loadmore--nomore .zan-loadmore__tips{
|
||||
position:relative;
|
||||
top:-11px;
|
||||
padding:0 6px
|
||||
}
|
||||
.zan-loadmore__dot{
|
||||
position:absolute;
|
||||
left:50%;
|
||||
top:10px;
|
||||
margin-left:-2px;
|
||||
margin-top:-2px;
|
||||
content:" ";
|
||||
width:4px;
|
||||
height:4px;
|
||||
border-radius:50%;
|
||||
background-color:#e5e5e5;
|
||||
display:inline-block;
|
||||
vertical-align:middle;
|
||||
}
|
BIN
images/code-icon.png
Executable file
After Width: | Height: | Size: 885 B |
BIN
images/contact-icon.png
Executable file
After Width: | Height: | Size: 1.1 KiB |
BIN
images/create-btn.png
Executable file
After Width: | Height: | Size: 625 B |
BIN
images/htm.png
Executable file
After Width: | Height: | Size: 683 B |
BIN
images/ic_address_icon.png
Executable file
After Width: | Height: | Size: 1.3 KiB |
BIN
images/ic_arrow_cir.png
Executable file
After Width: | Height: | Size: 561 B |
BIN
images/ic_arrow_down.png
Executable file
After Width: | Height: | Size: 478 B |
BIN
images/ic_arrow_right.png
Executable file
After Width: | Height: | Size: 223 B |
BIN
images/ic_arrow_up.png
Executable file
After Width: | Height: | Size: 471 B |
BIN
images/ic_audio_play.png
Executable file
After Width: | Height: | Size: 524 B |
BIN
images/ic_audio_playing.png
Executable file
After Width: | Height: | Size: 301 B |
BIN
images/ic_audio_rewind.png
Executable file
After Width: | Height: | Size: 587 B |
BIN
images/ic_audio_speed.png
Executable file
After Width: | Height: | Size: 598 B |
BIN
images/ic_auth.png
Executable file
After Width: | Height: | Size: 1.1 KiB |
BIN
images/ic_call_phone_icon.png
Executable file
After Width: | Height: | Size: 1.3 KiB |
BIN
images/ic_card_normal.png
Executable file
After Width: | Height: | Size: 885 B |
BIN
images/ic_card_sel.png
Executable file
After Width: | Height: | Size: 2.1 KiB |
BIN
images/ic_cash.png
Executable file
After Width: | Height: | Size: 791 B |
BIN
images/ic_code_icon.png
Executable file
After Width: | Height: | Size: 1.2 KiB |
BIN
images/ic_collect_icon.png
Executable file
After Width: | Height: | Size: 810 B |
BIN
images/ic_column_icon.png
Executable file
After Width: | Height: | Size: 747 B |
BIN
images/ic_comment_icon.png
Executable file
After Width: | Height: | Size: 524 B |
BIN
images/ic_corner_mark_bg.png
Executable file
After Width: | Height: | Size: 533 B |
BIN
images/ic_email_icon.png
Executable file
After Width: | Height: | Size: 1.3 KiB |
BIN
images/ic_empty_data.png
Executable file
After Width: | Height: | Size: 14 KiB |
BIN
images/ic_empty_desc.png
Executable file
After Width: | Height: | Size: 22 KiB |
BIN
images/ic_empty_map.png
Executable file
After Width: | Height: | Size: 26 KiB |
BIN
images/ic_empty_text.png
Executable file
After Width: | Height: | Size: 24 KiB |
BIN
images/ic_empty_voice.png
Executable file
After Width: | Height: | Size: 20 KiB |
BIN
images/ic_favour.png
Executable file
After Width: | Height: | Size: 699 B |
BIN
images/ic_goods_catalog.png
Executable file
After Width: | Height: | Size: 554 B |
BIN
images/ic_goods_list_icon.png
Executable file
After Width: | Height: | Size: 587 B |
BIN
images/ic_hot_number_bg.png
Executable file
After Width: | Height: | Size: 647 B |
BIN
images/ic_information_icon.png
Executable file
After Width: | Height: | Size: 603 B |
BIN
images/ic_member_list_icon.png
Executable file
After Width: | Height: | Size: 538 B |
BIN
images/ic_member_qrcode.png
Executable file
After Width: | Height: | Size: 575 B |
BIN
images/ic_mine_normal.png
Executable file
After Width: | Height: | Size: 1.4 KiB |
BIN
images/ic_mine_sel.png
Executable file
After Width: | Height: | Size: 2.7 KiB |
BIN
images/ic_mine_title_bg.png
Executable file
After Width: | Height: | Size: 1.6 KiB |
BIN
images/ic_order_all.png
Executable file
After Width: | Height: | Size: 498 B |
BIN
images/ic_order_close.png
Executable file
After Width: | Height: | Size: 842 B |
BIN
images/ic_order_finish.png
Executable file
After Width: | Height: | Size: 862 B |
BIN
images/ic_order_pay.png
Executable file
After Width: | Height: | Size: 897 B |
BIN
images/ic_order_wait_pay.png
Executable file
After Width: | Height: | Size: 874 B |
BIN
images/ic_pause_icon.png
Executable file
After Width: | Height: | Size: 826 B |
BIN
images/ic_pay_order_icon.png
Executable file
After Width: | Height: | Size: 909 B |
BIN
images/ic_phone_icon.png
Executable file
After Width: | Height: | Size: 1.1 KiB |
BIN
images/ic_play_icon.png
Executable file
After Width: | Height: | Size: 839 B |
BIN
images/ic_position_icon.png
Executable file
After Width: | Height: | Size: 620 B |
BIN
images/ic_poster_icon.png
Executable file
After Width: | Height: | Size: 692 B |
BIN
images/ic_purse.png
Executable file
After Width: | Height: | Size: 681 B |
BIN
images/ic_record_start copy.png
Executable file
After Width: | Height: | Size: 4.1 KiB |
BIN
images/ic_record_start.png
Executable file
After Width: | Height: | Size: 4.1 KiB |
BIN
images/ic_recycle_icon.png
Executable file
After Width: | Height: | Size: 1.2 KiB |
BIN
images/ic_scan_icon.png
Executable file
After Width: | Height: | Size: 829 B |
BIN
images/ic_serve_normal.png
Executable file
After Width: | Height: | Size: 1.4 KiB |
BIN
images/ic_serve_sel.png
Executable file
After Width: | Height: | Size: 2.6 KiB |
BIN
images/ic_setting.png
Executable file
After Width: | Height: | Size: 1.5 KiB |
BIN
images/ic_share_cir_icon.png
Executable file
After Width: | Height: | Size: 1.8 KiB |
BIN
images/ic_share_icon.png
Executable file
After Width: | Height: | Size: 1.3 KiB |
BIN
images/ic_share_img.png
Executable file
After Width: | Height: | Size: 1.1 KiB |
BIN
images/ic_share_moment.png
Executable file
After Width: | Height: | Size: 1.7 KiB |
BIN
images/ic_squareness_del.png
Executable file
After Width: | Height: | Size: 499 B |
BIN
images/ic_staff_list_icon.png
Executable file
After Width: | Height: | Size: 547 B |
BIN
images/ic_staff_qrcode.png
Executable file
After Width: | Height: | Size: 553 B |
BIN
images/ic_success.png
Executable file
After Width: | Height: | Size: 14 KiB |
BIN
images/ic_take_cash_record.png
Executable file
After Width: | Height: | Size: 951 B |
BIN
images/ic_temp.png
Executable file
After Width: | Height: | Size: 12 KiB |
BIN
images/ic_unauth.png
Executable file
After Width: | Height: | Size: 1.2 KiB |
BIN
images/ic_unfavour.png
Executable file
After Width: | Height: | Size: 676 B |
BIN
images/ic_user_default.png
Executable file
After Width: | Height: | Size: 1.2 KiB |
BIN
images/ic_version_contrast.png
Executable file
After Width: | Height: | Size: 3.6 KiB |
BIN
images/ic_video_default.png
Executable file
After Width: | Height: | Size: 999 B |
BIN
images/ic_video_play.png
Executable file
After Width: | Height: | Size: 470 B |
BIN
images/ic_vip_icon.png
Executable file
After Width: | Height: | Size: 1.7 KiB |
BIN
images/ic_voice_record.gif
Executable file
After Width: | Height: | Size: 97 KiB |
BIN
images/ic_wait_consignment.png
Executable file
After Width: | Height: | Size: 785 B |
BIN
images/ic_wait_pay.png
Executable file
After Width: | Height: | Size: 945 B |
BIN
images/ic_wait_receipt.png
Executable file
After Width: | Height: | Size: 805 B |
BIN
images/ic_wechart_icon.png
Executable file
After Width: | Height: | Size: 2.0 KiB |
BIN
images/ic_wechat_icon.png
Executable file
After Width: | Height: | Size: 713 B |
BIN
images/ic_yellow_bg.png
Executable file
After Width: | Height: | Size: 1.4 KiB |
BIN
images/jpg.png
Executable file
After Width: | Height: | Size: 1.3 KiB |