# 2022-02-19

### 1.3.7 开源社区版:
无
### 0.2.0 会员专业版:
【调整】拆分下单支付单类型,由【订单,充值,服务订单,表单付款码,表单订单】拆分细则为【普通订单,拼团订单,团购订单,秒杀订单,砍价,赠品,接龙,交易组件,充值,服务订单,表单付款码,表单订单】。
【修复】修复拼团,秒杀,团购下单成功但提示“订单支付参数错误”问题。
【新增】商品详情封面图增加【原图上传】,前【上传图片】按钮改为【裁剪上传】。
【新增】商品详情图集增加【原图上传】,前【上传图片】按钮改为【裁剪上传】。
This commit is contained in:
JianWeie
2022-02-19 01:09:21 +08:00
parent 255be5a28f
commit 22cbe5921c
18 changed files with 308 additions and 100 deletions

View File

@@ -4,7 +4,7 @@
*/
//接口请求地址如果需要不部署接口端的情况下测试uni-app可以直接替换为官方测试接口https://api.demo.coreshop.cn
export const apiBaseUrl = 'https://api.demo.coreshop.cn';
export const apiBaseUrl = 'https://api.nsts.mvccms.cn';
//项目静态资源请求地址如果使用官方的静态文件地址可以直接替换为https://files.cdn.coreshop.cn
export const apiFilesUrl = 'https://files.cdn.coreshop.cn';
@@ -14,13 +14,35 @@ export const h5Url = apiBaseUrl + "/wap/"; //H5端网站地址,
export const baseUrl = process.env.NODE_ENV === 'development' ? window.location.origin + '/' : apiBaseUrl
// #endif
//支付单类型
export const paymentType = {
//支付单类型
order: 1, //订单
recharge: 2, //充值
formPay: 3, //表单订单
formOrder: 4, //表单付款码
serviceOrder: 5, //服务订单
//普通订单
common: 1,
//拼团订单
pinTuan: 2,
//团购订单
group: 3,
//秒杀订单
skill: 4,
//砍价
bargain: 6,
//赠品
giveaway: 7,
//接龙
solitaire: 8,
//交易组件
transactionComponent: 10,
//充值
recharge: 201,
//服务订单
serviceOrder: 501,
//表单付款码
formPay: 301,
//表单订单
formOrder: 302,
};
// #ifdef MP-TOUTIAO

View File

@@ -91,7 +91,7 @@
payments = payments.filter(item => item.code !== 'alipay')
// 如果是充值订单,服务订单 过滤余额支付 过滤非线上支付方式
if (this.type === 2 || this.type === 5) {
if (this.type == this.$globalConstVars.paymentType.recharge || this.type === this.$globalConstVars.paymentType.serviceOrder) {
payments = payments.filter(item => item.code !== 'balancepay' || item.isOnline === false)
}
@@ -112,14 +112,14 @@
payment_type: this.type,
params: {}
}
data['ids'] = (this.type == 1 || this.type == 3 || this.type == 4 || this.type == 5) ? this.orderId : this.uid
data['ids'] = (this.type == this.$globalConstVars.paymentType.common || this.type == this.$globalConstVars.paymentType.pinTuan || this.type == this.$globalConstVars.paymentType.group || this.type == this.$globalConstVars.paymentType.skill || this.type == this.$globalConstVars.paymentType.bargain || this.type == this.$globalConstVars.paymentType.giveaway || this.type == this.$globalConstVars.paymentType.solitaire || this.type == this.$globalConstVars.paymentType.transactionComponent) ? this.orderId : this.uid
// 判断订单支付类型
if (this.type == 2 && this.recharge) {
if (this.type == this.$globalConstVars.paymentType.recharge && this.recharge) {
data['params'] = {
money: this.recharge
}
} else if ((this.type == 3 || this.type == 4) && this.recharge) {
} else if ((this.type == this.$globalConstVars.paymentType.formPay || this.type == this.$globalConstVars.paymentType.formOrder) && this.recharge) {
data['params'] = {
}
}

View File

@@ -401,7 +401,7 @@
buyNum: 1, // 选定的购买数量
minBuyNum: 1, // 最小可购买数量
type: 2,
cartType: 3,
cartType: this.$globalConstVars.paymentType.group,
isfav: false, // 商品是否收藏
//拼团列表滑动数据
swiperSet: {

View File

@@ -254,7 +254,7 @@
<block v-for="(items,indexs) in shopRecommendData" :key="indexs">
<view :id="['scroll' + (indexs + 1 )]" class="recommend-scroll-item" @tap="goGoodsDetail(items.id)">
<u--image :src="items.image" mode="widthFix" width="91px" height="91px" radius="10"></u--image>
<view class="u-line-2 coreshop-font-sm coreshop-text-black coreshop-margin-top-10 coreshop-margin-bottom-10" style="min-height: 34px;">{{items.name}}</view>
<view class="u-line-1-2 coreshop-font-sm coreshop-text-black coreshop-margin-top-10 coreshop-margin-bottom-10 u-line-2" style="height: 34px;">{{items.name}}</view>
<view class="coreshop-text-red coreshop-text-price coreshop-margin-top-10 coreshop-margin-bottom-10 coreshop-font-md coreshop-flex-direction-row">
{{items.price}}
</view>
@@ -529,7 +529,7 @@
minBuyNum: 1, // 最小可购买数量
pinTuanType: 2, // 1单独购买 2拼团
type: 2,
cartType: 2,
cartType: this.$globalConstVars.paymentType.pinTuan,
isfav: false, // 商品是否收藏
//拼团列表滑动数据
swiperSet: {

View File

@@ -403,7 +403,7 @@
buyNum: 1, // 选定的购买数量
minBuyNum: 1, // 最小可购买数量
type: 2,
cartType: 4,
cartType: this.$globalConstVars.paymentType.skill,
isfav: false, // 商品是否收藏
//拼团列表滑动数据
swiperSet: {

View File

@@ -169,7 +169,7 @@
totalprice: '0.00',
cart: [],
type: 2,
cartType: 8,
cartType: this.$globalConstVars.paymentType.solitaire,
shareBox: false,
submitStatus: false,
shareUrl: '/pages/share/jump/jump',

View File

@@ -500,16 +500,6 @@
} else if (res.data.needLogin) {
console.log("要登录权限了");
this.$u.route({ type: 'switchTab', url: '/pages/index/default/default' })
//if (this.$db.get('userToken')) {
// this.hasLogin = true
// this.$u.api.userInfo().then(res => {
// if (res.status) {
// }
// })
//} else {
// this.hasLogin = false
//}
if (!this.hasLogin) {
this.$store.commit('showLoginTip', true);

View File

@@ -422,7 +422,7 @@
buyNum: 1, // 选定的购买数量
minBuyNum: 1, // 最小可购买数量
type: 2, // 1加入购物车 2购买
cartType: 1,
cartType: this.$globalConstVars.paymentType.common,
isfav: false, // 商品是否收藏
submitStatus: false,
bottomModal: false,

View File

@@ -43,8 +43,6 @@
export default {
data() {
return {
background: this.$coreTheme.mainNabBar.background,
titleColor: this.$coreTheme.mainNabBar.titleColor,
swiperItems: [],
currentIndex: 0,
opacity: 0,

View File

@@ -48,7 +48,7 @@
}
]
},
orderType: 2 // 储值类型
orderType: this.$globalConstVars.paymentType.recharge // 储值类型
}
},
onReady() {

View File

@@ -20,14 +20,14 @@
<text class="coreshop-text-grey">订单类型</text>
</view>
<view class="action">
<text class="coreshop-font-sm coreshop-text-gray" v-if="type == 1">商品订单</text>
<text class="coreshop-font-sm coreshop-text-gray" v-if="type == 2" @click="toRecharge()">充值订单</text>
<text class="coreshop-font-sm coreshop-text-gray" v-if="type == 3">表单订单</text>
<text class="coreshop-font-sm coreshop-text-gray" v-if="type == 4">付款码</text>
<text class="coreshop-font-sm coreshop-text-gray" v-if="type == 5">服务订单</text>
<text class="coreshop-font-sm coreshop-text-gray" v-if="type == $globalConstVars.paymentType.common || type == $globalConstVars.paymentType.pinTuan || type == $globalConstVars.paymentType.group || type == $globalConstVars.paymentType.skill || type == this.$globalConstVars.paymentType.bargain || type == this.$globalConstVars.paymentType.giveaway || type == $globalConstVars.paymentType.solitaire || type == $globalConstVars.paymentType.transactionComponent">商品订单</text>
<text class="coreshop-font-sm coreshop-text-gray" v-if="type == $globalConstVars.paymentType.recharge" @click="toRecharge()">充值订单</text>
<text class="coreshop-font-sm coreshop-text-gray" v-if="type == $globalConstVars.paymentType.formPay">表单订单</text>
<text class="coreshop-font-sm coreshop-text-gray" v-if="type == $globalConstVars.paymentType.formOrder">付款码</text>
<text class="coreshop-font-sm coreshop-text-gray" v-if="type == $globalConstVars.paymentType.serviceOrder">服务订单</text>
</view>
</view>
<template v-if="type == 1">
<template v-if="type == $globalConstVars.paymentType.common || type == $globalConstVars.paymentType.pinTuan || type == $globalConstVars.paymentType.group || type == $globalConstVars.paymentType.skill || type == this.$globalConstVars.paymentType.bargain || type == this.$globalConstVars.paymentType.giveaway || type == $globalConstVars.paymentType.solitaire || type == $globalConstVars.paymentType.transactionComponent">
<view class="coreshop-list-item">
<view class="content">
<text class="coreshop-text-grey">订单编号</text>
@@ -45,7 +45,7 @@
</view>
</view>
</template>
<template v-else-if="type == 2">
<template v-else-if="type == $globalConstVars.paymentType.recharge">
<view class="coreshop-list-item">
<view class="content">
<text class="coreshop-text-grey">充值金额</text>
@@ -55,7 +55,7 @@
</view>
</view>
</template>
<template v-else-if="type == 5">
<template v-else-if="type == $globalConstVars.paymentType.serviceOrder">
<view class="coreshop-list-item">
<view class="content">
<text class="coreshop-text-grey">购买服务</text>
@@ -146,7 +146,7 @@
orderId: 0,
recharge: 0,
serviceId: 0, //服务编号
type: 1, // 订单类型 1商品订单 2充值订单 5服务订单
type: 1, // 订单类型
orderInfo: {}, // 订单详情
userInfo: {}, // 用户信息
serviceInfo: {}, // 服务信息
@@ -178,16 +178,16 @@
this.type = Number(options.type);
this.formId = Number(options.formId);
//this.getOrderInfo ()
if (this.orderId && this.type == 1) {
if (this.orderId && (this.type == this.$globalConstVars.paymentType.common || this.type == this.$globalConstVars.paymentType.pinTuan || this.type == this.$globalConstVars.paymentType.group || this.type == this.$globalConstVars.paymentType.skill || this.type == this.$globalConstVars.paymentType.bargain || this.type == this.$globalConstVars.paymentType.giveaway || this.type == this.$globalConstVars.paymentType.solitaire || this.type == this.$globalConstVars.paymentType.transactionComponent)) {
// 商品订单
this.getOrderInfo();
} else if (this.recharge && this.type == 2) {
} else if (this.recharge && this.type == this.$globalConstVars.paymentType.recharge) {
// 充值订单 获取用户id
this.getUserInfo();
} else if (this.formId && (this.type == 3 || this.type == 4)) {
} else if (this.formId && (this.type == this.$globalConstVars.paymentType.formPay || this.type == this.$globalConstVars.paymentType.formOrder)) {
// 表单订单 id传到订单上
this.orderId = '' + this.formId;
} else if (this.type == 5) {
} else if (this.type == this.$globalConstVars.paymentType.serviceOrder) {
this.getServiceDetail();
}
else {

View File

@@ -90,13 +90,13 @@
});
},
orderDetail() {
if (this.orderId && this.paymentInfo.type === 1) {
if (this.orderId && (this.paymentInfo.type == this.$globalConstVars.paymentType.common || this.paymentInfo.type == this.$globalConstVars.paymentType.pinTuan || this.paymentInfo.type == this.$globalConstVars.paymentType.group || this.paymentInfo.type == this.$globalConstVars.paymentType.skill || this.paymentInfo.type == this.$globalConstVars.paymentType.bargain || this.paymentInfo.type == this.$globalConstVars.paymentType.giveaway || this.paymentInfo.type == this.$globalConstVars.paymentType.solitaire || this.paymentInfo.type == this.$globalConstVars.paymentType.transactionComponent)) {
this.$u.route({ type: 'redirectTo', url: '/pages/member/order/detail/detail?orderId=' + this.orderId });
} else if (this.paymentInfo.type === 2) {
} else if (this.paymentInfo.type === this.$globalConstVars.paymentType.recharge) {
this.$u.route({ type: 'redirectTo', url: '/pages/member/balance/details/details' });
} else if (this.paymentInfo.type === 3 || this.paymentInfo.type === 4) {
} else if (this.paymentInfo.type === this.$globalConstVars.paymentType.formPay || this.paymentInfo.type === this.$globalConstVars.paymentType.formOrder) {
this.$u.route({ type: 'switchTab', url: '/pages/index/default/default' });
} else if (this.paymentInfo.type === 5) {
} else if (this.paymentInfo.type === this.$globalConstVars.paymentType.serviceOrder) {
this.$u.route({ type: 'redirectTo', url: '/pages/member/serviceOrder/index/index' });
}
}