Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Z
zhqg-mini
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zhqg
zhqg-mini
Commits
8dadca82
Commit
8dadca82
authored
Oct 14, 2020
by
wangyalan-git
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
确认订单添加支付方式/图标更换
parent
782cfed3
Hide whitespace changes
Inline
Side-by-side
Showing
15 changed files
with
128 additions
and
39 deletions
+128
-39
app.js
app.js
+27
-0
WeChat@2x.png
images/icon/WeChat@2x.png
+0
-0
cash@2x.png
images/icon/cash@2x.png
+0
-0
logo.jpg
images/icon/logo.jpg
+0
-0
index.js
pages/index/index.js
+19
-14
index.json
pages/index/index.json
+2
-1
index.wxml
pages/index/index.wxml
+2
-2
login.wxml
pages/login/login.wxml
+2
-2
orderList.js
pages/orderList/orderList.js
+0
-1
prod.js
pages/prod/prod.js
+6
-2
submit-order.js
pages/submit-order/submit-order.js
+10
-3
submit-order.wxml
pages/submit-order/submit-order.wxml
+33
-4
submit-order.wxss
pages/submit-order/submit-order.wxss
+23
-6
user.js
pages/user/user.js
+3
-3
config.js
utils/config.js
+1
-1
No files found.
app.js
View file @
8dadca82
...
...
@@ -12,7 +12,34 @@ App({
}
}
})
this
.
overShare
()
},
//重写分享方法
overShare
:
function
()
{
//监听路由切换
//间接实现全局设置分享内容
wx
.
onAppRoute
(
function
(
res
)
{
//获取加载的页面
let
pages
=
getCurrentPages
(),
//获取当前页面的对象
view
=
pages
[
pages
.
length
-
1
],
data
;
if
(
view
)
{
data
=
view
.
data
;
console
.
log
(
'是否重写分享方法'
,
data
.
isOverShare
);
if
(
!
data
.
isOverShare
)
{
data
.
isOverShare
=
true
;
view
.
onShareAppMessage
=
function
()
{
//你的分享配置
return
{
title
:
'中厦全供'
,
path
:
'/pages/index/index'
};
}
}
}
})
},
globalData
:
{
// 定义全局请求队列
requestQueue
:
[],
...
...
images/icon/WeChat@2x.png
0 → 100644
View file @
8dadca82
1.69 KB
images/icon/cash@2x.png
0 → 100644
View file @
8dadca82
1.98 KB
images/icon/logo.jpg
0 → 100644
View file @
8dadca82
49.1 KB
pages/index/index.js
View file @
8dadca82
...
...
@@ -19,24 +19,24 @@ Page({
sts
:
0
,
},
//事件处理函数
bindViewTap
:
function
()
{
bindViewTap
:
function
()
{
wx
.
navigateTo
({
url
:
'../logs/logs'
})
},
onLoad
:
function
()
{
onLoad
:
function
()
{
this
.
getAllData
();
},
// 页面滚动到指定位置指定元素固定在顶部
onPageScroll
:
function
(
e
)
{
//监听页面滚动
onPageScroll
:
function
(
e
)
{
//监听页面滚动
this
.
setData
({
scrollTop
:
e
.
scrollTop
})
},
toProdPage
:
function
(
e
)
{
toProdPage
:
function
(
e
)
{
var
prodid
=
e
.
currentTarget
.
dataset
.
prodid
;
if
(
prodid
)
{
wx
.
navigateTo
({
...
...
@@ -45,22 +45,22 @@ Page({
}
},
toCouponCenter
:
function
()
{
toCouponCenter
:
function
()
{
wx
.
showToast
({
icon
:
"none"
,
title
:
'
该功能未开源
'
icon
:
"none"
,
title
:
'
正在开发中
'
})
},
// 跳转搜索页
toSearchPage
:
function
()
{
toSearchPage
:
function
()
{
wx
.
navigateTo
({
url
:
'/pages/search-page/search-page'
,
})
},
//跳转商品活动页面
toClassifyPage
:
function
(
e
)
{
toClassifyPage
:
function
(
e
)
{
var
url
=
'/pages/prod-classify/prod-classify?sts='
+
e
.
currentTarget
.
dataset
.
sts
;
var
id
=
e
.
currentTarget
.
dataset
.
id
;
var
title
=
e
.
currentTarget
.
dataset
.
title
;
...
...
@@ -73,13 +73,13 @@ Page({
},
//跳转公告列表页面
onNewsPage
:
function
()
{
onNewsPage
:
function
()
{
wx
.
navigateTo
({
url
:
'/pages/recent-news/recent-news'
,
})
},
onShow
:
function
()
{
onShow
:
function
()
{
wx
.
getSetting
({
success
(
res
)
{
if
(
!
res
.
authSetting
[
'scope.userInfo'
])
{
...
...
@@ -167,7 +167,12 @@ Page({
};
http
.
request
(
param
);
},
/**
* 用户点击右上角分享
*/
onShareAppMessage
:
function
()
{
},
/**
* 页面相关事件处理函数--监听用户下拉动作
*/
...
...
@@ -184,13 +189,13 @@ Page({
// })
// },
onPullDownRefresh
:
function
()
{
onPullDownRefresh
:
function
()
{
// wx.showNavigationBarLoading() //在标题栏中显示加载
//模拟加载
var
ths
=
this
;
setTimeout
(
function
()
{
setTimeout
(
function
()
{
ths
.
getAllData
();
...
...
@@ -205,7 +210,7 @@ Page({
/**
* 跳转至商品详情
*/
showProdInfo
:
function
(
e
)
{
showProdInfo
:
function
(
e
)
{
let
relation
=
e
.
currentTarget
.
dataset
.
relation
;
if
(
relation
)
{
wx
.
navigateTo
({
...
...
pages/index/index.json
View file @
8dadca82
...
...
@@ -2,5 +2,5 @@
"backgroundTextStyle"
:
"dark"
,
"navigationBarTextStyle"
:
"black"
,
"enablePullDownRefresh"
:
true
,
"navigationBarTitleText"
:
"
亚米科技mall4j
"
"navigationBarTitleText"
:
"
中厦全供
"
}
\ No newline at end of file
pages/index/index.wxml
View file @
8dadca82
...
...
@@ -12,7 +12,7 @@
<view class='content'>
<!-- swiper -->
<swiper autoplay="{{autoplay}}" indicator-color="{{indicatorColor}}" interval="{{interval}}" duration="{{duration}}" indicator-active-color="{{indicatorActiveColor}} " circular='true' class='pic-swiper' indicator-dots previous-margin='20rpx' next-margin='20rpx'>
<block wx:for='{{indexImgs}}' wx:key=''>
<block wx:for='{{indexImgs}}' wx:key='
index
'>
<swiper-item class="banner-item">
<view class='img-box'>
<image src='{{item.imgUrl}}' data-prodid='{{item.relation}}' bindtap='toProdPage' class='banner'></image>
...
...
@@ -45,7 +45,7 @@
<view class='message-play' bindtap='onNewsPage'>
<image src='../../images/icon/horn.png' class='hornpng'></image>
<swiper vertical='true' autoplay='true' duration='1000' class='swiper-cont'>
<block wx:for='{{news}}' wx:key=''>
<block wx:for='{{news}}' wx:key='
index
'>
<swiper-item class="items">{{item.title}}</swiper-item>
</block>
</swiper>
...
...
pages/login/login.wxml
View file @
8dadca82
<!--pages/login/login.wxml-->
<image src='
http://img-test.gz-yami.com/mini
/logo.jpg' class='c-logo'></image>
<view class="title">
亚米科技mall4j
</view>
<image src='
/images/icon
/logo.jpg' class='c-logo'></image>
<view class="title">
中厦全供
</view>
<view class="msg">申请获得你的公开信息(昵称、头像等)</view>
<button color="#eb2444" open-type="getUserInfo" lang = "zh_CN" bindgetuserinfo = "onGotUserInfo" class=''>微信授权</button>
pages/orderList/orderList.js
View file @
8dadca82
...
...
@@ -144,7 +144,6 @@ Page({
title
:
''
,
content
:
'要取消此订单?'
,
confirmColor
:
"#3e62ad"
,
cancelColor
:
"#3e62ad"
,
cancelText
:
'否'
,
confirmText
:
'是'
,
success
(
res
)
{
...
...
pages/prod/prod.js
View file @
8dadca82
...
...
@@ -50,7 +50,8 @@ Page({
},
littleCommPage
:
[],
evaluate
:
-
1
,
isCollection
:
false
isCollection
:
false
,
isOverShare
:
true
},
/**
...
...
@@ -403,7 +404,10 @@ Page({
* 用户点击右上角分享
*/
onShareAppMessage
:
function
()
{
// return {
// title: "商品详情分享",
// path:`/pages/prod/prod`
// }
},
/**
...
...
pages/submit-order/submit-order.js
View file @
8dadca82
...
...
@@ -24,7 +24,9 @@ Page({
transfee
:
0
,
reduceAmount
:
0
,
remark
:
""
,
couponIds
:
[]
couponIds
:
[],
payType
:
1
,
balance
:
100
},
/**
...
...
@@ -99,9 +101,14 @@ Page({
http
.
request
(
params
);
},
payTypeChange
(
e
){
console
.
log
(
e
.
detail
.
value
)
this
.
setData
({
payType
:
e
.
detail
.
value
})
},
/**
* 优惠券选择出错处理方法
* 优
e.detail.value
惠券选择出错处理方法
*/
chooseCouponErrHandle
(
res
)
{
// 优惠券不能共用处理方法
...
...
pages/submit-order/submit-order.wxml
View file @
8dadca82
...
...
@@ -39,8 +39,8 @@
<view class='prod-info-cont'>{{item.skuName}}</view>
<view class='price-nums'>
<text class='prodprice'><text class='symbol'>¥</text>
<text class='big-num'>{{wxs.parsePrice(item.price)[0]}}</text>
<text class='small-num'>.{{wxs.parsePrice(item.price)[1]}}</text></text>
<text class='big-num'>{{wxs.parsePrice(item.price)[0]}}</text>
<text class='small-num'>.{{wxs.parsePrice(item.price)[1]}}</text></text>
<text class="prodcount">x{{item.prodCount}}</text>
</view>
</view>
...
...
@@ -127,6 +127,33 @@
</view>
</view>
</view>
<!-- 支付方式 -->
<view class="order-msg">
<radio-group class="msg-item" bindchange="payTypeChange">
<view class="item flex">
<view class="flex-left">
<image class="pay-icon" src="/images/icon/WeChat@2x.png" mode="widthFix"></image>
<text class='item-tit'>微信支付</text>
</view>
<view class="btn">
<label>
<radio value="1" checked="{{payType == 1}}" color="#eb2444" />
</label>
</view>
</view>
<view class="item flex">
<view class="flex-left">
<image class="pay-icon" src="/images/icon/cash@2x.png" mode="widthFix"></image>
<text class='item-tit'>余额支付({{balance}}元)</text>
</view>
<view class="btn">
<label>
<radio value="3" checked="{{payType == 3}}" disabled="{{!balance}}" color="#eb2444" />
</label>
</view>
</view>
</radio-group>
</view>
</view>
...
...
@@ -156,8 +183,10 @@
<text class="close" bindtap='closePopup'></text>
</view>
<view class="coupon-tabs">
<view class="coupon-tab {{couponSts==1?'on':''}}" bindtap='changeCouponSts' data-sts='1'>可用优惠券({{coupons.canUseCoupons.length}})</view>
<view class="coupon-tab {{couponSts==2?'on':''}}" bindtap='changeCouponSts' data-sts='2'>不可用优惠券({{coupons.unCanUseCoupons.length}})</view>
<view class="coupon-tab {{couponSts==1?'on':''}}" bindtap='changeCouponSts' data-sts='1'>
可用优惠券({{coupons.canUseCoupons.length}})</view>
<view class="coupon-tab {{couponSts==2?'on':''}}" bindtap='changeCouponSts' data-sts='2'>
不可用优惠券({{coupons.unCanUseCoupons.length}})</view>
</view>
<view class='popup-cnt'>
<block wx:for="{{coupons.canUseCoupons}}" wx:if="{{couponSts == 1}}" wx:key="couponId">
...
...
pages/submit-order/submit-order.wxss
View file @
8dadca82
...
...
@@ -7,7 +7,7 @@ page {
/* 收货地址 */
.submit-order {
margin-bottom: 1
0
0rpx;
margin-bottom: 1
2
0rpx;
}
.submit-order .delivery-addr {
...
...
@@ -219,7 +219,7 @@ page {
word-break: break-all;
}
.prod-item
.total-num {
.prod-item .total-num {
text-align: right;
padding: 20rpx 30rpx;
font-size: 28rpx;
...
...
@@ -230,7 +230,7 @@ page {
bottom: 0;
}
.prod-item
.price-nums .prodcount {
.prod-item .price-nums .prodcount {
position: absolute;
bottom: 5rpx;
right: 0;
...
...
@@ -272,6 +272,22 @@ page {
align-items: center;
}
.order-msg .msg-item .flex {
display: flex;
align-items: center;
justify-content: space-between;
}
.order-msg .msg-item .flex .flex-left {
display: flex;
align-items: center;
}
.order-msg .msg-item .flex .pay-icon {
width: 40rpx;
margin-right: 10rpx;
}
.order-msg .msg-item .item.payment {
border-top: 2rpx solid #f1f1f1;
color: #eb2444;
...
...
@@ -304,7 +320,7 @@ page {
flex: 1;
}
.order-msg .msg-item .item
.coupon-btn {
.order-msg .msg-item .item .coupon-btn {
display: block;
margin: 0 30rpx;
line-height: 28rpx;
...
...
@@ -477,7 +493,7 @@ page {
/*checkbox 选项框大小 */
checkbox .wx-checkbox-input
{
checkbox .wx-checkbox-input
, radio .wx-radio-input
{
border-radius: 50%;
width: 35rpx;
height: 35rpx;
...
...
@@ -499,4 +515,4 @@ checkbox .wx-checkbox-input.wx-checkbox-input-checked::before {
background: transparent;
transform: translate(-50%, -50%) scale(1);
-webkit-transform: translate(-50%, -50%) scale(1);
}
}
\ No newline at end of file
pages/user/user.js
View file @
8dadca82
...
...
@@ -88,21 +88,21 @@ Page({
toDistCenter
:
function
()
{
wx
.
showToast
({
icon
:
"none"
,
title
:
'
该功能未开源
'
title
:
'
正在开发中
'
})
},
toCouponCenter
:
function
()
{
wx
.
showToast
({
icon
:
"none"
,
title
:
'
该功能未开源
'
title
:
'
正在开发中
'
})
},
toMyCouponPage
:
function
()
{
wx
.
showToast
({
icon
:
"none"
,
title
:
'
该功能未开源
'
title
:
'
正在开发中
'
})
},
...
...
utils/config.js
View file @
8dadca82
var
domain
=
"http://192.168.31.10
9:8086
"
;
//统一接口域名,测试环境
var
domain
=
"http://192.168.31.10
5:8086/capi
"
;
//统一接口域名,测试环境
exports
.
domain
=
domain
;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment