Merge branch 'feature/mall_product_new'

pull/16/head
perry 2023-05-24 18:11:23 +08:00
commit 328864388b
46 changed files with 6603 additions and 2684 deletions

View File

@ -46,7 +46,7 @@ public class WxPayNotifyController {
private StoreOrderService storeOrderService;
@Autowired
private RechargeOrderMapper rechargeOrderMapper;
@Autowired
private PhoneRecordService phoneRecordService;

View File

@ -317,7 +317,6 @@ public class CategoryServiceImpl extends ServiceImpl<CategoryMapper, Category> i
list.add(tree);
}
}
log.info("无限极分类 : getTree:" + JsonUtils.toJsonString(list));
return list;
}

View File

@ -325,13 +325,13 @@ public class OrderServiceImpl implements OrderService {
@Override
public OrderDataResponse orderData(String dateLimit, Integer type, String payType) {
OrderDataResponse response = new OrderDataResponse();
if (type.equals(2)) {
if (type!=null && type==2) {
type = null;
}
// 已完成订单数量
response.setCompleteCount(getCount(dateLimit, Constants.ORDER_STATUS_COMPLETE, type));
// 待核销订单数量
response.setEvaluatedCount(getCount(dateLimit, Constants.ORDER_STATUS_STR_TOBE_WRITTEN_OFF, type));
// response.setEvaluatedCount(getCount(dateLimit, Constants.ORDER_STATUS_STR_TOBE_WRITTEN_OFF, type));
// 支付订单总数
response.setOrderCount(getCount(dateLimit, Constants.ORDER_STATUS_ALL, type));
// 待收货订单数量

View File

@ -1275,7 +1275,7 @@ public class StoreOrderServiceImpl extends ServiceImpl<StoreOrderMapper, StoreOr
phoneRecordAdd.setMoney(info.getPrice());
phoneRecordAdd.setOrderNo(orderDO.getOrderId());
phoneRecordAdd.setOrderTime(LocalDateTimeUtil.formatNormal(orderDO.getPayTime().toLocalDate()));
phoneRecordAdd.setGear(rechargeGearDO.getRefundAmount().toString());
phoneRecordAdd.setGear(rechargeGearDO.getRefundAmount().intValue()+"");
phoneRecordAdds.add(phoneRecordAdd);
recordDOS.add(phoneRecordDO);
});

View File

@ -255,5 +255,5 @@ justauth:
timeout: 24h # 超时时长,目前只对 Redis 缓存生效,默认 3 分钟
phone:
query-url: http://192.168.1.189:4006/cyywl-phone-query-api/
query-url: http://phone.cyywl.top/cyywl-phone-query-api/
token: eyIwLnR5cCI6IkpXVCIsImFsZyI6IkhTNTEyIn0

View File

@ -374,7 +374,7 @@ export default {
shippingRegion() {
logistics.shippingRegion({ tempId: this.tempId }).then(res => {
res.data.forEach((item, index) => {
item.title = JSON.parse(item.title)
// item.title = JSON.parse(item.title)
item.city_ids = item.title
})
this.ruleForm.region = res.data

View File

@ -0,0 +1,20 @@
{ // launch.json configurations app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/
// launchtypelocalremote, localremote
"version": "0.0",
"configurations": [{
"app-plus" :
{
"launchtype" : "local"
},
"default" :
{
"launchtype" : "local"
},
"mp-weixin" :
{
"launchtype" : "local"
},
"type" : "uniCloud"
}
]
}

View File

@ -67,7 +67,7 @@ export function setCouponReceive(couponId) {
* @param object data
*/
export function getCoupons(data) {
return request.get('coupons', data, {
return request.get('front/coupons', data, {
noAuth: true
})
}

View File

@ -12,7 +12,7 @@ export function getCartCounts(numType,type) {
*
*/
export function getCartList(data) {
return request.get("cart/list", data);
return request.get("front/cart/list", data);
}
/**
@ -21,19 +21,21 @@ export function getCartList(data) {
* @param int number 修改数量
*/
export function changeCartNum(cartId, number) {
return request.post("cart/num", {
id: cartId,
number: number
}, {}, 1);
return request.post("front/cart/num?id=" + cartId + "&number="+number)
}
// export function changeCartNum(cartId, number) {
// return request.post("front/cart/num", {
// id: cartId,
// number: number
// }, {},);
// }
/**
* 清除购物车
* @param object ids join(',') 切割成字符串
*/
export function cartDel(ids) {
if (typeof ids === 'object')
ids = ids.join(',');
return request.post('cart/delete', {
console.log(ids)
return request.post('front/cart/delete', {
ids: ids
}, {}, 1);
}
@ -43,7 +45,7 @@ export function cartDel(ids) {
*
*/
export function getResetCart(data) {
return request.post('cart/resetcart', data);
return request.post('front/cart/resetcart', data);
}
/**
@ -51,7 +53,7 @@ export function getResetCart(data) {
* @param object data
*/
export function getOrderList(data) {
return request.get('order/list', data);
return request.get('front/order/list', data);
}
/**
@ -59,7 +61,7 @@ export function getOrderList(data) {
* @param string unique
*/
export function orderProduct(data) {
return request.post('order/product', data);
return request.post('front/order/product', data);
}
/**
@ -68,7 +70,7 @@ export function orderProduct(data) {
*
*/
export function orderComment(data) {
return request.post('order/comment', data);
return request.post('front/order/comment', data);
}
/**
@ -76,14 +78,14 @@ export function orderComment(data) {
* @param object data
*/
export function orderPay(data) {
return request.post('order/pay', data);
return request.post('front/order/pay', data);
}
/**
* 订单统计数据
*/
export function orderData() {
return request.get('order/data')
return request.get('front/order/data')
}
/**
@ -92,7 +94,7 @@ export function orderData() {
*
*/
export function orderCancel(id) {
return request.post('order/cancel', {
return request.post('front/order/cancel', {
id: id
}, {}, 1);
}
@ -103,7 +105,7 @@ export function orderCancel(id) {
*
*/
export function orderDel(uni) {
return request.post('order/del', {
return request.post('front/order/del', {
id: uni
}, {}, 1);
}
@ -113,7 +115,7 @@ export function orderDel(uni) {
* @param string uni
*/
export function getOrderDetail(uni) {
return request.get('order/detail/' + uni);
return request.get('front/order/detail/' + uni);
}
/**
@ -122,7 +124,7 @@ export function getOrderDetail(uni) {
*
*/
export function orderAgain(uni) {
return request.post('order/again', {
return request.post('front/order/again', {
orderNo: uni
});
}
@ -133,7 +135,7 @@ export function orderAgain(uni) {
*
*/
export function orderTake(uni) {
return request.post('order/take', {
return request.post('front/order/take', {
id: uni
}, {}, 1);
}
@ -143,7 +145,7 @@ export function orderTake(uni) {
* @returns {*}
*/
export function express(uni) {
return request.get("order/express/" + uni);
return request.get("front/order/express/" + uni);
}
/**
@ -151,7 +153,7 @@ export function express(uni) {
*
*/
export function ordeRefundReason() {
return request.get('order/refund/reason');
return request.get('front/order/refund/reason');
}
/**
@ -159,7 +161,7 @@ export function ordeRefundReason() {
* @param object data
*/
export function orderRefundVerify(data) {
return request.post('order/refund', data);
return request.post('front/order/refund', data);
}
/**
@ -167,7 +169,7 @@ export function orderRefundVerify(data) {
* @param string cartId
*/
export function orderConfirm(cartId, isNew, addAgain,secKill,combination,bargain) {
return request.post('order/confirm', {
return request.post('front/order/confirm', {
cartIds: cartId,
isNew: isNew,
addAgain: addAgain,
@ -183,7 +185,7 @@ export function orderConfirm(cartId, isNew, addAgain,secKill,combination,bargain
*
*/
export function getCouponsOrderPrice(preOrderNo) {
return request.get(`coupons/order/${preOrderNo}`)
return request.get(`front/coupons/order/${preOrderNo}`)
}
/**
@ -193,7 +195,7 @@ export function getCouponsOrderPrice(preOrderNo) {
*
*/
export function orderCreate(data) {
return request.post('order/create', data);
return request.post('front/order/create', data);
}
/**
@ -203,7 +205,7 @@ export function orderCreate(data) {
* @returns {*}
*/
export function postOrderComputed(data) {
return request.post("order/computed/price", data);
return request.post("front/order/computed/price", data);
}
/**
@ -211,7 +213,7 @@ export function postOrderComputed(data) {
* @param object data
*/
export function qrcodeApi(data) {
return request.post('qrcode/str2base64', data, {}, 1);
return request.post('front/qrcode/str2base64', data, {}, 1);
}
/**
@ -219,7 +221,7 @@ export function qrcodeApi(data) {
* @param object data
*/
export function wechatOrderPay(data) {
return request.post('pay/payment', data);
return request.post('api/front/pay/payment', data);
}
/**
@ -227,7 +229,7 @@ export function wechatOrderPay(data) {
* @param object data
*/
export function wechatQueryPayResult(data) {
return request.get('pay/queryPayResult?orderNo=' + data);
return request.get('front/pay/queryPayResult?orderNo=' + data);
}
/**
@ -235,7 +237,7 @@ export function wechatQueryPayResult(data) {
* @param object data
*/
export function applyRefund(orderId) {
return request.get(`order/apply/refund/${orderId}`);
return request.get(`front/order/apply/refund/${orderId}`);
}
/**
@ -251,5 +253,5 @@ export function preOrderApi(data) {
* @param object preOrderNo
*/
export function loadPreOrderApi(preOrderNo) {
return request.get(`order/load/pre/${preOrderNo}`);
return request.get(`front/order/load/pre/${preOrderNo}`);
}

View File

@ -1,8 +1,17 @@
//请求工具参考https://ext.dcloud.net.cn/plugin?id=392
const { http } = uni.$u
import request from "@/utils/request.js";
// 查询商品spu列表
export const productSpuPage = params => http.get('product/spu/page', { params })
// 查询商品
export const getSpuDetail = id => http.get('product/spu/get-detail?id=' + id, { })
export const getSpuDetail = id => request.get('front/product/detail/' + id, { })
// 查询商品列表
export const productPage = params => request.get('front/products', { params })
// 获取Banner图
export const getBanner = params => request.post('market/banner/list', { params })
// 获取租户
export const getTenant = id => request.get('tenant/get/' , {id:id })

View File

@ -1,6 +1,7 @@
module.exports = {
//后端接口地址
baseUrl: 'http://127.0.0.1:48080/app-api',
// baseUrl: 'https://cmx.bskies.cc:8000//cyywl-phone-query-api/',
baseUrl: 'http://jn6jh2.natappfree.cc/app-api',
// baseUrl: 'http://api-dashboard.yudao.iocoder.cn/app-api',
// 超时
timeout: 30000,

View File

@ -35,8 +35,9 @@ export function getPreOrder(preOrderType, orderDetails) {
"preOrderType": preOrderType,
"orderDetails": orderDetails
}).then(res => {
// console.log(res.data.columns.preOrderNo,'preOrder')
uni.navigateTo({
url: '/pages/users/order_confirm/index?preOrderNo=' + res.data.preOrderNo
url: '/pages/users/order_confirm/index?preOrderNo=' + res.data.columns.preOrderNo
});
}).catch(err => {
return util.Tips({

View File

@ -3,332 +3,6 @@
"version": "1.0.0",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "yudao-ui-app",
"version": "1.0.0",
"license": "ISC",
"dependencies": {
"clipboard": "^2.0.11",
"html-to-image": "^1.11.11",
"qrcode": "^1.5.3"
}
},
"node_modules/ansi-regex": {
"version": "5.0.1",
"resolved": "https://registry.npmmirror.com/ansi-regex/-/ansi-regex-5.0.1.tgz",
"integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==",
"engines": {
"node": ">=8"
}
},
"node_modules/ansi-styles": {
"version": "4.3.0",
"resolved": "https://registry.npmmirror.com/ansi-styles/-/ansi-styles-4.3.0.tgz",
"integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==",
"dependencies": {
"color-convert": "^2.0.1"
},
"engines": {
"node": ">=8"
}
},
"node_modules/camelcase": {
"version": "5.3.1",
"resolved": "https://registry.npmmirror.com/camelcase/-/camelcase-5.3.1.tgz",
"integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==",
"engines": {
"node": ">=6"
}
},
"node_modules/clipboard": {
"version": "2.0.11",
"resolved": "https://registry.npmmirror.com/clipboard/-/clipboard-2.0.11.tgz",
"integrity": "sha512-C+0bbOqkezLIsmWSvlsXS0Q0bmkugu7jcfMIACB+RDEntIzQIkdr148we28AfSloQLRdZlYL/QYyrq05j/3Faw==",
"dependencies": {
"good-listener": "^1.2.2",
"select": "^1.1.2",
"tiny-emitter": "^2.0.0"
}
},
"node_modules/cliui": {
"version": "6.0.0",
"resolved": "https://registry.npmmirror.com/cliui/-/cliui-6.0.0.tgz",
"integrity": "sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==",
"dependencies": {
"string-width": "^4.2.0",
"strip-ansi": "^6.0.0",
"wrap-ansi": "^6.2.0"
}
},
"node_modules/color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npmmirror.com/color-convert/-/color-convert-2.0.1.tgz",
"integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==",
"dependencies": {
"color-name": "~1.1.4"
},
"engines": {
"node": ">=7.0.0"
}
},
"node_modules/color-name": {
"version": "1.1.4",
"resolved": "https://registry.npmmirror.com/color-name/-/color-name-1.1.4.tgz",
"integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA=="
},
"node_modules/decamelize": {
"version": "1.2.0",
"resolved": "https://registry.npmmirror.com/decamelize/-/decamelize-1.2.0.tgz",
"integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/delegate": {
"version": "3.2.0",
"resolved": "https://registry.npmmirror.com/delegate/-/delegate-3.2.0.tgz",
"integrity": "sha512-IofjkYBZaZivn0V8nnsMJGBr4jVLxHDheKSW88PyxS5QC4Vo9ZbZVvhzlSxY87fVq3STR6r+4cGepyHkcWOQSw=="
},
"node_modules/dijkstrajs": {
"version": "1.0.3",
"resolved": "https://registry.npmmirror.com/dijkstrajs/-/dijkstrajs-1.0.3.tgz",
"integrity": "sha512-qiSlmBq9+BCdCA/L46dw8Uy93mloxsPSbwnm5yrKn2vMPiy8KyAskTF6zuV/j5BMsmOGZDPs7KjU+mjb670kfA=="
},
"node_modules/emoji-regex": {
"version": "8.0.0",
"resolved": "https://registry.npmmirror.com/emoji-regex/-/emoji-regex-8.0.0.tgz",
"integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A=="
},
"node_modules/encode-utf8": {
"version": "1.0.3",
"resolved": "https://registry.npmmirror.com/encode-utf8/-/encode-utf8-1.0.3.tgz",
"integrity": "sha512-ucAnuBEhUK4boH2HjVYG5Q2mQyPorvv0u/ocS+zhdw0S8AlHYY+GOFhP1Gio5z4icpP2ivFSvhtFjQi8+T9ppw=="
},
"node_modules/find-up": {
"version": "4.1.0",
"resolved": "https://registry.npmmirror.com/find-up/-/find-up-4.1.0.tgz",
"integrity": "sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==",
"dependencies": {
"locate-path": "^5.0.0",
"path-exists": "^4.0.0"
},
"engines": {
"node": ">=8"
}
},
"node_modules/get-caller-file": {
"version": "2.0.5",
"resolved": "https://registry.npmmirror.com/get-caller-file/-/get-caller-file-2.0.5.tgz",
"integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==",
"engines": {
"node": "6.* || 8.* || >= 10.*"
}
},
"node_modules/good-listener": {
"version": "1.2.2",
"resolved": "https://registry.npmmirror.com/good-listener/-/good-listener-1.2.2.tgz",
"integrity": "sha512-goW1b+d9q/HIwbVYZzZ6SsTr4IgE+WA44A0GmPIQstuOrgsFcT7VEJ48nmr9GaRtNu0XTKacFLGnBPAM6Afouw==",
"dependencies": {
"delegate": "^3.1.2"
}
},
"node_modules/html-to-image": {
"version": "1.11.11",
"resolved": "https://registry.npmmirror.com/html-to-image/-/html-to-image-1.11.11.tgz",
"integrity": "sha512-9gux8QhvjRO/erSnDPv28noDZcPZmYE7e1vFsBLKLlRlKDSqNJYebj6Qz1TGd5lsRV+X+xYyjCKjuZdABinWjA=="
},
"node_modules/is-fullwidth-code-point": {
"version": "3.0.0",
"resolved": "https://registry.npmmirror.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz",
"integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==",
"engines": {
"node": ">=8"
}
},
"node_modules/locate-path": {
"version": "5.0.0",
"resolved": "https://registry.npmmirror.com/locate-path/-/locate-path-5.0.0.tgz",
"integrity": "sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==",
"dependencies": {
"p-locate": "^4.1.0"
},
"engines": {
"node": ">=8"
}
},
"node_modules/p-limit": {
"version": "2.3.0",
"resolved": "https://registry.npmmirror.com/p-limit/-/p-limit-2.3.0.tgz",
"integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==",
"dependencies": {
"p-try": "^2.0.0"
},
"engines": {
"node": ">=6"
}
},
"node_modules/p-locate": {
"version": "4.1.0",
"resolved": "https://registry.npmmirror.com/p-locate/-/p-locate-4.1.0.tgz",
"integrity": "sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==",
"dependencies": {
"p-limit": "^2.2.0"
},
"engines": {
"node": ">=8"
}
},
"node_modules/p-try": {
"version": "2.2.0",
"resolved": "https://registry.npmmirror.com/p-try/-/p-try-2.2.0.tgz",
"integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==",
"engines": {
"node": ">=6"
}
},
"node_modules/path-exists": {
"version": "4.0.0",
"resolved": "https://registry.npmmirror.com/path-exists/-/path-exists-4.0.0.tgz",
"integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==",
"engines": {
"node": ">=8"
}
},
"node_modules/pngjs": {
"version": "5.0.0",
"resolved": "https://registry.npmmirror.com/pngjs/-/pngjs-5.0.0.tgz",
"integrity": "sha512-40QW5YalBNfQo5yRYmiw7Yz6TKKVr3h6970B2YE+3fQpsWcrbj1PzJgxeJ19DRQjhMbKPIuMY8rFaXc8moolVw==",
"engines": {
"node": ">=10.13.0"
}
},
"node_modules/qrcode": {
"version": "1.5.3",
"resolved": "https://registry.npmmirror.com/qrcode/-/qrcode-1.5.3.tgz",
"integrity": "sha512-puyri6ApkEHYiVl4CFzo1tDkAZ+ATcnbJrJ6RiBM1Fhctdn/ix9MTE3hRph33omisEbC/2fcfemsseiKgBPKZg==",
"dependencies": {
"dijkstrajs": "^1.0.1",
"encode-utf8": "^1.0.3",
"pngjs": "^5.0.0",
"yargs": "^15.3.1"
},
"bin": {
"qrcode": "bin/qrcode"
},
"engines": {
"node": ">=10.13.0"
}
},
"node_modules/require-directory": {
"version": "2.1.1",
"resolved": "https://registry.npmmirror.com/require-directory/-/require-directory-2.1.1.tgz",
"integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==",
"engines": {
"node": ">=0.10.0"
}
},
"node_modules/require-main-filename": {
"version": "2.0.0",
"resolved": "https://registry.npmmirror.com/require-main-filename/-/require-main-filename-2.0.0.tgz",
"integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg=="
},
"node_modules/select": {
"version": "1.1.2",
"resolved": "https://registry.npmmirror.com/select/-/select-1.1.2.tgz",
"integrity": "sha512-OwpTSOfy6xSs1+pwcNrv0RBMOzI39Lp3qQKUTPVVPRjCdNa5JH/oPRiqsesIskK8TVgmRiHwO4KXlV2Li9dANA=="
},
"node_modules/set-blocking": {
"version": "2.0.0",
"resolved": "https://registry.npmmirror.com/set-blocking/-/set-blocking-2.0.0.tgz",
"integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw=="
},
"node_modules/string-width": {
"version": "4.2.3",
"resolved": "https://registry.npmmirror.com/string-width/-/string-width-4.2.3.tgz",
"integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==",
"dependencies": {
"emoji-regex": "^8.0.0",
"is-fullwidth-code-point": "^3.0.0",
"strip-ansi": "^6.0.1"
},
"engines": {
"node": ">=8"
}
},
"node_modules/strip-ansi": {
"version": "6.0.1",
"resolved": "https://registry.npmmirror.com/strip-ansi/-/strip-ansi-6.0.1.tgz",
"integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==",
"dependencies": {
"ansi-regex": "^5.0.1"
},
"engines": {
"node": ">=8"
}
},
"node_modules/tiny-emitter": {
"version": "2.1.0",
"resolved": "https://registry.npmmirror.com/tiny-emitter/-/tiny-emitter-2.1.0.tgz",
"integrity": "sha512-NB6Dk1A9xgQPMoGqC5CVXn123gWyte215ONT5Pp5a0yt4nlEoO1ZWeCwpncaekPHXO60i47ihFnZPiRPjRMq4Q=="
},
"node_modules/which-module": {
"version": "2.0.1",
"resolved": "https://registry.npmmirror.com/which-module/-/which-module-2.0.1.tgz",
"integrity": "sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ=="
},
"node_modules/wrap-ansi": {
"version": "6.2.0",
"resolved": "https://registry.npmmirror.com/wrap-ansi/-/wrap-ansi-6.2.0.tgz",
"integrity": "sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==",
"dependencies": {
"ansi-styles": "^4.0.0",
"string-width": "^4.1.0",
"strip-ansi": "^6.0.0"
},
"engines": {
"node": ">=8"
}
},
"node_modules/y18n": {
"version": "4.0.3",
"resolved": "https://registry.npmmirror.com/y18n/-/y18n-4.0.3.tgz",
"integrity": "sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ=="
},
"node_modules/yargs": {
"version": "15.4.1",
"resolved": "https://registry.npmmirror.com/yargs/-/yargs-15.4.1.tgz",
"integrity": "sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==",
"dependencies": {
"cliui": "^6.0.0",
"decamelize": "^1.2.0",
"find-up": "^4.1.0",
"get-caller-file": "^2.0.1",
"require-directory": "^2.1.1",
"require-main-filename": "^2.0.0",
"set-blocking": "^2.0.0",
"string-width": "^4.2.0",
"which-module": "^2.0.0",
"y18n": "^4.0.0",
"yargs-parser": "^18.1.2"
},
"engines": {
"node": ">=8"
}
},
"node_modules/yargs-parser": {
"version": "18.1.3",
"resolved": "https://registry.npmmirror.com/yargs-parser/-/yargs-parser-18.1.3.tgz",
"integrity": "sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==",
"dependencies": {
"camelcase": "^5.0.0",
"decamelize": "^1.2.0"
},
"engines": {
"node": ">=6"
}
}
},
"dependencies": {
"ansi-regex": {
"version": "5.0.1",

View File

@ -586,13 +586,18 @@
"borderStyle": "white",
"backgroundColor": "#ffffff",
"list": [
// {
// "pagePath": "pages/index/index",
// "iconPath": "static/images/tabbar/nav_icon_shop.png",
// "selectedIconPath": "static/images/tabbar/nav_icon_shop_active.png",
// "text": "商城"
// },
{
"pagePath": "pages/index/index",
"iconPath": "static/images/tabbar/nav_icon_shop.png",
"selectedIconPath": "static/images/tabbar/nav_icon_shop_active.png",
"text": "商城"
},
{
"pagePath": "pages/goods_cate/goods_cate",
"iconPath": "static/images/tabbar/nav_icon_sort.png",
"selectedIconPath": "static/images/tabbar/nav_icon_sort_active.png",
"text": "分类"
},
{
"pagePath": "pages/member_application/index",
"iconPath": "static/images/tabbar/nav_icon_member.png",
@ -606,18 +611,12 @@
"text": "会员申请",
"visible":false
},
{
"pagePath": "pages/goods_cate/goods_cate",
"iconPath": "static/images/tabbar/nav_icon_sort.png",
"selectedIconPath": "static/images/tabbar/nav_icon_sort_active.png",
"text": "分类"
},
// {
// "pagePath": "pages/order_addcart/order_addcart",
// "iconPath": "static/images/tabbar/nav_icon_cart.png",
// "selectedIconPath": "static/images/3-002.png",
// "text": "购物车"
// },
{
"pagePath": "pages/order_addcart/order_addcart",
"iconPath": "static/images/tabbar/nav_icon_cart.png",
"selectedIconPath": "static/images/3-002.png",
"text": "购物车"
},
{
"pagePath": "pages/user/index",
"iconPath": "static/images/tabbar/nav_icon_my.png",

View File

@ -0,0 +1,225 @@
<template>
<view class="container">
<!-- 购物车为空 -->
<view v-if="!hasLogin || cartList.length === 0">
<view class="cart-empty">
<u-empty text="去逛逛添点什么吧" width="500rpx" height="500rpx" icon="/static/images/empty/cart.png"></u-empty>
</view>
</view>
<!-- 购物车列表 -->
<scroll-view v-if="hasLogin && cartList.length > 0" class="cart-product" scroll-y="true">
<yd-cart-product :product-list="cartList" @productCheckedChange="handleProductCheckedChange" @productCountChange="handleProductCountChange"></yd-cart-product>
</scroll-view>
<!-- 未登录 -->
<view v-if="!hasLogin" class="login-tips-box">
<view class="login-tips">
<navigator url="/pages/login/social" open-type="navigate" hover-class="none">
<view class="login-link">登录查看</view>
</navigator>
</view>
</view>
<!-- 底部菜单 -->
<view class="cart-btn-container">
<view class="btn-box">
<view class="product-check-info">
<view class="check-all-btn" @click.stop="handleCheckAllProduct">
<u-icon v-if="isCheckAll" name="checkmark-circle-fill" color="#3c9cff" size="22"></u-icon>
<view v-else class="un-check-box"></view>
</view>
<view class="info-text">合计</view>
<view>
<yd-text-price color="red" size="15" intSize="20" :price="totalAmount"></yd-text-price>
</view>
</view>
<view v-if="checkedProduct.length > 0" class="cart-btn-group">
<u-button type="warning" shape="circle" size="small" text="移除" @click="handleRemoveProduct"></u-button>
<view class="btn-gap"></view>
<u-button style="margin-left: 10px" class="main-btn" type="primary" shape="circle" size="small" text="去结算" @click="handleCheckoutProduct"></u-button>
</view>
<view v-else class="cart-btn-group">
<u-button type="warning" shape="circle" size="small" text="移除" disabled></u-button>
<view class="btn-gap"></view>
<u-button style="margin-left: 10px" class="main-btn" type="primary" shape="circle" size="small" text="去结算" disabled></u-button>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
title: '',
cartList: [],
checkedNumber: 0,
totalAmount: 0
}
},
computed: {
checkedProduct() {
return this.cartList.filter(item => {
return item.checked
})
},
isCheckAll() {
if (this.cartList.length < 1) {
return false
}
return this.cartList.every(item => {
return item.checked
})
},
hasLogin() {
return this.$store.getters.hasLogin
}
},
onShow() {
if (this.hasLogin) {
this.loadCartDetailData()
} else {
this.cartList =[]
}
},
methods: {
loadCartDetailData() {
this.$store.dispatch('CartProductDetail').then(res => {
this.cartList = res.data || []
})
},
/** 商品全选/取消全选 */
handleCheckAllProduct() {
if (this.cartList.length < 1) {
return
}
const productIds = this.cartList.map(item => {
return item.productId
})
this.$store.dispatch('CartProductCheckChange', { productIds, checked: !this.isCheckAll }).then(res => {
this.cartList = res.data || []
})
},
/** 商品单选/取消单选 */
handleProductCheckedChange(productId, checked) {
this.$store.dispatch('CartProductCheckChange', { productIds: [productId], checked: checked }).then(res => {
this.cartList = res.data || []
})
},
/** 修改购物车商品数量 */
handleProductCountChange(productId, number) {
this.$store.dispatch('CartProductCountChange', { productIds: [productId], productCount: number }).then(res => {
this.cartList = res.data || []
})
},
/** 移除购物车商品 */
handleRemoveProduct() {
if (this.checkedProduct < 1) {
return
}
const productIds = this.checkedProduct.map(item => {
return item.productId
})
uni.showModal({
title: '确定要移除选中的商品?',
cancelText: '取消',
confirmText: '移除',
success: res => {
if (res.confirm) {
this.$store.dispatch('CartProductCountChange', { productIds: productIds, productCount: 0 }).then(res => {
this.cartList = res.data || []
})
} else if (res.cancel) {
//console.log('')
}
}
})
},
/** 购物车提交结算 */
handleCheckoutProduct() {
if (this.checkedProduct < 1) {
return
}
const checkedProduct = this.checkedProduct.map(item => {
return { productId: item.productId, productCount: item.productCount, sellPrice: item.sellPrice }
})
uni.$u.route('/pages/checkout/checkout', {
checkedProduct: JSON.stringify(checkedProduct)
})
}
}
}
</script>
<style lang="scss" scoped>
.login-tips-box {
padding-top: 100rpx;
.login-tips {
@include flex-center;
color: #939393;
font-size: 24rpx;
letter-spacing: 5rpx;
}
.login-link {
width: 160rpx;
height: 50rpx;
line-height: 50rpx;
border-radius: 50rpx;
border: 1px solid #777;
color: #777;
text-align: center;
}
}
.cart-btn-container {
position: fixed;
bottom: 0;
left: 0;
.btn-box {
background: $custom-bg-color;
border-top: $custom-border-style;
width: 750rpx;
@include flex-space-between();
height: 100rpx;
.product-check-info {
@include flex-left;
.check-all-btn {
padding: 20rpx;
.un-check-box {
width: 20px;
height: 20px;
border: 1px solid #939393;
border-radius: 50%;
}
}
.info-text {
font-size: 26rpx;
font-weight: bold;
color: #666666;
}
}
.cart-btn-group {
@include flex-right();
width: 360rpx;
padding-right: 10px;
.btn-gap {
width: 20rpx;
}
}
}
}
</style>

View File

@ -1,52 +1,9 @@
<template>
<view class="container">
<!-- 购物车为空 -->
<view v-if="!hasLogin || cartList.length === 0">
<view class="cart-empty">
<u-empty text="去逛逛添点什么吧" width="500rpx" height="500rpx" icon="/static/images/empty/cart.png"></u-empty>
</view>
</view>
<!-- 购物车列表 -->
<scroll-view v-if="hasLogin && cartList.length > 0" class="cart-product" scroll-y="true">
<yd-cart-product :product-list="cartList" @productCheckedChange="handleProductCheckedChange" @productCountChange="handleProductCountChange"></yd-cart-product>
</scroll-view>
<!-- 未登录 -->
<view v-if="!hasLogin" class="login-tips-box">
<view class="login-tips">
<navigator url="/pages/login/social" open-type="navigate" hover-class="none">
<view class="login-link">登录查看</view>
</navigator>
</view>
</view>
<!-- 底部菜单 -->
<view class="cart-btn-container">
<view class="btn-box">
<view class="product-check-info">
<view class="check-all-btn" @click.stop="handleCheckAllProduct">
<u-icon v-if="isCheckAll" name="checkmark-circle-fill" color="#3c9cff" size="22"></u-icon>
<view v-else class="un-check-box"></view>
</view>
<view class="info-text">合计</view>
<view>
<yd-text-price color="red" size="15" intSize="20" :price="totalAmount"></yd-text-price>
</view>
</view>
<view v-if="checkedProduct.length > 0" class="cart-btn-group">
<u-button type="warning" shape="circle" size="small" text="移除" @click="handleRemoveProduct"></u-button>
<view class="btn-gap"></view>
<u-button style="margin-left: 10px" class="main-btn" type="primary" shape="circle" size="small" text="去结算" @click="handleCheckoutProduct"></u-button>
</view>
<view v-else class="cart-btn-group">
<u-button type="warning" shape="circle" size="small" text="移除" disabled></u-button>
<view class="btn-gap"></view>
<u-button style="margin-left: 10px" class="main-btn" type="primary" shape="circle" size="small" text="去结算" disabled></u-button>
</view>
</view>
</view>
<view class="navbar">
<u-navbar title="个人中心">
</u-navbar>
</view>
</view>
</template>
@ -156,70 +113,5 @@ export default {
</script>
<style lang="scss" scoped>
.login-tips-box {
padding-top: 100rpx;
.login-tips {
@include flex-center;
color: #939393;
font-size: 24rpx;
letter-spacing: 5rpx;
}
.login-link {
width: 160rpx;
height: 50rpx;
line-height: 50rpx;
border-radius: 50rpx;
border: 1px solid #777;
color: #777;
text-align: center;
}
}
.cart-btn-container {
position: fixed;
bottom: 0;
left: 0;
.btn-box {
background: $custom-bg-color;
border-top: $custom-border-style;
width: 750rpx;
@include flex-space-between();
height: 100rpx;
.product-check-info {
@include flex-left;
.check-all-btn {
padding: 20rpx;
.un-check-box {
width: 20px;
height: 20px;
border: 1px solid #939393;
border-radius: 50%;
}
}
.info-text {
font-size: 26rpx;
font-weight: bold;
color: #666666;
}
}
.cart-btn-group {
@include flex-right();
width: 360rpx;
padding-right: 10px;
.btn-gap {
width: 20rpx;
}
}
}
}
</style>

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -58,16 +58,6 @@
},
data() {
return {
// list: [
// {
// name:'',
// fontSize:'28'
// },
// {
// name:'',
// fontSize:'28'
// },
// ],
memberData: [],
payInfo: {
userPhone: '',
@ -106,7 +96,7 @@
const res = await memberGradeInfo()
if(res.data.some((item) => !!parseInt(item.isExist))){
uni.setTabBarItem({
index: 0,
index: 2,
pagePath: '/pages/member_equity/index'
})
uni.switchTab({
@ -114,7 +104,7 @@
})
}else{
uni.setTabBarItem({
index: 0,
index: 2,
pagePath: '/pages/member_application/index'
})
}

View File

@ -0,0 +1,419 @@
<template>
<view class="box">
<view class="box-member">
<view class="member-left">
<text class="left-title">{{memberDetail.grade}}</text>
<view class="left-info">
<text>{{userInfo.mobile}}</text>
<text>会员积分{{memberDetail.integral}}</text>
</view>
<text>再升1级即可获得XX等6项权益</text>
<view class="left-button">
<view class="left-shopping" @click="handleRouter('购买记录')">
<text>购买记录</text>
<image src="../../static/images/shopping-right.png" ></image>
</view>
<view class="left-others" @click="handleRouter('为他人充值')">
为他人充值
<image src="../../static/images/others-right.png" ></image>
</view>
</view>
</view>
<view class="member-right">
<image src='../../static/images/vipStar.png'></image>
<text>会员等级{{vipData.findIndex((item) => item == memberDetail.grade) +1}}</text>
<button @click="handleRenew"></button>
</view>
</view>
<view class="box-equity">
<view class="equity-text">
<view >
<image src='../../static/images/memberLogo.png'></image>
<text class="equity-member">我的会员权益</text>
</view>
<text class="equity-look">查看权益></text>
</view>
<view class="equity-item" v-for="(item,index) in equityData" :key="index">
<view class="equity-grade">
<image :src='list[list.findIndex((i) => item.gear == i.name)].img'></image>
<text>办理日期{{item.startTime}}</text>
</view>
<view class="equity-money">
<view class="money-box money-completed">
<text>已返回金额</text>
<view>
<text class="money-text">{{item.totalMoney}}</text>
<text class="money-detailed" @click="handleDetailed(item.reportId)">></text>
</view>
</view>
<view class="money-box money-treat">
<text>带返还金额 () </text>
<text class="money-text">{{list[list.findIndex((i) => item.gear == i.name)].name-item.totalMoney}}</text>
</view>
<view class="money-box money-term">
<text>带返还期额</text>
<text class="money-text">{{item.frequency}}x12</text>
</view>
<view class="money-box money-time">
<text>返费结束时间</text>
<text class="money-text">{{item.endTime}}</text>
</view>
</view>
</view>
</view>
<u-navbar leftIcon="" title="会员申请"></u-navbar>
</view>
</template>
<script>
import {
memberHeadInfo,
memberGradeInfo,
query
} from '@/api/member.js';
import {
mapGetters
} from 'vuex'
export default {
name: "member_application",
data() {
return {
list: [
{
img:'../../static/images/member240.png',
name:'360'
},
{
img:'../../static/images/member400.png',
name:'600'
},
{
img:'../../static/images/member960.png',
name:'900'
},
],
vipData:['普通会员','中级会员','高级会员'],
show: false,
memberDetail:{},
equityData:[]
};
},
computed: mapGetters(['userInfo']),
async onLoad() {
const resful = await memberGradeInfo()
if(resful.data.some((item) => !!parseInt(item.isExist))){
uni.setTabBarItem({
index: 0,
pagePath: '/pages/member_equity/index'
})
}else{
uni.setTabBarItem({
index: 0,
pagePath: '/pages/member_application/index'
})
uni.switchTab({
url:'/pages/member_application/index'
})
}
const res = await memberHeadInfo()
this.memberDetail = res.data
const equity = await query(this.userInfo.mobile)
this.equityData = equity.data
},
methods: {
handleDetailed(reportId){
uni.navigateTo({
url:`/pages/member_detail/index?reportId=${reportId}`,
})
},
handleRenew(){
uni.navigateTo({
url:'/pages/member_renew/index'
})
},
handleRouter(value){
switch (value){
case "购买记录":
uni.navigateTo({
url:'/pages/member_record/index'
})
break;
case "为他人充值":
uni.navigateTo({
url:'/pages/member_others/index'
})
break;
default:
break;
}
},
}
};
</script>
<style lang="scss" scoped>
.box {
margin-bottom: 30%;
margin-top: 10%;
background: #fff;
height: 100vh;
background: url(../../static/images/memberBg.png);
background-size: cover;
background-repeat: no-repeat;
background-attachment: fixed;
.u-nav-slot{
::v-deep .u-popup__content{
padding-bottom: 20% !important;
}
}
.box-member {
padding: 36rpx 40rpx;
border-radius: 20rpx;
width: 100%;
// padding: 20rpx 20rpx 30rpx 20rpx;
display: flex;
justify-content: space-between;
line-height: 50rpx;
.member-left {
display: flex;
flex-direction: column;
justify-content: space-between;
width: 69%;
font-size: 28rpx;
font-family: PingFang SC;
font-weight: 400;
color: #000000;
.left-title {
font-size: 35rpx;
font-family: PingFang SC;
font-weight: 600;
color: #000000;
}
.left-info {
display: flex;
justify-content: space-between;
}
.left-button{
display: flex;
justify-content: space-between;
margin-top: 10rpx;
image{
width: 24rpx;
height: 24rpx;
margin-left: 13rpx;
}
.left-shopping{
display: flex;
align-items: center;
justify-content: center;
width: 204rpx;
height: 61rpx;
background: #F8EFF0;
border: 1px solid #F783B0;
border-radius: 30rpx;
font-size: 28rpx;
font-family: PingFang SC;
font-weight: 400;
color: #000000;
}
.left-others{
background-image: url("../../static/images/others-button.png");
background-size: 204rpx 61rpx;
display: flex;
align-items: center;
justify-content: center;
width: 204rpx;
height: 61rpx;
font-size: 28rpx;
font-family: PingFang SC;
font-weight: 400;
color: #FFFFFF;
}
}
}
.member-right {
display: flex;
flex-direction: column;
justify-content: space-between;
align-items: center;
width: 22%;
font-size: 22rpx;
font-family: PingFang SC;
font-weight: 400;
color: #000000;
image {
width: 100rpx;
height: 100rpx;
border-radius: 50%;
margin-bottom: 10rpx;
}
button {
margin-top: 10rpx;
padding: 7rpx 16rpx;
background: #F22E60;
border-image: linear-gradient(0deg, #A8052E, #FFFFFF) 10 10;
border-radius: 18rpx;
font-size: 22rpx;
font-family: PingFang SC;
font-weight: 400;
color: #FFFFFF;
}
}
}
.box-equity {
// border-radius: 20rpx;
width: 100%;
padding: 0 40rpx;
background: url(../../static/images/memberEquity.png);
background-size: 100%;
background-repeat: no-repeat;
display: flex;
flex-direction: column;
position: relative;
.equity-text {
margin: 5% 0;
display: flex;
align-items: center;
height: 10%;
view{
display: flex;
align-items: center;
justify-content: center;
width: 44%;
image{
width: 26rpx;
height: 26rpx;
}
}
.equity-member {
margin: 0 10%;
font-size: 30rpx;
font-family: PingFang SC;
font-weight: 400;
color: #FFFFFF;
}
.equity-look {
font-size: 28rpx;
font-family: PingFang SC;
font-weight: 400;
color: #FF4922;
}
}
.equity-item {
background: #fff;
display: flex;
flex-direction: column;
justify-content: space-between;
border-radius: 20rpx;
margin: 0 20rpx 20rpx 20rpx;
.equity-grade {
border-radius: 10rpx 10rpx;
padding: 20rpx;
display: flex;
justify-content: space-between;
font-size: 24rpx;
font-family: PingFang SC;
font-weight: 400;
color: #000000;
image{
width: 295rpx;
height: 35rpx;
}
}
.equity-money {
display: flex;
justify-content: space-around;
flex-wrap: wrap;
.money-box {
width: 46%;
padding: 24rpx 25rpx;
border-radius: 10px;
display: flex;
flex-direction: column;
justify-content: space-between;
font-size: 28rpx;
font-family: PingFang SC;
font-weight: 400;
color: #000000;
margin-bottom: 18rpx;
.money-text {
font-size: 30rpx;
font-family: PingFang SC;
font-weight: 400;
}
}
.money-completed {
background: #FFF2F2;
border: 1px solid #F22E60;
.money-text {
color: #F91F57;
}
view {
margin-top: 26rpx;
display: flex;
justify-content: space-between;
align-items: center;
font-size: 24rpx;
font-family: PingFang SC;
font-weight: 400;
color: #000000;
}
}
.money-treat {
background: #FFFDF1;
border: 1px solid #FF962F;
.money-text {
margin-top: 26rpx;
color: #EBAF00;
}
}
.money-term {
background: #F8FFF8;
border: 1px solid #38A74F;
.money-text {
margin-top: 26rpx;
color: #2C9E2C;
}
}
.money-time {
background: #F0FDFC;
border: 1px solid #5CA4E8;
.money-text {
margin-top: 26rpx;
color: #2D7AC9;
}
}
}
}
}
}
</style>

View File

@ -103,12 +103,12 @@
const resful = await memberGradeInfo()
if(resful.data.some((item) => !!parseInt(item.isExist))){
uni.setTabBarItem({
index: 0,
index: 2,
pagePath: '/pages/member_equity/index'
})
}else{
uni.setTabBarItem({
index: 0,
index: 2,
pagePath: '/pages/member_application/index'
})
uni.switchTab({
@ -117,8 +117,7 @@
}
const res = await memberHeadInfo()
this.memberDetail = res.data
// this.userInfo.mobile
const equity = await query(13668261228)
const equity = await query(this.userInfo.mobile)
this.equityData = equity.data
},
methods: {

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -111,7 +111,7 @@
<view class='list'>
<view class='payItem acea-row row-middle' :class='active==index ?"on":""'
@tap='payItem(index)' v-for="(item,index) in cartArr" :key='index'
v-if="item.payStatus==1">
>
<view class='name acea-row row-center-wrapper'>
<view class='iconfont animated'
:class='(item.icon) + " " + (animated==true&&active==index ?"bounceIn":"")'>
@ -952,6 +952,7 @@
payChannel: that.payChannel
};
console.log(that.system_store.phone,'data')
if (data.payType == 'yue' && parseFloat(that.userInfo.nowMoney) < parseFloat(that.totalPrice))
return that.$util
.Tips({

View File

@ -1,110 +1,74 @@
<template>
<view>
<view class='my-order'>
<view class='header bg-color'>
<view class='picTxt acea-row row-between-wrapper'>
<view class='text'>
<view class='name'>订单信息</view>
<view>消费订单{{orderData.orderCount || 0}} 总消费{{Number(orderData.sumPrice).toFixed(2) || 0}}</view>
<view class="container">
<view class="navbar">
<u-sticky bgColor="#fff">
<u-navbar>
<view class="navbar-left" v-slot="left">
<u-icon name="arrow-left"></u-icon>
</view>
<view class='pictrue'>
<image src='../../../static/images/orderTime.png'></image>
</view>
</view>
</view>
<view class='nav acea-row row-around'>
<view class='item' :class='orderStatus==0 ? "on": ""' @click="statusClick(0)">
<view>待付款</view>
<view class='num'>{{orderData.unPaidCount || 0}}</view>
</view>
<view class='item' :class='orderStatus==1 ? "on": ""' @click="statusClick(1)">
<view>待发货</view>
<view class='num'>{{orderData.unShippedCount || 0}}</view>
</view>
<view class='item' :class='orderStatus==2 ? "on": ""' @click="statusClick(2)">
<view>待收货</view>
<view class='num '>{{orderData.receivedCount || 0}}</view>
</view>
<view class='item' :class='orderStatus==3 ? "on": ""' @click="statusClick(3)">
<view>待评价</view>
<view class='num'>{{orderData.evaluatedCount || 0}}</view>
</view>
<view class='item' :class='orderStatus==4 ? "on": ""' @click="statusClick(4)">
<view>已完成</view>
<view class='num'>{{orderData.completeCount || 0}}</view>
</view>
</view>
<view class='list'>
<view class='item' v-for="(item,index) in orderList" :key="index">
<view @click='goOrderDetails(item.orderId)'>
<view class='title acea-row row-between-wrapper'>
<view class="acea-row row-middle">
<text class="sign cart-color acea-row row-center-wrapper" v-if="item.activityType !== '普通' && item.activityType !== '核销'">{{item.activityType}}</text>
<!-- <text class="sign cart-color acea-row row-center-wrapper" v-if="item.bargainId != 0"></text>
<text class="sign cart-color acea-row row-center-wrapper" v-else-if="item.storeOrder.combinationId != 0">拼团</text>
<text class="sign cart-color acea-row row-center-wrapper" v-else-if="item.storeOrder.seckillId != 0">秒杀</text> -->
<view>{{item.createTime}}</view>
<template v-slot="center ">
<view class="search">
<view class="icon">
<u-icon name="search" size="44rpx"></u-icon>
</view>
<view class='font-color'>{{item.orderStatus}}</view>
<!-- <view v-if="item.status?item.status.type == 0:0" class='font-color'>待付款</view>
<view v-else-if="item.status?item.status.type == 1:0 && item.storeOrder.shippingType==1" class='font-color'>待发货</view>
<view v-else-if="item.status?item.status.type == 2:0 && item.storeOrder.shippingType==1" class='font-color'>待收货</view>
<view v-else-if="item.status?item.status.type == 3:0 && item.storeOrder.shippingType==1" class='font-color'>待评价</view>
<view v-else-if="item.status?item.status.type == 4:0 && item.storeOrder.shippingType==1" class='font-color'>已完成</view>
<view v-else-if="item.storeOrder.shippingType==2" class='font-color'>待核销</view> -->
<view class="input">
<u--input placeholder="请输入内容" v-model="value" @change="change"></u--input>
</view>
<view class="button">搜索</view>
</view>
<view class='item-info acea-row row-between row-top' v-for="(items,index) in item.orderInfoList" :key="index">
<view class='pictrue'>
<image :src='items.image'></image>
</view>
<view class='text acea-row row-between'>
<view class='name line2'>{{items.storeName}}</view>
<view class='money'>
<view>{{items.price}}</view>
<view>x{{items.cartNum}}</view>
</view>
</view>
</template>
</u-navbar>
</u-sticky>
</view>
<view class="tabs">
<u-tabs :list="list1" @tap="click" lineWidth="60rpx" lineHeight="9rpx"></u-tabs>
</view>
<!-- <view class="item" @tap="goOrderDetails(123)">
</view> -->
<view class='list' v-if="status='0'">
<!-- <view class='item' v-for="(item,index) in orderList" :key="index"> -->
<view class='item' v-for="(item,index) in orderList" :key="item.id">
<view @tap='goOrderDetails(item.orderId)'>
<view class="box"></view>
<view class="top">
<view class="shopName">
古驰旗舰店
</view>
<view class='totalPrice'>{{item.totalNum}}件商品总金额
<text class='money font-color'>{{item.payPrice}}</text>
<view class="state">
{{getStatus(item.status)}}
</view>
</view>
<view class='bottom acea-row row-right row-middle'>
<view class='bnt cancelBnt' v-if="!item.paid" @click='cancelOrder(index,item.id)'>取消订单</view>
<view class='bnt bg-color' v-if="!item.paid" @click='goPay(item.payPrice,item.orderId)'>立即付款</view>
<view class='bnt bg-color' v-else-if="item.status== 0 || item.status== 1 || item.status== 3" @click='goOrderDetails(item.orderId)'>查看详情</view>
<view class='bnt bg-color' v-else-if="item.status==2" @click='goOrderDetails(item.orderId)'>去评价</view>
<view class='bnt cancelBnt' v-if="item.status == 3" @click='delOrder(item.id,index)'>删除订单</view>
<view class="content">
<view class="image">
<u--image :showLoading="true" radius="10rpx" src="https://cdn.uviewui.com/uview/album/1.jpg" width="111rpx"
height="99rpx" @tap="click"></u--image>
</view>
<view class="text">
<view class="name">
GUCCI/古驰HADLEY 21
</view>
<view class="model">
Gucci Blondie小号托特包
</view>
<view class="price">
{{item.payPrice}}
</view>
</view>
</view>
<!-- <view class='bottom acea-row row-right row-middle'>
<view class='bnt cancelBnt' v-if="item.status?item.status.type==0:0 || item.status?item.status.type == 9:0" @click='cancelOrder(index,item.id)'>取消订单</view>
<view class='bnt bg-color' v-if="item.status?item.status.type == 0:0" @click='goPay(item.payPrice,item.orderId)'>立即付款</view>
<view class='bnt bg-color' v-else-if="item.status?item.status.type == 1:0 || item.status?item.status.type == 9:0" @click='goOrderDetails(item.orderId)'>查看详情</view>
<view class='bnt bg-color' v-else-if="item.status?item.status.type == 2:0 && item.status.deliveryType" @click='goOrderDetails(item.orderId)'>查看详情</view>
<view class='bnt bg-color' v-else-if="item.status?item.status.type == 3:0" @click='goOrderDetails(item.orderId)'>去评价</view>
<view class='bnt bg-color' v-else-if="item.storeOrder.seckillId < 1 && item.storeOrder.bargainId < 1 && item.storeOrder.combinationId < 1 && item.status?item.status.type == 4:0"
@click='goOrderDetails(item.orderId)'>再次购买</view>
<view class='bnt cancelBnt' v-if="item.status?item.status.type == 4:0" @click='delOrder(item.id,index)'>删除订单</view>
</view> -->
</view>
</view>
<view class='loadingicon acea-row row-center-wrapper' v-if="orderList.length>0">
<text class='loading iconfont icon-jiazai' :hidden='loading==false'></text>{{loadTitle}}
</view>
<view v-if="orderList.length == 0">
<emptyPage title="暂无订单~"></emptyPage>
</view>
</view>
<view class='noCart' v-if="orderList.length == 0 && page > 1">
<view class='pictrue'>
<image src='/images/noOrder.png'></image>
</view>
</view>
<!-- #ifdef MP -->
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
<!-- #endif -->
<home></home>
<payment :payMode='payMode' :pay_close="pay_close" @onChangeFun='onChangeFun' :order_id="pay_order_id" :totalPrice='totalPrice'></payment>
<!-- <view class='loadingicon acea-row row-center-wrapper' v-if="orderList.length>0">
<text class='loading iconfont icon-jiazai' :hidden='loading==false'></text>{{loadTitle}}
</view> -->
</view>
</template>
@ -148,7 +112,30 @@
orderData: {}, //
orderStatus: 0, //
page: 1,
list1: [{
name: '全部',
value: ''
}, {
name: '待付款',
value: '0'
}, {
name: '待发货',
value: '1'
}, {
name: '已完成',
value: '2'
}, {
name: '售后中',
value: '3'
}, {
name: '已关闭',
value: '4'
}],
limit: 20,
itemList: [],
currentPage: 1,
listTitle: '',
pageSize: 10,
payMode: [{
name: "微信支付",
icon: "icon-weixinzhifu",
@ -171,6 +158,9 @@
};
},
computed: mapGetters(['isLogin', 'userInfo']),
onLoad() {
this.loadmore()
},
onShow() {
if (this.isLogin) {
this.loadend = false;
@ -180,11 +170,65 @@
this.getOrderList();
this.payMode[1].number = this.userInfo.nowMoney;
this.$set(this, 'payMode', this.payMode);
} else {
toLogin();
}
// else {
// toLogin();
// }
},
methods: {
getStatus(val) {
if (val == '0') {
return '待发货'
}
if (val == '1') {
return '待收货'
}
if (val == '2') {
return '已收货'
}
if (val == '3') {
return '待评价'
}
if (val == '4') {
return '已完成'
}
},
loadMore() {
//
setTimeout(() => {
//
const newItems = Array.from({
length: this.pageSize
}, (_, index) => `Item ${index + 1}`);
//
this.itemList = this.itemList.concat(newItems);
this.currentPage++;
}, 1000);
},
scrolltolower() {
this.loadmore()
},
loadmore() {
for (let i = 0; i < 30; i++) {
this.indexList.push({
url: this.urls[uni.$u.random(0, this.urls.length - 1)]
})
}
},
click(item) {
console.log(item.value,1)
if (item.value == this.orderStatus) return;
this.orderStatus = item.value
console.log(this.orderStatus)
this.loadend = false;
this.page = 1;
this.loadend = false;
this.$set(this, 'orderList', []);
this.getOrderData();
this.getOrderList()
},
onLoadFun() {
this.getOrderData();
this.getOrderList();
@ -236,7 +280,7 @@
title: '缺少订单号无法取消订单'
});
uni.showLoading({
title: '正在删除中'
title: '正在删除中'
});
orderCancel(order_id).then(res => {
uni.hideLoading();
@ -371,180 +415,130 @@
},
onReachBottom: function() {
this.getOrderList();
},
mounted() {
this.loadMore();
}
}
</script>
<style scoped lang="scss">
.my-order .header {
height: 250rpx;
padding: 0 30rpx;
}
.container {
.tabs {
width: 100%;
height: 100rpx;
background: #fff;
margin-top: 88rpx;
}
.my-order .header .picTxt {
height: 190rpx;
}
.list {
width: 100%;
height: 100vh;
.my-order .header .picTxt .text {
color: rgba(255, 255, 255, 0.8);
font-size: 26rpx;
font-family: 'Guildford Pro';
}
.item {
margin-top: 21rpx;
margin-left: 40rpx;
width: 669rpx;
height: 238rpx;
background: #fff;
border-radius: 20rpx;
.my-order .header .picTxt .text .name {
font-size: 34rpx;
font-weight: bold;
color: #fff;
margin-bottom: 20rpx;
}
.box {
width: 100%;
height: 22rpx;
}
.my-order .header .picTxt .pictrue {
width: 122rpx;
height: 109rpx;
}
.top {
margin-left: 26rpx;
display: flex;
justify-content: space-between;
.my-order .header .picTxt .pictrue image {
width: 100%;
height: 100%;
}
.shopName {
font-size: 28rpx;
font-family: PingFang SC;
font-weight: 400;
color: #000000;
}
.my-order .nav {
background-color: #fff;
width: 690rpx;
height: 140rpx;
border-radius: 14rpx;
margin: -60rpx auto 0 auto;
}
.state {
margin-right: 31rpx;
font-size: 26rpx;
font-family: PingFang SC;
font-weight: 400;
color: #EF1E5F;
}
}
.my-order .nav .item {
text-align: center;
font-size: 26rpx;
color: #282828;
padding: 26rpx 0;
}
.content {
margin-top: 32rpx;
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
height: 110rpx;
.my-order .nav .item.on {
// font-weight: bold;
// border-bottom: 5rpx solid #e93323;
/* #ifdef H5 || MP */
font-weight: bold;
/* #endif */
border-bottom: 5rpx solid $theme-color;
}
.image {
margin-left: 35rpx;
}
.my-order .nav .item .num {
margin-top: 18rpx;
}
.text {
width: 420rpx;
height: 100%;
margin-right: 60rpx;
.my-order .list {
width: 690rpx;
margin: 14rpx auto 0 auto;
}
.name {
font-size: 26rpx;
font-family: PingFang SC;
font-weight: 400;
color: #000000;
}
.my-order .list .item {
background-color: #fff;
border-radius: 14rpx;
margin-bottom: 14rpx;
}
.model {
margin: 10rpx 0;
font-size: 24rpx;
font-family: PingFang SC;
font-weight: 400;
color: #B7B7B7;
}
.my-order .list .item .title {
height: 84rpx;
padding: 0 24rpx;
border-bottom: 1rpx solid #eee;
font-size: 28rpx;
color: #282828;
}
.price {
font-size: 26rpx;
font-family: PingFang SC;
font-weight: 400;
color: #E94343;
}
}
}
.my-order .list .item .title .sign {
font-size: 24rpx;
padding: 0 13rpx;
height: 36rpx;
margin-right: 15rpx;
border-radius: 18rpx;
}
}
}
.my-order .list .item .item-info {
padding: 0 24rpx;
margin-top: 22rpx;
}
.my-order .list .item .item-info .pictrue {
width: 120rpx;
height: 120rpx;
}
.search {
width: 523rpx;
height: 69rpx;
border: 1rpx solid #FE7596;
display: flex;
justify-content: space-between;
align-items: center;
border-radius: 27rpx;
.my-order .list .item .item-info .pictrue image {
width: 100%;
height: 100%;
border-radius: 14rpx;
}
.icon {}
.my-order .list .item .item-info .text {
width: 500rpx;
font-size: 28rpx;
color: #999;
}
.button {
margin-right: 3rpx;
width: 82rpx;
height: 46rpx;
line-height: 45rpx;
text-align: center;
background: linear-gradient(0deg, #F02563 0%, #FE7596 100%);
border-radius: 22.5rpx;
font-size: 26rpx;
font-family: PingFang SC;
font-weight: 400;
color: #FFFFFF;
}
}
.my-order .list .item .item-info .text .name {
width: 350rpx;
color: #282828;
}
.my-order .list .item .item-info .text .money {
text-align: right;
}
.my-order .list .item .totalPrice {
font-size: 26rpx;
color: #282828;
text-align: right;
margin: 27rpx 0 0 30rpx;
padding: 0 30rpx 30rpx 0;
border-bottom: 1rpx solid #eee;
}
.my-order .list .item .totalPrice .money {
font-size: 28rpx;
font-weight: bold;
}
.my-order .list .item .bottom {
height: 107rpx;
padding: 0 30rpx;
}
.my-order .list .item .bottom .bnt {
width: 176rpx;
height: 60rpx;
text-align: center;
line-height: 60rpx;
color: #fff;
border-radius: 50rpx;
font-size: 27rpx;
}
.my-order .list .item .bottom .bnt.cancelBnt {
border: 1rpx solid #ddd;
color: #aaa;
}
.my-order .list .item .bottom .bnt~.bnt {
margin-left: 17rpx;
}
.noCart {
margin-top: 171rpx;
padding-top: 0.1rpx;
}
.noCart .pictrue {
width: 414rpx;
height: 336rpx;
margin: 78rpx auto 56rpx auto;
}
.noCart .pictrue image {
width: 100%;
height: 100%;
}
</style>

View File

@ -0,0 +1,551 @@
<template>
<view>
<view class='my-order'>
<view class='header bg-color'>
<view class='picTxt acea-row row-between-wrapper'>
<view class='text'>
<view class='name'>订单信息</view>
<view>消费订单{{orderData.orderCount || 0}} 总消费{{Number(orderData.sumPrice).toFixed(2) || 0}}</view>
</view>
<view class='pictrue'>
<image src='../../../static/images/orderTime.png'></image>
</view>
</view>
</view>
<view class='nav acea-row row-around'>
<view class='item' :class='orderStatus==0 ? "on": ""' @click="statusClick(0)">
<view>待付款</view>
<view class='num'>{{orderData.unPaidCount || 0}}</view>
</view>
<view class='item' :class='orderStatus==1 ? "on": ""' @click="statusClick(1)">
<view>待发货</view>
<view class='num'>{{orderData.unShippedCount || 0}}</view>
</view>
<view class='item' :class='orderStatus==2 ? "on": ""' @click="statusClick(2)">
<view>待收货</view>
<view class='num '>{{orderData.receivedCount || 0}}</view>
</view>
<view class='item' :class='orderStatus==3 ? "on": ""' @click="statusClick(3)">
<view>待评价</view>
<view class='num'>{{orderData.evaluatedCount || 0}}</view>
</view>
<view class='item' :class='orderStatus==4 ? "on": ""' @click="statusClick(4)">
<view>已完成</view>
<view class='num'>{{orderData.completeCount || 0}}</view>
</view>
</view>
<view class='list'>
<view class='item' v-for="(item,index) in orderList" :key="index">
<view @click='goOrderDetails(item.orderId)'>
<view class='title acea-row row-between-wrapper'>
<view class="acea-row row-middle">
<text class="sign cart-color acea-row row-center-wrapper" v-if="item.activityType !== '普通' && item.activityType !== '核销'">{{item.activityType}}</text>
<!-- <text class="sign cart-color acea-row row-center-wrapper" v-if="item.bargainId != 0"></text>
<text class="sign cart-color acea-row row-center-wrapper" v-else-if="item.storeOrder.combinationId != 0">拼团</text>
<text class="sign cart-color acea-row row-center-wrapper" v-else-if="item.storeOrder.seckillId != 0">秒杀</text> -->
<view>{{item.createTime}}</view>
</view>
<view class='font-color'>{{item.orderStatus}}</view>
<!-- <view v-if="item.status?item.status.type == 0:0" class='font-color'>待付款</view>
<view v-else-if="item.status?item.status.type == 1:0 && item.storeOrder.shippingType==1" class='font-color'>待发货</view>
<view v-else-if="item.status?item.status.type == 2:0 && item.storeOrder.shippingType==1" class='font-color'>待收货</view>
<view v-else-if="item.status?item.status.type == 3:0 && item.storeOrder.shippingType==1" class='font-color'>待评价</view>
<view v-else-if="item.status?item.status.type == 4:0 && item.storeOrder.shippingType==1" class='font-color'>已完成</view>
<view v-else-if="item.storeOrder.shippingType==2" class='font-color'>待核销</view> -->
</view>
<view class='item-info acea-row row-between row-top' v-for="(items,index) in item.orderInfoList" :key="index">
<view class='pictrue'>
<image :src='items.image'></image>
</view>
<view class='text acea-row row-between'>
<view class='name line2'>{{items.storeName}}</view>
<view class='money'>
<view>{{items.price}}</view>
<view>x{{items.cartNum}}</view>
</view>
</view>
</view>
<view class='totalPrice'>{{item.totalNum}}件商品总金额
<text class='money font-color'>{{item.payPrice}}</text>
</view>
</view>
<view class='bottom acea-row row-right row-middle'>
<view class='bnt cancelBnt' v-if="!item.paid" @click='cancelOrder(index,item.id)'>取消订单</view>
<view class='bnt bg-color' v-if="!item.paid" @click='goPay(item.payPrice,item.orderId)'>立即付款</view>
<view class='bnt bg-color' v-else-if="item.status== 0 || item.status== 1 || item.status== 3" @click='goOrderDetails(item.orderId)'>查看详情</view>
<view class='bnt bg-color' v-else-if="item.status==2" @click='goOrderDetails(item.orderId)'>去评价</view>
<view class='bnt cancelBnt' v-if="item.status == 3" @click='delOrder(item.id,index)'>删除订单</view>
</view>
<!-- <view class='bottom acea-row row-right row-middle'>
<view class='bnt cancelBnt' v-if="item.status?item.status.type==0:0 || item.status?item.status.type == 9:0" @click='cancelOrder(index,item.id)'>取消订单</view>
<view class='bnt bg-color' v-if="item.status?item.status.type == 0:0" @click='goPay(item.payPrice,item.orderId)'>立即付款</view>
<view class='bnt bg-color' v-else-if="item.status?item.status.type == 1:0 || item.status?item.status.type == 9:0" @click='goOrderDetails(item.orderId)'>查看详情</view>
<view class='bnt bg-color' v-else-if="item.status?item.status.type == 2:0 && item.status.deliveryType" @click='goOrderDetails(item.orderId)'>查看详情</view>
<view class='bnt bg-color' v-else-if="item.status?item.status.type == 3:0" @click='goOrderDetails(item.orderId)'>去评价</view>
<view class='bnt bg-color' v-else-if="item.storeOrder.seckillId < 1 && item.storeOrder.bargainId < 1 && item.storeOrder.combinationId < 1 && item.status?item.status.type == 4:0"
@click='goOrderDetails(item.orderId)'>再次购买</view>
<view class='bnt cancelBnt' v-if="item.status?item.status.type == 4:0" @click='delOrder(item.id,index)'>删除订单</view>
</view> -->
</view>
</view>
<view class='loadingicon acea-row row-center-wrapper' v-if="orderList.length>0">
<text class='loading iconfont icon-jiazai' :hidden='loading==false'></text>{{loadTitle}}
</view>
<view v-if="orderList.length == 0">
<emptyPage title="暂无订单~"></emptyPage>
</view>
</view>
<view class='noCart' v-if="orderList.length == 0 && page > 1">
<view class='pictrue'>
<image src='/images/noOrder.png'></image>
</view>
</view>
<!-- #ifdef MP -->
<!-- <authorize @onLoadFun="onLoadFun" :isAuto="isAuto" :isShowAuth="isShowAuth" @authColse="authColse"></authorize> -->
<!-- #endif -->
<home></home>
<payment :payMode='payMode' :pay_close="pay_close" @onChangeFun='onChangeFun' :order_id="pay_order_id" :totalPrice='totalPrice'></payment>
</view>
</template>
<script>
import {
getOrderList,
orderData,
orderCancel,
orderDel
} from '@/api/order.js';
import {
openOrderSubscribe
} from '@/utils/SubscribeMessage.js';
import home from '@/components/home';
import payment from '@/components/payment';
import {
toLogin
} from '@/libs/login.js';
import {
mapGetters
} from "vuex";
// #ifdef MP
import authorize from '@/components/Authorize';
// #endif
import emptyPage from '@/components/emptyPage.vue'
export default {
components: {
payment,
home,
emptyPage,
// #ifdef MP
authorize
// #endif
},
data() {
return {
loading: false, //
loadend: false, //
loadTitle: '加载更多', //
orderList: [], //
orderData: {}, //
orderStatus: 0, //
page: 1,
limit: 20,
payMode: [{
name: "微信支付",
icon: "icon-weixinzhifu",
value: 'weixin',
title: '微信快捷支付'
},
{
name: "余额支付",
icon: "icon-yuezhifu",
value: 'yue',
title: '可用余额:',
number: 0
}
],
pay_close: false,
pay_order_id: '',
totalPrice: '0',
isAuto: false, //
isShowAuth: false //
};
},
computed: mapGetters(['isLogin', 'userInfo']),
onShow() {
if (this.isLogin) {
this.loadend = false;
this.page = 1;
this.$set(this, 'orderList', []);
this.getOrderData();
this.getOrderList();
this.payMode[1].number = this.userInfo.nowMoney;
this.$set(this, 'payMode', this.payMode);
}
else {
// toLogin();
}
},
methods: {
onLoadFun() {
this.getOrderData();
this.getOrderList();
},
//
authColse: function(e) {
this.isShowAuth = e
},
/**
* 事件回调
*
*/
onChangeFun: function(e) {
let opt = e;
let action = opt.action || null;
let value = opt.value != undefined ? opt.value : null;
(action && this[action]) && this[action](value);
},
/**
* 关闭支付组件
*
*/
payClose: function() {
this.pay_close = false;
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
if (options.status) this.orderStatus = options.status;
},
/**
* 获取订单统计数据
*
*/
getOrderData: function() {
let that = this;
orderData().then(res => {
that.$set(that, 'orderData', res.data);
})
},
/**
* 取消订单
*
*/
cancelOrder: function(index, order_id) {
let that = this;
if (!order_id) return that.$util.Tips({
title: '缺少订单号无法取消订单'
});
uni.showLoading({
title: '正在删除中'
});
orderCancel(order_id).then(res => {
uni.hideLoading();
return that.$util.Tips({
title: '删除成功',
icon: 'success'
}, function() {
that.orderList.splice(index, 1);
that.$set(that, 'orderList', that.orderList);
that.$set(that.orderData, 'unpaid_count', that.orderData.unpaid_count - 1);
that.getOrderData();
});
}).catch(err => {
return that.$util.Tips({
title: err
});
});
},
/**
* 打开支付组件
*
*/
goPay(pay_price, order_id) {
this.$set(this, 'pay_close', true);
this.$set(this, 'pay_order_id', order_id);
this.$set(this, 'totalPrice', pay_price);
},
/**
* 支付成功回调
*
*/
pay_complete: function() {
this.loadend = false;
this.page = 1;
this.$set(this, 'orderList', []);
this.$set(this, 'pay_close', false);
this.getOrderData();
this.getOrderList();
},
/**
* 支付失败回调
*
*/
pay_fail: function() {
this.pay_close = false;
},
/**
* 去订单详情
*/
goOrderDetails: function(order_id) {
if (!order_id) return that.$util.Tips({
title: '缺少订单号无法查看订单详情'
});
// #ifdef MP
uni.showLoading({
title: '正在加载',
})
openOrderSubscribe().then(() => {
uni.hideLoading();
uni.navigateTo({
url: '/pages/order_details/index?order_id=' + order_id
})
}).catch(() => {
uni.hideLoading();
})
// #endif
// #ifndef MP
uni.navigateTo({
url: '/pages/order_details/index?order_id=' + order_id
})
// #endif
},
/**
* 切换类型
*/
statusClick: function(status) {
if (status == this.orderStatus) return;
this.orderStatus = status;
this.loadend = false;
this.page = 1;
this.$set(this, 'orderList', []);
this.getOrderList();
},
/**
* 获取订单列表
*/
getOrderList: function() {
let that = this;
if (that.loadend) return;
if (that.loading) return;
that.loading = true;
that.loadTitle = "加载更多";
getOrderList({
type: that.orderStatus,
page: that.page,
limit: that.limit,
}).then(res => {
let list = res.data.list || [];
let loadend = list.length < that.limit;
that.orderList = that.$util.SplitArray(list, that.orderList);
that.$set(that, 'orderList', that.orderList);
that.loadend = loadend;
that.loading = false;
that.loadTitle = loadend ? "我也是有底线的" : '加载更多';
that.page = that.page + 1;
}).catch(err => {
that.loading = false;
that.loadTitle = "加载更多";
})
},
/**
* 删除订单
*/
delOrder: function(order_id, index) {
let that = this;
orderDel(order_id).then(res => {
that.orderList.splice(index, 1);
that.$set(that, 'orderList', that.orderList);
that.$set(that.orderData, 'unpaid_count', that.orderData.unpaid_count - 1);
that.getOrderData();
return that.$util.Tips({
title: '删除成功',
icon: 'success'
});
}).catch(err => {
return that.$util.Tips({
title: err
});
})
},
},
onReachBottom: function() {
this.getOrderList();
}
}
</script>
<style scoped lang="scss">
.my-order .header {
height: 250rpx;
padding: 0 30rpx;
}
.my-order .header .picTxt {
height: 190rpx;
}
.my-order .header .picTxt .text {
color: rgba(255, 255, 255, 0.8);
font-size: 26rpx;
font-family: 'Guildford Pro';
}
.my-order .header .picTxt .text .name {
font-size: 34rpx;
font-weight: bold;
color: #fff;
margin-bottom: 20rpx;
}
.my-order .header .picTxt .pictrue {
width: 122rpx;
height: 109rpx;
}
.my-order .header .picTxt .pictrue image {
width: 100%;
height: 100%;
}
.my-order .nav {
background-color: #fff;
width: 690rpx;
height: 140rpx;
border-radius: 14rpx;
margin: -60rpx auto 0 auto;
}
.my-order .nav .item {
text-align: center;
font-size: 26rpx;
color: #282828;
padding: 26rpx 0;
}
.my-order .nav .item.on {
// font-weight: bold;
// border-bottom: 5rpx solid #e93323;
/* #ifdef H5 || MP */
font-weight: bold;
/* #endif */
border-bottom: 5rpx solid $theme-color;
}
.my-order .nav .item .num {
margin-top: 18rpx;
}
.my-order .list {
width: 690rpx;
margin: 14rpx auto 0 auto;
}
.my-order .list .item {
background-color: #fff;
border-radius: 14rpx;
margin-bottom: 14rpx;
}
.my-order .list .item .title {
height: 84rpx;
padding: 0 24rpx;
border-bottom: 1rpx solid #eee;
font-size: 28rpx;
color: #282828;
}
.my-order .list .item .title .sign {
font-size: 24rpx;
padding: 0 13rpx;
height: 36rpx;
margin-right: 15rpx;
border-radius: 18rpx;
}
.my-order .list .item .item-info {
padding: 0 24rpx;
margin-top: 22rpx;
}
.my-order .list .item .item-info .pictrue {
width: 120rpx;
height: 120rpx;
}
.my-order .list .item .item-info .pictrue image {
width: 100%;
height: 100%;
border-radius: 14rpx;
}
.my-order .list .item .item-info .text {
width: 500rpx;
font-size: 28rpx;
color: #999;
}
.my-order .list .item .item-info .text .name {
width: 350rpx;
color: #282828;
}
.my-order .list .item .item-info .text .money {
text-align: right;
}
.my-order .list .item .totalPrice {
font-size: 26rpx;
color: #282828;
text-align: right;
margin: 27rpx 0 0 30rpx;
padding: 0 30rpx 30rpx 0;
border-bottom: 1rpx solid #eee;
}
.my-order .list .item .totalPrice .money {
font-size: 28rpx;
font-weight: bold;
}
.my-order .list .item .bottom {
height: 107rpx;
padding: 0 30rpx;
}
.my-order .list .item .bottom .bnt {
width: 176rpx;
height: 60rpx;
text-align: center;
line-height: 60rpx;
color: #fff;
border-radius: 50rpx;
font-size: 27rpx;
}
.my-order .list .item .bottom .bnt.cancelBnt {
border: 1rpx solid #ddd;
color: #aaa;
}
.my-order .list .item .bottom .bnt~.bnt {
margin-left: 17rpx;
}
.noCart {
margin-top: 171rpx;
padding-top: 0.1rpx;
}
.noCart .pictrue {
width: 414rpx;
height: 336rpx;
margin: 78rpx auto 56rpx auto;
}
.noCart .pictrue image {
width: 100%;
height: 100%;
}
</style>

View File

@ -0,0 +1,28 @@
{
"appid": "wx51c5e9eb4ec5cce7",
"compileType": "miniprogram",
"libVersion": "2.32.0",
"packOptions": {
"ignore": [],
"include": []
},
"setting": {
"coverView": true,
"es6": true,
"postcss": true,
"minified": true,
"enhance": true,
"showShadowRootInWxmlPanel": true,
"packNpmRelationList": [],
"babelSetting": {
"ignore": [],
"disablePlugins": [],
"outputPath": ""
}
},
"condition": {},
"editorSetting": {
"tabIndent": "insertSpaces",
"tabSize": 2
}
}

View File

@ -0,0 +1,7 @@
{
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
"projectname": "yudao-ui-app",
"setting": {
"compileHotReLoad": true
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 266 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 249 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 641 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 84 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 440 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 469 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 649 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 78 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.9 KiB