Commit 6c9dbda5 by TengFengLian

Merge branch 'master' of http://120.77.182.185/yanl/mini-shimao

* 'master' of http://120.77.182.185/yanl/mini-shimao:
  LL - 服务首页
  MM-订单详情
  LL - 用户信息缓存逻辑
  LL - 增加用户登录判断
parents 6c022890 4d7acd0e
......@@ -48,25 +48,25 @@ App({
wxRequest: function (obj) {
var token = this.globalData.token
var param = obj.data ? JSON.stringify(obj.data) : ""
var param = obj.data ? JSON.stringify(obj.data) : ''
var header = obj.header ? obj.header : { 'token': token || '', }
wx.request({
url: this.globalData.baseUrl + obj.url,
data: param,
method: obj.method || "POST",
method: obj.method || 'POST',
header: header,
success: (res) => {
// console.log("接口:", this.globalData.baseUrl + obj.url);
// console.log("参数:", JSON.stringify(obj.data));
// console.log("返回:", res);
let code = res.data.code * 1;
let code = res.data.code * 1
if (200 == code && true == res.data.success) {
if (obj.success) {
obj.success(res.data)
}
} else if (402 == code) { // token失效
} else if (402 == code) {
this.refreshToken({
success: () => {
this.wxRequest(obj)
......@@ -87,9 +87,9 @@ App({
}
},
fail: (err) => {
console.log("接口:", this.globalData.baseUrl + obj.url)
console.log("参数:", obj.data)
console.log("返回:", err)
// console.log("接口:", this.globalData.baseUrl + obj.url)
// console.log("参数:", obj.data)
// console.log("返回:", err)
if (obj.fail) {
let err = {
statusCode: 9999,
......@@ -108,6 +108,12 @@ App({
});
},
/**
* 登录
* @function
* @param
* @returns
*/
login: function (obj) {
let token = this.globalData.token
if (token) {
......@@ -122,8 +128,6 @@ App({
url: '/api/v1/login/getSmallSession?code=' + res.code,
method: 'GET',
success: (response) => {
console.log(response)
let funcResponse = response.data
this.globalData.token = funcResponse.token
this.globalData.refreshToken = funcResponse.refreshToken
......@@ -139,6 +143,15 @@ App({
'birthday': funcResponse.birthday,
'sex': funcResponse.sex,
'userType': Number(funcResponse.userType),
'status': '', // 只有游客身份该值为 ''
'isSignIn': false,
}
// 以返回信息中是否包含手机号码判断用户是否注册过
console.log(funcUserInfo.phone)
if (funcUserInfo.phone) {
funcUserInfo.isSignIn = true
this.queryUserStatus()
}
wx.setStorageSync('userInfo', funcUserInfo)
......@@ -153,6 +166,12 @@ App({
}
},
/**
* 注册
* @function
* @param {number} - funcAmountValue 金额,单位分
* @returns
*/
registUserInfo: function (obj) {
this.wxRequest({
url: '/api/v1/login/getDecryptData',
......@@ -170,6 +189,58 @@ App({
})
},
/**
* 查询用户认证状态
* 尽在用户已经注册的前提下会查询此函数
* @function
* @param
* @returns
*/
queryUserStatus: function () {
this.wxRequest({
url: '/api/v1/userAuth/getAuth',
method: 'GET',
success: (response) => {
let funcResponse = response.data
let funcUserInfo = wx.getStorageSync('userInfo')
let funcStatus = Number(funcResponse.state)
let funcStatusText = '去认证'
switch (funcStatus) {
// 正在审核
case 0:
funcStatusText = '审核中'
funcUserInfo.status = funcStatus
funcUserInfo.userType = 0
break
// 通过
case 1:
funcStatusText = '审核通过 '
funcUserInfo.status = funcStatus
funcUserInfo.userType = 1
break
// 拒绝
case 2:
funcStatusText = '审核失败'
funcUserInfo.status = funcStatus
funcUserInfo.userType = 0
break
}
wx.setStorageSync('userInfo', funcUserInfo)
}
})
},
/**
* 刷新令牌
* @function
* @param
* @returns
*/
refreshToken: function (obj) {
this.wxRequest({
url: '/api/v1/login/refreshToken',
......@@ -189,5 +260,5 @@ App({
}
}
})
}
},
})
\ No newline at end of file
......@@ -14,14 +14,16 @@ let Development = {
],
// 门店信息
// appId 程序内部交互确定门店
// id 数据库门店 id
shopId: [
{ appId: 1, id: '581be62a80bb4f0485abd87abcf64dc0', logo: 'shop/logo-1.png', cover: 'shop/cover-1.png', name: '海错图', title: ['海错图', '海错图购票', '海错图', '海错图文创店', '海错图', '海错图', '海错图'] },
{ appId: 2, id: '3cfe2e3b8b4342e8b62f8b45daf60d91', logo: 'shop/logo-2.png', cover: 'shop/cover-2.png', name: '星空影院', title: ['星空影院', '星空影院', '星空影院', '星空影院', '星空影院', '星空影院', '星空影院'] },
{ appId: 3, id: '8a3e59c57f564c569b3d7bb278ea50b3', logo: 'shop/logo-3.png', cover: 'shop/cover-3.png', name: '儿童营地', title: ['儿童营地', '儿童营地入园购票', '儿童营地', '儿童营地', '儿童营地', '儿童营地接待区', '儿童营地'] },
{ appId: 4, id: 'c63893bb472f43bca4ec72f890bcb4fd', logo: 'shop/logo-4.png', cover: 'shop/cover-4.png', name: '原野MOJITO', title: ['原野MOJITO', '原野MOJITO', '原野MOJITO', '原野MOJITO', '原野MOJITO', '原野MOJITO', '原野MOJITO'] },
{ appId: 5, id: '26c40446fc454a02abe61758176597f6', logo: 'shop/logo-5.png', cover: 'shop/cover-5.png', name: '拾光花坊', title: ['拾光花坊', '拾光花坊', '拾光花坊', '拾光花坊', '拾光花坊', '拾光花坊', '拾光花坊'] },
{ appId: 6, id: 'd9436d7018de43809824b6ec221ea01f', logo: 'shop/logo-6.png', cover: 'shop/cover-6.png', name: '原味舒食', title: ['原味舒食', '原味舒食', '原味舒食', '原味舒食', '原味舒食', '原味舒食', '原味舒食'] },
{ appId: 7, id: '2614f117406548718bc091f24368c16e', logo: 'shop/logo-7.png', cover: 'shop/cover-7.png', name: '元养水韵SPA', title: ['元养水韵SPA', '元养水韵SPA', '元养水韵SPA', '元养水韵SPA', '元养水韵SPA', '元养水韵SPA', '元养水韵SPA'] },
{ appId: 1, id: '581be62a80bb4f0485abd87abcf64dc0', logo: 'shop/logo-1.png', commodityLogo: 'shop/commodity-logo-1.png', cover: 'shop/cover-1.png', name: '海错图', title: ['海错图', '海错图购票', '海错图', '海错图文创店', '海错图', '海错图', '海错图'] },
{ appId: 2, id: '3cfe2e3b8b4342e8b62f8b45daf60d91', logo: 'shop/logo-2.png', commodityLogo: 'shop/commodity-logo-2.png', cover: 'shop/cover-2.png', name: '星空影院', title: ['星空影院', '星空影院', '星空影院', '星空影院', '星空影院', '星空影院', '星空影院'] },
{ appId: 3, id: '8a3e59c57f564c569b3d7bb278ea50b3', logo: 'shop/logo-3.png', commodityLogo: 'shop/commodity-logo-3.png', cover: 'shop/cover-3.png', name: '儿童营地', title: ['儿童营地', '儿童营地入园购票', '儿童营地', '儿童营地', '儿童营地', '儿童营地接待区', '儿童营地'] },
{ appId: 4, id: 'c63893bb472f43bca4ec72f890bcb4fd', logo: 'shop/logo-4.png', commodityLogo: 'shop/commodity-logo-4.png', cover: 'shop/cover-4.png', name: '原野MOJITO', title: ['原野MOJITO', '原野MOJITO', '原野MOJITO', '原野MOJITO', '原野MOJITO', '原野MOJITO', '原野MOJITO'] },
{ appId: 5, id: '26c40446fc454a02abe61758176597f6', logo: 'shop/logo-5.png', commodityLogo: 'shop/commodity-logo-5.png', cover: 'shop/cover-5.png', name: '拾光花坊', title: ['拾光花坊', '拾光花坊', '拾光花坊', '拾光花坊', '拾光花坊', '拾光花坊', '拾光花坊'] },
{ appId: 6, id: 'd9436d7018de43809824b6ec221ea01f', logo: 'shop/logo-6.png', commodityLogo: 'shop/commodity-logo-6.png', cover: 'shop/cover-6.png', name: '原味舒食', title: ['原味舒食', '原味舒食', '原味舒食', '原味舒食', '原味舒食', '原味舒食', '原味舒食'] },
{ appId: 7, id: '2614f117406548718bc091f24368c16e', logo: 'shop/logo-7.png', commodityLogo: 'shop/commodity-logo-7.png', cover: 'shop/cover-7.png', name: '元养水韵SPA', title: ['元养水韵SPA', '元养水韵SPA', '元养水韵SPA', '元养水韵SPA', '元养水韵SPA', '元养水韵SPA', '元养水韵SPA'] },
]
}
......
const App = getApp()
Page({
data: {
imageBase: App.globalData.appImageBase,
resourcesBase: App.globalData.appResourcesBase,
option: {},
userInfo: {},
greetingName: '', // 问候姓名
greetingMessage: '', // 问候消息
phone: '13316748039',
hotline: false, //客服热线
......@@ -17,8 +21,11 @@ Page({
onLoad: function (option) {
this.setData({
option: option
option: option,
userInfo: wx.getStorageSync('userInfo')
})
this.setGreetingMessage()
// formPage=order&shopAppId=1&commodityType=5
},
......@@ -28,6 +35,54 @@ Page({
},
/**
* 问候消息
* @function
* @param {object} - funcEvent
* @returns
*/
setGreetingMessage: function () {
let funcHour = Number(App.modular.miment().format('hh'))
let funcMinute = Number(App.modular.miment().format('mm'))
let funcTime = [{
'min': 0,
'max': 12,
'message': '上午好!'
}, {
'min': 12,
'max': 18,
'message': '下午好!'
}, {
'min': 18,
'max': 24,
'message': '晚上好!'
}]
let funcIndex = 0
for (let i = 0, l = funcTime.length; i < l; i ++) {
// 判断小时区间
if (funcTime[i].min < funcHour && funcHour <= funcTime[i].max) {
// 如果小时区间等于该区间最大数值,那么分钟不为零时递增一个区间
if (funcHour === funcTime[i].max && 0 < funcMinute) {
funcIndex = i + 1
} else {
funcIndex = i
}
break
}
}
let funcGreetingName = this.data.userInfo.name
if (funcGreetingName.length > 5) funcGreetingName = funcGreetingName.substring(0, 5) + '...'
if (funcGreetingName === '') funcGreetingName = 'Hello,'
this.setData({
greetingName: funcGreetingName,
greetingMessage: funcTime[funcIndex].message
})
},
/**
* 查询推荐商品
* @function
* @param {object} - funcEvent
......@@ -190,6 +245,7 @@ Page({
'logo': funcShopId[i].logo,
'cover': funcShopId[i].cover,
'shopType': funcShopType,
'commodityLogo': funcShopId[i].commodityLogo
}
wx.setStorageSync('shopInfoBuffer', funcShopInfo)
break
......
<navigation class="navigation"></navigation>
<view class="container">
<view class="title">
<image src="{{resourcesBase + 'commodity/home/title.png'}}" class="title_img"></image>
<!-- 问候订制 -->
<view class="greeting">
<text>{{greetingName + greetingMessage}}</text>
</view>
<!-- 商店 -->
......
......@@ -11,12 +11,6 @@
text-align: left;
}
.title_img {
width: 214rpx;
height: 50rpx;
margin-top: 128rpx;
}
.greetings_body {
width: 750rpx;
height: height;
......@@ -182,14 +176,17 @@
font-weight: 500;
}
.title {
.greeting {
width: 750rpx;
height: 280rpx;
padding: 140rpx 46rpx 130rpx 46rpx;
}
.title image {
width: 750rpx;
height: 80rpx;
.greeting text {
height: 82rpx;
font-size: 58rpx;
font-weight: 500;
line-height: 82rpx;
color: #15191F;
}
/* 商店样式 */
......
......@@ -39,15 +39,15 @@ Page({
})
this.setSideBarStyle()
},
onShow: function () {
this.resetShoppingCart()
this.setCartAnimation()
this.setShopInfo()
this.querySideBar()
},
onShow: function () {
if (wx.getStorageSync('shoppingCartBuffer').length === 0) {
this.resetShoppingCart()
} else {
......@@ -116,6 +116,24 @@ Page({
},
setShopInfo: function () {
if (this.data.option.formPage === 'order') {
let funcAppId = Number(this.data.option.shopAppId)
for (let i = 0, l = App.globalData.shopId.length; i < l; i++) {
if (funcAppId === App.globalData.shopId[i].appId) {
let funcShopInfo = {
'appId': App.globalData.shopId[i].appId,
'id': App.globalData.shopId[i].id,
'name': App.globalData.shopId[i].name,
'logo': App.globalData.shopId[i].logo,
'shopType': Number(this.data.option.commodityType)
}
wx.setStorageSync('shopInfoBuffer', funcShopInfo)
break
}
}
}
let funcShopInfo = wx.getStorageSync('shopInfoBuffer')
this.setData({
shopInfo: funcShopInfo
......@@ -346,8 +364,6 @@ Page({
funcItem = this.data.commodityDetail
}
console.log(funcItem)
// 判断购物车中是否存在同类商品
// 修改相应的商品数量
if (funcShoppingCart.length !== 0) {
......
......@@ -94,6 +94,7 @@ Page({
'priceType': 1,
'describe': funcResponse[i].synopsis,
'tags': funcResponse[i].tags,
'notificationId': funcResponse[i].notificationId, // 下单须知
}
let funcUserType = wx.getStorageSync('userInfo').userType
......@@ -135,6 +136,7 @@ Page({
'priceType': 1,
'describe': funcResponse[i].synopsis,
'tags': funcResponse[i].tags,
'notificationId': funcResponse[i].notificationId, // 下单须知
}
let funcUserType = wx.getStorageSync('userInfo').userType
......
......@@ -26,110 +26,132 @@
left: 0;
}
.project-wrapper {
/* 门店样式 */
.shop-list {
background: #F3F4F6;
}
.shop-item {
width: 670rpx;
margin-top: 48rpx;
padding: 36rpx 32rpx 14rpx;
background-color: #fff;
margin: 48rpx 40rpx 0 40rpx;
padding: 32rpx;
border-radius: 4px;
background: #FFFFFF;
}
.project-title {
height: 88rpx;
background-color: #ccc;
.shop-name {
width: 606rpx;
height: 70rpx;
}
.project-item {
margin-top: 48rpx;
padding-bottom: 50rpx;
border-bottom: 1px solid #E2E7EF;
.shop-name image {
margin-right: 20rpx;
}
/* 商品信息样式 */
.commodity-item {
height: 214rpx;
margin-top: 50rpx;
border-bottom: 1px #E2E7EF solid;
}
.project-item:last-child {
.commodity-item:last-child {
border-bottom: none;
}
.project-cover {
.commodity-cover image {
width: 128rpx;
height: 128rpx;
background-color: #ccc;
margin-right: 24rpx;
background: #999999;
}
.project-content {
margin-left: 24rpx;
flex: 1;
.commodity-describe {
position: relative;
flex-grow: 1;
}
.project-info {
}
.project-name {
height: 46rpx;
color: #15191F;
.commodity-describe text:nth-child(1) {
height: 42rpx;
font-size: 30rpx;
font-weight: 600;
font-weight: 500;
line-height: 42rpx;
color: #15191F;
overflow: hidden;
text-overflow: ellipsis;
}
.project-msg text {
margin-top: 8rpx;
color: #959DA9;
.commodity-describe text:nth-child(2) {
position: absolute;
top: 54rpx;
left: 0;
max-width: 320rpx;
max-height: 120rpx;
border: 1px red solid;
background: #FFFFFF;
overflow: hidden;
font-size: 22rpx;
}
.project-price-wrapper {
flex: 1;
height: 100%;
width: 100%;
}
.project-price-special {
}
.price-wrap {
color: #EF4E4E;
letter-spacing: 2rpx;
display: table-cell;
vertical-align: bottom;
font-weight: 400;
line-height: 40rpx;
word-wrap: break-word;
color: #959DA9;
}
.price-symbol {
.commodity-price-symbol {
height: 32rpx;
font-size: 24rpx;
font-weight: 500;
line-height: 32rpx;
color: #EF4E4E;
}
.price-special {
font-size: 34rpx;
.commodity-price-value {
height: 32rpx;
font-size: 32rpx;
font-weight: 500;
line-height: 32rpx;
color: #EF4E4E;
}
.price-special-msg {
.commodity-price-special {
display: inline-block;
width: 78rpx;
height: 32rpx;
color: #E8D0AF;
font-size: 18rpx;
margin: 0 0 0 8rpx;
border-radius: 4px;
background: linear-gradient(180deg, #3F4357 0%, #252532 100%);
text-align: center;
font-size: 18rpx;
font-weight: 500;
line-height: 32rpx;
background: linear-gradient(180deg, #3F4357 0%, #252532 100%);
border-radius: 4rpx;
color: #E8D0AF;
}
.project-price-old {
.commodity-price-through {
margin-top: 12rpx;
}
.commodity-price-through text {
height: 32rpx;
color: #959DA9;
font-size: 22rpx;
font-weight: 400;
line-height: 32rpx;
text-decoration: line-through;
color: #959DA9;
}
.price-old {
font-size: 22rpx;
}
.price-symbol-old {
font-size: 20rpx;
}
.project-buy-wrapper {
flex: 1;
}
.project-buy-btn {
.commodity-price-operation button {
width: 120rpx;
height: 56rpx;
margin-top: 24rpx;
color: #fff;
font-size: 22rpx;
line-height: 56rpx;
text-align: center;
background-color: #86C5E1;
border-radius: 4rpx;
}
border-radius: 4px;
background: #86C5E1;
image {
width: 100%;
height: 100%;
}
font-size: 22rpx;
font-weight: 500;
line-height: 32rpx;
color: #FFFFFF;
}
\ No newline at end of file
......@@ -7,7 +7,6 @@ Page({
shopId: '',
shopName: '',
shopLogo: '',
shoppingCart: [], // 购物车列表
shoppingCartSelection: 0, // 购物车选择数量
......@@ -101,8 +100,7 @@ Page({
let funcShopInfo = wx.getStorageSync('shopInfoBuffer')
this.setData({
shopId: funcShopInfo.id,
shopName: funcShopInfo.name,
shopLogo: funcShopInfo.logo
shopLogo: funcShopInfo.commodityLogo
})
console.log(this.data.shopLogo)
......@@ -161,7 +159,7 @@ Page({
let funcShoppingCart = this.data.shoppingCart
if (funcShoppingCart[funcIndex].quantityMax <= funcShoppingCart[funcIndex].quantity) return
funcShoppingCart[funcIndex].quantity = funcShoppingCart[funcIndex].quantity + 1
funcShoppingCart[funcIndex].quantity = funcShoppingCart[funcIndex].quantity + 100
this.setData({
shoppingCart: funcShoppingCart
})
......@@ -288,6 +286,15 @@ Page({
},
onPaySubmit: function () {
// 优先检查用户是否已经注册,如果没有则跳转登录
let funcUserInfo = wx.getStorageSync('userInfo')
if (!funcUserInfo.isSignIn) {
wx.navigateTo({
url: '/pages/login/login'
})
return
}
// 检查购物车是否拥有商品
let funcShoppingCart = this.data.shoppingCart
if (funcShoppingCart.length === 0) {
......
......@@ -3,9 +3,8 @@
<l-toast show="{{winToast}}" icon="error" title="请选购商品后结算"></l-toast>
<view class="container" wx:if="{{shoppingCart.length > 0}}">
<view class="shop-info row align-c">
<image wx:if="{{shopLogo}}" src="{{resourcesBase + shopLogo}}" mode="left"></image>
<text>{{shopName}}</text>
<view class="shop-info row con-b align-c">
<image wx:if="{{shopLogo}}" src="{{resourcesBase + shopLogo}}" mode="widthFix"></image>
<text bindtap="onClearn">清空</text>
</view>
......
......@@ -12,33 +12,23 @@
.shop-info {
width: 750rpx;
height: 116rpx;
padding: 16rpx 40rpx;
height: 110rpx;
padding: 0 30rpx 0 40rpx;
font-size: 30rpx;
}
.shop-info > image {
max-width: 120rpx;
height: 100%;
width: 380rpx;
height: 110rpx;
}
.shop-info > text:nth-child(2) {
flex-grow: 1;
.shop-info > text {
height: 42rpx;
font-size: 30rpx;
font-weight: 500;
line-height: 42rpx;
color: #586A46;
}
.shop-info > text:nth-child(3) {
flex-grow: 1;
height: 100rpx;
text-align: right;
line-height: 100rpx;
color: #656e7b;
}
.l-content {
color: #959da9 !important;
}
......@@ -134,6 +124,8 @@
font-weight: 400;
line-height: 32rpx;
color: #959DA9;
text-decoration: line-through;
}
.list-item-quantity {
......
......@@ -2,6 +2,8 @@ const App = getApp()
Page({
data: {
option: {},
height: '',
islogin: false,
isphone: false,
......@@ -10,6 +12,8 @@ Page({
},
onLoad: function (options) {
this.setData({ option: options })
let funcUserInfo = wx.getStorageSync('userInfo')
this.setData({
......@@ -38,7 +42,6 @@ Page({
*/
userInfoHandler: function (res) {
let funcGetUserInfo = res.detail.userInfo
console.log('userInfo', res)
if (!res.detail.userInfo) {
return
}
......@@ -57,8 +60,6 @@ Page({
iv: '',
},
success: (res) => {
console.log(res)
wx.setStorageSync('userInfo', funcUserInfo)
this.setData({
islogin: true
})
......@@ -88,14 +89,12 @@ Page({
},
success: (res) => {
funcUserInfo.phone = res.data.phoneNumber
wx.setStorageSync('userInfo', funcUserInfo)
this.setData({
isphone: true
})
setTimeout(() => {
this.checkFinish()
}, 1000)
}
})
},
......@@ -113,7 +112,14 @@ Page({
checkFinish: function () {
if (this.data.islogin && this.data.isphone) {
wx.navigateBack({})
// 在注册完成之后 login 一次,重新设置用户信息以及相关状态参数
console.log('注册成功')
App.globalData.token = ''
App.login({
success: () => {
wx.navigateBack({})
}
})
}
}
})
\ No newline at end of file
......@@ -4,7 +4,7 @@ const App = getApp()
Page({
data: {
imageBase: App.globalData.appImageBase,
passListType: 0, // 0为单张卡 1为多张卡
passListType: 1, // 0为单张卡 1为多张卡
privateStatus: true,
swiperCurrent: 0,
passList: [
......
......@@ -24,7 +24,7 @@ Page({
mobile: '',
nickName: '',
avatarUrl: '/pages/mine/home/image/avatar.png',
stateTest: '去认证',
statusText: '去认证',
mask: false,
type: 0, //判断是否是认证的了
approveList: ['园区门票优惠', '餐厅价格优惠', 'SPA服务优惠', '免费观看电影', '无须预约入园', '尽享多重特权'],
......@@ -77,7 +77,8 @@ Page({
img: '',
title: '日落观光游船体验活动之船行碧波共赏美景',
num: 3
}]
}],
orderListBackup: []
},
close() {
......@@ -109,31 +110,96 @@ Page({
// 去核销
goCouponInput(event) {
wx.navigateTo({
url: '/pages/pay/coupon-input/coupon-input',
url: '/pages/pay/coupon-input/coupon-input',
})
},
//获取待使用订单
getWillUseOrders() {
let that = this
App.wxRequest({
url: '/api/v1/order/getOrderList',
data: {
goodType: "", //数据字典(good_type) 商品分类(全部为"")
status: 2, //状态(-1已取消0未付款1未发货2待使用3已使用4已过期)
pageNo: 1,
pageSize: -1
},
success: function (res) {
let tmpArr = []
console.log('daishiyongdingdan', res);
let list = res.data
let listBackUp = JSON.parse(JSON.stringify(list)) //备份数据
let orderList = `myOrder.artOrder.orderList`
list.length = 1
that.setData({
[orderList]: list,
orderListBackup: listBackUp
})
}
})
},
//获取卡数据
getCardList() {
let that = this
App.wxRequest({
url: '/api/v1/volume/getVolumeList',
data: {
status: "", //0已过期1待使用2已使用(""全部)
pageNo: 1,
pageSize: -1
},
success: function (res) {
let tmpArr = []
console.log('卡片数据', res);
let list = res.data.map(item => {
return item
})
let passOrder = `myOrder.passOrder`
that.setData({
[passOrder]: list
})
}
})
},
setUserInfo: function () {
let funcUserInfo = wx.getStorageSync('userInfo')
if (funcUserInfo.phone && funcUserInfo.name && funcUserInfo.avatar) {
// 已为登录状态
if (funcUserInfo.isSignIn) {
funcUserInfo.phone = this.toHide(funcUserInfo.phone)
let funcStatusText = ''
switch (funcUserInfo.status) {
case '':
funcStatusText = '去认证'
break
case 0:
funcStatusText = '审核中'
break
case 1:
funcStatusText = '审核通过 '
break
case 2:
funcStatusText = '审核失败'
break
}
this.setData({
type: funcUserInfo.userType,
statusText: funcStatusText,
isRegister: true,
userInfo: funcUserInfo
})
App.login({
success: (token) => {
this.getMyActivityList()
// this.getList()
this.getAuth()
}
})
let funcUserType = funcUserInfo.userType
this.setData({
type: funcUserType === 1 ? 1 : 0,
})
this.getMyActivityList()
this.getCardList()
this.getWillUseOrders()
} else {
this.setData({
isRegister: false,
......@@ -141,7 +207,6 @@ Page({
}
},
// 登录注册页
checkRegister() {
if (this.data.isRegister) {
......@@ -297,50 +362,11 @@ Page({
})
},
// 获取业主认证信息
getAuth() {
App.wxRequest({
url: '/api/v1/userAuth/getAuth',
method: 'GET',
success: (res) => {
let state = res.data.state * 1 // 0 待审核 1 审核通过 2 不通过
let stateTest = '去认证'
switch (state) {
case 0:
stateTest = '审核中'
break
case 1:
stateTest = '审核通过 '
break
case 2:
stateTest = '审核失败'
break
}
this.setData({
type: state == 1 ? 1 : 0,
stateTest: stateTest,
})
let funcUserInfo = wx.getStorageSync('userInfo')
funcUserInfo.userType = state
wx.setStorageSync('userInfo', funcUserInfo)
}
})
},
toHide: function (array) {
var mphone = array.substring(0, 3) + '****' + array.substring(7);
return mphone;
},
// 二期代码
onOrder: function () {
console.log('onOrder')
......@@ -357,9 +383,30 @@ Page({
//查看更多
onShowMoreOrder: function () {
let showMoreOrder = !this.data.showMoreOrder
let orderList = `myOrder.artOrder.orderList`
console.log(JSON.parse(JSON.stringify(this.data.orderListBackup)));
if (showMoreOrder) {
// 展开
this.setData({
[orderList]: JSON.parse(JSON.stringify(this.data.orderListBackup)),
})
} else {
// 收起
let list = JSON.parse(JSON.stringify(this.data.orderListBackup))
list.length = 1
this.setData({
[orderList]: list,
})
}
this.setData({
showMoreOrder
showMoreOrder,
})
},
onShowMoreActivity: function () {
let showMoreActivity = !this.data.showMoreActivity
......
<navigation class="navigation" titleText="我的" color="{{type == 1? '#FFFFFF' :''}}"></navigation>
<view class="container">
<view class="mine" wx:if="{{type == 0}}">
<view class="mine" wx:if="{{type !== 1}}">
<image class="background-image" src="./image/mine.png"></image>
<view class="row align-c">
<view class="mine-avatar" bindtap="checkRegister">
......@@ -58,15 +58,15 @@
</view>
<view class="status row con-b align-c" wx:if="{{type == 0}}">
<view class="status row con-b align-c" wx:if="{{type !== 1}}">
<view class="status-symbol col">
<text>业主认证</text>
<text>享受业主尊贵特权,预定消费专属优惠</text>
</view>
<view class="status-operation row con-c align-c" bindtap="goApprove">
<image wx:if="{{stateTest == '审核失败'}}" src="/image/fail-icon.png"></image>
<image wx:if="{{stateTest == '审核中'}}" src="/image/sh-icon.png"></image>
<text>{{stateTest}}</text>
<image wx:if="{{statusText == '审核失败'}}" src="/image/fail-icon.png"></image>
<image wx:if="{{statusText == '审核中'}}" src="/image/sh-icon.png"></image>
<text>{{statusText}}</text>
</view>
</view>
......@@ -128,41 +128,40 @@
<view class="pass-bg-two" wx:if="{{myOrder.passOrder.length > 1}}"></view>
<view class="pass-logo-wrapper row align-c">
<image src="{{myOrder.passOrder[0].logo}}"></image>
<text>{{myOrder.passOrder[0].store}}</text>
<text>{{myOrder.passOrder[0].officeName}}</text>
</view>
<view class="pass-title">
<text>{{myOrder.passOrder[0].title}}</text>
<text>精灵鸟理想国{{myOrder.passOrder[0].name}}</text>
</view>
<view class="pass-time">
<text>{{myOrder.passOrder[0].time}}</text>
<text>有效期至{{myOrder.passOrder[0].expireTime}}</text>
</view>
<view class="pass-name">
<text>{{myOrder.passOrder[0].name}}</text>
<text>{{myOrder.passOrder[0].personName}}</text>
</view>
<view class="pass-idNum">
<text>{{myOrder.passOrder[0].idNum}}</text>
<text>{{myOrder.passOrder[0].identityCard}}</text>
</view>
</view>
<!-- 商品 -->
<view class="goods-wrapper">
<view class="goods-wrapper" wx:for="{{myOrder.artOrder.orderList}}" wx:key="*this">
<view class="goods-logo-wrapper row align-c">
<view class="art-logo">
<image src="{{myOrder.artOrder.logo}}"></image>
</view>
<text>{{myOrder.artOrder.orderList[0].store}}</text>
<text>{{item.officeName}}</text>
</view>
<view class="goods-content row align-c">
<image src="{{item.cover}}" wx:for="{{myOrder.artOrder.orderList}}" wx:key="id"></image>
<text wx:if="{{myOrder.artOrder.orderList.length === 1}}">{{myOrder.artOrder.orderList[0].title}}</text>
<image src="{{k.imgUrl}}" wx:for="{{item.smOrderDetails}}" wx:for-item="k" wx:key="*this"></image>
<text wx:if="{{item.smOrderDetails.length == 1}}">{{item.smOrderDetails[0].name}}</text>
</view>
<view class="goods-footer row align-c con-b">
<text>{{myOrder.artOrder.orderList[0].time}}</text>
<text>{{myOrder.artOrder.orderList[0].quantity}}</text>
<text>有效期至{{item.time}}</text>
<text>共{{item.smOrderDetails.length}}</text>
</view>
</view>
<!-- more -->
<view class="more row align-c con-c" bindtap="onShowMoreOrder">
<text wx:if="{{!showMoreOrder}}">展开更多</text>
......@@ -292,57 +291,6 @@
<text>客服中心</text>
<image src="{{imageBase + 'icon/arrow-r-2.png'}}"></image>
</view>
<!-- <l-list l-content-class="menu-title" l-class="listClass" bind:lintap="myActivity">
<view slot="left-section">
<image class="fontImg" src="./image/myactive.png"></image>
</view>
</l-list> -->
<!-- 我的活动 -->
<!-- <view class="my-activities" wx:if="{{activityList.length > 0}}">
<view class="my-activities-item" data-enrollid="{{item.enrollId}}" wx:for="{{activityList}}" wx:for-index="index" wx:for-item="item" wx:key="index" bindtap="activityDetail">
<view class="my-activities-top">
<text decode="{{true}}">&nbsp;&nbsp;{{item.time}}&nbsp;&nbsp;</text>
</view>
<view class="my-activities-bottom">
<view class="my-activities-title" style="padding-top:70rpx;">{{item.title}}</view>
<view class="my-activities-content">{{item.content}}</view>
</view>
</view>
<view class="my-activities-item"></view>
</view> -->
<!-- <l-list l-content-class="menu-title" l-class="listClass" bind:lintap="myAppointment">
<view slot="left-section">
<image class="fontImg" src="./image/myappion.png"></image>
</view>
</l-list> -->
<!-- 我的预约 -->
<!-- <view class="my-activities" wx:if="{{appointmentList.length > 0}}">
<view class="my-activities-item" wx:for="{{appointmentList}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class="my-activities-top">
<view class="my-activities-top">
<text decode="{{true}}">&nbsp;&nbsp;{{item.time}}&nbsp;&nbsp;</text>
</view>
</view>
<view class="my-activities-bottom">
<view class="my-activities-bottom-view">
<view class="my-activities-title">{{item.title}}</view>
<view class="my-activities-content" wx:if="{{item.type == 0}}">预约人数 {{item.num}}人</view>
</view>
<view class="subscribe" data-item="{{item}}" bindtap="gohotelAccommodation">预约凭证</view>
</view>
</view>
<view class="my-activities-item"></view>
</view> -->
<!-- <l-list l-content-class="menu-title" l-class="listClass" bind:lintap="customerService">
<view slot="left-section">
<image class="fontImg" src="./image/mycustom@2x.png"></image>
</view>
</l-list> -->
</view>
</view>
......
.container {
background: linear-gradient(180deg, #FFFFFF 0%, #F3F4F6 100%);
background: linear-gradient(180deg, #fff 10%, #F3F4F6 20%);
/* background: #F3F4F6 */
}
.navigation {
z-index: 2;
}
......@@ -13,6 +15,7 @@
width: 100%;
height: 100%;
}
.mine {
position: relative;
width: 750rpx;
......@@ -25,7 +28,7 @@
margin-right: 32rpx;
}
.mine-avatar > image {
.mine-avatar>image {
width: 128rpx;
height: 128rpx;
border-radius: 50%;
......@@ -61,10 +64,13 @@
padding: 41rpx 32rpx;
background-color: #fff;
border-radius: 4rpx;
margin-top:48rpx;
}
.cpopon-info {
flex: 1;
}
.cpopon-info text:nth-child(1) {
font-size: 34rpx;
font-weight: 600;
......@@ -76,6 +82,7 @@
font-size: 26rpx;
color: #161A1F;
}
.coupon image {
width: 32rpx;
height: 32rpx;
......@@ -127,7 +134,7 @@
.menu {
width: 750rpx;
margin-top: 16rpx;
/* margin-top: 16rpx; */
margin-bottom: 30rpx;
padding: 0 48rpx;
overflow-x: hidden;
......@@ -328,24 +335,30 @@
background-color: #fff;
border-radius: 4rpx;
}
.order-activity image {
width: 32rpx;
height: 32rpx;
}
.order-activity-title-wrapper {
height: 48rpx;
}
.order-activity-title {
font-size: 34rpx;
color: #15191F;
font-weight: 600;
}
.order-activity-icon-list {
margin-top: 56rpx;
}
.order-activity-icon-wrapper {
flex: 1;
}
.order-activity-icon {
position: relative;
width: 80rpx;
......@@ -353,10 +366,12 @@
background-color: #F5F6F8;
border-radius: 50%;
}
.order-activity-icon image{
.order-activity-icon image {
width: 48rpx;
height: 48rpx;
}
.order-activity-badge {
position: absolute;
top: -10rpx;
......@@ -370,9 +385,11 @@
background-color: #E66060;
border-radius: 16rpx;
}
.badge-widen {
width: 48rpx;
}
.order-activity-icon-wrapper text {
margin-top: 16rpx;
font-size: 22rpx;
......@@ -394,6 +411,7 @@
border-radius: 4rpx;
opacity: 0.81;
}
.pass-bg-one {
position: absolute;
left: 0;
......@@ -405,6 +423,7 @@
background: rgba(247, 179, 197, 0.5);
border-radius: 4rpx 4rpx 0 0;
}
.pass-bg-two {
position: absolute;
left: 0;
......@@ -417,33 +436,40 @@
background: rgba(247, 179, 197, 0.3);
border-radius: 4rpx 4rpx 0 0;
}
.pass-logo-wrapper {
height: 50rpx;
}
.pass-logo-wrapper image {
width: 64rpx;
height: 50rpx;
background-color: #ccc;
background-color: #ccc;
}
.pass-logo-wrapper text {
height: 50rpx;
margin-left: 20rpx;
font-size: 26rpx;
line-height: 50rpx;
}
.pass-title {
margin-top: 24rpx;
font-size: 42rpx;
font-weight: 600;
}
.pass-time {
margin-top: 8rpx;
font-size: 26rpx;
}
.pass-name {
margin-top: 32rpx;
font-size: 22rpx;
}
.pass-idNum {
margin-top: 8rpx;
font-size: 22rpx;
......@@ -456,10 +482,12 @@
background-color: #F5F6F8;
border-radius: 4rpx;
}
.goods-logo-wrapper {
height: 100rpx;
margin-top: 40rpx;
}
.goods-logo-wrapper text {
height: 100rpx;
margin-left: 20rpx;
......@@ -467,24 +495,29 @@
color: #15191F;
line-height: 100rpx;
}
.goods-content {
height: 136rpx;
}
.goods-content image{
.goods-content image {
width: 140rpx;
height: 136rpx;
margin-right: 32rpx;
background-color: #ccc;
}
.goods-content text {
font-size: 30rpx;
color: #15191F;
font-weight: 600;
line-height: 42rpx;
}
.goods-footer {
height: 84rpx;
}
.goods-footer text {
font-size: 26rpx;
color: #959DA9;
......@@ -509,6 +542,7 @@
background-color: #F5F6F8;
border-radius: 4rpx;
}
.appointment-time {
position: absolute;
left: 0;
......@@ -523,23 +557,26 @@
border-radius: 4rpx;
}
.appointment-activity-content {
}
.appointment-activity-content {}
.appointment-activity-img {
width: 140rpx;
height: 136rpx;
background-color: #ccc;
}
.appointment-activity-info {
flex: 1;
margin-left: 32rpx;
}
.appointment-activity-title {
color: #15191F;
font-size: 30rpx;
font-weight: 600;
line-height: 42rpx;
}
.appointment-activity-num {
margin-top: 16rpx;
color: #959DA9;
......@@ -550,6 +587,7 @@
width: 305rpx;
height: 110rpx;
}
.border-right {
width: 1rpx;
height: 75rpx;
......@@ -571,10 +609,12 @@
.more {
margin-top: 32rpx;
}
.more text {
font-size: 26rpx;
color: #15191F;
}
.more image {
margin-left: 8rpx;
}
......@@ -587,16 +627,19 @@
background-color: #fff;
border-radius: 4rpx;
}
.service text {
font-size: 34rpx;
color: #15191F;
font-weight: 600;
}
.service image {
width: 32rpx;
height: 32rpx;
}
image {
width: 100%;
height: 100%;
}
}
\ No newline at end of file
......@@ -15,13 +15,15 @@ Page({
address: '',
},
onLoad: function (options) {
let funcUserInfo = wx.getStorageSync('userInfo')
let mobile = wx.getStorageSync('mobile')
let nickName = wx.getStorageSync('nickName')
let avatarUrl = wx.getStorageSync('avatarUrl')
let sex = wx.getStorageSync('sex')
let birthday = wx.getStorageSync('birthday')
let address = wx.getStorageSync('address')
let mobile = funcUserInfo.phone
let nickName = funcUserInfo.name
let avatarUrl = funcUserInfo.avatar
let sex = funcUserInfo.sex
let birthday = funcUserInfo.birthday
let address = birthday.address
this.setData({
mobile: this.toHide(mobile),
nickName: nickName,
......
......@@ -4,6 +4,9 @@ Page({
data: {
imageBase: App.globalData.appImageBase,
resourcesBase: App.globalData.appResourcesBase,
option: {},
orderTypeTitle: '全部分类',
orderTypeHeight: 0,
orderType: [],
......@@ -18,7 +21,7 @@ Page({
'name': '待付款'
},
{
'value': '1',
'value': '2',
'name': '待使用'
},
{
......@@ -34,6 +37,7 @@ Page({
isFinished: false
},
onLoad: function (options) {
this.setData({ option: options })
this.setOrderType()
},
......@@ -87,6 +91,7 @@ Page({
'status': Number(funcResponse[i].status),
'amount': funcResponse[i].totalMoney,
'commodity': [],
'commodityType': Number(funcResponse[i].goodType),
'wxRequest': funcResponse[i].wxRequest
}
......@@ -219,9 +224,15 @@ Page({
},
onNavigationBack: function () {
wx.navigateBack({
'delta': 1
})
if (this.data.option.fromPage) {
wx.switchTab({
url: '/pages/mine/home/home',
})
} else {
wx.navigateBack({
'delta': 1
})
}
},
/**
......@@ -414,7 +425,7 @@ Page({
onOrderEvaluate: function (event) {
console.log(event.currentTarget.dataset, '----------------event.currentTarget.dataset');
let item = JSON.stringify(event.currentTarget.dataset.item)
let item = JSON.stringify(event.currentTarget.dataset.item)
wx.navigateTo({
url: `/pages/pay/order-comment/order-comment?orderItem=${item}`,
})
......@@ -451,14 +462,16 @@ Page({
* @returns
*/
onOrderAgain: function (event) {
let item = event.currentTarget.dataset.item
let commodityType = item.goodType
console.log(item)
let commodityType = item.commodityType
let shopAppId = wx.getStorageSync('shopInfoBuffer') ? wx.getStorageSync('shopInfoBuffer').appId : ""
wx.navigateTo({
url: `/pages/commodity/menu-food/menu-food?formPage=order&shopAppId=${shopAppId}&commodityType=${commodityType}`,
})
},
/**
......@@ -468,7 +481,6 @@ Page({
* @returns
*/
onReachBottom: function () {
this.setData({
orderPages: this.data.orderPages + 1
})
......
......@@ -2,6 +2,8 @@ let App = getApp()
Page({
data: {
swiperCurrent: 0,
showCodePopup: false,
imageBase: App.globalData.appImageBase,
resourcesBase: App.globalData.appResourcesBase,
......@@ -15,6 +17,45 @@ Page({
isFromUse: false,
winCode: false,
residuePayTime: "", //剩余支付时间
sealImgs: [{
type: 1,
url: App.globalData.appResourcesBase + 'sealOfOrder/ertongyingdi-2.png'
}],
sealTest: App.globalData.appResourcesBase + 'sealOfOrder/ertongyingdi-2.png',
sealBig: App.globalData.appResourcesBase + 'sealOfOrder/ertongyingdi-1.png',
seals: {
seal1: {
passSrc: App.globalData.appResourcesBase + 'sealOfOrder/ertongyingdi-2.png',
willPaySrc: App.globalData.appResourcesBase + 'sealOfOrder/ertongyingdi-2.png',
},
seal1: {
passSrc: App.globalData.appResourcesBase + 'sealOfOrder/ertongyingdi-2.png',
willPaySrc: App.globalData.appResourcesBase + 'sealOfOrder/ertongyingdi-2.png',
},
seal1: {
passSrc: App.globalData.appResourcesBase + 'sealOfOrder/ertongyingdi-2.png',
willPaySrc: App.globalData.appResourcesBase + 'sealOfOrder/ertongyingdi-2.png',
},
},
codeList: [{
id: 0,
title: '《 阿凡达 》电影票',
img: './image/QRcode.png',
num: '2179 7092 0925'
},
{
id: 1,
title: '《 阿凡达 》电影票',
img: './image/QRcode.png',
num: '2179 7092 0925'
},
{
id: 2,
title: '《 阿凡达 》电影票',
img: './image/QRcode.png',
num: '2179 7092 0925'
}
]
},
......@@ -27,11 +68,58 @@ Page({
fromPage: options.fromPage === 'order' ? 'order' : '',
isFromUse: options.showCode === 'true' ? true : false,
})
App.login({
timeout: 0,
success: (result) => {
this.queryOrderDetail()
},
})
console.log(this.data.shopInfo)
this.queryOrderDetail()
},
// /api/v1/order/getVolumesByOrderId
// 一键扫码
onFastScan: function (event) {
App.wxRequest({
url: '/api/v1/order/getVolumesByOrderId',
data: {
'orderId': this.data.orderInfo.id
},
success: (response) => {
let funcResponse = response.data
console.log(response, '一键扫码');
let list = response.data
// let funcCodeInfo = {
// 'codeNo': funcResponse.serialNumber,
// 'codeName': funcResponse.name,
// 'codeBase64': funcResponse.qrcode,
// }
this.setData({
showCodePopup: true,
codeList: list
})
}
})
},
swiperChange(e) {
let swiperCurrent = e.detail.current
this.setData({
swiperCurrent
})
},
closeQRcode() {
let showCodePopup = false
this.setData({
showCodePopup,
// swiperCurrent:0
})
},
/**
* 订单详情
* @function
......@@ -59,7 +147,8 @@ Page({
'tipOrderNo': funcResponse.orderSerialNumber, // 订单编号
'tipTimeSubmit': funcResponse.createDate,
'tipTimePay': App.modular.miment(funcResponse.paymentTime).format('YYYY-MM-DD hh:mm:ss'),
'tipIntegral': funcResponse.integral
'tipIntegral': funcResponse.integral,
'officeName': funcResponse.officeName
}
// 添加订单商品列表
......@@ -119,7 +208,7 @@ Page({
},
// 弹出单张二维码
onCouponCode: function (event) {
let funcOrderInfo = event.currentTarget.dataset.item
App.wxRequest({
......
......@@ -308,6 +308,7 @@ Page({
setShoppingCartData: function () {
// 读取上级页面的购物车数据,默认选中所有。
let funcShoppingCart = wx.getStorageSync('shoppingCartBuffer')
console.log(JSON.stringify(funcShoppingCart))
// 设置商品的最终提交价格
let funcPayAmount = 0
......@@ -378,9 +379,6 @@ Page({
* @returns
*/
setStock: function () {
console.log('funcCommodity')
console.log(this.data.shoppingCartList)
let funcItem = this.data.shoppingCartList[0]
App.wxRequest({
......@@ -453,6 +451,8 @@ Page({
clearTimeout(funcTimer)
}, 100)
console.log(this.data.shoppingCartList)
App.wxRequest({
url: '/api/v1/commodity/getNotification',
data: {
......@@ -592,12 +592,14 @@ Page({
// 定位到当前问题位置
if (funcErrorIndex !== null) {
const funcQuery = wx.createSelectorQuery()
funcQuery.selectAll('.register-item-title').boundingClientRect()
funcQuery.selectAll('.contact-input-mark').boundingClientRect()
funcQuery.exec((response) => {
console.log(response)
wx.pageScrollTo({
scrollTop: response[0][funcErrorIndex].top
})
let funcScrollTop = response[0][funcErrorIndex].top
if (funcScrollTop !== 0) {
wx.pageScrollTo({
scrollTop: response[0][funcErrorIndex].top
})
}
})
}
return funcPass
......@@ -663,7 +665,30 @@ Page({
'smPersonalDetails': funcUserInfo
},
success: (response) => {
console.log(response)
if (/价格不一致/.test(response.data.msg)) {
wx.lin.showToast({
title: '价格已变更,请重新下单。',
icon: 'error',
success: () => {
wx.navigateBack({
delta: 2
})
}
})
return
}
if (/订单未支付/.test(response.data.msg)) {
wx.lin.showToast({
title: response.data.msg,
icon: 'error',
})
this.setData({
isPaySubmit: false,
})
return
}
if (/库存不足/.test(response.data.msg)) {
let funcList = []
for (let i = 0, l = response.data.data.list.length; i < l; i++) {
......@@ -763,7 +788,7 @@ Page({
} else {
// 取消支付直接进入订单
wx.reLaunch({
url: '/pages/pay/order/order'
url: '/pages/mine/order/order?fromPage=pay'
})
}
},
......
<!-- 购买须知详情 -->
<view class="notice-detail" wx:if="{{winNoticeDetail}}" bindtap="onNoticeClose">
<view class="notice-item" animation="{{animation}}">
<view class="notice-title">
<text>{{noticeText}}</text>
</view>
<view class="notice-rich">
<rich-text nodes="{{noticeDetail}}"></rich-text>
</view>
</view>
</view>
<l-toast></l-toast>
<view class="container">
<!-- winBuyContent -->
......@@ -201,7 +191,7 @@
<text>仅用于接收订单确认短信</text>
</view>
<view class="contact-input col">
<text>姓名</text>
<text class="contact-input-mark">姓名</text>
<input placeholder="请输入姓名" data-type="name" data-index="{{0}}" bindblur="onInputBlur"></input>
<text>{{registerInfo[0].errorName}}</text>
</view>
......@@ -227,7 +217,7 @@
<text>{{registerTitle + (index + 1)}}</text>
</view>
<view class="contact-input col">
<text>姓名</text>
<text class="contact-input-mark">姓名</text>
<input placeholder="请输入姓名" data-type="name" data-index="{{index}}" bindblur="onInputBlur"></input>
<text>{{item.errorName}}</text>
</view>
......@@ -262,6 +252,21 @@
<cover-view class="appointment-confirm row con-c align-c">确认预约</cover-view>
</cover-view>
<!-- 购买须知详情 -->
<view class="notice-detail" wx:if="{{winNoticeDetail}}" bindtap="onNoticeClose">
<view class="notice-item" animation="{{animation}}">
<view class="notice-title">
<text>{{noticeText}}</text>
</view>
<view class="notice-rich">
<rich-text nodes="{{noticeDetail}}"></rich-text>
</view>
</view>
</view>
<!-- 未支付订单超额提示 -->
<!-- 库存不足提示 -->
<view class="stock-mask row con-c align-c" wx:if="{{winStockTip}}">
<view class="stock col con-c align-c">
......
......@@ -915,6 +915,8 @@
.stock-info {
width: 526rpx;
max-height: 480rpx;
overflow-y: scroll;
}
.stock-close {
......
......@@ -26,7 +26,6 @@ let output = {
*/
formatAmount: function (funcAmountValue) {
if (!funcAmountValue && funcAmountValue !== 0) return
console.log(funcAmountValue, funcAmountValue.toString().length)
switch (funcAmountValue.toString().length) {
case 1:
funcAmountValue = '00' + funcAmountValue
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment