Commit 573bd2f4 by 严立

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

parents 45962e2d fa9f0e8c
...@@ -100,45 +100,45 @@ ...@@ -100,45 +100,45 @@
<view class="order-activity-icon-wrapper col align-c" data-type="3" bindtap="goOrderByclass"> <view class="order-activity-icon-wrapper col align-c" data-type="3" bindtap="goOrderByclass">
<view class="order-activity-icon row con-c align-c"> <view class="order-activity-icon row con-c align-c">
<image src="{{imageResourcesBase+'mine/home/or_ticket.png'}}"></image> <image src="{{imageResourcesBase+'mine/home/or_ticket.png'}}"></image>
<view class="order-activity-badge {{ goodTypeCountData['1'] > 9 ? 'badge-widen' : ''}}" <view class="order-activity-badge {{ goodTypeCountData['3'] > 9 ? 'badge-widen' : ''}}"
wx:if="{{goodTypeCountData['1'] > 0}}"> wx:if="{{goodTypeCountData['3'] > 0}}">
{{goodTypeCountData['1'] > 99 ? '···' : goodTypeCountData['1']}}</view> {{goodTypeCountData['3'] > 99 ? '···' : goodTypeCountData['3']}}</view>
</view> </view>
<text>门票</text> <text>门票</text>
</view> </view>
<view class="order-activity-icon-wrapper col align-c" data-type="5" bindtap="goOrderByclass"> <view class="order-activity-icon-wrapper col align-c" data-type="5" bindtap="goOrderByclass">
<view class="order-activity-icon row con-c align-c"> <view class="order-activity-icon row con-c align-c">
<image src="{{imageResourcesBase+'mine/home/or_food.png'}}"></image> <image src="{{imageResourcesBase+'mine/home/or_food.png'}}"></image>
<view class="order-activity-badge {{ goodTypeCountData['2'] > 9 ? 'badge-widen' : ''}}" <view class="order-activity-badge {{ goodTypeCountData['5'] > 9 ? 'badge-widen' : ''}}"
wx:if="{{goodTypeCountData['2'] > 0}}"> wx:if="{{goodTypeCountData['5'] > 0}}">
{{goodTypeCountData['2'] > 99 ? '···' : goodTypeCountData['2']}}</view> {{goodTypeCountData['5'] > 99 ? '···' : goodTypeCountData['5']}}</view>
</view> </view>
<text>餐饮</text> <text>餐饮</text>
</view> </view>
<view class="order-activity-icon-wrapper col align-c" data-type="3" bindtap="goOrderByclass"> <view class="order-activity-icon-wrapper col align-c" data-type="-2" bindtap="goOrderByclass">
<view class="order-activity-icon row con-c align-c"> <view class="order-activity-icon row con-c align-c">
<image src="{{imageResourcesBase+'mine/home/or_movice.png'}}"></image> <image src="{{imageResourcesBase+'mine/home/or_movice.png'}}"></image>
<view class="order-activity-badge {{ goodTypeCountData['3'] > 9 ? 'badge-widen' : ''}}" <view class="order-activity-badge {{ goodTypeCountData['-2'] > 9 ? 'badge-widen' : ''}}"
wx:if="{{goodTypeCountData['3'] > 0}}"> wx:if="{{goodTypeCountData['-2'] > 0}}">
{{goodTypeCountData['3'] > 99 ? '···' : goodTypeCountData['3']}}</view> {{goodTypeCountData['-2'] > 99 ? '···' : goodTypeCountData['-2']}}</view>
</view> </view>
<text>影票</text> <text>影票</text>
</view> </view>
<view class="order-activity-icon-wrapper col align-c" data-type="2" bindtap="goOrderByclass"> <view class="order-activity-icon-wrapper col align-c" data-type="2" bindtap="goOrderByclass">
<view class="order-activity-icon row con-c align-c"> <view class="order-activity-icon row con-c align-c">
<image src="{{imageResourcesBase+'mine/home/or_spa.png'}}"></image> <image src="{{imageResourcesBase+'mine/home/or_spa.png'}}"></image>
<view class="order-activity-badge {{ goodTypeCountData['4'] > 9 ? 'badge-widen' : ''}}" <view class="order-activity-badge {{ goodTypeCountData['2'] > 9 ? 'badge-widen' : ''}}"
wx:if="{{goodTypeCountData['4'] > 0}}"> wx:if="{{goodTypeCountData['2'] > 0}}">
{{goodTypeCountData['4'] > 99 ? '···' : goodTypeCountData['4']}}</view> {{goodTypeCountData['2'] > 99 ? '···' : goodTypeCountData['2']}}</view>
</view> </view>
<text>SPA</text> <text>SPA</text>
</view> </view>
<view class="order-activity-icon-wrapper col align-c" data-type="4" bindtap="goOrderByclass"> <view class="order-activity-icon-wrapper col align-c" data-type="4" bindtap="goOrderByclass">
<view class="order-activity-icon row con-c align-c"> <view class="order-activity-icon row con-c align-c">
<image src="{{imageResourcesBase+'mine/home/or_art.png'}}"></image> <image src="{{imageResourcesBase+'mine/home/or_art.png'}}"></image>
<view class="order-activity-badge {{ goodTypeCountData['5'] > 9 ? 'badge-widen' : ''}}" <view class="order-activity-badge {{ goodTypeCountData['4'] > 9 ? 'badge-widen' : ''}}"
wx:if="{{goodTypeCountData['5'] > 0}}"> wx:if="{{goodTypeCountData['4'] > 0}}">
{{goodTypeCountData['5'] > 99 ? '···' : goodTypeCountData['5']}}</view> {{goodTypeCountData['4'] > 99 ? '···' : goodTypeCountData['4']}}</view>
</view> </view>
<text>文创</text> <text>文创</text>
</view> </view>
...@@ -257,7 +257,7 @@ ...@@ -257,7 +257,7 @@
<!-- 预约卡片 --> <!-- 预约卡片 -->
<view class="appintment"> <view class="appintment">
<!-- 主题活动 --> <!-- 主题活动 -->
<view class="appointment-wrapper" wx:for="{{activityList}}" wx:key="*this"> <view class="appointment-wrapper" wx:for="{{activityList}}" wx:key="*this" data-item="{{item}}" bindtap="onOrderDetail">
<view class="appointment-time">{{item.activeTime}}</view> <view class="appointment-time">{{item.activeTime}}</view>
<view class="appointment-activity-content row"> <view class="appointment-activity-content row">
<view class="appointment-activity-img"> <view class="appointment-activity-img">
......
...@@ -33,12 +33,13 @@ Page({ ...@@ -33,12 +33,13 @@ Page({
orderPages: 1, orderPages: 1,
winOrderType: false, winOrderType: false,
isLoading: false, isLoading: false,
isFinished: false isFinished: false,
optionsGoodType: ''
}, },
onLoad: function (options) { onLoad: function (options) {
this.setData({ this.setData({
option: options, option: options,
orderTypeActive: options.goodType != undefined ? 1 * options.goodType : 0 optionsGoodType: options.goodType != undefined ? 1 * options.goodType : ''
}) })
// App.login({ // App.login({
// timeout: 0, // timeout: 0,
...@@ -176,10 +177,11 @@ Page({ ...@@ -176,10 +177,11 @@ Page({
* @returns * @returns
*/ */
setOrderType: function () { setOrderType: function () {
let that = this;
App.wxRequest({ App.wxRequest({
url: '/api/v1/common/getDictByType', url: '/api/v1/common/getDictByType',
data: { data: {
'type': 'good_type', 'type': 'order_good_type',
}, },
success: (response) => { success: (response) => {
...@@ -196,14 +198,27 @@ Page({ ...@@ -196,14 +198,27 @@ Page({
funcList.push(funcItem) funcList.push(funcItem)
} }
let typeTitle = '全部分类' // let typeTitle = '全部分类' //
if (this.data.orderTypeActive) { let orderTypeActive = 0 //
typeTitle = funcList[this.data.orderTypeActive].name let aVal = ''
} funcList.forEach((item, index) => {
if (item.value == that.data.optionsGoodType) {
typeTitle = item.name
orderTypeActive = index
}
})
// if (filter.length > 0) {
// typeTitle = filter[0].name
// orderTypeActive = 0
// }
this.setData({ this.setData({
'orderType': funcList, 'orderType': funcList,
orderTypeTitle: typeTitle orderTypeTitle: typeTitle,
}) orderTypeActive
})
this.queryOrder() this.queryOrder()
} }
}) })
......
...@@ -2,6 +2,7 @@ let App = getApp() ...@@ -2,6 +2,7 @@ let App = getApp()
Page({ Page({
data: { data: {
shopConfig: App.globalData.shopId,
imageBase: App.globalData.appImageBase, imageBase: App.globalData.appImageBase,
resourcesBase: App.globalData.appResourcesBase, resourcesBase: App.globalData.appResourcesBase,
scoreServe: 0, // 服务分数 scoreServe: 0, // 服务分数
...@@ -21,14 +22,114 @@ Page({ ...@@ -21,14 +22,114 @@ Page({
fileResults: [] fileResults: []
}, },
onLoad: function (options) { onLoad: function (options) {
console.log(options, '99999999999999999999999999999');
let orderItem = JSON.parse(options.orderItem)
let pageFrom = options.pageFrom let pageFrom = options.pageFrom
let orderItem = JSON.parse(options.orderItem)
this.setData({ this.setData({
orderInfo: orderItem, orderInfo: orderItem,
pageFrom: pageFrom pageFrom: pageFrom
}) })
if (pageFrom == 'activityList') {
this.queryOrderDetail()
}
},
/**
* 订单详情
* @function
* @param
* @returns
*/
queryOrderDetail: function () {
let that = this
App.wxRequest({
url: '/api/v1/order/getOrderDetail',
data: {
'orderId': this.data.orderInfo.orderId
},
success: (response) => {
let funcResponse = response.data
let funcOrderInfo = {
'id': this.data.orderInfo.orderId,
'score': funcResponse.integral, // 积分
'state': Number(funcResponse.status), // 订单状态
'amount': funcResponse.totalMoney, // 实付金额
'contactName': funcResponse.name, // 联系人名称
'contactPhone': funcResponse.mobilePhone, // 联系人电话
'commodityType': Number(funcResponse.goodType), // 商品类型
'commodity': [],
'tipOrderNo': funcResponse.orderSerialNumber, // 订单编号
'tipTimeSubmit': funcResponse.createDate,
'tipTimePay': App.modular.miment(funcResponse.paymentTime).format('YYYY-MM-DD hh:mm:ss'),
'tipIntegral': funcResponse.integral,
'officeName': funcResponse.officeName,
'wxRequest': funcResponse.wxRequest,
'businessTime': funcResponse.businessTime, //营业时间
'expireTime': funcResponse.expireTime, //订单有效期
}
// 设置印章
let shopName = funcResponse.officeName;
let shopFilter = this.data.shopConfig.filter(
item => {
return item.name.toLowerCase() == shopName.toLowerCase()
}
)
funcOrderInfo.shopInfo = shopFilter[0]
console.log(shopFilter[0], '-----------shopFilter[0]------');
// 添加订单商品列表
let funcCommodity = funcResponse.smOrderDetails
for (let i = 0, l = funcCommodity.length; i < l; i++) {
let funcCommodityItem = {
'cover': funcCommodity[i].imgUrl,
'name': funcCommodity[i].name, // 名称
'quantity': funcCommodity[i].number, // 数量
'amount': funcCommodity[i].unitPrice, // 总价
'state': Number(funcCommodity[i].status), // 状态
'codeId': funcCommodity[i].volumeId, // 券码
}
funcOrderInfo.commodity.push(funcCommodityItem)
}
// 倒计时
if (funcOrderInfo.state == 0) {
// 待付款状态
let doTime = 15 * 60 * 1000
let timeInter = setInterval(() => {
let creatdTime = new Date(funcOrderInfo.tipTimeSubmit.replace(/-/g, '/')).getTime()
let endTime = creatdTime + doTime
let now = new Date().getTime()
let residueStamp = endTime - now
let residuePayTime = App.modular.miment(residueStamp).format('mm:ss')
if (residueStamp > 0) {
that.setData({
residuePayTime: residuePayTime
})
} else {
console.log(residueStamp, 'residueStamp----------------');
clearInterval(timeInter)
// that.queryOrderDetail()
let state = `orderInfo.state`
that.setData({
[state]: -1
})
}
}, 1000)
}
this.setData({
orderInfo: funcOrderInfo
})
// 判断是否自动展示二维码
// 订单列表 去使用 按钮
if (this.data.isFromUse) {
}
}
})
}, },
/** /**
...@@ -208,6 +309,9 @@ Page({ ...@@ -208,6 +309,9 @@ Page({
} else if (pageFrom == 'orderDetail') { } else if (pageFrom == 'orderDetail') {
//评价详情 //评价详情
url = '/pages/pay/order-detail/order-detail?id=' + that.data.orderInfo.id url = '/pages/pay/order-detail/order-detail?id=' + that.data.orderInfo.id
} else if (pageFrom == 'activityList') {
//主题活动列表
url = '/pages/mine/appointment/appointment'
} else { } else {
url = '/pages/home/home/home' url = '/pages/home/home/home'
} }
......
...@@ -11,9 +11,8 @@ ...@@ -11,9 +11,8 @@
<image src="{{item.cover}}"></image> <image src="{{item.cover}}"></image>
</view> </view>
</block> </block>
<view class="order-name" wx:if="{{orderInfo.commodity.length === 1}}"> <view class="order-name" wx:if="{{orderInfo.commodity.length === 1}}">
<text>{{orderInfo.name}}</text> <text>{{orderInfo.commodity[0].name}}</text>
</view> </view>
<view class="order-price-wrapper col align-e"> <view class="order-price-wrapper col align-e">
<view class="order-price"> <view class="order-price">
...@@ -26,7 +25,6 @@ ...@@ -26,7 +25,6 @@
</view> </view>
</view> </view>
</view> </view>
<view class="order-comment-wrapper"> <view class="order-comment-wrapper">
<view class="order-comment-title"> <view class="order-comment-title">
<text>订单评价</text> <text>订单评价</text>
......
{ {
"description": "项目配置文件", "description": "项目配置文件",
"packOptions": { "packOptions": {
"ignore": [] "ignore": []
},
"setting": {
"urlCheck": true,
"es6": true,
"enhance": true,
"postcss": true,
"preloadBackgroundData": false,
"minified": true,
"newFeature": true,
"coverView": true,
"nodeModules": true,
"autoAudits": false,
"showShadowRootInWxmlPanel": true,
"scopeDataCheck": false,
"uglifyFileName": false,
"checkInvalidKey": true,
"checkSiteMap": false,
"uploadWithSourceMap": true,
"compileHotReLoad": false,
"useMultiFrameRuntime": false,
"useApiHook": true,
"babelSetting": {
"ignore": [],
"disablePlugins": [],
"outputPath": ""
}, },
"setting": { "useIsolateContext": true,
"urlCheck": true, "useCompilerModule": true,
"es6": true, "userConfirmedUseCompilerModuleSwitch": false,
"enhance": true, "packNpmManually": false,
"postcss": true, "packNpmRelationList": [],
"preloadBackgroundData": false, "enableEngineNative": false
"minified": true, },
"newFeature": true, "compileType": "miniprogram",
"coverView": true, "libVersion": "2.10.0",
"nodeModules": true, "appid": "wx37a9b7a3d92029f2",
"autoAudits": false, "projectname": "%E4%B8%96%E8%8C%82%E5%B0%8F%E7%A8%8B%E5%BA%8F%E4%BA%8C%E6%9C%9F",
"showShadowRootInWxmlPanel": true, "debugOptions": {
"scopeDataCheck": false, "hidedInDevtools": []
"uglifyFileName": false, },
"checkInvalidKey": true, "isGameTourist": false,
"checkSiteMap": false, "simulatorType": "wechat",
"uploadWithSourceMap": true, "simulatorPluginLibVersion": {},
"compileHotReLoad": false, "condition": {
"useMultiFrameRuntime": false, "search": {
"useApiHook": true, "current": -1,
"babelSetting": { "list": []
"ignore": [],
"disablePlugins": [],
"outputPath": ""
},
"useIsolateContext": true,
"useCompilerModule": true,
"userConfirmedUseCompilerModuleSwitch": false,
"packNpmManually": false,
"packNpmRelationList": [],
"enableEngineNative": false
}, },
"compileType": "miniprogram", "conversation": {
"libVersion": "2.10.0", "current": -1,
"appid": "wx37a9b7a3d92029f2", "list": []
"projectname": "%E4%B8%96%E8%8C%82%E5%B0%8F%E7%A8%8B%E5%BA%8F%E4%BA%8C%E6%9C%9F",
"debugOptions": {
"hidedInDevtools": []
}, },
"isGameTourist": false, "plugin": {
"simulatorType": "wechat", "current": -1,
"simulatorPluginLibVersion": {}, "list": []
"condition": { },
"search": { "game": {
"current": -1, "currentL": -1,
"list": [] "list": []
}, },
"conversation": { "gamePlugin": {
"current": -1, "current": -1,
"list": [] "list": []
}, },
"plugin": { "miniprogram": {
"current": -1, "current": -1,
"list": [] "list": [
{
"id": -1,
"name": "pages/commodity/menu-food/menu-food",
"pathName": "pages/commodity/menu-food/menu-food",
"query": "",
"scene": null
}, },
"game": { {
"currentL": -1, "id": -1,
"list": [] "name": "pages/play/home/home",
"pathName": "pages/play/home/home",
"query": "",
"scene": null
}, },
"gamePlugin": { {
"current": -1, "id": -1,
"list": [] "name": "pages/play/service-detail/service-detail",
"pathName": "pages/play/service-detail/service-detail",
"query": "id=1&type=4",
"scene": null
}, },
"miniprogram": { {
"current": -1, "id": -1,
"list": [ "name": "pages/mine/home/home",
{ "pathName": "pages/mine/home/home",
"id": -1, "scene": null
"name": "pages/commodity/menu-food/menu-food",
"pathName": "pages/commodity/menu-food/menu-food",
"query": "",
"scene": null
},
{
"id": -1,
"name": "pages/play/home/home",
"pathName": "pages/play/home/home",
"query": "",
"scene": null
},
{
"id": -1,
"name": "pages/play/service-detail/service-detail",
"pathName": "pages/play/service-detail/service-detail",
"query": "id=1&type=4",
"scene": null
}
]
} }
]
} }
}
} }
\ No newline at end of file
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