diff --git a/App.vue b/App.vue index 7448537..059f6e0 100644 --- a/App.vue +++ b/App.vue @@ -271,6 +271,19 @@ } + /* 解决小程序和app滚动条的问题 */ + /* #ifdef MP-WEIXIN || APP-PLUS */ + ::-webkit-scrollbar{ + display: none; + } + /* #endif */ + /* 解决H5 的问题 */ + /* #ifdef H5 */ + uni-scroll-view .uni-scroll-view::-webkit-scrollbar { + /* 隐藏滚动条,但依旧具备可以滚动的功能 */ + display: none + } + /* #endif */ diff --git a/components/J-skeleton/J-skeleton.vue b/components/J-skeleton/J-skeleton.vue new file mode 100644 index 0000000..3eaa209 --- /dev/null +++ b/components/J-skeleton/J-skeleton.vue @@ -0,0 +1,270 @@ + + + + + diff --git a/components/J-skeleton/README.md b/components/J-skeleton/README.md new file mode 100644 index 0000000..77c64e1 --- /dev/null +++ b/components/J-skeleton/README.md @@ -0,0 +1,77 @@ +# skeleton +感谢原作者 https://ext.dcloud.net.cn/plugin?id=852 + +自己项目非常需要骨架,正好原作者发布了1.0 根据自己项目 自己修改了下。 + +目前仅支持: +1.轮播图 +2.分类栏 +3.头像 +4.文章条 +5.动态心情 + +以上是根据自己项目修改的,后续再拓展,或者自己根据自己项目修改,原作者写的还是很灵活的,修改方便! + + +## 属性说明 + +|属性名|类型|默认值|说明| +| -- | -- | --|--| +| loading | Boolean | true | 是否显示占位图 | +| flexType | String | flex-start | 排列方式 center 居中 √ space-between 两端对齐 √ space-around 子元素拉手分布 √ flex-start 居左 flex-end 居右 | +| imgTitle | Boolean | false | 轮播图占位图 | +| showAvatar | Boolean | true | 是否显示头像占位图 | +| nameRow | Number | 1 | 显示头像圆1个 | +| avatarSize | String | 50px | 头像站占位图大小 | +| avatarShape | String | round | 头像形状,可选值:round, square | +| showTitle | Boolean | true | 是否显示标题占位图 | +| titleWidth | String | 40% | 标题占位图宽度 | +| row | Number| 3 | 标题段落占位图行数 | +| animate | Boolean | true | 是否开启动画 | + +## 使用示例 + +```html + + 我是段落1 + +``` + +```javascript +import Skeleton from '../components/skeleton/index.vue' +export default { + components: { + Skeleton + }, + data() { + return { + loading: true, + skeleton1 : { + avatarSize: '52px', + row: 3, + showTitle: true, + } + } + }, + created() { + this.reloadData() + }, + methods: { + reloadData() { + this.loading = true + setTimeout(() => { + this.loading = false + }, 3000) + }, + }, +} +``` + +## 效果图 + +![](http://images.alisali.cn/img_20191014113211.png) diff --git a/components/cart-choose/cart-choose.vue b/components/cart-choose/cart-choose.vue index 0e11ea2..dfa798c 100644 --- a/components/cart-choose/cart-choose.vue +++ b/components/cart-choose/cart-choose.vue @@ -8,10 +8,10 @@ - 原价 ¥{{specificationList[chooseIndex].originalPrice}} + 原价¥{{specificationList[chooseIndex].originalPrice}} - - 现价 ¥{{specificationList[chooseIndex].price}} + + 现价 ¥{{specificationList[chooseIndex].price}} @@ -39,7 +39,7 @@ - + 选择规格 @@ -54,9 +54,9 @@ - + 购买数量 - + @@ -119,6 +119,14 @@ default:{} } }, + watch:{ + specificationList:{ + handler(n,o){ + this.chooseNumber = 1; + }, + deep:true + } + }, components:{ "uni-number-box":uniNumberBox }, @@ -266,7 +274,7 @@ .choose-detail { position: relative; - padding: 20rpx 20rpx 80rpx 20rpx; + padding: 20rpx 20rpx 100rpx 20rpx; //选择 .choose-top { display: flex; @@ -286,7 +294,7 @@ display: inline-block; height: 50rpx; line-height: 50rpx; - padding: 10rpx; + padding: 10rpx 20rpx; color: white; background-color: #F95100; border-radius: 45rpx; @@ -357,9 +365,9 @@ width: calc(100% - 40rpx); padding-bottom: 20rpx; .choose-way{ - height: 60rpx; + height: 70rpx; width: 100%; - border-radius: 30rpx; + border-radius: 35rpx; overflow: hidden; display: flex; align-items: center; @@ -367,15 +375,15 @@ .way{ width: 50%; - height: 60rpx; - line-height: 60rpx; + height:70rpx; + line-height:70rpx; text-align: center; } .way1{ width: 100% ; - height: 60rpx; - line-height: 60rpx; + height: 70rpx; + line-height: 70rpx; text-align: center; } diff --git a/components/goods-list/goods-list.vue b/components/goods-list/goods-list.vue index 9e22e4b..93dd3e4 100644 --- a/components/goods-list/goods-list.vue +++ b/components/goods-list/goods-list.vue @@ -1,99 +1,92 @@ - \ No newline at end of file + diff --git a/components/search/search.vue b/components/search/search.vue index 2fd5aeb..e42c7fc 100644 --- a/components/search/search.vue +++ b/components/search/search.vue @@ -1,12 +1,11 @@ @@ -21,14 +20,6 @@ }, components: {}, props: { - propUrl: { - type: String, - default: '/pages/goods-search/goods-search' - }, - propFormName: { - type: String, - default: 'keywords' - }, propPlaceholder: { type: String, default: '输入商品名称搜索' @@ -37,41 +28,28 @@ type: String, default: 'cr-grey' }, - propTextColor: { - type: String, - default: '#666' - }, - propBgColor: { - type: String, - default: '#FFFFFF' - }, - propBrColor: { - type: String, - default: '' - }, propIsRequired: { type: Boolean, default: true }, - propIsOnEvent: { - type: Boolean, - default: false - }, - // propIcon: { - // type: String, - // default: 'search' - // }, - propIsIconOnEvent: { - type: Boolean, - default: false - }, + disableInput:{ + type: Boolean, + default: false + } + }, + // watch:{ + // propKeyWords:{ + // handler(n,o){ + // this.keywords = n; + // }, + // immediate:true + // } + // }, methods: { // 搜索事件 search_input_event() { - // var keywords = e.detail.value || null; - // console.log(this.keywords) this.keywords = this.keywords || null; // 是否验证必须要传值 if (this.propIsRequired && this.keywords == null) { @@ -82,29 +60,23 @@ }); return false; } - - // 是否回调事件 - // if(this.propIsOnEvent) { - this.$emit('onsearch', this.keywords);//回调 - // } else { - // // 进入搜索页面 - // uni.navigateTo({ - // url: this.propUrl+'?'+this.propFormName+'=' + keywords - // }); - // } + this.$emit('onsearch', this.keywords);//回调 }, - // icon事件 - // search_icon_event(e) { - // // 是否回调事件 - // if(this.propIsIconOnEvent) { - // this.$emit('onicon', {}); - // } - // } - } + }, + destroyed() { + this.keywords = "" + } }; \ No newline at end of file diff --git a/components/uni-goods-nav/components/uni-goods-nav/uni-goods-nav.vue b/components/uni-goods-nav/components/uni-goods-nav/uni-goods-nav.vue index 11d74ae..05eef79 100644 --- a/components/uni-goods-nav/components/uni-goods-nav/uni-goods-nav.vue +++ b/components/uni-goods-nav/components/uni-goods-nav/uni-goods-nav.vue @@ -114,7 +114,7 @@ .uni-tab__cart-box { flex: 1; - height: 50px; + height: 60px; background-color: #fff; z-index: 900; } diff --git a/components/wyb-popup/wyb-popup.vue b/components/wyb-popup/wyb-popup.vue index cd51a8a..a470972 100644 --- a/components/wyb-popup/wyb-popup.vue +++ b/components/wyb-popup/wyb-popup.vue @@ -148,7 +148,7 @@ if (this.type === 'left' || this.type === 'right') { return '100%' } else { - return '400px' + return `${this.height}px` } } } diff --git a/manifest.json b/manifest.json index a26b9fc..9383752 100644 --- a/manifest.json +++ b/manifest.json @@ -1,6 +1,6 @@ { "name" : "嗨森逛", - "appid" : "__UNI__E807B53", + "appid" : "__UNI__70C9511", "description" : "", "versionName" : "1.2.1", "versionCode" : "100", diff --git a/pages.json b/pages.json index eba1b05..8bde333 100644 --- a/pages.json +++ b/pages.json @@ -35,7 +35,8 @@ "navigationBarTitleText": "商品", "navigationBarBackgroundColor": "#3da7e7", "backgroundColorTop": "#3da7e7", - "onReachBottomDistance": 50, + "enablePullDownRefresh": false, + "disableScroll": true, "app-plus": { "titleNView": false, //禁用原生导航栏 "softinputNavBar": "none" @@ -1095,14 +1096,17 @@ "navigationBarTitleText": "搜索", "enablePullDownRefresh": false, "navigationBarBackgroundColor": "#3da7e7", - "backgroundColorTop": "#3da7e7" + "backgroundColorTop": "#3da7e7", + "navigationBarTextStyle": "white" } }, { "path": "classify/cart/cart", "style": { "navigationBarTitleText": "购物车", - "enablePullDownRefresh": false + "enablePullDownRefresh": false, + "disableScroll": true + } }, { @@ -1131,6 +1135,10 @@ "style": { "navigationBarTitleText": "订单确认", "enablePullDownRefresh": false + }, + "app-plus": { + // "softinputNavBar": "none", + "softinputMode": "adjustResize" } }, { diff --git a/pages/tabBar/classify/classify.css b/pages/tabBar/classify/classify.css index 8b78391..3f810db 100644 --- a/pages/tabBar/classify/classify.css +++ b/pages/tabBar/classify/classify.css @@ -33,6 +33,13 @@ .bs{ box-sizing: border-box; } + +/* 商品comtainer */ + +.nav-container{ + height:calc(100% - 150rpx ); +} + /** * 左侧导航 */ @@ -41,7 +48,8 @@ } .left-nav { width: 200rpx; - height:calc(100% - 150rpx ); + /* height:calc(100% - 150rpx ); */ + height:100%; background-color: #F9F9F9; } @@ -130,14 +138,11 @@ .goods-right-content { width: calc(100% - 200rpx); - height: calc(100% - 150rpx); - top: 150rpx; - right: 0; + /* height: calc(100% - 150rpx); */ + height: 100%; background: #ffffff; - /* padding-left: 20rpx; - padding-right: 20rpx; */ box-sizing: border-box; - /* overflow: auto; */ + } .right-content-actual { height: calc(100% - 150rpx); @@ -145,20 +150,17 @@ } .goods-right-ms{ - /* height: calc(100% - 60rpx); */ - height: 100%; - padding-top: 60rpx; + height: calc(100% - 60rpx); + + /* padding-top: 60rpx; */ box-sizing: border-box; } .goods-right-content .sort-contain{ - position: fixed; - /* top:150rpx; */ - width: calc(100% - 240rpx); - z-index: 100; + /* position: fixed; */ + width: 100%; + /* z-index: 100; */ background-color: #ffffff; - /* background-color: #333333; */ - } .goods-right-content .sort-cla { width: 100%; diff --git a/pages/tabBar/classify/classify.vue b/pages/tabBar/classify/classify.vue index 3c9eb05..29ed6b3 100644 --- a/pages/tabBar/classify/classify.vue +++ b/pages/tabBar/classify/classify.vue @@ -4,15 +4,24 @@ - + - + + + + - + + @@ -22,17 +31,21 @@ + + + + - + - - {{item.title}} + + {{item.title || ''}} @@ -40,11 +53,11 @@ - + 综合 - 销量 + 价格 @@ -54,22 +67,34 @@ - - + + + + + + - - + @@ -80,13 +105,16 @@ import goodsList from '@/components/goods-list/goods-list.vue' + import skeleton from '@/components/J-skeleton/J-skeleton.vue' + import {getGoodsTypeTree,getListGoodsDetail,getShoppingCartList} from '@/Utils/physicalObject.js' const app = getApp(); export default { components: { componentSearch, goodsList, - uniBadge + uniBadge, + skeleton }, data(){ return{ @@ -107,7 +135,7 @@ pageData:{ pageStart:1,//页码 - pageNum:7,//每页有多少条数据 + pageNum:20,//每页有多少条数据 navigateLastPage:1,//总共有几页 allData:0 //总共有多少条数据 }, @@ -118,27 +146,25 @@ // cartNum:app.globalData.cartNum, hackReset:false,//强制刷新子组件 - + isLoading:false, + skeletonNum:[1,2,3,4], } }, - created() { - // 数据加载 - this.init(); + + onLoad(){ + // 数据加载 + this.init(); + this.isLoading = true; }, - onShow(){ - - + onShow(){ this.hackReset = false; this.$nextTick(() => { this.hackReset = true; - }) - - + }) }, - methods:{ // 获取数据 init() { @@ -180,7 +206,9 @@ }, - + touchFalse(){ + return false; + }, //搜索事件 toSearch() { uni.navigateTo({ @@ -209,7 +237,7 @@ this.goodsListData = []; this.pageData={ pageStart:1, - pageNum:7, + pageNum:20, allData:0 } this.get_goods_list(this.data_content.children[this.nav_active_item_two_index].key) @@ -233,8 +261,12 @@ pageSize:_this.pageData.pageNum, price:price, } + // console.log(params,"params") - getListGoodsDetail(params).then(res=>{ + getListGoodsDetail(params).then(res=>{ + setTimeout(()=>{ + this.isLoading = false; + },200) if (res.return_code == '000000') { if(res.return_data.list.length > 0){ _this.goodsListData =_this.goodsListData.concat(res.return_data.list); @@ -265,7 +297,7 @@ // pageData:{ // pageStart:1,//页码 - // pageNum:7,//每页有多少条数据 + // pageNum:20,//每页有多少条数据 // navigateLastPage:1,//总共有几页 // allData:0 //总共有多少条数据 // }, @@ -315,11 +347,15 @@ }, + + } } \ No newline at end of file diff --git a/pages/user/order_list/order_list.vue b/pages/user/order_list/order_list.vue index 959528f..f3c4506 100644 --- a/pages/user/order_list/order_list.vue +++ b/pages/user/order_list/order_list.vue @@ -81,7 +81,7 @@ - {{row.title}} + {{row.title.replaceAll("+", "|")}} diff --git a/physical-merchants/address/addNewAddress/addNewAddress.vue b/physical-merchants/address/addNewAddress/addNewAddress.vue index 17de1d3..c5c90dc 100644 --- a/physical-merchants/address/addNewAddress/addNewAddress.vue +++ b/physical-merchants/address/addNewAddress/addNewAddress.vue @@ -3,70 +3,73 @@
- + + + + 联系人* + + + + + + + 联系电话* + + + + - - - - - 点击选择省市区必选 - + - {{userAddress.region || '请选择'}} + {{userAddress.region || '请选择'}} - - + + + + 详细地址* + placeholder-class="corf6" :class="'fcor666 bs-bb '" placeholder="详细地址1~40个字符"> - - 设为默认地址 + + 设为默认地址 - + @@ -337,11 +340,21 @@ width: 100%; box-sizing: border-box; z-index: 2; + .btn{ + height: 60px; + border-radius: 30px; + background-color: #3da7e7; + margin-bottom: 15px; + color: #ffffff; + line-height: 60px; + font-size: 18px; + } } + .page-bottom-fixed { height: 100vh; - padding-bottom: 120rpx; + padding-bottom: 80px; box-sizing: border-box; } @@ -355,12 +368,12 @@ border-radius: 20rpx; overflow: auto; - input { + .pickRes , input { border-radius: 0; box-sizing: border-box; - font-size: 28rpx; - height: 70rpx; - line-height: 70rpx; + font-size: 18px; + height: 30px; + line-height: 30px; } } @@ -369,7 +382,7 @@ padding: 20rpx 0; margin-bottom: 5rpx; font-weight: 500; - font-size: 16px; + font-size: 18px; } } @@ -384,65 +397,4 @@ color: #f00; } - /* - * 三级联动 - */ - // .select-address { - // box-sizing: border-box; - // height: 70rpx; - // line-height: 70rpx; - // padding: 0 10rpx; - // height: auto; - // overflow: auto; - // .fl{ - // float: left; - // } - // } - // .select-address .section { - // width: 33.33%; - // box-sizing: border-box; - - // } - // .select-address .section:not(:first-child) { - // padding: 0 5rpx; - // } - - /** - * 地址信息 - */ - // .default-checkbox image { - // width: 35rpx; - // height: 35rpx !important; - // } - // .address-value { - // padding-right: 110rpx; - // } - // .map-icon { - // bottom: 0; - // right: 0; - // width: 90rpx; - // height: 80rpx; - // line-height: 80rpx; - // } - // .auto-discern { - // bottom: 20rpx; - // right: 20rpx; - // z-index: 2; - // } - // .auto-discern button { - // line-height: inherit; - // padding: 5rpx 20rpx !important; - // } - - /* - * 身份信息 - */ - // .idcard-container { - // background: #e6e6e6; - // } - // .idcard-container .form-upload-data .item image { - // width: 256rpx; - // height: 170rpx; - // border: 1px dashed #c2c2c2; - // } diff --git a/physical-merchants/address/address.vue b/physical-merchants/address/address.vue index 327d610..eb5d76a 100644 --- a/physical-merchants/address/address.vue +++ b/physical-merchants/address/address.vue @@ -4,7 +4,7 @@ - @@ -19,14 +19,14 @@ - 默认地址 - - @@ -72,6 +72,9 @@ if (options.status) { //1:从订单确认页面跳过来的 this.status = options.status; } + + }, + onShow(){ this.initData() }, methods: { @@ -245,7 +248,7 @@ overflow: hidden; .address-contain { - height: calc(100vh - 70px); + height: calc(100vh - 80px); width: calc(100% - 20px); } @@ -257,6 +260,26 @@ .handle-right { vertical-align: middle; + + display: flex; + align-items: center; + .edit{ + background-color: #1aad19; + + } + .del{ + background-color: #e64340; + } + .btn{ + box-sizing: content-box; + font-size: 15px; + height: 40px; + line-height: 40px; + width: 80rpx; + border-radius: 10px; + // padding: 6px 30rpx; + color:#ffffff !important; + } } } @@ -268,20 +291,23 @@ bottom: 0; left: 0; right: 0; - height: 50px; - line-height: 50px; - box-sizing: border-box; display: flex; justify-content: space-around; align-items: center; - + margin-bottom: 15px; .add-btn { - width: 45%; - height: 40px; - line-height: 40px; + width: 80%; text-align: center; - border-radius: 20px; - + height: 60px; + border-radius: 30px; + background-color: #3da7e7; + + color: #ffffff; + line-height: 60px; + font-size: 18px; + + + &:first-of-type { background-color: #F6C133; } diff --git a/physical-merchants/classify/cart/cart.vue b/physical-merchants/classify/cart/cart.vue index e1c19a2..f01baac 100644 --- a/physical-merchants/classify/cart/cart.vue +++ b/physical-merchants/classify/cart/cart.vue @@ -1,24 +1,20 @@ diff --git a/physical-merchants/classify/order/paymentResult.vue b/physical-merchants/classify/order/paymentResult.vue index 823b073..db30b06 100644 --- a/physical-merchants/classify/order/paymentResult.vue +++ b/physical-merchants/classify/order/paymentResult.vue @@ -1,7 +1,7 @@