Commit 0b665a17 by wangjian

1

parent 57b9f144
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
"navigationBarTitleText": "懒人企业福利社", "navigationBarTitleText": "懒人企业福利社",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
} }
,{ ,{
"path" : "pages/order/order", "path" : "pages/order/order",
...@@ -109,6 +108,13 @@ ...@@ -109,6 +108,13 @@
"navigationBarTitleText": "设置支付密码", "navigationBarTitleText": "设置支付密码",
"enablePullDownRefresh": false "enablePullDownRefresh": false
} }
}, {
"path": "orderDetail/orderDetail",
"style": {
"navigationBarTitleText": "订单详情",
"enablePullDownRefresh": false,
"navigationStyle":"custom"
}
} }
] ]
}], }],
......
...@@ -76,7 +76,13 @@ ...@@ -76,7 +76,13 @@
userInfo: {} userInfo: {}
}; };
}, },
created() { onLoad() {
this.getUserInfo()
},
onTabItemTap () {
if (!this.$store.state.isLogin) {
this.$router.push('login')
}
this.getUserInfo() this.getUserInfo()
}, },
methods: { methods: {
......
...@@ -11,31 +11,30 @@ ...@@ -11,31 +11,30 @@
订单编号:{{item.orderSn}} 订单编号:{{item.orderSn}}
</view> </view>
<view class="status" :style="{'color':statusTextColor[item.state]}"> <view class="status" :style="{'color':statusTextColor[item.state]}">
{{item.stateDes}} {{statusText[item.state]}}
</view> </view>
</view> </view>
<view class="goods-info"> <view class="goods-info">
<image class="img" :src="item.img" mode="aspectFill"></image> <image class="img" :src="item.goodsPath" mode="aspectFill"></image>
<view class="info"> <view class="info">
<view class="title">{{item.title}}</view> <view class="title">{{item.goodsName}}</view>
<view class="spec"> <view class="spec">
<view>{{item.specsTitle}}</view> <view>{{item.goodsIntegral}}</view>
<view>x{{item.payNumber}}</view> <view>x{{item.payNumber}}</view>
</view> </view>
<view class="price"> <view class="price">
{{isPayCompleteOrder(item)}}{{$numUtils.getGoodsPrice(item,'order')}} 支付积分:{{item.payIntegral}}
</view> </view>
</view> </view>
</view> </view>
<view class="btn"> <view class="btn" v-if="item.state === 200">
<view class="btn-item pay-btn" v-if="isShowPay(item)" @click.stop="goCoupon(item)"> <view class="btn-item pay-btn" @click.stop="goCoupon(item)">
查看卡券 查看卡券
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<uni-load-more :status="loadingType" v-if="orderLists.length>0"></uni-load-more> <uni-load-more :status="loadingType" v-if="orderLists.length>0"></uni-load-more>
</view> </view>
</template> </template>
...@@ -44,31 +43,44 @@ ...@@ -44,31 +43,44 @@
data() { data() {
return { return {
orderLists: [], orderLists: [],
loadingType: more, loadingType: 'more',
page: 1,
statusTextColor:{ statusTextColor:{
'100':'#FF0520','200':'#FF6205','300':'#686868' 100:'#FF0520',200:'#FF6205',300:'#686868'
}, },
statusText:{ statusText:{
'100':'待兑换','200':'兑换成功','300':'兑换失败' 100:'待兑换',200:'兑换成功',300:'兑换失败'
}, },
page: 1
}; };
}, },
onLoad() { onLoad() {
console.log(this.page);
this.getList()
},
onReachBottom () {
this.getList()
},
onTabItemTap () {
if (!this.$store.state.isLogin) {
this.$router.push('login')
}
this.orderLists = []
this.page = 1
this.loadingType = 'loading'
this.getList() this.getList()
}, },
methods: { methods: {
getList() { getList() {
if (this.loadingType == 'noMore') { if (this.loadingType == 'noMore' || this.loadingType == 'loading') {
return return
} }
this.loadingType = 'loading'; this.loadingType = 'loading';
let params = {'page': this.page, 'pageSize':'10'} let params = {'page': this.page, 'pageSize':'10'}
this.$net.post('/order/list',params).then((res)=>{ this.$net.post('/orders/list', params).then((res)=>{
if (res && res.code==200) { if (res && res.code==200) {
this.orderLists = this.orderLists.concat(res.data.list) this.orderLists = this.orderLists.concat(res.data.list)
let paginate = res.data.paginate let paginate = res.data.paginate
if (this.page == paginate.lastPage || this.orderLists.length==0) { if (res.data.list.length < 10) {
this.loadingType = 'noMore' this.loadingType = 'noMore'
} else { } else {
this.loadingType = 'more' this.loadingType = 'more'
...@@ -78,6 +90,9 @@ ...@@ -78,6 +90,9 @@
this.toast(res.message) this.toast(res.message)
} }
}) })
},
goDetails(item) {
this.$router.push('OrderDetail',{'orderId':item.orderSn})
} }
} }
} }
...@@ -89,7 +104,7 @@ ...@@ -89,7 +104,7 @@
width: 100%; width: 100%;
height: 100%; height: 100%;
.order-list { .order-list {
padding: 210rpx 24rpx 0; padding: 24rpx;
.item { .item {
border-radius: 16rpx; border-radius: 16rpx;
background-color: #FFFFFF; background-color: #FFFFFF;
...@@ -99,56 +114,51 @@ ...@@ -99,56 +114,51 @@
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
.num { .num {
margin-top: 2rpx; font-size: 28rpx;
font-size: 22rpx;
color: #686868; color: #686868;
line-height: 40rpx;
} }
.status { .status {
font-size: 24rpx; font-size: 28rpx;
line-height: 40rpx;
} }
} }
.goods-info { .goods-info {
display: flex; display: flex;
margin-top: 32rpx; margin-top: 32rpx;
.img { .img {
height: 160rpx; height: 200rpx;
width: 160rpx; width: 200rpx;
border-radius: 8rpx; border-radius: 8rpx;
background-color: #D8D8D8; background-color: #D8D8D8;
} }
.info { .info {
margin: 8rpx 0 0 16rpx; margin: 4rpx 0 0 16rpx;
position: relative; position: relative;
.title { .title {
font-size: 22rpx; font-size: 28rpx;
color: #252525; color: #333333;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
display: -webkit-box; white-space: nowrap;
-webkit-line-clamp: 2; line-height: 40rpx;
line-clamp: 2; width: 438rpx;
-webkit-box-orient: vertical;
// height: 64rpx;
line-height: 32rpx;
width: 478rpx;
} }
.spec { .spec {
width: 478rpx; width: 438rpx;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
margin-top: 10rpx; margin-top: 20rpx;
view { view {
font-size: 20rpx; font-size: 26rpx;
color: #686868; color: #666666;
} }
} }
.price { .price {
position: absolute; margin-top: 56rpx;
top: 118rpx; width: 438rpx;
left: 0;
width: 478rpx;
text-align: right; text-align: right;
font-size: 24rpx; font-size: 28rpx;
font-weight: bolder; font-weight: bolder;
color: #252525; color: #252525;
} }
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -12,7 +12,8 @@ const routers = { ...@@ -12,7 +12,8 @@ const routers = {
'IntegralDetail': '/pagesA/integralDetail/integralDetail', 'IntegralDetail': '/pagesA/integralDetail/integralDetail',
'Setting': '/pagesA/setting/setting', 'Setting': '/pagesA/setting/setting',
'VertifyPhone': '/pagesA/VertifyPhone/VertifyPhone', 'VertifyPhone': '/pagesA/VertifyPhone/VertifyPhone',
'SetPwd': '/pagesA/SetPwd/SetPwd' 'SetPwd': '/pagesA/SetPwd/SetPwd',
'OrderDetail': '/pagesA/orderDetail/orderDetail'
} }
export function push(routerName, params, events) { export function push(routerName, params, events) {
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -17,7 +17,8 @@ ...@@ -17,7 +17,8 @@
"integralDetail/integralDetail", "integralDetail/integralDetail",
"setting/setting", "setting/setting",
"VertifyPhone/VertifyPhone", "VertifyPhone/VertifyPhone",
"SetPwd/SetPwd" "SetPwd/SetPwd",
"orderDetail/orderDetail"
] ]
} }
], ],
......
...@@ -2396,57 +2396,6 @@ function uploadImage(image, name, type) { ...@@ -2396,57 +2396,6 @@ function uploadImage(image, name, type) {
/***/ }), /***/ }),
/***/ 126:
/*!******************************************************************************************************************!*\
!*** /Users/wangjian/Desktop/HBuilder/FuLiMini/uni_modules/uni-load-more/components/uni-load-more/i18n/index.js ***!
\******************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _en = _interopRequireDefault(__webpack_require__(/*! ./en.json */ 127));
var _zhHans = _interopRequireDefault(__webpack_require__(/*! ./zh-Hans.json */ 128));
var _zhHant = _interopRequireDefault(__webpack_require__(/*! ./zh-Hant.json */ 129));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}var _default =
{
en: _en.default,
'zh-Hans': _zhHans.default,
'zh-Hant': _zhHant.default };exports.default = _default;
/***/ }),
/***/ 127:
/*!*****************************************************************************************************************!*\
!*** /Users/wangjian/Desktop/HBuilder/FuLiMini/uni_modules/uni-load-more/components/uni-load-more/i18n/en.json ***!
\*****************************************************************************************************************/
/*! exports provided: uni-load-more.contentdown, uni-load-more.contentrefresh, uni-load-more.contentnomore, default */
/***/ (function(module) {
module.exports = JSON.parse("{\"uni-load-more.contentdown\":\"下拉加载更多\",\"uni-load-more.contentrefresh\":\"加载中...\",\"uni-load-more.contentnomore\":\"没有更多数据了\"}");
/***/ }),
/***/ 128:
/*!**********************************************************************************************************************!*\
!*** /Users/wangjian/Desktop/HBuilder/FuLiMini/uni_modules/uni-load-more/components/uni-load-more/i18n/zh-Hans.json ***!
\**********************************************************************************************************************/
/*! exports provided: uni-load-more.contentdown, uni-load-more.contentrefresh, uni-load-more.contentnomore, default */
/***/ (function(module) {
module.exports = JSON.parse("{\"uni-load-more.contentdown\":\"上拉显示更多\",\"uni-load-more.contentrefresh\":\"正在加载...\",\"uni-load-more.contentnomore\":\"没有更多数据了\"}");
/***/ }),
/***/ 129:
/*!**********************************************************************************************************************!*\
!*** /Users/wangjian/Desktop/HBuilder/FuLiMini/uni_modules/uni-load-more/components/uni-load-more/i18n/zh-Hant.json ***!
\**********************************************************************************************************************/
/*! exports provided: uni-load-more.contentdown, uni-load-more.contentrefresh, uni-load-more.contentnomore, default */
/***/ (function(module) {
module.exports = JSON.parse("{\"uni-load-more.contentdown\":\"上拉顯示更多\",\"uni-load-more.contentrefresh\":\"正在加載...\",\"uni-load-more.contentnomore\":\"沒有更多數據了\"}");
/***/ }),
/***/ 13: /***/ 13:
/*!****************************************************************!*\ /*!****************************************************************!*\
!*** /Users/wangjian/Desktop/HBuilder/FuLiMini/store/index.js ***! !*** /Users/wangjian/Desktop/HBuilder/FuLiMini/store/index.js ***!
...@@ -2494,6 +2443,57 @@ store;exports.default = _default; ...@@ -2494,6 +2443,57 @@ store;exports.default = _default;
/***/ }), /***/ }),
/***/ 136:
/*!******************************************************************************************************************!*\
!*** /Users/wangjian/Desktop/HBuilder/FuLiMini/uni_modules/uni-load-more/components/uni-load-more/i18n/index.js ***!
\******************************************************************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });exports.default = void 0;var _en = _interopRequireDefault(__webpack_require__(/*! ./en.json */ 137));
var _zhHans = _interopRequireDefault(__webpack_require__(/*! ./zh-Hans.json */ 138));
var _zhHant = _interopRequireDefault(__webpack_require__(/*! ./zh-Hant.json */ 139));function _interopRequireDefault(obj) {return obj && obj.__esModule ? obj : { default: obj };}var _default =
{
en: _en.default,
'zh-Hans': _zhHans.default,
'zh-Hant': _zhHant.default };exports.default = _default;
/***/ }),
/***/ 137:
/*!*****************************************************************************************************************!*\
!*** /Users/wangjian/Desktop/HBuilder/FuLiMini/uni_modules/uni-load-more/components/uni-load-more/i18n/en.json ***!
\*****************************************************************************************************************/
/*! exports provided: uni-load-more.contentdown, uni-load-more.contentrefresh, uni-load-more.contentnomore, default */
/***/ (function(module) {
module.exports = JSON.parse("{\"uni-load-more.contentdown\":\"下拉加载更多\",\"uni-load-more.contentrefresh\":\"加载中...\",\"uni-load-more.contentnomore\":\"没有更多数据了\"}");
/***/ }),
/***/ 138:
/*!**********************************************************************************************************************!*\
!*** /Users/wangjian/Desktop/HBuilder/FuLiMini/uni_modules/uni-load-more/components/uni-load-more/i18n/zh-Hans.json ***!
\**********************************************************************************************************************/
/*! exports provided: uni-load-more.contentdown, uni-load-more.contentrefresh, uni-load-more.contentnomore, default */
/***/ (function(module) {
module.exports = JSON.parse("{\"uni-load-more.contentdown\":\"上拉显示更多\",\"uni-load-more.contentrefresh\":\"正在加载...\",\"uni-load-more.contentnomore\":\"没有更多数据了\"}");
/***/ }),
/***/ 139:
/*!**********************************************************************************************************************!*\
!*** /Users/wangjian/Desktop/HBuilder/FuLiMini/uni_modules/uni-load-more/components/uni-load-more/i18n/zh-Hant.json ***!
\**********************************************************************************************************************/
/*! exports provided: uni-load-more.contentdown, uni-load-more.contentrefresh, uni-load-more.contentnomore, default */
/***/ (function(module) {
module.exports = JSON.parse("{\"uni-load-more.contentdown\":\"上拉顯示更多\",\"uni-load-more.contentrefresh\":\"正在加載...\",\"uni-load-more.contentnomore\":\"沒有更多數據了\"}");
/***/ }),
/***/ 14: /***/ 14:
/*!**************************************************************************************!*\ /*!**************************************************************************************!*\
!*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vuex3/dist/vuex.common.js ***! !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/vuex3/dist/vuex.common.js ***!
...@@ -3890,7 +3890,8 @@ var routers = { ...@@ -3890,7 +3890,8 @@ var routers = {
'IntegralDetail': '/pagesA/integralDetail/integralDetail', 'IntegralDetail': '/pagesA/integralDetail/integralDetail',
'Setting': '/pagesA/setting/setting', 'Setting': '/pagesA/setting/setting',
'VertifyPhone': '/pagesA/VertifyPhone/VertifyPhone', 'VertifyPhone': '/pagesA/VertifyPhone/VertifyPhone',
'SetPwd': '/pagesA/SetPwd/SetPwd' }; 'SetPwd': '/pagesA/SetPwd/SetPwd',
'OrderDetail': '/pagesA/orderDetail/orderDetail' };
function push(routerName, params, events) { function push(routerName, params, events) {
...@@ -4041,7 +4042,38 @@ function loadingHide() { ...@@ -4041,7 +4042,38 @@ function loadingHide() {
/***/ }), /***/ }),
/***/ 193: /***/ 2:
/*!***********************************!*\
!*** (webpack)/buildin/global.js ***!
\***********************************/
/*! no static exports found */
/***/ (function(module, exports) {
var g;
// This works in non-strict mode
g = (function() {
return this;
})();
try {
// This works if eval is allowed (see CSP)
g = g || new Function("return this")();
} catch (e) {
// This works if the window reference is available
if (typeof window === "object") g = window;
}
// g can still be undefined, but nothing to do about it...
// We return undefined, instead of nothing here, so it's
// easier to handle this case. if(!global) { ...}
module.exports = g;
/***/ }),
/***/ 203:
/*!*************************************************************************************************************************!*\ /*!*************************************************************************************************************************!*\
!*** /Users/wangjian/Desktop/HBuilder/FuLiMini/uni_modules/uni-transition/components/uni-transition/createAnimation.js ***! !*** /Users/wangjian/Desktop/HBuilder/FuLiMini/uni_modules/uni-transition/components/uni-transition/createAnimation.js ***!
\*************************************************************************************************************************/ \*************************************************************************************************************************/
...@@ -4181,37 +4213,6 @@ function createAnimation(option, _this) { ...@@ -4181,37 +4213,6 @@ function createAnimation(option, _this) {
/***/ }), /***/ }),
/***/ 2:
/*!***********************************!*\
!*** (webpack)/buildin/global.js ***!
\***********************************/
/*! no static exports found */
/***/ (function(module, exports) {
var g;
// This works in non-strict mode
g = (function() {
return this;
})();
try {
// This works if eval is allowed (see CSP)
g = g || new Function("return this")();
} catch (e) {
// This works if the window reference is available
if (typeof window === "object") g = window;
}
// g can still be undefined, but nothing to do about it...
// We return undefined, instead of nothing here, so it's
// easier to handle this case. if(!global) { ...}
module.exports = g;
/***/ }),
/***/ 3: /***/ 3:
/*!******************************************************************************************!*\ /*!******************************************************************************************!*\
!*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/mp-vue/dist/mp.runtime.esm.js ***! !*** ./node_modules/@dcloudio/vue-cli-plugin-uni/packages/mp-vue/dist/mp.runtime.esm.js ***!
......
...@@ -96,7 +96,7 @@ var components ...@@ -96,7 +96,7 @@ var components
try { try {
components = { components = {
uniLoadMore: function() { uniLoadMore: function() {
return Promise.all(/*! import() | uni_modules/uni-load-more/components/uni-load-more/uni-load-more */[__webpack_require__.e("common/vendor"), __webpack_require__.e("uni_modules/uni-load-more/components/uni-load-more/uni-load-more")]).then(__webpack_require__.bind(null, /*! @/uni_modules/uni-load-more/components/uni-load-more/uni-load-more.vue */ 121)) return Promise.all(/*! import() | uni_modules/uni-load-more/components/uni-load-more/uni-load-more */[__webpack_require__.e("common/vendor"), __webpack_require__.e("uni_modules/uni-load-more/components/uni-load-more/uni-load-more")]).then(__webpack_require__.bind(null, /*! @/uni_modules/uni-load-more/components/uni-load-more/uni-load-more.vue */ 131))
} }
} }
} catch (e) { } catch (e) {
......
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 to comment