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({ ...@@ -48,25 +48,25 @@ App({
wxRequest: function (obj) { wxRequest: function (obj) {
var token = this.globalData.token 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 || '', } var header = obj.header ? obj.header : { 'token': token || '', }
wx.request({ wx.request({
url: this.globalData.baseUrl + obj.url, url: this.globalData.baseUrl + obj.url,
data: param, data: param,
method: obj.method || "POST", method: obj.method || 'POST',
header: header, header: header,
success: (res) => { success: (res) => {
// console.log("接口:", this.globalData.baseUrl + obj.url); // console.log("接口:", this.globalData.baseUrl + obj.url);
// console.log("参数:", JSON.stringify(obj.data)); // console.log("参数:", JSON.stringify(obj.data));
// console.log("返回:", res); // console.log("返回:", res);
let code = res.data.code * 1; let code = res.data.code * 1
if (200 == code && true == res.data.success) { if (200 == code && true == res.data.success) {
if (obj.success) { if (obj.success) {
obj.success(res.data) obj.success(res.data)
} }
} else if (402 == code) { // token失效 } else if (402 == code) {
this.refreshToken({ this.refreshToken({
success: () => { success: () => {
this.wxRequest(obj) this.wxRequest(obj)
...@@ -87,9 +87,9 @@ App({ ...@@ -87,9 +87,9 @@ App({
} }
}, },
fail: (err) => { fail: (err) => {
console.log("接口:", this.globalData.baseUrl + obj.url) // console.log("接口:", this.globalData.baseUrl + obj.url)
console.log("参数:", obj.data) // console.log("参数:", obj.data)
console.log("返回:", err) // console.log("返回:", err)
if (obj.fail) { if (obj.fail) {
let err = { let err = {
statusCode: 9999, statusCode: 9999,
...@@ -108,6 +108,12 @@ App({ ...@@ -108,6 +108,12 @@ App({
}); });
}, },
/**
* 登录
* @function
* @param
* @returns
*/
login: function (obj) { login: function (obj) {
let token = this.globalData.token let token = this.globalData.token
if (token) { if (token) {
...@@ -122,8 +128,6 @@ App({ ...@@ -122,8 +128,6 @@ App({
url: '/api/v1/login/getSmallSession?code=' + res.code, url: '/api/v1/login/getSmallSession?code=' + res.code,
method: 'GET', method: 'GET',
success: (response) => { success: (response) => {
console.log(response)
let funcResponse = response.data let funcResponse = response.data
this.globalData.token = funcResponse.token this.globalData.token = funcResponse.token
this.globalData.refreshToken = funcResponse.refreshToken this.globalData.refreshToken = funcResponse.refreshToken
...@@ -139,6 +143,15 @@ App({ ...@@ -139,6 +143,15 @@ App({
'birthday': funcResponse.birthday, 'birthday': funcResponse.birthday,
'sex': funcResponse.sex, 'sex': funcResponse.sex,
'userType': Number(funcResponse.userType), 'userType': Number(funcResponse.userType),
'status': '', // 只有游客身份该值为 ''
'isSignIn': false,
}
// 以返回信息中是否包含手机号码判断用户是否注册过
console.log(funcUserInfo.phone)
if (funcUserInfo.phone) {
funcUserInfo.isSignIn = true
this.queryUserStatus()
} }
wx.setStorageSync('userInfo', funcUserInfo) wx.setStorageSync('userInfo', funcUserInfo)
...@@ -153,6 +166,12 @@ App({ ...@@ -153,6 +166,12 @@ App({
} }
}, },
/**
* 注册
* @function
* @param {number} - funcAmountValue 金额,单位分
* @returns
*/
registUserInfo: function (obj) { registUserInfo: function (obj) {
this.wxRequest({ this.wxRequest({
url: '/api/v1/login/getDecryptData', url: '/api/v1/login/getDecryptData',
...@@ -170,6 +189,58 @@ App({ ...@@ -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) { refreshToken: function (obj) {
this.wxRequest({ this.wxRequest({
url: '/api/v1/login/refreshToken', url: '/api/v1/login/refreshToken',
...@@ -189,5 +260,5 @@ App({ ...@@ -189,5 +260,5 @@ App({
} }
} }
}) })
} },
}) })
\ No newline at end of file
...@@ -14,14 +14,16 @@ let Development = { ...@@ -14,14 +14,16 @@ let Development = {
], ],
// 门店信息 // 门店信息
// appId 程序内部交互确定门店
// id 数据库门店 id
shopId: [ shopId: [
{ appId: 1, id: '581be62a80bb4f0485abd87abcf64dc0', logo: 'shop/logo-1.png', cover: 'shop/cover-1.png', name: '海错图', title: ['海错图', '海错图购票', '海错图', '海错图文创店', '海错图', '海错图', '海错图'] }, { 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', cover: 'shop/cover-2.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', cover: 'shop/cover-3.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', cover: 'shop/cover-4.png', name: '原野MOJITO', title: ['原野MOJITO', '原野MOJITO', '原野MOJITO', '原野MOJITO', '原野MOJITO', '原野MOJITO', '原野MOJITO'] }, { 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', cover: 'shop/cover-5.png', name: '拾光花坊', title: ['拾光花坊', '拾光花坊', '拾光花坊', '拾光花坊', '拾光花坊', '拾光花坊', '拾光花坊'] }, { 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', cover: 'shop/cover-6.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', cover: 'shop/cover-7.png', name: '元养水韵SPA', title: ['元养水韵SPA', '元养水韵SPA', '元养水韵SPA', '元养水韵SPA', '元养水韵SPA', '元养水韵SPA', '元养水韵SPA'] }, { 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() const App = getApp()
Page({ Page({
data: { data: {
imageBase: App.globalData.appImageBase, imageBase: App.globalData.appImageBase,
resourcesBase: App.globalData.appResourcesBase, resourcesBase: App.globalData.appResourcesBase,
option: {}, option: {},
userInfo: {},
greetingName: '', // 问候姓名
greetingMessage: '', // 问候消息
phone: '13316748039', phone: '13316748039',
hotline: false, //客服热线 hotline: false, //客服热线
...@@ -17,9 +21,12 @@ Page({ ...@@ -17,9 +21,12 @@ Page({
onLoad: function (option) { onLoad: function (option) {
this.setData({ this.setData({
option: option option: option,
userInfo: wx.getStorageSync('userInfo')
}) })
this.setGreetingMessage()
// formPage=order&shopAppId=1&commodityType=5 // formPage=order&shopAppId=1&commodityType=5
}, },
...@@ -28,6 +35,54 @@ Page({ ...@@ -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 * @function
* @param {object} - funcEvent * @param {object} - funcEvent
...@@ -190,6 +245,7 @@ Page({ ...@@ -190,6 +245,7 @@ Page({
'logo': funcShopId[i].logo, 'logo': funcShopId[i].logo,
'cover': funcShopId[i].cover, 'cover': funcShopId[i].cover,
'shopType': funcShopType, 'shopType': funcShopType,
'commodityLogo': funcShopId[i].commodityLogo
} }
wx.setStorageSync('shopInfoBuffer', funcShopInfo) wx.setStorageSync('shopInfoBuffer', funcShopInfo)
break break
......
<navigation class="navigation"></navigation> <navigation class="navigation"></navigation>
<view class="container"> <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> </view>
<!-- 商店 --> <!-- 商店 -->
......
...@@ -11,12 +11,6 @@ ...@@ -11,12 +11,6 @@
text-align: left; text-align: left;
} }
.title_img {
width: 214rpx;
height: 50rpx;
margin-top: 128rpx;
}
.greetings_body { .greetings_body {
width: 750rpx; width: 750rpx;
height: height; height: height;
...@@ -182,14 +176,17 @@ ...@@ -182,14 +176,17 @@
font-weight: 500; font-weight: 500;
} }
.title { .greeting {
width: 750rpx; width: 750rpx;
height: 280rpx; padding: 140rpx 46rpx 130rpx 46rpx;
} }
.title image { .greeting text {
width: 750rpx; height: 82rpx;
height: 80rpx; font-size: 58rpx;
font-weight: 500;
line-height: 82rpx;
color: #15191F;
} }
/* 商店样式 */ /* 商店样式 */
......
...@@ -39,15 +39,15 @@ Page({ ...@@ -39,15 +39,15 @@ Page({
}) })
this.setSideBarStyle() this.setSideBarStyle()
},
onShow: function () {
this.resetShoppingCart() this.resetShoppingCart()
this.setCartAnimation() this.setCartAnimation()
this.setShopInfo() this.setShopInfo()
this.querySideBar() this.querySideBar()
},
onShow: function () {
if (wx.getStorageSync('shoppingCartBuffer').length === 0) { if (wx.getStorageSync('shoppingCartBuffer').length === 0) {
this.resetShoppingCart() this.resetShoppingCart()
} else { } else {
...@@ -116,6 +116,24 @@ Page({ ...@@ -116,6 +116,24 @@ Page({
}, },
setShopInfo: function () { 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') let funcShopInfo = wx.getStorageSync('shopInfoBuffer')
this.setData({ this.setData({
shopInfo: funcShopInfo shopInfo: funcShopInfo
...@@ -346,8 +364,6 @@ Page({ ...@@ -346,8 +364,6 @@ Page({
funcItem = this.data.commodityDetail funcItem = this.data.commodityDetail
} }
console.log(funcItem)
// 判断购物车中是否存在同类商品 // 判断购物车中是否存在同类商品
// 修改相应的商品数量 // 修改相应的商品数量
if (funcShoppingCart.length !== 0) { if (funcShoppingCart.length !== 0) {
......
...@@ -94,6 +94,7 @@ Page({ ...@@ -94,6 +94,7 @@ Page({
'priceType': 1, 'priceType': 1,
'describe': funcResponse[i].synopsis, 'describe': funcResponse[i].synopsis,
'tags': funcResponse[i].tags, 'tags': funcResponse[i].tags,
'notificationId': funcResponse[i].notificationId, // 下单须知
} }
let funcUserType = wx.getStorageSync('userInfo').userType let funcUserType = wx.getStorageSync('userInfo').userType
...@@ -135,6 +136,7 @@ Page({ ...@@ -135,6 +136,7 @@ Page({
'priceType': 1, 'priceType': 1,
'describe': funcResponse[i].synopsis, 'describe': funcResponse[i].synopsis,
'tags': funcResponse[i].tags, 'tags': funcResponse[i].tags,
'notificationId': funcResponse[i].notificationId, // 下单须知
} }
let funcUserType = wx.getStorageSync('userInfo').userType let funcUserType = wx.getStorageSync('userInfo').userType
......
...@@ -2,92 +2,59 @@ let App = getApp() ...@@ -2,92 +2,59 @@ let App = getApp()
Page({ Page({
data: { data: {
shopInfo: {}, imageBase: App.globalData.appImageBase,
commodityTypeId: '', resourcesBase: App.globalData.appResourcesBase,
commodityList: [],
winLoading: false, banner: [],
projectType: 1, // 1 儿童营地,2 - SPA,3 - 文创, 5 - 餐品, 6 - 活动, 7 - 观影
bannerIndex: 0, bannerIndex: 0,
banner: [
{ shopAppId: [
id: 0,
img: ''
},
{
id: 1,
img: ''
},
{ {
id: 2, 'appId': 1,
img: '' 'commodityType': 3,
}, {
'appId': 7,
'commodityType': 2,
}, {
'appId': 3,
'commodityType': 1,
} }
], ],
projectAll: { shopCommodityData: [],
projectArt: {
projectType: 3,
btn: '购买门票',
titleImg: '',
list: []
},
projectSpa: {
projectType: 2,
btn: '查看服务',
list: []
},
projectChild: {
projectType: 1,
btn: '购买门票',
list: []
}
}
},
onLoad: function (options) {
this.setData({
shopInfo: wx.getStorageSync('shopInfoBuffer')
})
this.queryCommodityTab()
}, },
queryCommodityTab: function () { onLoad: function (options) {
App.wxRequest({ for (let i = 0, l = this.data.shopAppId.length; i < l; i++) {
url: '/api/v1/commodity/getClassifys', this.queryPassCheck(this.data.shopAppId[i].appId, this.data.shopAppId[i].commodityType, i)
data: {
'officeId': this.data.shopInfo.id,
'genre': this.data.shopInfo.shopType,
},
success: (response) => {
let funcResponse = response.data
this.setData({
commodityTypeId: funcResponse[0].id
})
this.queryCommodity()
} }
})
}, },
queryCommodity: function () { queryPassCheck: function (funcShopAppId, funcCommodityType, funcIndex) {
this.setData({ let funcShopId = ''
shopInfo: wx.getStorageSync('shopInfoBuffer') for (let i = 0, l = App.globalData.shopId.length; i < l; i++) {
}) if (funcShopAppId === App.globalData.shopId[i].appId) {
funcShopId = App.globalData.shopId[i].id
break
}
}
App.wxRequest({ App.wxRequest({
url: '/api/v1/commodity/getCommoditys', url: '/api/v1/commodity/getCommoditys',
data: { data: {
'officeId': this.data.shopInfo.id, 'officeId': funcShopId,
'classifyId': this.data.commodityTypeId, 'genre': funcCommodityType,
'genre': this.data.shopInfo.shopType,
}, },
success: (response) => { success: (response) => {
let funcCommodityList = [] let funcCommodityList = []
let funcResponse = response.data let funcResponse = response.data
switch (funcCommodityType) {
// 年卡月卡
case 1:
for (let i = 0, l = funcResponse.length; i < l; i++) { for (let i = 0, l = funcResponse.length; i < l; i++) {
let funcItem = { let funcItem = {
'id': funcResponse[i].id, // 商品标识 'id': funcResponse[i].id, // 商品标识
'typeId': funcResponse[i].classifyId, // 商品分类标识 'typeId': funcResponse[i].genre, // 商品类型
'inventoriesId': funcResponse[i].inventorie[0].inventoriesId, // 仓库标识 'inventoriesId': funcResponse[i].inventorie[0].inventoriesId, // 仓库标识
'name': funcResponse[i].name, 'name': funcResponse[i].name,
'cover': funcResponse[i].coverImg, // 商品封面 'cover': funcResponse[i].coverImg, // 商品封面
...@@ -97,9 +64,10 @@ Page({ ...@@ -97,9 +64,10 @@ Page({
'priceSpecialText': App.modular.utils.formatAmount(funcResponse[i].inventorie[0].ownerPrice), // 业主价文本格式 'priceSpecialText': App.modular.utils.formatAmount(funcResponse[i].inventorie[0].ownerPrice), // 业主价文本格式
'priceDiscount': funcResponse[i].inventorie[0].price, // 活动价 'priceDiscount': funcResponse[i].inventorie[0].price, // 活动价
'priceDiscountText': App.modular.utils.formatAmount(funcResponse[i].inventorie[0].price), // 活动价文本格式 'priceDiscountText': App.modular.utils.formatAmount(funcResponse[i].inventorie[0].price), // 活动价文本格式
'priceType': '', 'priceType': 1,
'describe': funcResponse[i].synopsis, 'describe': funcResponse[i].synopsis,
'tags': funcResponse[i].tags, 'tags': funcResponse[i].tags,
'notificationId': funcResponse[i].notificationId, // 下单须知
} }
let funcUserType = wx.getStorageSync('userInfo').userType let funcUserType = wx.getStorageSync('userInfo').userType
...@@ -115,24 +83,73 @@ Page({ ...@@ -115,24 +83,73 @@ Page({
funcItem.priceType = 3 funcItem.priceType = 3
} }
} }
funcCommodityList.push(funcItem) funcCommodityList.push(funcItem)
} }
break
// 普通商品
case 2:
// 门票商品
case 3:
default:
for (let i = 0, l = funcResponse.length; i < l; i++) {
let funcItem = {
'id': funcResponse[i].id, // 商品标识
'typeId': funcResponse[i].genre, // 商品分类标识
'inventoriesId': funcResponse[i].inventoriesId, // 仓库标识
'name': funcResponse[i].name,
'cover': funcResponse[i].coverImg, // 商品封面
'price': funcResponse[i].sightseerPrice, // 普通价
'priceText': App.modular.utils.formatAmount(funcResponse[i].sightseerPrice), // 普通价文本格式
'priceSpecial': funcResponse[i].ownerPrice, // 业主价
'priceSpecialText': App.modular.utils.formatAmount(funcResponse[i].ownerPrice), // 业主价文本格式
'priceDiscount': funcResponse[i].price, // 活动价
'priceDiscountText': App.modular.utils.formatAmount(funcResponse[i].price), // 活动价文本格式
'priceType': 1,
'describe': funcResponse[i].synopsis,
'tags': funcResponse[i].tags,
'notificationId': funcResponse[i].notificationId, // 下单须知
}
let funcUserType = wx.getStorageSync('userInfo').userType
// 根据后台判断价格显示类型
// 活动价优先级最高,如果存在活动价,则只显示活动价和普通价
if (funcItem.priceDiscount) {
funcItem.priceType = 1
} else {
// 活动价不存在,进一步判断普通价与业主价是否一致,如果不一致,则显示两者
if (funcItem.price !== funcItem.priceSpecial && funcUserType) {
funcItem.priceType = 2
} else {
funcItem.priceType = 3
}
}
funcCommodityList.push(funcItem)
}
break
}
let funcShopCommodityData = this.data.shopCommodityData
funcShopCommodityData[funcIndex] = funcCommodityList
this.setData({ this.setData({
winLoading: false, shopCommodityData: funcShopCommodityData,
commodityList: funcCommodityList,
}) })
}, },
}) })
}, },
onBuy: function () {
console.log(JSON.stringify(this.data.shopCommodityData) )
},
/** /**
* banner 切换图片同步自定义标识组件 * banner 切换图片同步自定义标识组件
* @function * @function
* @param {object} - funcEvent * @param {object} - funcEvent
* @returns * @returns
*/ */
onSwiperChange: function (funcEvent) { eventSwiperChange: function (funcEvent) {
this.setData({ this.setData({
bannerIndex: funcEvent.detail.current bannerIndex: funcEvent.detail.current
}) })
......
...@@ -26,110 +26,132 @@ ...@@ -26,110 +26,132 @@
left: 0; left: 0;
} }
.project-wrapper { /* 门店样式 */
.shop-list {
background: #F3F4F6;
}
.shop-item {
width: 670rpx; width: 670rpx;
margin-top: 48rpx; margin: 48rpx 40rpx 0 40rpx;
padding: 36rpx 32rpx 14rpx; padding: 32rpx;
background-color: #fff; border-radius: 4px;
background: #FFFFFF;
} }
.project-title {
height: 88rpx; .shop-name {
background-color: #ccc; width: 606rpx;
height: 70rpx;
} }
.project-item {
margin-top: 48rpx; .shop-name image {
padding-bottom: 50rpx; margin-right: 20rpx;
border-bottom: 1px solid #E2E7EF; }
/* 商品信息样式 */
.commodity-item {
height: 214rpx;
margin-top: 50rpx;
border-bottom: 1px #E2E7EF solid;
} }
.project-item:last-child {
.commodity-item:last-child {
border-bottom: none; border-bottom: none;
} }
.project-cover { .commodity-cover image {
width: 128rpx; width: 128rpx;
height: 128rpx; height: 128rpx;
background-color: #ccc; margin-right: 24rpx;
background: #999999;
} }
.project-content { .commodity-describe {
margin-left: 24rpx; position: relative;
flex: 1; flex-grow: 1;
} }
.project-info { .commodity-describe text:nth-child(1) {
height: 42rpx;
}
.project-name {
height: 46rpx;
color: #15191F;
font-size: 30rpx; 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; .commodity-describe text:nth-child(2) {
color: #959DA9; position: absolute;
top: 54rpx;
left: 0;
max-width: 320rpx;
max-height: 120rpx;
border: 1px red solid;
background: #FFFFFF;
overflow: hidden;
font-size: 22rpx; font-size: 22rpx;
} font-weight: 400;
.project-price-wrapper { line-height: 40rpx;
flex: 1; word-wrap: break-word;
height: 100%; color: #959DA9;
width: 100%;
}
.project-price-special {
}
.price-wrap {
color: #EF4E4E;
letter-spacing: 2rpx;
display: table-cell;
vertical-align: bottom;
} }
.price-symbol { .commodity-price-symbol {
height: 32rpx;
font-size: 24rpx; font-size: 24rpx;
font-weight: 500;
line-height: 32rpx;
color: #EF4E4E;
} }
.price-special { .commodity-price-value {
font-size: 34rpx; height: 32rpx;
font-size: 32rpx;
font-weight: 500;
line-height: 32rpx;
color: #EF4E4E;
} }
.price-special-msg {
.commodity-price-special {
display: inline-block;
width: 78rpx; width: 78rpx;
height: 32rpx; height: 32rpx;
color: #E8D0AF; margin: 0 0 0 8rpx;
font-size: 18rpx; border-radius: 4px;
background: linear-gradient(180deg, #3F4357 0%, #252532 100%);
text-align: center; text-align: center;
font-size: 18rpx;
font-weight: 500;
line-height: 32rpx; line-height: 32rpx;
background: linear-gradient(180deg, #3F4357 0%, #252532 100%); color: #E8D0AF;
border-radius: 4rpx; }
.commodity-price-through {
margin-top: 12rpx;
} }
.project-price-old {
.commodity-price-through text {
height: 32rpx; height: 32rpx;
color: #959DA9; font-size: 22rpx;
font-weight: 400;
line-height: 32rpx; line-height: 32rpx;
text-decoration: line-through; text-decoration: line-through;
color: #959DA9;
} }
.price-old {
font-size: 22rpx;
}
.price-symbol-old {
font-size: 20rpx;
}
.project-buy-wrapper {
flex: 1;
} .commodity-price-operation button {
.project-buy-btn {
width: 120rpx; width: 120rpx;
height: 56rpx; height: 56rpx;
margin-top: 24rpx; margin-top: 24rpx;
color: #fff; border-radius: 4px;
font-size: 22rpx; background: #86C5E1;
line-height: 56rpx;
text-align: center;
background-color: #86C5E1;
border-radius: 4rpx;
}
image { font-size: 22rpx;
width: 100%; font-weight: 500;
height: 100%; line-height: 32rpx;
color: #FFFFFF;
} }
\ No newline at end of file
...@@ -7,7 +7,6 @@ Page({ ...@@ -7,7 +7,6 @@ Page({
shopId: '', shopId: '',
shopName: '',
shopLogo: '', shopLogo: '',
shoppingCart: [], // 购物车列表 shoppingCart: [], // 购物车列表
shoppingCartSelection: 0, // 购物车选择数量 shoppingCartSelection: 0, // 购物车选择数量
...@@ -101,8 +100,7 @@ Page({ ...@@ -101,8 +100,7 @@ Page({
let funcShopInfo = wx.getStorageSync('shopInfoBuffer') let funcShopInfo = wx.getStorageSync('shopInfoBuffer')
this.setData({ this.setData({
shopId: funcShopInfo.id, shopId: funcShopInfo.id,
shopName: funcShopInfo.name, shopLogo: funcShopInfo.commodityLogo
shopLogo: funcShopInfo.logo
}) })
console.log(this.data.shopLogo) console.log(this.data.shopLogo)
...@@ -161,7 +159,7 @@ Page({ ...@@ -161,7 +159,7 @@ Page({
let funcShoppingCart = this.data.shoppingCart let funcShoppingCart = this.data.shoppingCart
if (funcShoppingCart[funcIndex].quantityMax <= funcShoppingCart[funcIndex].quantity) return if (funcShoppingCart[funcIndex].quantityMax <= funcShoppingCart[funcIndex].quantity) return
funcShoppingCart[funcIndex].quantity = funcShoppingCart[funcIndex].quantity + 1 funcShoppingCart[funcIndex].quantity = funcShoppingCart[funcIndex].quantity + 100
this.setData({ this.setData({
shoppingCart: funcShoppingCart shoppingCart: funcShoppingCart
}) })
...@@ -288,6 +286,15 @@ Page({ ...@@ -288,6 +286,15 @@ Page({
}, },
onPaySubmit: function () { onPaySubmit: function () {
// 优先检查用户是否已经注册,如果没有则跳转登录
let funcUserInfo = wx.getStorageSync('userInfo')
if (!funcUserInfo.isSignIn) {
wx.navigateTo({
url: '/pages/login/login'
})
return
}
// 检查购物车是否拥有商品 // 检查购物车是否拥有商品
let funcShoppingCart = this.data.shoppingCart let funcShoppingCart = this.data.shoppingCart
if (funcShoppingCart.length === 0) { if (funcShoppingCart.length === 0) {
......
...@@ -3,9 +3,8 @@ ...@@ -3,9 +3,8 @@
<l-toast show="{{winToast}}" icon="error" title="请选购商品后结算"></l-toast> <l-toast show="{{winToast}}" icon="error" title="请选购商品后结算"></l-toast>
<view class="container" wx:if="{{shoppingCart.length > 0}}"> <view class="container" wx:if="{{shoppingCart.length > 0}}">
<view class="shop-info row align-c"> <view class="shop-info row con-b align-c">
<image wx:if="{{shopLogo}}" src="{{resourcesBase + shopLogo}}" mode="left"></image> <image wx:if="{{shopLogo}}" src="{{resourcesBase + shopLogo}}" mode="widthFix"></image>
<text>{{shopName}}</text>
<text bindtap="onClearn">清空</text> <text bindtap="onClearn">清空</text>
</view> </view>
......
...@@ -12,33 +12,23 @@ ...@@ -12,33 +12,23 @@
.shop-info { .shop-info {
width: 750rpx; width: 750rpx;
height: 116rpx; height: 110rpx;
padding: 16rpx 40rpx; padding: 0 30rpx 0 40rpx;
font-size: 30rpx; font-size: 30rpx;
} }
.shop-info > image { .shop-info > image {
max-width: 120rpx; width: 380rpx;
height: 100%; height: 110rpx;
} }
.shop-info > text:nth-child(2) { .shop-info > text {
flex-grow: 1;
height: 42rpx; height: 42rpx;
font-size: 30rpx; font-size: 30rpx;
font-weight: 500; font-weight: 500;
line-height: 42rpx; line-height: 42rpx;
color: #586A46; color: #586A46;
} }
.shop-info > text:nth-child(3) {
flex-grow: 1;
height: 100rpx;
text-align: right;
line-height: 100rpx;
color: #656e7b;
}
.l-content { .l-content {
color: #959da9 !important; color: #959da9 !important;
} }
...@@ -134,6 +124,8 @@ ...@@ -134,6 +124,8 @@
font-weight: 400; font-weight: 400;
line-height: 32rpx; line-height: 32rpx;
color: #959DA9; color: #959DA9;
text-decoration: line-through;
} }
.list-item-quantity { .list-item-quantity {
......
...@@ -2,6 +2,8 @@ const App = getApp() ...@@ -2,6 +2,8 @@ const App = getApp()
Page({ Page({
data: { data: {
option: {},
height: '', height: '',
islogin: false, islogin: false,
isphone: false, isphone: false,
...@@ -10,6 +12,8 @@ Page({ ...@@ -10,6 +12,8 @@ Page({
}, },
onLoad: function (options) { onLoad: function (options) {
this.setData({ option: options })
let funcUserInfo = wx.getStorageSync('userInfo') let funcUserInfo = wx.getStorageSync('userInfo')
this.setData({ this.setData({
...@@ -38,7 +42,6 @@ Page({ ...@@ -38,7 +42,6 @@ Page({
*/ */
userInfoHandler: function (res) { userInfoHandler: function (res) {
let funcGetUserInfo = res.detail.userInfo let funcGetUserInfo = res.detail.userInfo
console.log('userInfo', res)
if (!res.detail.userInfo) { if (!res.detail.userInfo) {
return return
} }
...@@ -57,8 +60,6 @@ Page({ ...@@ -57,8 +60,6 @@ Page({
iv: '', iv: '',
}, },
success: (res) => { success: (res) => {
console.log(res)
wx.setStorageSync('userInfo', funcUserInfo)
this.setData({ this.setData({
islogin: true islogin: true
}) })
...@@ -88,14 +89,12 @@ Page({ ...@@ -88,14 +89,12 @@ Page({
}, },
success: (res) => { success: (res) => {
funcUserInfo.phone = res.data.phoneNumber funcUserInfo.phone = res.data.phoneNumber
wx.setStorageSync('userInfo', funcUserInfo)
this.setData({ this.setData({
isphone: true isphone: true
}) })
setTimeout(() => { setTimeout(() => {
this.checkFinish() this.checkFinish()
}, 1000) }, 1000)
} }
}) })
}, },
...@@ -113,7 +112,14 @@ Page({ ...@@ -113,7 +112,14 @@ Page({
checkFinish: function () { checkFinish: function () {
if (this.data.islogin && this.data.isphone) { if (this.data.islogin && this.data.isphone) {
// 在注册完成之后 login 一次,重新设置用户信息以及相关状态参数
console.log('注册成功')
App.globalData.token = ''
App.login({
success: () => {
wx.navigateBack({}) wx.navigateBack({})
} }
})
}
} }
}) })
\ No newline at end of file
...@@ -4,7 +4,7 @@ const App = getApp() ...@@ -4,7 +4,7 @@ const App = getApp()
Page({ Page({
data: { data: {
imageBase: App.globalData.appImageBase, imageBase: App.globalData.appImageBase,
passListType: 0, // 0为单张卡 1为多张卡 passListType: 1, // 0为单张卡 1为多张卡
privateStatus: true, privateStatus: true,
swiperCurrent: 0, swiperCurrent: 0,
passList: [ passList: [
......
...@@ -24,7 +24,7 @@ Page({ ...@@ -24,7 +24,7 @@ Page({
mobile: '', mobile: '',
nickName: '', nickName: '',
avatarUrl: '/pages/mine/home/image/avatar.png', avatarUrl: '/pages/mine/home/image/avatar.png',
stateTest: '去认证', statusText: '去认证',
mask: false, mask: false,
type: 0, //判断是否是认证的了 type: 0, //判断是否是认证的了
approveList: ['园区门票优惠', '餐厅价格优惠', 'SPA服务优惠', '免费观看电影', '无须预约入园', '尽享多重特权'], approveList: ['园区门票优惠', '餐厅价格优惠', 'SPA服务优惠', '免费观看电影', '无须预约入园', '尽享多重特权'],
...@@ -77,7 +77,8 @@ Page({ ...@@ -77,7 +77,8 @@ Page({
img: '', img: '',
title: '日落观光游船体验活动之船行碧波共赏美景', title: '日落观光游船体验活动之船行碧波共赏美景',
num: 3 num: 3
}] }],
orderListBackup: []
}, },
close() { close() {
...@@ -112,28 +113,93 @@ Page({ ...@@ -112,28 +113,93 @@ Page({
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 () { setUserInfo: function () {
let funcUserInfo = wx.getStorageSync('userInfo') let funcUserInfo = wx.getStorageSync('userInfo')
if (funcUserInfo.phone && funcUserInfo.name && funcUserInfo.avatar) { // 已为登录状态
if (funcUserInfo.isSignIn) {
funcUserInfo.phone = this.toHide(funcUserInfo.phone) 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({ this.setData({
type: funcUserInfo.userType,
statusText: funcStatusText,
isRegister: true, isRegister: true,
userInfo: funcUserInfo userInfo: funcUserInfo
}) })
App.login({
success: (token) => {
this.getMyActivityList() this.getMyActivityList()
// this.getList() this.getCardList()
this.getAuth() this.getWillUseOrders()
}
})
let funcUserType = funcUserInfo.userType
this.setData({
type: funcUserType === 1 ? 1 : 0,
})
} else { } else {
this.setData({ this.setData({
isRegister: false, isRegister: false,
...@@ -141,7 +207,6 @@ Page({ ...@@ -141,7 +207,6 @@ Page({
} }
}, },
// 登录注册页 // 登录注册页
checkRegister() { checkRegister() {
if (this.data.isRegister) { if (this.data.isRegister) {
...@@ -297,50 +362,11 @@ Page({ ...@@ -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) { toHide: function (array) {
var mphone = array.substring(0, 3) + '****' + array.substring(7); var mphone = array.substring(0, 3) + '****' + array.substring(7);
return mphone; return mphone;
}, },
// 二期代码 // 二期代码
onOrder: function () { onOrder: function () {
console.log('onOrder') console.log('onOrder')
...@@ -357,9 +383,30 @@ Page({ ...@@ -357,9 +383,30 @@ Page({
//查看更多 //查看更多
onShowMoreOrder: function () { onShowMoreOrder: function () {
let showMoreOrder = !this.data.showMoreOrder let showMoreOrder = !this.data.showMoreOrder
let orderList = `myOrder.artOrder.orderList`
console.log(JSON.parse(JSON.stringify(this.data.orderListBackup)));
if (showMoreOrder) {
// 展开
this.setData({ this.setData({
showMoreOrder [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,
})
}, },
onShowMoreActivity: function () { onShowMoreActivity: function () {
let showMoreActivity = !this.data.showMoreActivity let showMoreActivity = !this.data.showMoreActivity
......
<navigation class="navigation" titleText="我的" color="{{type == 1? '#FFFFFF' :''}}"></navigation> <navigation class="navigation" titleText="我的" color="{{type == 1? '#FFFFFF' :''}}"></navigation>
<view class="container"> <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> <image class="background-image" src="./image/mine.png"></image>
<view class="row align-c"> <view class="row align-c">
<view class="mine-avatar" bindtap="checkRegister"> <view class="mine-avatar" bindtap="checkRegister">
...@@ -58,15 +58,15 @@ ...@@ -58,15 +58,15 @@
</view> </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"> <view class="status-symbol col">
<text>业主认证</text> <text>业主认证</text>
<text>享受业主尊贵特权,预定消费专属优惠</text> <text>享受业主尊贵特权,预定消费专属优惠</text>
</view> </view>
<view class="status-operation row con-c align-c" bindtap="goApprove"> <view class="status-operation row con-c align-c" bindtap="goApprove">
<image wx:if="{{stateTest == '审核失败'}}" src="/image/fail-icon.png"></image> <image wx:if="{{statusText == '审核失败'}}" src="/image/fail-icon.png"></image>
<image wx:if="{{stateTest == '审核中'}}" src="/image/sh-icon.png"></image> <image wx:if="{{statusText == '审核中'}}" src="/image/sh-icon.png"></image>
<text>{{stateTest}}</text> <text>{{statusText}}</text>
</view> </view>
</view> </view>
...@@ -128,41 +128,40 @@ ...@@ -128,41 +128,40 @@
<view class="pass-bg-two" wx:if="{{myOrder.passOrder.length > 1}}"></view> <view class="pass-bg-two" wx:if="{{myOrder.passOrder.length > 1}}"></view>
<view class="pass-logo-wrapper row align-c"> <view class="pass-logo-wrapper row align-c">
<image src="{{myOrder.passOrder[0].logo}}"></image> <image src="{{myOrder.passOrder[0].logo}}"></image>
<text>{{myOrder.passOrder[0].store}}</text> <text>{{myOrder.passOrder[0].officeName}}</text>
</view> </view>
<view class="pass-title"> <view class="pass-title">
<text>{{myOrder.passOrder[0].title}}</text> <text>精灵鸟理想国{{myOrder.passOrder[0].name}}</text>
</view> </view>
<view class="pass-time"> <view class="pass-time">
<text>{{myOrder.passOrder[0].time}}</text> <text>有效期至{{myOrder.passOrder[0].expireTime}}</text>
</view> </view>
<view class="pass-name"> <view class="pass-name">
<text>{{myOrder.passOrder[0].name}}</text> <text>{{myOrder.passOrder[0].personName}}</text>
</view> </view>
<view class="pass-idNum"> <view class="pass-idNum">
<text>{{myOrder.passOrder[0].idNum}}</text> <text>{{myOrder.passOrder[0].identityCard}}</text>
</view> </view>
</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="goods-logo-wrapper row align-c">
<view class="art-logo"> <view class="art-logo">
<image src="{{myOrder.artOrder.logo}}"></image> <image src="{{myOrder.artOrder.logo}}"></image>
</view> </view>
<text>{{myOrder.artOrder.orderList[0].store}}</text> <text>{{item.officeName}}</text>
</view> </view>
<view class="goods-content row align-c"> <view class="goods-content row align-c">
<image src="{{item.cover}}" wx:for="{{myOrder.artOrder.orderList}}" wx:key="id"></image> <image src="{{k.imgUrl}}" wx:for="{{item.smOrderDetails}}" wx:for-item="k" wx:key="*this"></image>
<text wx:if="{{myOrder.artOrder.orderList.length === 1}}">{{myOrder.artOrder.orderList[0].title}}</text> <text wx:if="{{item.smOrderDetails.length == 1}}">{{item.smOrderDetails[0].name}}</text>
</view> </view>
<view class="goods-footer row align-c con-b"> <view class="goods-footer row align-c con-b">
<text>{{myOrder.artOrder.orderList[0].time}}</text> <text>有效期至{{item.time}}</text>
<text>{{myOrder.artOrder.orderList[0].quantity}}</text> <text>共{{item.smOrderDetails.length}}</text>
</view> </view>
</view> </view>
<!-- more --> <!-- more -->
<view class="more row align-c con-c" bindtap="onShowMoreOrder"> <view class="more row align-c con-c" bindtap="onShowMoreOrder">
<text wx:if="{{!showMoreOrder}}">展开更多</text> <text wx:if="{{!showMoreOrder}}">展开更多</text>
...@@ -292,57 +291,6 @@ ...@@ -292,57 +291,6 @@
<text>客服中心</text> <text>客服中心</text>
<image src="{{imageBase + 'icon/arrow-r-2.png'}}"></image> <image src="{{imageBase + 'icon/arrow-r-2.png'}}"></image>
</view> </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>
</view> </view>
......
.container { .container {
background: linear-gradient(180deg, #FFFFFF 0%, #F3F4F6 100%); background: linear-gradient(180deg, #fff 10%, #F3F4F6 20%);
/* background: #F3F4F6 */
} }
.navigation { .navigation {
z-index: 2; z-index: 2;
} }
...@@ -13,6 +15,7 @@ ...@@ -13,6 +15,7 @@
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
.mine { .mine {
position: relative; position: relative;
width: 750rpx; width: 750rpx;
...@@ -25,7 +28,7 @@ ...@@ -25,7 +28,7 @@
margin-right: 32rpx; margin-right: 32rpx;
} }
.mine-avatar > image { .mine-avatar>image {
width: 128rpx; width: 128rpx;
height: 128rpx; height: 128rpx;
border-radius: 50%; border-radius: 50%;
...@@ -61,10 +64,13 @@ ...@@ -61,10 +64,13 @@
padding: 41rpx 32rpx; padding: 41rpx 32rpx;
background-color: #fff; background-color: #fff;
border-radius: 4rpx; border-radius: 4rpx;
margin-top:48rpx;
} }
.cpopon-info { .cpopon-info {
flex: 1; flex: 1;
} }
.cpopon-info text:nth-child(1) { .cpopon-info text:nth-child(1) {
font-size: 34rpx; font-size: 34rpx;
font-weight: 600; font-weight: 600;
...@@ -76,6 +82,7 @@ ...@@ -76,6 +82,7 @@
font-size: 26rpx; font-size: 26rpx;
color: #161A1F; color: #161A1F;
} }
.coupon image { .coupon image {
width: 32rpx; width: 32rpx;
height: 32rpx; height: 32rpx;
...@@ -127,7 +134,7 @@ ...@@ -127,7 +134,7 @@
.menu { .menu {
width: 750rpx; width: 750rpx;
margin-top: 16rpx; /* margin-top: 16rpx; */
margin-bottom: 30rpx; margin-bottom: 30rpx;
padding: 0 48rpx; padding: 0 48rpx;
overflow-x: hidden; overflow-x: hidden;
...@@ -328,24 +335,30 @@ ...@@ -328,24 +335,30 @@
background-color: #fff; background-color: #fff;
border-radius: 4rpx; border-radius: 4rpx;
} }
.order-activity image { .order-activity image {
width: 32rpx; width: 32rpx;
height: 32rpx; height: 32rpx;
} }
.order-activity-title-wrapper { .order-activity-title-wrapper {
height: 48rpx; height: 48rpx;
} }
.order-activity-title { .order-activity-title {
font-size: 34rpx; font-size: 34rpx;
color: #15191F; color: #15191F;
font-weight: 600; font-weight: 600;
} }
.order-activity-icon-list { .order-activity-icon-list {
margin-top: 56rpx; margin-top: 56rpx;
} }
.order-activity-icon-wrapper { .order-activity-icon-wrapper {
flex: 1; flex: 1;
} }
.order-activity-icon { .order-activity-icon {
position: relative; position: relative;
width: 80rpx; width: 80rpx;
...@@ -353,10 +366,12 @@ ...@@ -353,10 +366,12 @@
background-color: #F5F6F8; background-color: #F5F6F8;
border-radius: 50%; border-radius: 50%;
} }
.order-activity-icon image{
.order-activity-icon image {
width: 48rpx; width: 48rpx;
height: 48rpx; height: 48rpx;
} }
.order-activity-badge { .order-activity-badge {
position: absolute; position: absolute;
top: -10rpx; top: -10rpx;
...@@ -370,9 +385,11 @@ ...@@ -370,9 +385,11 @@
background-color: #E66060; background-color: #E66060;
border-radius: 16rpx; border-radius: 16rpx;
} }
.badge-widen { .badge-widen {
width: 48rpx; width: 48rpx;
} }
.order-activity-icon-wrapper text { .order-activity-icon-wrapper text {
margin-top: 16rpx; margin-top: 16rpx;
font-size: 22rpx; font-size: 22rpx;
...@@ -394,6 +411,7 @@ ...@@ -394,6 +411,7 @@
border-radius: 4rpx; border-radius: 4rpx;
opacity: 0.81; opacity: 0.81;
} }
.pass-bg-one { .pass-bg-one {
position: absolute; position: absolute;
left: 0; left: 0;
...@@ -405,6 +423,7 @@ ...@@ -405,6 +423,7 @@
background: rgba(247, 179, 197, 0.5); background: rgba(247, 179, 197, 0.5);
border-radius: 4rpx 4rpx 0 0; border-radius: 4rpx 4rpx 0 0;
} }
.pass-bg-two { .pass-bg-two {
position: absolute; position: absolute;
left: 0; left: 0;
...@@ -417,33 +436,40 @@ ...@@ -417,33 +436,40 @@
background: rgba(247, 179, 197, 0.3); background: rgba(247, 179, 197, 0.3);
border-radius: 4rpx 4rpx 0 0; border-radius: 4rpx 4rpx 0 0;
} }
.pass-logo-wrapper { .pass-logo-wrapper {
height: 50rpx; height: 50rpx;
} }
.pass-logo-wrapper image { .pass-logo-wrapper image {
width: 64rpx; width: 64rpx;
height: 50rpx; height: 50rpx;
background-color: #ccc; background-color: #ccc;
} }
.pass-logo-wrapper text { .pass-logo-wrapper text {
height: 50rpx; height: 50rpx;
margin-left: 20rpx; margin-left: 20rpx;
font-size: 26rpx; font-size: 26rpx;
line-height: 50rpx; line-height: 50rpx;
} }
.pass-title { .pass-title {
margin-top: 24rpx; margin-top: 24rpx;
font-size: 42rpx; font-size: 42rpx;
font-weight: 600; font-weight: 600;
} }
.pass-time { .pass-time {
margin-top: 8rpx; margin-top: 8rpx;
font-size: 26rpx; font-size: 26rpx;
} }
.pass-name { .pass-name {
margin-top: 32rpx; margin-top: 32rpx;
font-size: 22rpx; font-size: 22rpx;
} }
.pass-idNum { .pass-idNum {
margin-top: 8rpx; margin-top: 8rpx;
font-size: 22rpx; font-size: 22rpx;
...@@ -456,10 +482,12 @@ ...@@ -456,10 +482,12 @@
background-color: #F5F6F8; background-color: #F5F6F8;
border-radius: 4rpx; border-radius: 4rpx;
} }
.goods-logo-wrapper { .goods-logo-wrapper {
height: 100rpx; height: 100rpx;
margin-top: 40rpx; margin-top: 40rpx;
} }
.goods-logo-wrapper text { .goods-logo-wrapper text {
height: 100rpx; height: 100rpx;
margin-left: 20rpx; margin-left: 20rpx;
...@@ -467,24 +495,29 @@ ...@@ -467,24 +495,29 @@
color: #15191F; color: #15191F;
line-height: 100rpx; line-height: 100rpx;
} }
.goods-content { .goods-content {
height: 136rpx; height: 136rpx;
} }
.goods-content image{
.goods-content image {
width: 140rpx; width: 140rpx;
height: 136rpx; height: 136rpx;
margin-right: 32rpx; margin-right: 32rpx;
background-color: #ccc; background-color: #ccc;
} }
.goods-content text { .goods-content text {
font-size: 30rpx; font-size: 30rpx;
color: #15191F; color: #15191F;
font-weight: 600; font-weight: 600;
line-height: 42rpx; line-height: 42rpx;
} }
.goods-footer { .goods-footer {
height: 84rpx; height: 84rpx;
} }
.goods-footer text { .goods-footer text {
font-size: 26rpx; font-size: 26rpx;
color: #959DA9; color: #959DA9;
...@@ -509,6 +542,7 @@ ...@@ -509,6 +542,7 @@
background-color: #F5F6F8; background-color: #F5F6F8;
border-radius: 4rpx; border-radius: 4rpx;
} }
.appointment-time { .appointment-time {
position: absolute; position: absolute;
left: 0; left: 0;
...@@ -523,23 +557,26 @@ ...@@ -523,23 +557,26 @@
border-radius: 4rpx; border-radius: 4rpx;
} }
.appointment-activity-content { .appointment-activity-content {}
}
.appointment-activity-img { .appointment-activity-img {
width: 140rpx; width: 140rpx;
height: 136rpx; height: 136rpx;
background-color: #ccc; background-color: #ccc;
} }
.appointment-activity-info { .appointment-activity-info {
flex: 1; flex: 1;
margin-left: 32rpx; margin-left: 32rpx;
} }
.appointment-activity-title { .appointment-activity-title {
color: #15191F; color: #15191F;
font-size: 30rpx; font-size: 30rpx;
font-weight: 600; font-weight: 600;
line-height: 42rpx; line-height: 42rpx;
} }
.appointment-activity-num { .appointment-activity-num {
margin-top: 16rpx; margin-top: 16rpx;
color: #959DA9; color: #959DA9;
...@@ -550,6 +587,7 @@ ...@@ -550,6 +587,7 @@
width: 305rpx; width: 305rpx;
height: 110rpx; height: 110rpx;
} }
.border-right { .border-right {
width: 1rpx; width: 1rpx;
height: 75rpx; height: 75rpx;
...@@ -571,10 +609,12 @@ ...@@ -571,10 +609,12 @@
.more { .more {
margin-top: 32rpx; margin-top: 32rpx;
} }
.more text { .more text {
font-size: 26rpx; font-size: 26rpx;
color: #15191F; color: #15191F;
} }
.more image { .more image {
margin-left: 8rpx; margin-left: 8rpx;
} }
...@@ -587,15 +627,18 @@ ...@@ -587,15 +627,18 @@
background-color: #fff; background-color: #fff;
border-radius: 4rpx; border-radius: 4rpx;
} }
.service text { .service text {
font-size: 34rpx; font-size: 34rpx;
color: #15191F; color: #15191F;
font-weight: 600; font-weight: 600;
} }
.service image { .service image {
width: 32rpx; width: 32rpx;
height: 32rpx; height: 32rpx;
} }
image { image {
width: 100%; width: 100%;
height: 100%; height: 100%;
......
...@@ -15,13 +15,15 @@ Page({ ...@@ -15,13 +15,15 @@ Page({
address: '', address: '',
}, },
onLoad: function (options) { onLoad: function (options) {
let funcUserInfo = wx.getStorageSync('userInfo')
let mobile = wx.getStorageSync('mobile')
let nickName = wx.getStorageSync('nickName') let mobile = funcUserInfo.phone
let avatarUrl = wx.getStorageSync('avatarUrl') let nickName = funcUserInfo.name
let sex = wx.getStorageSync('sex') let avatarUrl = funcUserInfo.avatar
let birthday = wx.getStorageSync('birthday') let sex = funcUserInfo.sex
let address = wx.getStorageSync('address') let birthday = funcUserInfo.birthday
let address = birthday.address
this.setData({ this.setData({
mobile: this.toHide(mobile), mobile: this.toHide(mobile),
nickName: nickName, nickName: nickName,
......
...@@ -4,6 +4,9 @@ Page({ ...@@ -4,6 +4,9 @@ Page({
data: { data: {
imageBase: App.globalData.appImageBase, imageBase: App.globalData.appImageBase,
resourcesBase: App.globalData.appResourcesBase, resourcesBase: App.globalData.appResourcesBase,
option: {},
orderTypeTitle: '全部分类', orderTypeTitle: '全部分类',
orderTypeHeight: 0, orderTypeHeight: 0,
orderType: [], orderType: [],
...@@ -18,7 +21,7 @@ Page({ ...@@ -18,7 +21,7 @@ Page({
'name': '待付款' 'name': '待付款'
}, },
{ {
'value': '1', 'value': '2',
'name': '待使用' 'name': '待使用'
}, },
{ {
...@@ -34,6 +37,7 @@ Page({ ...@@ -34,6 +37,7 @@ Page({
isFinished: false isFinished: false
}, },
onLoad: function (options) { onLoad: function (options) {
this.setData({ option: options })
this.setOrderType() this.setOrderType()
}, },
...@@ -87,6 +91,7 @@ Page({ ...@@ -87,6 +91,7 @@ Page({
'status': Number(funcResponse[i].status), 'status': Number(funcResponse[i].status),
'amount': funcResponse[i].totalMoney, 'amount': funcResponse[i].totalMoney,
'commodity': [], 'commodity': [],
'commodityType': Number(funcResponse[i].goodType),
'wxRequest': funcResponse[i].wxRequest 'wxRequest': funcResponse[i].wxRequest
} }
...@@ -219,9 +224,15 @@ Page({ ...@@ -219,9 +224,15 @@ Page({
}, },
onNavigationBack: function () { onNavigationBack: function () {
if (this.data.option.fromPage) {
wx.switchTab({
url: '/pages/mine/home/home',
})
} else {
wx.navigateBack({ wx.navigateBack({
'delta': 1 'delta': 1
}) })
}
}, },
/** /**
...@@ -451,14 +462,16 @@ Page({ ...@@ -451,14 +462,16 @@ Page({
* @returns * @returns
*/ */
onOrderAgain: function (event) { onOrderAgain: function (event) {
let item = event.currentTarget.dataset.item 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 : "" let shopAppId = wx.getStorageSync('shopInfoBuffer') ? wx.getStorageSync('shopInfoBuffer').appId : ""
wx.navigateTo({ wx.navigateTo({
url: `/pages/commodity/menu-food/menu-food?formPage=order&shopAppId=${shopAppId}&commodityType=${commodityType}`, url: `/pages/commodity/menu-food/menu-food?formPage=order&shopAppId=${shopAppId}&commodityType=${commodityType}`,
}) })
}, },
/** /**
...@@ -468,7 +481,6 @@ Page({ ...@@ -468,7 +481,6 @@ Page({
* @returns * @returns
*/ */
onReachBottom: function () { onReachBottom: function () {
this.setData({ this.setData({
orderPages: this.data.orderPages + 1 orderPages: this.data.orderPages + 1
}) })
......
...@@ -2,6 +2,8 @@ let App = getApp() ...@@ -2,6 +2,8 @@ let App = getApp()
Page({ Page({
data: { data: {
swiperCurrent: 0,
showCodePopup: false,
imageBase: App.globalData.appImageBase, imageBase: App.globalData.appImageBase,
resourcesBase: App.globalData.appResourcesBase, resourcesBase: App.globalData.appResourcesBase,
...@@ -15,6 +17,45 @@ Page({ ...@@ -15,6 +17,45 @@ Page({
isFromUse: false, isFromUse: false,
winCode: false, winCode: false,
residuePayTime: "", //剩余支付时间 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({ ...@@ -27,11 +68,58 @@ Page({
fromPage: options.fromPage === 'order' ? 'order' : '', fromPage: options.fromPage === 'order' ? 'order' : '',
isFromUse: options.showCode === 'true' ? true : false, isFromUse: options.showCode === 'true' ? true : false,
}) })
App.login({
console.log(this.data.shopInfo) timeout: 0,
success: (result) => {
this.queryOrderDetail() 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 * @function
...@@ -59,7 +147,8 @@ Page({ ...@@ -59,7 +147,8 @@ Page({
'tipOrderNo': funcResponse.orderSerialNumber, // 订单编号 'tipOrderNo': funcResponse.orderSerialNumber, // 订单编号
'tipTimeSubmit': funcResponse.createDate, 'tipTimeSubmit': funcResponse.createDate,
'tipTimePay': App.modular.miment(funcResponse.paymentTime).format('YYYY-MM-DD hh:mm:ss'), '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({ ...@@ -119,7 +208,7 @@ Page({
}, },
// 弹出单张二维码
onCouponCode: function (event) { onCouponCode: function (event) {
let funcOrderInfo = event.currentTarget.dataset.item let funcOrderInfo = event.currentTarget.dataset.item
App.wxRequest({ App.wxRequest({
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
</view> </view>
</view> </view>
<view class="state-content state-content-invalid col con-c" wx:if="{{orderInfo.state === 3}}"> <view class="state-content state-content-invalid col con-c" wx:if="{{orderInfo.state === 6}}">
<view class="state-content-title row"> <view class="state-content-title row">
<text>订单已评价</text> <text>订单已评价</text>
</view> </view>
...@@ -56,10 +56,12 @@ ...@@ -56,10 +56,12 @@
<text class="info-content-item-label"></text> <text class="info-content-item-label"></text>
<text class="info-content-item-describe">周一至周日 10:00 - 20:00</text> <text class="info-content-item-describe">周一至周日 10:00 - 20:00</text>
</view> </view>
<image class="seal-shot" src="{{sealTest}}"></image>
</view> </view>
</block> </block>
<!-- 普通商品 --> <!-- 普通商品 -->
<block wx:if="{{orderInfo.commodityType === 2}}"> <block wx:if="{{orderInfo.commodityType === 2}}">
<view class="info-content col con-c"> <view class="info-content col con-c">
<view class="info-content-item row"> <view class="info-content-item row">
...@@ -79,24 +81,28 @@ ...@@ -79,24 +81,28 @@
<text class="info-content-item-tip">18030303030</text> <text class="info-content-item-tip">18030303030</text>
</view> </view>
</view> </view>
<block wx:if="{{orderInfo.state===2}}">
<view class="info-line row con-b align-c"> <view class="info-line row con-b align-c">
<view class="info-line-point-left"></view> <view class="info-line-point-left"></view>
<view class="info-line-line"></view> <view class="info-line-line"></view>
<view class="info-line-point-right"></view> <view class="info-line-point-right"></view>
<image class="seal-long" src="{{sealBig}}"></image>
</view> </view>
<view class="info-code col con-c align-c"> <view class="info-code col con-c align-c">
<text>{{'件餐品可用'}}</text> <text>{{'件餐品可用'}}</text>
<button class="row con-c align-c">一键扫码</button> <button bindtap="onFastScan" class="row con-c align-c">一键扫码</button>
<text>{{'2019.09.30 - 2020.12.30'}}</text> <text>{{'2019.09.30 - 2020.12.30'}}</text>
</view> </view>
</block> </block>
</block>
<!-- 餐品 --> <!-- 餐品 -->
<block wx:if="{{orderInfo.commodityType === 5}}"> <block wx:if="{{orderInfo.commodityType === 5}}">
<view class="info-content col con-c"> <view class="info-content col con-c {{ orderInfo.state!==2?'p-relative':'' }}">
<view class="info-content-item row"> <view class="info-content-item row">
<text class="info-content-item-label">使用门店</text> <text class="info-content-item-label">使用门店</text>
<text class="info-content-item-title">{{shopInfo.name}}</text> <text class="info-content-item-title">{{orderInfo.officeName}}</text>
</view> </view>
<view class="info-content-item row"> <view class="info-content-item row">
<text class="info-content-item-label"></text> <text class="info-content-item-label"></text>
...@@ -104,27 +110,31 @@ ...@@ -104,27 +110,31 @@
</view> </view>
<view class="info-content-item row"> <view class="info-content-item row">
<text class="info-content-item-label">订单信息</text> <text class="info-content-item-label">订单信息</text>
<text class="info-content-item-tip">儿童营地</text> <text class="info-content-item-tip">{{orderInfo.contactName}}</text>
</view> </view>
<view class="info-content-item row"> <view class="info-content-item row">
<text class="info-content-item-label"></text> <text class="info-content-item-label"></text>
<text class="info-content-item-tip">18030303030</text> <text class="info-content-item-tip">{{orderInfo.contactPhone}}</text>
</view> </view>
<image wx:if="{{orderInfo.state!==2}}" class="seal-shot" src="{{sealTest}}"></image>
</view> </view>
<block wx:if="{{orderInfo.state===2}}">
<view class="info-line row con-b align-c"> <view class="info-line row con-b align-c">
<view class="info-line-point-left"></view> <view class="info-line-point-left"></view>
<view class="info-line-line"></view> <view class="info-line-line"></view>
<view class="info-line-point-right"></view> <view class="info-line-point-right"></view>
<image class="seal-long" src="{{sealBig}}"></image>
</view> </view>
<view class="info-code col con-c align-c"> <view class="info-code col con-c align-c">
<text>{{'件餐品可用'}}</text> <text>{{'件餐品可用'}}</text>
<button class="row con-c align-c">一键扫码</button> <button bindtap="onFastScan" class="row con-c align-c">一键扫码</button>
<text>{{'2019.09.30 - 2020.12.30'}}</text> <text>{{'2019.09.30 - 2020.12.30'}}</text>
</view> </view>
</block> </block>
</block>
<!-- 活动 --> <!-- 活动 -->
<block wx:if="{{orderInfo.commodityType === -1}}"> <block wx:if="{{orderInfo.commodityType === -1}}">
<view class="info-content col con-c"> <view class="info-content col con-c">
<view class="info-content-item row"> <view class="info-content-item row">
...@@ -147,21 +157,24 @@ ...@@ -147,21 +157,24 @@
<text class="info-content-item-label"></text> <text class="info-content-item-label"></text>
<text class="info-content-item-tip">18030303030</text> <text class="info-content-item-tip">18030303030</text>
</view> </view>
<block wx:if="{{orderInfo.state===2}}">
<view class="info-line row con-b align-c"> <view class="info-line row con-b align-c">
<view class="info-line-point-left"></view> <view class="info-line-point-left"></view>
<view class="info-line-line"></view> <view class="info-line-line"></view>
<view class="info-line-point-right"></view> <view class="info-line-point-right"></view>
<image class="seal-long" src="{{sealBig}}"></image>
</view> </view>
<view class="info-code col con-c align-c"> <view class="info-code col con-c align-c">
<text>{{'张门票可用'}}</text> <text>{{'张门票可用'}}</text>
<button class="row con-c align-c">一键扫码</button> <button bindtap="onFastScan" class="row con-c align-c">一键扫码</button>
<text>{{'2019.09.30 - 2020.12.30'}}</text> <text>{{'2019.09.30 - 2020.12.30'}}</text>
</view> </view>
</block>
</view> </view>
</block> </block>
<!-- 观影 --> <!-- 观影 -->
<block wx:if="{{orderInfo.commodityType === -2}}"> <block wx:if="{{orderInfo.commodityType === -2}}">
<view class="info-content col con-c"> <view class="info-content col con-c">
<view class="info-content-item row"> <view class="info-content-item row">
...@@ -181,18 +194,21 @@ ...@@ -181,18 +194,21 @@
<text class="info-content-item-tip">18030303030</text> <text class="info-content-item-tip">18030303030</text>
</view> </view>
</view> </view>
<block wx:if="{{orderInfo.state===2}}">
<view class="info-line row con-b align-c"> <view class="info-line row con-b align-c">
<view class="info-line-point-left"></view> <view class="info-line-point-left"></view>
<view class="info-line-line"></view> <view class="info-line-line"></view>
<view class="info-line-point-right"></view> <view class="info-line-point-right"></view>
<image class="seal-long" src="{{sealBig}}"></image>
</view> </view>
<view class="info-code col con-c align-c"> <view class="info-code col con-c align-c">
<text>{{'张电影票可用'}}</text> <text>{{'张电影票可用'}}</text>
<button class="row con-c align-c">一键扫码</button> <button bindtap="onFastScan" class="row con-c align-c">一键扫码</button>
<text>{{'2019.09.30 - 2020.12.30'}}</text> <text>{{'2019.09.30 - 2020.12.30'}}</text>
</view> </view>
</block> </block>
</block>
</view> </view>
<!-- 商品信息 --> <!-- 商品信息 -->
...@@ -203,7 +219,7 @@ ...@@ -203,7 +219,7 @@
<view class="commodity-list"> <view class="commodity-list">
<view class="commodity-shop-info row align-c"> <view class="commodity-shop-info row align-c">
<image src="{{resourcesBase + shopInfo.logo}}"></image> <image src="{{resourcesBase + shopInfo.logo}}"></image>
<text>{{shopInfo.name}}</text> <text>{{orderInfo.officeName}}</text>
</view> </view>
<block wx:for="{{orderInfo.commodity}}" wx:for-index="index" wx:for-item="item" wx:key="index"> <block wx:for="{{orderInfo.commodity}}" wx:for-index="index" wx:for-item="item" wx:key="index">
<view class="commodity-item row align-c"> <view class="commodity-item row align-c">
...@@ -218,7 +234,10 @@ ...@@ -218,7 +234,10 @@
</view> </view>
</view> </view>
<view class="commodity-item-operation" wx:if="{{item.codeId}}"> <view class="commodity-item-operation" wx:if="{{item.codeId}}">
<button class="row con-c align-c" data-item="{{item}}" bindtap="onCouponCode">查看券码</button> <!-- 状态(0已过期1带使用2已使用) -->
<button wx:if="{{item.state==1}}" class="row con-c align-c" data-item="{{item}}" bindtap="onCouponCode">查看券码</button>
<button wx:if="{{item.state==0}}" disabled class="row con-c align-c btn-disabled">已过期</button>
<button wx:if="{{item.state==2}}" disabled class="row con-c align-c btn-disabled">已使用</button>
</view> </view>
</view> </view>
</block> </block>
...@@ -237,14 +256,48 @@ ...@@ -237,14 +256,48 @@
</view> </view>
</view> </view>
<view class="tip-describe col"> <view class="tip-describe col">
<text>{{'订单编号:' + orderInfo.tipOrderNo}}</text> <text>{{'订单编号:' +( orderInfo.tipOrderNo?orderInfo.tipOrderNo:"")}}</text>
<text>{{'下单时间:' + orderInfo.tipTimeSubmit}}</text> <text>{{'下单时间:' + (orderInfo.tipTimeSubmit?orderInfo.tipTimeSubmit:'')}}</text>
<text wx:if="{{orderInfo.state !== 0 && orderInfo.state !== -1}}">{{'付款时间:' + orderInfo.tipTimePay}}</text> <text wx:if="{{orderInfo.state !== 0 && orderInfo.state !== -1}}">{{'付款时间:' + (orderInfo.tipTimePay?orderInfo.tipTimePay:'')}}</text>
<text wx:if="{{orderInfo.state !== 0 && orderInfo.state !== -1}}">{{'获得积分:' + orderInfo.tipIntegral}}</text> <text wx:if="{{orderInfo.state !== 0 && orderInfo.state !== -1}}">{{'获得积分:' + (orderInfo.tipIntegral?orderInfo.tipIntegral:'')}}</text>
</view> </view>
</view> </view>
</view> </view>
<!-- 多张 扫码弹窗 -->
<l-popup show="{{showCodePopup}}" l-class="l-popup-bg">
<view class="scan-code-wrapper col align-c">
<view class="code-header">{{codeList.length}}件商品可用</view>
<view class="code-tips">请将券码出示给门店核销人员</view>
<swiper class="code-main" next-margin="64rpx" bindchange="swiperChange">
<swiper-item wx:for="{{codeList}}" wx:key="id">
<view class="code-item col con-c align-c {{index === swiperCurrent ? 'item-center' : ''}}">
<view class="code-item-title">{{item.name}}</view>
<view class="code-img">
<image mode="widthFix" src="{{'data:image/jpg;base64,'+item.qrcode}}"></image>
</view>
<view class="code-num-wrapper row align-c con-a">
<view class="code-num-title {{codeUsed ? 'code-used' : ''}}">券码{{index+1}}:</view>
<view class="code-num {{codeUsed ? 'code-used' : ''}}">{{item.serialNumber}}</view>
<view class="num-copy" wx:if="{{!codeUsed}}" bindtap="setClipboard" data-index="{{index}}">复制</view>
</view>
<view class="code-used-seal" wx:if="{{codeUsed}}">
<image mode="widthFix" src="./image/used.png"></image>
</view>
</view>
</swiper-item>
</swiper>
<view class="img-num row align-c">
<text class="current-img-num">{{swiperCurrent+1}}</text>
<text class="symbol-img-num"> / </text>
<text class="total-img-num">{{codeList.length}}</text>
</view>
<view class="code-close-btn row con-c align-c" bindtap="closeQRcode">
<image mode="widthFix" src="/image/icon_close.png"></image>
</view>
</view>
</l-popup>
<!-- 二维码弹窗 --> <!-- 二维码弹窗 -->
<view class="code-mask row con-c align-c" wx:if="{{winCode}}"> <view class="code-mask row con-c align-c" wx:if="{{winCode}}">
<view class="code col con-c align-c"> <view class="code col con-c align-c">
......
...@@ -45,12 +45,14 @@ ...@@ -45,12 +45,14 @@
} }
.info-content { .info-content {
position: relative;
width: 670rpx; width: 670rpx;
min-height: 206rpx; min-height: 206rpx;
padding: 48rpx 32rpx; padding: 48rpx 32rpx;
background: #F3F4F6; background: #F3F4F6;
border-radius: 4px; border-radius: 4px;
overflow: hidden; overflow: hidden;
} }
.info-content-item { .info-content-item {
...@@ -183,7 +185,7 @@ ...@@ -183,7 +185,7 @@
background: #F3F4F6; background: #F3F4F6;
} }
.commodity-shop-info > image { .commodity-shop-info>image {
max-width: 62rpx; max-width: 62rpx;
max-height: 62rpx; max-height: 62rpx;
margin-right: 16rpx; margin-right: 16rpx;
...@@ -195,7 +197,7 @@ ...@@ -195,7 +197,7 @@
border-bottom: 1px #E2E7EF solid; border-bottom: 1px #E2E7EF solid;
} }
.commodity-item > image { .commodity-item>image {
width: 140rpx; width: 140rpx;
height: 136rpx; height: 136rpx;
margin-right: 24rpx; margin-right: 24rpx;
...@@ -206,7 +208,7 @@ ...@@ -206,7 +208,7 @@
margin-right: 32rpx; margin-right: 32rpx;
} }
.commodity-item-operation > button { .commodity-item-operation>button {
width: 120rpx; width: 120rpx;
height: 56rpx; height: 56rpx;
border-radius: 4px; border-radius: 4px;
...@@ -217,6 +219,10 @@ ...@@ -217,6 +219,10 @@
line-height: 32rpx; line-height: 32rpx;
color: #FFFFFF; color: #FFFFFF;
} }
.commodity-item-operation>button.btn-disabled {
background: #C8E1EC;
color: #FFFFFF;
}
.commodity-list .commodity-item:last-child { .commodity-list .commodity-item:last-child {
border: none; border: none;
...@@ -300,7 +306,7 @@ ...@@ -300,7 +306,7 @@
margin-top: 56rpx; margin-top: 56rpx;
} }
.code-info-qrcode > image { .code-info-qrcode>image {
display: block; display: block;
width: 296rpx; width: 296rpx;
height: 296rpx; height: 296rpx;
...@@ -355,7 +361,463 @@ ...@@ -355,7 +361,463 @@
background: #A9A8A7; background: #A9A8A7;
} }
.code-close > image { .code-close>image {
width: 48rpx; width: 48rpx;
height: 48rpx; height: 48rpx;
} }
/* 印章图 */
.seal-shot {
width: 166rpx;
height: 166rpx;
position: absolute;
right: -30rpx;
bottom: -30rpx;
}
.seal-long {
width: 166rpx;
height: 200rpx;
position: absolute;
right: 0;
bottom: -30rpx;
}
.p-relative {
position: relative;
}
/* 扫码弹窗 */
.order-status {
width: 670rpx;
height: 240rpx;
margin: 64rpx auto 0;
padding-left: 32rpx;
color: #15191F;
background-color: #ECF4F8;
}
.status-text {
font-size: 54rpx;
font-weight: 600;
}
.status-tips {
margin-top: 24rpx;
}
.bgPink {
background-color: #F3E1E1;
}
.ticket-wrapper {
width: 670rpx;
margin: 64rpx auto 0;
}
.ticket-main {
position: relative;
width: 100%;
padding: 48rpx 32rpx 46rpx;
background-color: #F3F4F6;
border-bottom: 1px dashed #E2E7EF;
}
.ticket-left {
width: 152rpx;
display: table-cell;
vertical-align: bottom;
font-size: 26rpx;
color: #959DA9;
}
.ticket-right {
flex: 1;
font-size: 26rpx;
}
.ticket-store {
font-size: 38rpx;
color: #15191F;
font-weight: 600;
}
.ticket-row-time,
.ticket-row-phone {
margin-top: 16rpx;
}
.ticket-time,
.ticket-address,
.ticket-date {
font-size: 30rpx;
line-height: 42rpx;
}
.ticket-info {
margin-top: 48rpx;
}
.seal-wrapper {
position: absolute;
right: 0;
bottom: -32rpx;
width: 166rpx;
height: 200rpx;
}
.seal {
width: 100%;
height: 100%;
}
.circle {
position: absolute;
left: -18rpx;
bottom: -18rpx;
width: 36rpx;
height: 36rpx;
border-radius: 50%;
background-color: #fff;
}
.ticket-footer {
padding: 50rpx 32rpx 24rpx;
background-color: #F3F4F6;
}
.ticket-footer-top {
font-size: 34rpx;
color: #15191F;
}
.ticket-footer-middle {
width: 606rpx;
height: 96rpx;
line-height: 96rpx;
margin: 40rpx 0;
color: #fff;
text-align: center;
background-color: #86C5E1;
border-radius: 4rpx;
}
.ticket-footer-bottom {
font-size: 26rpx;
color: #959DAA;
}
/* 扫码弹窗 */
.scan-code-wrapper {}
.code-header {
height: 70rpx;
color: #fff;
font-size: 30rpx;
text-align: center;
}
.code-tips {
height: 92rpx;
color: #fff;
font-size: 26rpx;
text-align: center;
}
.code-main {
width: 750rpx;
height: 666rpx;
}
.code-item {
position: relative;
width: 526rpx;
height: 666rpx;
background-color: #fff;
border-radius: 4rpx;
}
.item-center {
margin-left: 112rpx;
}
.code-item-title {
color: #15191F;
font-size: 30rpx;
font-weight: 600;
}
.code-img {
width: 296rpx;
height: 296rpx;
margin: 56rpx 0;
}
.code-num-wrapper {
width: 446rpx;
height: 96rpx;
padding: 0 24rpx;
background-color: #F2F3F5;
border-radius: 4rpx;
line-height: 96rpx;
}
.code-num-title {
color: #959DA9;
text-decoration: none !important;
font-size: 26rpx;
}
.code-num {
color: #15191F;
font-size: 30rpx;
}
.code-used {
color: #C2C7CF;
text-decoration: line-through;
}
.num-copy {
color: #5DB5DD;
font-size: 26rpx;
}
.code-used-seal {
position: absolute;
right: -68rpx;
transform: translateY(56rpx);
width: 254rpx;
height: 254rpx;
}
.img-num {
margin-top: 54rpx;
}
.current-img-num {
color: #fff;
font-size: 34rpx;
}
.symbol-img-num,
.total-img-num {
color: #979797;
font-size: 26rpx;
}
.code-close-btn {
width: 80rpx;
height: 80rpx;
margin-top: 35rpx;
background: rgba(254, 252, 249, 0.5);
border-radius: 50%;
}
.code-close-btn image {
width: 60%;
}
.l-popup-bg {
background: rgba(0, 0, 0, .4);
}
.tips-wrapper {
margin: 40rpx 40rpx 0;
}
.notice-wrapper {
width: 100%;
height: 100rpx;
padding: 0 40rpx;
line-height: 100rpx;
}
.notice {
margin-right: 8rpx;
color: #15191F;
font-size: 26rpx;
}
.notice-popup-wrapper {
padding: 56rpx 40rpx 68rpx;
background-color: #fff;
border-radius: 24rpx 24rpx 0 0;
}
.notice-popup-title {
width: 100%;
height: 90rpx;
}
.notice-content {
max-height: 896rpx;
}
.goods-wrapper {
padding: 32rpx 40rpx 0;
}
.goods-title {
color: #15191F;
font-size: 34rpx;
font-weight: 600;
}
.goods-list {
margin-top: 40rpx;
padding: 0 32rpx 14rpx;
background-color: #F5F6F8;
}
.goods-list-title-wrapper {
width: 100%;
height: 132rpx;
}
.goods-list-title-img {
min-width: 40rpx;
min-height: 54rpx;
max-width: 74rpx;
max-height: 74rpx;
}
.goods-list-title {
margin-left: 16rpx;
color: #15191F;
font-size: 26rpx;
font-weight: 600;
}
.goods-item {
margin-bottom: 22rpx;
padding-bottom: 22rpx;
border-bottom: 1px solid #E2E7EF;
}
.goods-item:last-child {
margin-bottom: 0rpx;
border-bottom: none;
}
.goods-item-img {
width: 140rpx;
height: 136rpx;
}
.goods-item-info {
flex: 1;
padding-left: 24rpx;
}
.goods-item-info-text {
color: #15191F;
font-size: 26rpx;
font-weight: 600;
display: -webkit-box;
overflow: hidden;
-webkit-box-orient: vertical;
-webkit-line-clamp: 2;
}
.goods-item-info-price {
color: #15191F;
font-weight: 600;
}
.price-symbol {
font-size: 22rpx;
}
.price {
font-size: 26rpx;
}
.goods-item-btn {
width: 120rpx;
height: 56rpx;
margin-top: 40rpx;
margin-left: 32rpx;
color: #fff;
font-size: 22rpx;
text-align: center;
line-height: 56rpx;
background-color: #86C5E1;
border-radius: 4rpx;
}
.disabled {
background-color: #C8E1EC;
}
.order-info-wrapper {
position: relative;
width: 670rpx;
margin: 64rpx 40rpx 64rpx;
}
.order-price {
position: absolute;
top: 0;
right: 0;
width: 134rpx;
height: 58rpx;
color: #5DB5DD;
font-size: 34rpx;
font-weight: 600;
}
.order-price-symbol {
font-size: 30rpx;
}
.order-title {
width: 100%;
line-height: 68rpx;
font-size: 34rpx;
font-weight: 600;
}
.order-info {
margin-top: 22rpx;
}
.order-item {
width: 100%;
color: #959DA9;
font-size: 22rpx;
line-height: 42rpx;
}
.footer-btn {
padding: 32rpx 20rpx 0;
border-top: 1px solid #E2E7EF;
}
.delete-btn,
.order-btn {
width: 200rpx;
line-height: 96rpx;
margin-right: 24rpx;
border-radius: 4rpx;
font-size: 30rpx;
font-weight: 600;
text-align: center;
}
.delete-btn {
color: #656E7B;
background-color: #fff;
border: 1px solid #C2C7CF;
}
.order-btn {
color: #fff;
background-color: #86C5E1;
}
image {
width: 100%;
height: 100%;
}
\ No newline at end of file
...@@ -308,6 +308,7 @@ Page({ ...@@ -308,6 +308,7 @@ Page({
setShoppingCartData: function () { setShoppingCartData: function () {
// 读取上级页面的购物车数据,默认选中所有。 // 读取上级页面的购物车数据,默认选中所有。
let funcShoppingCart = wx.getStorageSync('shoppingCartBuffer') let funcShoppingCart = wx.getStorageSync('shoppingCartBuffer')
console.log(JSON.stringify(funcShoppingCart))
// 设置商品的最终提交价格 // 设置商品的最终提交价格
let funcPayAmount = 0 let funcPayAmount = 0
...@@ -378,9 +379,6 @@ Page({ ...@@ -378,9 +379,6 @@ Page({
* @returns * @returns
*/ */
setStock: function () { setStock: function () {
console.log('funcCommodity')
console.log(this.data.shoppingCartList)
let funcItem = this.data.shoppingCartList[0] let funcItem = this.data.shoppingCartList[0]
App.wxRequest({ App.wxRequest({
...@@ -453,6 +451,8 @@ Page({ ...@@ -453,6 +451,8 @@ Page({
clearTimeout(funcTimer) clearTimeout(funcTimer)
}, 100) }, 100)
console.log(this.data.shoppingCartList)
App.wxRequest({ App.wxRequest({
url: '/api/v1/commodity/getNotification', url: '/api/v1/commodity/getNotification',
data: { data: {
...@@ -592,12 +592,14 @@ Page({ ...@@ -592,12 +592,14 @@ Page({
// 定位到当前问题位置 // 定位到当前问题位置
if (funcErrorIndex !== null) { if (funcErrorIndex !== null) {
const funcQuery = wx.createSelectorQuery() const funcQuery = wx.createSelectorQuery()
funcQuery.selectAll('.register-item-title').boundingClientRect() funcQuery.selectAll('.contact-input-mark').boundingClientRect()
funcQuery.exec((response) => { funcQuery.exec((response) => {
console.log(response) let funcScrollTop = response[0][funcErrorIndex].top
if (funcScrollTop !== 0) {
wx.pageScrollTo({ wx.pageScrollTo({
scrollTop: response[0][funcErrorIndex].top scrollTop: response[0][funcErrorIndex].top
}) })
}
}) })
} }
return funcPass return funcPass
...@@ -663,7 +665,30 @@ Page({ ...@@ -663,7 +665,30 @@ Page({
'smPersonalDetails': funcUserInfo 'smPersonalDetails': funcUserInfo
}, },
success: (response) => { 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)) { if (/库存不足/.test(response.data.msg)) {
let funcList = [] let funcList = []
for (let i = 0, l = response.data.data.list.length; i < l; i++) { for (let i = 0, l = response.data.data.list.length; i < l; i++) {
...@@ -763,7 +788,7 @@ Page({ ...@@ -763,7 +788,7 @@ Page({
} else { } else {
// 取消支付直接进入订单 // 取消支付直接进入订单
wx.reLaunch({ wx.reLaunch({
url: '/pages/pay/order/order' url: '/pages/mine/order/order?fromPage=pay'
}) })
} }
}, },
......
<!-- 购买须知详情 --> <l-toast></l-toast>
<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="container"> <view class="container">
<!-- winBuyContent --> <!-- winBuyContent -->
...@@ -201,7 +191,7 @@ ...@@ -201,7 +191,7 @@
<text>仅用于接收订单确认短信</text> <text>仅用于接收订单确认短信</text>
</view> </view>
<view class="contact-input col"> <view class="contact-input col">
<text>姓名</text> <text class="contact-input-mark">姓名</text>
<input placeholder="请输入姓名" data-type="name" data-index="{{0}}" bindblur="onInputBlur"></input> <input placeholder="请输入姓名" data-type="name" data-index="{{0}}" bindblur="onInputBlur"></input>
<text>{{registerInfo[0].errorName}}</text> <text>{{registerInfo[0].errorName}}</text>
</view> </view>
...@@ -227,7 +217,7 @@ ...@@ -227,7 +217,7 @@
<text>{{registerTitle + (index + 1)}}</text> <text>{{registerTitle + (index + 1)}}</text>
</view> </view>
<view class="contact-input col"> <view class="contact-input col">
<text>姓名</text> <text class="contact-input-mark">姓名</text>
<input placeholder="请输入姓名" data-type="name" data-index="{{index}}" bindblur="onInputBlur"></input> <input placeholder="请输入姓名" data-type="name" data-index="{{index}}" bindblur="onInputBlur"></input>
<text>{{item.errorName}}</text> <text>{{item.errorName}}</text>
</view> </view>
...@@ -262,6 +252,21 @@ ...@@ -262,6 +252,21 @@
<cover-view class="appointment-confirm row con-c align-c">确认预约</cover-view> <cover-view class="appointment-confirm row con-c align-c">确认预约</cover-view>
</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-mask row con-c align-c" wx:if="{{winStockTip}}">
<view class="stock col con-c align-c"> <view class="stock col con-c align-c">
......
...@@ -915,6 +915,8 @@ ...@@ -915,6 +915,8 @@
.stock-info { .stock-info {
width: 526rpx; width: 526rpx;
max-height: 480rpx;
overflow-y: scroll;
} }
.stock-close { .stock-close {
......
...@@ -26,7 +26,6 @@ let output = { ...@@ -26,7 +26,6 @@ let output = {
*/ */
formatAmount: function (funcAmountValue) { formatAmount: function (funcAmountValue) {
if (!funcAmountValue && funcAmountValue !== 0) return if (!funcAmountValue && funcAmountValue !== 0) return
console.log(funcAmountValue, funcAmountValue.toString().length)
switch (funcAmountValue.toString().length) { switch (funcAmountValue.toString().length) {
case 1: case 1:
funcAmountValue = '00' + funcAmountValue 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