页面优化

1.添加PC端订单支付 弹出支付二维码
2.添加确认订单的面包屑  从购物车和其他方向进去的不同显示
3.修改移动端按钮和合计样式显示问题
4.添加购物车的全选功能
5.添加支付页面面包屑功能
6.修改订单详情页 添加面包屑和分割线
7.添加购物车数量编辑的保存
This commit is contained in:
lin 2022-03-24 17:05:47 +08:00
parent 9f955a34eb
commit 9f7ce41eac
14 changed files with 1930 additions and 1737 deletions

View File

@ -7,16 +7,16 @@ export const syncClass = classId => fetch('/api/listhome/' + classId)
/**
* 筛选条件下拉的展示请求
*/
*/
export const filter = () => fetch('/api/listhome/filter/data')
/**
* 获取课程列表
*/
*/
export const courselist = (offset, courseId, type, sort, selectScreen = []) => {
var selectScreenStr = ''
// 过滤请求数组
selectScreen.forEach(function (element) {
selectScreen.forEach(function(element) {
for (var i = 0; i < element.classlist.length; i++) {
if (element.classlist[i].status) {
selectScreenStr += element.classlist[i].id + '/'
@ -31,13 +31,13 @@ export const courselist = (offset, courseId, type, sort, selectScreen = []) => {
courseId,
selectScreenStr
}
return fetch( '/api/courselist', data)
return fetch('/api/courselist', data)
}
/**
* 获取课程详情
*/
export const getDetail = (id) => {
fetch( '/api/courseDetail/index/' + id)
fetch('/api/courseDetail/index/' + id)
}
/**
@ -56,12 +56,13 @@ export const getleckCourse = (name, offset) => {
* 加入购物车
*/
export const postCourseId = (productCode, buyCount, memberId, mobile, productImg, productName, productPrice, specifications, leftAllotment, basePiont) => {
export const postCourseId = (productCode, buyCount, memberId, mobile, productImg, productName, productPrice,
specifications, leftAllotment, basePiont) => {
var data = {
buyCount:buyCount,
buyCount: buyCount,
memberId: memberId,
mobile:mobile,
productCode:productCode,
mobile: mobile,
productCode: productCode,
productImg: productImg,
productName: productName,
productPrice: productPrice,
@ -69,14 +70,14 @@ export const postCourseId = (productCode, buyCount, memberId, mobile, productImg
leftAllotment: leftAllotment,
basePiont: basePiont
}
return fetch('insertCartProductInfo', data,'POST')
return fetch('insertCartProductInfo', data, 'POST')
}
/**
* 是否存在购物车
*/
export const isexistCart = (id, pet,address) => {
var data = { }
return fetch('getCartProductInfo?memberId='+id,data,'POST')
export const isexistCart = (id, pet, address) => {
var data = {}
return fetch('getCartProductInfo?memberId=' + id, data, 'POST')
}
/**
@ -90,17 +91,19 @@ export const monitorOrderNotify = (OrderNumber) => {
/**
* 删除购物车
*/
export const deleteCart = ( productCode) => {
export const deleteCart = (productCode) => {
var data = {
productCode
}
return fetch('cancelCartProductInfo',productCode,'POST')
return fetch('cancelCartProductInfo', productCode, 'POST')
}
/**
* 购物车批量提交
*/
export const mostAddClass = (id) => {
return fetch('/api/mostAddClass/', {id})
return fetch('/api/mostAddClass/', {
id
})
}
/**
* 删除购物车
@ -116,79 +119,79 @@ export const mostAddClass = (id) => {
/**
* 发送验证码
*/
export const sendMsg = (mobile, pet,address) => {
export const sendMsg = (mobile, pet, address) => {
var data = {
phoneNumber:mobile,
phoneNumber: mobile,
}
return fetch('sendMsg', data, 'POST' )
return fetch('sendMsg', data, 'POST')
}
/**
* 发送验证码数据
*/
export const vadatnmsg = (msgNum,hash,tamp) => {
export const vadatnmsg = (msgNum, hash, tamp) => {
var data = {
msgNum:msgNum,
tamp:tamp,
hash:hash
msgNum: msgNum,
tamp: tamp,
hash: hash
}
return fetch('validateNum', data, 'POST' )
return fetch('validateNum', data, 'POST')
}
/**
* 筛选标签
*/
export const userstype = (stype, pet,address) => {
export const userstype = (stype, pet, address) => {
var data = {
petType:0,
petType: 0,
}
return fetch('productSearchTag/query?petType=' + 0, data, 'POST' )
return fetch('productSearchTag/query?petType=' + 0, data, 'POST')
}
/**
* 登录
*/
export const userLongin = (mobile, pet,address) => {
export const userLongin = (mobile, pet, address) => {
var data = {
id:'',
mobile:mobile,
id: '',
mobile: mobile,
}
return fetch('member?type=get', data, 'POST' )
return fetch('member?type=get', data, 'POST')
}
/**
/**
* 登录和注册
*/
export const userregOrLogin = (mobile) => {
var data = {
id:'',
mobile:mobile,
id: '',
mobile: mobile,
}
return fetch('regOrLogin?phoneNumber='+ mobile , data, 'POST' )
return fetch('regOrLogin?phoneNumber=' + mobile, data, 'POST')
}
//注册
export const useredit = (mobile, pet,address) => {
//注册
export const useredit = (mobile, pet, address) => {
var data = {
mobile:mobile,
memberName:'',
realName:'',
gender:'',
email:'',
openId:'',
unionId:'',
birthday:'',
provinceId:'',
cityId:'',
districtId:'',
storeCode:'',
remark:'',
memberMark:'',
mobile: mobile,
memberName: '',
realName: '',
gender: '',
email: '',
openId: '',
unionId: '',
birthday: '',
provinceId: '',
cityId: '',
districtId: '',
storeCode: '',
remark: '',
memberMark: '',
remark:''
remark: ''
}
return fetch('member?type=add', data, 'POST' )
return fetch('member?type=add', data, 'POST')
}
//查询标品全部信息
//查询标品全部信息
// export const userquery = (mobile, pet,address) => {
// var data = {
// channelId:"15",
@ -202,83 +205,82 @@ export const userquery = (stype, ) => {
console.log(stype);
var data = {
goodsName:stype
goodsName: stype
}
return fetch('goods?petType='+stype, data, 'POST' )
return fetch('goods?petType=' + stype, data, 'POST')
}
//处方信息
export const userque = (goodsName, petType, curPage,curRow) => {
if(!curPage)
curPage=1;
if(!curRow)
curRow=10;
let queryTail='&page='+curPage+'&rows='+curRow;
let query='?0';
if(goodsName)
query += '&goodsName='+goodsName;
if(petType!==undefined && petType!=='') {
query += '&petType='+petType;
export const userque = (goodsName, petType, curPage, curRow) => {
if (!curPage)
curPage = 1;
if (!curRow)
curRow = 10;
let queryTail = '&page=' + curPage + '&rows=' + curRow;
let query = '?0';
if (goodsName)
query += '&goodsName=' + goodsName;
if (petType !== undefined && petType !== '') {
query += '&petType=' + petType;
}
query += queryTail;
var data = {
}
return fetch('goods'+query, data, 'POST' )
var data = {}
return fetch('goods' + query, data, 'POST')
}
//标品全部信息
export const biaomessage = (stype,name,curPage,curRow) => {
if(!curPage)
curPage=1;
if(!curRow)
curRow=10;
let queryTail='&page='+curPage+'&rows='+curRow;
if(stype.length>1){
let list={};
stype.map(item=>{
export const biaomessage = (stype, name, curPage, curRow) => {
if (!curPage)
curPage = 1;
if (!curRow)
curRow = 10;
let queryTail = '&page=' + curPage + '&rows=' + curRow;
if (stype.length > 1) {
let list = {};
stype.map(item => {
console.log(item);
list=item
list = item
})
var str = "?";
for(var key in list){
for (var key in list) {
str = str + key + "=" + list[key] + "&";
}
stype = str.substr(0,str.length-1);
return fetch('product/query'+stype+queryTail, '', 'POST' )
}else{
return fetch('product/query?petType='+stype+queryTail, '', 'POST' )
stype = str.substr(0, str.length - 1);
return fetch('product/query' + stype + queryTail, '', 'POST')
} else {
return fetch('product/query?petType=' + stype + queryTail, '', 'POST')
}
}
export const searchchanpin = (stype,usertype,curPage,curRow) => {
export const searchchanpin = (stype, usertype, curPage, curRow) => {
console.log(stype,usertype);
console.log(stype, usertype);
if(!curPage)
curPage=1;
if(!curRow)
curRow=10;
let queryTail='&page='+curPage+'&rows='+curRow;
if (!curPage)
curPage = 1;
if (!curRow)
curRow = 10;
let queryTail = '&page=' + curPage + '&rows=' + curRow;
console.log(stype);
let list={};
stype.map(item=>{
let list = {};
stype.map(item => {
console.log(item);
list=item
list = item
})
var str = "&";
for(var key in list){
for (var key in list) {
str = str + key + "=" + list[key] + "&";
}
str = str.substr(0,str.length-1);
str = str.substr(0, str.length - 1);
var data = {
page:1,
row:10
page: 1,
row: 10
}
return fetch('product/query?petType='+usertype+str+queryTail, data, 'POST' )
return fetch('product/query?petType=' + usertype + str + queryTail, data, 'POST')
}
@ -293,65 +295,65 @@ export const searchchanpin = (stype,usertype,curPage,curRow) => {
//查询订单
export const userindent = (phoneNumber,orderNumber,page,rows) => {
export const userindent = (phoneNumber, orderNumber, page, rows) => {
var data = {};
if(phoneNumber) {
if (phoneNumber) {
data.phoneNumber = phoneNumber;
}
if(orderNumber) {
if (orderNumber) {
data.orderNumber = orderNumber;
}
let url='orderMaster/?type=query';
if(page && rows) {
url = url+"&page="+page+"&rows="+rows;
let url = 'orderMaster/?type=query';
if (page && rows) {
url = url + "&page=" + page + "&rows=" + rows;
}
return fetch(url, data, 'POST' )
return fetch(url, data, 'POST')
}
//查询订单详情
export const userin = (orderNumber,) => {
export const userin = (orderNumber, ) => {
var data = {
orderNumber:orderNumber,
orderNumber: orderNumber,
}
return fetch('orderMaster/?type=query', data, 'POST' )
return fetch('orderMaster/?type=query', data, 'POST')
}
//取消订单
export const canceldanhao = (phoneNumber,orderNumber) => {
export const canceldanhao = (phoneNumber, orderNumber) => {
var data = {
phoneNumber:phoneNumber,
orderNumber:orderNumber,
phoneNumber: phoneNumber,
orderNumber: orderNumber,
}
return fetch('cancelOrder/', data, 'POST' )
return fetch('cancelOrder/', data, 'POST')
}
export const biaomessa = (stype) => {
console.log(stype);
var data = {
name:stype,
page:1,
row:10
name: stype,
page: 1,
row: 10
}
return fetch('product/query', data, 'POST' )
return fetch('product/query', data, 'POST')
}
export const biaome = (usertype,stype,curPage,rows) => {
if(!curPage)
curPage=1;
if(!rows)
rows=10;
let queryTail='&page='+curPage+'&rows='+rows;
let username='&name='+stype
export const biaome = (usertype, stype, curPage, rows) => {
if (!curPage)
curPage = 1;
if (!rows)
rows = 10;
let queryTail = '&page=' + curPage + '&rows=' + rows;
let username = '&name=' + stype
console.log(stype);
var data = {
name:stype,
rows:10,
page:1,
name: stype,
rows: 10,
page: 1,
}
return fetch('product/query?petType='+usertype+username+queryTail,data, 'POST' )
return fetch('product/query?petType=' + usertype + username + queryTail, data, 'POST')
}
@ -360,9 +362,9 @@ export const biaome = (usertype,stype,curPage,rows) => {
export const memberAccount = (stype) => {
console.log(stype);
var data = {
memberId:stype
memberId: stype
}
return fetch('memberAccount?type=history', data, 'POST' )
return fetch('memberAccount?type=history', data, 'POST')
}
@ -371,9 +373,9 @@ export const ordermaster = (stype) => {
console.log(stype);
var data = {
memberId:'223782'
memberId: '223782'
}
return fetch('memberAccount', data, 'POST' )
return fetch('memberAccount', data, 'POST')
}
//微信支付
@ -381,9 +383,9 @@ export const payOrderWX = (stype) => {
console.log(stype);
var data = {
memberId:'223782'
memberId: '223782'
}
return fetch('memberAccount', data, 'POST' )
return fetch('memberAccount', data, 'POST')
}
@ -392,9 +394,9 @@ export const payOrderWX = (stype) => {
export const insercar = (stype) => {
console.log(stype);
var data = {
petType:stype
petType: stype
}
return fetch('product/insertCartProductInfo', data, 'POST' )
return fetch('product/insertCartProductInfo', data, 'POST')
}
@ -402,36 +404,35 @@ export const insercar = (stype) => {
//查询猫狗商品信息
export const catquery = (productCode,type) => {
export const catquery = (productCode, type) => {
console.log(productCode);
var data = {
petType:0
petType: 0
}
return fetch('h5/product/query', data, 'POST' )
return fetch('h5/product/query', data, 'POST')
}
//查询猫狗商品信息
export const dogquery = (productCode,type) => {
export const dogquery = (productCode, type) => {
console.log(productCode);
var data = {
petType:1,
pet_type:0
petType: 1,
pet_type: 0
}
return fetch('h5/product/query', data, 'POST' )
return fetch('h5/product/query', data, 'POST')
}
//查询商品信息
export const productQuery = (productCode) => {
let url = 'product/query';
if(productCode) {
url += '?productCode='+encodeURI(productCode);
if (productCode) {
url += '?productCode=' + encodeURI(productCode);
}
var data = {
}
return fetch(url, data, 'POST' )
var data = {}
return fetch(url, data, 'POST')
}
@ -443,10 +444,10 @@ export const oncequery = (productCode) => {
var data = {
productCode:productCode
productCode: productCode
}
return fetch( "goodsByProductCode?productCode="+productCode, data, 'POST' )
return fetch("goodsByProductCode?productCode=" + productCode, data, 'POST')
}
@ -454,160 +455,159 @@ export const oncequery = (productCode) => {
export const goodsmessage = (productCode) => {
var data = {
productCode:productCode
productCode: productCode
}
return fetch( "productMaster/query?productCode="+productCode, data, 'POST' )
return fetch("productMaster/query?productCode=" + productCode, data, 'POST')
}
//优惠券的插入
export const inserdiscount = (mobile,couponId) => {
//优惠券的插入
export const inserdiscount = (mobile, couponId) => {
var data = {
mobile:mobile,
couponId:couponId
}
return fetch('coupon?type=fetch', data, 'POST' )
mobile: mobile,
couponId: couponId
}
return fetch('coupon?type=fetch', data, 'POST')
}
//优惠券的查询
export const getdiscount = (memberId,channelSecurity,mobile) => {
export const getdiscount = (memberId, channelSecurity, mobile) => {
var data = {
memberId:memberId,
mobile:mobile
memberId: memberId,
mobile: mobile
}
return fetch('memberAddress?type=getAll', data, 'POST' )
return fetch('memberAddress?type=getAll', data, 'POST')
}
//可用的优惠券
export const alldiscount = (paramsObj) => {
var data = paramsObj;
return fetch('couponConfig?type=getAll', data, 'POST' )
return fetch('couponConfig?type=getAll', data, 'POST')
}
//用户领取的优惠券
export const getdraw = (paramsObj) => {
var data = paramsObj;
return fetch('coupon?type=getAll', data, 'POST' )
return fetch('coupon?type=getAll', data, 'POST')
}
//微信支付
export const generateOrderWX = (list,payType) => {
//微信支付
export const generateOrderWX = (list, payType) => {
//Dictionary : 1: scan qrcode, 2:redirect 3: raise local app
if(payType==1)
return fetch('generateOrderWX', list, 'POST' )
if (payType == 1)
return fetch('generateOrderWX', list, 'POST')
else
return fetch('generateOrderWXH5', list, 'POST' )
}
return fetch('generateOrderWXH5', list, 'POST')
}
//再次支付
export const repayOrde = (ordernumber,payType) => {
//再次支付
export const repayOrde = (ordernumber, payType) => {
//Dictionary : 1: scan qrcode, 2:redirect 3: raise local app
if(payType==1)
return fetch('repayOrderWX?orderNo='+ordernumber,'', 'POST' )
if (payType == 1)
return fetch('repayOrderWX?orderNo=' + ordernumber, '', 'POST')
else
return fetch('repayOrderWXH5?orderNo='+ordernumber,'', 'POST' )
}
//用户所有的优惠券
export const allConfig = (memberId,channelSecurity,mobile) => {
return fetch('repayOrderWXH5?orderNo=' + ordernumber, '', 'POST')
}
//用户所有的优惠券
export const allConfig = (memberId, channelSecurity, mobile) => {
var data = {}
return fetch('couponConfig?type=getAll', data, 'POST')
}
//用户领取优惠券
export const getConfig = (memberId, couponId) => {
var data = {
memberId: memberId,
couponId: couponId,
}
return fetch('couponConfig?type=getAll', data, 'POST' )
}
return fetch('coupon?type=fetch', data, 'POST')
}
//用户领取优惠券
export const getConfig = (memberId,couponId) => {
//用户下的优惠券
export const userConfig = (memberId, couponId) => {
var data = {
memberId:memberId,
couponId:couponId,
}
return fetch('coupon?type=fetch', data, 'POST' )
memberId: memberId,
couponId: couponId,
}
return fetch('coupon?type=fetch', data, 'POST')
}
//用户下的优惠券
export const userConfig = (memberId,couponId) => {
//用户订单的查询
// export const customerorders = (memberId,channelSecurity,mobile) => {
// var data = {
// productName:'幼猫全价粮',
// buyCount:'2',
// productId:'210352',
// payAmount:'517',
// memberId:'844350',
// phoneNumber:'18112621098',
// }
// return fetch('generateOrderWX', data, 'POST' )
// }
//地址的查询
export const selectaddress = (memberId, pet, address) => {
var data = {
memberId:memberId,
couponId:couponId,
}
return fetch('coupon?type=fetch', data, 'POST' )
memberId: memberId,
}
return fetch('memberAddress?type=getAll', data, 'POST')
}
//用户订单的查询
// export const customerorders = (memberId,channelSecurity,mobile) => {
// var data = {
// productName:'幼猫全价粮',
// buyCount:'2',
// productId:'210352',
// payAmount:'517',
// memberId:'844350',
// phoneNumber:'18112621098',
// }
// return fetch('generateOrderWX', data, 'POST' )
// }
//地址的查询
export const selectaddress = (memberId, pet,address) => {
var data = {
memberId:memberId,
}
return fetch('memberAddress?type=getAll', data, 'POST' )
}
//地址的添加 //id/详细地址/ 收货人姓名/收货人电话号码/省份id/城市id/区域编码
export const editaddress = (memberId, detailAddress,recipient,tel,provinceId,cityId,districtId) => {
//地址的添加 //id/详细地址/ 收货人姓名/收货人电话号码/省份id/城市id/区域编码
export const editaddress = (memberId, detailAddress, recipient, tel, provinceId, cityId, districtId) => {
var data = {
memberId:844350,
provinceId:25,
cityId:36,
districtId:418,
detailAddress:'古美路1455弄46号302',
recipient:'蒋缘缘2',
recipientPhone:'13671516167',
zipCode:'214423',
default:false,
}
return fetch('memberAddress?type=add', memberId, 'POST' )
memberId: 844350,
provinceId: 25,
cityId: 36,
districtId: 418,
detailAddress: '古美路1455弄46号302',
recipient: '蒋缘缘2',
recipientPhone: '13671516167',
zipCode: '214423',
default: false,
}
return fetch('memberAddress?type=add', memberId, 'POST')
}
//删除
export const editdelete = (memberId,ids) => {
//删除
export const editdelete = (memberId, ids) => {
var data = {
memberId:memberId,
ids:ids,
}
return fetch('memberAddress?type=delete', data, 'POST' )
memberId: memberId,
ids: ids,
}
return fetch('memberAddress?type=delete', data, 'POST')
}
//地址的编辑
export const editupdate = (userid,) => {
//地址的编辑
export const editupdate = (userid, ) => {
// var data = {
// memberId:userid,
// id:id,
// isDefault:isDefault,
// }
return fetch('memberAddress?type=update', userid, 'POST' )
}
return fetch('memberAddress?type=update', userid, 'POST')
}
//修改密码
export const userchange = (id, pet,address) => {
export const userchange = (id, pet, address) => {
var data = {
id:id,
id: id,
}
return fetch('member?type=update', data, 'POST' )
return fetch('member?type=update', data, 'POST')
}
@ -661,26 +661,32 @@ export const getOrderList = (user, status) => {
//购物车操作
export const memberAddress = (type,data) => {
return fetch('memberAddress?type='+type, data, 'POST' )
}
//购物车操作
export const memberAddress = (type, data) => {
return fetch('memberAddress?type=' + type, data, 'POST')
}
//购物车操作
export const changeCartNumber = (data) => {
return fetch('updateCartCount', data, 'POST')
}
//支付宝支付二维码
export const generateOrderAlipay = (orderNo, payType) => {
//支付宝支付二维码
export const generateOrderAlipay = (orderNo, payType) => {
//Dictionary : 1: PC, 2: Mobile
let url = 'generateOrderAlipayPC';
if(payType == 2) {
if (payType == 2) {
url = 'generateOrderAlipayPhone'
}
var data = {
//orderNo:orderNo
}
url = url+"?orderNo="+orderNo;
url = url + "?orderNo=" + orderNo;
return fetch(url, data, 'POST')
//let ret = { "code": 1, "msg": "操作成功!", "success": true, "data": "<form name=\"punchout_form\" method=\"post\" action=\"https://openapi.alipay.com/gateway.do?charset=utf-8&method=alipay.trade.wap.pay&sign=GK1NjnOYPh%2BHTcTtuZg4YunsBNGPHiyc9BwXLx%2FG4G6Z7S8ILYy2E6VmxkGVwZEwZ1G5PA3u2eZxJN3ysyynL9uwG7L4jGQcOB6I2m1763VBi7euNiyMhimv5AYeXP4KiDtmZNDIAdyi3eKWemKTq74AfS0TTubYvKL8aqhJHTQy2GtYdXA89v53ZeFkXjoqpylwCf2j%2FJWD1nV1eO0a0PB5MFqPaZB5Eif69XkT1TNAt1eZiwIn4AO6yqMFJ41gGN5ymmLQUVcUgc5dxlGkMNgY4FUsI6mFYucQ%2BRPPmuH78YJTFU6VS5E%2BZ%2BCL%2BGLxeJs068n%2BLAPqpPqDbhveYg%3D%3D&return_url=https%3A%2F%2Fshop.royalcanin.com.cn&notify_url=https%3A%2F%2Fshop.royalcanin.com.cn%2Froyalcanin%2Froyalcanin%2Froyalcanin%2FupdateOrderAliPay&version=1.0&app_id=2021003108690157&sign_type=RSA2&timestamp=2022-02-14+15%3A08%3A05&alipay_sdk=alipay-sdk-java-dynamicVersionNo&format=json\">\n<input type=\"hidden\" name=\"biz_content\" value=\"{&quot;out_trade_no&quot;:&quot;02110014172230000&quot;,&quot;total_amount&quot;:&quot;138.0&quot;,&quot;subject&quot;:&quot;皇家宠物食品官方商城&quot;}\">\n<input type=\"submit\" value=\"立即支付\" style=\"display:none\" >\n</form>\n<script>document.forms[0].submit();</script>" };
//ret = JSON.parse(ret);
//return ret;
}
}

View File

@ -56,7 +56,7 @@ let util = {
message = '请返回支付宝继续当前订单的支付';
break;
case "3":
message = '请返回手机网页端继续当前订单的支付';
message = '请返回手机网页端继续当前订单的支付或扫描二维码进行支付';
break;
default:
message = '订单已过期,请重新下单';

View File

@ -463,7 +463,12 @@
}
.qrcode{
margin: 0 auto;
display: flex;
justify-content: center;
align-items: center;
}
}

View File

@ -4,7 +4,7 @@ ul li ol li em strong i {
}
//手机端
@media screen and (max-width: 768px) {
.rc-button{
.rc-button {
position: fixed;
bottom: 0;
width: 100%;
@ -14,42 +14,41 @@ ul li ol li em strong i {
justify-content: space-between;
align-items: center;
box-shadow: 0px -3px 6px rgba(0, 0, 0, 0.1);
.rc-left{
margin-left: 0.20rem;
.rc-left {
margin-left: 0.2rem;
}
span{
span {
font-size: 14px;
color: #333333;
color: #333333;
}
em{
em {
font-style: normal;
font-size: 0.18rem;
color: #E1001A;
color: #e1001a;
}
strong{
strong {
display: flex;
align-items: center;
justify-content: center;
height: 0.48rem;
background: #E2001A;
border-radius: 0.30rem;
background: #e2001a;
border-radius: 0.3rem;
color: white;
width: 1rem;
margin-right: 0.2rem
;
margin-right: 0.2rem;
}
}
.rc-main {
width: 92%;
margin: 0 auto;
.rc-userbottom{
.rc-userbottom {
display: none;
}
.viewdetails{
.viewdetails {
display: none;
}
.rc-foo{
.rc-foo {
display: none;
}
.rc-receiving {
@ -68,7 +67,6 @@ color: #333333;
display: block;
margin-left: 18px;
width: 62%;
}
}
.delivery {
@ -185,7 +183,7 @@ color: #333333;
font-size: 18px;
font-weight: bold;
}
.rc-bottom{
.rc-bottom {
display: none;
}
}
@ -215,7 +213,6 @@ color: #333333;
}
}
.rc-merchandise {
width: 100%;
margin-top: 32px;
@ -241,7 +238,6 @@ color: #333333;
font-size: 14px;
color: #333333;
}
}
li:last-child {
@ -253,25 +249,23 @@ color: #333333;
}
}
.ts-right-arr {
line-height:1rem;
height:1.5rem;
line-height: 1rem;
height: 1.5rem;
}
}
.rc-payment{
.rc-payment {
width: 100%;
margin-top: 32px;
.u-trackingnumber{
.u-trackingnumber {
display: flex;
align-items: center;
i {
font-size: 14px;
font-style: normal;
margin-right: 16px;
}
img{
img {
width: 8px;
height: 16px;
}
@ -296,27 +290,23 @@ color: #333333;
font-size: 14px;
color: #333333;
}
}
}
}
}
}
//pc端
@media screen and (min-width: 768px) and (max-width: 1920px) {
.rc-main {
width: 92%;
margin: 0 auto;
.rc-userbottomm{
.rc-userbottomm {
display: none;
}
.rc-border{
.rc-border {
width: 100%;
border-bottom: 1px solid #D7D7D7;
border-bottom: 1px solid #d7d7d7;
margin-top: 32px;
}
.rc-receiving {
@ -326,7 +316,7 @@ color: #333333;
flex-direction: column;
em {
font-style: normal;
color: #E1001A;
color: #e1001a;
font-size: 26px;
}
span {
@ -342,17 +332,17 @@ color: #333333;
height: 140px;
display: flex;
justify-content: center;
.viewdetails{
.viewdetails {
display: flex;
align-items: center;
justify-content: flex-end;
span{
color:#444444;
span {
color: #444444;
font-size: 18px;
display: block;
margin-right: 8px;
}
img{
img {
width: 8px;
height: 16px;
}
@ -432,10 +422,10 @@ color: #333333;
}
.rc-right {
.rc-bottomm{
.rc-bottomm {
display: none;
}
.rc-usercenter{
.rc-usercenter {
display: flex;
justify-content: center;
flex-direction: column;
@ -453,8 +443,6 @@ color: #333333;
width: 100%;
margin-left: 16px;
}
.rc-userright {
display: flex;
@ -475,7 +463,7 @@ color: #333333;
align-items: center;
margin-left: 119px;
span {
color: #E1001A;
color: #e1001a;
font-size: 20px;
}
i {
@ -504,9 +492,7 @@ color: #333333;
font-weight: bold;
font-size: 14px;
}
}
}
}
@ -524,7 +510,6 @@ color: #333333;
i {
font-style: normal;
color: #666666;
}
li {
list-style: none;
@ -533,7 +518,6 @@ color: #333333;
justify-content: space-between;
span {
color: #333333;
}
}
li:last-child {
@ -546,20 +530,18 @@ color: #333333;
}
}
.rc-payment{
.rc-payment {
width: 100%;
margin-top: 80px;
.u-trackingnumber{
.u-trackingnumber {
display: flex;
align-items: center;
i {
font-size: 18px;
font-style: normal;
margin-right: 16px;
}
img{
img {
width: 8px;
height: 16px;
}
@ -575,7 +557,6 @@ color: #333333;
font-style: normal;
color: #666666;
display: block;
}
li {
list-style: none;
@ -583,54 +564,45 @@ color: #333333;
display: flex;
justify-content: space-between;
span {
color: #333333;
}
}
}
}
.rc-foot{
.rc-foot {
display: flex;
flex-direction: column;
.rc-foo{
.rc-foo {
display: flex;
justify-content: flex-end;
flex-direction: column;
align-items: self-end;
i{
i {
font-style: normal;
color:#333333;
color: #333333;
font-size: 20px;
margin-right: 20px;
}
em{
em {
font-style: normal;
color: #E1001A;
color: #e1001a;
font-size: 26px;
}
span{
span {
display: block;
width: 164px;
margin-top: 36px;
background: #E2001A;
background: #e2001a;
line-height: 48px;
text-align: center;
color: white;
font-size: 16px;
height: 48px;
border-radius: 30px;
}
height: 48px;
border-radius: 30px;
}
}
}
}
}

View File

@ -1,22 +1,22 @@
ul li ol li em strong i {
list-style: none;
font-style: normal;
}
.rc-main{
}
.rc-main {
margin: 0;
padding: 0;
}
}
.ts-button-container {
.ts-button-container {
cursor: pointer;
display:flex;
flex-direction:row;
}
//手机端
display: flex;
flex-direction: row;
}
//手机端
@media screen and (max-width: 768px) {
.online{
.online {
margin: 0;
&.bold{
&.bold {
height: 0.5rem;
}
}
@ -39,7 +39,6 @@ ul li ol li em strong i {
margin-left: 1.125rem;
width: 62%;
margin-top: 0.5rem;
}
}
.ts-button-container {
@ -53,7 +52,7 @@ ul li ol li em strong i {
flex-direction: column;
margin: 1rem 1.25rem;
.to-delivery {
img{
img {
width: 1rem;
height: 1rem;
object-fit: contain;
@ -87,7 +86,7 @@ ul li ol li em strong i {
}
}
//地址列表
.mypersonal{
.mypersonal {
.my-delivery {
display: flex;
align-items: center;
@ -102,12 +101,12 @@ ul li ol li em strong i {
display: block;
font-size: 0.87rem;
color: #333333;
margin-left: .5rem;
margin-left: 0.5rem;
}
}
.per-delivery {
span {
font-size:0.875rem;
font-size: 0.875rem;
color: #666666;
display: block;
margin-top: 0.43rem;
@ -115,17 +114,16 @@ ul li ol li em strong i {
}
}
.rc-main {
.rc-userbottom{
.rc-userbottom {
display: none;
}
.viewdetails{
.viewdetails {
display: none;
}
.rc-foo{
.rc-foo {
display: none;
}
.rc-usermain {
display: flex;
.rc-image {
@ -183,7 +181,7 @@ ul li ol li em strong i {
font-size: 18px;
font-weight: bold;
}
.rc-bottom{
.rc-bottom {
display: none;
}
}
@ -213,7 +211,6 @@ ul li ol li em strong i {
}
}
.rc-merchandise {
width: 100%;
margin-top: 24px;
@ -240,7 +237,6 @@ ul li ol li em strong i {
font-size: 14px;
color: #333333;
}
}
li:last-child {
@ -251,27 +247,25 @@ ul li ol li em strong i {
}
}
}
.useruantity{
.useruantity {
padding-right: 20px;
}
}
.rc-payment{
.rc-payment {
padding-right: 0.7rem;
padding-left: 0.7rem;
width: 100%;
margin-top: 32px;
.u-trackingnumber{
.u-trackingnumber {
display: flex;
align-items: center;
i {
font-size: 14px;
font-style: normal;
margin-right: 16px;
}
img{
img {
width: 8px;
height: 16px;
}
@ -296,25 +290,19 @@ ul li ol li em strong i {
font-size: 14px;
color: #333333;
}
}
}
}
}
}
//pc端
@media screen and (min-width: 769px){
.ts-button-container{
.ts-standard-btn{
&:first-child{
margin-right:1rem;
@media screen and (min-width: 769px) {
.ts-button-container {
.ts-standard-btn {
&:first-child {
margin-right: 1rem;
}
}
}
@ -325,7 +313,7 @@ ul li ol li em strong i {
margin: 1rem 1.25rem;
.to-delivery {
margin-top: 20px;
img{
img {
width: 24px;
height: 24px;
object-fit: contain;
@ -361,14 +349,19 @@ ul li ol li em strong i {
}
.rc-main {
margin: 0 auto;
margin-top: 90px;
// margin-top: 90px;
margin-top: 0;
.rc-userbottomm{
.notop{
margin-top: 0;
}
.rc-userbottomm {
display: none;
}
.rc-border{
.rc-border {
width: 100%;
border-bottom: 1px solid #D7D7D7;
border-bottom: 1px solid #d7d7d7;
margin-top: 32px;
}
.rc-receiving {
@ -378,7 +371,7 @@ ul li ol li em strong i {
flex-direction: column;
em {
font-style: normal;
color: #E1001A;
color: #e1001a;
font-size: 26px;
}
span {
@ -393,17 +386,17 @@ ul li ol li em strong i {
flex-direction: column;
display: flex;
justify-content: center;
.viewdetails{
.viewdetails {
display: flex;
align-items: center;
justify-content: flex-end;
span{
color:#444444;
span {
color: #444444;
font-size: 18px;
display: block;
margin-right: 8px;
}
img{
img {
width: 8px;
height: 16px;
}
@ -484,10 +477,10 @@ ul li ol li em strong i {
}
.rc-right {
.rc-bottomm{
.rc-bottomm {
display: none;
}
.rc-usercenter{
.rc-usercenter {
display: flex;
justify-content: center;
flex-direction: column;
@ -498,7 +491,7 @@ ul li ol li em strong i {
font-weight: bold;
margin-top: 17px;
color: #e1001a;
width:16rem;
width: 16rem;
}
}
@ -507,7 +500,6 @@ ul li ol li em strong i {
width: 100%;
margin-left: 16px;
justify-content: end;
}
.rc-userright {
display: flex;
@ -528,7 +520,7 @@ ul li ol li em strong i {
align-items: center;
margin-left: 119px;
span {
color: #E1001A;
color: #e1001a;
font-size: 20px;
}
i {
@ -557,9 +549,7 @@ ul li ol li em strong i {
font-weight: bold;
font-size: 14px;
}
}
}
}
@ -577,7 +567,6 @@ ul li ol li em strong i {
i {
font-style: normal;
color: #666666;
}
li {
list-style: none;
@ -586,7 +575,6 @@ ul li ol li em strong i {
justify-content: space-between;
span {
color: #333333;
}
}
li:last-child {
@ -599,20 +587,18 @@ ul li ol li em strong i {
}
}
.rc-payment{
.rc-payment {
width: 100%;
margin-top: 80px;
.u-trackingnumber{
.u-trackingnumber {
display: flex;
align-items: center;
i {
font-size: 18px;
font-style: normal;
margin-right: 16px;
}
img{
img {
width: 8px;
height: 16px;
}
@ -628,7 +614,6 @@ ul li ol li em strong i {
font-style: normal;
color: #666666;
display: block;
}
li {
list-style: none;
@ -636,42 +621,34 @@ ul li ol li em strong i {
display: flex;
justify-content: space-between;
span {
color: #333333;
}
}
}
}
.rc-foot{
.rc-foot {
display: flex;
flex-direction: column;
.rc-foo{
.online{
margin-bottom: 20px;
}
.rc-foo {
display: flex;
justify-content: flex-end;
flex-direction: column;
align-items: self-end;
i{
i {
font-style: normal;
color:#333333;
color: #333333;
font-size: 20px;
margin-right: 20px;
}
em{
em {
font-style: normal;
color: #E1001A;
color: #e1001a;
font-size: 26px;
}
}
}
}
}

View File

@ -3,7 +3,7 @@
<el-breadcrumb separator-class="el-icon-arrow-right">
<el-breadcrumb-item to="/" >{{ this.homepageName }}</el-breadcrumb-item>
<el-breadcrumb-item :to=item.path v-for="(item, index) in displayData"
<el-breadcrumb-item :to="{ path : item.path , query : item.query || {} }" v-for="(item, index) in displayData"
:key="index">{{ item.title }}</el-breadcrumb-item>
</el-breadcrumb>
</div>
@ -29,7 +29,9 @@ export default {
'/personal/useraddress/':'我的订单',
'/myorder/userrecord/':'购物车',
'/useraddress/openaddress/':'收货地址',
'/personal/discount/':'优惠券'
'/personal/discount/':'优惠券',
'/productdetails/producted' : '产品详情',
'/personal/useraddress' : '我的订单'
},
};
},
@ -55,7 +57,7 @@ export default {
if(this.crumbs && this.crumbs.length>0)
{
this.crumbs.forEach(function(ele,index){
let displayObj= {path:'',title:''};
let displayObj= {path:'',title:'',query : {}};
if(ele.path) {
displayObj.path = ele.path;
for(let path in _self.nameMapping) {
@ -68,6 +70,10 @@ export default {
if(ele.title) {
displayObj.title = ele.title;
}
if(ele.query) {
displayObj.query = ele.query;
}
_self.displayData.push(displayObj);
});
}

View File

@ -8,6 +8,7 @@
let baseUrl = 'http://47.96.75.242:10086/royalcanin/royalcanin/'
if (process.env.NODE_ENV === 'development') {
baseUrl = 'http://47.96.75.242:10086/royalcanin/royalcanin/';
// baseUrl = 'http://192.168.10.127:10086/royalcanin/royalcanin/';
} else if (process.env.NODE_ENV === 'production') {
baseUrl = 'https://shop.royalcanin.com.cn/royalcanin/royalcanin/royalcanin/';
}

View File

@ -35,7 +35,7 @@
</div>
<div class="list" v-for="(item, index) in cartData" :key="index">
<div class="list-left">
<label class="check-label"><input type="checkbox" v-model="item.checked" /></label>
<label class="check-label"><input type="checkbox" v-model="item.checked" @change="checkRadio(item.checked)" /></label>
<div class="product">
<div class="product-img"><img :src="item.productImg" alt="" /></div>
<div class="right">
@ -49,7 +49,7 @@
<li>
<div class="rc-jia">
<img src="../../assets/image/userjian.png" alt="" @click="sub(item.buyCount, index)" />
<input type="text" v-model="item.buyCount" />
<input type="text" v-model="item.buyCount" @blur="saveCartNumber(item)" />
<img src="../../assets/image/userjia.png" alt="" @click="plus(item.buyCount, index)" />
</div>
</li>
@ -61,9 +61,12 @@
<div class="rc-footera">
<div class="rc-foote">
<div class="rc-shop">
<label style="visibility: hidden;">
<input type="checkbox" v-model="checkAll" />
全选
<!-- style="visibility: hidden;" -->
<label class="check-all-main">
<!-- <el-checkbox v-model="checkAllFlag">备选项</el-checkbox> -->
<input type="checkbox" v-model="checkAllFlag" @change="toggleCheckAll" />
<span>全选</span>
</label>
</div>
<div class="rc-delete">
@ -99,8 +102,8 @@
import Myheader from '~/components/header.vue';
import MyFooter from '~/components/rc-footer.vue';
import tabs from '@/components/tabs.vue';
import { mapMutations,mapState } from 'vuex';
import { isexistCart, generateOrderWX, deleteCart } from '../../ajax/getData';
import { mapMutations, mapState } from 'vuex';
import { isexistCart, generateOrderWX, deleteCart,changeCartNumber } from '../../ajax/getData';
export default {
middleware: 'metaTitle',
meta: { title: '购物车' },
@ -167,15 +170,14 @@ export default {
};
},
mounted() {
if(this.userInfo && this.loginState){
if (this.userInfo && this.loginState) {
this.carmessage();
// this.checkIsLogin();
}
},
watch: {
userInfo(newVal){
if(newVal && this.loginState){
userInfo(newVal) {
if (newVal && this.loginState) {
this.carmessage();
}
}
@ -186,14 +188,31 @@ export default {
MyFooter
},
methods: {
/* 监听全选功能 */
async toggleCheckAll(e){
for (var i = 0; i < this.cartData.length; i++) {
this.$set(this.cartData[i],'checked',this.checkAllFlag);
}
},
/* 监听单选 */
async checkRadio(state){
/* 判断是否全选 */
let checkCart = this.cartData.filter(val=>{
return val.checked;
});
this.checkAllFlag = checkCart.length == this.cartData.length;
},
//
...mapMutations(['checkIsLogin']),
async carmessage() {
let user = this.userInfo;
console.log(user);
this.userid = user.id;
let data = await isexistCart(user.id);
console.log(data,'datadata');
for (var i = 0; i < data.length; i++) {
let item = data[i];
data.startBuyCount = item.buyCount;
}
this.cartData = data;
// this.goldmedal = data;
},
@ -280,6 +299,7 @@ export default {
}
this.cartData[index].buyCount = parseInt(this.cartData[index].buyCount) + 1;
this.saveCartNumber(this.cartData[index])
},
//
sub(num, index) {
@ -288,6 +308,26 @@ export default {
} else {
this.cartData[index].buyCount = parseInt(this.cartData[index].buyCount) - 1;
}
this.saveCartNumber(this.cartData[index])
},
/* 保存购物车数量 */
async saveCartNumber(cartInfo){
if(!cartInfo.buyCount || cartInfo.buyCount <= 0){
return this.$messageToast('数量不正确','error');
}
if (cartInfo.buyCount >= cartInfo.leftAllotment) {
cartInfo.buyCount = cartInfo.startBuyCount;
return this.$messageToast('已达到本品最大购买上限','error');
}
let { code } = await changeCartNumber({
buyCount : cartInfo.buyCount,
id : cartInfo.id,
});
if(code == 1){
cartInfo.startBuyCount = cartInfo.buyCount;
}
},
//
@ -354,7 +394,8 @@ export default {
this.$router.push({
path: '/personal/settlement',
query: {
list: JSON.stringify(list)
list: JSON.stringify(list),
type: 'cart'
}
// params: { test:'222'},
});
@ -420,8 +461,8 @@ export default {
return this.cartData.filter(item => item.checked == true).length;
},
...mapState({
userInfo : state => state.user.userInfo,
loginState : state => state.login.loginState,
userInfo: state => state.user.userInfo,
loginState: state => state.login.loginState
})
}
};
@ -452,6 +493,15 @@ export default {
display: block;
}
.check-all-main{
display: flex;
justify-content: center;
align-items: center;
span{
margin-left: 10px;
}
}
span {
font-style: normal;
font-size: 18px;

View File

@ -2,8 +2,11 @@
<div class="user-main">
<Myheader></Myheader>
<div class="rc-top"></div>
<div class="rc-main" v-for="(item, index) in goldmedal" :key="item.id">
<div class="online bold"></div>
<tabs :crumbs="crumbs"></tabs>
<!-- <div class="online bold notop"></div> -->
<!-- <div class="rc-top"></div> -->
<div class="rc-max-width--xl rc-main" v-for="(item, index) in goldmedal" :key="item.id">
<div class="online bold notop"></div>
<div class="rc-receiving useruantity">
<em>{{ item.status == '0' ? '待付款' : item.status == '1' ? '待收货' : item.status == '2' ? '已完成' : item.status == '3' ? '已取消' : '异常订单' }}</em>
<span>{{ orderstatus }}</span>
@ -81,7 +84,7 @@
</ul>
</div>
</div>
<div class="online bold "></div>
<div class="rc-payment">
<div class="rc-payment">
<ul>
@ -113,6 +116,7 @@
<div class="rc-foot">
<div class="rc-foo">
<div class="online bold "></div>
<div style="">
<i>合计金额:</i>
<em>{{ usersalesAmount }}</em>
@ -146,6 +150,7 @@
<script>
import Myheader from '~/components/header.vue';
import tabs from '@/components/tabs.vue';
import { mapMutations, mapState } from 'vuex';
import MyFooter from '~/components/rc-footer.vue';
import Vue from 'vue';
@ -194,7 +199,15 @@ export default {
paytypeText: '',
distribution: '快递',
catimage: require('../../assets/image/rc-left.png')
},
crumbs : [
{
path: '/personal/useraddress'
},
{
title : '订单详情'
}
]
};
},
methods: {
@ -405,7 +418,8 @@ export default {
},
components: {
Myheader,
MyFooter
MyFooter,
tabs
},
computed : {
...mapState({

View File

@ -428,11 +428,17 @@ ul li ol li em strong i {
flex-direction: column;
align-items: flex-end;
text-align: right;
.totalInfo{
display: flex;
justify-content: center;
align-items: center;
}
i {
font-style: normal;
color: #333333;
font-size: 20px;
font-size: 19px;
margin-right: 20px;
white-space: nowrap;
}
em {

View File

@ -2,6 +2,7 @@
<div class="settlement">
<Myheader></Myheader>
<div class="rc-top"></div>
<tabs :crumbs="crumbs"></tabs>
<div class="rc_contline"></div>
<div class="rc-main">
<div class="address-list">
@ -56,7 +57,9 @@
<li>
<span>活动促销:</span>
<i class="ts-right-arr ts-right-arr--two" @click="userget()">{{ isHasChose ? curCoupon.couponName : drawlist.length ? `${drawlist.length}张优惠券可选择` : '无优惠券' }}</i>
<i class="ts-right-arr ts-right-arr--two" @click="userget()">
{{ isHasChose ? curCoupon.couponName : drawlist.length ? `${drawlist.length}张优惠券可选择` : '无优惠券' }}
</i>
</li>
<li>
@ -75,14 +78,16 @@
<div class="rc-main">
<div class="rc-foot">
<div class="rc-foo">
<div>
<div class="rc-foo-left">
<div class="discountInfo" v-if="discountAmount">
<i>优惠金额:</i>
<em>{{ discountAmount }}</em>
</div>
<div class="totalInfo">
<i>合计金额:</i>
<em>{{ finalAmount }}</em>
</div>
</div>
<div style="font-weight: bold"><span @click="preJiesuan()">提交订单</span></div>
</div>
</div>
@ -143,10 +148,47 @@ import { userin, memberAddress, generateOrderWX, getdraw } from '../../ajax/getD
import util from '@/ajax/util';
import tabs from '@/components/tabs.vue';
import myAddress from '~/components/address.vue';
import { mapMutations,mapState } from 'vuex';
import { mapMutations, mapState } from 'vuex';
import itemMixin from '../../../smart-admin-web/src/components/main/components/side-menu/item-mixin';
export default {
middleware: 'metaTitle',
asyncData({ app, $router }) {
const { type = 'cart', list = [{}], pathQuery = {} } = app.router.history.current.query;
let crumbs = [],
product = typeof list == 'string' ? JSON.parse(list)[0] : list[0],
query = typeof pathQuery == 'string' ? JSON.parse(pathQuery) : pathQuery;
/* 处理面包屑 */
switch (type) {
case 'cart': //
crumbs = [
{
path: '/myorder/userrecord/'
},
{
path: '/personal/settlement/'
}
];
break;
case 'product': //
crumbs = [
{
path: '/productdetails/producted',
title: product.productName,
query
},
{
path: '/personal/settlement/'
}
];
break;
default:
break;
}
console.log(crumbs, 'crumbs');
return {
crumbs
};
},
meta: { title: '订单结算' },
data() {
return {
@ -162,7 +204,7 @@ export default {
usercolor: { color: '#e1001a' },
userimage: require('../../assets/image/unused.png'),
curCoupon: { couponName: '未选择可用优惠券' },
isHasChose : false, //
isHasChose: false, //
drawlist: [],
dialogInfo1: false,
goldmedal: [],
@ -212,8 +254,8 @@ export default {
},
//
...mapState({
userInfo : state => state.user.userInfo,
loginState : state => state.login.loginState,
userInfo: state => state.user.userInfo,
loginState: state => state.login.loginState
})
},
methods: {
@ -551,7 +593,9 @@ export default {
if (!userInfo) {
this.$router.push({
path: '/userlogin/login',
query: {}
query: {
}
});
return;
}
@ -653,7 +697,8 @@ export default {
this.$router.push({
path: '/personal/userpay',
query: {
userPayData: JSON.stringify(userPayData)
userPayData: JSON.stringify(userPayData),
pathQuery : JSON.stringify(this.$route.query),
}
});
} else {
@ -667,7 +712,7 @@ export default {
let data = await userin(orderNumber);
},
/* 初始化数据 */
initData(){
initData() {
this.getAddressList();
let user = this.userInfo;
let memberId = '';
@ -694,12 +739,11 @@ export default {
},
mounted() {
this.goldmedal = JSON.parse(this.$route.query.list);
if(this.userInfo && this.loginState){
if (this.userInfo && this.loginState) {
this.initData();
}
// this.checkIsLogin();
// this.addressstype = this.$route.query.stype;
// this.orderNumber = this.$route.query.orderNumber;
// this.canceldanhao(this.orderNumber);
@ -707,8 +751,8 @@ export default {
// this.$refs.rccolor.style.background = "gray";
},
watch: {
userInfo(newVal){
if(newVal && this.loginState){
userInfo(newVal) {
if (newVal && this.loginState) {
this.initData();
}
}

View File

@ -102,7 +102,6 @@
<div class="online bold"></div>
</div>
</div>
<el-dialog :visible.sync="showPaytypeWarning" :close-on-click-modal="false">
<div class="ts-warning-popup">
@ -111,6 +110,7 @@
<h3>温馨提示</h3>
<span class="">{{ paytypeWarning.message }}</span>
</div>
<div class="qrcode rc-center"><vue-qr :text="qrtext" :size="200"></vue-qr></div>
</div>
</el-dialog>
<MyFooter></MyFooter>
@ -122,8 +122,9 @@ import Myheader from '~/components/header.vue';
import MyFooter from '~/components/rc-footer.vue';
import tabs from '~/components/tabs.vue';
import util from '@/ajax/util';
import { customerorders, userindent, canceldanhao, repayOrde } from '../../ajax/getData';
import { customerorders, userindent, canceldanhao, repayOrde, generateOrderWX } from '../../ajax/getData';
import { mapMutations, mapState } from 'vuex';
import vueQr from 'vue-qr';
export default {
data() {
return {
@ -195,7 +196,8 @@ export default {
userprice: '',
catimage: ''
}
]
],
qrtext : '', //
};
},
computed: {
@ -220,7 +222,8 @@ export default {
components: {
Myheader,
MyFooter,
tabs
tabs,
vueQr
},
methods: {
...mapMutations(['changemessage', 'checkIsLogin']),
@ -252,13 +255,43 @@ export default {
this.useralllist[y] = {};
}
if (!this.goldmedal[y].orderDetailList) continue;
// let item = {
// ...this.useralllist[y],
// ...this.goldmedal[y],
// phoneNumber : this.goldmedal[y].addressPhoneNumber,
// lengthnum : this.goldmedal[y].orderDetailList.length
// }
// this.useralllist[y] = item;
this.useralllist[y].orderNumber = this.goldmedal[y].orderNumber;
this.useralllist[y].status = this.goldmedal[y].status;
this.useralllist[y].addressUserName = this.goldmedal[y].addressUserName;
this.useralllist[y].phoneNumber = this.goldmedal[y].addressPhoneNumber;
this.useralllist[y].paytype = this.goldmedal[y].paytype;
this.useralllist[y].salesAmount = this.goldmedal[y].salesAmount;
this.useralllist[y].lengthnum = this.goldmedal[y].orderDetailList.length;
this.useralllist[y].paytype = this.goldmedal[y].paytype;
let item = this.goldmedal[y];
let orderDetail = item.orderDetailList[0];
this.useralllist[y].payInfo = [
{
basePoint: item.item,
productName: orderDetail.productName,
buyCount: orderDetail.pcs,
productCode: orderDetail.productCode,
payAmount: orderDetail.ecPrice,
memberId: this.userInfo.id,
phoneNumber: item.phoneNumber,
orderAddress: {
addressPhoneNumber: item.addressPhoneNumber,
addressUserName: item.addressUserName,
addressProvinceName: item.addressProvinceName,
addressCityName: item.addressCityName,
addressCountyName:item.addressCountyName,
addressDetailInfo: item.addressDetailInfo,
}
}
]
}
if (this.userstype == 1) {
@ -271,9 +304,10 @@ export default {
this.useralllist = this.receiving;
}
/* 过滤空的数据 */
let filterArr = this.useralllist.filter(val=>{
let filterArr = this.useralllist.filter(val => {
return val != undefined;
});
console.log(this.useralllist,'2222');
this.useralllist = filterArr;
},
//
@ -392,14 +426,59 @@ export default {
this.useralllist[i].phoneNumber = this.goldmedal[i].phoneNumber;
this.useralllist[i].salesAmount = this.goldmedal[i].salesAmount;
this.useralllist[i].lengthnum = this.goldmedal[i].orderDetailList.length;
let item = this.goldmedal[i];
let orderDetail = item.orderDetailList[0];
this.useralllist[y].payInfo = [
{
basePoint: item.item,
productName: orderDetail.productName,
buyCount: orderDetail.pcs,
productCode: orderDetail.productCode,
payAmount: orderDetail.ecPrice,
memberId: this.userInfo.id,
phoneNumber: item.phoneNumber,
orderAddress: {
addressPhoneNumber: item.addressPhoneNumber,
addressUserName: item.addressUserName,
addressProvinceName: item.addressProvinceName,
addressCityName: item.addressCityName,
addressCountyName:item.addressCountyName,
addressDetailInfo: item.addressDetailInfo,
}
console.log(list);
}
]
this.useralllist = list.filter(val=>{
}
this.useralllist = list.filter(val => {
return val != undefined;
});;
});
},
userfind(item) {
async userfind(item) {
// let params = [
// {
// basePoint: 0,
// productName: '',
// buyCount: 1,
// productCode: '2003004003',
// payAmount: 90,
// memberId: 886750,
// phoneNumber: '15766132405',
// orderAddress: {
// addressPhoneNumber: '15766132404',
// addressUserName: '',
// addressProvinceName: '',
// addressCityName: '',
// addressCountyName: '怀',
// addressDetailInfo: '12123134444'
// }
// }
// ];
// console.log(item,'222');
// return false;
let { msg } = await generateOrderWX(item.payInfo, 1);
this.qrtext = msg;
// return false;
this.paytypeWarning = this.util.checkPaytypeValidated(item.paytype);
this.showPaytypeWarning = !this.paytypeWarning.result;
let user = this.userInfo;

View File

@ -1,7 +1,9 @@
<template>
<div class="page_modules">
<Myheader></Myheader>
<div class="rc-top rc-md-up"></div>
<div class="rc-top"></div>
<tabs :crumbs="crumbs"></tabs>
<div class="rc_contline"></div>
<div class="cont_modules">
<el-row class="order_info">
<el-col :span="6" class="ph_hidden">
@ -123,10 +125,33 @@ export default {
qrtext: '',
userData: '',
disableAlipay: true,
disableQrcode: false
disableQrcode: false,
crumbs: [
{
path: '/personal/settlement/'
},
{
title : '订单支付'
},
]
};
},
asyncData({app}){
const { type = 'cart', list = [{}], pathQuery = {} } = app.router.history.current.query;
let query = typeof pathQuery == 'string' ? JSON.parse(pathQuery) : pathQuery;
return {
crumbs : [
{
path: '/personal/settlement/',
query,
},
{
title : '订单支付'
},
]
}
},
created() {},
mounted() {
let isWx = this.util.isWX();
@ -175,7 +200,7 @@ export default {
this.checkIsLogin();
// let user = this.$store.state.userInfo;
let memberId = '';
if (this.userInfo){
if (this.userInfo) {
memberId = this.userInfo.id;
}
_hmt.push([
@ -257,7 +282,7 @@ export default {
this.dialogSuccess = true;
// let user = this.$store.state.userInfo;
let memberId = '';
if(this.userInfo){
if (this.userInfo) {
memberId = this.userInfo.id;
}
// if (user) memberId = user.data.id;
@ -287,13 +312,22 @@ export default {
},
computed: {
...mapState({
userInfo : state => state.user.userInfo,
userInfo: state => state.user.userInfo
})
}
};
</script>
<style lang="less" scoped>
.rc-top {
margin-top: 65px;
}
@media screen and (max-width: 768px){
.rc-top {
margin-top: 15px;
}
}
.sucess_img {
width: 96px;
height: 96px;

View File

@ -2,7 +2,6 @@
<div>
<Myheader></Myheader>
<div class="user">
<div class="rc-top"></div>
<tabs :crumbs="crumbs"></tabs>
<div class="online rc-margin--none" id="fixed-catbar-seperator"></div>
@ -674,7 +673,6 @@ export default {
},
usertanchu(item, orderm) {
let user = this.userInfo;
console.log(user,'user');
if (!user) {
this.dialogInfo2 = true;
return;
@ -726,11 +724,12 @@ export default {
product_amount: this.sales_num * this.curItem.ecPrice
}
]);
this.$router.push({
path: '/personal/settlement',
query: {
list: JSON.stringify(list)
list: JSON.stringify(list),
type : 'product',
pathQuery : JSON.stringify(this.$route.query),
}
});
}