1.对接优选商品下单

2.新增订单详情优选商品数据
yj-dev
杨杰 3 years ago
parent 7a15c4a229
commit aef4ec3a14
  1. 6
      App.vue
  2. 24
      Utils/Api.js
  3. 21
      pages/goods/coupon-details/coupon-details.vue
  4. 593
      pages/goods/goods-list/goods-list.vue
  5. 46
      pages/goods/goods.vue
  6. 38
      pages/goods/store-list/store-list.vue
  7. 26
      pages/order/confirmation.vue
  8. 3
      pages/tabBar/home/home.vue
  9. 132
      pages/user/order_details/order_details.vue
  10. 70
      subPages/brand-classification/brand-classification.vue
  11. 74
      subPages/preferred-goods/preferred-goods.vue

@ -26,7 +26,11 @@
latitude : '', latitude : '',
balancePrice : '', balancePrice : '',
balanceCardNo:'', balanceCardNo:'',
identificationCode:'' identificationCode:'',
//ID
storeid:'',
//
storename:''
}, },
onLaunch: function() { onLaunch: function() {
}, },

@ -43,7 +43,7 @@ export const WXlogin = params => {
export const OpenidGetUser = (openId, params) => { export const OpenidGetUser = (openId, params) => {
return POST('GET', `${base}/User/openid/${openId}`, params).then(res => res.data); return POST('GET', `${base}/User/openid/${openId}`, params).then(res => res.data);
}; };
//获取卡券列表 //获取卡券,优选列表
export const getCouponList = params => { export const getCouponList = params => {
return POST('GET', `${base}/coupon/getCouponList`, params).then(res => res.data); return POST('GET', `${base}/coupon/getCouponList`, params).then(res => res.data);
}; };
@ -58,7 +58,27 @@ export const getMerchantStoreById = params => {
//根据门店ID 获取卡券 //根据门店ID 获取卡券
export const getCouponListByStoreId = params => { export const getCouponListByStoreId = params => {
return POST('GET', `${base}/coupon/getCouponListByStoreId`, params).then(res => res.data); return POST('GET', `${base}/coupon/getCouponListByStoreId`, params).then(res => res.data);
} }
//获取优选商品分类
export const getListGoodsType = params => {
return POST('GET', `${base}/highGoodsType/getListGoodsType`, params).then(res => res.data);
}
//获取优选商品品牌列表
export const getBrandByList = params => {
return POST('GET', `${base}/highBrand/getBrandByList`, params).then(res => res.data);
}
// 优选商品列表
export const getBrandCouponList = params => {
return POST('GET', `${base}/coupon/getCouponList`, params).then(res => res.data);
}
//优选商品详情
export const getPreByOrderIdId = params => {
return POST('GET', `${base}/orderPre/getPreByOrderIdId`, params).then(res => res.data);
}
//优选商品预约完成
export const orderComplete = params => {
return POST('POST', `${base}/orderPre/orderComplete`, params).then(res => res.data);
}
//卡券详情 //卡券详情
export const getCouponById = params => { export const getCouponById = params => {
return POST('GET', `${base}/coupon/getCouponById`, params).then(res => res.data); return POST('GET', `${base}/coupon/getCouponById`, params).then(res => res.data);

@ -28,25 +28,6 @@
:show-back-btn="true" :show-back-btn="true"
></yy-video-player> ></yy-video-player>
<image :src="imagewxUrl+imgadres2" mode="widthFix" class="mart10"></image> <image :src="imagewxUrl+imgadres2" mode="widthFix" class="mart10"></image>
<!-- <view class="mart20 width90 font18 fcor333 fontwig6">
使用流程
</view> -->
<!-- <view class="mart5 width80 font14 fcor999 fontwig6" style="list-style-type: decimal;">
<view style="width: 5%;" class="flleft">1:</view>
<view style="margin-left: 5%;">客户使用积分兑换或者工会卡购买</view>
</view>
<view class="mart5 width80 font14 fcor999 fontwig6" style="list-style-type: decimal;">
<view style="width: 5%;" class="flleft">2:</view>
<view style="margin-left: 5%;">兑换成功后中石化给客户发送一张同等面额的码商券保存在加油中石化APP中</view>
</view>
<view class="mart5 width80 font14 fcor999 fontwig6" style="list-style-type: decimal;">
<view style="width: 5%;" class="flleft">3:</view>
<view style="margin-left: 5%;">客户登录加油中石化APP查看码商券详情</view>
</view>
<view class="mart5 width80 font14 fcor999 fontwig6" style="list-style-type: decimal;">
<view style="width: 5%;" class="flleft">4:</view>
<view style="margin-left: 5%;">客户选择中石化任意加油站加油加完油后在加油中石化APP中查看订单选择支付支付时选择码商券抵用支付完成即可</view>
</view> -->
</view> </view>
<view class="mart20 fotct fcorred font15 marb20 height20" <view class="mart20 fotct fcorred font15 marb20 height20"
v-if="couponDesInfo.highUserCoupon.status != 0 && couponDesInfo.couponInfo.couponSource != 4"> v-if="couponDesInfo.highUserCoupon.status != 0 && couponDesInfo.couponInfo.couponSource != 4">
@ -54,7 +35,7 @@
<view class="width90 mart20 fotct" v-if="couponDesInfo.highUserCoupon.status != 0 && couponDesInfo.couponInfo.couponSource != 4"> <view class="width90 mart20 fotct" v-if="couponDesInfo.highUserCoupon.status != 0 && couponDesInfo.couponInfo.couponSource != 4">
<image class="coupon-qr" :src="imageUrl+'couponCode/'+couponDesInfo.highUserCoupon.qrCodeImg"></image> <image class="coupon-qr" :src="imageUrl+'couponCode/'+couponDesInfo.highUserCoupon.qrCodeImg"></image>
</view> </view>
<view class="fotct fcor333 font15 marb10 mart10" v-if="couponDesInfo.couponInfo.couponSource != 4">{{couponDesInfo.couponCodeInfo.codeKey}}</view> <view class="fotct fcor333 font15 marb10 mart10" v-if="couponDesInfo.couponInfo.couponSource != 4 && couponDesInfo.couponCodeInfo.codeKey">{{couponDesInfo.couponCodeInfo.codeKey}}</view>
</view> </view>
<view class="width90 mart10 googscs backcorfff" v-if="couponDesInfo.couponInfo.couponSource != 4"> <view class="width90 mart10 googscs backcorfff" v-if="couponDesInfo.couponInfo.couponSource != 4">
<view class="width90 height45l font18 fcor666 aliitem"> <view class="width90 height45l font18 fcor666 aliitem">

@ -1,130 +1,178 @@
<template> <template>
<view> <view>
<view class="input-box"> <view class="input-box">
<view class="icon search"></view> <view class="icon search"></view>
<input placeholder="搜索卡券" v-model="couponName" placeholder-style="color:#c0c0c0;" @input="toSearch()" /> <input placeholder="搜索商品" v-model="couponName" placeholder-style="color:#c0c0c0;" @input="toSearch()" />
</view> </view>
<view class="swiper"> <view class="swiper">
<view class="swiper-box"> <view class="swiper-box">
<swiper circular="true" autoplay="true" @change="swiperChange"> <swiper circular="true" autoplay="true" @change="swiperChange">
<swiper-item v-for="swiper in swiperList" :key="swiper.id"> <swiper-item v-for="swiper in swiperList" :key="swiper.id">
<image :src="imageUrl+swiper.imgData" ></image> <image :src="imageUrl+swiper.imgData"></image>
</swiper-item> </swiper-item>
</swiper> </swiper>
<view class="indicator"> <view class="indicator">
<view class="dots" v-for="(swiper, index) in swiperList" <view class="dots" v-for="(swiper, index) in swiperList"
:class="[currentSwiper >= index ? 'on' : '']" :key="index"></view> :class="[currentSwiper >= index ? 'on' : '']" :key="index"></view>
</view> </view>
</view> </view>
</view> </view>
<view v-if="goodsList == '' " class="mart60 fotct font14 fcor666"> <view v-if="goodsList == '' " class="mart60 fotct font14 fcor666">
<image mode="widthFix" style="width: 70vw;" :src="imagewxUrl+imgadres"></image> <image mode="widthFix" style="width: 70vw;" :src="imagewxUrl+imgadres"></image>
</view> </view>
<view class="width90 height110 mart5" v-for="(row, index) in goodsList" :key="index" @click="toGoods(row.id)"> <view class="width90 height110 mart5" v-for="(row, index) in goodsList" :key="index" @click="toGoods(row.id)">
<image class="goodsimg flleft mart5" mode="widthFix" :src="imageUrl+row.couponImg"></image> <image class="goodsimg flleft mart5" mode="widthFix" :src="imageUrl+row.couponImg"></image>
<view class="goodsli "> <view class="goodsli ">
<view class="text2 fcor333 font14 fontwig6">{{row.couponName}}</view> <view class="text2 fcor333 font14 fontwig6">{{row.couponName}}</view>
<view class="goodsxg font12 fotct">限购{{row.limitNumber}}</view> <view class="goodsxg font12 fotct">限购{{row.limitNumber}}</view>
<view class="info mart10"> <view class="info mart10">
<view class="price" v-if="typeId == 2"> <view class="price" v-if="typeId == 2">
<image style="width: 15px;height: 15px;vertical-align: sub;" <image style="width: 15px;height: 15px;vertical-align: sub;" src="../../../static/img/jfx.png">
src="../../../static/img/jfx.png"> </image> {{ row.discountPrice*100}}
</image> {{ row.discountPrice*100}} </view>
</view> <view class="price" v-if="typeId == 1 || typeId == 3">
<view class="price" v-if="typeId == 1"> {{ row.discountPrice*100}}
{{ row.discountPrice*100}} </view>
</view> <!-- v-if="product.discountPrice !== product.salesPrice" -->
<!-- v-if="product.discountPrice !== product.salesPrice" --> <view class="slogan" v-if="row.discountPrice !== row.salesPrice">
<view class="slogan" v-if="row.discountPrice !== row.salesPrice"> <image v-if="typeId == 2" style="width: 15px;height: 15px;vertical-align: sub;"
<image v-if="typeId == 2" style="width: 15px;height: 15px;vertical-align: sub;" src="../../../static/img/jfh.png">
src="../../../static/img/jfh.png"> </image> <text v-if="typeId == 1 || typeId == 3"></text>{{ row.salesPrice*100}}
</image> <text v-if="typeId == 1"></text>{{ row.salesPrice*100}} </view>
</view> </view>
</view> </view>
</view> </view>
</view>
</view>
</view> </template>
</template>
<script>
<script> import {
import { getCouponList,
getCouponList, getCmsContent,
getCmsContent getBrandCouponList
} from '../../../Utils/Api.js'; } from '../../../Utils/Api.js';
let app = getApp(); let app = getApp();
export default { export default {
data() { data() {
return { return {
goodsList: [], goodsList: [],
imagewxUrl: app.globalData.imageWxImg, imagewxUrl: app.globalData.imageWxImg,
imgadres:'noorder.png', imgadres: 'noorder.png',
imageUrl: app.globalData.imgUrl, imageUrl: app.globalData.imgUrl,
// //
swiperList: [{ swiperList: [{
id: 1, id: 1,
src: 'url1', src: 'url1',
img: 'banner2.png' img: 'banner2.png'
}, },
{ {
id: 2, id: 2,
src: 'url2', src: 'url2',
img: 'banner3.png' img: 'banner3.png'
} }
], ],
currentSwiper: 0, currentSwiper: 0,
pageNum: 1, pageNum: 1,
pageSize: 10, pageSize: 10,
isNoMoreData: false, isNoMoreData: false,
typeId: '', typeId: '',
couponName: '' couponName: '',
}; brandid : '',
}, goodtyid: ''
};
onLoad: function(option) { //optionobject },
onLoad: function(option) { //optionobject
this.typeId = option.id; this.typeId = option.id;
if (option.id == 1) { this.brandid = option.brandId;
uni.setNavigationBarTitle({ this.goodtyid = option.goodsId;
title: '商品列表' if (option.id == 1) {
}); uni.setNavigationBarTitle({
} title: '商品列表'
if (option.id == 2) { });
uni.setNavigationBarTitle({ this.getCouponListArea();
title: '积分列表' this.getCmsContent('CMS_WX_APPLETS_GOODS_LIST');
}); }
} if (option.id == 2) {
this.getCouponListArea(); uni.setNavigationBarTitle({
this.getCmsContent(); title: '积分列表'
}, });
onPageScroll(e) { this.getCouponListArea();
this.getCmsContent('CMS_WX_APPLETS_GOODS_LIST');
}, }
//page.json"onReachBottomDistance" if (option.id == 3) {
uni.setNavigationBarTitle({
title: '优选商品'
});
this.getCmsContent('CMS_PRE_LIST');
this.getBrandCouponList();
}
},
onPageScroll(e) {
},
//page.json"onReachBottomDistance"
onReachBottom() { onReachBottom() {
this.getCouponListArea(); if(this.typeId == 3){
}, this.getBrandCouponList();
methods: { }else{
// this.getCouponListArea();
getCmsContent() { }
let params = { },
regionId: app.globalData.cityId, methods: {
categoryCode: 'CMS_WX_APPLETS_GOODS_LIST' //
} getCmsContent(item) {
getCmsContent(params).then(res => { let params = {
if (res.return_code == '000000') { regionId: app.globalData.cityId,
this.swiperList = res.return_data; categoryCode: item
} }
}); getCmsContent(params).then(res => {
}, if (res.return_code == '000000') {
// this.swiperList = res.return_data;
swiperChange(event) { }
this.currentSwiper = event.detail.current; });
},
//
swiperChange(event) {
this.currentSwiper = event.detail.current;
},
//
getCouponListArea() {
uni.showLoading({
title: '加载中...'
})
if (this.isNoMoreData) {
uni.hideLoading()
return false;
}
let pagenum = this.pageNum;
let params = {
regionId: app.globalData.cityId,
pageNum: pagenum,
pageSize: this.pageSize,
displayArea: this.typeId,
couponName: this.couponName
}
getCouponList(params).then(res => {
if (res.return_code == '000000') {
uni.hideLoading();
this.isNoMoreData = res.return_data.list.length == this.pageSize ? false : true;
this.goodsList = this.goodsList.concat(res.return_data.list);
if (res.return_data.total == (this.pageNum * this.pageSize)) {
this.isNoMoreData = true;
}
this.pageNum = res.return_data.list.length == this.pageSize ? ++pagenum : pagenum;
} else {
this.goodsList = [];
}
})
}, },
// //
getCouponListArea() { getBrandCouponList() {
uni.showLoading({ uni.showLoading({
title: '加载中...' title: '加载中...'
}) })
@ -137,12 +185,13 @@
regionId: app.globalData.cityId, regionId: app.globalData.cityId,
pageNum: pagenum, pageNum: pagenum,
pageSize: this.pageSize, pageSize: this.pageSize,
displayArea: this.typeId, brandId: this.brandid,
goodsTypeId: this.goodtyid,
couponName: this.couponName couponName: this.couponName
} }
getCouponList(params).then(res => { getBrandCouponList(params).then(res => {
uni.hideLoading();
if (res.return_code == '000000') { if (res.return_code == '000000') {
uni.hideLoading();
this.isNoMoreData = res.return_data.list.length == this.pageSize ? false : true; this.isNoMoreData = res.return_data.list.length == this.pageSize ? false : true;
this.goodsList = this.goodsList.concat(res.return_data.list); this.goodsList = this.goodsList.concat(res.return_data.list);
if (res.return_data.total == (this.pageNum * this.pageSize)) { if (res.return_data.total == (this.pageNum * this.pageSize)) {
@ -153,147 +202,151 @@
this.goodsList = []; this.goodsList = [];
} }
}) })
}, },
toSearch() { toSearch() {
this.pageNum = 1; this.pageNum = 1;
this.pageSize = 10; this.pageSize = 10;
this.isNoMoreData = false; this.isNoMoreData = false;
this.goodsList = []; this.goodsList = [];
this.getCouponListArea(); if(this.typeId == 3){
}, this.getBrandCouponList();
// }else{
toGoods(e) { this.getCouponListArea();
uni.navigateTo({ }
url: '../../goods/goods?id=' + e },
}); //
}, toGoods(e) {
} uni.navigateTo({
url: '../../goods/goods?id=' + e
} });
</script> },
}
<style lang="scss">
.input-box { }
width: 90%; </script>
margin-left: 5%;
margin-top: 15px; <style lang="scss">
height: 70rpx; .input-box {
background-color: #f5f5f5; width: 90%;
border-radius: 10rpx; margin-left: 5%;
position: relative; margin-top: 15px;
display: flex; height: 70rpx;
align-items: center; background-color: #f5f5f5;
border-radius: 10rpx;
.icon { position: relative;
display: flex; display: flex;
align-items: center; align-items: center;
position: absolute;
top: 2px; .icon {
left: 5px; display: flex;
width: 60upx; align-items: center;
height: 60upx; position: absolute;
font-size: 34upx; top: 2px;
color: #c0c0c0; left: 5px;
} width: 60upx;
height: 60upx;
input { font-size: 34upx;
padding-left: 50upx; color: #c0c0c0;
height: 28upx; }
font-size: 28upx;
width: 100%; input {
} padding-left: 50upx;
} height: 28upx;
font-size: 28upx;
.swiper { width: 100%;
width: 100%; }
display: flex; }
justify-content: center;
margin-top: 20px; .swiper {
margin-bottom: 20px; width: 100%;
display: flex;
.swiper-box { justify-content: center;
width: 92%; margin-top: 20px;
height: 150px; margin-bottom: 20px;
overflow: hidden;
border-radius: 15upx; .swiper-box {
box-shadow: 0upx 8upx 25upx rgba(0, 0, 0, 0.2); width: 92%;
//ios height: 150px;
position: relative; overflow: hidden;
z-index: 1; border-radius: 15upx;
box-shadow: 0upx 8upx 25upx rgba(0, 0, 0, 0.2);
swiper { //ios
width: 100%; position: relative;
height: 150px; z-index: 1;
swiper-item { swiper {
image { width: 100%;
width: 100%; height: 150px;
height: 150px;
} swiper-item {
} image {
} width: 100%;
height: 150px;
.indicator { }
position: absolute; }
bottom: 20upx; }
left: 20upx;
background-color: rgba(255, 255, 255, 0.4); .indicator {
width: 150upx; position: absolute;
height: 5upx; bottom: 20upx;
border-radius: 3upx; left: 20upx;
overflow: hidden; background-color: rgba(255, 255, 255, 0.4);
display: flex; width: 150upx;
height: 5upx;
.dots { border-radius: 3upx;
width: 0upx; overflow: hidden;
background-color: rgba(255, 255, 255, 1); display: flex;
transition: all 0.3s ease-out;
.dots {
&.on { width: 0upx;
width: (100%/3); background-color: rgba(255, 255, 255, 1);
} transition: all 0.3s ease-out;
}
} &.on {
} width: (100%/3);
} }
}
.goodsimg { }
width: 90px; }
height: 90px; }
}
.goodsimg {
.goodsli { width: 90px;
margin-left: 100px; height: 90px;
padding-top: 5px; }
}
.goodsli {
.goodsxg { margin-left: 100px;
margin-top: 5px; padding-top: 5px;
border: 1px solid #eb5823; }
border-radius: 5px;
color: #eb5823; .goodsxg {
width: 55px; margin-top: 5px;
padding: 3px; border: 1px solid #eb5823;
} border-radius: 5px;
color: #eb5823;
.info { width: 55px;
display: flex; padding: 3px;
justify-content: space-between; }
align-items: flex-end;
width: 100%; .info {
display: flex;
.price { justify-content: space-between;
color: #e65339; align-items: flex-end;
font-size: 30upx; width: 100%;
font-weight: 600;
width: 50%; .price {
} color: #e65339;
font-size: 30upx;
.slogan { font-weight: 600;
width: 50%; width: 50%;
color: #807c87; }
font-size: 24upx;
text-decoration: line-through; .slogan {
} width: 50%;
} color: #807c87;
font-size: 24upx;
text-decoration: line-through;
}
}
</style> </style>

@ -38,8 +38,7 @@
</view> </view>
<view class="flleft width70 fcorfff" v-else> <view class="flleft width70 fcorfff" v-else>
<view class="font13 mart10 margle20"> <view class="font13 mart10 margle20">
<image style="width: 20px;height: 20px;vertical-align: sub;" <image style="width: 20px;height: 20px;vertical-align: sub;" src="../../static/img/jfx.png">
src="../../static/img/jfx.png">
</image><text class="font20 paddleft5">{{goodsData[0].discountPrice *100}}</text> </image><text class="font20 paddleft5">{{goodsData[0].discountPrice *100}}</text>
</view> </view>
<view class="font15 margle20">门市参考价: <image style="width: 20px;height: 20px;vertical-align: sub;" <view class="font15 margle20">门市参考价: <image style="width: 20px;height: 20px;vertical-align: sub;"
@ -64,6 +63,15 @@
</view> </view>
</view> </view>
</view> </view>
<!-- 服务-规则选择 -->
<view class="info-box spec" v-if="goodsData[0].reserveStatus" @click="jumpstore">
<view class="row" style="margin: 0px;">
<view class="text" style="color: #689bc0; font-size: 14px !important;">点击去选择门店</view>
<view class="arrow font14" style="color: #689bc0;" v-if="storeName">
{{storeName}}
</view>
</view>
</view>
<view class="height60 width100 backcorfff" v-if="goodsData[0].handselCouponList != '' " @click="showPopup()"> <view class="height60 width100 backcorfff" v-if="goodsData[0].handselCouponList != '' " @click="showPopup()">
<view class="width80p flleft" style="padding-left: 4%;line-height: 60px; "> <view class="width80p flleft" style="padding-left: 4%;line-height: 60px; ">
赠送卡券 赠送卡券
@ -89,7 +97,7 @@
<image mode="widthFix" class="flleft" src="../../static/img/logo.png"></image> <image mode="widthFix" class="flleft" src="../../static/img/logo.png"></image>
<view class="tcrig"> <view class="tcrig">
<view class="font16 fontwig6 fcor333 text1">{{ product.highCouponModel.couponName }}</view> <view class="font16 fontwig6 fcor333 text1">{{ product.highCouponModel.couponName }}</view>
<view class="font13 fcor999 mart5">有效期至201-05-15 225959(待改)</view> <view class="font13 fcor999 mart5">有效期至{{product.highCouponModel.salesEndTime | formatDate('-')}}</view>
<view class="info mart5" v-if="product.highCouponModel.payType == 1"> <view class="info mart5" v-if="product.highCouponModel.payType == 1">
<view class="price">{{ product.highCouponModel.discountPrice}}</view> <view class="price">{{ product.highCouponModel.discountPrice}}</view>
<view class="slogan" <view class="slogan"
@ -98,14 +106,12 @@
</view> </view>
<view class="info mart5" v-else> <view class="info mart5" v-else>
<view class="price"> <view class="price">
<image style="width: 15px;height: 15px;vertical-align: sub;" <image style="width: 15px;height: 15px;vertical-align: sub;" src="../../static/img/jfx.png">
src="../../static/img/jfx.png">
</image>{{ product.highCouponModel.discountPrice*100}} </image>{{ product.highCouponModel.discountPrice*100}}
</view> </view>
<view class="slogan" <view class="slogan"
v-if="product.highCouponModel.discountPrice !== product.highCouponModel.salesPrice"> v-if="product.highCouponModel.discountPrice !== product.highCouponModel.salesPrice">
<image style="width: 15px;height: 15px;vertical-align: sub;" <image style="width: 15px;height: 15px;vertical-align: sub;" src="../../static/img/jfh.png">
src="../../static/img/jfh.png">
</image>{{ product.highCouponModel.salesPrice*100}} </image>{{ product.highCouponModel.salesPrice*100}}
</view> </view>
</view> </view>
@ -157,7 +163,9 @@
//html //html
desid: '', desid: '',
imageUrl: app.globalData.imgUrl, imageUrl: app.globalData.imgUrl,
user: '' user: '',
storeId: '', // id
storeName: '' //
}; };
}, },
filters: { filters: {
@ -181,13 +189,20 @@
onLoad(option) { onLoad(option) {
this.desid = option.id; this.desid = option.id;
this.user = app.globalData.userInfo; this.user = app.globalData.userInfo;
this.getCouponById(); this.getCouponById();
app.globalData.storeid = '';
app.globalData.storename = '';
// #ifdef MP // #ifdef MP
// //
this.showBack = false; this.showBack = false;
// #endif // #endif
//optionobject //optionobject
}, },
onShow() {
this.storeId = app.globalData.storeid;
this.storeName = app.globalData.storename;
},
onReady() { onReady() {
// this.calcAnchor(); //ajax // this.calcAnchor(); //ajax
}, },
@ -322,12 +337,19 @@
}, },
buy() { buy() {
let that = this; let that = this;
if(this.goodsData[0].stockCount == 0 && this.goodsData[0].couponSource !=4){ if (this.goodsData[0].stockCount == 0 && this.goodsData[0].couponSource != 4) {
uni.showToast({ uni.showToast({
title: '库存不足', title: '库存不足',
icon: "none" icon: "none"
}); });
return; return;
}
if(this.goodsData[0].reserveStatus && this.storeName == ''){
uni.showToast({
title: '请选择门店',
icon: "none"
});
return;
} }
uni.showToast({ uni.showToast({
title: '提交订单...', title: '提交订单...',
@ -443,7 +465,7 @@
page { page {
background-color: #f8f8f8; background-color: #f8f8f8;
} }
button::after { button::after {
border: none border: none
} }
@ -695,8 +717,10 @@
.swiper-box { .swiper-box {
position: relative; position: relative;
width: 100%; width: 100%;
swiper { swiper {
width: 100%; width: 100%;
swiper-item { swiper-item {
image { image {
width: 100%; width: 100%;

File diff suppressed because one or more lines are too long

@ -205,7 +205,7 @@
orderId: '', orderId: '',
jumpType: '', jumpType: '',
tongCardPrice: 0, tongCardPrice: 0,
storeId:''
}; };
}, },
@ -399,14 +399,18 @@
} }
uni.showLoading({ uni.showLoading({
title: '提交订单中...' title: '提交订单中...'
}) })
if(this.couponList.reserveStatus){
this.storeId = app.globalData.storeid
}
let goods = { let goods = {
"memDiscountId": this.memDiscountId, "memDiscountId": this.memDiscountId,
"identificationCode": app.globalData.identificationCode, "identificationCode": app.globalData.identificationCode,
"highChildOrderList": [{ "highChildOrderList": [{
"goodsType": 1, "goodsType": 1,
"goodsId": this.couponId, "goodsId": this.couponId,
"saleCount": 1 "saleCount": 1,
"storeId": this.storeId
}] }]
} }
addOrder(goods).then(res => { addOrder(goods).then(res => {
@ -475,7 +479,9 @@
uni.hideLoading(); uni.hideLoading();
uni.showToast({ uni.showToast({
title: '支付成功' title: '支付成功'
}) })
app.globalData.storeid = '';
app.globalData.storename = '';
uni.reLaunch({ uni.reLaunch({
url: '../pay/success/success?id=' + that.couponId url: '../pay/success/success?id=' + that.couponId
}); });
@ -562,7 +568,9 @@
if (res.return_code == '000000') { if (res.return_code == '000000') {
uni.showToast({ uni.showToast({
title: '支付成功' title: '支付成功'
}) })
app.globalData.storeid = '';
app.globalData.storename = '';
uni.reLaunch({ uni.reLaunch({
url: '../pay/success/success?id=' + this.couponId url: '../pay/success/success?id=' + this.couponId
}); });
@ -592,7 +600,9 @@
if (res.return_code == '000000') { if (res.return_code == '000000') {
uni.showToast({ uni.showToast({
title: '支付成功' title: '支付成功'
}) })
app.globalData.storeid = '';
app.globalData.storename = '';
uni.reLaunch({ uni.reLaunch({
url: '../pay/success/success?id=' + this.couponId url: '../pay/success/success?id=' + this.couponId
}); });
@ -644,7 +654,9 @@
// //
uni.showToast({ uni.showToast({
title: '支付成功' title: '支付成功'
}) })
app.globalData.storeid = '';
app.globalData.storename = '';
if (that.jumpType == 4) { if (that.jumpType == 4) {
uni.reLaunch({ uni.reLaunch({
url: '/pages/tabBar/user/user' url: '/pages/tabBar/user/user'

@ -675,8 +675,7 @@
} }
if (item.title == '电影票') { if (item.title == '电影票') {
uni.navigateTo({ uni.navigateTo({
// url: '/pages/tabBar/order/order?id=2' url: '/pages/tabBar/order/order?id=2'
url: '../../../subPages/preferred-goods/preferred-goods'
}) })
return; return;
} }

@ -189,7 +189,78 @@
</view> </view>
</view> </view>
</view> </view>
<view class="width100 height60"></view> <!-- 优选商品 -->
<view class="width94 font18 fcor333 fontwig6 height40" v-if="preByOrderInfo">预约订单详情</view>
<view class="order" v-if="preByOrderInfo">
<view class="row">
<view class="left">
预约状态 :
</view>
<view class="right" v-if="preByOrderInfo.status == 1">
预约中
</view>
<view class="right" v-if="preByOrderInfo.status == 2">
预约成功
</view>
<view class="right" v-if="preByOrderInfo.status == 3">
预约完成
</view>
<view class="right" v-if="preByOrderInfo.status == 4">
预约失败
</view>
<view class="right" v-if="preByOrderInfo.status == 5">
预约取消
</view>
</view>
<view class="row">
<view class="left">
预约订单号 :
</view>
<view class="right">
{{preByOrderInfo.preOrderNo}}
</view>
</view>
<view class="row" v-if="preByOrderInfo.reachAddress">
<view class="left">
到店地点 :
</view>
<view class="right">
{{preByOrderInfo.reachAddress}}
</view>
</view>
<view class="row" v-if="preByOrderInfo.reachTime">
<view class="left">
到店时间 :
</view>
<view class="right">
{{preByOrderInfo.reachTime | formatDate('-')}}
</view>
</view>
<view class="row" v-if="preByOrderInfo.statusFailDesc">
<view class="left">
预约失败说明 :
</view>
<view class="right">
{{preByOrderInfo.statusFailDesc}}
</view>
</view>
<view class="row" v-if="preByOrderInfo.statusCancelDesc">
<view class="left">
预约取消说明 :
</view>
<view class="right">
{{preByOrderInfo.statusCancelDesc}}
</view>
</view>
</view>
<view class="width100 height60"></view>
<view class="footer" @click="orderComplete" v-if="preByOrderInfo && preByOrderInfo.status == 2">
<view class="settlement">
<view class="btn" style="background-color: #0083f5;color: #fff;width: 100% !important;">预约完成</view>
</view>
</view>
<view class="footer" <view class="footer"
v-if="recinfo.orderStatus == 1 && recinfo.highChildOrderList[0].goodsType !=6 && recinfo.highChildOrderList[0].goodsType !=5 && recinfo.highChildOrderList[0].goodsType !=4"> v-if="recinfo.orderStatus == 1 && recinfo.highChildOrderList[0].goodsType !=6 && recinfo.highChildOrderList[0].goodsType !=5 && recinfo.highChildOrderList[0].goodsType !=4">
<view class="settlement"> <view class="settlement">
@ -211,7 +282,9 @@
<script> <script>
import { import {
getOrderById, getOrderById,
cancelOrder cancelOrder,
getPreByOrderIdId,
orderComplete
} from '../../../Utils/Api.js'; } from '../../../Utils/Api.js';
let app = getApp() let app = getApp()
export default { export default {
@ -228,13 +301,15 @@
orderId: '', orderId: '',
imageUrl: app.globalData.imgUrl, imageUrl: app.globalData.imgUrl,
imagewxUrl: app.globalData.imageWxImg, imagewxUrl: app.globalData.imageWxImg,
imgadres1: 'dhf.png', imgadres1: 'dhf.png',
preByOrderInfo:''
}; };
}, },
onShow() { onShow() {
// //
this.getOrderById(); this.getOrderById();
this.getPreByOrderIdId();
}, },
onHide() { onHide() {
@ -291,6 +366,55 @@
uni.hideLoading() uni.hideLoading()
} }
}) })
},
//
getPreByOrderIdId() {
let params = {
orderId: this.orderId,
}
getPreByOrderIdId(params).then(res => {
if (res.return_code == '000000') {
this.preByOrderInfo = res.return_data;
}
})
},
//
orderComplete(){
let that = this;
uni.showModal({
title: '预约完成',
content: '确定预约完成?',
success: (res) => {
if (res.confirm) {
uni.showLoading({
title: '加载中...'
})
let params = {
preOrderId : this.preByOrderInfo.id
}
orderComplete(params).then(res => {
if (res.return_code == '000000') {
uni.hideLoading();
uni.showToast({
title: res.return_data,
icon: 'none',
duration: 2000
})
this.getPreByOrderIdId();
} else {
uni.showToast({
title: res.return_msg,
icon: 'none',
duration: 2000
})
uni.hideLoading()
}
})
} else if (res.cancel) {
console.log('用户点击取消');
}
}
});
}, },
cancelOrder() { cancelOrder() {
let that = this; let that = this;

@ -4,42 +4,80 @@
<!-- 分割线 --> <!-- 分割线 -->
<view class="title-split"> <view class="title-split">
<view></view> <view></view>
<text>品分类</text> <text>分类</text>
<view></view> <view></view>
</view>
<view v-if="brandByList == '' " class="mart60 fotct font14 fcor666">
<image mode="widthFix" style="width: 70vw;" :src="imagewxUrl+imgadres1"></image>
</view> </view>
<!-- 分类--> <!-- 分类-->
<view class="width94"> <view class="width94">
<view class="width50 flleft fotct mart5" @click="jumpgoods"> <view class="width50 flleft fotct mart5" v-for="(item,index) in brandByList" :key="item" @click="jumpgoods(item.id)">
<image src="../../static/img/ghkpay.png" class="preimg"></image> <image :src="imageUrl+item.img" class="preimg"></image>
</view>
<view class="width50 flleft fotct mart5">
<image src="../static/cz2.jpg" class="preimg"></image>
</view>
<view class="width50 flleft fotct mart5">
<image src="../../static/img/ghkpay.png" class="preimg"></image>
</view>
<view class="width50 flleft fotct mart5">
<image src="../static/cz1.jpg" class="preimg"></image>
</view> </view>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
import {getBrandByList} from '../../Utils/Api.js';
let app = getApp() let app = getApp()
export default { export default {
data() { data() {
return { return {
imageUrl: app.globalData.imgUrl, imageUrl: app.globalData.imgUrl,
imagewxUrl: app.globalData.imageWxImg, imagewxUrl: app.globalData.imageWxImg,
imgadres: 'preimg.png' brandByList:[],
imgadres: 'brand.png',
imgadres1: 'noorder.png',
pageNum: 1,
pageSize: 10,
isNoMoreData: false,
desId:''
} }
},
onLoad(options) {
this.desId = options.id;
this.getBrandByList();
},
onReachBottom() {
this.getBrandByList();
}, },
methods: { methods: {
//
getBrandByList() {
uni.showLoading({
title: '加载中...'
})
if (this.isNoMoreData) {
uni.hideLoading()
return false;
}
let pagenum = this.pageNum;
let params = {
pageNum: pagenum,
pageSize: this.pageSize,
goodTypeId : this.desId
}
getBrandByList(params).then(res => {
uni.hideLoading();
if (res.return_code == '000000') {
this.isNoMoreData = res.return_data.list.length == this.pageSize ? false : true;
this.brandByList = this.brandByList.concat(res.return_data.list);
if (res.return_data.total == (this.pageNum * this.pageSize)) {
this.isNoMoreData = true;
}
this.pageNum = res.return_data.list.length == this.pageSize ? ++pagenum : pagenum;
} else {
this.brandByList = [];
}
})
},
// //
jumpgoods(){ jumpgoods(item){
uni.navigateTo({ uni.navigateTo({
url:'../../pages/goods/goods-list/goods-list?id=1' url:'../../pages/goods/goods-list/goods-list?id=3'+'&goodsId='+this.desId+'&brandId='+item
}) })
} }
} }

@ -7,41 +7,78 @@
<text>商品分类</text> <text>商品分类</text>
<view></view> <view></view>
</view> </view>
<view v-if="listgoods == '' " class="mart60 fotct font14 fcor666">
<image mode="widthFix" style="width: 70vw;" :src="imagewxUrl+imgadres1"></image>
</view>
<!-- 分类--> <!-- 分类-->
<view class="width94"> <view class="width94">
<view class="width50 flleft fotct mart5" @click="jumpbrand"> <view class="width50 flleft fotct mart5" v-for="(item,index) in listgoods" :key="item" @click="jumpbrand(item)">
<image src="../../static/img/ghkpay.png" class="preimg"></image> <image :src="imageUrl+item.img" class="preimg"></image>
</view>
<view class="width50 flleft fotct mart5">
<image src="../static/cz2.jpg" class="preimg"></image>
</view>
<view class="width50 flleft fotct mart5">
<image src="../../static/img/ghkpay.png" class="preimg"></image>
</view>
<view class="width50 flleft fotct mart5">
<image src="../static/cz1.jpg" class="preimg"></image>
</view> </view>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
import {
getListGoodsType
} from '../../Utils/Api.js';
let app = getApp(); let app = getApp();
export default { export default {
data() { data() {
return { return {
imageUrl: app.globalData.imgUrl, imageUrl: app.globalData.imgUrl,
imagewxUrl: app.globalData.imageWxImg, imagewxUrl: app.globalData.imageWxImg,
imgadres: 'preimg.png' imgadres: 'preimg.png',
imgadres1: 'noorder.png',
listgoods: [],
pageNum: 1,
pageSize: 10,
isNoMoreData: false,
} }
}, },
onLoad() {
this.getListGoodsType();
},
onReachBottom() {
this.getListGoodsType();
},
methods: { methods: {
// //
jumpbrand(){ getListGoodsType() {
uni.navigateTo({ uni.showLoading({
url:'../brand-classification/brand-classification' title: '加载中...'
}) })
if (this.isNoMoreData) {
uni.hideLoading()
return false;
}
let pagenum = this.pageNum;
let params = {
pageNum: pagenum,
pageSize: this.pageSize,
} }
getListGoodsType(params).then(res => {
uni.hideLoading();
if (res.return_code == '000000') {
this.isNoMoreData = res.return_data.list.length == this.pageSize ? false : true;
this.listgoods = this.listgoods.concat(res.return_data.list);
if (res.return_data.total == (this.pageNum * this.pageSize)) {
this.isNoMoreData = true;
}
this.pageNum = res.return_data.list.length == this.pageSize ? ++pagenum : pagenum;
} else {
this.listgoods = [];
}
})
},
//
jumpbrand(item) {
uni.navigateTo({
url: '../brand-classification/brand-classification?id='+item.id
})
}
} }
} }
</script> </script>
@ -74,8 +111,9 @@
} }
} }
} }
.preimg { .preimg {
width: 120px; width: 120px;
height: 80px; height: 80px;
} }
</style> </style>

Loading…
Cancel
Save