提交代码

yj-dev
杨杰 2 years ago
parent fb445b4b4f
commit 851a905cb3
  1. 2
      App.vue
  2. 26
      Utils/Api.js
  3. 10
      pages/goods/goods-list/goods-list.vue
  4. 149
      pages/order/confirmation.vue
  5. 165
      pages/tabBar/home/home.vue
  6. 10
      pages/user/mineCouponsDestails/mineCouponsDestails.vue
  7. 10
      subPages/coupon-package/coupon-package.vue
  8. 10
      subPages/recharge/recharge.vue
  9. 4
      subPages/unionComfirmation/unionComfirmation.vue

@ -7,6 +7,7 @@
//
// url: 'https://hsg.dctpay.com/crest',
// v1url:'https://hsg.dctpay.com/v1',
// orderurl:' https://hsg.dctpay.com/order',
// imgUrl: 'https://hsg.dctpay.com/filesystem/',
// brestUrl: 'https://hsg.dctpay.com/brest',
// imageWxImg: 'https://hsg.dctpay.com/filesystem/wxApplets/',
@ -14,6 +15,7 @@
//
url: 'https://hsgcs.dctpay.com/crest',
v1url: 'https://hsgcs.dctpay.com/v1',
orderurl:' https://hsgcs.dctpay.com/order',
brestUrl: 'https://hsgcs.dctpay.com/brest',
imgUrl: 'https://hsgcs.dctpay.com/filesystem/',
imageWxImg: 'https://hsgcs.dctpay.com/filesystem/wxApplets/',

@ -6,6 +6,7 @@ import {
} from "./bRequest.js";
let app = getApp();
let base = app.globalData.url;
let orderbase = app.globalData.orderurl;
let v1base = app.globalData.v1url;
let brestBase = app.globalData.brestUrl;
//公众号获取跳小程序参数
@ -137,9 +138,9 @@ export const getUserNewCouponDetail = params => {
return POST('GET', `${base}/coupon/getUserNewCouponDetail`, params).then(res => res.data);
}
//获取订单信息
export const getUserOrderList = params => {
return POST('GET', `${base}/highOrder/getUserOrderList`, params).then(res => res.data);
}
// export const getUserOrderList = params => {
// return POST('GET', `${base}/highOrder/getUserOrderList`, params).then(res => res.data);
// }
//取消订单
export const cancelOrder = params => {
return POST('GET', `${base}/highOrder/cancelOrder`, params).then(res => res.data);
@ -618,3 +619,22 @@ export const getUserOrderListhuafei = params => {
export const getRebateIntegral = params => {
return POST('POST', `${base}/common/getRebateIntegral`, params).then(res => res.data);
}
// -----------订单新接口------------
//新建订单
export const create = params => {
return POST('POST', `${orderbase}/create`, params).then(res => res.data);
}
//获取订单列表
export const getUserOrderList = params => {
return POST('GET', `${orderbase}/getUserOrderList`, params).then(res => res.data);
}
//订单详情
export const getDetailByOrderNo = params => {
return POST('GET', `${orderbase}/getDetailByOrderNo`, params).then(res => res.data);
}
//取消订单
export const cancel = params => {
return POST('POST', `${orderbase}/cancel`, params).then(res => res.data);
}

@ -186,8 +186,16 @@
},
//
getCmsContent(item) {
let code;
// #ifdef H5
code = '2'
// #endif
// #ifdef MP
code = '1'
// #endif
let params = {
regionId: app.globalData.cityId,
companyId: app.globalData.companyId,
platform: code,
categoryCode: item
}
getCmsContent(params).then(res => {

@ -96,6 +96,54 @@
</view>
<view class="width94 comorder mart10">
<view class="width92 alijusstart paddtop20">
<view class="width30 fcor333 fontwig6 font16">
积分抵扣
</view>
<view class="cj-slider">
<view class="flleft fotct font14 fcor666" style="width: 15%;">0</view>
<cj-slider style="width: 60%; float:left;" v-if="isDiscount" v-model="priceValue" :min="0"
:max="availIntegal" :step="1" :blockWidth="40" @start="blockStart" @moving="blockMoving"
@end="blockEnd" />
<!-- <cj-slider style="width: 60%; float:left;" v-if="isDiscount == 2" v-model="priceValue" :min="0"
:max="availIntegal" :step="1" :blockWidth="40" @start="blockStart" @moving="blockMoving"
@end="blockEnd" /> -->
<view class="flright fotrt font14 fcor666" style="width: 25%;">{{availIntegal}}</view>
</view>
</view>
<view class="width94 line1 mart15 marb5"></view>
<view class="height50 width100 backcorfff">
<view class="width70 flleft fcor333 fontwig6 font16 text1" style="padding-left: 4%;">
抵扣金额
</view>
<view class="width20 flright fotrt paddtright10 font15 fontwig6 fcor666 alijun"
style="align-items: center;">
¥{{priceValue[1] / 100}}
</view>
</view>
<view class="width94 line1 mart5 marb5"></view>
<view class="height40 width100 backcorfff">
<view class="width40 flleft fcor666 font15 fontwig6 text1 alijusstart" style="padding-left: 2%;">
<image src="../../static/img/rebate.png" mode="widthFix" style="width: 25px;"></image>
<text>下单返积分</text>
</view>
<view class="width50 flright fotrt paddtright10 font15 colore95 alijun" v-if="Integrastu == 1"
style="align-items: center;">
{{rebateIntegral}}积分
</view>
<view class="width50 flright fotrt paddtright10 font15 colore95 alijun" v-if="Integrastu == 2"
style="align-items: center;">
{{rebateIntegral}}
</view>
</view>
<view class=" width100 backcorfff alijusstart paddbotm10" style="padding-left: 2%;">
<image src="../../static/img/sigh.png" mode="widthFix" class="icon20"></image>
<text class="fcor999 font13">积分抵扣与优惠券抵扣不同享</text>
</view>
<view class="height50 width100 backcorfff">
<view class="width100 flleft fcor333 fontwig6 font16" style="padding-left: 4%;">
支付方式: <text class="jfrecharge" @click="jumpdeposits"
@ -195,6 +243,7 @@
<script>
import {
addOrder,
create,
getCouponById,
loginByPhone,
getUserNormalDiscountList,
@ -202,9 +251,12 @@
orderToGoldPay,
findUser,
hltUnionCardPay,
getHuiLianTongCardBalance
getRebateIntegral,
getHuiLianTongCardBalance,
findById
} from '../../Utils/Api.js';
import wybPopup from '../../components/wyb-popup/wyb-popup.vue';
import cjSlider from '../../components/cj-slider/cj-slider.vue';
import ssPaymentPassword from '../../components/sanshui-payment-password'
let app = getApp();
// #ifdef H5
@ -243,7 +295,15 @@
coupondiscountid: '',
orderDetails: '', //
payGold: '', //
identificationCode: '' //
identificationCode: '' ,//
paytypeList: [], //
priceValue: [0, 0], //
changePrice: '', //
isDiscount: true,
availIntegal: '', //
isUse: true, //
rebateIntegral: '', //
Integrastu: 1 //
};
},
onLoad(option) {
@ -290,6 +350,40 @@
}
},
methods: {
//
findById() {
uni.showLoading({
title: '加载中'
})
let showType;
// #ifdef H5
showType = 2;
// #endif
// #ifdef MP
showType = 1;
// #endif
let datas = {
platformId: showType,
id: this.objectId
}
findById(datas).then(res => {
if (res.return_code == '000000') {
uni.hideLoading();
this.rechargeDes = res.return_data;
this.paytypeList = res.return_data.productPayTypeString.split(',');
this.paytypeList = this.paytypeList.slice(0, this.paytypeList.length - 1);
let zkprice = parseFloat(res.return_data.integralDiscount / 100).toFixed(2);
let pprice = parseFloat(res.return_data.payPrice * 100).toFixed(0)
let payprice = parseFloat(res.return_data.payPrice * 100 * zkprice).toFixed(
0);
if (payprice > this.user.gold) {
this.availIntegal = this.user.gold;
} else {
this.availIntegal = payprice;
}
}
});
},
//
findUser() {
let params;
@ -297,10 +391,13 @@
if (res.return_code == '000000') {
app.globalData.userInfo = res.return_data;
this.user = res.return_data;
this.availIntegal = res.return_data.gold;
this.findById();
if (this.user.hltCardNo) {
this.getHuiLianTongCardBalance();
}
this.getUserNormalDiscountList();
this.getRebateIntegral();
uni.setStorage({
key: "user",
data: res.return_data
@ -308,6 +405,24 @@
}
});
},
//
getRebateIntegral() {
let datas = {
"companyId": app.globalData.companyId,
"price": this.paytheprice,
"productId": 1,
"type": 1,
}
getRebateIntegral(datas).then(res => {
if (res.return_code == '000000') {
this.rebateIntegral = res.return_data;
this.Integrastu = 1;
} else {
this.rebateIntegral = res.return_msg;
this.Integrastu = 2;
}
})
},
//
getCouponById() {
uni.showLoading({
@ -834,6 +949,30 @@
});
});
},
blockStart() {},
blockMoving() {
// console.log('')
},
//
blockEnd() {
this.isDiscount = 1;
if (this.deductionPrice == 0) {
this.payPrice = parseFloat(this.saveprice - parseFloat(this.priceValue[1] / 100).toFixed(2)).toFixed(
2);
} else {
this.payPrice = parseFloat(this.orderPrice - parseFloat(this.priceValue[1] / 100).toFixed(2) - this
.deductionPrice).toFixed(2);
}
if (this.payPrice == 0) {
this.isUse = false;
this.paytype = '';
} else {
this.isUse = true;
}
this.getRebateIntegral();
},
//
jumpdeposits() {
uni.navigateTo({
@ -861,6 +1000,12 @@
margin-top: 30rpx;
}
.cj-slider {
width: 100%;
align-items: center;
display: flex;
}
.goodsimg {
align-items: center;
display: flex;

@ -35,8 +35,8 @@
<view v-for="(item,index) in homeCateList" :key="index">
<view class="height90 backcorltop mart50" v-if="item.type == 1">
<view class="category-list">
<view class="category" style="width: 25%;" v-for="(row, index) in item.childCategory" :key="index"
@tap="toCategory(row)">
<view class="category" style="width: 25%;" v-for="(row, indexs) in item.childCategory" :key="indexs"
@click="toCategory(row)">
<view class="img">
<image :src="imageUrl+row.imgData"></image>
</view>
@ -49,8 +49,8 @@
<!-- 顶部菜单 -->
<view class="category-list backcorfff" style="margin-top: -5px;" v-if="item.type == 7">
<view class="category" style="width: 20%;" v-for="(row, index) in item.childCategory" :key="index"
@tap="toCategory(row)">
<view class="category" style="width: 20%;" v-for="(row, indexc) in item.childCategory" :key="indexc"
@click="toCategory(row)">
<view class="img">
<image :src="imageUrl+row.imgData"></image>
</view>
@ -89,7 +89,8 @@
</view>
</view>
<!-- 加油专区 ,天天好券-->
<view class="width90 mart20 alijusstart" v-if="item.type == 6 || item.type == 9" @click="goGoodsList(item.jumpUrl)">
<view class="width90 mart20 alijusstart" v-if="item.type == 6 || item.type == 9"
@click="goGoodsList(item.jumpUrl)">
<view class="width70 font18 fcor333">
{{item.name}}
</view>
@ -108,7 +109,8 @@
<view class="backcorfff spcarea" v-for="(goods,index) in item.childDate" :key="index">
<image mode="widthFix" class="width100" :src="imageUrl+goods.listImg"></image>
<view class="width96 fcor333 font15 fontwig6">{{goods.title}}</view>
<view class="width96 fcor999 font11" v-if="goods.effectiveTiem">{{goods.effectiveTiem | timeFormat('yyyy-mm-dd hh:mm:ss')}}
<view class="width96 fcor999 font11" v-if="goods.effectiveTiem">
{{goods.effectiveTiem | timeFormat('yyyy-mm-dd hh:mm:ss')}}
</view>
<view class="width94 fcoreb5 font15 fontwig6">¥{{goods.price}}</view>
</view>
@ -120,11 +122,15 @@
</view>
</view>
<image class="width90 mart10" mode="widthFix" v-if="item.type == 5"
:src="imageUrl+item.childCategory[0].imgData" @click="goGoodsList(imageUrl+item.childCategory[0].jumpUrl)"></image>
:src="imageUrl+item.childCategory[0].imgData"
@click="goGoodsList(item.childCategory[0].jumpUrl)"></image>
<view class="width90 alijusstart mart10" v-if="item.type == 5">
<image :src="imageUrl+item.childCategory[1].imgData" mode="widthFix" class="width31" @click="goGoodsList(imageUrl+item.childCategory[1].jumpUrl)"></image>
<image :src="imageUrl+item.childCategory[2].imgData" mode="widthFix" class="width31" @click="goGoodsList(imageUrl+item.childCategory[2].jumpUrl)"></image>
<image :src="imageUrl+item.childCategory[3].imgData" mode="widthFix" class="width31" @click="goGoodsList(imageUrl+item.childCategory[3].jumpUrl)"></image>
<image :src="imageUrl+item.childCategory[1].imgData" mode="widthFix" class="width31"
@click="goGoodsList(item.childCategory[1].jumpUrl)"></image>
<image :src="imageUrl+item.childCategory[2].imgData" mode="widthFix" class="width31"
@click="goGoodsList(item.childCategory[2].jumpUrl)"></image>
<image :src="imageUrl+item.childCategory[3].imgData" mode="widthFix" class="width31"
@click="goGoodsList(item.childCategory[3].jumpUrl)"></image>
</view>
<!-- 天天好券 -->
<!-- <view class="width90 mart20 alijusstart" v-if="item.type == 6">
@ -213,18 +219,10 @@
img: 'banner3.png'
}
],
//
productList: [],
productListleg: '',
goldproductList: [],
goldproductListleg: '',
unioncardproductList: [],
unioncardproductListleg: '',
loadingText: '正在加载...',
pageNum: 1,
pageSize: 6,
//
categoryList: [],
homeCateList: [],
//
cpStuats: 1,
@ -236,11 +234,6 @@
onShow() {
if (app.globalData.cityName != '') {
this.city = app.globalData.qianzhuCityName;
// this.getCouponListArea();
// this.getCouponListgold();
// this.getunioncardCouponListgold();
// this.getCmsContent();
// this.getCmsContentcmshome();
this.getCmsContentcmsContent();
// if (app.globalData.userInfo.phone) {
// this.getMembershipLevel();
@ -336,12 +329,7 @@
that.city = '重庆市';
app.globalData.cityName = '重庆市';
app.globalData.cityId = '500000';
// that.getCouponListArea();
// that.getCouponListgold();
// that.getunioncardCouponListgold();
// that.getCmsContent();
// that.getCmsAactibity();
// that.getCmsContentcmshome();
that.getCmsContentcmsContent();
}
);
@ -405,49 +393,19 @@
}
getMembershipLevel(params).then(res => {});
},
//
getCmsContentcmshome() {
let code;
// #ifdef H5
code = 'CMS_H5_FAST'
// #endif
// #ifdef MP
code = 'CMS_HOME_NAV'
// #endif
let params = {
regionId: app.globalData.cityId,
categoryCode: code
}
getCmsContent(params).then(res => {
if (res.return_code == '000000') {
this.categoryList = res.return_data;
}
});
},
//
getCmsContent() {
let params = {
regionId: app.globalData.cityId,
categoryCode: 'CMS_WX_APPLETS_HOME_SLIDESHOW'
}
getCmsContent(params).then(res => {
if (res.return_code == '000000') {
this.swiperList = res.return_data;
}
});
},
//
getCmsAactibity() {
let code;
// #ifdef H5
code = 'CMS_H5_ALERT'
code = '2'
// #endif
// #ifdef MP
code = 'CMS_WX_APPLETS_HOME_ACTIVITY'
code = '1'
// #endif
let params = {
regionId: app.globalData.cityId,
categoryCode: code
companyId: app.globalData.companyId,
platform: code,
categoryCode: ''
}
getCmsContent(params).then(res => {
if (res.return_code == '000000' && res.return_data != '') {
@ -570,12 +528,7 @@
})
// app.globalData.cityId = '500103';
if (res.return_data.regionId) {
// that.getCouponListArea();
// that.getCouponListgold();
// that.getunioncardCouponListgold();
// that.getCmsContent();
// that.getCmsAactibity();
// that.getCmsContentcmshome();
that.getCmsContentcmsContent();
}
uni.getStorage({
@ -700,71 +653,6 @@
});
},
//
getCouponListArea() {
let params = {
regionId: app.globalData.cityId,
pageNum: this.pageNum,
pageSize: this.pageSize,
displayArea: 1
}
getCouponList(params).then(res => {
if (res.return_code == '000000' && res.return_data.list) {
this.productList = res.return_data.list;
if (res.return_data.total > 4) {
this.productListleg = 4;
return;
}
this.productListleg = res.return_data.total;
} else {
this.productList = [];
}
})
},
//
getCouponListgold() {
let params = {
regionId: app.globalData.cityId,
pageNum: this.pageNum,
pageSize: this.pageSize,
displayArea: 2
}
getCouponList(params).then(res => {
if (res.return_code == '000000' && res.return_data.list) {
this.goldproductList = res.return_data.list;
this.goldproductListleg = res.return_data.total;
if (res.return_data.total > 4) {
this.goldproductListleg = 4;
return;
}
this.goldproductListleg = res.return_data.total;
} else {
this.productList = [];
}
})
},
//
getunioncardCouponListgold() {
let params = {
regionId: app.globalData.cityId,
pageNum: this.pageNum,
pageSize: this.pageSize,
displayArea: 5
}
getCouponList(params).then(res => {
if (res.return_code == '000000' && res.return_data.list) {
this.unioncardproductList = res.return_data.list;
this.unioncardproductListleg = res.return_data.total;
if (res.return_data.total > 4) {
this.unioncardproductListleg = 4;
return;
}
this.unioncardproductListleg = res.return_data.total;
} else {
this.unioncardproductList = [];
}
})
},
//
swiperChange(event) {
this.currentSwiper = event.detail.current;
@ -834,7 +722,6 @@
}
})
},
//
toCategory(item) {
uni.navigateTo({
@ -850,13 +737,7 @@
}
},
//
jumphuafei(item) {
uni.navigateTo({
url: item.ext1
})
},
//
//
goGoodsList(item) {
uni.navigateTo({
url: item

@ -112,8 +112,16 @@
methods: {
//
getCmsContentvideo() {
let code;
// #ifdef H5
code = '2'
// #endif
// #ifdef MP
code = '1'
// #endif
let params = {
regionId: app.globalData.cityId,
companyId: app.globalData.companyId,
platform: code,
categoryCode: 'CMS_H5_VIDEO'
}
getCmsContent(params).then(res => {

@ -91,8 +91,16 @@
methods: {
//
getCmsContent(item) {
let code;
// #ifdef H5
code = '2'
// #endif
// #ifdef MP
code = '1'
// #endif
let params = {
regionId: app.globalData.cityId,
companyId: app.globalData.companyId,
platform: code,
categoryCode: item
}
getCmsContent(params).then(res => {

@ -39,8 +39,16 @@
},
//
getCmsAactibity() {
let code;
// #ifdef H5
code = '2'
// #endif
// #ifdef MP
code = '1'
// #endif
let params = {
regionId: app.globalData.cityId,
companyId: app.globalData.companyId,
platform: code,
categoryCode: 'CMS_TELEPHONE_POP_UP'
}
getCmsContent(params).then(res => {

@ -306,7 +306,9 @@
app.globalData.userInfo = res.return_data;
this.user = res.return_data;
this.findById();
this.getHuiLianTongCardBalance();
if (this.user.hltCardNo) {
this.getHuiLianTongCardBalance();
}
this.getRebateIntegral();
uni.setStorage({
key: "user",

Loading…
Cancel
Save