Skip to content

Commit

Permalink
U 将网络图标改成本地图标
Browse files Browse the repository at this point in the history
U 更新支付方式的UI
F 修复轮播图的bug
F 修复没有商品时的错误显示问题
F 修复share.js的一个bug
A 增加发货时的订阅消息
  • Loading branch information
meiweiyuxian committed Mar 26, 2020
1 parent 278eb20 commit 972d64d
Show file tree
Hide file tree
Showing 84 changed files with 701 additions and 616 deletions.
Binary file added images/icon/address.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/icon/asc.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/icon/cart-empty.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/icon/chat.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/icon/contact.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/icon/default_avatar_big.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/icon/desc.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/icon/edit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/icon/footprint.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/icon/gou-gray.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/icon/gou-red.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/icon/icon-about-r.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/icon/icon-address-r.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/icon/icon-close.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/icon/icon-delivery-r.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/icon/icon-footprint-r.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/icon/icon-onroad-r.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/icon/icon-pay-r.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/icon/icon-service-r.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/icon/img-icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/icon/loading.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/icon/location.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/icon/mobile.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/icon/no-img.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/icon/no-order.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added images/icon/no-search.png
Binary file added images/icon/notice-icon.png
Binary file added images/icon/order-by.png
Binary file added images/icon/pay-error.png
Binary file added images/icon/pay-success.png
Binary file added images/icon/position-deny.png
Binary file added images/icon/position.png
Binary file added images/icon/pyq.png
Binary file added images/icon/receiver.png
Binary file added images/icon/search-dele.png
Binary file added images/icon/search.png
Binary file added images/icon/share.png
Binary file added images/icon/sold-out.png
Binary file added images/icon/success-disable.png
Binary file added images/icon/success.png
Binary file added images/icon/to-close-w.png
Binary file added images/icon/to-delivery-w.png
Binary file added images/icon/to-pay-w.png
Binary file added images/icon/to-receive-w.png
Binary file added images/icon/trash-9.png
Binary file added images/icon/weixin-w.png
Binary file added images/icon/weixin.png
4 changes: 2 additions & 2 deletions pages/app-auth/index.wxml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
<view class="container">
<view class='logo'>
<image class='logo-img' src='http://lucky-icon.meiweiyuxian.com/hio/pinwheel.jpg'></image>
<image class='logo-img' src='/images/icon/loading.gif'></image>
</view>
<view class='logo-name'>海风小店</view>
<view class='intro'>开源微信小程序商城</view>
<view class='login'>请完成微信授权以继续使用</view>
<button class='btn-login' open-type="getUserInfo" bindgetuserinfo='getUserInfo'>
<view class='img-w'></view>
<image src='/images/icon/weixin-w.png' class='img-w'></image>
<view class='text'>微信快捷登录</view>
</button>
<view class="cancel" bindtap="goBack">取消</view>
Expand Down
2 changes: 0 additions & 2 deletions pages/app-auth/index.wxss
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,6 @@
.img-w{
height: 40rpx;
width: 40rpx;
background: url('http://lucky-icon.meiweiyuxian.com/hio/weixin-w.png') no-repeat;
background-size: 40rpx;
}

.text{
Expand Down
107 changes: 56 additions & 51 deletions pages/cart/cart.wxml
Original file line number Diff line number Diff line change
@@ -1,53 +1,58 @@
<view class='container'>
<view class="goodsList" wx:if="{{cartGoods.length > 0}}">
<view class="a-goods {{item.isTouchMove ? 'touch-move-active' : ''}}" wx:for="{{cartGoods}}" wx:key="id" bindtouchstart="touchstart" bindtouchmove="touchmove" data-index="{{index}}">
<view class='content'>
<view wx:if="{{item.number >0 && item.is_on_sale == 1}}" class="checkbox {{item.checked ? 'checked' : ''}}" bindtap="checkedItem" data-item-index="{{index}}"></view>
<view wx:else class="checkbox"></view>
<view class="goods-info">
<navigator class="goods-url" hover-class="none" url="/pages/goods/goods?id={{item.goods_id}}">
<view class="img-box">
<image src="{{item.list_pic_url}}" class="img" />
</view>
<view class="text-box">
<view class="{{item.number >0 && item.is_on_sale == 1?'goods-title':'out-stock-title'}}">{{item.goods_name}}</view>
<view class="goods-label">{{item.goods_specifition_name_value}}</view>
<view class="goods-price">
<view class='price-now'>¥{{item.retail_price}}</view>
</view>
<view class="selnum" wx:if="{{item.number > 0 && item.is_on_sale == 1}}">
<view data-item-index="{{index}}" class="cut" catchtap="cutNumber">-</view>
<input value="{{item.number}}" class="number" disabled="true" type="number" />
<view data-item-index="{{index}}" class="add" catchtap="addNumber" disabled='{{disabled}}'>+</view>
</view>
<view wx:else class="out-stock">暂时缺货</view>
</view>
</navigator>
</view>
</view>
<view class="delete-btn" data-item-index="{{index}}" catchtap="deleteGoods">
删除
</view>
</view>
</view>
<view class="cart-empty-container {{hasCartGoods == 0?'show':''}}">
<view class='cart-empty-view'>
<image class='cart-empty' src='http://lucky-icon.meiweiyuxian.com/hio/cart-empty.png'></image>
</view>
<view class='cart-empty-txt'>车里什么都没有,快去买一点吧</view>
<view class="to-index-btn" bindtap="toIndexPage">
去逛逛
</view>
<!-- <view class="to-index-btn" bindtap="test">
测试
</view> -->
</view>
<view class="settle-box" wx:if="{{cartGoods.length > 0}}">
<view class="left-price">
<view class="all-selected {{checkedAllStatus ? 'checked' : ''}}" bindtap="checkedAll">全选({{cartTotal.checkedGoodsCount}})</view>
<view class="total" hidden="">合计:¥{{cartTotal.checkedGoodsAmount}}</view>
</view>
<view class="to-pay-btn" hidden="" bindtap="checkoutOrder">去结算</view>
<!-- <view class="to-pay-btn" hidden="" bindtap="test">去结算</view> -->
</view>
<view class="goodsList" wx:if="{{cartGoods.length > 0}}">
<view class="a-goods {{item.isTouchMove ? 'touch-move-active' : ''}}" wx:for="{{cartGoods}}" wx:key="id" bindtouchstart="touchstart" bindtouchmove="touchmove" data-index="{{index}}">
<view class='content'>
<view wx:if="{{item.number >0 && item.is_on_sale == 1}}" class="checkbox" bindtap="checkedItem" data-item-index="{{index}}">
<image wx:if="{{item.checked == 1}}" class="checkbox-img" src="/images/icon/gou-red.png"></image>
<image wx:else class="checkbox-img" src="/images/icon/gou-gray.png"></image>
</view>
<image src="/images/icon/gou-gray.png" wx:else class="checkbox"></image>
<view class="goods-info">
<navigator class="goods-url" hover-class="none" url="/pages/goods/goods?id={{item.goods_id}}">
<view class="img-box">
<image src="{{item.list_pic_url}}" class="img" />
</view>
<view class="text-box">
<view class="{{item.number >0 && item.is_on_sale == 1?'goods-title':'out-stock-title'}}">{{item.goods_name}}</view>
<view class="goods-label">{{item.goods_specifition_name_value}}</view>
<view class="goods-price">
<view class='price-now'>¥{{item.retail_price}}</view>
</view>
<view class="selnum" wx:if="{{item.number > 0 && item.is_on_sale == 1}}">
<view data-item-index="{{index}}" class="cut" catchtap="cutNumber">-</view>
<input value="{{item.number}}" class="number" disabled="true" type="number" />
<view data-item-index="{{index}}" class="add" catchtap="addNumber" disabled='{{disabled}}'>+</view>
</view>
<view wx:else class="out-stock">暂时缺货</view>
</view>
</navigator>
</view>
</view>
<view class="delete-btn" data-item-index="{{index}}" catchtap="deleteGoods">
删除
</view>
</view>
</view>
<view class="cart-empty-container {{hasCartGoods == 0?'show':''}}">
<view class='cart-empty-view'>
<image class='cart-empty' src='/images/icon/cart-empty.png'></image>
</view>
<view class='cart-empty-txt'>车里什么都没有,快去买一点吧</view>
<view class="to-index-btn" bindtap="toIndexPage">
去逛逛
</view>
</view>
<view class="settle-box" wx:if="{{cartGoods.length > 0}}">
<view class="left-price">
<view class="all-selected" bindtap="checkedAll">
<image class="checkbox" wx:if="{{checkedAllStatus}}" src="/images/icon/gou-red.png"></image>
<image class="checkbox" wx:else src="/images/icon/gou-gray.png"></image>
<view class="text">全选({{cartTotal.checkedGoodsCount}})
</view>
</view>
<view class="total" hidden="">合计:¥{{cartTotal.checkedGoodsAmount}}</view>
</view>
<view class="to-pay-btn" hidden="" bindtap="checkoutOrder">去结算</view>
<!-- <view class="to-pay-btn" hidden="" bindtap="test">去结算</view> -->
</view>
</view>
24 changes: 12 additions & 12 deletions pages/cart/cart.wxss
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,13 @@ page {
.a-goods .checkbox {
display: block;
height: 40rpx;
width: 40rpx;
min-width: 40rpx;
padding: 100rpx 40rpx;
background: url(http://lucky-icon.meiweiyuxian.com/hio/gou-gray.png) no-repeat center;
background-size: 40rpx auto;
}

.a-goods .checked {
background: url(http://lucky-icon.meiweiyuxian.com/hio/gou-red.png) no-repeat center;
background-size: 40rpx auto;
.a-goods .checkbox .checkbox-img{
height: 40rpx;
width: 40rpx;
}

.goods-info {
Expand Down Expand Up @@ -353,15 +351,17 @@ button::after {
}

.settle-box .all-selected {
padding-left: 90rpx;
padding-left: 40rpx;
color: #000;
background: url(http://lucky-icon.meiweiyuxian.com/hio/gou-gray.png) no-repeat 24rpx center;
background-size: 40rpx auto;
display: flex;
justify-content: flex-start;
align-items: center;
}

.settle-box .all-selected.checked {
background: url(http://lucky-icon.meiweiyuxian.com/hio/gou-red.png) no-repeat 24rpx center;
background-size: 40rpx auto;
.settle-box .all-selected .checkbox{
width: 40rpx;
height: 40rpx;
margin-right: 20rpx;
}

.settle-box .total {
Expand Down
6 changes: 3 additions & 3 deletions pages/category/index.wxml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<view class="container">
<view class="search">
<navigator url="/pages/search/search" class="input">
<image class="icon"></image>
<image class="icon" src="/images/icon/search.png"></image>
<text class="txt">搜索, 共{{goodsCount}}款好味</text>
</navigator>
</view>
Expand All @@ -28,7 +28,7 @@
<block wx:if="{{item.goods_number <= 0}}">
<!-- <view class='no-goods-mask'></view> -->
<view class='sold-img'>
<image class='soldout' src='http://lucky-icon.meiweiyuxian.com/hio/sold-out.png'></image>
<image class='soldout' src='/images/icon/sold-out.png'></image>
</view>
</block>
</view>
Expand All @@ -49,7 +49,7 @@
</block>
<block wx:else>
<view class="loading-wrap">
<image class="img" src="http://lucky-icon.meiweiyuxian.com/hio/loading2.gif"></image>
<image class="img" src="/images/icon/loading.gif"></image>
<view class="text">正在加载...</view>
</view>
</block>
Expand Down
2 changes: 0 additions & 2 deletions pages/category/index.wxss
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ page {
}

.search .icon {
background: url(http://lucky-icon.meiweiyuxian.com/hio/search.png) center no-repeat;
background-size: 100%;
width: 30rpx;
height: 30rpx;
}
Expand Down
14 changes: 12 additions & 2 deletions pages/goods/goods.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ Page({
loading: 0,
current: 0,
showShareDialog:0,
userInfo:{},
autoplay:true
},
hideDialog: function (e) {
let that = this;
Expand All @@ -47,7 +49,6 @@ Page({
});
}
},

createShareImage: function () {
let id = this.data.id;
wx.navigateTo({
Expand Down Expand Up @@ -148,6 +149,9 @@ Page({
});
wx.setStorageSync('goodsImage', res.data.info.https_pic_url);
}
else{
util.showErrorToast(res.errmsg)
}
});
},
clickSkuValue: function(event) {
Expand Down Expand Up @@ -330,7 +334,8 @@ Page({
let userId = userInfo.id;
if (userId > 0) {
this.setData({
userId: userId
userId: userId,
userInfo: userInfo,
});
}
this.setData({
Expand All @@ -340,6 +345,11 @@ Page({
this.getGoodsInfo();
this.getCartCount();
},
onHide:function(){
this.setData({
autoplay:false
})
},
getCartCount: function() {
let that = this;
util.request(api.CartGoodsCount).then(function(res) {
Expand Down
21 changes: 11 additions & 10 deletions pages/goods/goods.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -6,22 +6,22 @@
<view class='current-mask'></view>
<view class='current-content'>
<view class='icon'>
<image class='img' src='http://lucky-icon.meiweiyuxian.com/hio/img-icon.png'></image>
<image class='img' src='/images/icon/img-icon.png'></image>
</view>
<view class='num'>{{current + 1}}/{{gallery.length}}</view>
</view>
</view>
</view>
<block wx:if="{{gallery.length > 0}}">
<swiper bindchange="bindchange" class="banner banner-style1" indicator-dots="{{false}}" autoplay="{{false}}" current="{{current}}" circular="{{true}}" interval="4000" duration="1000" display-multiple-items="1">
<swiper bindchange="bindchange" class="banner banner-style1" indicator-dots="{{false}}" autoplay="{{autoplay}}" current="{{current}}" circular="{{true}}" interval="3000" duration="1000" display-multiple-items="1">
<swiper-item class="item" wx:for="{{gallery}}" wx:key="id">
<image bindtap="previewImage" data-src="{{item.img_url}}" src="{{item.img_url}}" class="slide-image" mode="aspectFill" />
</swiper-item>
</swiper>
</block>
<block wx:else>
<view class='no-image'>
<image class='img' src='http://lucky-icon.meiweiyuxian.com/hio/no-img.png'></image>
<image class='img' src='/images/icon/no-img.png'></image>
</view>
</block>
</view>
Expand All @@ -32,7 +32,7 @@
</view>
<view class='r'>
<view bindtap="shareTo" class='share'>
<image class='icon' src='http://lucky-icon.meiweiyuxian.com/hio/share.png'></image>
<image class='icon' src='/images/icon/share.png'></image>
<view class='text'>分享</view>
</view>
</view>
Expand All @@ -49,8 +49,9 @@
<view class='sales'>已售{{goods.sell_volume}}份</view>
</view>
</view>
<view class='section-nav arrow-right' bindtap="switchAttrPop">
<view class='section-nav' bindtap="switchAttrPop">
<view class="t">{{checkedSpecText}}</view>
<view class="arrow"></view>
</view>
<view class='details-wrap'>
<view class="title">商品详情</view>
Expand All @@ -65,7 +66,7 @@
<view class="attr-pop-box" hidden="{{!openAttr}}" bindtap='closeAttr'>
<view class="attr-pop" catchtap="handleTap">
<view class="close" catchtap="closeAttr">
<image class="icon" src="http://lucky-icon.meiweiyuxian.com/hio/icon-close.png"></image>
<image class="icon" src="/images/icon/icon-close.png"></image>
</view>
<view class="img-info">
<view class="img-wrap">
Expand Down Expand Up @@ -121,7 +122,7 @@
</form>
</view>
<button class='left-icon contact-button' session-from='{"nickName":"{{userInfo.nickname}}","avatarUrl":"{{userInfo.avatar}}"}' open-type="contact" show-message-card="true" hover-class="none">
<image class='icon' src='http://lucky-icon.meiweiyuxian.com/hio/chat.png'></image>
<image class='icon' src='/images/icon/chat.png'></image>
<view class='icon-text'>客服</view>
</button>
<view class="left-icon" bindtap='openCartPage'>
Expand Down Expand Up @@ -154,11 +155,11 @@
<view class='content'>
<view class="share-block">
<button class='block share-btn' hover-class="none" open-type='share'>
<image class="img" src="http://lucky-icon.meiweiyuxian.com/hio/weixin.png"></image>
<image class="img" src="/images/icon/weixin.png"></image>
<view class="text">发给好友/发到微信群</view>
</button>
<view class="block" catchtap="createShareImage">
<image class="img" src="http://lucky-icon.meiweiyuxian.com/hio/pyq.png"></image>
<image class="img" src="/images/icon/pyq.png"></image>
<view class="text">保存分享图发朋友圈</view>
</view>
</view>
Expand All @@ -169,6 +170,6 @@
</view>
</view>
<view class="loading" style="height:{{sysHeight}}px" wx:else>
<image class="img" src="http://lucky-icon.meiweiyuxian.com/hio/loading2.gif"></image>
<image class="img" src="/images/icon/loading.gif"></image>
<view class="text">海风吹啊吹</view>
</view>
16 changes: 10 additions & 6 deletions pages/goods/goods.wxss
Original file line number Diff line number Diff line change
Expand Up @@ -360,14 +360,16 @@
.section-nav {
width: 100%;
height: 100rpx;
padding-left: 24rpx;
padding: 0 24rpx;
font-size: 30rpx;
line-height: 100rpx;
color: #233445;
background: #fff;
display: flex;
justify-content: flex-start;
justify-content: space-between;
align-items: center;
margin: 24rpx 0;
box-sizing: border-box;
/* border-bottom: 1rpx solid #eee; */
}

Expand All @@ -376,10 +378,12 @@
color: #333;
}

.arrow-right {
background: url(http://lucky-icon.meiweiyuxian.com/hio/arrow-right.png) no-repeat 710rpx center;
background-size: 16rpx auto, 750rpx auto;
background-color: #fff;
.arrow {
width: 10rpx;
height: 10rpx;
border-top: 4rpx solid #ccc;
border-right: 4rpx solid #ccc;
transform: rotate(45deg);
}

.details-wrap {
Expand Down
Loading

0 comments on commit 972d64d

Please sign in to comment.