mirror of
https://gitee.com/lab1024/smart-admin.git
synced 2025-10-03 18:56:39 +08:00
Merge remote-tracking branch 'origin/sit-Carl-V3' into sit-Carl-V3
This commit is contained in:
commit
abf53cae07
@ -31,13 +31,13 @@ export const courselist = (offset, courseId, type, sort, selectScreen = []) => {
|
|||||||
courseId,
|
courseId,
|
||||||
selectScreenStr
|
selectScreenStr
|
||||||
}
|
}
|
||||||
return fetch('/api/courselist', data)
|
return fetch( '/api/courselist', data)
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 获取课程详情
|
* 获取课程详情
|
||||||
*/
|
*/
|
||||||
export const getDetail = (id) => {
|
export const getDetail = (id) => {
|
||||||
fetch('/api/courseDetail/index/' + id)
|
fetch( '/api/courseDetail/index/' + id)
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -56,33 +56,41 @@ export const getleckCourse = (name, offset) => {
|
|||||||
* 加入购物车
|
* 加入购物车
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export const postCourseId = (productCode, buyCount, memberId, mobile, productImg, productName, productPrice, specifications, leftAllotment) => {
|
export const postCourseId = (productCode, buyCount, memberId, mobile, productImg, productName, productPrice, specifications, leftAllotment, basePiont) => {
|
||||||
var data = {
|
var data = {
|
||||||
buyCount: buyCount,
|
buyCount:buyCount,
|
||||||
memberId: memberId,
|
memberId: memberId,
|
||||||
mobile: mobile,
|
mobile:mobile,
|
||||||
productCode: productCode,
|
productCode:productCode,
|
||||||
productImg: productImg,
|
productImg: productImg,
|
||||||
productName: productName,
|
productName: productName,
|
||||||
productPrice: productPrice,
|
productPrice: productPrice,
|
||||||
specifications: specifications,
|
specifications: specifications,
|
||||||
leftAllotment: leftAllotment
|
leftAllotment: leftAllotment,
|
||||||
|
basePiont: basePiont
|
||||||
}
|
}
|
||||||
return fetch('/insertCartProductInfo', data, 'POST')
|
return fetch('/insertCartProductInfo', data,'POST')
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 是否存在购物车
|
* 是否存在购物车
|
||||||
*/
|
*/
|
||||||
export const isexistCart = (id, pet, address) => {
|
export const isexistCart = (id, pet,address) => {
|
||||||
|
var data = { }
|
||||||
|
return fetch('getCartProductInfo?memberId='+id,data,'POST')
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 支付监听
|
||||||
|
*/
|
||||||
|
export const monitorOrderNotify = (OrderNumber) => {
|
||||||
var data = {}
|
var data = {}
|
||||||
return fetch('getCartProductInfo?memberId=' + id, data, 'POST')
|
return fetch('monitorOrderNotify?OrderNumber=' + OrderNumber, data, 'POST')
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除购物车
|
* 删除购物车
|
||||||
*/
|
*/
|
||||||
export const deleteCart = ( productCode) => {
|
export const deleteCart = ( productCode) => {
|
||||||
debugger;
|
|
||||||
var data = {
|
var data = {
|
||||||
productCode
|
productCode
|
||||||
}
|
}
|
||||||
@ -92,7 +100,7 @@ export const deleteCart = ( productCode) => {
|
|||||||
* 购物车批量提交
|
* 购物车批量提交
|
||||||
*/
|
*/
|
||||||
export const mostAddClass = (id) => {
|
export const mostAddClass = (id) => {
|
||||||
return fetch('/api/mostAddClass/', { id })
|
return fetch('/api/mostAddClass/', {id})
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 删除购物车
|
* 删除购物车
|
||||||
@ -108,68 +116,68 @@ export const mostAddClass = (id) => {
|
|||||||
/**
|
/**
|
||||||
* 发送验证码
|
* 发送验证码
|
||||||
*/
|
*/
|
||||||
export const sendMsg = (mobile, pet, address) => {
|
export const sendMsg = (mobile, pet,address) => {
|
||||||
var data = {
|
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 = {
|
var data = {
|
||||||
msgNum: msgNum,
|
msgNum:msgNum,
|
||||||
tamp: tamp,
|
tamp:tamp,
|
||||||
hash: hash
|
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 = {
|
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 = {
|
var data = {
|
||||||
id: '',
|
id:'',
|
||||||
mobile: mobile,
|
mobile:mobile,
|
||||||
}
|
}
|
||||||
return fetch('member?type=get', data, 'POST')
|
return fetch('member?type=get', data, 'POST' )
|
||||||
}
|
}
|
||||||
|
|
||||||
//注册
|
//注册
|
||||||
export const useredit = (mobile, pet, address) => {
|
export const useredit = (mobile, pet,address) => {
|
||||||
var data = {
|
var data = {
|
||||||
mobile: mobile,
|
mobile:mobile,
|
||||||
memberName: '',
|
memberName:'',
|
||||||
realName: '',
|
realName:'',
|
||||||
gender: '',
|
gender:'',
|
||||||
email: '',
|
email:'',
|
||||||
openId: '',
|
openId:'',
|
||||||
unionId: '',
|
unionId:'',
|
||||||
birthday: '',
|
birthday:'',
|
||||||
provinceId: '',
|
provinceId:'',
|
||||||
cityId: '',
|
cityId:'',
|
||||||
districtId: '',
|
districtId:'',
|
||||||
storeCode: '',
|
storeCode:'',
|
||||||
remark: '',
|
remark:'',
|
||||||
memberMark: '',
|
memberMark:'',
|
||||||
|
|
||||||
remark: ''
|
remark:''
|
||||||
}
|
}
|
||||||
return fetch('member?type=add', data, 'POST')
|
return fetch('member?type=add', data, 'POST' )
|
||||||
}
|
}
|
||||||
//查询标品全部信息
|
//查询标品全部信息
|
||||||
// export const userquery = (mobile, pet,address) => {
|
// export const userquery = (mobile, pet,address) => {
|
||||||
// var data = {
|
// var data = {
|
||||||
// channelId:"15",
|
// channelId:"15",
|
||||||
@ -179,14 +187,14 @@ export const useredit = (mobile, pet, address) => {
|
|||||||
// return fetch('h5/brand/query', data, 'POST' )
|
// return fetch('h5/brand/query', data, 'POST' )
|
||||||
// }
|
// }
|
||||||
//点击商品全部信息
|
//点击商品全部信息
|
||||||
export const userquery = (stype,) => {
|
export const userquery = (stype, ) => {
|
||||||
|
|
||||||
console.log(stype);
|
console.log(stype);
|
||||||
var data = {
|
var data = {
|
||||||
goodsName: stype
|
goodsName:stype
|
||||||
|
|
||||||
}
|
}
|
||||||
return fetch('goods?petType=' + stype, data, 'POST')
|
return fetch('goods?petType='+stype, data, 'POST' )
|
||||||
}
|
}
|
||||||
//处方信息
|
//处方信息
|
||||||
export const userque = (goodsName, curPage,curRow) => {
|
export const userque = (goodsName, curPage,curRow) => {
|
||||||
@ -199,62 +207,62 @@ export const userque = (goodsName, curPage,curRow) => {
|
|||||||
queryTail = '?goodsName='+goodsName;
|
queryTail = '?goodsName='+goodsName;
|
||||||
var data = {
|
var data = {
|
||||||
}
|
}
|
||||||
return fetch('goods' + queryTail, data, 'POST')
|
return fetch('goods'+queryTail, data, 'POST' )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//标品全部信息
|
//标品全部信息
|
||||||
export const biaomessage = (stype, name, curPage, curRow) => {
|
export const biaomessage = (stype,name,curPage,curRow) => {
|
||||||
if (!curPage)
|
if(!curPage)
|
||||||
curPage = 1;
|
curPage=1;
|
||||||
if (!curRow)
|
if(!curRow)
|
||||||
curRow = 10;
|
curRow=10;
|
||||||
let queryTail = '&page=' + curPage + '&rows=' + curRow;
|
let queryTail='&page='+curPage+'&rows='+curRow;
|
||||||
if (stype.length > 1) {
|
if(stype.length>1){
|
||||||
let list = {};
|
let list={};
|
||||||
stype.map(item => {
|
stype.map(item=>{
|
||||||
console.log(item);
|
console.log(item);
|
||||||
list = item
|
list=item
|
||||||
})
|
})
|
||||||
var str = "?";
|
var str = "?";
|
||||||
for (var key in list) {
|
for(var key in list){
|
||||||
str = str + key + "=" + list[key] + "&";
|
str = str + key + "=" + list[key] + "&";
|
||||||
}
|
}
|
||||||
stype = str.substr(0, str.length - 1);
|
stype = str.substr(0,str.length-1);
|
||||||
return fetch('product/query' + stype + queryTail, '', 'POST')
|
return fetch('product/query'+stype+queryTail, '', 'POST' )
|
||||||
} else {
|
}else{
|
||||||
return fetch('product/query?petType=' + stype + queryTail, '', 'POST')
|
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)
|
if(!curPage)
|
||||||
curPage = 1;
|
curPage=1;
|
||||||
if (!curRow)
|
if(!curRow)
|
||||||
curRow = 10;
|
curRow=10;
|
||||||
let queryTail = '&page=' + curPage + '&rows=' + curRow;
|
let queryTail='&page='+curPage+'&rows='+curRow;
|
||||||
console.log(stype);
|
console.log(stype);
|
||||||
let list = {};
|
let list={};
|
||||||
stype.map(item => {
|
stype.map(item=>{
|
||||||
console.log(item);
|
console.log(item);
|
||||||
list = item
|
list=item
|
||||||
})
|
})
|
||||||
var str = "&";
|
var str = "&";
|
||||||
for (var key in list) {
|
for(var key in list){
|
||||||
|
|
||||||
str = str + key + "=" + list[key] + "&";
|
str = str + key + "=" + list[key] + "&";
|
||||||
}
|
}
|
||||||
str = str.substr(0, str.length - 1);
|
str = str.substr(0,str.length-1);
|
||||||
var data = {
|
var data = {
|
||||||
page: 1,
|
page:1,
|
||||||
row: 10
|
row:10
|
||||||
}
|
}
|
||||||
|
|
||||||
return fetch('product/query?petType=' + usertype + str + queryTail, data, 'POST')
|
return fetch('product/query?petType='+usertype+str+queryTail, data, 'POST' )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -269,58 +277,58 @@ export const searchchanpin = (stype, usertype, curPage, curRow) => {
|
|||||||
|
|
||||||
|
|
||||||
//查询订单
|
//查询订单
|
||||||
export const userindent = (phoneNumber, orderNumber,) => {
|
export const userindent = (phoneNumber,orderNumber,) => {
|
||||||
var data = {
|
var data = {
|
||||||
phoneNumber: phoneNumber,
|
phoneNumber:phoneNumber,
|
||||||
orderNumber: orderNumber,
|
orderNumber:orderNumber,
|
||||||
}
|
}
|
||||||
return fetch('orderMaster/?type=query', data, 'POST')
|
return fetch('orderMaster/?type=query', data, 'POST' )
|
||||||
}
|
}
|
||||||
//查询订单详情
|
//查询订单详情
|
||||||
export const userin = (orderNumber,) => {
|
export const userin = (orderNumber,) => {
|
||||||
var data = {
|
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 = {
|
var data = {
|
||||||
phoneNumber: phoneNumber,
|
phoneNumber:phoneNumber,
|
||||||
orderNumber: orderNumber,
|
orderNumber:orderNumber,
|
||||||
|
|
||||||
}
|
}
|
||||||
return fetch('cancelOrder/', data, 'POST')
|
return fetch('cancelOrder/', data, 'POST' )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
export const biaomessa = (stype) => {
|
export const biaomessa = (stype) => {
|
||||||
console.log(stype);
|
console.log(stype);
|
||||||
var data = {
|
var data = {
|
||||||
name: stype,
|
name:stype,
|
||||||
page: 1,
|
page:1,
|
||||||
row: 10
|
row:10
|
||||||
}
|
}
|
||||||
return fetch('product/query', data, 'POST')
|
return fetch('product/query', data, 'POST' )
|
||||||
}
|
}
|
||||||
|
|
||||||
export const biaome = (usertype, stype, curPage, rows) => {
|
export const biaome = (usertype,stype,curPage,rows) => {
|
||||||
if (!curPage)
|
if(!curPage)
|
||||||
curPage = 1;
|
curPage=1;
|
||||||
if (!rows)
|
if(!rows)
|
||||||
rows = 10;
|
rows=10;
|
||||||
let queryTail = '&page=' + curPage + '&rows=' + rows;
|
let queryTail='&page='+curPage+'&rows='+rows;
|
||||||
let username = '&name=' + stype
|
let username='&name='+stype
|
||||||
console.log(stype);
|
console.log(stype);
|
||||||
var data = {
|
var data = {
|
||||||
name: stype,
|
name:stype,
|
||||||
rows: 10,
|
rows:10,
|
||||||
page: 1,
|
page:1,
|
||||||
}
|
}
|
||||||
return fetch('product/query?petType=' + usertype + username + queryTail, data, 'POST')
|
return fetch('product/query?petType='+usertype+username+queryTail,data, 'POST' )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -329,9 +337,9 @@ export const biaome = (usertype, stype, curPage, rows) => {
|
|||||||
export const memberAccount = (stype) => {
|
export const memberAccount = (stype) => {
|
||||||
console.log(stype);
|
console.log(stype);
|
||||||
var data = {
|
var data = {
|
||||||
memberId: stype
|
memberId:stype
|
||||||
}
|
}
|
||||||
return fetch('memberAccount?type=history', data, 'POST')
|
return fetch('memberAccount?type=history', data, 'POST' )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -340,9 +348,9 @@ export const ordermaster = (stype) => {
|
|||||||
console.log(stype);
|
console.log(stype);
|
||||||
var data = {
|
var data = {
|
||||||
|
|
||||||
memberId: '223782'
|
memberId:'223782'
|
||||||
}
|
}
|
||||||
return fetch('memberAccount', data, 'POST')
|
return fetch('memberAccount', data, 'POST' )
|
||||||
}
|
}
|
||||||
|
|
||||||
//微信支付
|
//微信支付
|
||||||
@ -350,9 +358,9 @@ export const payOrderWX = (stype) => {
|
|||||||
console.log(stype);
|
console.log(stype);
|
||||||
var data = {
|
var data = {
|
||||||
|
|
||||||
memberId: '223782'
|
memberId:'223782'
|
||||||
}
|
}
|
||||||
return fetch('memberAccount', data, 'POST')
|
return fetch('memberAccount', data, 'POST' )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -361,9 +369,9 @@ export const payOrderWX = (stype) => {
|
|||||||
export const insercar = (stype) => {
|
export const insercar = (stype) => {
|
||||||
console.log(stype);
|
console.log(stype);
|
||||||
var data = {
|
var data = {
|
||||||
petType: stype
|
petType:stype
|
||||||
}
|
}
|
||||||
return fetch('product/insertCartProductInfo', data, 'POST')
|
return fetch('product/insertCartProductInfo', data, 'POST' )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -371,25 +379,25 @@ export const insercar = (stype) => {
|
|||||||
|
|
||||||
|
|
||||||
//查询猫狗商品信息
|
//查询猫狗商品信息
|
||||||
export const catquery = (productCode, type) => {
|
export const catquery = (productCode,type) => {
|
||||||
console.log(productCode);
|
console.log(productCode);
|
||||||
var data = {
|
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);
|
console.log(productCode);
|
||||||
var data = {
|
var data = {
|
||||||
|
|
||||||
petType: 1,
|
petType:1,
|
||||||
pet_type: 0
|
pet_type:0
|
||||||
|
|
||||||
}
|
}
|
||||||
return fetch('h5/product/query', data, 'POST')
|
return fetch('h5/product/query', data, 'POST' )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -401,10 +409,10 @@ export const oncequery = (productCode) => {
|
|||||||
|
|
||||||
var data = {
|
var data = {
|
||||||
|
|
||||||
productCode: productCode
|
productCode:productCode
|
||||||
|
|
||||||
}
|
}
|
||||||
return fetch("goodsByProductCode?productCode=" + productCode, data, 'POST')
|
return fetch( "goodsByProductCode?productCode="+productCode, data, 'POST' )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -412,156 +420,162 @@ export const oncequery = (productCode) => {
|
|||||||
export const goodsmessage = (productCode) => {
|
export const goodsmessage = (productCode) => {
|
||||||
|
|
||||||
var data = {
|
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 = {
|
var data = {
|
||||||
mobile: mobile,
|
mobile:mobile,
|
||||||
couponId: couponId
|
couponId:couponId
|
||||||
|
}
|
||||||
|
return fetch('coupon?type=fetch', data, 'POST' )
|
||||||
}
|
}
|
||||||
return fetch('coupon?type=fetch', data, 'POST')
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//优惠券的查询
|
//优惠券的查询
|
||||||
export const getdiscount = (memberId, channelSecurity, mobile) => {
|
export const getdiscount = (memberId,channelSecurity,mobile) => {
|
||||||
var data = {
|
var data = {
|
||||||
memberId: memberId,
|
memberId:memberId,
|
||||||
mobile: mobile
|
mobile:mobile
|
||||||
|
}
|
||||||
|
return fetch('memberAddress?type=getAll', data, 'POST' )
|
||||||
}
|
}
|
||||||
return fetch('memberAddress?type=getAll', data, 'POST')
|
|
||||||
}
|
|
||||||
|
|
||||||
//可用的优惠券
|
//可用的优惠券
|
||||||
export const alldiscount = (memberId, channelSecurity, mobile) => {
|
export const alldiscount = (memberId,channelSecurity,mobile) => {
|
||||||
var data = {
|
var data = {
|
||||||
memberId: memberId,
|
memberId:memberId,
|
||||||
|
}
|
||||||
|
return fetch('couponConfig?type=getAll', data, 'POST' )
|
||||||
}
|
}
|
||||||
return fetch('couponConfig?type=getAll', data, 'POST')
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//用户领取的优惠券
|
//用户领取的优惠券
|
||||||
export const getdraw = (mobile, states) => {
|
export const getdraw = (mobile,states) => {
|
||||||
var data = {
|
var data = {
|
||||||
mobile: mobile,
|
mobile:mobile,
|
||||||
status: states
|
status:states
|
||||||
|
}
|
||||||
|
return fetch('coupon?type=getAll', data, 'POST' )
|
||||||
}
|
}
|
||||||
return fetch('coupon?type=getAll', data, 'POST')
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//微信支付
|
//微信支付
|
||||||
export const generateOrderWX = (list) => {
|
export const generateOrderWX = (list) => {
|
||||||
var data = [{
|
var data = [{
|
||||||
|
|
||||||
|
|
||||||
}]
|
}]
|
||||||
return fetch('generateOrderWX', list, 'POST')
|
return fetch('generateOrderWX', list, 'POST' )
|
||||||
}
|
}
|
||||||
//用户所有的优惠券
|
|
||||||
export const allConfig = (memberId, channelSecurity, mobile) => {
|
//再次支付
|
||||||
|
export const repayOrde = (ordernumber) => {
|
||||||
|
console.log(ordernumber);
|
||||||
|
return fetch('repayOrderWX?orderNo='+ordernumber,'', 'POST' )
|
||||||
|
}
|
||||||
|
//用户所有的优惠券
|
||||||
|
export const allConfig = (memberId,channelSecurity,mobile) => {
|
||||||
var data = {
|
var data = {
|
||||||
}
|
}
|
||||||
return fetch('couponConfig?type=getAll', data, 'POST')
|
return fetch('couponConfig?type=getAll', data, 'POST' )
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//用户领取优惠券
|
|
||||||
export const getConfig = (memberId, couponId) => {
|
|
||||||
var data = {
|
|
||||||
memberId: memberId,
|
|
||||||
couponId: couponId,
|
|
||||||
}
|
}
|
||||||
return fetch('coupon?type=fetch', data, 'POST')
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//用户下的优惠券
|
//用户领取优惠券
|
||||||
export const userConfig = (memberId, couponId) => {
|
export const getConfig = (memberId,couponId) => {
|
||||||
var data = {
|
var data = {
|
||||||
memberId: memberId,
|
memberId:memberId,
|
||||||
couponId: couponId,
|
couponId:couponId,
|
||||||
|
}
|
||||||
|
return fetch('coupon?type=fetch', data, 'POST' )
|
||||||
}
|
}
|
||||||
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 = {
|
var data = {
|
||||||
memberId: memberId,
|
memberId:memberId,
|
||||||
|
couponId:couponId,
|
||||||
|
}
|
||||||
|
return fetch('coupon?type=fetch', data, 'POST' )
|
||||||
}
|
}
|
||||||
return fetch('memberAddress?type=getAll', data, 'POST')
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//地址的添加 //id/详细地址/ 收货人姓名/收货人电话号码/省份id/城市id/区域编码
|
|
||||||
export const editaddress = (memberId, detailAddress, recipient, tel, provinceId, cityId, districtId) => {
|
|
||||||
|
//用户订单的查询
|
||||||
|
// 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) => {
|
||||||
|
|
||||||
var data = {
|
var data = {
|
||||||
memberId: 844350,
|
memberId:844350,
|
||||||
provinceId: 25,
|
provinceId:25,
|
||||||
cityId: 36,
|
cityId:36,
|
||||||
districtId: 418,
|
districtId:418,
|
||||||
detailAddress: '古美路1455弄46号302',
|
detailAddress:'古美路1455弄46号302',
|
||||||
recipient: '蒋缘缘2',
|
recipient:'蒋缘缘2',
|
||||||
recipientPhone: '13671516167',
|
recipientPhone:'13671516167',
|
||||||
zipCode: '214423',
|
zipCode:'214423',
|
||||||
default: false,
|
default:false,
|
||||||
|
}
|
||||||
|
return fetch('memberAddress?type=add', memberId, 'POST' )
|
||||||
}
|
}
|
||||||
return fetch('memberAddress?type=add', memberId, 'POST')
|
|
||||||
}
|
|
||||||
|
|
||||||
//删除
|
//删除
|
||||||
export const editdelete = (memberId, ids) => {
|
export const editdelete = (memberId,ids) => {
|
||||||
var data = {
|
var data = {
|
||||||
memberId: memberId,
|
memberId:memberId,
|
||||||
ids: ids,
|
ids:ids,
|
||||||
|
}
|
||||||
|
return fetch('memberAddress?type=delete', data, 'POST' )
|
||||||
}
|
}
|
||||||
return fetch('memberAddress?type=delete', data, 'POST')
|
|
||||||
}
|
|
||||||
|
|
||||||
//地址的编辑
|
//地址的编辑
|
||||||
export const editupdate = (userid,) => {
|
export const editupdate = (userid,) => {
|
||||||
// var data = {
|
// var data = {
|
||||||
// memberId:userid,
|
// memberId:userid,
|
||||||
// id:id,
|
// id:id,
|
||||||
// isDefault:isDefault,
|
// 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 = {
|
var data = {
|
||||||
id: id,
|
id:id,
|
||||||
}
|
}
|
||||||
return fetch('member?type=update', data, 'POST')
|
return fetch('member?type=update', data, 'POST' )
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -615,17 +629,14 @@ export const getOrderList = (user, status) => {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
//购物车操作
|
//购物车操作
|
||||||
export const memberAddress = (type, data) => {
|
export const memberAddress = (type,data) => {
|
||||||
return fetch('memberAddress?type=' + type, data, 'POST')
|
return fetch('memberAddress?type='+type, data, 'POST' )
|
||||||
}
|
}
|
||||||
|
|
||||||
//微信支付二维码
|
|
||||||
export const updateOrderWX = (data) => {
|
|
||||||
return fetch('updateOrderWX', data, 'POST')
|
|
||||||
}
|
|
||||||
|
|
||||||
//支付宝支付二维码
|
//支付宝支付二维码
|
||||||
export const generateOrderAlipay = (data) => {
|
export const generateOrderAlipay = (data) => {
|
||||||
return fetch('generateOrderAlipay', data, 'POST')
|
return fetch('generateOrderAlipay', data, 'POST' )
|
||||||
}
|
}
|
||||||
|
|
9
rc-busness/app.html
Normal file
9
rc-busness/app.html
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html {{ HTML_ATTRS }}>
|
||||||
|
<head {{ HEAD_ATTRS }}>
|
||||||
|
{{ HEAD }}
|
||||||
|
</head>
|
||||||
|
<body {{ BODY_ATTRS }}>
|
||||||
|
{{ APP }}
|
||||||
|
</body>
|
||||||
|
</html>
|
56
rc-busness/app/views/error.html
Normal file
56
rc-busness/app/views/error.html
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
<!doctype html>
|
||||||
|
<html class="no-js" lang="" style='font-size:16px;'>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta http-equiv="x-ua-compatible" content="ie=edge">
|
||||||
|
<title></title>
|
||||||
|
<meta name="description" content="">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
<style type="text/css">
|
||||||
|
html,body{
|
||||||
|
width:100%;
|
||||||
|
height:100%;
|
||||||
|
overflow:hidden;
|
||||||
|
}
|
||||||
|
.wrapper{
|
||||||
|
width:100%;
|
||||||
|
height:100%;
|
||||||
|
display:flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
h2{
|
||||||
|
font-size: 2.5rem;
|
||||||
|
line-height: 3.5rem;
|
||||||
|
color:#e2001a;
|
||||||
|
}
|
||||||
|
a{
|
||||||
|
color:#666;
|
||||||
|
text-decoration: none;
|
||||||
|
padding-bottom:.25rem;
|
||||||
|
border-bottom: 1px solid #666;
|
||||||
|
}
|
||||||
|
a:hover {
|
||||||
|
color:#e2001a;
|
||||||
|
border-color: #e2001a;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<div class="wrapper">
|
||||||
|
<img src="./images/default.jpg">
|
||||||
|
<div>
|
||||||
|
<h2>检测到系统错误</h2>
|
||||||
|
<div>
|
||||||
|
请联系管理员或尝试其他操作
|
||||||
|
<br/><br/>
|
||||||
|
<a href="/">回到首页</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
@ -77,6 +77,7 @@
|
|||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
display: block;
|
display: block;
|
||||||
|
margin-left: 10px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.rc-right {
|
.rc-right {
|
||||||
@ -87,6 +88,9 @@
|
|||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
color: #e1001a;
|
color: #e1001a;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis
|
||||||
}
|
}
|
||||||
.rc-userfont {
|
.rc-userfont {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
@ -121,6 +125,8 @@ align-items: center;
|
|||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
margin-top: 8px;
|
margin-top: 8px;
|
||||||
|
float: right;
|
||||||
|
margin-right: 28px;
|
||||||
|
|
||||||
}
|
}
|
||||||
span{
|
span{
|
||||||
@ -152,7 +158,7 @@ margin-top: 8px;
|
|||||||
}
|
}
|
||||||
@media screen and (min-width: 769px){
|
@media screen and (min-width: 769px){
|
||||||
.online{
|
.online{
|
||||||
margin-top: 30px;
|
margin-top: 30px;
|
||||||
}
|
}
|
||||||
.allmain{
|
.allmain{
|
||||||
|
|
||||||
@ -251,6 +257,9 @@ margin-top: 8px;
|
|||||||
font-style: normal;
|
font-style: normal;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
color: #e1001a;
|
color: #e1001a;
|
||||||
|
white-space: nowrap;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis
|
||||||
}
|
}
|
||||||
.rc-userfont {
|
.rc-userfont {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
@ -286,6 +295,8 @@ align-items: center;
|
|||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
margin-top: 8px;
|
margin-top: 8px;
|
||||||
|
float: right;
|
||||||
|
margin-right: 28px;
|
||||||
|
|
||||||
}
|
}
|
||||||
span{
|
span{
|
||||||
|
@ -4,6 +4,13 @@ body {
|
|||||||
line-height: 1.5;
|
line-height: 1.5;
|
||||||
color: #666;
|
color: #666;
|
||||||
}
|
}
|
||||||
|
.el-message-box .el-button--primary{
|
||||||
|
background-color: #e1001a !important;
|
||||||
|
color:#fff;
|
||||||
|
border:unset;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
.rc-menu--xs .rc-screen-reader{
|
.rc-menu--xs .rc-screen-reader{
|
||||||
left:28%;
|
left:28%;
|
||||||
}
|
}
|
||||||
@ -14,12 +21,10 @@ body {
|
|||||||
.fade-leave-active {
|
.fade-leave-active {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ts-no-data {
|
.ts-no-data {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin: 3rem 0;
|
margin: 3rem 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ts-mask {
|
.ts-mask {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
@ -31,7 +36,15 @@ body {
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
z-index: 99;
|
z-index: 99;
|
||||||
|
.ts-mask-close{
|
||||||
|
position:absolute;
|
||||||
|
top:1rem;
|
||||||
|
right:1rem;
|
||||||
|
width:1rem;
|
||||||
|
height:1rem;
|
||||||
|
background: url("../image/btn-close.png") center center no-repeat;
|
||||||
|
background-size:contain;
|
||||||
|
}
|
||||||
.ts-mask-bg {
|
.ts-mask-bg {
|
||||||
background-color: #000;
|
background-color: #000;
|
||||||
opacity: .6;
|
opacity: .6;
|
||||||
@ -47,16 +60,17 @@ input[type=checkbox]{
|
|||||||
position:relative;
|
position:relative;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
border:none;
|
border:none;
|
||||||
border: 1px solid #d7d7d7;
|
//border: 1px solid #d7d7d7;
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
width: 1.5rem;
|
width: 1rem;
|
||||||
height: 1.5rem;
|
height: 1rem;
|
||||||
|
-webkit-appearance:none;
|
||||||
&:before {
|
&:before {
|
||||||
top: 0;
|
top: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
content: "";
|
content: "";
|
||||||
width: 1.5rem;
|
width: 1rem;
|
||||||
height: 1.5rem;
|
height: 1rem;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
@ -69,7 +83,7 @@ input[type=checkbox]{
|
|||||||
}
|
}
|
||||||
label {
|
label {
|
||||||
input[type=checkbox] {
|
input[type=checkbox] {
|
||||||
top:.375rem;
|
// top:.375rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -135,6 +149,9 @@ picture {
|
|||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
margin-right: auto;
|
margin-right: auto;
|
||||||
}
|
}
|
||||||
|
.useruantity{
|
||||||
|
margin: 1rem 1.25rem;
|
||||||
|
}
|
||||||
|
|
||||||
.ts-remove {
|
.ts-remove {
|
||||||
text-decoration: line-through;
|
text-decoration: line-through;
|
||||||
@ -311,18 +328,18 @@ picture {
|
|||||||
height: auto;
|
height: auto;
|
||||||
position: fixed;
|
position: fixed;
|
||||||
right: 0;
|
right: 0;
|
||||||
top: 30%;
|
top: 56vh;
|
||||||
background: #FFFFFF;
|
background: #FFFFFF;
|
||||||
box-shadow: 0 0 10px rgba(0, 0, 0, 0.16);
|
box-shadow: 0 0 10px rgba(0, 0, 0, 0.16);
|
||||||
border-radius: .25rem;
|
border-radius: .25rem;
|
||||||
z-index:11;
|
z-index:11;
|
||||||
ul{
|
ul{
|
||||||
width: 60px;
|
width: 3.75rem;
|
||||||
height: 181px;
|
height: 11.3rem;
|
||||||
background-color: white;
|
background-color: white;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
|
justify-content: space-between;
|
||||||
li {
|
li {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -344,7 +361,7 @@ picture {
|
|||||||
}
|
}
|
||||||
|
|
||||||
span {
|
span {
|
||||||
font-size: 0.12rem;
|
font-size: .75rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tuntop {
|
.tuntop {
|
||||||
@ -405,7 +422,7 @@ picture {
|
|||||||
}
|
}
|
||||||
label {
|
label {
|
||||||
input[type=checkbox] {
|
input[type=checkbox] {
|
||||||
top:.25rem;
|
top:0rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.rc-header__nav--primary{
|
.rc-header__nav--primary{
|
||||||
@ -513,7 +530,12 @@ picture {
|
|||||||
max-width: 768px;
|
max-width: 768px;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
|
div[data-js-modal-menu] {
|
||||||
|
display:none;
|
||||||
|
}
|
||||||
|
aside div[data-js-modal-menu] {
|
||||||
|
display:block;
|
||||||
|
}
|
||||||
html {
|
html {
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
}
|
}
|
||||||
@ -798,7 +820,11 @@ picture {
|
|||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
.el-dialog{
|
.el-dialog{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
}
|
||||||
|
.el-dialog__body{
|
||||||
|
max-height:50vh;
|
||||||
|
overflow-x:hidden;
|
||||||
|
overflow-y:auto;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#tns2-iw {
|
#tns2-iw {
|
||||||
|
@ -20,6 +20,14 @@
|
|||||||
}
|
}
|
||||||
.ts-position-identifier{
|
.ts-position-identifier{
|
||||||
|
|
||||||
|
}
|
||||||
|
.ts-mobile-player-container {
|
||||||
|
video {
|
||||||
|
width:100%;
|
||||||
|
height:auto;
|
||||||
|
position: relative;
|
||||||
|
z-index:2;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.ul-zhuan,.ul-dog{
|
.ul-zhuan,.ul-dog{
|
||||||
li{
|
li{
|
||||||
@ -83,6 +91,7 @@
|
|||||||
}
|
}
|
||||||
li{
|
li{
|
||||||
margin-top:1.875rem;
|
margin-top:1.875rem;
|
||||||
|
margin-left:0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.ts-banner-swiper-container{
|
.ts-banner-swiper-container{
|
||||||
@ -211,9 +220,29 @@
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
height:auto;
|
height:auto;
|
||||||
display: block;
|
display: block;
|
||||||
video{
|
position:relative;
|
||||||
max-width:100%;
|
z-index:0;
|
||||||
max-height:100%;
|
&:before{
|
||||||
|
content:"";
|
||||||
|
background:#000;
|
||||||
|
opacity:.6;
|
||||||
|
position:absolute;
|
||||||
|
width:100%;
|
||||||
|
height:100%;
|
||||||
|
left:0;
|
||||||
|
top:0;
|
||||||
|
z-index:1;
|
||||||
|
}
|
||||||
|
&:after{
|
||||||
|
content:"";
|
||||||
|
position:absolute;
|
||||||
|
top:0;
|
||||||
|
left:0;
|
||||||
|
width:100%;
|
||||||
|
height:100%;
|
||||||
|
background:url("../image/btn-play.png") center center no-repeat;
|
||||||
|
background-size:90px 90px;
|
||||||
|
z-index:2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -225,20 +254,33 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
border: 1px solid #d7d7d7;
|
border: 1px solid #d7d7d7;
|
||||||
border-radius:4px;
|
border-radius:4px;
|
||||||
|
img{
|
||||||
|
object-fit: cover;
|
||||||
|
display: block;
|
||||||
|
z-index:0;
|
||||||
|
}
|
||||||
.rc-click{
|
.rc-click{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: flex-start;
|
justify-content: flex-start;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
img{
|
||||||
|
width: 100%;
|
||||||
|
height: auto;
|
||||||
|
position:relative;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
.click-zone{
|
||||||
|
align-items: center;
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
img{
|
img{
|
||||||
width: 10rem;
|
width: 10rem;
|
||||||
height: 10rem;
|
height: 10rem;
|
||||||
object-fit: cover;
|
|
||||||
display: block;
|
|
||||||
margin-top: 2.5rem;
|
margin-top: 2.5rem;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
span{
|
span{
|
||||||
font-size: 1.125rem;
|
font-size: 1.125rem;
|
||||||
color: #E2001A;
|
color: #E2001A;
|
||||||
@ -348,13 +390,13 @@
|
|||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
.active {
|
.active {
|
||||||
font-size: 0.14rem;
|
font-size: .875rem;
|
||||||
img{
|
img{
|
||||||
border-width: 1px;
|
border-width: 1px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.unactive {
|
.unactive {
|
||||||
font-size: 0.14rem;
|
font-size: .875rem;
|
||||||
img{
|
img{
|
||||||
border-width: 1px;
|
border-width: 1px;
|
||||||
}
|
}
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
}
|
}
|
||||||
.usecheck label{
|
.usecheck label{
|
||||||
display:flex;
|
display:flex;
|
||||||
|
align-items: center;
|
||||||
input{
|
input{
|
||||||
margin-right:.687rem;
|
margin-right:.687rem;
|
||||||
}
|
}
|
||||||
@ -48,10 +49,10 @@
|
|||||||
.usecheck{
|
.usecheck{
|
||||||
display: flex;
|
display: flex;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
width: 335px;
|
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin-top: 18px;
|
margin-top: 18px;
|
||||||
|
border-bottom: 1px solid #d7d7d7;
|
||||||
|
|
||||||
}
|
}
|
||||||
.container {
|
.container {
|
||||||
@ -105,6 +106,20 @@
|
|||||||
input {
|
input {
|
||||||
border: none;
|
border: none;
|
||||||
outline: none;
|
outline: none;
|
||||||
|
}
|
||||||
|
.rc-one-column {
|
||||||
|
font-size: 12px;
|
||||||
|
strong{
|
||||||
|
font-size: 12px;
|
||||||
|
margin-left: 6px;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
i{
|
||||||
|
font-style: normal;
|
||||||
|
color: #E1001A;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
.rc-center {
|
.rc-center {
|
||||||
font-size: 30px;
|
font-size: 30px;
|
||||||
@ -142,14 +157,50 @@
|
|||||||
}
|
}
|
||||||
// /* 最小768px最大1920 *pc端/
|
// /* 最小768px最大1920 *pc端/
|
||||||
@media screen and (min-width: 769px) {
|
@media screen and (min-width: 769px) {
|
||||||
|
.rc-one-column{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
flex-direction: column;
|
||||||
|
.rc-one-column {
|
||||||
|
font-size: 12px;
|
||||||
|
.rc-text--left{
|
||||||
|
strong{
|
||||||
|
font-size: 12px;
|
||||||
|
margin-left: 6px;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
i{
|
||||||
|
font-style: normal;
|
||||||
|
color: #E1001A;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
.usecheck{
|
.usecheck{
|
||||||
display: flex;
|
display: flex;
|
||||||
text-align: left;
|
text-align: left;
|
||||||
width: 395px;
|
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin-top: 18px;
|
margin-top: 18px;
|
||||||
|
border-bottom: 1px solid #d7d7d7
|
||||||
|
}
|
||||||
|
.usecheck label{
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
i{
|
||||||
|
font-style: normal;
|
||||||
|
color: #E1001A;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.rc-one-column strong{
|
||||||
|
font-size: 12px;
|
||||||
|
margin-left: 6px;
|
||||||
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
/deep/
|
/deep/
|
||||||
.van-field-one{
|
.van-field-one{
|
||||||
|
@ -253,6 +253,9 @@ ul li ol li em strong i {
|
|||||||
width: 440px;
|
width: 440px;
|
||||||
height: 652px;
|
height: 652px;
|
||||||
}
|
}
|
||||||
|
.ts-crumbs {
|
||||||
|
padding-left:.25rem;
|
||||||
|
}
|
||||||
.ts-mypersonal{
|
.ts-mypersonal{
|
||||||
margin-left:0;
|
margin-left:0;
|
||||||
.rc-column{
|
.rc-column{
|
||||||
@ -433,7 +436,7 @@ ul li ol li em strong i {
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
li{
|
li{
|
||||||
float: left;
|
float: left;
|
||||||
|
cursor:pointer;
|
||||||
}
|
}
|
||||||
img{
|
img{
|
||||||
width: 96px;
|
width: 96px;
|
||||||
@ -464,6 +467,7 @@ ul li ol li em strong i {
|
|||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
}
|
}
|
||||||
.rc-buy{
|
.rc-buy{
|
||||||
|
cursor: pointer;
|
||||||
img{
|
img{
|
||||||
width: 96px;
|
width: 96px;
|
||||||
height: 96px;
|
height: 96px;
|
||||||
|
@ -16,6 +16,9 @@
|
|||||||
background:#f6f6f6;
|
background:#f6f6f6;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.usercontshow.rc-max-width--xl{
|
||||||
|
min-height:72vh;
|
||||||
|
}
|
||||||
.useredit{
|
.useredit{
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
@ -44,12 +47,12 @@ justify-content: center;
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
color: #FFFFFF;
|
color: #FFFFFF;
|
||||||
|
margin:0 auto;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
.rc-max-width--xl{
|
.rc-max-width--xl{
|
||||||
padding: 0px 20px 24px 20px;
|
padding: 0px 20px 0px 20px;
|
||||||
min-height: 60vh;
|
|
||||||
.rc-cat{
|
.rc-cat{
|
||||||
margin-top: 20px;
|
margin-top: 20px;
|
||||||
}
|
}
|
||||||
@ -121,12 +124,17 @@ color: #FFFFFF;
|
|||||||
{
|
{
|
||||||
|
|
||||||
.rc-max-width--xl{
|
.rc-max-width--xl{
|
||||||
margin-bottom: 80px;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
justify-content: space-between
|
justify-content: space-between
|
||||||
}
|
}
|
||||||
|
.usercontshow{
|
||||||
|
min-height: 20vh;
|
||||||
|
margin-bottom: 2rem;
|
||||||
|
padding-left:.5rem;
|
||||||
|
padding-right:.5rem;
|
||||||
|
}
|
||||||
.rc-button{
|
.rc-button{
|
||||||
|
|
||||||
display: none;
|
display: none;
|
||||||
@ -134,8 +142,8 @@ display: none;
|
|||||||
.usercontend {
|
.usercontend {
|
||||||
display:inline-block;
|
display:inline-block;
|
||||||
width: 48%;
|
width: 48%;
|
||||||
margin-top: 40px;
|
//margin-bottom: 40px;
|
||||||
padding: 24px 20px;
|
//padding: 24px 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.online{
|
.online{
|
||||||
@ -230,7 +238,7 @@ display: none;
|
|||||||
-webkit-line-clamp: 2;
|
-webkit-line-clamp: 2;
|
||||||
line-clamp: 2;
|
line-clamp: 2;
|
||||||
-webkit-box-orient: vertical;
|
-webkit-box-orient: vertical;
|
||||||
font-size: 20px;
|
font-size: .875rem;
|
||||||
color: #333333;
|
color: #333333;
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -253,19 +261,13 @@ display: none;
|
|||||||
|
|
||||||
}
|
}
|
||||||
.userdit{
|
.userdit{
|
||||||
width: 45%;
|
width: 48%;
|
||||||
height: 164px;
|
height: 164px;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
height: 164px;
|
|
||||||
border: 1px solid #D7D7D7;
|
|
||||||
border-radius: 3px;
|
|
||||||
margin-top: 65px;
|
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
border: 1px solid #D7D7D7;
|
border: 1px solid #D7D7D7;
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
position: relative;
|
position: relative;
|
||||||
height: 164px;
|
|
||||||
box-sizing: border-box;
|
|
||||||
margin-left: 20px;
|
margin-left: 20px;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -107,7 +107,7 @@
|
|||||||
width: 96px;
|
width: 96px;
|
||||||
height: 96px;
|
height: 96px;
|
||||||
display: block;
|
display: block;
|
||||||
|
object-fit:contain;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -279,7 +279,7 @@
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
height: 164px;
|
height: 164px;
|
||||||
.rc-usercenter{
|
.rc-usercenter{
|
||||||
width: 25%;
|
width: 27%;
|
||||||
em{
|
em{
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
}
|
}
|
||||||
@ -292,7 +292,7 @@
|
|||||||
width: 96px;
|
width: 96px;
|
||||||
height: 96px;
|
height: 96px;
|
||||||
display: block;
|
display: block;
|
||||||
|
object-fit: contain;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -329,7 +329,7 @@
|
|||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
width: 58%;
|
width: 56%;
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
color: #E1001A;
|
color: #E1001A;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
@ -451,7 +451,6 @@
|
|||||||
}
|
}
|
||||||
span {
|
span {
|
||||||
font-size: 45px;
|
font-size: 45px;
|
||||||
font-weight: bold;
|
|
||||||
}
|
}
|
||||||
strong {
|
strong {
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
|
@ -22019,9 +22019,6 @@ li:last-child .edge .rc-tab--view-control:focus,li:last-child
|
|||||||
}
|
}
|
||||||
|
|
||||||
@media (max-width: 1024px) {
|
@media (max-width: 1024px) {
|
||||||
.rc-xl-up,.xl-up {
|
|
||||||
display: none !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.rc-flex-direction--reverse--xl-down {
|
.rc-flex-direction--reverse--xl-down {
|
||||||
-webkit-box-orient: vertical;
|
-webkit-box-orient: vertical;
|
||||||
|
@ -12,7 +12,6 @@ ul li ol li em strong i {
|
|||||||
}
|
}
|
||||||
.rc-main {
|
.rc-main {
|
||||||
position: relative;
|
position: relative;
|
||||||
margin-top: 5.25rem;
|
|
||||||
|
|
||||||
.active{
|
.active{
|
||||||
border: 2px solid #E2001A;
|
border: 2px solid #E2001A;
|
||||||
@ -33,7 +32,6 @@ ul li ol li em strong i {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
margin: 0 auto;
|
margin: 0 auto;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
margin-top: 20px;
|
|
||||||
.ts-scrollable-container{
|
.ts-scrollable-container{
|
||||||
h2{
|
h2{
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
@ -291,7 +289,7 @@ border-radius: 100px;
|
|||||||
.rc-bottom{
|
.rc-bottom{
|
||||||
position: fixed;
|
position: fixed;
|
||||||
background: white;
|
background: white;
|
||||||
height: 617px;
|
height: 21.875rem;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
left: 0;
|
left: 0;
|
||||||
z-index: 9;
|
z-index: 9;
|
||||||
@ -343,6 +341,7 @@ border-radius: 100px;
|
|||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
color: #333333;
|
color: #333333;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
margin-top:1rem;
|
||||||
}
|
}
|
||||||
.ts-scrollable{
|
.ts-scrollable{
|
||||||
margin-top: 1rem;
|
margin-top: 1rem;
|
||||||
@ -382,9 +381,9 @@ border-radius: 100px;
|
|||||||
@media screen and (min-width: 768px){
|
@media screen and (min-width: 768px){
|
||||||
.usersearch {
|
.usersearch {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin: 0 auto;
|
margin-left:auto;
|
||||||
|
margin-right:auto;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
margin-top: 40px;
|
|
||||||
.ts-scrollable-container{
|
.ts-scrollable-container{
|
||||||
h2{
|
h2{
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
@ -441,7 +440,6 @@ cursor: pointer;
|
|||||||
|
|
||||||
}
|
}
|
||||||
.rc-main {
|
.rc-main {
|
||||||
margin-top: 7.25rem;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
.ts-scrollable-container{
|
.ts-scrollable-container{
|
||||||
|
@ -236,6 +236,7 @@ color: #333333;
|
|||||||
font-style: normal;
|
font-style: normal;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
align-items: baseline;
|
||||||
span {
|
span {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
|
|
||||||
@ -251,6 +252,10 @@ color: #333333;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.ts-right-arr {
|
||||||
|
line-height:1rem;
|
||||||
|
height:1.5rem;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -155,6 +155,7 @@ ul li ol li em strong i {
|
|||||||
.rc-value{
|
.rc-value{
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,8 +2,110 @@ ul li ol li em strong i {
|
|||||||
list-style: none;
|
list-style: none;
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
}
|
}
|
||||||
|
.rc-main{
|
||||||
|
margin: 0;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
//手机端
|
//手机端
|
||||||
@media screen and (max-width: 768px) {
|
@media screen and (max-width: 768px) {
|
||||||
|
.online{
|
||||||
|
margin: 0;
|
||||||
|
&.bold{
|
||||||
|
height: 0.5rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// 订单状态
|
||||||
|
.rc-receiving {
|
||||||
|
width: 100%;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
// margin: 1rem 1.25rem;
|
||||||
|
em {
|
||||||
|
font-style: normal;
|
||||||
|
color: #e1001a;
|
||||||
|
font-size: 1.375rem;
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
span {
|
||||||
|
color: #666666;
|
||||||
|
font-size: 0.875rem;
|
||||||
|
display: block;
|
||||||
|
margin-left: 1.125rem;
|
||||||
|
width: 62%;
|
||||||
|
margin-top: 0.5rem;
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//快递列表
|
||||||
|
.delivery {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
margin: 1rem 1.25rem;
|
||||||
|
.to-delivery {
|
||||||
|
img{
|
||||||
|
width: 1rem;
|
||||||
|
height: 1rem;
|
||||||
|
object-fit: contain;
|
||||||
|
}
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
font-style: normal;
|
||||||
|
span {
|
||||||
|
display: block;
|
||||||
|
margin-left: 0.18rem;
|
||||||
|
color: #333333;
|
||||||
|
font-size: 1rem;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
i {
|
||||||
|
font-style: normal;
|
||||||
|
margin-left: 0.5rem;
|
||||||
|
display: block;
|
||||||
|
color: #999999;
|
||||||
|
font-size: 0.75rem;
|
||||||
|
margin-top: 0.31rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.bo-delivery {
|
||||||
|
span {
|
||||||
|
font-size: 0.87rem;
|
||||||
|
color: #666666;
|
||||||
|
display: block;
|
||||||
|
margin-top: 0.5rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
//地址列表
|
||||||
|
.mypersonal{
|
||||||
|
.my-delivery {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
font-style: normal;
|
||||||
|
span {
|
||||||
|
display: block;
|
||||||
|
font-size: 0.87rem;
|
||||||
|
color: #333333;
|
||||||
|
}
|
||||||
|
i {
|
||||||
|
font-style: normal;
|
||||||
|
display: block;
|
||||||
|
font-size: 0.87rem;
|
||||||
|
color: #333333;
|
||||||
|
margin-left: .5rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.per-delivery {
|
||||||
|
span {
|
||||||
|
font-size:0.875rem;
|
||||||
|
color: #666666;
|
||||||
|
display: block;
|
||||||
|
margin-top: 0.43rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.rc-margin-y--md{
|
.rc-margin-y--md{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
height: 80px;
|
height: 80px;
|
||||||
@ -39,83 +141,7 @@ margin-right: 20px;
|
|||||||
.rc-foo{
|
.rc-foo{
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
.rc-receiving {
|
|
||||||
width: 100%;
|
|
||||||
height: 80px;
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
em {
|
|
||||||
font-style: normal;
|
|
||||||
color: #e1001a;
|
|
||||||
font-size: 22px;
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
||||||
span {
|
|
||||||
color: #666666;
|
|
||||||
font-size: 12px;
|
|
||||||
display: block;
|
|
||||||
margin-left: 18px;
|
|
||||||
width: 62%;
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.delivery {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
height: 80px;
|
|
||||||
.to-delivery {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
font-style: normal;
|
|
||||||
span {
|
|
||||||
display: block;
|
|
||||||
margin-left: 3px;
|
|
||||||
}
|
|
||||||
i {
|
|
||||||
font-style: normal;
|
|
||||||
margin-left: 8px;
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.bo-delivery {
|
|
||||||
span {
|
|
||||||
font-size: 14px;
|
|
||||||
|
|
||||||
color: #666666;
|
|
||||||
display: block;
|
|
||||||
margin-top: 8px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.mypersonal {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
height: 80px;
|
|
||||||
.my-delivery {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
font-style: normal;
|
|
||||||
span {
|
|
||||||
display: block;
|
|
||||||
margin-left: 3px;
|
|
||||||
}
|
|
||||||
i {
|
|
||||||
font-style: normal;
|
|
||||||
margin-left: 8px;
|
|
||||||
display: block;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.per-delivery {
|
|
||||||
span {
|
|
||||||
font-size: 14px;
|
|
||||||
|
|
||||||
color: #666666;
|
|
||||||
display: block;
|
|
||||||
margin-top: 8px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
.rc-usermain {
|
.rc-usermain {
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -127,6 +153,7 @@ margin-right: 20px;
|
|||||||
width: 96px;
|
width: 96px;
|
||||||
height: 96px;
|
height: 96px;
|
||||||
display: block;
|
display: block;
|
||||||
|
object-fit: contain;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -206,14 +233,16 @@ margin-right: 20px;
|
|||||||
|
|
||||||
.rc-merchandise {
|
.rc-merchandise {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin-top: 32px;
|
margin-top: 24px;
|
||||||
|
padding-right: 0.7rem;
|
||||||
|
padding-left: 0.7rem;
|
||||||
|
|
||||||
ul {
|
ul {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
line-height: 26px;
|
line-height: 30px;
|
||||||
i {
|
i {
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
color: #666666;
|
color: #666666;
|
||||||
@ -239,10 +268,15 @@ margin-right: 20px;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
.useruantity{
|
||||||
|
padding-right: 20px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
.rc-payment{
|
.rc-payment{
|
||||||
|
padding-right: 0.7rem;
|
||||||
|
padding-left: 0.7rem;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin-top: 32px;
|
margin-top: 32px;
|
||||||
.u-trackingnumber{
|
.u-trackingnumber{
|
||||||
@ -292,7 +326,49 @@ margin-right: 20px;
|
|||||||
|
|
||||||
|
|
||||||
//pc端
|
//pc端
|
||||||
@media screen and (min-width: 768px) and (max-width: 1920px) {
|
@media screen and (min-width: 768px){
|
||||||
|
|
||||||
|
//快递列表
|
||||||
|
.delivery {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
margin: 1rem 1.25rem;
|
||||||
|
.to-delivery {
|
||||||
|
margin-top: 20px;
|
||||||
|
img{
|
||||||
|
width: 24px;
|
||||||
|
height: 24px;
|
||||||
|
object-fit: contain;
|
||||||
|
}
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
font-style: normal;
|
||||||
|
span {
|
||||||
|
display: block;
|
||||||
|
margin-left: 16px;
|
||||||
|
color: #333333;
|
||||||
|
font-size: 18px;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
i {
|
||||||
|
font-style: normal;
|
||||||
|
margin-left: 0.5rem;
|
||||||
|
display: block;
|
||||||
|
color: #999999;
|
||||||
|
font-size: 0.75rem;
|
||||||
|
margin-top: 0.31rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.bo-delivery {
|
||||||
|
margin-top: 16px;
|
||||||
|
span {
|
||||||
|
font-size: 0.87rem;
|
||||||
|
color: #666666;
|
||||||
|
display: block;
|
||||||
|
margin-top: 16px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
.rc-margin-y--md{
|
.rc-margin-y--md{
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
@ -328,7 +404,6 @@ margin-right: 20px;
|
|||||||
.delivery {
|
.delivery {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
height: 140px;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
.viewdetails{
|
.viewdetails{
|
||||||
@ -416,6 +491,7 @@ margin-right: 20px;
|
|||||||
img {
|
img {
|
||||||
width: 96px;
|
width: 96px;
|
||||||
height: 96px;
|
height: 96px;
|
||||||
|
object-fit: contain;
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -442,7 +518,7 @@ margin-right: 20px;
|
|||||||
|
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin-left: 16px;
|
margin-left: 16px;
|
||||||
|
justify-content: end;
|
||||||
|
|
||||||
}
|
}
|
||||||
.rc-userright {
|
.rc-userright {
|
||||||
|
BIN
rc-busness/assets/image/btn-close.png
Normal file
BIN
rc-busness/assets/image/btn-close.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
BIN
rc-busness/assets/image/btn-play.png
Normal file
BIN
rc-busness/assets/image/btn-play.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.3 KiB |
@ -459,11 +459,11 @@ export default {
|
|||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
margin-left: 2px;
|
margin-left: 2px;
|
||||||
width:100%;
|
width:100%;
|
||||||
padding-bottom:.25rem;
|
padding-bottom:.5rem;
|
||||||
background:url("../assets/image/ico-location.png") no-repeat 98% center;
|
background:url("../assets/image/ico-location.png") no-repeat 98% center;
|
||||||
background-size:16px;
|
background-size:16px;
|
||||||
position:relative;
|
position:relative;
|
||||||
top:.5rem;
|
top:.45rem;
|
||||||
padding-left:.875rem;
|
padding-left:.875rem;
|
||||||
}
|
}
|
||||||
.ts-area-picker-mobile{
|
.ts-area-picker-mobile{
|
||||||
|
@ -14,6 +14,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
import { mapMutations } from "vuex";
|
||||||
export default {
|
export default {
|
||||||
data(){
|
data(){
|
||||||
return{
|
return{
|
||||||
@ -39,6 +40,7 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
|
...mapMutations(["checkIsLogin"]),
|
||||||
lianxi(item,index){
|
lianxi(item,index){
|
||||||
if(item.title=='在线客服'){
|
if(item.title=='在线客服'){
|
||||||
var option = {
|
var option = {
|
||||||
@ -85,10 +87,14 @@ export default {
|
|||||||
this.gotop = false
|
this.gotop = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
created(){
|
||||||
|
|
||||||
},
|
},
|
||||||
mounted(){
|
mounted(){
|
||||||
//Check login
|
//Check login
|
||||||
let usernot=JSON.parse(localStorage.getItem("userInfo"));
|
this.checkIsLogin();
|
||||||
|
let usernot = this.$store.state.userInfo;
|
||||||
//console.log(usernot);
|
//console.log(usernot);
|
||||||
if(usernot==null ||usernot==undefined){
|
if(usernot==null ||usernot==undefined){
|
||||||
this.loginornot=true
|
this.loginornot=true
|
||||||
|
@ -56,6 +56,8 @@
|
|||||||
</span>
|
</span>
|
||||||
</button>
|
</button>
|
||||||
-->
|
-->
|
||||||
|
|
||||||
|
|
||||||
<button data-js-trigger="search-bar" @click='searchturn' evt-name='页内弹窗' evt-cat='headerBtnClick' evt-val='全文搜索' class="rc-btn rc-btn--icon rc-icon rc-search--xs rc-iconography rc-interactive" aria-label="Search" role="menuitem" data-click-modifier=".rc-hidden">
|
<button data-js-trigger="search-bar" @click='searchturn' evt-name='页内弹窗' evt-cat='headerBtnClick' evt-val='全文搜索' class="rc-btn rc-btn--icon rc-icon rc-search--xs rc-iconography rc-interactive" aria-label="Search" role="menuitem" data-click-modifier=".rc-hidden">
|
||||||
<span class="rc-screen-reader-text">translations.feature.headerbar.search</span>
|
<span class="rc-screen-reader-text">translations.feature.headerbar.search</span>
|
||||||
</button>
|
</button>
|
||||||
@ -304,7 +306,7 @@
|
|||||||
<div class="rc-column rc-padding-x--none">
|
<div class="rc-column rc-padding-x--none">
|
||||||
<ul class="rc-list rc-list--blank rc-list--align rc-btn-offset--top" role="menu">
|
<ul class="rc-list rc-list--blank rc-list--align rc-btn-offset--top" role="menu">
|
||||||
<li class="rc-list__item">
|
<li class="rc-list__item">
|
||||||
<a class="rc-list__link rc-icon ts-login--xs rc-iconography--xs" role="menuitem" href="javascript:void();" @click="turnlogin">
|
<a class="rc-list__link rc-icon ts-login--xs rc-iconography--xs" role="menuitem" @click="turnlogin">
|
||||||
个人中心
|
个人中心
|
||||||
<em class="rc-screen-reader" v-if="loginornot"></em>
|
<em class="rc-screen-reader" v-if="loginornot"></em>
|
||||||
</a>
|
</a>
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="crumbs" v-if="showTab">
|
<div class="ts-crumbs rc-max-width--xl rc-padding-y--md" v-if="showTab" :style="crumbStyle">
|
||||||
<el-breadcrumb separator-class="el-icon-arrow-right">
|
<el-breadcrumb separator-class="el-icon-arrow-right">
|
||||||
<el-breadcrumb-item to="/" >{{ this.homepageName }}</el-breadcrumb-item>
|
<el-breadcrumb-item to="/" >{{ this.homepageName }}</el-breadcrumb-item>
|
||||||
|
|
||||||
<el-breadcrumb-item :to=item.path v-for="(item, index) in crumbs"
|
<el-breadcrumb-item :to=item.path v-for="(item, index) in displayData"
|
||||||
:key="index">{{ item.title }}</el-breadcrumb-item>
|
:key="index">{{ item.title }}</el-breadcrumb-item>
|
||||||
</el-breadcrumb>
|
</el-breadcrumb>
|
||||||
</div>
|
</div>
|
||||||
@ -11,171 +11,76 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { mapState, mapMutations } from "vuex";
|
import { mapState, mapMutations } from "vuex";
|
||||||
|
import tabs from "~/components/tabs.vue";
|
||||||
export default {
|
export default {
|
||||||
props:["crumbs"],
|
props:["crumbs","crumbStyle"],
|
||||||
name:"crumbs",
|
name:"crumbs",
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
homepageName:'首页'
|
displayData:[],
|
||||||
|
homepageName:'定制营养方案',
|
||||||
|
nameMapping:{
|
||||||
|
'/productdetails/productlist':'产品分类',
|
||||||
|
'/usersearch/search':'产品搜索',
|
||||||
|
'/personal/mypersonal':'个人中心',
|
||||||
|
'/personal/usermember/':'会员权益',
|
||||||
|
'/personal/integral/':'积分明细',
|
||||||
|
'/personal/settlement/':'订单确认',
|
||||||
|
'/personal/useraddress/':'我的订单',
|
||||||
|
'/myorder/userrecord/':'购物车',
|
||||||
|
'/useraddress/openaddress/':'收货地址',
|
||||||
|
'/personal/discount/':'优惠券'
|
||||||
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created(){
|
created(){
|
||||||
if(this.showTab != false)
|
if(this.showTab != false)
|
||||||
this.showTab=true;
|
this.showTab=true;
|
||||||
|
this.build();
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
crumbs(val) {
|
||||||
|
this.crumbs = val;
|
||||||
|
this.build();
|
||||||
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
...mapMutations(["changemessage",'selectMenu'])
|
//...mapMutations(["changemessage",'selectMenu']),
|
||||||
|
build() {
|
||||||
|
let _self = this;
|
||||||
|
this.displayData=[];
|
||||||
|
if(this.crumbs && this.crumbs.length>0)
|
||||||
|
{
|
||||||
|
this.crumbs.forEach(function(ele,index){
|
||||||
|
let displayObj= {path:'',title:''};
|
||||||
|
if(ele.path) {
|
||||||
|
displayObj.path = ele.path;
|
||||||
|
for(let path in _self.nameMapping) {
|
||||||
|
if(ele.path.indexOf(path)>-1) {
|
||||||
|
displayObj.path = path;
|
||||||
|
displayObj.title = _self.nameMapping[path];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(ele.title) {
|
||||||
|
displayObj.title = ele.title;
|
||||||
|
}
|
||||||
|
_self.displayData.push(displayObj);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
.crumbs{
|
/deep/.el-breadcrumb__inner.is-link:hover {
|
||||||
width: 93%;
|
color:#E2001A;
|
||||||
margin: 0 auto;
|
|
||||||
display: flex;
|
|
||||||
height: 40px;
|
|
||||||
align-items: center;
|
|
||||||
margin-top: 70px;
|
|
||||||
}
|
}
|
||||||
.tags-scroll-content {
|
.ts-crumbs{
|
||||||
position: relative;
|
padding-left:1.25rem;
|
||||||
box-sizing: border-box;
|
|
||||||
width: 100%;
|
|
||||||
height: 43px;
|
|
||||||
z-index: 0;
|
|
||||||
overflow: hidden;
|
|
||||||
// padding: 0 66px 0 21px;
|
|
||||||
}
|
|
||||||
.tabs {
|
|
||||||
user-select: none;
|
|
||||||
z-index: 20;
|
|
||||||
width: 100%;
|
|
||||||
|
|
||||||
height: 43px;
|
|
||||||
top: 60px;
|
|
||||||
height: 42px;
|
|
||||||
background: white;
|
|
||||||
.tag {
|
|
||||||
display: inline-block;
|
|
||||||
height: 43px;
|
|
||||||
// position: absolute;
|
|
||||||
padding-right: 40px;
|
|
||||||
width: 100%;
|
|
||||||
overflow-x: auto;
|
|
||||||
white-space: nowrap;
|
|
||||||
}
|
|
||||||
.tags-scroll-content > i {
|
|
||||||
height: 40px;
|
|
||||||
line-height: 40px;
|
|
||||||
background: white;
|
|
||||||
cursor: pointer;
|
|
||||||
z-index: 1;
|
|
||||||
font-size: 16px;
|
|
||||||
}
|
|
||||||
.el-icon-arrow-left {
|
|
||||||
position: absolute;
|
|
||||||
left: 0;
|
|
||||||
width: 21px;
|
|
||||||
box-shadow: 0px 1px 8px 0px rgba(70, 70, 70, 0.32);
|
|
||||||
}
|
|
||||||
.el-icon-arrow-right {
|
|
||||||
position: absolute;
|
|
||||||
right: 40px;
|
|
||||||
width: 21px;
|
|
||||||
}
|
|
||||||
.close {
|
|
||||||
position: absolute;
|
|
||||||
right: 0;
|
|
||||||
top: 0;
|
|
||||||
color: black;
|
|
||||||
background: white;
|
|
||||||
height: 40px;
|
|
||||||
padding-left: 15px;
|
|
||||||
line-height: 40px;
|
|
||||||
width: 40px;
|
|
||||||
border-left: 1px solid #f1f1f1 !important;
|
|
||||||
font-size: 16px;
|
|
||||||
cursor: pointer;
|
|
||||||
}
|
|
||||||
.el-tag--dark {
|
|
||||||
background: white;
|
|
||||||
em {
|
|
||||||
display: inline-block;
|
|
||||||
vertical-align: middle;
|
|
||||||
height: 5px;
|
|
||||||
margin-right: 7px;
|
|
||||||
width: 5px;
|
|
||||||
border-radius: 50%;
|
|
||||||
background-color: #85ef47 !important;
|
|
||||||
box-shadow: 0 0 7px #b7eb8f;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.el-tag--dark {
|
|
||||||
color: #323233 !important;
|
|
||||||
.el-icon-close {
|
|
||||||
color: black !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.el-tag {
|
|
||||||
.el-icon-close {
|
|
||||||
font-size: 16px;
|
|
||||||
&:hover {
|
|
||||||
color: red !important;
|
|
||||||
background: white !important;
|
|
||||||
}
|
|
||||||
display: inline-block;
|
|
||||||
|
|
||||||
}
|
|
||||||
// width: 140px;
|
|
||||||
em {
|
|
||||||
display: inline-block;
|
|
||||||
vertical-align: middle;
|
|
||||||
height: 5px;
|
|
||||||
margin-right: 7px;
|
|
||||||
width: 5px;
|
|
||||||
border-radius: 50%;
|
|
||||||
background-color: white;
|
|
||||||
}
|
|
||||||
cursor: pointer;
|
|
||||||
height: 40px;
|
|
||||||
line-height: 40px;
|
|
||||||
display: inline-block;
|
|
||||||
text-align: center;
|
|
||||||
padding: 0;
|
|
||||||
color: #969799;
|
|
||||||
font-size: 13px;
|
|
||||||
float: left;
|
|
||||||
border-radius: 0;
|
|
||||||
border: 0;
|
|
||||||
> span {
|
|
||||||
display: inline-block;
|
|
||||||
vertical-align: middle;
|
|
||||||
}
|
|
||||||
i {
|
|
||||||
display: inline-block;
|
|
||||||
vertical-align: middle;
|
|
||||||
top: 0px;
|
|
||||||
|
|
||||||
}
|
|
||||||
.el-tag__close {
|
|
||||||
right: 0px;
|
|
||||||
color: #777777;
|
|
||||||
&:hover {
|
|
||||||
color: white;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.el-xie{
|
|
||||||
list-style: none;
|
|
||||||
font-style: normal;
|
|
||||||
margin: 0 8px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
@ -2,4 +2,13 @@
|
|||||||
module.exports={
|
module.exports={
|
||||||
//图片路径地址
|
//图片路径地址
|
||||||
rbs:'http://47.96.75.242:10086/royalcanin/',
|
rbs:'http://47.96.75.242:10086/royalcanin/',
|
||||||
|
//成猫肝脏全价处方量
|
||||||
|
hotcat:'https://detail.tmall.com/item.htm?spm=a1z10.3-b-s.w4011-22642828081.211.262fb910fpPRF5&id=614604022166&rn=5eba1d0b816544b39888beddbf21d03a&abbucket=19&skuId=4624275223532',
|
||||||
|
//成猫优纤易消化全价处方粮
|
||||||
|
hotcat1:"https://detail.tmall.com/item.htm?spm=a1z10.3-b-s.w4011-22642828081.75.6070b910aVqaCe&id=614817599199&rn=7413968dc827a6cae94ffaf684c78384&abbucket=19&skuId=4798969553513",
|
||||||
|
|
||||||
|
//成猫肠道全价处方粮(适中能量)
|
||||||
|
hotcat2:'https://detail.tmall.com/item.htm?spm=a1z10.3-b-s.w4011-22642828081.150.6070b910aVqaCe&id=620738193181&rn=7413968dc827a6cae94ffaf684c78384&abbucket=19&skuId=4938650051548',
|
||||||
|
//成猫肠道全价处方粮
|
||||||
|
hotcat3:'https://detail.tmall.com/item.htm?spm=a1z10.3-b-s.w4011-22642828081.51.6070b910aVqaCe&id=618722103730&rn=7413968dc827a6cae94ffaf684c78384&abbucket=19&skuId=4910398135159',
|
||||||
}
|
}
|
||||||
|
67
rc-busness/layouts/error.vue
Normal file
67
rc-busness/layouts/error.vue
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
<template>
|
||||||
|
<div class="wrapper">
|
||||||
|
<img src="/images/default.jpg">
|
||||||
|
<div v-if='error.statusCode==404'>
|
||||||
|
<h2>{{ error.statusCode }} 找不到指定页面</h2>
|
||||||
|
<div>
|
||||||
|
<a href="javascript:history.back()">返回上一页</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div v-if='error.statusCode!=404'>
|
||||||
|
<h2>{{ error.statusCode }} 发现未知错误</h2>
|
||||||
|
<div>
|
||||||
|
<a href="/">返回首页</a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
export default {
|
||||||
|
props: ['error'],
|
||||||
|
layout: 'error',
|
||||||
|
created(){
|
||||||
|
|
||||||
|
},
|
||||||
|
method:{
|
||||||
|
backToLastPage(){
|
||||||
|
window.history.back();
|
||||||
|
},
|
||||||
|
backToHome(){
|
||||||
|
window.location.href="/";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style lang="less" scoped >
|
||||||
|
html,body{
|
||||||
|
width:100%;
|
||||||
|
height:100%;
|
||||||
|
overflow:hidden;
|
||||||
|
}
|
||||||
|
.wrapper{
|
||||||
|
width:100%;
|
||||||
|
height:100%;
|
||||||
|
display:flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
h2{
|
||||||
|
font-size: 2.5rem;
|
||||||
|
line-height: 3.5rem;
|
||||||
|
color:#e2001a;
|
||||||
|
}
|
||||||
|
a{
|
||||||
|
color:#666;
|
||||||
|
text-decoration: none;
|
||||||
|
padding-bottom:.25rem;
|
||||||
|
border-bottom: 1px solid #666;
|
||||||
|
}
|
||||||
|
a:hover {
|
||||||
|
color:#e2001a;
|
||||||
|
border-color: #e2001a;
|
||||||
|
}
|
||||||
|
</style>
|
@ -1,7 +1,5 @@
|
|||||||
|
|
||||||
export default ({store, route, redirect}) => {
|
export default ({store, route, redirect}) => {
|
||||||
route.matched.forEach((item, index) => {
|
route.matched.forEach((item, index) => {
|
||||||
item.meta.title = route.meta[index].title || '';
|
item.meta.title = route.meta[index].title || '';
|
||||||
item.meta.redirect = route.meta[index].redirect || '';//设置重定向
|
|
||||||
})
|
})
|
||||||
}
|
}
|
25621
rc-busness/package-lock.json
generated
Normal file
25621
rc-busness/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -75,7 +75,7 @@
|
|||||||
<!-- <h2>明星猫粮</h2> -->
|
<!-- <h2>明星猫粮</h2> -->
|
||||||
<div class="pageFullScreen" id="xxxFullScreen" v-show="catproduct" ref="mingxing">
|
<div class="pageFullScreen" id="xxxFullScreen" v-show="catproduct" ref="mingxing">
|
||||||
<!-- 内容 -->
|
<!-- 内容 -->
|
||||||
<div class="rc-full-width rc-padding-y--md" id="swiper1">
|
<div class="rc-full-width rc-padding-y--md" id="swiper1" :style="usermargin" >
|
||||||
<h2 class="rc-beta rc-text--center">{{usertitle}}</h2>
|
<h2 class="rc-beta rc-text--center">{{usertitle}}</h2>
|
||||||
<!-- 轮播图 -->
|
<!-- 轮播图 -->
|
||||||
<div class="ts-carousel-container">
|
<div class="ts-carousel-container">
|
||||||
@ -97,18 +97,17 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="sw-center" >
|
<div class="sw-center" >
|
||||||
<div class="rc-click" @click="selectproduce(item,index)">
|
<div class="rc-click">
|
||||||
<div class="uservideo">
|
<div class="uservideo" @click="playMobileVideo(item)">
|
||||||
<video controls="controls" :poster=item.catimage preload="none">
|
<img :src="item.catimage">
|
||||||
<source :src= item.video type="video/ogg">
|
|
||||||
</video>
|
|
||||||
</div>
|
</div>
|
||||||
|
<div class='click-zone' @click="selectproduce(item,index)">
|
||||||
<img :src=item.productimage alt="">
|
<img :src=item.productimage alt="">
|
||||||
<span>{{item.title}}</span>
|
<span>{{item.title}}</span>
|
||||||
<p>{{item.detail}}</p>
|
<p>{{item.detail}}</p>
|
||||||
<em>{{item.price}}</em>
|
<em>{{item.price}}</em>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<div class="rc-full-width rc-margin-y--md">
|
<div class="rc-full-width rc-margin-y--md">
|
||||||
<i @click="selectproduce(item,index)" class="ts-standard-btn ts-standard-btn--two center">立即购买</i>
|
<i @click="selectproduce(item,index)" class="ts-standard-btn ts-standard-btn--two center">立即购买</i>
|
||||||
</div>
|
</div>
|
||||||
@ -331,18 +330,17 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="sw-center" >
|
<div class="sw-center" >
|
||||||
<div class="rc-click" @click="selectproduce(item,index)">
|
<div class="rc-click" >
|
||||||
<div class="uservideo">
|
<div class="uservideo" @click="playMobileVideo(item)">
|
||||||
<video controls="controls" preload="none" :poster="item.catimage">
|
<img :src="item.catimage">
|
||||||
<source :src= item.video type="video/ogg">
|
|
||||||
</video>
|
|
||||||
</div>
|
</div>
|
||||||
|
<div class='click-zone' @click="selectproduce(item,index)">
|
||||||
<img :src=item.productimage alt="">
|
<img :src=item.productimage alt="">
|
||||||
<span>{{item.title}}</span>
|
<span>{{item.title}}</span>
|
||||||
<p>{{item.detail}}</p>
|
<p>{{item.detail}}</p>
|
||||||
<em>{{item.price}}</em>
|
<em>{{item.price}}</em>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
<div class="rc-full-width rc-margin-y--md">
|
<div class="rc-full-width rc-margin-y--md">
|
||||||
<i @click="selectproduce(item,index)" class="ts-standard-btn ts-standard-btn--two center">立即购买</i>
|
<i @click="selectproduce(item,index)" class="ts-standard-btn ts-standard-btn--two center">立即购买</i>
|
||||||
</div>
|
</div>
|
||||||
@ -694,8 +692,11 @@
|
|||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="ts-mask ts-mobile-player-container" v-show="mobileVideoPlaying">
|
||||||
|
<div class="ts-mask-bg"></div>
|
||||||
|
<div class="ts-mask-close" @click="closeMobileVideo"></div>
|
||||||
|
<video controls="controls" ref="mobile-video-player"></video>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@ -751,14 +752,16 @@
|
|||||||
return{
|
return{
|
||||||
fixedHeader:false,
|
fixedHeader:false,
|
||||||
dataLoaded:true,
|
dataLoaded:true,
|
||||||
|
usermargin:{marginTop: '0'},
|
||||||
useraindex:0,
|
useraindex:0,
|
||||||
|
mobileVideoPlaying:false,
|
||||||
usertitle:'明星猫粮',
|
usertitle:'明星猫粮',
|
||||||
dogtitle:'明星犬粮',
|
dogtitle:'明星犬粮',
|
||||||
processinformation:[],
|
processinformation:[],
|
||||||
catshi:[],
|
catshi:[],
|
||||||
userindex:0,
|
userindex:0,
|
||||||
userstype:'',
|
userstype:'',
|
||||||
|
usertop:true,
|
||||||
onemao:false,
|
onemao:false,
|
||||||
twomao:false,
|
twomao:false,
|
||||||
threemao:false,
|
threemao:false,
|
||||||
@ -1096,7 +1099,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
catStarProductswiperOption: {
|
catStarProductswiperOption: {
|
||||||
loop: true,
|
//loop: true,
|
||||||
slidesPerView: 'auto',
|
slidesPerView: 'auto',
|
||||||
centeredSlides: true,
|
centeredSlides: true,
|
||||||
speed:1000,
|
speed:1000,
|
||||||
@ -1120,7 +1123,7 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
dogStarProductswiperOption: {
|
dogStarProductswiperOption: {
|
||||||
loop: true,
|
//loop: true,
|
||||||
slidesPerView: 'auto',
|
slidesPerView: 'auto',
|
||||||
centeredSlides: true,
|
centeredSlides: true,
|
||||||
speed:1000,
|
speed:1000,
|
||||||
@ -1177,6 +1180,19 @@
|
|||||||
window.removeEventListener('scroll', this.scrollToTop);
|
window.removeEventListener('scroll', this.scrollToTop);
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
|
playMobileVideo(item){
|
||||||
|
let videoPath=item.video;
|
||||||
|
let player = this.$refs['mobile-video-player'];
|
||||||
|
let _self = this;
|
||||||
|
player.src=videoPath;
|
||||||
|
player.play();
|
||||||
|
this.mobileVideoPlaying = true;
|
||||||
|
},
|
||||||
|
closeMobileVideo(){
|
||||||
|
this.mobileVideoPlaying = false;
|
||||||
|
let player = this.$refs['mobile-video-player'];
|
||||||
|
player.pause();
|
||||||
|
},
|
||||||
ifAdoid(item,index){
|
ifAdoid(item,index){
|
||||||
//console.log(index);
|
//console.log(index);
|
||||||
this.userindex=index;
|
this.userindex=index;
|
||||||
@ -1190,10 +1206,13 @@
|
|||||||
var bIsCE = sUserAgent.match(/windows ce/i) == "windows ce";
|
var bIsCE = sUserAgent.match(/windows ce/i) == "windows ce";
|
||||||
var bIsWM = sUserAgent.match(/windows mobile/i) == "windows mobile";
|
var bIsWM = sUserAgent.match(/windows mobile/i) == "windows mobile";
|
||||||
if (!(bIsIpad || bIsIphoneOs || bIsMidp || bIsUc7 || bIsUc || bIsAndroid || bIsCE || bIsWM)) {
|
if (!(bIsIpad || bIsIphoneOs || bIsMidp || bIsUc7 || bIsUc || bIsAndroid || bIsCE || bIsWM)) {
|
||||||
//console.log("当前是电脑打开")
|
console.log("当前是电脑打开")
|
||||||
this.stypechange=false;
|
this.stypechange=false;
|
||||||
//console.log(this.usertitle)
|
//console.log(this.usertitle)
|
||||||
|
this.usermargin={
|
||||||
|
marginTop:'0',
|
||||||
|
}
|
||||||
|
this.usertop=false,
|
||||||
this.catproduct=true;
|
this.catproduct=true;
|
||||||
this.onemao=false;
|
this.onemao=false;
|
||||||
this.twomao=false;
|
this.twomao=false;
|
||||||
@ -1206,12 +1225,13 @@
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
//console.log("当前是手机打开")
|
console.log("当前是手机打开")
|
||||||
this.showingBanners=this.banners.mobile;
|
this.showingBanners=this.banners.mobile;
|
||||||
this.stypechange=true;
|
this.stypechange=true;
|
||||||
this.onemao=true;
|
this.onemao=true;
|
||||||
this.twomao=true;
|
this.twomao=true;
|
||||||
this.threemao=true;
|
this.threemao=true;
|
||||||
|
this.usertop=true,
|
||||||
this.fourmao=true;
|
this.fourmao=true;
|
||||||
this.fivemao=true;
|
this.fivemao=true;
|
||||||
this.dogshow=true;
|
this.dogshow=true;
|
||||||
@ -1447,6 +1467,7 @@
|
|||||||
this.fixedHeader=false;
|
this.fixedHeader=false;
|
||||||
this.gotop = true
|
this.gotop = true
|
||||||
this.searchBar=false
|
this.searchBar=false
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1454,6 +1475,14 @@
|
|||||||
this.gotop = false;
|
this.gotop = false;
|
||||||
this.searchBar=true
|
this.searchBar=true
|
||||||
}
|
}
|
||||||
|
console.log(this.searchBar);
|
||||||
|
if(this.searchBar==false && this.usertop==true){
|
||||||
|
this.usermargin={marginTop: '270px'};
|
||||||
|
}else{
|
||||||
|
this.usermargin={marginTop: '0px'};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
async courseId(item) {
|
async courseId(item) {
|
||||||
this.dataLoaded=false;
|
this.dataLoaded=false;
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<div class="rc-header">
|
|
||||||
<Myheader></Myheader>
|
<Myheader></Myheader>
|
||||||
</div>
|
<div class="rc-top"></div>
|
||||||
<div class="rc-main">
|
<tabs :crumbs="crumbs"></tabs>
|
||||||
<tabs></tabs>
|
|
||||||
|
<div class="rc-main rc-max-width--xl">
|
||||||
<div class="cart-list">
|
<div class="cart-list">
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<div class="list-left">
|
<div class="list-left">
|
||||||
<label class="check-label">
|
<label class="check-label" style="visibility: hidden;">
|
||||||
<input type="checkbox" v-model="checkAll" />
|
<input type="checkbox" v-model="checkAll" />
|
||||||
</label>
|
</label>
|
||||||
<span class="name">商品</span>
|
<span class="name">商品</span>
|
||||||
@ -22,7 +22,7 @@
|
|||||||
<div class="header_ph">
|
<div class="header_ph">
|
||||||
<el-row>
|
<el-row>
|
||||||
<el-col :span="12">
|
<el-col :span="12">
|
||||||
<div class="list-left">
|
<div class="list-left" style="visibility: hidden;">
|
||||||
<label class="check-label">
|
<label class="check-label">
|
||||||
<input type="checkbox" v-model="checkAll" />
|
<input type="checkbox" v-model="checkAll" />
|
||||||
</label>
|
</label>
|
||||||
@ -76,7 +76,7 @@
|
|||||||
<div class="rc-footera">
|
<div class="rc-footera">
|
||||||
<div class="rc-foote">
|
<div class="rc-foote">
|
||||||
<div class="rc-shop">
|
<div class="rc-shop">
|
||||||
<label>
|
<label style="visibility: hidden;">
|
||||||
<input type="checkbox" v-model="checkAll" />
|
<input type="checkbox" v-model="checkAll" />
|
||||||
全选
|
全选
|
||||||
</label>
|
</label>
|
||||||
@ -114,12 +114,21 @@
|
|||||||
import Myheader from "~/components/header.vue";
|
import Myheader from "~/components/header.vue";
|
||||||
import MyFooter from '~/components/rc-footer.vue'
|
import MyFooter from '~/components/rc-footer.vue'
|
||||||
import tabs from "@/components/tabs.vue";
|
import tabs from "@/components/tabs.vue";
|
||||||
|
import { mapMutations } from "vuex";
|
||||||
import { isexistCart, generateOrderWX, deleteCart } from "../../ajax/getData";
|
import { isexistCart, generateOrderWX, deleteCart } from "../../ajax/getData";
|
||||||
export default {
|
export default {
|
||||||
middleware: "metaTitle",
|
middleware: "metaTitle",
|
||||||
meta: { title: "购物车" },
|
meta: { title: "购物车" },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
crumbs:[
|
||||||
|
{
|
||||||
|
path:'/productdetails/productlist/',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path:'/myorder/userrecord/'
|
||||||
|
}
|
||||||
|
],
|
||||||
ordersum: 1,
|
ordersum: 1,
|
||||||
usercheckbox: false,
|
usercheckbox: false,
|
||||||
shopnum: 0,
|
shopnum: 0,
|
||||||
@ -174,26 +183,26 @@ export default {
|
|||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.carmessage();
|
this.carmessage();
|
||||||
|
this.checkIsLogin();
|
||||||
},
|
},
|
||||||
|
|
||||||
components: {
|
components: {
|
||||||
Myheader,
|
Myheader,
|
||||||
tabs,
|
tabs,
|
||||||
MyFooter,
|
MyFooter
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
//请求猫
|
//请求猫
|
||||||
|
...mapMutations(["checkIsLogin"]),
|
||||||
async carmessage() {
|
async carmessage() {
|
||||||
let user = JSON.parse(localStorage.getItem("userInfo"));
|
let user = this.$store.state.userInfo;
|
||||||
this.userid = user.data.id;
|
this.userid = user.data.id;
|
||||||
let data = await isexistCart(user.data.id);
|
let data = await isexistCart(user.data.id);
|
||||||
this.cartData = data;
|
this.cartData = data;
|
||||||
// this.goldmedal = data;
|
// this.goldmedal = data;
|
||||||
},
|
},
|
||||||
async userjie(list) {
|
async userjie(list) {
|
||||||
let user = JSON.parse(localStorage.getItem("userInfo"));
|
let user = this.$store.state.userInfo;
|
||||||
console.log(user);
|
|
||||||
this.userid = user.data.id;
|
this.userid = user.data.id;
|
||||||
let data = await generateOrderWX(list);
|
let data = await generateOrderWX(list);
|
||||||
if (data) {
|
if (data) {
|
||||||
@ -201,7 +210,6 @@ export default {
|
|||||||
type: "warning",
|
type: "warning",
|
||||||
message: data.msg,
|
message: data.msg,
|
||||||
});
|
});
|
||||||
console.log(data);
|
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
path: "/personal/settlement",
|
path: "/personal/settlement",
|
||||||
query: {
|
query: {
|
||||||
@ -209,12 +217,11 @@ export default {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
console.log(data);
|
|
||||||
},
|
},
|
||||||
|
|
||||||
//删除购物车
|
//删除购物车
|
||||||
async deletsmessage(productCode) {
|
async deletsmessage(productCode) {
|
||||||
let user = JSON.parse(localStorage.getItem("userInfo"));
|
let user = this.$store.state.userInfo;
|
||||||
this.userid = user.data.id;
|
this.userid = user.data.id;
|
||||||
let data = await deleteCart( productCode);
|
let data = await deleteCart( productCode);
|
||||||
if (data) {
|
if (data) {
|
||||||
@ -267,6 +274,15 @@ export default {
|
|||||||
// });
|
// });
|
||||||
},
|
},
|
||||||
plus(num, index) {
|
plus(num, index) {
|
||||||
|
let leftAllotment = this.cartData[index].leftAllotment;
|
||||||
|
if(this.cartData[index].buyCount >= leftAllotment) {
|
||||||
|
this.$message({
|
||||||
|
type: "error",
|
||||||
|
message: "已达到本品最大购买上限",
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
this.cartData[index].buyCount =
|
this.cartData[index].buyCount =
|
||||||
parseInt(this.cartData[index].buyCount) + 1;
|
parseInt(this.cartData[index].buyCount) + 1;
|
||||||
},
|
},
|
||||||
@ -287,7 +303,6 @@ export default {
|
|||||||
if (this.ys1 == false) {
|
if (this.ys1 == false) {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.userdelete = "删除";
|
this.userdelete = "删除";
|
||||||
console.log(this.userdelete);
|
|
||||||
});
|
});
|
||||||
} else if (this.ys1 == true) {
|
} else if (this.ys1 == true) {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
@ -504,10 +519,6 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.rc-main {
|
.rc-main {
|
||||||
width: 92%;
|
|
||||||
margin: 0 auto;
|
|
||||||
padding-top: 60px;
|
|
||||||
max-width: 1400px;
|
|
||||||
.cart-list {
|
.cart-list {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
border: 1px solid #d7d7d7;
|
border: 1px solid #d7d7d7;
|
||||||
@ -775,8 +786,8 @@ export default {
|
|||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
ul {
|
ul {
|
||||||
margin-top: -32px;
|
margin-top: -2rem;
|
||||||
margin-left: 140px;
|
margin-left: 9.75rem;
|
||||||
width: 50%;
|
width: 50%;
|
||||||
.del {
|
.del {
|
||||||
display: none;
|
display: none;
|
||||||
@ -796,6 +807,7 @@ export default {
|
|||||||
bottom: 0;
|
bottom: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
z-index: 10;
|
z-index: 10;
|
||||||
|
margin-bottom:0;
|
||||||
.rc-shop {
|
.rc-shop {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
@ -2,63 +2,82 @@
|
|||||||
<div class="user-main">
|
<div class="user-main">
|
||||||
<Myheader></Myheader>
|
<Myheader></Myheader>
|
||||||
<div class="rc-top"></div>
|
<div class="rc-top"></div>
|
||||||
<div class="rc-main" v-for="(item,index) in goldmedal" :key="item.id" >
|
<div class="rc-main" v-for="(item, index) in goldmedal" :key="item.id">
|
||||||
<div class="rc-receiving" >
|
<div class="online bold">
|
||||||
<em>{{item.status=='0'?'待付款':item.status=='1'?'待收货':item.status=='2'?'已完成':item.status=='3'?'已取消':'异常订单'}}</em>
|
|
||||||
<span>{{orderstatus}}</span>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="rc-border"></div>
|
<div class="rc-receiving useruantity">
|
||||||
<div v-if="isshow">
|
<em>{{
|
||||||
<div class="delivery" v-for="(userdata,index) in delivery" :key="index" >
|
item.status == "0"
|
||||||
|
? "待付款"
|
||||||
|
: item.status == "1"
|
||||||
|
? "待收货"
|
||||||
|
: item.status == "2"
|
||||||
|
? "已完成"
|
||||||
|
: item.status == "3"
|
||||||
|
? "已取消"
|
||||||
|
: "异常订单"
|
||||||
|
}}</em>
|
||||||
|
<span>{{ orderstatus }}</span>
|
||||||
|
</div>
|
||||||
|
<div class="online bold">
|
||||||
|
</div>
|
||||||
|
<div class="delivery useruantity" v-if="isshow">
|
||||||
<div class="to-delivery">
|
<div class="to-delivery">
|
||||||
<span>{{ userdata.state }}</span>
|
<img src="../../static/images/delivery.png" alt="">
|
||||||
<i>{{ userdata.time }}</i>
|
<span>{{ trackingstates }}</span>
|
||||||
|
<!-- <i>2021-1-21</i> -->
|
||||||
</div>
|
</div>
|
||||||
<div class="bo-delivery">
|
<div class="bo-delivery">
|
||||||
<span>{{ userdata.address }}</span>
|
<!-- <span> 广州天河—刘某某【15124617917】正在派送中</span> -->
|
||||||
|
<!-- {{ logisticsCompany }} -->
|
||||||
</div>
|
</div>
|
||||||
<div class="viewdetails">
|
<div class="viewdetails">
|
||||||
<span>查看详情</span>
|
<span>查看详情</span>
|
||||||
<img :src="leftico" alt="" />
|
<img :src="leftico" alt="" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
<div class="online bold">
|
||||||
<div
|
</div>
|
||||||
class="mypersonal"
|
<div class="mypersonal useruantity">
|
||||||
v-for="(datddress, index) in useraddress"
|
|
||||||
:key="datddress.id"
|
|
||||||
>
|
|
||||||
<div class="my-delivery">
|
<div class="my-delivery">
|
||||||
<span>{{ datddress.recipient }}</span>
|
<span>{{ item.addressUserName }}</span>
|
||||||
<i>{{ datddress.recipientPhone }}</i>
|
<i>{{ item.addressPhoneNumber }}</i>
|
||||||
</div>
|
</div>
|
||||||
<div class="per-delivery">
|
<div class="per-delivery">
|
||||||
<span>{{ datddress.provinceName }}{{datddress.cityName}}{{datddress.districtName}}{{datddress.detailAddress}}</span>
|
<span
|
||||||
|
>{{ item.addressProvinceName }}{{ item.addressCityName
|
||||||
|
}}{{ item.addressCountyName }}</span
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div >
|
<div class="online bold"></div>
|
||||||
|
<div>
|
||||||
<div class="rc-center">
|
<div class="rc-center">
|
||||||
<div class="rc-usermain" v-for="(userlist,index) in item.orderDetailList" :key="index">
|
<div
|
||||||
|
class="rc-usermain useruantity"
|
||||||
|
v-for="(userlist, index) in item.orderDetailList"
|
||||||
|
:key="index"
|
||||||
|
|
||||||
|
>
|
||||||
<div class="rc-image">
|
<div class="rc-image">
|
||||||
<img :src="item.catimage" alt="" />
|
<img :src="userlist.picFile" alt="" />
|
||||||
</div>
|
</div>
|
||||||
<div class="rc-right">
|
<div class="rc-right">
|
||||||
<div class="rc-usercenter">
|
<div class="rc-usercenter">
|
||||||
<em>{{ userlist.productName }}</em>
|
<em>{{ userlist.productName }}</em>
|
||||||
<div class="rc-userright">
|
<div class="rc-userright">
|
||||||
<span>规格:{{ item.productId }}</span>
|
<span>规格:{{ userlist.specifications }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="rc-userbottom">
|
<div class="rc-userbottom">
|
||||||
<span>数量:{{ item.pcs }}件</span>
|
<span>数量:{{ userlist.pcs }}件</span>
|
||||||
<i>¥{{ item.ecPrice }}</i>
|
<i>¥{{ userlist.ecPrice }}</i>
|
||||||
<div class="rc-bottom">
|
<div class="rc-bottom">
|
||||||
<span @click="userpay()">{{customer}}</span>
|
<span @click="userpay()">{{ customer }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="rc-bottomm">
|
<div class="rc-bottomm">
|
||||||
<span @click="userpay()">{{customer}}</span>
|
<span @click="userpay()">{{ customer }}</span>
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="rc-userbottomm">
|
<!-- <div class="rc-userbottomm">
|
||||||
<i>¥{{ item.userprice }}</i>
|
<i>¥{{ item.userprice }}</i>
|
||||||
@ -67,8 +86,10 @@
|
|||||||
</div> -->
|
</div> -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="online bold"></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="rc-merchandise">
|
<div class="rc-merchandise ">
|
||||||
|
<div class="rc-merchandise ">
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
<span>商品总价:</span>
|
<span>商品总价:</span>
|
||||||
@ -88,7 +109,9 @@
|
|||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="rc-payment">
|
||||||
<div class="rc-payment">
|
<div class="rc-payment">
|
||||||
<ul>
|
<ul>
|
||||||
<li>
|
<li>
|
||||||
@ -97,7 +120,7 @@
|
|||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<span>下单时间::</span>
|
<span>下单时间::</span>
|
||||||
<i>{{ item.orderDate }}</i>
|
<i>{{ logisticsDate }}</i>
|
||||||
</li>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<span>付款方式::</span>
|
<span>付款方式::</span>
|
||||||
@ -110,34 +133,34 @@
|
|||||||
<li>
|
<li>
|
||||||
<span>快递单号:</span>
|
<span>快递单号:</span>
|
||||||
<div class="u-trackingnumber">
|
<div class="u-trackingnumber">
|
||||||
<i>{{ logisticsNumber }}
|
<i>{{ logisticsNumber }} </i>
|
||||||
</i>
|
|
||||||
<!-- <img :src="information.catimage" alt=""> -->
|
<!-- <img :src="information.catimage" alt=""> -->
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="rc-foot">
|
<div class="rc-foot">
|
||||||
<div class="rc-foo">
|
<div class="rc-foo">
|
||||||
<div style="padding-top:55px">
|
<div style="padding-top: 55px">
|
||||||
<i>合计金额:</i>
|
<i>合计金额:</i>
|
||||||
<em>¥{{usersalesAmount}}</em>
|
<em>¥{{ usersalesAmount }}</em>
|
||||||
|
</div>
|
||||||
|
<div style="padding-bottom: 40px; cursor: pointer">
|
||||||
|
<span @click="onceagain(item)"> {{ payorsucess }}</span>
|
||||||
</div>
|
</div>
|
||||||
<div style="padding-bottom:40px">
|
|
||||||
<span @click="onceagain">再次购买</span>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="rc-full-width rc-margin-y--md">
|
<div class="rc-full-width rc-margin-y--md">
|
||||||
<i class="ts-standard-btn ts-standard-btn--two center" @click="onceagain">
|
<i
|
||||||
{{payorsucess}}
|
class="ts-standard-btn ts-standard-btn--two center"
|
||||||
|
@click="onceagain()"
|
||||||
|
>
|
||||||
|
{{ payorsucess }}
|
||||||
</i>
|
</i>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<MyFooter></MyFooter>
|
<MyFooter></MyFooter>
|
||||||
@ -147,46 +170,51 @@
|
|||||||
<script>
|
<script>
|
||||||
import Myheader from "~/components/header.vue";
|
import Myheader from "~/components/header.vue";
|
||||||
import { mapMutations } from "vuex";
|
import { mapMutations } from "vuex";
|
||||||
import { userin} from "../../ajax/getData";
|
import { userin } from "../../ajax/getData";
|
||||||
import MyFooter from '~/components/rc-footer.vue'
|
import MyFooter from "~/components/rc-footer.vue";
|
||||||
import {selectaddress,canceldanhao,generateOrderWX} from "../../ajax/getData";
|
import Vue from "vue";
|
||||||
|
let vm = new Vue();
|
||||||
|
import formatConversion from "../../static/js/date";
|
||||||
|
import {
|
||||||
|
selectaddress,
|
||||||
|
canceldanhao,
|
||||||
|
generateOrderWX,
|
||||||
|
} from "../../ajax/getData";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
goldmedal:[],
|
goldmedal: [],
|
||||||
userproductId:'',
|
userproductId: "",
|
||||||
userphone:'',
|
logisticsDate: "",
|
||||||
logisticsNumber:'',
|
addressPhoneNumber: "",
|
||||||
customer:'',//联系客服或者取消订单
|
userphone: "",
|
||||||
payorsucess:'', //立即支付或者再次购买,
|
logisticsNumber: "",
|
||||||
|
customer: "", //联系客服或者取消订单
|
||||||
|
payorsucess: "", //立即支付或者再次购买,
|
||||||
addressstype: null,
|
addressstype: null,
|
||||||
addressUserName:'',
|
addressUserName: "",
|
||||||
orderstatus: '',
|
logisticsCompany: "", //物流公司
|
||||||
goldastates:'',
|
orderstatus: "",
|
||||||
userisdelivery:'待收货',
|
goldastates: "",
|
||||||
|
|
||||||
|
userisdelivery: "待收货",
|
||||||
userdelivery: "派送中",
|
userdelivery: "派送中",
|
||||||
isshow:true,
|
isshow: true,
|
||||||
usersalesAmount:'',
|
usersalesAmount: "",
|
||||||
leftico: require("../../assets/image/rc-left.png"),
|
leftico: require("../../assets/image/rc-left.png"),
|
||||||
orderNumber:'',
|
orderNumber: "",
|
||||||
userdata:"",
|
userdata: "",
|
||||||
usermessage:null,
|
usermessage: null,
|
||||||
userid: null,
|
userid: null,
|
||||||
useralllist:[],
|
trackingstates: "", //运输状态
|
||||||
delivery: [
|
useralllist: [],
|
||||||
|
delivery: [],
|
||||||
|
|
||||||
],
|
useraddress: [],
|
||||||
|
|
||||||
useraddress: [
|
goldmedal: [],
|
||||||
|
shopprice: {},
|
||||||
],
|
|
||||||
|
|
||||||
goldmedal: [
|
|
||||||
|
|
||||||
],
|
|
||||||
shopprice: {
|
|
||||||
|
|
||||||
},
|
|
||||||
information: {
|
information: {
|
||||||
reference: "1111111111111111",
|
reference: "1111111111111111",
|
||||||
ordertime: "2012-12-01 11:20:00",
|
ordertime: "2012-12-01 11:20:00",
|
||||||
@ -198,14 +226,14 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
...mapMutations(["checkIsLogin"]),
|
...mapMutations(["checkIsLogin"]),
|
||||||
refreshDesktopNav:function(){
|
refreshDesktopNav: function () {
|
||||||
RCDL.navigation.currentState=null;
|
RCDL.navigation.currentState = null;
|
||||||
RCDL.navigation.rebuild();
|
RCDL.navigation.rebuild();
|
||||||
},
|
},
|
||||||
//取消订单
|
//取消订单
|
||||||
async canceldanhao(orderNumber) {
|
async canceldanhao(orderNumber) {
|
||||||
let data = await canceldanhao(this.userphone,this.orderNumber);
|
let data = await canceldanhao(this.userphone, this.orderNumber);
|
||||||
if (data) {
|
if (data) {
|
||||||
this.$message({
|
this.$message({
|
||||||
type: "warning",
|
type: "warning",
|
||||||
@ -219,153 +247,145 @@ export default {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
}, 500);
|
}, 500);
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
userpay(){
|
userpay() {
|
||||||
console.log('---');
|
console.log("---");
|
||||||
if(this.goldastates==0){
|
if (this.goldastates == 0) {
|
||||||
this.canceldanhao();
|
this.canceldanhao();
|
||||||
}
|
} else if ((this.customer = "联系客服申请售后")) {
|
||||||
else if( this.customer='联系客服申请售后'){
|
|
||||||
var option = {
|
var option = {
|
||||||
customer: {id: '', name: '', email: '', mobile: '', memberId: this.userdata.data.id}
|
customer: {
|
||||||
}
|
id: "",
|
||||||
|
name: "",
|
||||||
|
email: "",
|
||||||
|
mobile: "",
|
||||||
|
memberId: this.userdata.data.id,
|
||||||
|
},
|
||||||
|
};
|
||||||
dis_livchat(option);
|
dis_livchat(option);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//订单支付和再次购买
|
//订单支付和再次购买
|
||||||
onceagain(){
|
onceagain(item) {
|
||||||
console.log(this.payorsucess);
|
console.log(this.payorsucess);
|
||||||
if(this.payorsucess=='立即支付'){
|
if (this.payorsucess == "立即支付") {
|
||||||
console.log('----')
|
console.log("----");
|
||||||
this.getwei();
|
this.getwei(item);
|
||||||
}else{
|
} else {
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
path: "/productdetails/producted",
|
path: "/productdetails/producted",
|
||||||
query: {
|
query: {
|
||||||
stype: 1,
|
stype: 1,
|
||||||
productCode: this.userproductId
|
productCode: this.userproductId,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
console.log('不是立即支付');
|
console.log("不是立即支付");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
async orderquantity(orderNumber){
|
async orderquantity(orderNumber) {
|
||||||
|
let data = await userin(orderNumber);
|
||||||
|
if (data) {
|
||||||
|
this.goldmedal = data;
|
||||||
|
console.log(this.goldmedal);
|
||||||
|
for (let i = 0; i < this.goldmedal.length; i++) {
|
||||||
|
this.goldastates = this.goldmedal[i].status;
|
||||||
|
|
||||||
let data=await userin(orderNumber);
|
this.userproductId = this.goldmedal[i].orderDetailList[0].productId;
|
||||||
if(data){
|
this.logisticsNumber =
|
||||||
this.goldmedal=data;
|
this.goldmedal[i].orderDetailList[0].logisticsNumber; //物流单号
|
||||||
for(let i=0;i<this.goldmedal.length;i++){
|
this.trackingstates = this.goldmedal[i].orderDetailList[0].status; //运输状态
|
||||||
// this.goldmedal[i].status=0
|
|
||||||
this.goldastates=this.goldmedal[i].status;
|
if (this.trackingstates == 0) {
|
||||||
this.userproductId=this.goldmedal[i].orderDetailList[0].productId;
|
this.trackingstates = "运输中";
|
||||||
this.logisticsNumber=this.goldmedal[i].orderDetailList[0].logisticsNumber;
|
} else if (this.trackingstates == 1) {
|
||||||
this.orderNumber=this.goldmedal[i].orderNumber
|
this.trackingstates = "已签收";
|
||||||
this.usersalesAmount=this.goldmedal[i].salesAmount;
|
} else if (this.trackingstates == 2) {
|
||||||
this.addressUserName=this.goldmedal[i].addressUserName;
|
this.trackingstates = "未发货";
|
||||||
}
|
}
|
||||||
console.log(this.goldmedal,this.userproductId,this.usersalesAmount);
|
this.logisticsDate = this.formatConversion(
|
||||||
}
|
this.goldmedal[i].orderDate
|
||||||
|
); //时间戳
|
||||||
|
this.logisticsCompany =
|
||||||
},
|
this.goldmedal[i].orderDetailList[0].logisticsCompany; //物流公司
|
||||||
|
this.orderNumber = this.goldmedal[i].orderNumber;
|
||||||
|
this.usersalesAmount = this.goldmedal[i].salesAmount;
|
||||||
|
this.addressUserName = this.goldmedal[i].addressUserName;
|
||||||
|
this.addressPhoneNumber = this.goldmedal[i].addressPhoneNumber;
|
||||||
|
}
|
||||||
|
console.log(this.goldmedal, this.userproductId, this.usersalesAmount);
|
||||||
|
}
|
||||||
|
},
|
||||||
//订单立即支付
|
//订单立即支付
|
||||||
async getwei(user) {
|
async getwei(user) {
|
||||||
let postData = [];
|
console.log(user);
|
||||||
let oneProduct = {
|
|
||||||
productName: item.productName,
|
|
||||||
buyCount: item.buyCount,
|
|
||||||
productId: item.productCode,
|
|
||||||
payAmount: item.productPrice,
|
|
||||||
memberId: item.memberId,
|
|
||||||
phoneNumber: item.mobile,
|
|
||||||
orderAddress: {
|
|
||||||
addressPhoneNumber: orderAddress[0].recipientPhone,
|
|
||||||
addressUserName: orderAddress[0].recipient,
|
|
||||||
addressProvinceName: orderAddress[0].provinceName,
|
|
||||||
addressCityName: orderAddress[0].cityName,
|
|
||||||
addressCountyName: orderAddress[0].districtName,
|
|
||||||
addressDetailInfo: orderAddress[0].detailAddress,
|
|
||||||
},
|
|
||||||
};
|
|
||||||
let res = await generateOrderWX(postData);
|
|
||||||
let userPayData = {
|
let userPayData = {
|
||||||
orderId: res.data,
|
userprice: this.usersalesAmount,
|
||||||
userprice: this.usersalesAmount, //订单总价
|
orderId: this.orderNumber,
|
||||||
userinformation:
|
userinformation: this.addressUserName + " " + this.addressPhoneNumber,
|
||||||
this.addressUserName+ //姓名
|
|
||||||
" " +
|
|
||||||
this.userphone, //电话
|
|
||||||
wxPay: "weixin://wxpay/bizpayurl?pr=4RJbokxzz",
|
|
||||||
};
|
};
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
path: "/personal/userpay",
|
path: "/personal/userpay",
|
||||||
query: {
|
query: {
|
||||||
userPayData:JSON.stringify(userPayData),
|
userData: this.orderNumber,
|
||||||
|
stype: 1,
|
||||||
|
userPayData: JSON.stringify(userPayData),
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
async editaddress(user) {
|
async editaddress(user) {
|
||||||
// user.data.id=844350;
|
// user.data.id=844350;
|
||||||
let data = await selectaddress(this.userid);
|
let data = await selectaddress(this.userid);
|
||||||
console.log(data);
|
let list = [];
|
||||||
let list=[]
|
this.useraddress = data.data;
|
||||||
this.useraddress=data.data;
|
for (let i = 0; i < this.useraddress.length; i++) {
|
||||||
for(let i =0;i<this.useraddress.length;i++){
|
if (this.useraddress[i].isDefault == true) {
|
||||||
if(this.useraddress[i].isDefault==true){
|
|
||||||
list.push(this.useraddress[i]);
|
list.push(this.useraddress[i]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.useraddress=list;
|
this.useraddress = list;
|
||||||
console.log(list);
|
console.log(this.useraddress[0].recipient);
|
||||||
console.log(this.goldmedal);
|
|
||||||
// console.log(this.list);
|
// console.log(this.list);
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.checkIsLogin();
|
this.checkIsLogin();
|
||||||
this.userdata=this.$store.state.userInfo;
|
this.userdata = this.$store.state.userInfo;
|
||||||
console.log(this.userdata);
|
console.log(this.userdata);
|
||||||
this.usermessage = JSON.parse(localStorage.getItem("userInfo"));
|
this.usermessage = JSON.parse(localStorage.getItem("userInfo"));
|
||||||
this.userid = this.usermessage.data.id;
|
this.userid = this.usermessage.data.id;
|
||||||
this.userphone=this.usermessage.data.mobile;
|
this.userphone = this.usermessage.data.mobile;
|
||||||
this.editaddress(this.userid);
|
this.editaddress(this.userid);
|
||||||
this.addressstype = this.$route.query.stype;
|
this.addressstype = this.$route.query.stype;
|
||||||
this.orderNumber=this.$route.query.orderNumber;
|
|
||||||
this.orderquantity(this.orderNumber)
|
this.orderNumber = this.$route.query.orderNumber;
|
||||||
if(this.addressstype==2){
|
this.orderquantity(this.orderNumber);
|
||||||
this.orderstatus='您的订单已完成';
|
if (this.addressstype == 2) {
|
||||||
this.isshow=false;
|
this.orderstatus = "您的订单已完成";
|
||||||
this.userisdelivery='待发货';
|
this.isshow = false;
|
||||||
this.customer='联系客服申请售后'
|
this.userisdelivery = "待发货";
|
||||||
this.payorsucess='再次购买'
|
this.customer = "联系客服申请售后";
|
||||||
console.log( this.orderstatus);
|
this.payorsucess = "再次购买";
|
||||||
}else if(this.addressstype==0){
|
console.log(this.orderstatus);
|
||||||
this.orderstatus='您的订单还未付款,请尽快付款!';
|
} else if (this.addressstype == 0) {
|
||||||
this.isshow=false;
|
this.orderstatus = "您的订单还未付款,请尽快付款!";
|
||||||
this.userisdelivery='待付款';
|
this.isshow = false;
|
||||||
this.customer='取消订单'
|
this.userisdelivery = "待付款";
|
||||||
this.payorsucess='立即支付'
|
this.customer = "取消订单";
|
||||||
}
|
this.payorsucess = "立即支付";
|
||||||
else if(this.addressstype==1){
|
} else if (this.addressstype == 1) {
|
||||||
this.orderstatus='您的订单已发出,请耐心等候。';
|
this.orderstatus = "您的订单已发出,请耐心等候。";
|
||||||
this.isshow=true;
|
this.isshow = true;
|
||||||
this.userisdelivery='待收货';
|
this.userisdelivery = "待收货";
|
||||||
this.customer='联系客服申请售后'
|
this.customer = "联系客服申请售后";
|
||||||
this.payorsucess='再次购买'
|
this.payorsucess = "再次购买";
|
||||||
}
|
} else if (this.addressstype == 3) {
|
||||||
else if(this.addressstype==3){
|
this.orderstatus = "您的订单已取消!";
|
||||||
this.orderstatus='您的订单已取消!';
|
this.isshow = false;
|
||||||
this.isshow=false;
|
this.userisdelivery = "已取消";
|
||||||
this.userisdelivery='已取消';
|
this.customer = "联系客服申请售后";
|
||||||
this.customer='联系客服申请售后'
|
this.payorsucess = "再次购买";
|
||||||
this.payorsucess='再次购买'
|
|
||||||
}
|
}
|
||||||
console.log(this.addressstype);
|
console.log(this.addressstype);
|
||||||
},
|
},
|
||||||
@ -379,5 +399,4 @@ console.log(this.userdata);
|
|||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
@import url("../../assets/css/global.less");
|
@import url("../../assets/css/global.less");
|
||||||
@import url("../../assets/css/usertion.less");
|
@import url("../../assets/css/usertion.less");
|
||||||
|
|
||||||
</style>
|
</style>
|
@ -4,6 +4,7 @@
|
|||||||
<Myheader></Myheader>
|
<Myheader></Myheader>
|
||||||
<!-- <tabs></tabs> -->
|
<!-- <tabs></tabs> -->
|
||||||
<div class="rc-top"></div>
|
<div class="rc-top"></div>
|
||||||
|
<tabs :crumbs="crumbs"></tabs>
|
||||||
<div class="rc-usermain">
|
<div class="rc-usermain">
|
||||||
|
|
||||||
<div class="rc rc-column">
|
<div class="rc rc-column">
|
||||||
@ -29,22 +30,27 @@
|
|||||||
<div class="rc-contair">
|
<div class="rc-contair">
|
||||||
<div class="rc-left" ref="userleft" id="userleft" :style='usercolor'>
|
<div class="rc-left" ref="userleft" id="userleft" :style='usercolor'>
|
||||||
<div>
|
<div>
|
||||||
<i>¥</i><span>{{item.couponTypeId=='4'?parseInt(((item.discount) *10))+ '折':item.couponAmount}}</span>
|
<i v-if="(item.couponTypeId!='4' && item.couponAmount>0)">
|
||||||
|
¥
|
||||||
|
</i>
|
||||||
|
<span>
|
||||||
|
{{ item.couponAmount?item.couponAmount:(parseInt((item.discount)*10)+'折') }}
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<strong>{{ item.couponName }}</strong>
|
<strong>{{ item.couponName }}</strong>
|
||||||
</div>
|
</div>
|
||||||
<div class="rc-right">
|
<div class="rc-right">
|
||||||
<i :style='usercolor'>
|
<i :style='usercolor'>
|
||||||
{{ item.couponName }}
|
{{ item.couponDesc }}
|
||||||
</i>
|
</i>
|
||||||
<div class="rc-userfont">
|
<div class="rc-userfont">
|
||||||
<strong>有效期</strong>
|
<strong>有效期</strong>
|
||||||
<span>{{item.validFrom}}至</span>
|
<span>{{item.validFrom}}至</span>
|
||||||
<em>{{item.validTo}}</em>
|
<em>{{item.validTo}}</em>
|
||||||
</div>
|
</div>
|
||||||
<nuxt-link :to="`/productdetails/productlist`">
|
<nuxt-link :to="`/productdetails/productlist`" v-if="activeIndex==0">
|
||||||
<div v-if="userload" class="ts-stand">
|
<div class="ts-standard-btn">
|
||||||
|
立即使用
|
||||||
</div>
|
</div>
|
||||||
</nuxt-link>
|
</nuxt-link>
|
||||||
</div>
|
</div>
|
||||||
@ -59,14 +65,22 @@
|
|||||||
|
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {allConfig,getdraw} from "../../ajax/getData";
|
import {allConfig,getdraw} from "../../ajax/getData";
|
||||||
// import tabs from "@/components/tabs.vue";
|
import tabs from "@/components/tabs.vue";
|
||||||
export default {
|
export default {
|
||||||
// middleware: 'metaTitle',
|
// middleware: 'metaTitle',
|
||||||
// // middleware: 'metaTitle',
|
// // middleware: 'metaTitle',
|
||||||
// meta: {title: '优惠券'},
|
// meta: {title: '优惠券'},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
crumbs:[
|
||||||
|
{
|
||||||
|
path:'/personal/mypersonal/',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path:'/personal/discount/',
|
||||||
|
}
|
||||||
|
],
|
||||||
userload: true,
|
userload: true,
|
||||||
pastdue: false,
|
pastdue: false,
|
||||||
unused: false,
|
unused: false,
|
||||||
@ -209,6 +223,7 @@ export default {
|
|||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
Myheader,
|
Myheader,
|
||||||
|
tabs
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
import Myheader from "~/components/header.vue";
|
import Myheader from "~/components/header.vue";
|
||||||
@ -216,6 +231,5 @@ import Myheader from "~/components/header.vue";
|
|||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
// 手机端
|
// 手机端
|
||||||
@import url("../../assets/css/global.less");
|
|
||||||
@import url("../../assets/css/discount.less");
|
@import url("../../assets/css/discount.less");
|
||||||
</style>
|
</style>
|
@ -2,7 +2,8 @@
|
|||||||
<div>
|
<div>
|
||||||
<Myheader></Myheader>
|
<Myheader></Myheader>
|
||||||
<div class="rc-top"></div>
|
<div class="rc-top"></div>
|
||||||
<div class="rc-max-width--xl rc-padding-y--md">
|
<tabs :crumbs="crumbs"></tabs>
|
||||||
|
<div class="rc-max-width--xl rc-padding-bottom--md">
|
||||||
<ul>
|
<ul>
|
||||||
<li v-for="(item,index) in userrecord" :key="index">
|
<li v-for="(item,index) in userrecord" :key="index">
|
||||||
{{item.title}}
|
{{item.title}}
|
||||||
@ -36,6 +37,14 @@ import Myheader from '~/components/header.vue'
|
|||||||
export default {
|
export default {
|
||||||
data(){
|
data(){
|
||||||
return{
|
return{
|
||||||
|
crumbs:[
|
||||||
|
{
|
||||||
|
path:'/personal/mypersonal',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path:'/personal/integral/',
|
||||||
|
}
|
||||||
|
],
|
||||||
userrecord:[
|
userrecord:[
|
||||||
{
|
{
|
||||||
title:'日期',
|
title:'日期',
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
<Myheader></Myheader>
|
<Myheader></Myheader>
|
||||||
<!-- <tabs></tabs> -->
|
<!-- <tabs></tabs> -->
|
||||||
<div class="rc-top"></div>
|
<div class="rc-top"></div>
|
||||||
|
<tabs :crumbs="crumbs"></tabs>
|
||||||
<div class="rc-layout-container rc-one-column rc-full-width ts-mypersonal">
|
<div class="rc-layout-container rc-one-column rc-full-width ts-mypersonal">
|
||||||
<div class="rc-column">
|
<div class="rc-column">
|
||||||
<!-- <div class="rc-title">
|
<!-- <div class="rc-title">
|
||||||
@ -152,6 +153,11 @@ export default {
|
|||||||
meta: {title: '个人中心'},
|
meta: {title: '个人中心'},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
crumbs:[
|
||||||
|
{
|
||||||
|
path:'/personal/mypersonal',
|
||||||
|
}
|
||||||
|
],
|
||||||
userlog:false,
|
userlog:false,
|
||||||
islogin:false,
|
islogin:false,
|
||||||
dialogInfo1:false,
|
dialogInfo1:false,
|
||||||
|
@ -6,13 +6,98 @@ ul li ol li em strong i {
|
|||||||
.rc-header {
|
.rc-header {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
.settlement {
|
.settlement {
|
||||||
padding-top: 60px;
|
|
||||||
}
|
}
|
||||||
|
.rc-merchandise {
|
||||||
|
li {
|
||||||
|
align-items: baseline;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.discountInfo {
|
||||||
|
i,em {
|
||||||
|
font-size:.875rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.rc-discount {
|
||||||
|
position: relative;
|
||||||
|
width: 100%;
|
||||||
|
img {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
.rc-contair {
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
top: 0;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
}
|
||||||
|
.rc-left {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
color: #e1001a;
|
||||||
|
width: 34%;
|
||||||
|
float: left;
|
||||||
|
height: 100%;
|
||||||
|
i {
|
||||||
|
font-style: normal;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
span {
|
||||||
|
font-size: 45px;
|
||||||
|
}
|
||||||
|
strong {
|
||||||
|
font-style: normal;
|
||||||
|
font-size: 12px;
|
||||||
|
display: block;
|
||||||
|
margin-top: 8px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.rc-right {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
padding: 5px 10px;
|
||||||
|
justify-content: center;
|
||||||
|
height: 100%;
|
||||||
|
i {
|
||||||
|
font-style: normal;
|
||||||
|
font-size: 16px;
|
||||||
|
color: #e1001a;
|
||||||
|
}
|
||||||
|
.rc-main {
|
||||||
|
color: #999999;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
span {
|
||||||
|
display: block;
|
||||||
|
margin-top: 2px;
|
||||||
|
}
|
||||||
|
em {
|
||||||
|
font-style: normal;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.rc-footer {
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
margin-right: 10px;
|
||||||
|
span {
|
||||||
|
width: 72px;
|
||||||
|
height: 25px;
|
||||||
|
background: #e2001a;
|
||||||
|
text-align: center;
|
||||||
|
line-height: 25px;
|
||||||
|
font-size: 12px;
|
||||||
|
color: #ffffff;
|
||||||
|
margin-bottom: 8px;
|
||||||
|
border-radius: 100px;
|
||||||
|
margin-right: 8px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
.rc-main {
|
.rc-main {
|
||||||
width: 92%;
|
width: 92%;
|
||||||
@ -189,6 +274,7 @@ ul li ol li em strong i {
|
|||||||
width: 96px;
|
width: 96px;
|
||||||
height: 96px;
|
height: 96px;
|
||||||
display: block;
|
display: block;
|
||||||
|
object-fit:contain;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -254,7 +340,7 @@ ul li ol li em strong i {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ul {
|
ul {
|
||||||
width: 25%;
|
width: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
@ -340,8 +426,8 @@ ul li ol li em strong i {
|
|||||||
display: flex;
|
display: flex;
|
||||||
justify-content: flex-end;
|
justify-content: flex-end;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
align-items: self-end;
|
align-items: flex-end;
|
||||||
|
text-align: right;
|
||||||
i {
|
i {
|
||||||
font-style: normal;
|
font-style: normal;
|
||||||
color: #333333;
|
color: #333333;
|
||||||
@ -353,6 +439,14 @@ ul li ol li em strong i {
|
|||||||
font-style: normal;
|
font-style: normal;
|
||||||
color: #e1001a;
|
color: #e1001a;
|
||||||
font-size: 26px;
|
font-size: 26px;
|
||||||
|
display:inline-block;
|
||||||
|
min-width:6rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.discountInfo {
|
||||||
|
i,em {
|
||||||
|
font-size:1rem;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
span {
|
span {
|
||||||
@ -465,7 +559,9 @@ ul li ol li em strong i {
|
|||||||
display: none;
|
display: none;
|
||||||
border: none;
|
border: none;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
&.show {
|
||||||
|
display:block;
|
||||||
|
}
|
||||||
&.active {
|
&.active {
|
||||||
display: block;
|
display: block;
|
||||||
border: none;
|
border: none;
|
||||||
|
@ -1,9 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="settlement">
|
<div class="settlement">
|
||||||
<Myheader></Myheader>
|
<Myheader></Myheader>
|
||||||
<div class="rc-main">
|
<div class="rc-top"></div>
|
||||||
<tabs></tabs>
|
|
||||||
</div>
|
|
||||||
<div class="rc_contline"></div>
|
<div class="rc_contline"></div>
|
||||||
<div class="rc-main">
|
<div class="rc-main">
|
||||||
<div class="address-list">
|
<div class="address-list">
|
||||||
@ -28,7 +26,7 @@
|
|||||||
<span>{{ item.address }}</span>
|
<span>{{ item.address }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="mypersonal add">
|
<div class="mypersonal add" :class="useraddress.length>0?'':'show'">
|
||||||
<div
|
<div
|
||||||
class="my-delivery"
|
class="my-delivery"
|
||||||
@click="addAddress"
|
@click="addAddress"
|
||||||
@ -54,7 +52,7 @@
|
|||||||
<div class="rc-userbottom">
|
<div class="rc-userbottom">
|
||||||
<p>¥{{ item.productPrice }}</p>
|
<p>¥{{ item.productPrice }}</p>
|
||||||
<p>X{{ item.buyCount }}</p>
|
<p>X{{ item.buyCount }}</p>
|
||||||
<p class="price">¥{{ item.productPrice }}</p>
|
<p class="price">¥{{ item.productPrice * item.buyCount }}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -67,10 +65,12 @@
|
|||||||
<span>配送方式:</span>
|
<span>配送方式:</span>
|
||||||
<i>{{ shopprice.price }}</i>
|
<i>{{ shopprice.price }}</i>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<span> 活动促销:</span>
|
<span> 活动促销:</span>
|
||||||
<i>{{ shopprice.distribution }}</i>
|
<i class="ts-right-arr ts-right-arr--two" @click="userget()">{{ curCoupon.couponName }}</i>
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li>
|
<li>
|
||||||
<span>商品总价:</span>
|
<span>商品总价:</span>
|
||||||
<i class="red">{{ sumPrice }}</i>
|
<i class="red">{{ sumPrice }}</i>
|
||||||
@ -88,11 +88,15 @@
|
|||||||
<div class="rc-foot">
|
<div class="rc-foot">
|
||||||
<div class="rc-foo">
|
<div class="rc-foo">
|
||||||
<div>
|
<div>
|
||||||
|
<div class="discountInfo" v-if="discountAmount">
|
||||||
|
<i>优惠金额:</i>
|
||||||
|
<em>{{ discountAmount }}</em>
|
||||||
|
</div>
|
||||||
<i>合计金额:</i>
|
<i>合计金额:</i>
|
||||||
<em>{{ sumPrice }}</em>
|
<em>{{ finalAmount }}</em>
|
||||||
</div>
|
</div>
|
||||||
<div style="font-weight: bold">
|
<div style="font-weight: bold">
|
||||||
<span @click="jiesuan()">提交订单</span>
|
<span @click="preJiesuan()">提交订单</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -147,21 +151,72 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
<el-dialog :visible.sync="dialogInfo1" class="pop_coupon" :close-on-click-modal="false">
|
||||||
|
<div class="ts-no-data" v-if="drawlist.length<=0">您还没有优惠券,可在商品的详情页面中领取</div>
|
||||||
|
<div class="rs-dis">
|
||||||
|
<div
|
||||||
|
class="rc-discount"
|
||||||
|
v-for="(item, index) in drawlist"
|
||||||
|
:key="index"
|
||||||
|
>
|
||||||
|
<img :src="userimage" alt="" />
|
||||||
|
<div class="rc-contair">
|
||||||
|
<div class="rc-left" :style='usercolor'>
|
||||||
|
<div>
|
||||||
|
<i v-if="(item.couponTypeId!='4' && item.couponAmount>0)">
|
||||||
|
¥
|
||||||
|
</i>
|
||||||
|
<span>
|
||||||
|
{{ item.couponAmount?item.couponAmount:(parseInt((item.discount)*10)+'折') }}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<strong>{{ item.couponName }}</strong>
|
||||||
|
</div>
|
||||||
|
<div class="rc-right">
|
||||||
|
<i :style='usercolor'>
|
||||||
|
{{ item.couponName }}
|
||||||
|
</i>
|
||||||
|
<div class="rc-userfont">
|
||||||
|
<strong>有效期</strong>
|
||||||
|
<span>{{item.validFrom}}至</span>
|
||||||
|
<em>{{item.validTo}}</em>
|
||||||
|
</div>
|
||||||
|
<div class="rc-footer">
|
||||||
|
<span @click="pickCoupon(item)">立即使用</span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import Myheader from "~/components/header.vue";
|
import Myheader from "~/components/header.vue";
|
||||||
import { userin, memberAddress, generateOrderWX } from "../../ajax/getData";
|
import { userin, memberAddress, generateOrderWX, getdraw } from "../../ajax/getData";
|
||||||
import tabs from "@/components/tabs.vue";
|
import tabs from "@/components/tabs.vue";
|
||||||
import myAddress from "~/components/address.vue";
|
import myAddress from "~/components/address.vue";
|
||||||
|
import { mapMutations } from "vuex";
|
||||||
import itemMixin from "../../../smart-admin-web/src/components/main/components/side-menu/item-mixin";
|
import itemMixin from "../../../smart-admin-web/src/components/main/components/side-menu/item-mixin";
|
||||||
export default {
|
export default {
|
||||||
middleware: "metaTitle",
|
middleware: "metaTitle",
|
||||||
meta: { title: "订单结算" },
|
meta: { title: "订单结算" },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
crumbs:[
|
||||||
|
{
|
||||||
|
path:'/productdetails/productlist/',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path:'/personal/settlement'
|
||||||
|
}
|
||||||
|
],
|
||||||
|
usercolor:{color:'#e1001a'},
|
||||||
|
userimage: require("../../assets/image/unused.png"),
|
||||||
|
curCoupon:{couponName:'未选择可用优惠券'},
|
||||||
|
drawlist:[],
|
||||||
|
dialogInfo1:false,
|
||||||
goldmedal: [],
|
goldmedal: [],
|
||||||
dialogAddTitle: "",
|
dialogAddTitle: "",
|
||||||
addressstype: null,
|
addressstype: null,
|
||||||
@ -196,18 +251,113 @@ export default {
|
|||||||
promotion: "¥167.00",
|
promotion: "¥167.00",
|
||||||
payment: "¥0.00 ",
|
payment: "¥0.00 ",
|
||||||
},
|
},
|
||||||
|
discountAmount:0,
|
||||||
|
finalAmount:0,
|
||||||
|
discountedProductCode:undefined,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
// 总价计算
|
|
||||||
sumPrice() {
|
sumPrice() {
|
||||||
return this.goldmedal.reduce((pre, cur) => {
|
return this.goldmedal.reduce((pre, cur) => {
|
||||||
console.log(pre);
|
|
||||||
return pre + cur.buyCount * cur.productPrice;
|
return pre + cur.buyCount * cur.productPrice;
|
||||||
}, 0);
|
}, 0);
|
||||||
},
|
},
|
||||||
|
// 折扣计算
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
...mapMutations(["checkIsLogin"]),
|
||||||
|
discountedSumPrice() {
|
||||||
|
let total = 0;
|
||||||
|
if(this.curCoupon.productCodes)
|
||||||
|
this.finalAmount = this.qualifiedProductDiscount();
|
||||||
|
else
|
||||||
|
this.finalAmount = this.wholeOrderDiscount();
|
||||||
|
this.finalAmount = parseFloat(this.finalAmount).toFixed(2);
|
||||||
|
this.discountAmount = parseFloat(this.discountAmount).toFixed(2);
|
||||||
|
},
|
||||||
|
wholeOrderDiscount(){
|
||||||
|
this.discountedItemIndex = 0;
|
||||||
|
let checkResult = true;
|
||||||
|
if(this.curCoupon.minPrice && this.curCoupon.minPrice > this.sumPrice) {
|
||||||
|
checkResult = false;
|
||||||
|
}
|
||||||
|
if(this.curCoupon.couponAmount && this.curCoupon.couponAmount > this.sumPrice) {
|
||||||
|
checkResult = false;
|
||||||
|
}
|
||||||
|
if(checkResult) {
|
||||||
|
if(this.curCoupon.couponAmount && this.curCoupon.couponAmount>0) {
|
||||||
|
this.discountAmount = this.curCoupon.couponAmount;
|
||||||
|
return this.sumPrice - this.curCoupon.couponAmount;
|
||||||
|
} else if(this.curCoupon.discount && this.curCoupon.discount>0) {
|
||||||
|
this.discountAmount = this.sumPrice*this.curCoupon.discount;
|
||||||
|
return this.sumPrice * (1-this.curCoupon.discount);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
return this.sumPrice;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
qualifiedProductDiscount(){
|
||||||
|
this.discountedItemIndex = 0;
|
||||||
|
let total = 0;
|
||||||
|
let couponUsed = false;
|
||||||
|
let tmpShoppingCartList = this.arrSort(this.goldmedal);
|
||||||
|
|
||||||
|
for(let itemInCart of tmpShoppingCartList) {
|
||||||
|
if((!this.curCoupon.productCodes || this.curCoupon.productCodes.indexOf(itemInCart.productCode)>-1) && !couponUsed) {
|
||||||
|
if(this.curCoupon.minQuantity && this.curCoupon.minQuantity>itemInCart.buyCount) {
|
||||||
|
//Check minQuantity
|
||||||
|
total+=(itemInCart.buyCount * itemInCart.productPrice);
|
||||||
|
} else if(this.curCoupon.minPrice && this.curCoupon.minPrice > (itemInCart.buyCount * itemInCart.productPrice)) {
|
||||||
|
//Check minPrice
|
||||||
|
total+=(itemInCart.buyCount * itemInCart.productPrice);
|
||||||
|
} else {
|
||||||
|
//Into coupon discount calculation
|
||||||
|
switch(this.curCoupon.couponTypeId) {
|
||||||
|
case 1: //Amount deduct
|
||||||
|
total = total + (itemInCart.productPrice * itemInCart.buyCount - this.curCoupon.couponAmount);
|
||||||
|
this.discountAmount = this.curCoupon.couponAmount;
|
||||||
|
this.discountedProductCode = itemInCart.productCode;
|
||||||
|
couponUsed=true;
|
||||||
|
break;
|
||||||
|
case 2: //Amount deduct with minPrice restriction
|
||||||
|
case 6:
|
||||||
|
total = total + (itemInCart.productPrice * itemInCart.buyCount) - this.curCoupon.couponAmount;
|
||||||
|
this.discountAmount = this.curCoupon.couponAmount;
|
||||||
|
this.discountedProductCode = itemInCart.productCode;
|
||||||
|
couponUsed=true;
|
||||||
|
break;
|
||||||
|
case 3: //Limited product % discount
|
||||||
|
case 4: //% discount
|
||||||
|
total = total + (itemInCart.productPrice * itemInCart.buyCount) * this.curCoupon.discount;
|
||||||
|
this.discountAmount = (itemInCart.productPrice * itemInCart.buyCount) * ( 1 - this.curCoupon.discount);
|
||||||
|
this.discountedProductCode = itemInCart.productCode;
|
||||||
|
couponUsed=true;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
total += itemInCart.productPrice * itemInCart.buyCount;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
//Into coupon discount calculation end
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
total += itemInCart.productPrice * itemInCart.buyCount;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return total;
|
||||||
|
},
|
||||||
|
arrSort(arr) {
|
||||||
|
let userarr=[]
|
||||||
|
let a=[];
|
||||||
|
for(let i in arr){
|
||||||
|
arr[i].total=arr[i].productPrice*arr[i].buyCount;
|
||||||
|
if(arr[i].total){
|
||||||
|
userarr.push(arr[i]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return userarr.sort((n1,n2)=>{
|
||||||
|
return n2.total-n1.total;
|
||||||
|
});
|
||||||
|
},
|
||||||
async getAddressList() {
|
async getAddressList() {
|
||||||
let memberId = JSON.parse(localStorage.getItem("userInfo")).data.id;
|
let memberId = JSON.parse(localStorage.getItem("userInfo")).data.id;
|
||||||
let { data } = await memberAddress("getAll", { memberId: memberId });
|
let { data } = await memberAddress("getAll", { memberId: memberId });
|
||||||
@ -220,6 +370,67 @@ export default {
|
|||||||
});
|
});
|
||||||
this.useraddress = data;
|
this.useraddress = data;
|
||||||
},
|
},
|
||||||
|
userget(){
|
||||||
|
let user = this.$store.state.userInfo;
|
||||||
|
if (user) {
|
||||||
|
this.userdraw(user.data.mobile);
|
||||||
|
this.dialogInfo1 = true;
|
||||||
|
} else {
|
||||||
|
this.$router.push({
|
||||||
|
path: "/userlogin/login",
|
||||||
|
});
|
||||||
|
}
|
||||||
|
},
|
||||||
|
//获取用户领取的优惠券
|
||||||
|
async userdraw(mobile) {
|
||||||
|
let data = await getdraw(mobile);
|
||||||
|
let _self = this;
|
||||||
|
let curTime = new Date().getTime();
|
||||||
|
let valDateFromTime=0;
|
||||||
|
let valDateToTime=0;
|
||||||
|
let dateChecked=true;
|
||||||
|
|
||||||
|
if (data) {
|
||||||
|
this.drawlist=[];
|
||||||
|
for(let itemInCart of this.goldmedal) {
|
||||||
|
let tmpIndex=0;
|
||||||
|
for(let myCoupon of data.data) {
|
||||||
|
valDateFromTime=0;
|
||||||
|
valDateToTime=0;
|
||||||
|
dateChecked=true;
|
||||||
|
if(myCoupon.fValidFrom) {
|
||||||
|
valDateFromTime = new Date(myCoupon.fValidFrom).getTime();
|
||||||
|
}
|
||||||
|
if(myCoupon.fValidTo) {
|
||||||
|
valDateToTime = new Date(myCoupon.fValidTo).getTime();
|
||||||
|
}
|
||||||
|
if(valDateFromTime && curTime < valDateFromTime) {
|
||||||
|
dateChecked=false;
|
||||||
|
}
|
||||||
|
if(valDateToTime && curTime > valDateToTime) {
|
||||||
|
dateChecked=false;
|
||||||
|
}
|
||||||
|
if(myCoupon.minQuantity && myCoupon.minQuantity>itemInCart.buyCount) {
|
||||||
|
dateChecked=false;
|
||||||
|
}
|
||||||
|
if(myCoupon.minPrice && myCoupon.minPrice>this.sumPrice) {
|
||||||
|
dateChecked=false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(dateChecked && myCoupon.activityId != 10 && myCoupon.status == 0 && (!myCoupon.productCodes || myCoupon.productCodes.indexOf(itemInCart.productCode)>-1)) {
|
||||||
|
data.data.splice(tmpIndex,1);
|
||||||
|
_self.drawlist.push(myCoupon);
|
||||||
|
}
|
||||||
|
tmpIndex++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
pickCoupon(item){
|
||||||
|
this.curCoupon = item;
|
||||||
|
this.dialogInfo1 = false;
|
||||||
|
this.discountedSumPrice();
|
||||||
|
},
|
||||||
editAddress(item) {
|
editAddress(item) {
|
||||||
this.dialogAddTitle = "修改收货地址";
|
this.dialogAddTitle = "修改收货地址";
|
||||||
this.editAddressData = {
|
this.editAddressData = {
|
||||||
@ -272,17 +483,43 @@ export default {
|
|||||||
this.dialogAdd = parm;
|
this.dialogAdd = parm;
|
||||||
this.getAddressList();
|
this.getAddressList();
|
||||||
},
|
},
|
||||||
|
preJiesuan(){
|
||||||
|
let checkResult=true;
|
||||||
|
if(this.useraddress.length<=0) {
|
||||||
|
this.$message({
|
||||||
|
type: "error",
|
||||||
|
message: '请先添加收件信息',
|
||||||
|
});
|
||||||
|
checkResult=false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if(checkResult)
|
||||||
|
this.jiesuan();
|
||||||
|
},
|
||||||
async jiesuan() {
|
async jiesuan() {
|
||||||
let orderAddress = this.useraddress.filter((item) => item.isDefault);
|
let orderAddress = this.useraddress.filter((item) => item.isDefault);
|
||||||
|
let userInfo = this.$store.state.userInfo;
|
||||||
|
if(!userInfo) {
|
||||||
|
this.$router.push({
|
||||||
|
path: "/userlogin/login",
|
||||||
|
query: {
|
||||||
|
|
||||||
|
},
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
let postData = [];
|
let postData = [];
|
||||||
|
let tmpCounter=0;
|
||||||
this.goldmedal.forEach((item) => {
|
this.goldmedal.forEach((item) => {
|
||||||
|
let basePoint = (item.basePoint?item.basePoint:0);
|
||||||
let oneProduct = {
|
let oneProduct = {
|
||||||
|
basePoint:basePoint,
|
||||||
productName: item.productName,
|
productName: item.productName,
|
||||||
buyCount: item.buyCount,
|
buyCount: item.buyCount,
|
||||||
productId: item.productCode,
|
productCode: item.productCode,
|
||||||
payAmount: item.productPrice,
|
payAmount: item.productPrice,
|
||||||
memberId: item.memberId,
|
memberId: userInfo.data.id,
|
||||||
phoneNumber: item.mobile,
|
phoneNumber: userInfo.data.mobile,
|
||||||
// couponId: "NGQ2022P12",
|
// couponId: "NGQ2022P12",
|
||||||
// couponTypeId: "4",
|
// couponTypeId: "4",
|
||||||
// couponName: "内购券",
|
// couponName: "内购券",
|
||||||
@ -297,7 +534,15 @@ export default {
|
|||||||
addressDetailInfo: orderAddress[0].detailAddress,
|
addressDetailInfo: orderAddress[0].detailAddress,
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
if(this.curCoupon.couponId && item.productCode == this.discountedProductCode) {
|
||||||
|
oneProduct.couponId = this.curCoupon.couponId;
|
||||||
|
oneProduct.couponTypeId = this.curCoupon.couponTypeId;
|
||||||
|
oneProduct.couponName = this.curCoupon.couponName;
|
||||||
|
oneProduct.couponCode = this.curCoupon.couponCode;
|
||||||
|
oneProduct.couponAmount = (this.curCoupon.couponAmount?this.curCoupon.couponAmount:this.curCoupon.discount);
|
||||||
|
}
|
||||||
postData.push(oneProduct);
|
postData.push(oneProduct);
|
||||||
|
tmpCounter++;
|
||||||
});
|
});
|
||||||
// let postData = [
|
// let postData = [
|
||||||
// {
|
// {
|
||||||
@ -346,14 +591,15 @@ export default {
|
|||||||
let res = await generateOrderWX(postData);
|
let res = await generateOrderWX(postData);
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
let userPayData = {
|
let userPayData = {
|
||||||
orderId: res.data,
|
orderId: res.data.orderNumber,
|
||||||
userprice: this.sumPrice,
|
userprice: parseFloat(res.data.orderAmount).toFixed(2),
|
||||||
userinformation:
|
userinformation:
|
||||||
postData[0].orderAddress.addressUserName +
|
postData[0].orderAddress.addressUserName +
|
||||||
" " +
|
" " +
|
||||||
postData[0].orderAddress.addressPhoneNumber,
|
postData[0].orderAddress.addressPhoneNumber,
|
||||||
// wxPay: "weixin://wxpay/bizpayurl?pr=4RJbokxzz",
|
// wxPay: "weixin://wxpay/bizpayurl?pr=4RJbokxzz",
|
||||||
wxPay: res.data,
|
// wxPay: "weixin://wxpay/bizpayurl?pr=4RJbokxzz",
|
||||||
|
wxPay: res.msg,
|
||||||
};
|
};
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
path: "/personal/userpay",
|
path: "/personal/userpay",
|
||||||
@ -370,14 +616,13 @@ export default {
|
|||||||
},
|
},
|
||||||
async canceldanhao(orderNumber) {
|
async canceldanhao(orderNumber) {
|
||||||
let data = await userin(orderNumber);
|
let data = await userin(orderNumber);
|
||||||
console.log(data);
|
|
||||||
// this.goldmedal=data;
|
|
||||||
console.log(this.goldmedal);
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.goldmedal = JSON.parse(this.$route.query.list);
|
this.goldmedal = JSON.parse(this.$route.query.list);
|
||||||
this.getAddressList();
|
this.getAddressList();
|
||||||
|
this.checkIsLogin();
|
||||||
|
this.finalAmount = this.sumPrice;
|
||||||
// this.addressstype = this.$route.query.stype;
|
// this.addressstype = this.$route.query.stype;
|
||||||
// this.orderNumber = this.$route.query.orderNumber;
|
// this.orderNumber = this.$route.query.orderNumber;
|
||||||
// this.canceldanhao(this.orderNumber);
|
// this.canceldanhao(this.orderNumber);
|
||||||
@ -393,7 +638,7 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
@import url("../../assets/css/global.less");
|
//@import url("../../assets/css/global.less");
|
||||||
@import "./settlement.less";
|
@import "./settlement.less";
|
||||||
// @import url("../../assets/css/settlement.less");
|
// @import url("../../assets/css/settlement.less");
|
||||||
</style>
|
</style>
|
@ -2,6 +2,7 @@
|
|||||||
<div>
|
<div>
|
||||||
<Myheader></Myheader>
|
<Myheader></Myheader>
|
||||||
<div class="rc-top"></div>
|
<div class="rc-top"></div>
|
||||||
|
<tabs :crumbs="crumbs"></tabs>
|
||||||
<div class="online bold"></div>
|
<div class="online bold"></div>
|
||||||
<div class="usercontshow rc-max-width--xl">
|
<div class="usercontshow rc-max-width--xl">
|
||||||
<div class="rc-headera">
|
<div class="rc-headera">
|
||||||
@ -43,28 +44,28 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="rc-usermain" >
|
<div class="rc-usermain" >
|
||||||
<div class="rc-image">
|
<div class="rc-image">
|
||||||
<img :src="item.catimage" alt="" />
|
<img :src= item.picFile alt="" />
|
||||||
</div>
|
</div>
|
||||||
<div class="rc-right" @click="usertiaozhuan(item)">
|
<div class="rc-right" @click="usertiaozhuan(item)">
|
||||||
<div class="rc-usercenter">
|
<div class="rc-usercenter">
|
||||||
<em>{{ item.usereat }}</em>
|
<em>{{ item.productName }}</em>
|
||||||
<div class="rc-userright">
|
<div class="rc-userright">
|
||||||
<span>规格:{{ item.num }}</span>
|
<span>规格:{{ item.specifications }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="rc-userbottom">
|
<div class="rc-userbottom">
|
||||||
<span>数量:{{ item.pcs }}件</span>
|
<span>数量:{{ item.pcs }}件</span>
|
||||||
<i>¥10</i>
|
<i>¥{{item.ecPrice}}</i>
|
||||||
</div>
|
</div>
|
||||||
<div class="rc-userbottomm">
|
<div class="rc-userbottomm">
|
||||||
<i>¥{{ item.userprice }}</i>
|
<i>¥{{ item.ecPrice }}</i>
|
||||||
<span>{{ item.orderstype }}</span>
|
<span>{{ item.pcs }}</span>
|
||||||
<i>¥{{ item.userprice }}</i>
|
<i>¥{{ item.salesAmount }}</i>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="pc-bottom">
|
<div class="pc-bottom">
|
||||||
<span @click="userpay(item, index)">{{
|
<span v-if="item.status!=1" @click="userpay(item, index)">{{
|
||||||
item.status == "0"
|
item.status == "0"
|
||||||
? "取消订单"
|
? "取消订单"
|
||||||
: item.status == "1"
|
: item.status == "1"
|
||||||
@ -137,11 +138,20 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import Myheader from "~/components/header.vue";
|
import Myheader from "~/components/header.vue";
|
||||||
import MyFooter from '~/components/rc-footer.vue'
|
import MyFooter from '~/components/rc-footer.vue';
|
||||||
|
import tabs from "~/components/tabs.vue";
|
||||||
import { customerorders, userindent, canceldanhao,generateOrderWX } from "../../ajax/getData";
|
import { customerorders, userindent, canceldanhao,generateOrderWX } from "../../ajax/getData";
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
crumbs:[
|
||||||
|
{
|
||||||
|
path:'/personal/mypersonal/',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path:'/personal/useraddress/',
|
||||||
|
}
|
||||||
|
],
|
||||||
activeIndex: 0,
|
activeIndex: 0,
|
||||||
userstype:'',
|
userstype:'',
|
||||||
alllist:[],
|
alllist:[],
|
||||||
@ -280,7 +290,8 @@ export default {
|
|||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
Myheader,
|
Myheader,
|
||||||
MyFooter
|
MyFooter,
|
||||||
|
tabs
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
async indet(mobile, stype) {
|
async indet(mobile, stype) {
|
||||||
@ -297,7 +308,6 @@ export default {
|
|||||||
this.alllist.push(this.goldmedal[i].orderDetailList[0])
|
this.alllist.push(this.goldmedal[i].orderDetailList[0])
|
||||||
this.allmessage.push(this.goldmedal[i].orderDetailList[0])
|
this.allmessage.push(this.goldmedal[i].orderDetailList[0])
|
||||||
if(this.goldmedal[i].status==0){
|
if(this.goldmedal[i].status==0){
|
||||||
console.log("+++++++++++++");
|
|
||||||
this.obligation.push(this.goldmedal[i].orderDetailList[0]);
|
this.obligation.push(this.goldmedal[i].orderDetailList[0]);
|
||||||
}else if(this.goldmedal[i].status==1){
|
}else if(this.goldmedal[i].status==1){
|
||||||
this.receiving.push(this.goldmedal[i].orderDetailList[0]);
|
this.receiving.push(this.goldmedal[i].orderDetailList[0]);
|
||||||
@ -306,13 +316,18 @@ export default {
|
|||||||
this.pending.push(this.goldmedal[i].orderDetailList[0]);
|
this.pending.push(this.goldmedal[i].orderDetailList[0]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (var i = 0; i < this.useralllist.length; i++) {
|
for (var i = 0; i < this.useralllist.length; i++) {
|
||||||
this.useralllist[i].orderNumber = this.goldmedal[i].orderNumber;
|
this.useralllist[i].orderNumber = this.goldmedal[i].orderNumber;
|
||||||
this.useralllist[i].status = this.goldmedal[i].status;
|
this.useralllist[i].status = this.goldmedal[i].status;
|
||||||
this.useralllist[i].addressUserName = this.goldmedal[i].addressUserName;
|
this.useralllist[i].addressUserName = this.goldmedal[i].addressUserName;
|
||||||
this.useralllist[i].phoneNumber = this.goldmedal[i].phoneNumber;
|
this.useralllist[i].phoneNumber = this.goldmedal[i].addressPhoneNumber;
|
||||||
this.useralllist[i].salesAmount = this.goldmedal[i].salesAmount;
|
this.useralllist[i].salesAmount = this.goldmedal[i].salesAmount;
|
||||||
|
// this.useralllist[i].picFile = this.goldmedal[i].picFile; //图片路径
|
||||||
|
// this.useralllist[i].productName=this.goldmedal[i].productName;//商品名称
|
||||||
|
// this.useralllist[i].ecPrice=this.goldmedal[i].ecPrice//第一个的单价
|
||||||
|
// this.useralllist[i].pcs=this.goldmedal[i].pcs//数量
|
||||||
|
|
||||||
|
|
||||||
this.useralllist[i].lengthnum=this.goldmedal[i].orderDetailList.length
|
this.useralllist[i].lengthnum=this.goldmedal[i].orderDetailList.length
|
||||||
}
|
}
|
||||||
console.log(this.obligation)
|
console.log(this.obligation)
|
||||||
@ -333,38 +348,22 @@ export default {
|
|||||||
|
|
||||||
//订单立即支付
|
//订单立即支付
|
||||||
async getwei(item) {
|
async getwei(item) {
|
||||||
|
console.log(item);
|
||||||
let postData = [];
|
let postData = [];
|
||||||
// let oneProduct = {
|
|
||||||
// productName: item.productName,
|
|
||||||
// buyCount: item.buyCount,
|
|
||||||
// productId: item.productCode,
|
|
||||||
// payAmount: item.productPrice,
|
|
||||||
// memberId: item.memberId,
|
|
||||||
// phoneNumber: item.mobile,
|
|
||||||
// orderAddress: {
|
|
||||||
// addressPhoneNumber: orderAddress[0].recipientPhone,
|
|
||||||
// addressUserName: orderAddress[0].recipient,
|
|
||||||
// addressProvinceName: orderAddress[0].provinceName,
|
|
||||||
// addressCityName: orderAddress[0].cityName,
|
|
||||||
// addressCountyName: orderAddress[0].districtName,
|
|
||||||
// addressDetailInfo: orderAddress[0].detailAddress,
|
|
||||||
// },
|
|
||||||
// };
|
|
||||||
// postData.push(oneProduct);
|
|
||||||
let res = await generateOrderWX(postData);
|
|
||||||
let userPayData = {
|
let userPayData = {
|
||||||
orderId: res.data,
|
userprice: item.salesAmount,
|
||||||
userprice: item.salesAmount, //订单总价
|
orderId:item.orderNumber,
|
||||||
userinformation:
|
userinformation:item.addressUserName +
|
||||||
item.addressUserName+ //姓名
|
|
||||||
" " +
|
" " +
|
||||||
item.phoneNumber, //电话
|
item.phoneNumber,
|
||||||
wxPay: "weixin://wxpay/bizpayurl?pr=4RJbokxzz",
|
wxPay: "weixin://wxpay/bizpayurl?pr=4RJbokxzz",
|
||||||
};
|
};
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
path: "/personal/userpay",
|
path: "/personal/userpay",
|
||||||
query: {
|
query: {
|
||||||
userPayData:JSON.stringify(userPayData),
|
userData:item.orderNumber,
|
||||||
|
stype:1,
|
||||||
|
userPayData: JSON.stringify(userPayData),
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
@ -407,7 +406,10 @@ export default {
|
|||||||
this.receiving=[];
|
this.receiving=[];
|
||||||
this.pending=[];
|
this.pending=[];
|
||||||
}, 500);
|
}, 500);
|
||||||
|
} else if(item.status == 1) { //确认收货
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (item.buttontitle == "立即支付") {
|
if (item.buttontitle == "立即支付") {
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
path: "/personal/userpay",
|
path: "/personal/userpay",
|
||||||
@ -484,6 +486,5 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
@import url("../../assets/css/global.less");
|
|
||||||
@import url("../../assets/css/orderquantity.less");
|
@import url("../../assets/css/orderquantity.less");
|
||||||
</style>
|
</style>
|
@ -2,15 +2,15 @@
|
|||||||
<div>
|
<div>
|
||||||
<Myheader></Myheader>
|
<Myheader></Myheader>
|
||||||
<div class="rc-top"></div>
|
<div class="rc-top"></div>
|
||||||
<div class="rc-full-width rc-max-width--xl rc-padding-y--lg">
|
<tabs :crumbs="crumbs"></tabs>
|
||||||
|
<div class="rc-full-width rc-max-width--xl rc-padding-bottom--lg">
|
||||||
<div class="rc-main">
|
<div class="rc-main">
|
||||||
|
|
||||||
<div class="rc-center" >
|
<div class="rc-center" >
|
||||||
<van-swipe @change="onChange">
|
<van-swipe @change="onChange">
|
||||||
<van-swipe-item v-for="(banner, index) in banners" :key="index">
|
<van-swipe-item v-for="(banner, index) in banners" :key="index">
|
||||||
<img :src="banner.src" class="useraimg"/>
|
<img :src="banner.src" class="useraimg"/>
|
||||||
</van-swipe-item>
|
</van-swipe-item>
|
||||||
</van-swipe>
|
</van-swipe>
|
||||||
<!-- <img :src='userimage' /> -->
|
<!-- <img :src='userimage' /> -->
|
||||||
</div>
|
</div>
|
||||||
<div class="rc-order">
|
<div class="rc-order">
|
||||||
@ -20,15 +20,12 @@
|
|||||||
<span>距离升级还差:{{ rcvalue }} </span>
|
<span>距离升级还差:{{ rcvalue }} </span>
|
||||||
<div class="block">
|
<div class="block">
|
||||||
<div class="r-block" ref="userblock"></div>
|
<div class="r-block" ref="userblock"></div>
|
||||||
|
|
||||||
<!-- <el-slider v-model="value" range show-stops :max="10"> </el-slider> -->
|
<!-- <el-slider v-model="value" range show-stops :max="10"> </el-slider> -->
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="rc-value">
|
<div class="rc-value">
|
||||||
<span>新手铲屎官</span>
|
<span class="rc-styled-link" @click="onChange(0)">新手铲屎官</span>
|
||||||
<span>资深铲屎官</span>
|
<span class="rc-styled-link" @click="onChange(1)">资深铲屎官</span>
|
||||||
<span>金牌铲屎官</span>
|
<span class="rc-styled-link" @click="onChange(2)">金牌铲屎官</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="rc-layout-container">
|
<div class="rc-layout-container">
|
||||||
@ -53,10 +50,19 @@
|
|||||||
<script>
|
<script>
|
||||||
import Myheader from '~/components/header.vue'
|
import Myheader from '~/components/header.vue'
|
||||||
import Myfooter from '~/components/rc-footer.vue'
|
import Myfooter from '~/components/rc-footer.vue'
|
||||||
|
import tabs from "~/components/tabs.vue";
|
||||||
export default {
|
export default {
|
||||||
data(){
|
data(){
|
||||||
|
|
||||||
return{
|
return{
|
||||||
|
crumbs:[
|
||||||
|
{
|
||||||
|
path:'/personal/mypersonal',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path:'/personal/usermember/',
|
||||||
|
}
|
||||||
|
],
|
||||||
banners:[
|
banners:[
|
||||||
{src:require("../../assets/image/rc-new.png"),link:""},
|
{src:require("../../assets/image/rc-new.png"),link:""},
|
||||||
{src:require("../../assets/image/rc-new1.png"),link:""},
|
{src:require("../../assets/image/rc-new1.png"),link:""},
|
||||||
@ -251,7 +257,8 @@ methods:{
|
|||||||
},
|
},
|
||||||
components:{
|
components:{
|
||||||
Myheader,
|
Myheader,
|
||||||
Myfooter
|
Myfooter,
|
||||||
|
tabs
|
||||||
},
|
},
|
||||||
mounted(){
|
mounted(){
|
||||||
console.log(this.$refs.userblock);
|
console.log(this.$refs.userblock);
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="page_modules">
|
<div class="page_modules">
|
||||||
<Myheader></Myheader>
|
<Myheader></Myheader>
|
||||||
|
<div class="rc-top rc-md-up"></div>
|
||||||
<div class="cont_modules">
|
<div class="cont_modules">
|
||||||
<tabs></tabs>
|
|
||||||
<el-row class="order_info">
|
<el-row class="order_info">
|
||||||
<el-col :span="6" class="ph_hidden">
|
<el-col :span="6" class="ph_hidden">
|
||||||
<ul class="li_inline">
|
<ul class="li_inline">
|
||||||
@ -19,7 +19,7 @@
|
|||||||
<el-col :span="6" class="ready_right">
|
<el-col :span="6" class="ready_right">
|
||||||
<div class="inline_right">
|
<div class="inline_right">
|
||||||
<p>付款金额:</p>
|
<p>付款金额:</p>
|
||||||
<p class="price">{{ userPayData.userprice }}</p>
|
<p class="price" v-if="userPayData.userprice">¥{{ userPayData.userprice }}</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="inline_right">
|
<div class="inline_right">
|
||||||
<p>收货信息:</p>
|
<p>收货信息:</p>
|
||||||
@ -64,7 +64,9 @@
|
|||||||
<p>您的商品我们正在抓紧打包,请耐心等候!</p>
|
<p>您的商品我们正在抓紧打包,请耐心等候!</p>
|
||||||
<div class="line_dashed"></div>
|
<div class="line_dashed"></div>
|
||||||
<div class="userer">
|
<div class="userer">
|
||||||
<div class="qrcode"><vue-qr :text="qrtext" :size="260"></vue-qr></div>
|
<div class="qrcode">
|
||||||
|
<img src="/images/paysucess.jpg">
|
||||||
|
</div>
|
||||||
<p>微信扫一扫,识别二维码</p>
|
<p>微信扫一扫,识别二维码</p>
|
||||||
<p class="tips">加入社群0元试用商品随单发放</p>
|
<p class="tips">加入社群0元试用商品随单发放</p>
|
||||||
</div>
|
</div>
|
||||||
@ -87,41 +89,59 @@ import Myheader from "~/components/header.vue";
|
|||||||
import tabs from "@/components/tabs.vue";
|
import tabs from "@/components/tabs.vue";
|
||||||
import vueQr from 'vue-qr'
|
import vueQr from 'vue-qr'
|
||||||
|
|
||||||
import { generateOrderAlipay, updateOrderWX } from "../../ajax/getData";
|
import { generateOrderAlipay, updateOrderWX, monitorOrderNotify,repayOrde } from "../../ajax/getData";
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
activeIndex: 0,
|
activeIndex: 0,
|
||||||
|
paymentTimer:undefined,
|
||||||
isSucess: false,
|
isSucess: false,
|
||||||
|
dialogSuccess: true,
|
||||||
paytype: "微信",
|
paytype: "微信",
|
||||||
userpaystype: [
|
userpaystype: [
|
||||||
{
|
{
|
||||||
paytype: "微信",
|
paytype: "微信",
|
||||||
payimage: require("../../assets/pay/wx.png"),
|
payimage: require("../../assets/pay/wx.png"),
|
||||||
},
|
},
|
||||||
|
/*
|
||||||
{
|
{
|
||||||
paytype: "支付宝",
|
paytype: "支付宝",
|
||||||
payimage: require("../../assets/pay/zfb.png"),
|
payimage: require("../../assets/pay/zfb.png"),
|
||||||
},
|
},
|
||||||
|
*/
|
||||||
],
|
],
|
||||||
dialogSuccess: true,
|
|
||||||
dialogFail: false,
|
dialogFail: false,
|
||||||
userPayData: {},
|
userPayData: {},
|
||||||
qrtext:'',
|
qrtext:'',
|
||||||
|
userData:'',
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
computed: {},
|
computed: {},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
let stype=this.$route.query.stype;
|
||||||
|
console.log(stype)
|
||||||
|
if(stype==1){
|
||||||
|
this.userData = this.$route.query.userData;
|
||||||
|
this.repayOrde(this.userData);
|
||||||
this.userPayData = JSON.parse(this.$route.query.userPayData);
|
this.userPayData = JSON.parse(this.$route.query.userPayData);
|
||||||
this.qrtext=this.userPayData.wxPay;
|
console.log(this.userPayData);
|
||||||
this.payOrderWX()
|
}else{
|
||||||
|
this.userPayData = JSON.parse(this.$route.query.userPayData);
|
||||||
|
console.log(this.userPayData);
|
||||||
|
}
|
||||||
|
this.qrtext=this.userPayData.wxPay
|
||||||
|
this.payOrderWX();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
closeDialogSuccess() {
|
closeDialogSuccess() {
|
||||||
this.qrtext = '';
|
this.qrtext = '';
|
||||||
// this.$router.push({
|
this.$router.push({
|
||||||
// path: "/index",
|
path: "/myorder/usertion",
|
||||||
// });
|
query:{
|
||||||
|
stype:1,
|
||||||
|
orderNumber:this.userPayData.orderId
|
||||||
|
}
|
||||||
|
});
|
||||||
},
|
},
|
||||||
closeDialogFail() {
|
closeDialogFail() {
|
||||||
this.qrtext = '';
|
this.qrtext = '';
|
||||||
@ -130,6 +150,16 @@ export default {
|
|||||||
// });
|
// });
|
||||||
},
|
},
|
||||||
|
|
||||||
|
async repayOrde(ordernumber) {
|
||||||
|
let res = await repayOrde(ordernumber);
|
||||||
|
console.log(ordernumber);
|
||||||
|
if (res) {
|
||||||
|
console.log(res)
|
||||||
|
this.qrtext=res.msg
|
||||||
|
console.log(this.qrtext);
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
async selectGoods(item, index) {
|
async selectGoods(item, index) {
|
||||||
this.activeIndex = index;
|
this.activeIndex = index;
|
||||||
this.paytype = item.paytype;
|
this.paytype = item.paytype;
|
||||||
@ -142,15 +172,20 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
//支付监听
|
//支付监听
|
||||||
|
|
||||||
async payOrderWX() {
|
async payOrderWX() {
|
||||||
let res = await updateOrderWX();
|
let res = await monitorOrderNotify(this.userPayData.orderId);
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.qrtext = '成功加入群的二维码';
|
this.qrtext = '成功加入群的二维码';
|
||||||
this.dialogSuccess = true;
|
this.dialogSuccess = true;
|
||||||
|
|
||||||
} else if (res.fail) {
|
} else if (res.fail) {
|
||||||
this.dialogFail = true;
|
this.dialogFail = true;
|
||||||
}else{
|
}else{
|
||||||
this.payOrderWX()
|
let _self = this;
|
||||||
|
this.paymentTimer = setTimeout(function(){
|
||||||
|
_self.payOrderWX()
|
||||||
|
},5000);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
@ -290,7 +325,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
.paycord {
|
.paycord {
|
||||||
display: none;
|
//display: none;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
@ -2,9 +2,9 @@
|
|||||||
<div>
|
<div>
|
||||||
<div class="user">
|
<div class="user">
|
||||||
<Myheader></Myheader>
|
<Myheader></Myheader>
|
||||||
<unlogin></unlogin>
|
<div class="rc-top"></div>
|
||||||
<tabs></tabs>
|
<tabs :crumbs="crumbs"></tabs>
|
||||||
<div class="online" id="fixed-catbar-seperator"></div>
|
<div class="online rc-margin--none" id="fixed-catbar-seperator"></div>
|
||||||
<div class="rc-top"></div>
|
<div class="rc-top"></div>
|
||||||
<div
|
<div
|
||||||
class="
|
class="
|
||||||
@ -106,7 +106,13 @@
|
|||||||
<div class="rc-productdetail" v-if="!userbuy">
|
<div class="rc-productdetail" v-if="!userbuy">
|
||||||
<i class="ts-row-title">所属分类:</i>
|
<i class="ts-row-title">所属分类:</i>
|
||||||
<span>{{ curItem.categoryName }}</span>
|
<span>{{ curItem.categoryName }}</span>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
<div class="rc-button ">
|
||||||
|
<span @click="chuafangbuy()">立即购买</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
<div class="rc-productdetail" v-if="userbuy">
|
<div class="rc-productdetail" v-if="userbuy">
|
||||||
<i class="ts-row-title">商品价格:</i>
|
<i class="ts-row-title">商品价格:</i>
|
||||||
<span class="ts-realprice">¥{{ curItem.ecPrice }}</span>
|
<span class="ts-realprice">¥{{ curItem.ecPrice }}</span>
|
||||||
@ -135,7 +141,7 @@
|
|||||||
<i class="ts-row-title">商品规格:</i>
|
<i class="ts-row-title">商品规格:</i>
|
||||||
</div>
|
</div>
|
||||||
<div class="ts-tag-list">
|
<div class="ts-tag-list">
|
||||||
<em v-for="(item, index) in newlist" :key="index" @click="selectsearch(item, index)" :class="[activeIndexa==index?'active':'unactive',item.leftAllotment>0?'':'disabled']">
|
<em v-for="(item, index) in newlist" :key="index" @click="selectsearch(item, index)" :class="[(activeIndexa==index && item.leftAllotment>0)?'active':'unactive',item.leftAllotment>0?'':'disabled']">
|
||||||
{{ item.specifications }}
|
{{ item.specifications }}
|
||||||
</em>
|
</em>
|
||||||
</div>
|
</div>
|
||||||
@ -147,7 +153,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="rc-main">
|
<div class="rc-main">
|
||||||
<div class="rc-produnnum">
|
<div class="rc-produnnum" v-if="(userbuy && curItem.leftAllotment>0)">
|
||||||
<div><i class="ts-row-title">商品数量:</i></div>
|
<div><i class="ts-row-title">商品数量:</i></div>
|
||||||
<img
|
<img
|
||||||
src="../../assets/image/userjian.png"
|
src="../../assets/image/userjian.png"
|
||||||
@ -187,15 +193,16 @@
|
|||||||
<li>
|
<li>
|
||||||
<span
|
<span
|
||||||
><i class="ts-row-title">商品编号:</i
|
><i class="ts-row-title">商品编号:</i
|
||||||
><i>{{ curItem.brandCode }}</i></span
|
><i>{{ curItem.productCode }}</i></span
|
||||||
>
|
>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="rc-button" v-if="userbuy">
|
<div class="rc-button" v-if="(userbuy && curItem.leftAllotment>0)">
|
||||||
<span @click="usertanchu(curItem, 0)">加入购物车</span>
|
<span @click="usertanchu(curItem, 0)">加入购物车</span>
|
||||||
<span @click="usertanchu(curItem, 1)">立即购买</span>
|
<span @click="usertanchu(curItem, 1)">立即购买</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="online bold rc-md-down"></div>
|
<div class="online bold rc-md-down"></div>
|
||||||
</div>
|
</div>
|
||||||
@ -207,8 +214,10 @@
|
|||||||
</div>
|
</div>
|
||||||
<FixRight></FixRight>
|
<FixRight></FixRight>
|
||||||
<Myfooter v-on:litentop="showmesg"></Myfooter>
|
<Myfooter v-on:litentop="showmesg"></Myfooter>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<el-dialog :visible.sync="dialogInfo1" @close="userclose" class="pop_coupon">
|
<el-dialog :visible.sync="dialogInfo1" @close="userclose" class="pop_coupon" :close-on-click-modal="false">
|
||||||
|
<div class="ts-no-data" v-if="usernewlist.length<=0">目前还没有可用的优惠券</div>
|
||||||
<div class="rs-dis">
|
<div class="rs-dis">
|
||||||
<div
|
<div
|
||||||
class="rc-discount"
|
class="rc-discount"
|
||||||
@ -218,17 +227,24 @@
|
|||||||
<img :src="userimage" alt="" />
|
<img :src="userimage" alt="" />
|
||||||
<div class="rc-contair">
|
<div class="rc-contair">
|
||||||
<div class="rc-left">
|
<div class="rc-left">
|
||||||
<div v-if="item.couponAmount">
|
<div>
|
||||||
<i>¥</i><span>{{ item.couponAmount }}</span>
|
<i v-if="(item.couponTypeId!='4' && item.couponAmount>0)">
|
||||||
|
¥
|
||||||
|
</i>
|
||||||
|
<span>
|
||||||
|
{{ item.couponAmount?item.couponAmount:(parseInt((item.discount)*10)+'折') }}
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
<strong>{{ item.couponName }}</strong>
|
||||||
</div>
|
</div>
|
||||||
<div class="rc-right">
|
<div class="rc-right">
|
||||||
<i>
|
<i>
|
||||||
{{ item.couponDesc }}
|
{{ item.couponName }}
|
||||||
</i>
|
</i>
|
||||||
<div>
|
<div class="rc-userfont">
|
||||||
<span>有效期</span>
|
<strong>有效期</strong>
|
||||||
<em>{{ item.validTo }}</em>
|
<span>{{item.validFrom}}至</span>
|
||||||
|
<em>{{item.validTo}}</em>
|
||||||
</div>
|
</div>
|
||||||
<div class="rc-footer">
|
<div class="rc-footer">
|
||||||
<span @click="usergetconf(item)">立即领取</span>
|
<span @click="usergetconf(item)">立即领取</span>
|
||||||
@ -254,10 +270,12 @@
|
|||||||
</nuxt-link>
|
</nuxt-link>
|
||||||
</div>
|
</div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<div class="rc-button rc-md-down">
|
<div class="rc-button rc-md-down" v-if="(userbuy && curItem.leftAllotment>0)">
|
||||||
<span @click="usertanchu(curItem, 0)">加入购物车</span>
|
<span @click="usertanchu(curItem, 0)">加入购物车</span>
|
||||||
<span @click="usertanchu(curItem, 1)">立即购买</span>
|
<span @click="usertanchu(curItem, 1)">立即购买</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -267,6 +285,8 @@ import tabs from "@/components/tabs.vue";
|
|||||||
import FixRight from "~/components/fixed-right.vue";
|
import FixRight from "~/components/fixed-right.vue";
|
||||||
import unlogin from "~/components/unlogin.vue";
|
import unlogin from "~/components/unlogin.vue";
|
||||||
import Myfooter from "~/components/rc-footer.vue";
|
import Myfooter from "~/components/rc-footer.vue";
|
||||||
|
import { mapMutations } from "vuex";
|
||||||
|
const settings = require("@/config");
|
||||||
import {
|
import {
|
||||||
goodsmessage,
|
goodsmessage,
|
||||||
getConfig,
|
getConfig,
|
||||||
@ -276,26 +296,30 @@ import {
|
|||||||
oncequery,
|
oncequery,
|
||||||
biaomessage
|
biaomessage
|
||||||
} from "../../ajax/getData";
|
} from "../../ajax/getData";
|
||||||
import { mapMutations } from "vuex";
|
|
||||||
const settings = require("@/config");
|
|
||||||
export default {
|
export default {
|
||||||
async asyncData (context) {
|
async asyncData (context) {
|
||||||
let isRxGoods = context.route.query.isRxGoods;
|
let isRxGoods = context.route.query.isRxGoods;
|
||||||
let userbuy = true;
|
let userbuy = true;
|
||||||
let newlist = [];
|
let newlist = [];
|
||||||
let curItem = {};
|
let curItem = {};
|
||||||
|
let chufang = {};
|
||||||
let productAttachmentList = [];
|
let productAttachmentList = [];
|
||||||
let userlistmenu = [];
|
let userlistmenu = [];
|
||||||
isRxGoods = (isRxGoods == '1'?true:false);
|
isRxGoods = (isRxGoods == '1'?true:false);
|
||||||
let mainProductCode = context.route.query.mainProductCode;
|
let mainProductCode = context.route.query.mainProductCode;
|
||||||
let productCode = context.route.query.productCode;
|
let productCode = context.route.query.productCode;
|
||||||
let activeIndexa = 0;
|
let activeIndexa = 0;
|
||||||
|
if(!productCode || productCode.length<=0)
|
||||||
|
throw new Error('Empty product code');
|
||||||
productCode = productCode.split(",");
|
productCode = productCode.split(",");
|
||||||
// console.log(this.productCode);
|
// console.log(this.productCode);
|
||||||
if(isRxGoods){
|
if(isRxGoods){
|
||||||
let data = await oncequery(mainProductCode);
|
let data = await oncequery(mainProductCode);
|
||||||
let outputObj = {};
|
let outputObj = {};
|
||||||
if (data) {
|
if (data) {
|
||||||
|
console.log(data);
|
||||||
|
chufang=data;
|
||||||
outputObj = data;
|
outputObj = data;
|
||||||
outputObj.productName = data.name;
|
outputObj.productName = data.name;
|
||||||
outputObj.picture = 'https://royalcanincn.escase.cn/jc/royalcanin/'+outputObj.picture;
|
outputObj.picture = 'https://royalcanincn.escase.cn/jc/royalcanin/'+outputObj.picture;
|
||||||
@ -306,6 +330,9 @@ export default {
|
|||||||
let insertTmpObj = {id:1, attachmentType:1, sort:1, attachmentPath:newlist[0].picture};
|
let insertTmpObj = {id:1, attachmentType:1, sort:1, attachmentPath:newlist[0].picture};
|
||||||
productAttachmentList = [insertTmpObj];
|
productAttachmentList = [insertTmpObj];
|
||||||
userbuy = false;
|
userbuy = false;
|
||||||
|
console.log('这是处方量数据')
|
||||||
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
let stopLeftAllotmentChecking = false;
|
let stopLeftAllotmentChecking = false;
|
||||||
let stopIndex = 0;
|
let stopIndex = 0;
|
||||||
@ -321,20 +348,32 @@ export default {
|
|||||||
stopIndex++;
|
stopIndex++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
productAttachmentList = newlist[0].productAttachmentList;
|
if(curItem.productAttachmentList != undefined)
|
||||||
|
productAttachmentList = curItem.productAttachmentList;
|
||||||
|
if(curItem.productName == undefined)
|
||||||
|
curItem = newlist[0];
|
||||||
userbuy = true;
|
userbuy = true;
|
||||||
}
|
}
|
||||||
|
if(!curItem || curItem.productName == undefined)
|
||||||
|
throw new Error("商品信息错误");
|
||||||
|
let crumbs = [
|
||||||
|
{
|
||||||
|
path:'/productdetails/productlist/',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: curItem.productName,
|
||||||
|
}
|
||||||
|
];
|
||||||
return {
|
return {
|
||||||
|
crumbs,
|
||||||
activeIndexa,
|
activeIndexa,
|
||||||
curItem,
|
curItem,
|
||||||
newlist,
|
newlist,
|
||||||
|
chufang,
|
||||||
productAttachmentList,
|
productAttachmentList,
|
||||||
userbuy
|
userbuy
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// middleware: 'metaTitle',
|
|
||||||
// // middleware: 'metaTitle',
|
|
||||||
// meta: {title: '产品详情'},
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
tableLabelTest: [],
|
tableLabelTest: [],
|
||||||
@ -354,6 +393,7 @@ export default {
|
|||||||
productlist: [],
|
productlist: [],
|
||||||
userbuy: true,
|
userbuy: true,
|
||||||
sales_num: 1,
|
sales_num: 1,
|
||||||
|
|
||||||
productAttachmentList: [],
|
productAttachmentList: [],
|
||||||
usernewlist: [
|
usernewlist: [
|
||||||
{
|
{
|
||||||
@ -373,20 +413,6 @@ export default {
|
|||||||
catimage: require("../../assets/image/unused.png"),
|
catimage: require("../../assets/image/unused.png"),
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
fixedlist: [
|
|
||||||
{
|
|
||||||
title: "购物车",
|
|
||||||
catimage: require("../../assets/buy.png"),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "在线客服",
|
|
||||||
catimage: require("../../assets/service.png"),
|
|
||||||
},
|
|
||||||
{
|
|
||||||
title: "营养专家",
|
|
||||||
catimage: require("../../assets/consult.png"),
|
|
||||||
},
|
|
||||||
],
|
|
||||||
|
|
||||||
newlist: [
|
newlist: [
|
||||||
{
|
{
|
||||||
@ -417,6 +443,10 @@ export default {
|
|||||||
Myfooter,
|
Myfooter,
|
||||||
FixRight
|
FixRight
|
||||||
},
|
},
|
||||||
|
// middleware: 'metaTitle',
|
||||||
|
// // middleware: 'metaTitle',
|
||||||
|
// meta: {title: '产品详情'},
|
||||||
|
|
||||||
mounted() {
|
mounted() {
|
||||||
this.checkIsLogin();
|
this.checkIsLogin();
|
||||||
if (this.usermessage !== "" || this.usermessage.data !== undefined) {
|
if (this.usermessage !== "" || this.usermessage.data !== undefined) {
|
||||||
@ -462,6 +492,10 @@ export default {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
//处方用粮跳转
|
||||||
|
chuafangbuy(){
|
||||||
|
window.location.href =this.chufang.goodUrl;
|
||||||
|
},
|
||||||
|
|
||||||
// changeName(newName){
|
// changeName(newName){
|
||||||
// this.name = newName;
|
// this.name = newName;
|
||||||
@ -469,6 +503,7 @@ export default {
|
|||||||
|
|
||||||
userclose() {
|
userclose() {
|
||||||
this.userlist = [];
|
this.userlist = [];
|
||||||
|
this.dialogInfo1=false;
|
||||||
},
|
},
|
||||||
async userquery() {
|
async userquery() {
|
||||||
let data = await goodsmessage(this.productCode);
|
let data = await goodsmessage(this.productCode);
|
||||||
@ -515,7 +550,7 @@ export default {
|
|||||||
let alllist = [];
|
let alllist = [];
|
||||||
this.userlist = this.alldraw.data;
|
this.userlist = this.alldraw.data;
|
||||||
this.userlist.forEach((element, index) => {
|
this.userlist.forEach((element, index) => {
|
||||||
if (typeof element.productCodes == "string") {
|
if (typeof element.productCodes == "string" || !element.productCodes) {
|
||||||
userlist.push(element);
|
userlist.push(element);
|
||||||
// let s=element.productCodes.split(',');
|
// let s=element.productCodes.split(',');
|
||||||
// console.log(s.indexOf(this.productCode) != -1 )
|
// console.log(s.indexOf(this.productCode) != -1 )
|
||||||
@ -524,14 +559,36 @@ export default {
|
|||||||
});
|
});
|
||||||
let menualist = [];
|
let menualist = [];
|
||||||
userlist.filter((item) => {
|
userlist.filter((item) => {
|
||||||
|
let valDateFromTime=0;
|
||||||
|
let valDateToTime=0;
|
||||||
|
let curTime = new Date().getTime();
|
||||||
|
let dateChecked=true;
|
||||||
|
if(item.fValidFrom) {
|
||||||
|
valDateFromTime = new Date(item.fValidFrom).getTime();
|
||||||
|
}
|
||||||
|
if(item.fValidTo) {
|
||||||
|
valDateToTime = new Date(item.fValidTo).getTime();
|
||||||
|
}
|
||||||
|
if(valDateFromTime && curTime < valDateFromTime) {
|
||||||
|
dateChecked=false;
|
||||||
|
}
|
||||||
|
if(valDateToTime && curTime > valDateToTime) {
|
||||||
|
dateChecked=false;
|
||||||
|
}
|
||||||
|
if(dateChecked && item.activityId!=10) {
|
||||||
|
if(!item.productCodes) {
|
||||||
|
menualist.push(item);
|
||||||
|
} else {
|
||||||
item.productCodes = item.productCodes.split(",");
|
item.productCodes = item.productCodes.split(",");
|
||||||
item.productCodes.forEach((element) => {
|
item.productCodes.forEach((element) => {
|
||||||
if (element == this.productCode && item.activityId !== 10) {
|
if (element == this.curItem.productCode) {
|
||||||
console.log(element);
|
|
||||||
console.log(this.productCode);
|
|
||||||
menualist.push(item);
|
menualist.push(item);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
//Expired coupons
|
||||||
|
}
|
||||||
});
|
});
|
||||||
this.usernewlist = menualist;
|
this.usernewlist = menualist;
|
||||||
}
|
}
|
||||||
@ -560,6 +617,8 @@ export default {
|
|||||||
// let userid=JSON.parse(location.getItem('userInfo'));
|
// let userid=JSON.parse(location.getItem('userInfo'));
|
||||||
// let mobile=JSON.parse(location.getItem('userInfo'));
|
// let mobile=JSON.parse(location.getItem('userInfo'));
|
||||||
// console.log(userid,mobile);
|
// console.log(userid,mobile);
|
||||||
|
let basePoint = item.basePoint;
|
||||||
|
basePoint = basePoint?basePoint:0;
|
||||||
let data = await postCourseId(
|
let data = await postCourseId(
|
||||||
item.productCode,
|
item.productCode,
|
||||||
this.sales_num,
|
this.sales_num,
|
||||||
@ -567,9 +626,10 @@ export default {
|
|||||||
this.usermessage.data.mobile,
|
this.usermessage.data.mobile,
|
||||||
item.picFile,
|
item.picFile,
|
||||||
item.productName,
|
item.productName,
|
||||||
item.basePrice,
|
item.ecPrice,
|
||||||
item.specifications,
|
item.specifications,
|
||||||
item.leftAllotment
|
item.leftAllotment,
|
||||||
|
basePoint
|
||||||
);
|
);
|
||||||
if (data) {
|
if (data) {
|
||||||
this.productlist = data;
|
this.productlist = data;
|
||||||
@ -597,9 +657,11 @@ export default {
|
|||||||
productName: item.productName,
|
productName: item.productName,
|
||||||
productImg: item.picFile,
|
productImg: item.picFile,
|
||||||
specifications: item.specifications,
|
specifications: item.specifications,
|
||||||
buyCount: item.pcs,
|
leftAllotment: item.leftAllotment,
|
||||||
memberId: "884258",
|
basePoint: item.basePoint,
|
||||||
mobile: "13480231061",
|
buyCount: this.sales_num,
|
||||||
|
memberId: "",
|
||||||
|
mobile: "",
|
||||||
checked: true,
|
checked: true,
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
@ -619,7 +681,7 @@ export default {
|
|||||||
this.dialogInfo2 = true;
|
this.dialogInfo2 = true;
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
this.userdraw(this.usermessage.data.mobile);
|
//this.userdraw(this.usermessage.data.mobile);
|
||||||
this.alldrawlist(this.usermessage.data.id);
|
this.alldrawlist(this.usermessage.data.id);
|
||||||
this.dialogInfo1 = true;
|
this.dialogInfo1 = true;
|
||||||
}
|
}
|
||||||
@ -630,6 +692,8 @@ export default {
|
|||||||
this.activeIndexa = index;
|
this.activeIndexa = index;
|
||||||
this.curItem = item;
|
this.curItem = item;
|
||||||
this.productAttachmentList = item.productAttachmentList;
|
this.productAttachmentList = item.productAttachmentList;
|
||||||
|
this.crumbs.pop();
|
||||||
|
this.crumbs.push({title: item.productName});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -638,6 +702,5 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
@import url("../../assets/css/global.less");
|
|
||||||
@import url("../../assets/css/producted.less");
|
@import url("../../assets/css/producted.less");
|
||||||
</style>
|
</style>
|
@ -110,7 +110,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="rc-column">
|
<div class="rc-column">
|
||||||
<div class="rc-click" @click="selectproduce(item)">
|
<div class="rc-click" @click="selectproduce(item)">
|
||||||
<span>{{ item.categoryName }}</span>
|
<span>{{ item.name }}</span>
|
||||||
<i>{{ item.ecPrice?("¥"+item.ecPrice):'' }}</i>
|
<i>{{ item.ecPrice?("¥"+item.ecPrice):'' }}</i>
|
||||||
</div>
|
</div>
|
||||||
<strong
|
<strong
|
||||||
@ -325,7 +325,6 @@ export default {
|
|||||||
crumbs:[
|
crumbs:[
|
||||||
{
|
{
|
||||||
path:'/productdetails/productlist/',
|
path:'/productdetails/productlist/',
|
||||||
title:'产品列表',
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
value: "",
|
value: "",
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
<div class="rc-max-width--xl rc-people rc-useaddress">
|
<div class="rc-max-width--xl rc-people rc-useaddress">
|
||||||
<span>详细地址:</span>
|
<span>详细地址:</span>
|
||||||
<input type="text" placeholder="小区、门牌号等" class="userinput" v-model="alladdress">
|
<input type="text" placeholder="小区、门牌号等" class="userinput" v-model="alladdress">
|
||||||
<textarea rows="10" cols="30" placeholder="请输入详细地址">
|
<textarea rows="10" cols="30" placeholder="请输入详细地址" v-model="alladdress">
|
||||||
</textarea>
|
</textarea>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -101,10 +101,8 @@ export default {
|
|||||||
handleClose1(){
|
handleClose1(){
|
||||||
this.dialogInfo1 = false
|
this.dialogInfo1 = false
|
||||||
},
|
},
|
||||||
|
|
||||||
register(){
|
register(){
|
||||||
console.log(this.tel)
|
if (this.alladdress==='') {
|
||||||
if ( this.alladdress==='') {
|
|
||||||
this.$message({
|
this.$message({
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
message: '请输入详细地址 '
|
message: '请输入详细地址 '
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
<div>
|
<div>
|
||||||
<Myheader></Myheader>
|
<Myheader></Myheader>
|
||||||
<div class="rc-top"></div>
|
<div class="rc-top"></div>
|
||||||
|
<tabs :crumbs="crumbs"></tabs>
|
||||||
<div class="online bold"></div>
|
<div class="online bold"></div>
|
||||||
<div class="usercontshow rc-max-width--xl">
|
<div class="usercontshow rc-max-width--xl">
|
||||||
<div class="usercontend" v-for="(item, index) in list" :key="index">
|
<div class="usercontend" v-for="(item, index) in list" :key="index">
|
||||||
@ -67,10 +68,19 @@
|
|||||||
<script>
|
<script>
|
||||||
import Myheader from '~/components/header.vue'
|
import Myheader from '~/components/header.vue'
|
||||||
import MyFooter from '~/components/rc-footer.vue'
|
import MyFooter from '~/components/rc-footer.vue'
|
||||||
|
import tabs from "~/components/tabs.vue";
|
||||||
import { selectaddress,editupdate,editdelete} from "../../ajax/getData";
|
import { selectaddress,editupdate,editdelete} from "../../ajax/getData";
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
crumbs:[
|
||||||
|
{
|
||||||
|
path:'/personal/mypersonal/',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
path:'/useraddress/openaddress/',
|
||||||
|
}
|
||||||
|
],
|
||||||
chosenAddressId: "1",
|
chosenAddressId: "1",
|
||||||
checked: true,
|
checked: true,
|
||||||
userid: null,
|
userid: null,
|
||||||
@ -176,7 +186,8 @@ export default {
|
|||||||
},
|
},
|
||||||
components: {
|
components: {
|
||||||
Myheader,
|
Myheader,
|
||||||
MyFooter
|
MyFooter,
|
||||||
|
tabs
|
||||||
},
|
},
|
||||||
|
|
||||||
mounted() {
|
mounted() {
|
||||||
@ -191,6 +202,5 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="less" scoped >
|
<style lang="less" scoped >
|
||||||
@import url("../../assets/css/global.less");
|
|
||||||
@import url("../../assets/css/openaddress.less");
|
@import url("../../assets/css/openaddress.less");
|
||||||
</style>
|
</style>
|
@ -256,10 +256,14 @@ export default {
|
|||||||
else{
|
else{
|
||||||
//let user= JSON.parse(localStorage.getItem("userInfo"));
|
//let user= JSON.parse(localStorage.getItem("userInfo"));
|
||||||
let data = await this.vadmsg();
|
let data = await this.vadmsg();
|
||||||
if(data.code=="1")
|
console.log(data.code)
|
||||||
|
if(data.code=1)
|
||||||
{
|
{
|
||||||
|
console.log('---');
|
||||||
data=await useredit(this.tel);
|
data=await useredit(this.tel);
|
||||||
if(data.code=='1'){
|
console.log(this.tel);
|
||||||
|
console.log(data);
|
||||||
|
if(data.code=1){
|
||||||
let couponId='0000000123';
|
let couponId='0000000123';
|
||||||
this.serdiscount(this.tel,couponId);
|
this.serdiscount(this.tel,couponId);
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
|
@ -75,14 +75,40 @@
|
|||||||
<label>
|
<label>
|
||||||
<input
|
<input
|
||||||
type="checkbox"
|
type="checkbox"
|
||||||
@click="checkBox()"
|
@click="checkBox($event,2)"
|
||||||
style="width: 24px; height: 24px"
|
|
||||||
v-model="inRank"
|
v-model="inRank"
|
||||||
/>我已阅读同意隐私声明和账号使用协议
|
/>
|
||||||
|
<strong>本人已年满16周岁,同意并接受公司按<a href="https://royalcanin.com.cn/privacy"><i>《隐私政策》</i></a>及<a href="https://royalcanin.com.cn/declaration"><i>《法律声明》</i></a>的规定收集和处理我的个人信息。
|
||||||
|
您可以就隐私问题通过隐私政策中的方式联系我们并行使您的个人信息权利。</strong>
|
||||||
</label>
|
</label>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="usecheck rc-column rc-text--left">
|
||||||
|
<label>
|
||||||
|
<input
|
||||||
|
type="checkbox"
|
||||||
|
@click="checkBox($event,3)"
|
||||||
|
v-model="inRanka"
|
||||||
|
/>
|
||||||
|
<strong>
|
||||||
|
我已阅读和了解皇家爱宠荟的<a href="https://royalcanin.com.cn/member-principle"><i>《会员规则》</i></a>并同意接受其中所有的条框。</strong>
|
||||||
|
</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="rc-layout-container rc-two-column rc-button">
|
<div class="usecheck rc-column rc-text--left">
|
||||||
|
<label>
|
||||||
|
<input
|
||||||
|
type="checkbox"
|
||||||
|
@click="checkBox($event,1)"
|
||||||
|
v-model="allcheck"
|
||||||
|
/>
|
||||||
|
<i>
|
||||||
|
一键勾选
|
||||||
|
</i>
|
||||||
|
</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<!-- <div class="rc-layout-container rc-two-column rc-button">
|
||||||
<div class="rc-column rc-text--left">
|
<div class="rc-column rc-text--left">
|
||||||
<a href="https://royalcanin.com.cn/privacy" target="_blank" class="rc-styled-link"><span>隐私政策</span></a>
|
<a href="https://royalcanin.com.cn/privacy" target="_blank" class="rc-styled-link"><span>隐私政策</span></a>
|
||||||
</div>
|
</div>
|
||||||
@ -91,7 +117,7 @@
|
|||||||
<span>注册账户</span>
|
<span>注册账户</span>
|
||||||
</nuxt-link>
|
</nuxt-link>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div> -->
|
||||||
|
|
||||||
<div class="rc-layout-container rc-one-column">
|
<div class="rc-layout-container rc-one-column">
|
||||||
<div class="rc-column">
|
<div class="rc-column">
|
||||||
@ -126,8 +152,14 @@ export default {
|
|||||||
layerMSg: "手机格式不对",
|
layerMSg: "手机格式不对",
|
||||||
tel: "",
|
tel: "",
|
||||||
password: "",
|
password: "",
|
||||||
|
allcheck:false,
|
||||||
activeIndex: 0,
|
activeIndex: 0,
|
||||||
tamp:'',
|
tamp:'',
|
||||||
|
radioData: [
|
||||||
|
{ value: '全部' ,href:'https://royalcanin.com.cn/privacy' },
|
||||||
|
{ value: '部分' ,href:''},
|
||||||
|
{ value: '零散' }
|
||||||
|
],
|
||||||
hash:'',
|
hash:'',
|
||||||
text: "",
|
text: "",
|
||||||
sms: "",
|
sms: "",
|
||||||
@ -141,6 +173,7 @@ export default {
|
|||||||
ifpassword: false,
|
ifpassword: false,
|
||||||
checked: false,
|
checked: false,
|
||||||
inRank: false,
|
inRank: false,
|
||||||
|
inRanka: false,
|
||||||
usercheckbox:false,
|
usercheckbox:false,
|
||||||
|
|
||||||
swiperData: [
|
swiperData: [
|
||||||
@ -188,13 +221,20 @@ export default {
|
|||||||
// console.log(this.inRank);
|
// console.log(this.inRank);
|
||||||
// },
|
// },
|
||||||
methods: {
|
methods: {
|
||||||
|
//全选
|
||||||
|
checkBoxa(e,order){
|
||||||
|
let checked=e.target.checked;
|
||||||
|
console.log(checked)
|
||||||
|
|
||||||
...mapMutations(["changeClod"]),
|
|
||||||
checkBox(){
|
|
||||||
console.log(event.target.checked)
|
|
||||||
this.usercheckbox=event.target.checked
|
|
||||||
},
|
},
|
||||||
|
|
||||||
|
checkBox(e,order){
|
||||||
|
console.log(e.target.checked)
|
||||||
|
this.usercheckbox=e.target.checked;
|
||||||
|
this.inRank= this.usercheckbox;
|
||||||
|
|
||||||
|
},
|
||||||
|
...mapMutations(["changeClod"]),
|
||||||
//获取验证码
|
//获取验证码
|
||||||
async usermsg() {
|
async usermsg() {
|
||||||
//console.log("-----");
|
//console.log("-----");
|
||||||
|
@ -1,11 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<transition name="fade">
|
|
||||||
<div class="userloding" v-show="isLoading"></div>
|
|
||||||
</transition>
|
|
||||||
|
|
||||||
<Myheader></Myheader>
|
<Myheader></Myheader>
|
||||||
<div class="rc-top"></div>
|
<div class="rc-top"></div>
|
||||||
|
<tabs :crumbs="crumbs"></tabs>
|
||||||
<div class="rc-max-width--xl rc-main">
|
<div class="rc-max-width--xl rc-main">
|
||||||
<div class="usersearch">
|
<div class="usersearch">
|
||||||
<div class="form-search">
|
<div class="form-search">
|
||||||
@ -41,7 +38,7 @@
|
|||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
<div class="usersearch">
|
<div class="usersearch rc-margin-top--md">
|
||||||
<div class="usercontentshow" ref="usercontent">
|
<div class="usercontentshow" ref="usercontent">
|
||||||
<div class="usercontentshow rc-product">
|
<div class="usercontentshow rc-product">
|
||||||
<h2>我想搜</h2>
|
<h2>我想搜</h2>
|
||||||
@ -121,7 +118,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="rc-column">
|
<div class="rc-column">
|
||||||
<div class="rc-click" @click="selectproduce(item)">
|
<div class="rc-click" @click="selectproduce(item)">
|
||||||
<span>{{ item.categoryName }}</span>
|
<span>{{ item.name }}</span>
|
||||||
<i>{{ item.ecPrice?("¥"+item.ecPrice):'' }}</i>
|
<i>{{ item.ecPrice?("¥"+item.ecPrice):'' }}</i>
|
||||||
</div>
|
</div>
|
||||||
<strong
|
<strong
|
||||||
@ -224,6 +221,7 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="rc-button">
|
<div class="rc-button">
|
||||||
<span @click="openclose()">取消</span>
|
<span @click="openclose()">取消</span>
|
||||||
<em @click="openclose()">确认</em>
|
<em @click="openclose()">确认</em>
|
||||||
@ -308,10 +306,12 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<!--
|
||||||
<div class="rc-button rc-padding-bottom--md">
|
<div class="rc-button rc-padding-bottom--md">
|
||||||
<span @click="openclose()">取消</span>
|
<span @click="openclose()">取消</span>
|
||||||
<em @click="openclose()">确认</em>
|
<em @click="openclose()">确认</em>
|
||||||
</div>
|
</div>
|
||||||
|
-->
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</div>
|
||||||
<!-- rc-main end -->
|
<!-- rc-main end -->
|
||||||
@ -329,13 +329,18 @@
|
|||||||
import Myheader from "~/components/header.vue";
|
import Myheader from "~/components/header.vue";
|
||||||
import MyFooter from '~/components/rc-footer.vue'
|
import MyFooter from '~/components/rc-footer.vue'
|
||||||
import FixRight from "~/components/fixed-right.vue";
|
import FixRight from "~/components/fixed-right.vue";
|
||||||
|
import tabs from "~/components/tabs.vue";
|
||||||
import { biaome, userstype, searchchanpin, userquery } from "../../ajax/getData";
|
import { biaome, userstype, searchchanpin, userquery } from "../../ajax/getData";
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
value: "",
|
value: "",
|
||||||
|
crumbs:[
|
||||||
|
{
|
||||||
|
path:'/usersearch/search/',
|
||||||
|
}
|
||||||
|
],
|
||||||
isLoading: true,
|
isLoading: true,
|
||||||
|
|
||||||
userserachlist: [
|
userserachlist: [
|
||||||
{
|
{
|
||||||
categoryName: [], //专区
|
categoryName: [], //专区
|
||||||
@ -516,7 +521,8 @@ export default {
|
|||||||
components: {
|
components: {
|
||||||
Myheader,
|
Myheader,
|
||||||
MyFooter,
|
MyFooter,
|
||||||
FixRight
|
FixRight,
|
||||||
|
tabs
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.usetmessage();
|
this.usetmessage();
|
||||||
|
BIN
rc-busness/static/images/default.jpg
Normal file
BIN
rc-busness/static/images/default.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 9.9 KiB |
BIN
rc-busness/static/images/delivery.png
Normal file
BIN
rc-busness/static/images/delivery.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 4.9 KiB |
BIN
rc-busness/static/images/paysucess.jpg
Normal file
BIN
rc-busness/static/images/paysucess.jpg
Normal file
Binary file not shown.
After Width: | Height: | Size: 60 KiB |
28
rc-busness/static/js/date.js
Normal file
28
rc-busness/static/js/date.js
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
|
||||||
|
//时间戳转化成格式时间
|
||||||
|
import Vue from 'vue';
|
||||||
|
Vue.prototype.formatConversion = function (te){
|
||||||
|
if(te == ''){
|
||||||
|
return '';
|
||||||
|
}else if(te.length == 10){
|
||||||
|
var time = new Date(te * 1000); //时间戳为10位需*1000,时间戳为13位的话不需乘1000
|
||||||
|
var y = time.getFullYear();
|
||||||
|
var m = time.getMonth() < 9 ? '0' + (time.getMonth() + 1) : time.getMonth() + 1;
|
||||||
|
var d = time.getDate() < 10 ? '0' + time.getDate() : time.getDate();
|
||||||
|
var h = time.getHours() < 10 ? '0' + time.getHours() : time.getHours();
|
||||||
|
var mm = time.getMinutes() < 10 ? '0' + time.getMinutes() : time.getMinutes();
|
||||||
|
var s = time.getSeconds() < 10 ? '0' + time.getSeconds() : time.getSeconds();
|
||||||
|
var timedate = y + '-' + m + '-' + d + ' ' + h + ':' + mm + ':' + s;
|
||||||
|
return timedate;
|
||||||
|
}else{
|
||||||
|
var time = new Date(te);
|
||||||
|
var y = time.getFullYear();
|
||||||
|
var m = time.getMonth() < 9 ? '0' + (time.getMonth() + 1) : time.getMonth() + 1;
|
||||||
|
var d = time.getDate() < 10 ? '0' + time.getDate() : time.getDate();
|
||||||
|
var h = time.getHours() < 10 ? '0' + time.getHours() : time.getHours();
|
||||||
|
var mm = time.getMinutes() < 10 ? '0' + time.getMinutes() : time.getMinutes();
|
||||||
|
var s = time.getSeconds() < 10 ? '0' + time.getSeconds() : time.getSeconds();
|
||||||
|
var timedate = y + '-' + m + '-' + d + ' ' + h + ':' + mm + ':' + s;
|
||||||
|
return timedate;
|
||||||
|
}
|
||||||
|
}
|
File diff suppressed because one or more lines are too long
@ -44,6 +44,7 @@ public class ResponseDTO<T> {
|
|||||||
this.success = responseCodeConst.isSuccess();
|
this.success = responseCodeConst.isSuccess();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private ResponseDTO(ResponseCodeConst responseCodeConst) {
|
private ResponseDTO(ResponseCodeConst responseCodeConst) {
|
||||||
this.code = responseCodeConst.getCode();
|
this.code = responseCodeConst.getCode();
|
||||||
this.msg = responseCodeConst.getMsg();
|
this.msg = responseCodeConst.getMsg();
|
||||||
@ -64,6 +65,8 @@ public class ResponseDTO<T> {
|
|||||||
return new ResponseDTO(ResponseCodeConst.SUCCESS, data, msg);
|
return new ResponseDTO(ResponseCodeConst.SUCCESS, data, msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public static <T> ResponseDTO<T> succData(T data) {
|
public static <T> ResponseDTO<T> succData(T data) {
|
||||||
return new ResponseDTO(ResponseCodeConst.SUCCESS, data);
|
return new ResponseDTO(ResponseCodeConst.SUCCESS, data);
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
package net.lab1024.smartadmin.module.system.alipay;
|
package net.lab1024.smartadmin.module.system.alipay;
|
||||||
|
|
||||||
import com.alipay.api.AlipayApiException;
|
|
||||||
import com.alipay.api.AlipayClient;
|
import com.alipay.api.AlipayClient;
|
||||||
import com.alipay.api.DefaultAlipayClient;
|
import com.alipay.api.DefaultAlipayClient;
|
||||||
import com.alipay.api.domain.AlipayTradePrecreateModel;
|
import com.alipay.api.domain.AlipayTradePrecreateModel;
|
||||||
@ -13,7 +12,6 @@ import net.lab1024.smartadmin.module.system.royalcanin.orderMaster.QueryEntity;
|
|||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
package net.lab1024.smartadmin.module.system.alipay;
|
package net.lab1024.smartadmin.module.system.alipay;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.alipay.api.AlipayApiException;
|
import com.alipay.api.AlipayApiException;
|
||||||
import com.alipay.api.AlipayClient;
|
import com.alipay.api.AlipayClient;
|
||||||
import com.alipay.api.DefaultAlipayClient;
|
import com.alipay.api.DefaultAlipayClient;
|
||||||
@ -10,10 +11,21 @@ import com.alipay.api.response.AlipayTradePrecreateResponse;
|
|||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import net.lab1024.smartadmin.common.anno.OperateLog;
|
import net.lab1024.smartadmin.common.anno.OperateLog;
|
||||||
|
import net.lab1024.smartadmin.common.heartbeat.StringUtil;
|
||||||
import net.lab1024.smartadmin.constant.SwaggerTagConst;
|
import net.lab1024.smartadmin.constant.SwaggerTagConst;
|
||||||
import net.lab1024.smartadmin.module.system.alipay.alipayModel.AliPayEntity;
|
import net.lab1024.smartadmin.module.system.alipay.alipayModel.AliPayEntity;
|
||||||
import net.lab1024.smartadmin.module.system.alipay.conf.AlipayConfig;
|
import net.lab1024.smartadmin.module.system.alipay.conf.AlipayConfig;
|
||||||
import net.lab1024.smartadmin.module.system.qrcode.QRCodeUtil;
|
import net.lab1024.smartadmin.module.system.qrcode.QRCodeUtil;
|
||||||
|
import net.lab1024.smartadmin.module.system.royalcanin.MemberAccountService;
|
||||||
|
import net.lab1024.smartadmin.module.system.royalcanin.good.model.OrderEntity;
|
||||||
|
import net.lab1024.smartadmin.module.system.royalcanin.good.model.ProductMasterQueryEntity;
|
||||||
|
import net.lab1024.smartadmin.module.system.royalcanin.good.service.OrderService;
|
||||||
|
import net.lab1024.smartadmin.module.system.royalcanin.memberAccount.MemberAccountChangeEntity;
|
||||||
|
import net.lab1024.smartadmin.module.system.royalcanin.notify.model.NotifyEntity;
|
||||||
|
import net.lab1024.smartadmin.module.system.royalcanin.notify.service.NotifyService;
|
||||||
|
import net.lab1024.smartadmin.util.MapRemoveNullUtil;
|
||||||
|
import net.lab1024.smartadmin.util.SmartHttpUtil;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
@ -23,7 +35,7 @@ import java.util.Iterator;
|
|||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.UUID;
|
import java.util.UUID;
|
||||||
|
|
||||||
@Api(tags = {SwaggerTagConst.Admin.MANAGER_MALL_PAY_API})
|
@Api(tags = {SwaggerTagConst.Admin.MANAGER_MALL_API})
|
||||||
@OperateLog
|
@OperateLog
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@RestController
|
@RestController
|
||||||
@ -32,6 +44,17 @@ public class AlipayController {
|
|||||||
|
|
||||||
public static String notify_url = "";
|
public static String notify_url = "";
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private OrderService orderService;
|
||||||
|
|
||||||
|
String url = "https://miniapp-test.royalcanin.com.cn/rcmini/h5/";
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private MemberAccountService memberAccountService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private NotifyService notifyService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 前往支付宝第三方网关进行支付
|
* @Description: 前往支付宝第三方网关进行支付
|
||||||
*/
|
*/
|
||||||
@ -65,47 +88,88 @@ public class AlipayController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
// @RequestMapping("royalcanin/updateOrderAliPay")
|
||||||
|
// public String returnUrl(HttpServletRequest request) throws Exception {
|
||||||
|
// Map<String,String> params = new HashMap<String,String>();
|
||||||
|
// Map<String,String[]> requestParams = request.getParameterMap();
|
||||||
|
// for (Iterator<String> iter = requestParams.keySet().iterator(); iter.hasNext();) {
|
||||||
|
// String name = (String) iter.next();
|
||||||
|
// String[] values = (String[]) requestParams.get(name);
|
||||||
|
// String valueStr = "";
|
||||||
|
// for (int i = 0; i < values.length; i++) {
|
||||||
|
// valueStr = (i == values.length - 1) ? valueStr + values[i]
|
||||||
|
// : valueStr + values[i] + ",";
|
||||||
|
// }
|
||||||
|
// //乱码解决,这段代码在出现乱码时使用(如果感觉自己配置没问题,然后验签一直失败,就把这个注释掉试试,反正我的是这个问题)
|
||||||
|
// //valueStr = new String(valueStr.getBytes("ISO-8859-1"), "utf-8");
|
||||||
|
// params.put(name, valueStr);
|
||||||
|
// }
|
||||||
|
// System.out.println("params:"+params);
|
||||||
|
// boolean signVerified = AlipaySignature.rsaCheckV1(params,AlipayConfig.alipay_public_key,AlipayConfig.charset,AlipayConfig.sign_type); //调用SDK验证签名
|
||||||
|
// System.out.println(signVerified);
|
||||||
|
// //——请在这里编写您的程序(以下代码仅作参考)——
|
||||||
|
// if(signVerified) {
|
||||||
|
// // 更新订单状态
|
||||||
|
// //商户订单号
|
||||||
|
// String out_trade_no = new String(request.getParameter("out_trade_no").getBytes("ISO-8859-1"),"UTF-8");
|
||||||
|
// //付款金额
|
||||||
|
// String total_amount = new String(request.getParameter("total_amount").getBytes("ISO-8859-1"),"UTF-8");
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// //支付宝交易号
|
||||||
|
// String trade_no = new String(request.getParameter("trade_no").getBytes("ISO-8859-1"),"UTF-8");
|
||||||
|
// OrderEntity orderEntity = orderService.findByOrderId(out_trade_no);
|
||||||
|
// String[] products = orderEntity.getProductCode().split(",");
|
||||||
|
// ProductMasterQueryEntity productMasterQueryEntity = new ProductMasterQueryEntity();
|
||||||
|
// double basePoint = 0;
|
||||||
|
// //自动获取会员积分
|
||||||
|
// for (String product : products) {
|
||||||
|
// productMasterQueryEntity.setProductCode(product);
|
||||||
|
// Map<String, String> paramMap = MapRemoveNullUtil.setConditionMap(productMasterQueryEntity);
|
||||||
|
// MapRemoveNullUtil.removeNullEntry(paramMap);
|
||||||
|
// paramMap.put("secret", "H5@2021");
|
||||||
|
// paramMap.put("channelId", "15");
|
||||||
|
// String sb = SmartHttpUtil.sendPostForm(url + "productMaster/query", paramMap, null);
|
||||||
|
// JSONObject jsonObject = JSONObject.parseObject(sb);
|
||||||
|
// com.alibaba.fastjson.JSONArray jsonArray = JSONObject.parseArray(jsonObject.getString("data"));
|
||||||
|
// JSONObject jsonObjectData = (JSONObject) jsonArray.get(0);
|
||||||
|
// basePoint = basePoint + Double.parseDouble(jsonObjectData.getString("basePoint"));
|
||||||
|
// }
|
||||||
|
// MemberAccountChangeEntity memberAccountChangeEntity = new MemberAccountChangeEntity();
|
||||||
|
// memberAccountChangeEntity.setChangeTypeId("1");
|
||||||
|
// memberAccountChangeEntity.setChangeValue(StringUtil.toString(basePoint));
|
||||||
|
// memberAccountChangeEntity.setMemberId(orderEntity.getMemberId());
|
||||||
|
// memberAccountService.memberAccountChange(memberAccountChangeEntity);
|
||||||
|
// NotifyEntity notifyEntity = new NotifyEntity();
|
||||||
|
// notifyEntity.setAppId(AlipayConfig.app_id);
|
||||||
|
// notifyEntity.setMchId(request.getParameter("seller_id"));
|
||||||
|
// notifyEntity.setSign(request.getParameter("sign"));
|
||||||
|
// notifyEntity.setResultCode(request.getParameter("code"));
|
||||||
|
// notifyEntity.setOpenid(request.getParameter("merchant_order_no"));
|
||||||
|
// notifyEntity.setOutTradeNo(out_trade_no);
|
||||||
|
// notifyEntity.setTotalFee(total_amount);
|
||||||
|
// notifyEntity.setTradeType(request.getParameter("sub_code"));
|
||||||
|
// notifyEntity.setFeeType("CNY");
|
||||||
|
// notifyEntity.setNonceStr(trade_no);
|
||||||
|
// notifyService.insertNotify(notifyEntity);
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
//
|
||||||
|
// String trade_status= new String(request.getParameter("trade_status").getBytes("ISO-8859-1"),"UTF-8");
|
||||||
|
// System.out.println("trade_status:"+trade_status);
|
||||||
|
// return "trade_no:"+trade_no+"<br/>out_trade_no:"+out_trade_no+"<br/>total_amount:"+total_amount;
|
||||||
|
// }else {
|
||||||
|
// return "验签失败";
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@RequestMapping("royalcanin/updateOrderAliPay")
|
@RequestMapping("royalcanin/updateOrderAliPay")
|
||||||
public String returnUrl(HttpServletRequest request) throws UnsupportedEncodingException, AlipayApiException{
|
|
||||||
Map<String,String> params = new HashMap<String,String>();
|
|
||||||
Map<String,String[]> requestParams = request.getParameterMap();
|
|
||||||
for (Iterator<String> iter = requestParams.keySet().iterator(); iter.hasNext();) {
|
|
||||||
String name = (String) iter.next();
|
|
||||||
String[] values = (String[]) requestParams.get(name);
|
|
||||||
String valueStr = "";
|
|
||||||
for (int i = 0; i < values.length; i++) {
|
|
||||||
valueStr = (i == values.length - 1) ? valueStr + values[i]
|
|
||||||
: valueStr + values[i] + ",";
|
|
||||||
}
|
|
||||||
//乱码解决,这段代码在出现乱码时使用(如果感觉自己配置没问题,然后验签一直失败,就把这个注释掉试试,反正我的是这个问题)
|
|
||||||
//valueStr = new String(valueStr.getBytes("ISO-8859-1"), "utf-8");
|
|
||||||
params.put(name, valueStr);
|
|
||||||
}
|
|
||||||
System.out.println("params:"+params);
|
|
||||||
boolean signVerified = AlipaySignature.rsaCheckV1(params,AlipayConfig.alipay_public_key,AlipayConfig.charset,AlipayConfig.sign_type); //调用SDK验证签名
|
|
||||||
System.out.println(signVerified);
|
|
||||||
//——请在这里编写您的程序(以下代码仅作参考)——
|
|
||||||
if(signVerified) {
|
|
||||||
//商户订单号
|
|
||||||
String out_trade_no = new String(request.getParameter("out_trade_no").getBytes("ISO-8859-1"),"UTF-8");
|
|
||||||
|
|
||||||
//支付宝交易号
|
|
||||||
String trade_no = new String(request.getParameter("trade_no").getBytes("ISO-8859-1"),"UTF-8");
|
|
||||||
//付款金额
|
|
||||||
String total_amount = new String(request.getParameter("total_amount").getBytes("ISO-8859-1"),"UTF-8");
|
|
||||||
|
|
||||||
String trade_status= new String(request.getParameter("trade_status").getBytes("ISO-8859-1"),"UTF-8");
|
|
||||||
System.out.println("trade_status:"+trade_status);
|
|
||||||
return "trade_no:"+trade_no+"<br/>out_trade_no:"+out_trade_no+"<br/>total_amount:"+total_amount;
|
|
||||||
}else {
|
|
||||||
return "验签失败";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@RequestMapping(value = "/alipayNotifyNotice")
|
|
||||||
@ResponseBody
|
@ResponseBody
|
||||||
public String alipayNotifyNotice(HttpServletRequest request, HttpServletRequest response) throws Exception {
|
public String alipayNotifyNotice(HttpServletRequest request, HttpServletRequest response) throws Exception {
|
||||||
|
|
||||||
@ -151,6 +215,7 @@ public class AlipayController {
|
|||||||
String total_amount = new String(request.getParameter("total_amount").getBytes("ISO-8859-1"), "UTF-8");
|
String total_amount = new String(request.getParameter("total_amount").getBytes("ISO-8859-1"), "UTF-8");
|
||||||
|
|
||||||
if (trade_status.equals("TRADE_FINISHED")) {
|
if (trade_status.equals("TRADE_FINISHED")) {
|
||||||
|
return "TRADE_FINISHED";
|
||||||
//判断该笔订单是否在商户网站中已经做过处理
|
//判断该笔订单是否在商户网站中已经做过处理
|
||||||
//如果没有做过处理,根据订单号(out_trade_no)在商户网站的订单系统中查到该笔订单的详细,并执行商户的业务程序
|
//如果没有做过处理,根据订单号(out_trade_no)在商户网站的订单系统中查到该笔订单的详细,并执行商户的业务程序
|
||||||
//如果有做过处理,不执行商户的业务程序
|
//如果有做过处理,不执行商户的业务程序
|
||||||
@ -167,23 +232,48 @@ public class AlipayController {
|
|||||||
|
|
||||||
// 修改叮当状态,改为 支付成功,已付款; 同时新增支付流水
|
// 修改叮当状态,改为 支付成功,已付款; 同时新增支付流水
|
||||||
// ordersService.updateOrderStatus(out_trade_no, trade_no, total_amount);
|
// ordersService.updateOrderStatus(out_trade_no, trade_no, total_amount);
|
||||||
//
|
|
||||||
// //这里不用 查 只是为了 看日志 查的方法应该卸载 同步回调 页面 中
|
|
||||||
// Orders order = ordersService.getOrderById(out_trade_no);
|
|
||||||
// Product product = productService.getProductById(order.getProductId());
|
|
||||||
//
|
|
||||||
// LOGGER.info("********************** 支付成功(支付宝异步通知)查询 只是为了 看日志 **********************");
|
|
||||||
// LOGGER.info("* 订单号: {}", out_trade_no);
|
|
||||||
// LOGGER.info("* 支付宝交易号: {}", trade_no);
|
|
||||||
// LOGGER.info("* 实付金额: {}", total_amount);
|
|
||||||
// LOGGER.info("* 购买产品: {}", product.getName());
|
|
||||||
// LOGGER.info("***************************************************************");
|
|
||||||
|
|
||||||
|
OrderEntity orderEntity = orderService.findByOrderId(out_trade_no);
|
||||||
|
String[] products = orderEntity.getProductCode().split(",");
|
||||||
|
ProductMasterQueryEntity productMasterQueryEntity = new ProductMasterQueryEntity();
|
||||||
|
double basePoint = 0;
|
||||||
|
//自动获取会员积分
|
||||||
|
for (String product : products) {
|
||||||
|
productMasterQueryEntity.setProductCode(product);
|
||||||
|
Map<String, String> paramMap = MapRemoveNullUtil.setConditionMap(productMasterQueryEntity);
|
||||||
|
MapRemoveNullUtil.removeNullEntry(paramMap);
|
||||||
|
paramMap.put("secret", "H5@2021");
|
||||||
|
paramMap.put("channelId", "15");
|
||||||
|
String sb = SmartHttpUtil.sendPostForm(url + "productMaster/query", paramMap, null);
|
||||||
|
JSONObject jsonObject = JSONObject.parseObject(sb);
|
||||||
|
com.alibaba.fastjson.JSONArray jsonArray = JSONObject.parseArray(jsonObject.getString("data"));
|
||||||
|
JSONObject jsonObjectData = (JSONObject) jsonArray.get(0);
|
||||||
|
basePoint = basePoint + Double.parseDouble(jsonObjectData.getString("basePoint"));
|
||||||
|
}
|
||||||
|
MemberAccountChangeEntity memberAccountChangeEntity = new MemberAccountChangeEntity();
|
||||||
|
memberAccountChangeEntity.setChangeTypeId("1");
|
||||||
|
memberAccountChangeEntity.setChangeValue(StringUtil.toString(basePoint));
|
||||||
|
memberAccountChangeEntity.setMemberId(orderEntity.getMemberId());
|
||||||
|
memberAccountService.memberAccountChange(memberAccountChangeEntity);
|
||||||
|
NotifyEntity notifyEntity = new NotifyEntity();
|
||||||
|
notifyEntity.setAppId(AlipayConfig.app_id);
|
||||||
|
notifyEntity.setMchId(request.getParameter("seller_id"));
|
||||||
|
notifyEntity.setSign(request.getParameter("sign"));
|
||||||
|
notifyEntity.setResultCode(request.getParameter("code"));
|
||||||
|
notifyEntity.setOpenid(request.getParameter("merchant_order_no"));
|
||||||
|
notifyEntity.setOutTradeNo(out_trade_no);
|
||||||
|
notifyEntity.setTotalFee(total_amount);
|
||||||
|
notifyEntity.setTradeType(request.getParameter("sub_code"));
|
||||||
|
notifyEntity.setFeeType("CNY");
|
||||||
|
notifyEntity.setNonceStr(trade_no);
|
||||||
|
notifyService.insertNotify(notifyEntity);
|
||||||
|
}else {
|
||||||
|
return "验签失败";
|
||||||
}
|
}
|
||||||
// LOGGER.info("支付成功...");
|
// LOGGER.info("支付成功...");
|
||||||
|
|
||||||
} else {//验证失败
|
} else {//验证失败
|
||||||
// LOGGER.info("支付, 验签失败...");
|
// LOGGER.info("支付, 验签失败...");
|
||||||
|
return "支付, 验签失败";
|
||||||
}
|
}
|
||||||
|
|
||||||
return "success";
|
return "success";
|
||||||
|
@ -21,7 +21,7 @@ public class MemberService {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
public String memberGet(MemberGetEntity memberGetEntity, HttpServletRequest request)throws Exception {
|
public String memberGet(MemberGetEntity memberGetEntity)throws Exception {
|
||||||
Map<String, String> paramMap = MapRemoveNullUtil.setConditionMap(memberGetEntity);
|
Map<String, String> paramMap = MapRemoveNullUtil.setConditionMap(memberGetEntity);
|
||||||
paramMap.put("id",StringUtil.toString(memberGetEntity.getId()).equals("0")?null:StringUtil.toString(memberGetEntity.getId()));
|
paramMap.put("id",StringUtil.toString(memberGetEntity.getId()).equals("0")?null:StringUtil.toString(memberGetEntity.getId()));
|
||||||
MapRemoveNullUtil.removeNullEntry(paramMap);
|
MapRemoveNullUtil.removeNullEntry(paramMap);
|
||||||
@ -31,9 +31,10 @@ public class MemberService {
|
|||||||
JSONObject json = JSONObject.parseObject(jsonObject.getString("data"));
|
JSONObject json = JSONObject.parseObject(jsonObject.getString("data"));
|
||||||
String id = json.getString("id");
|
String id = json.getString("id");
|
||||||
jsonObject.put("xaccessToken", SmartJWTUtil.generateToken(id));
|
jsonObject.put("xaccessToken", SmartJWTUtil.generateToken(id));
|
||||||
|
jsonObject.put("type","1");
|
||||||
return jsonObject.toJSONString();
|
return jsonObject.toJSONString();
|
||||||
}else {
|
}else {
|
||||||
return sb;
|
return jsonObject.toJSONString();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public String memberCheck(MemberCheckEntity memberCheckEntity)throws Exception {
|
public String memberCheck(MemberCheckEntity memberCheckEntity)throws Exception {
|
||||||
@ -42,7 +43,7 @@ public class MemberService {
|
|||||||
return SmartHttpUtil.sendPostForm(url+"check",paramMap,null);
|
return SmartHttpUtil.sendPostForm(url+"check",paramMap,null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public String memberAdd(MemberAddEntity memberAddEntity)throws Exception {
|
public String memberAdd(MemberAddEntity memberAddEntity){
|
||||||
Map<String, String> paramMap = MapRemoveNullUtil.setConditionMap(memberAddEntity);
|
Map<String, String> paramMap = MapRemoveNullUtil.setConditionMap(memberAddEntity);
|
||||||
paramMap.put("cityId",StringUtil.toString(memberAddEntity.getCityId()).equals("0")?null:StringUtil.toString(memberAddEntity.getCityId()));
|
paramMap.put("cityId",StringUtil.toString(memberAddEntity.getCityId()).equals("0")?null:StringUtil.toString(memberAddEntity.getCityId()));
|
||||||
paramMap.put("gender",StringUtil.toString(memberAddEntity.getGender()).equals("0")?null:StringUtil.toString(memberAddEntity.getGender()));
|
paramMap.put("gender",StringUtil.toString(memberAddEntity.getGender()).equals("0")?null:StringUtil.toString(memberAddEntity.getGender()));
|
||||||
@ -50,7 +51,17 @@ public class MemberService {
|
|||||||
paramMap.put("provinceId",StringUtil.toString(memberAddEntity.getProvinceId()).equals("0")?null:StringUtil.toString(memberAddEntity.getProvinceId()));
|
paramMap.put("provinceId",StringUtil.toString(memberAddEntity.getProvinceId()).equals("0")?null:StringUtil.toString(memberAddEntity.getProvinceId()));
|
||||||
MapRemoveNullUtil.removeNullEntry(paramMap);
|
MapRemoveNullUtil.removeNullEntry(paramMap);
|
||||||
net.sf.json.JSONObject jsonObject = net.sf.json.JSONObject.fromObject(paramMap);
|
net.sf.json.JSONObject jsonObject = net.sf.json.JSONObject.fromObject(paramMap);
|
||||||
return SmartHttpUtil.httpPostRaw(url+"add",jsonObject.toString(),null,"utf-8");
|
String sb = SmartHttpUtil.httpPostRaw(url+"add",jsonObject.toString(),null,"utf-8");
|
||||||
|
JSONObject jsonObjectResult = JSONObject.parseObject(sb);
|
||||||
|
if(jsonObjectResult.getString("code").equals("0")){
|
||||||
|
JSONObject json = JSONObject.parseObject(jsonObjectResult.getString("data"));
|
||||||
|
String id = json.getString("id");
|
||||||
|
jsonObjectResult.put("xaccessToken", SmartJWTUtil.generateToken(id));
|
||||||
|
jsonObjectResult.put("type","2");
|
||||||
|
return jsonObjectResult.toJSONString();
|
||||||
|
}else {
|
||||||
|
return jsonObjectResult.toJSONString();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public String memberUpdateMemberLevel(MemberUpdateMemberLevelEntity memberUpdateMemberLevelEntity)throws Exception {
|
public String memberUpdateMemberLevel(MemberUpdateMemberLevelEntity memberUpdateMemberLevelEntity)throws Exception {
|
||||||
|
@ -4,7 +4,6 @@ import com.alibaba.fastjson.JSONObject;
|
|||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.extern.log4j.Log4j2;
|
|
||||||
import net.lab1024.smartadmin.common.anno.OperateLog;
|
import net.lab1024.smartadmin.common.anno.OperateLog;
|
||||||
import net.lab1024.smartadmin.common.domain.ResponseDTO;
|
import net.lab1024.smartadmin.common.domain.ResponseDTO;
|
||||||
import net.lab1024.smartadmin.common.heartbeat.StringUtil;
|
import net.lab1024.smartadmin.common.heartbeat.StringUtil;
|
||||||
@ -14,8 +13,6 @@ import net.lab1024.smartadmin.module.system.royalcanin.couponConfig.CouponConfig
|
|||||||
import net.lab1024.smartadmin.module.system.royalcanin.couponConfig.CouponConfigGetEntity;
|
import net.lab1024.smartadmin.module.system.royalcanin.couponConfig.CouponConfigGetEntity;
|
||||||
import net.lab1024.smartadmin.module.system.royalcanin.domain.RoyalcaninOperateLogEntity;
|
import net.lab1024.smartadmin.module.system.royalcanin.domain.RoyalcaninOperateLogEntity;
|
||||||
import net.lab1024.smartadmin.module.system.royalcanin.domain.RoyalcaninOperateLogService;
|
import net.lab1024.smartadmin.module.system.royalcanin.domain.RoyalcaninOperateLogService;
|
||||||
import net.lab1024.smartadmin.module.system.royalcanin.good.model.OrderEntity;
|
|
||||||
import net.lab1024.smartadmin.module.system.royalcanin.good.model.ProductMasterQueryEntity;
|
|
||||||
import net.lab1024.smartadmin.module.system.royalcanin.good.service.GoodService;
|
import net.lab1024.smartadmin.module.system.royalcanin.good.service.GoodService;
|
||||||
import net.lab1024.smartadmin.module.system.royalcanin.good.service.OrderService;
|
import net.lab1024.smartadmin.module.system.royalcanin.good.service.OrderService;
|
||||||
import net.lab1024.smartadmin.module.system.royalcanin.member.*;
|
import net.lab1024.smartadmin.module.system.royalcanin.member.*;
|
||||||
@ -27,16 +24,14 @@ import net.lab1024.smartadmin.module.system.royalcanin.memberAddress.MemberAddre
|
|||||||
import net.lab1024.smartadmin.module.system.royalcanin.memberAddress.MemberAddressUpdateEntity;
|
import net.lab1024.smartadmin.module.system.royalcanin.memberAddress.MemberAddressUpdateEntity;
|
||||||
import net.lab1024.smartadmin.module.system.royalcanin.orderMaster.AddOrSaveEntity;
|
import net.lab1024.smartadmin.module.system.royalcanin.orderMaster.AddOrSaveEntity;
|
||||||
import net.lab1024.smartadmin.module.system.royalcanin.orderMaster.QueryEntity;
|
import net.lab1024.smartadmin.module.system.royalcanin.orderMaster.QueryEntity;
|
||||||
import net.lab1024.smartadmin.util.MapRemoveNullUtil;
|
|
||||||
import net.lab1024.smartadmin.util.SmartHttpUtil;
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.PostMapping;
|
||||||
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestBody;
|
||||||
|
import org.springframework.web.bind.annotation.RequestParam;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
|
|
||||||
@Api(tags = {SwaggerTagConst.Admin.MANAGER_MALL_API})
|
@Api(tags = {SwaggerTagConst.Admin.MANAGER_MALL_API})
|
||||||
@ -78,13 +73,13 @@ public class TransitionController {
|
|||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
case "get":
|
case "get":
|
||||||
result = memberService.memberGet(objectMapper.convertValue(object,MemberGetEntity.class),request);
|
result = memberService.memberGet(objectMapper.convertValue(object,MemberGetEntity.class)).toString();
|
||||||
break;
|
break;
|
||||||
case "check":
|
case "check":
|
||||||
result = memberService.memberCheck(objectMapper.convertValue(object,MemberCheckEntity.class));
|
result = memberService.memberCheck(objectMapper.convertValue(object,MemberCheckEntity.class));
|
||||||
break;
|
break;
|
||||||
case "add":
|
case "add":
|
||||||
result = memberService.memberAdd(objectMapper.convertValue(object,MemberAddEntity.class));
|
result = memberService.memberAdd(objectMapper.convertValue(object,MemberAddEntity.class)).toString();
|
||||||
break;
|
break;
|
||||||
case "updateMemberLevel":
|
case "updateMemberLevel":
|
||||||
result = memberService.memberUpdateMemberLevel(objectMapper.convertValue(object, MemberUpdateMemberLevelEntity.class));
|
result = memberService.memberUpdateMemberLevel(objectMapper.convertValue(object, MemberUpdateMemberLevelEntity.class));
|
||||||
@ -101,6 +96,28 @@ public class TransitionController {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation(value = "登录或注册", notes = "会员查询,登录注册")
|
||||||
|
@PostMapping("royalcanin/regOrLogin")
|
||||||
|
public String regOrLogin(@RequestParam String phoneNumber) throws Exception {
|
||||||
|
MemberCheckEntity memberCheckEntity = new MemberCheckEntity();
|
||||||
|
memberCheckEntity.setMobile(phoneNumber);
|
||||||
|
JSONObject jsonObject = JSONObject.parseObject(memberService.memberCheck(memberCheckEntity));
|
||||||
|
if(jsonObject.getString("code").equals("103")){
|
||||||
|
MemberGetEntity memberGetEntity = new MemberGetEntity ();
|
||||||
|
memberGetEntity.setMobile(phoneNumber);
|
||||||
|
return memberService.memberGet(memberGetEntity);
|
||||||
|
}else if(jsonObject.getString("code").equals("0")){
|
||||||
|
MemberAddEntity memberAddEntity = new MemberAddEntity();
|
||||||
|
memberAddEntity.setMobile(phoneNumber);
|
||||||
|
return memberService.memberAdd(memberAddEntity);
|
||||||
|
}else{
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ApiOperation(value = "会员地址", notes = "查询会员地址,添加会员地址,更新会员地址,删除会员地址")
|
@ApiOperation(value = "会员地址", notes = "查询会员地址,添加会员地址,更新会员地址,删除会员地址")
|
||||||
@PostMapping("royalcanin/memberAddress")
|
@PostMapping("royalcanin/memberAddress")
|
||||||
public String transferMemberAddress(String type ,@RequestBody Object object, HttpServletRequest request) throws Exception {
|
public String transferMemberAddress(String type ,@RequestBody Object object, HttpServletRequest request) throws Exception {
|
||||||
|
@ -3,6 +3,7 @@ package net.lab1024.smartadmin.module.system.royalcanin.good;
|
|||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.alipay.api.internal.util.AlipaySignature;
|
import com.alipay.api.internal.util.AlipaySignature;
|
||||||
|
import com.beust.jcommander.Parameter;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import net.lab1024.smartadmin.common.anno.OperateLog;
|
import net.lab1024.smartadmin.common.anno.OperateLog;
|
||||||
@ -12,6 +13,8 @@ import net.lab1024.smartadmin.constant.SwaggerTagConst;
|
|||||||
import net.lab1024.smartadmin.module.system.alipay.AliPayService;
|
import net.lab1024.smartadmin.module.system.alipay.AliPayService;
|
||||||
import net.lab1024.smartadmin.module.system.alipay.alipayModel.AliPayEntity;
|
import net.lab1024.smartadmin.module.system.alipay.alipayModel.AliPayEntity;
|
||||||
import net.lab1024.smartadmin.module.system.alipay.conf.AlipayConfig;
|
import net.lab1024.smartadmin.module.system.alipay.conf.AlipayConfig;
|
||||||
|
import net.lab1024.smartadmin.module.system.royalcanin.CouponService;
|
||||||
|
import net.lab1024.smartadmin.module.system.royalcanin.coupon.CouponGetAllEntity;
|
||||||
import net.lab1024.smartadmin.module.system.royalcanin.good.constant.OrderResponseCodeConst;
|
import net.lab1024.smartadmin.module.system.royalcanin.good.constant.OrderResponseCodeConst;
|
||||||
import net.lab1024.smartadmin.module.system.royalcanin.good.model.OrderAddress;
|
import net.lab1024.smartadmin.module.system.royalcanin.good.model.OrderAddress;
|
||||||
import net.lab1024.smartadmin.module.system.royalcanin.good.model.OrderEntity;
|
import net.lab1024.smartadmin.module.system.royalcanin.good.model.OrderEntity;
|
||||||
@ -20,15 +23,20 @@ import net.lab1024.smartadmin.module.system.royalcanin.good.service.CartService;
|
|||||||
import net.lab1024.smartadmin.module.system.royalcanin.good.service.OrderService;
|
import net.lab1024.smartadmin.module.system.royalcanin.good.service.OrderService;
|
||||||
import net.lab1024.smartadmin.module.system.royalcanin.orderMaster.OrderDatilListEntity;
|
import net.lab1024.smartadmin.module.system.royalcanin.orderMaster.OrderDatilListEntity;
|
||||||
import net.lab1024.smartadmin.module.system.royalcanin.orderMaster.QueryEntity;
|
import net.lab1024.smartadmin.module.system.royalcanin.orderMaster.QueryEntity;
|
||||||
|
import net.lab1024.smartadmin.module.system.wxpay.MyConfig;
|
||||||
import net.lab1024.smartadmin.module.system.wxpay.WxpayService;
|
import net.lab1024.smartadmin.module.system.wxpay.WxpayService;
|
||||||
import net.lab1024.smartadmin.module.system.wxpay.wxPayModel.WxPayEntity;
|
import net.lab1024.smartadmin.module.system.wxpay.wxPayModel.WxPayEntity;
|
||||||
import net.lab1024.smartadmin.util.GenerateSequenceUtil;
|
import net.lab1024.smartadmin.util.GenerateSequenceUtil;
|
||||||
import net.sf.json.JSONArray;
|
import net.sf.json.JSONArray;
|
||||||
|
import org.apache.http.client.methods.HttpPost;
|
||||||
|
import org.apache.http.client.utils.URLEncodedUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.net.URLEncoder;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
@Api(tags = {SwaggerTagConst.Admin.MANAGER_MALL_API})
|
@Api(tags = {SwaggerTagConst.Admin.MANAGER_MALL_API})
|
||||||
@ -48,10 +56,13 @@ public class OrderController {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private CartService cartService;
|
private CartService cartService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private CouponService couponService;
|
||||||
|
|
||||||
|
|
||||||
@ApiOperation(value = "微信支付订单", notes = "生成订单")
|
@ApiOperation(value = "微信支付订单", notes = "生成订单")
|
||||||
@PostMapping("royalcanin/generateOrderWX")
|
@PostMapping("royalcanin/generateOrderWX")
|
||||||
public ResponseDTO<String> generateOrderWX(@RequestBody List<OrdersEntity> ordersEntityList) throws Exception {
|
public ResponseDTO<Map<String, String>> generateOrderWX(@RequestBody List<OrdersEntity> ordersEntityList) throws Exception {
|
||||||
StringBuffer productId = new StringBuffer();
|
StringBuffer productId = new StringBuffer();
|
||||||
StringBuffer productName = new StringBuffer();
|
StringBuffer productName = new StringBuffer();
|
||||||
String memberId = "";
|
String memberId = "";
|
||||||
@ -73,10 +84,18 @@ public class OrderController {
|
|||||||
orderDatilListEntity.setEcPrice(ordersEntitys.getPayAmount());
|
orderDatilListEntity.setEcPrice(ordersEntitys.getPayAmount());
|
||||||
orderDatilListJson.add(orderDatilListEntity);
|
orderDatilListJson.add(orderDatilListEntity);
|
||||||
if(ordersEntitys.getCouponCode() != "" && ordersEntitys.getCouponCode() != null) {
|
if(ordersEntitys.getCouponCode() != "" && ordersEntitys.getCouponCode() != null) {
|
||||||
ordersEntity.setCouponAmount(ordersEntitys.getCouponAmount());
|
CouponGetAllEntity couponGetAllEntity = new CouponGetAllEntity ();
|
||||||
ordersEntity.setCouponCode(ordersEntitys.getCouponCode());
|
couponGetAllEntity.setMemberId(ordersEntitys.getMemberId());
|
||||||
ordersEntity.setCouponName(ordersEntitys.getCouponName());
|
couponGetAllEntity.setCouponCode(ordersEntitys.getCouponCode());
|
||||||
ordersEntity.setCouponId(ordersEntitys.getCouponId());
|
String couponInfo = couponService.couponGetAll(couponGetAllEntity);
|
||||||
|
JSONObject jsonObject = JSONObject.parseObject(couponInfo);
|
||||||
|
com.alibaba.fastjson.JSONArray jsonArray = JSONObject.parseArray(jsonObject.getString("data"));
|
||||||
|
JSONObject jsonObjectData = (JSONObject)jsonArray.get(0);
|
||||||
|
|
||||||
|
ordersEntity.setCouponAmount(jsonObjectData.getString("couponAmount") == null ?jsonObjectData.getString("discount"):jsonObjectData.getString("couponAmount"));
|
||||||
|
ordersEntity.setCouponCode(jsonObjectData.getString("couponCode"));
|
||||||
|
ordersEntity.setCouponName(jsonObjectData.getString("couponName"));
|
||||||
|
ordersEntity.setCouponId(jsonObjectData.getString("couponId"));
|
||||||
total_fee = total_fee + orderService.couponTotal(ordersEntitys.getCouponTypeId(),Double.parseDouble(ordersEntitys.getCouponAmount()),Double.parseDouble(ordersEntitys.getPayAmount()),ordersEntitys.getBuyCount());
|
total_fee = total_fee + orderService.couponTotal(ordersEntitys.getCouponTypeId(),Double.parseDouble(ordersEntitys.getCouponAmount()),Double.parseDouble(ordersEntitys.getPayAmount()),ordersEntitys.getBuyCount());
|
||||||
}else{
|
}else{
|
||||||
total_fee = total_fee + Double.parseDouble(ordersEntitys.getPayAmount()) * ordersEntitys.getBuyCount() ;
|
total_fee = total_fee + Double.parseDouble(ordersEntitys.getPayAmount()) * ordersEntitys.getBuyCount() ;
|
||||||
@ -109,7 +128,11 @@ public class OrderController {
|
|||||||
wxPayEntity.setProduct_id(ordersEntity.getProductCode());
|
wxPayEntity.setProduct_id(ordersEntity.getProductCode());
|
||||||
wxPayEntity.setTotal_fee(StringUtil.toString(total_fee));
|
wxPayEntity.setTotal_fee(StringUtil.toString(total_fee));
|
||||||
wxPayEntity.setOut_trade_no(ordersEntity.getOrderNo());
|
wxPayEntity.setOut_trade_no(ordersEntity.getOrderNo());
|
||||||
return ResponseDTO.succData(ordersEntity.getOrderNo(),wxpayService.generateQRCode(wxPayEntity));
|
Map<String, String> returnMap = new HashMap<>();
|
||||||
|
returnMap.put("orderNumber",ordersEntity.getOrderNo());
|
||||||
|
returnMap.put("orderAmount",ordersEntity.getOrderAmount());
|
||||||
|
// return ResponseDTO.succData(returnMap,wxpayService.generateQRCode(wxPayEntity));
|
||||||
|
return ResponseDTO.succData(returnMap,wxpayService.testGenerateQRCode(wxPayEntity));
|
||||||
}
|
}
|
||||||
return ResponseDTO.wrap(OrderResponseCodeConst.GENERATE_ORDER_FAIL);
|
return ResponseDTO.wrap(OrderResponseCodeConst.GENERATE_ORDER_FAIL);
|
||||||
}
|
}
|
||||||
@ -117,13 +140,14 @@ public class OrderController {
|
|||||||
|
|
||||||
@ApiOperation(value = "微信支付H5订单", notes = "生成H5订单")
|
@ApiOperation(value = "微信支付H5订单", notes = "生成H5订单")
|
||||||
@PostMapping("royalcanin/generateOrderWXH5")
|
@PostMapping("royalcanin/generateOrderWXH5")
|
||||||
public Map<String, String> generateOrderWXH5(@RequestBody List<OrdersEntity> ordersEntityList) throws Exception {
|
public ResponseDTO<Map<String, String>> generateOrderWXH5(@RequestBody List<OrdersEntity> ordersEntityList) throws Exception {
|
||||||
StringBuffer productId = new StringBuffer();
|
StringBuffer productId = new StringBuffer();
|
||||||
StringBuffer productName = new StringBuffer();
|
StringBuffer productName = new StringBuffer();
|
||||||
String memberId = "";
|
String memberId = "";
|
||||||
String mobile = "";
|
String mobile = "";
|
||||||
int buyCount = 0;
|
int buyCount = 0;
|
||||||
double total_fee = 0 ;
|
double total_fee = 0 ;
|
||||||
|
double basePoint = 0 ;
|
||||||
WxPayEntity wxPayEntity = new WxPayEntity();
|
WxPayEntity wxPayEntity = new WxPayEntity();
|
||||||
JSONArray orderDatilListJson = new JSONArray();
|
JSONArray orderDatilListJson = new JSONArray();
|
||||||
OrdersEntity ordersEntity = new OrdersEntity();
|
OrdersEntity ordersEntity = new OrdersEntity();
|
||||||
@ -138,14 +162,23 @@ public class OrderController {
|
|||||||
orderDatilListEntity.setEcPrice(ordersEntitys.getPayAmount());
|
orderDatilListEntity.setEcPrice(ordersEntitys.getPayAmount());
|
||||||
orderDatilListJson.add(orderDatilListEntity);
|
orderDatilListJson.add(orderDatilListEntity);
|
||||||
if(ordersEntitys.getCouponCode() != "" && ordersEntitys.getCouponCode() != null) {
|
if(ordersEntitys.getCouponCode() != "" && ordersEntitys.getCouponCode() != null) {
|
||||||
ordersEntity.setCouponAmount(ordersEntitys.getCouponAmount());
|
CouponGetAllEntity couponGetAllEntity = new CouponGetAllEntity ();
|
||||||
ordersEntity.setCouponCode(ordersEntitys.getCouponCode());
|
couponGetAllEntity.setMemberId(ordersEntitys.getMemberId());
|
||||||
ordersEntity.setCouponName(ordersEntitys.getCouponName());
|
couponGetAllEntity.setCouponCode(ordersEntitys.getCouponCode());
|
||||||
ordersEntity.setCouponId(ordersEntitys.getCouponId());
|
String couponInfo = couponService.couponGetAll(couponGetAllEntity);
|
||||||
|
JSONObject jsonObject = JSONObject.parseObject(couponInfo);
|
||||||
|
com.alibaba.fastjson.JSONArray jsonArray = JSONObject.parseArray(jsonObject.getString("data"));
|
||||||
|
JSONObject jsonObjectData = (JSONObject)jsonArray.get(0);
|
||||||
|
|
||||||
|
ordersEntity.setCouponAmount(jsonObjectData.getString("couponAmount") == null ?jsonObjectData.getString("discount"):jsonObjectData.getString("couponAmount"));
|
||||||
|
ordersEntity.setCouponCode(jsonObjectData.getString("couponCode"));
|
||||||
|
ordersEntity.setCouponName(jsonObjectData.getString("couponName"));
|
||||||
|
ordersEntity.setCouponId(jsonObjectData.getString("couponId"));
|
||||||
total_fee = total_fee + orderService.couponTotal(ordersEntitys.getCouponTypeId(),Double.parseDouble(ordersEntitys.getCouponAmount()),Double.parseDouble(ordersEntitys.getPayAmount()),ordersEntitys.getBuyCount());
|
total_fee = total_fee + orderService.couponTotal(ordersEntitys.getCouponTypeId(),Double.parseDouble(ordersEntitys.getCouponAmount()),Double.parseDouble(ordersEntitys.getPayAmount()),ordersEntitys.getBuyCount());
|
||||||
}else{
|
}else{
|
||||||
total_fee = total_fee + Double.parseDouble(ordersEntitys.getPayAmount()) * ordersEntitys.getBuyCount() ;
|
total_fee = total_fee + Double.parseDouble(ordersEntitys.getPayAmount()) * ordersEntitys.getBuyCount() ;
|
||||||
}
|
}
|
||||||
|
basePoint = basePoint + ordersEntitys.getBasePoint();
|
||||||
orderAddress.setAddressCityName(ordersEntitys.getOrderAddress().getAddressCityName());
|
orderAddress.setAddressCityName(ordersEntitys.getOrderAddress().getAddressCityName());
|
||||||
orderAddress.setAddressCountyName(ordersEntitys.getOrderAddress().getAddressCountyName());
|
orderAddress.setAddressCountyName(ordersEntitys.getOrderAddress().getAddressCountyName());
|
||||||
orderAddress.setAddressDetailInfo(ordersEntitys.getOrderAddress().getAddressDetailInfo());
|
orderAddress.setAddressDetailInfo(ordersEntitys.getOrderAddress().getAddressDetailInfo());
|
||||||
@ -154,7 +187,6 @@ public class OrderController {
|
|||||||
orderAddress.setAddressProvinceName(ordersEntitys.getOrderAddress().getAddressProvinceName());
|
orderAddress.setAddressProvinceName(ordersEntitys.getOrderAddress().getAddressProvinceName());
|
||||||
productId.append(ordersEntitys.getProductCode()+",");
|
productId.append(ordersEntitys.getProductCode()+",");
|
||||||
productName.append(ordersEntitys.getProductName()+",");
|
productName.append(ordersEntitys.getProductName()+",");
|
||||||
|
|
||||||
memberId = ordersEntitys.getMemberId();
|
memberId = ordersEntitys.getMemberId();
|
||||||
mobile = ordersEntitys.getPhoneNumber();
|
mobile = ordersEntitys.getPhoneNumber();
|
||||||
buyCount = buyCount + ordersEntitys.getBuyCount();
|
buyCount = buyCount + ordersEntitys.getBuyCount();
|
||||||
@ -168,18 +200,23 @@ public class OrderController {
|
|||||||
ordersEntity.setBuyCount(buyCount);
|
ordersEntity.setBuyCount(buyCount);
|
||||||
ordersEntity.setOrderNo(GenerateSequenceUtil.generateSequenceNo());
|
ordersEntity.setOrderNo(GenerateSequenceUtil.generateSequenceNo());
|
||||||
ordersEntity.setOrderStatus("0");
|
ordersEntity.setOrderStatus("0");
|
||||||
|
ordersEntity.setBasePoint(basePoint);
|
||||||
|
ordersEntity.setPayType("3");
|
||||||
|
|
||||||
if(orderService.generateOrder(ordersEntity,orderDatilListJson) == 1){
|
if(orderService.generateOrder(ordersEntity,orderDatilListJson) == 1){
|
||||||
wxPayEntity.setProduct_id(ordersEntity.getProductCode());
|
wxPayEntity.setProduct_id(ordersEntity.getProductCode());
|
||||||
wxPayEntity.setTotal_fee(StringUtil.toString(total_fee));
|
wxPayEntity.setTotal_fee(StringUtil.toString(total_fee));
|
||||||
wxPayEntity.setOut_trade_no(ordersEntity.getOrderNo());
|
wxPayEntity.setOut_trade_no(ordersEntity.getOrderNo());
|
||||||
return wxpayService.dounifiedOrder(wxPayEntity);
|
|
||||||
}else {
|
Map<String, String> returnMap = new HashMap<>();
|
||||||
return null;
|
returnMap.put("orderNumber",ordersEntity.getOrderNo());
|
||||||
|
returnMap.put("orderAmount",ordersEntity.getOrderAmount());
|
||||||
|
return ResponseDTO.succData(returnMap,wxpayService.dounifiedOrder(wxPayEntity));
|
||||||
}
|
}
|
||||||
|
return ResponseDTO.wrap(OrderResponseCodeConst.GENERATE_ORDER_FAIL);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation(value = "重新支付", notes = "重新支付")
|
@ApiOperation(value = "重新支付(二维码)", notes = "重新支付(二维码)")
|
||||||
@PostMapping("royalcanin/repayOrderWX")
|
@PostMapping("royalcanin/repayOrderWX")
|
||||||
public ResponseDTO<String> repayOrderWX(String orderNo) throws Exception {
|
public ResponseDTO<String> repayOrderWX(String orderNo) throws Exception {
|
||||||
OrderEntity ordersEntity = orderService.findByOrderId(orderNo);
|
OrderEntity ordersEntity = orderService.findByOrderId(orderNo);
|
||||||
@ -194,7 +231,40 @@ public class OrderController {
|
|||||||
wxPayEntity.setProduct_id(ordersEntity.getProductCode());
|
wxPayEntity.setProduct_id(ordersEntity.getProductCode());
|
||||||
wxPayEntity.setTotal_fee(jsonObject.getString("salesAmount"));
|
wxPayEntity.setTotal_fee(jsonObject.getString("salesAmount"));
|
||||||
wxPayEntity.setOut_trade_no(ordersEntity.getOrderNo());
|
wxPayEntity.setOut_trade_no(ordersEntity.getOrderNo());
|
||||||
return ResponseDTO.succData(orderInfo, wxpayService.generateQRCode(wxPayEntity));
|
return ResponseDTO.succData(orderNo, wxpayService.generateQRCode(wxPayEntity));
|
||||||
|
}else {
|
||||||
|
return ResponseDTO.wrap(OrderResponseCodeConst.GENERATE_ORDER_ERROR,orderInfo);
|
||||||
|
}
|
||||||
|
}else {
|
||||||
|
return ResponseDTO.wrap(OrderResponseCodeConst.WITHOUT_ORDER);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ApiOperation(value = "重定向", notes = "重定向")
|
||||||
|
@PostMapping("royalcanin/redirectUrlWXH5")
|
||||||
|
public void redirectUrl(HttpServletRequest request, HttpServletResponse response,@RequestBody String url) throws IOException {
|
||||||
|
response.addHeader("referer", MyConfig.NOTIFY_URL_H5);
|
||||||
|
JSONObject jonUrl = JSONObject.parseObject(url);
|
||||||
|
response.sendRedirect(jonUrl.getString("url"));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation(value = "重新支付(H5)", notes = "重新支付(H5)")
|
||||||
|
@PostMapping("royalcanin/repayOrderWXH5")
|
||||||
|
public ResponseDTO<String> repayOrderWXH5(String orderNo) throws Exception {
|
||||||
|
OrderEntity ordersEntity = orderService.findByOrderId(orderNo);
|
||||||
|
if(ordersEntity != null){
|
||||||
|
QueryEntity queryEntity = new QueryEntity();
|
||||||
|
queryEntity.setOrderNumber(ordersEntity.getOrderNo());
|
||||||
|
String orderInfo = orderService.query(queryEntity);
|
||||||
|
com.alibaba.fastjson.JSONArray jsonArray = JSONObject.parseArray(orderInfo);
|
||||||
|
JSONObject jsonObject = (JSONObject)jsonArray.get(0);
|
||||||
|
if(jsonObject.getString("status").equals("0")) {
|
||||||
|
WxPayEntity wxPayEntity = new WxPayEntity();
|
||||||
|
wxPayEntity.setProduct_id(ordersEntity.getProductCode());
|
||||||
|
wxPayEntity.setTotal_fee(jsonObject.getString("salesAmount"));
|
||||||
|
wxPayEntity.setOut_trade_no(ordersEntity.getOrderNo());
|
||||||
|
return ResponseDTO.succData(orderNo,wxpayService.dounifiedOrder(wxPayEntity));
|
||||||
}else {
|
}else {
|
||||||
return ResponseDTO.wrap(OrderResponseCodeConst.GENERATE_ORDER_ERROR,orderInfo);
|
return ResponseDTO.wrap(OrderResponseCodeConst.GENERATE_ORDER_ERROR,orderInfo);
|
||||||
}
|
}
|
||||||
@ -212,6 +282,8 @@ public class OrderController {
|
|||||||
wxpayService.orderCallBack(request,response);
|
wxpayService.orderCallBack(request,response);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ApiOperation(value = "监听微信回调", notes = "监听微信回调")
|
@ApiOperation(value = "监听微信回调", notes = "监听微信回调")
|
||||||
@PostMapping(value = "royalcanin/monitorOrderNotify")
|
@PostMapping(value = "royalcanin/monitorOrderNotify")
|
||||||
public ResponseDTO<String> monitorOrderNotify(@RequestParam String OrderNumber){
|
public ResponseDTO<String> monitorOrderNotify(@RequestParam String OrderNumber){
|
||||||
@ -221,11 +293,7 @@ public class OrderController {
|
|||||||
return ResponseDTO.wrap(OrderResponseCodeConst.NOTIFY_ERROR);
|
return ResponseDTO.wrap(OrderResponseCodeConst.NOTIFY_ERROR);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation(value = "支付宝更新订单", notes = "支付宝更新订单")
|
|
||||||
@RequestMapping(value = "royalcanin/updateOrderAlipay")
|
|
||||||
public void updateOrderAlipay(HttpServletRequest request, HttpServletResponse response){
|
|
||||||
// aliPayService.orderCallBackAliPay(request,response);
|
|
||||||
}
|
|
||||||
|
|
||||||
@ApiOperation(value = "取消订单", notes = "取消订单")
|
@ApiOperation(value = "取消订单", notes = "取消订单")
|
||||||
@RequestMapping(value = "royalcanin/cancelOrder",method = RequestMethod.POST)
|
@RequestMapping(value = "royalcanin/cancelOrder",method = RequestMethod.POST)
|
||||||
@ -249,7 +317,7 @@ public class OrderController {
|
|||||||
AliPayEntity aliPayEntity = new AliPayEntity();
|
AliPayEntity aliPayEntity = new AliPayEntity();
|
||||||
ordersEntity.setPayType("2");
|
ordersEntity.setPayType("2");
|
||||||
ordersEntity.setOrderStatus("0");
|
ordersEntity.setOrderStatus("0");
|
||||||
if (orderService.updateOrder(ordersEntity) == 1) {
|
if (orderService.updateOrder(ordersEntity.getOrderNo()) == 1) {
|
||||||
aliPayEntity.setProduct_code(ordersEntity.getProductCode());
|
aliPayEntity.setProduct_code(ordersEntity.getProductCode());
|
||||||
aliPayEntity.setTotal_amount(ordersEntity.getOrderAmount());
|
aliPayEntity.setTotal_amount(ordersEntity.getOrderAmount());
|
||||||
aliPayEntity.setOut_trade_no(ordersEntity.getOrderNo());
|
aliPayEntity.setOut_trade_no(ordersEntity.getOrderNo());
|
||||||
|
@ -22,4 +22,6 @@ public interface OrdersDao extends BaseMapper<OrderEntity> {
|
|||||||
|
|
||||||
Integer cancelOrder(String out_trade_no);
|
Integer cancelOrder(String out_trade_no);
|
||||||
|
|
||||||
|
int updateByOrderNumber (@Param("orderNumber")String orderNumber);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -34,4 +34,6 @@ public class GoodsEntity {
|
|||||||
private int isSales;
|
private int isSales;
|
||||||
|
|
||||||
private int isShow;
|
private int isShow;
|
||||||
|
|
||||||
|
private String goodUrl;
|
||||||
}
|
}
|
||||||
|
@ -41,6 +41,6 @@ public class OrdersEntity {
|
|||||||
|
|
||||||
private OrderAddress orderAddress;
|
private OrderAddress orderAddress;
|
||||||
|
|
||||||
private Double basePoint;
|
private Double basePoint = 0.0;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -53,9 +53,11 @@ public class GoodService {
|
|||||||
paramMap.remove("tagFunction");
|
paramMap.remove("tagFunction");
|
||||||
paramMap.remove("tagBreed");
|
paramMap.remove("tagBreed");
|
||||||
paramMap.remove("tagStatus");
|
paramMap.remove("tagStatus");
|
||||||
|
paramMap.put("count",StringUtil.toString(productQueryEntity.getCount()).equals("0")?null:productQueryEntity.getCount());
|
||||||
MapRemoveNullUtil.removeNullEntry(paramMap);
|
MapRemoveNullUtil.removeNullEntry(paramMap);
|
||||||
paramMap.put("secret","H5@2021");
|
paramMap.put("secret","H5@2021");
|
||||||
paramMap.put("channelId","15");
|
paramMap.put("channelId","15");
|
||||||
|
paramMap.put("isSales","1");
|
||||||
String sb = SmartHttpUtil.sendPostForm(url+"product/query",paramMap,null);
|
String sb = SmartHttpUtil.sendPostForm(url+"product/query",paramMap,null);
|
||||||
JSONObject jsonObject = JSONObject.parseObject(sb);
|
JSONObject jsonObject = JSONObject.parseObject(sb);
|
||||||
String result = AESUtil.decryptLinux(jsonObject.getString("data"), AESUtil.KEY);
|
String result = AESUtil.decryptLinux(jsonObject.getString("data"), AESUtil.KEY);
|
||||||
|
@ -226,9 +226,24 @@ public class OrderService {
|
|||||||
long elapsedTime = acceptTime - startTime;
|
long elapsedTime = acceptTime - startTime;
|
||||||
JSONObject jsonObject = JSONObject.parseObject(result);
|
JSONObject jsonObject = JSONObject.parseObject(result);
|
||||||
String afterDecodeResult = AESUtil.decryptLinux(jsonObject.getString("data"), AESUtil.KEY);
|
String afterDecodeResult = AESUtil.decryptLinux(jsonObject.getString("data"), AESUtil.KEY);
|
||||||
|
com.alibaba.fastjson.JSONArray jsonArray = JSONObject.parseArray(afterDecodeResult);
|
||||||
|
for (int i = 0; i < jsonArray.size();i++){
|
||||||
|
JSONObject jsonObjectResult = (JSONObject)jsonArray.get(i);
|
||||||
|
OrderEntity orderEntity = ordersDao.findByOrderId(jsonObjectResult.getString("orderNumber"));
|
||||||
|
if (orderEntity == null){
|
||||||
|
jsonObjectResult.put("paytype","0");
|
||||||
|
jsonObjectResult.put("basePoint","0");
|
||||||
|
}else {
|
||||||
|
//新增支付方式paytype
|
||||||
|
jsonObjectResult.put("paytype",orderEntity.getPayType());
|
||||||
|
jsonObjectResult.put("basePoint",orderEntity.getBasePoint());
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
//记录服务响应时间
|
//记录服务响应时间
|
||||||
addOperatreFullData(url+"orderMaster/query",queryEntity.toString(),result, startTime,elapsedTime,acceptTime);
|
addOperatreFullData(url+"orderMaster/query",queryEntity.toString(),result, startTime,elapsedTime,acceptTime);
|
||||||
return afterDecodeResult;
|
|
||||||
|
return jsonArray.toJSONString();
|
||||||
}
|
}
|
||||||
|
|
||||||
public ResponseDTO<String> addOperatreFullData(String type, String params, String result, Long startTime, Long elapsedTime, Long acceptTime){
|
public ResponseDTO<String> addOperatreFullData(String type, String params, String result, Long startTime, Long elapsedTime, Long acceptTime){
|
||||||
@ -281,7 +296,7 @@ public class OrderService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public int updateOrder(OrderEntity orderEntity){
|
public int updateOrder(String orderNumber){
|
||||||
return ordersDao.updateById(orderEntity);
|
return ordersDao.updateByOrderNumber(orderNumber);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -13,4 +13,8 @@ public class QueryEntity {
|
|||||||
|
|
||||||
private String phoneNumber;
|
private String phoneNumber;
|
||||||
|
|
||||||
|
private String page;
|
||||||
|
|
||||||
|
private String rows;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -11,15 +11,15 @@ import java.io.*;
|
|||||||
@Component
|
@Component
|
||||||
public class MyConfig implements WXPayConfig {
|
public class MyConfig implements WXPayConfig {
|
||||||
|
|
||||||
// private String path ="C:/Users/Administrator/IdeaProjects/smart-admin/smart-admin-service/smart-admin-api/src/main/resources/wxpay/";
|
// private String path ="C:/Users/Administrator/IdeaProjects/smart-admin/smart-admin-service/smart-admin-api/src/main/resources/wxpay/pro/";
|
||||||
private String path ="/home/royalcanin-dev/cert/";
|
private String path ="/home/royalcanin-dev/cert/pro/";
|
||||||
|
|
||||||
// public String notify_url = "http://47.96.75.242:10086/smart-admin-api/royalcanin/updateOrderWX";
|
// public String notify_url = "http://47.96.75.242:10086/smart-admin-api/royalcanin/updateOrderWX";
|
||||||
|
|
||||||
public String notify_url = "https://royalcanincn.escase.cn/jc/royalcanin/royalcanin/updateOrderWX";
|
public String notify_url = "https://royalcanincn.escase.cn/jc/royalcanin/royalcanin/updateOrderWX";
|
||||||
|
|
||||||
// 微信支付h5 回调地址
|
// 微信支付h5 回调地址
|
||||||
public static String NOTIFY_URL_H5 = "https://www.XXXXXX.com/server/weixin/WxQuery";
|
public static String NOTIFY_URL_H5 = "https://shop.royalcanin.com.cn/myorder/usertion?";
|
||||||
|
|
||||||
// 请求地址
|
// 请求地址
|
||||||
public static String UFDODER_URL = "https://api.mch.weixin.qq.com/pay/unifiedorder";
|
public static String UFDODER_URL = "https://api.mch.weixin.qq.com/pay/unifiedorder";
|
||||||
@ -34,18 +34,22 @@ public class MyConfig implements WXPayConfig {
|
|||||||
certStream.close();
|
certStream.close();
|
||||||
}
|
}
|
||||||
public String getAppID() {
|
public String getAppID() {
|
||||||
return "wx3c51c14272f63a64";
|
return "wxa9a0ae603bbe6ceb";
|
||||||
}
|
}
|
||||||
//wxa9a0ae603bbe6ceb
|
//wx3c51c14272f63a64
|
||||||
|
|
||||||
|
// public String getMchID() {
|
||||||
|
// return "16717629989";
|
||||||
|
// }
|
||||||
public String getMchID() {
|
public String getMchID() {
|
||||||
return "1315161001";
|
return "1523977801";
|
||||||
}
|
}
|
||||||
// 16717629989
|
//1315161001
|
||||||
|
|
||||||
public String getKey() {
|
public String getKey() {
|
||||||
return "b69497999e8fd1f8f1f0a9591b24eb72";
|
return "indexphpcorecertapicert201903200";
|
||||||
}
|
}
|
||||||
//indexphpcorecertapicert201903200
|
//b69497999e8fd1f8f1f0a9591b24eb72
|
||||||
|
|
||||||
public InputStream getCertStream() {
|
public InputStream getCertStream() {
|
||||||
ByteArrayInputStream certBis = new ByteArrayInputStream(this.certData);
|
ByteArrayInputStream certBis = new ByteArrayInputStream(this.certData);
|
||||||
|
@ -9,13 +9,13 @@ import net.lab1024.smartadmin.module.system.royalcanin.good.service.OrderService
|
|||||||
import net.lab1024.smartadmin.module.system.royalcanin.memberAccount.MemberAccountChangeEntity;
|
import net.lab1024.smartadmin.module.system.royalcanin.memberAccount.MemberAccountChangeEntity;
|
||||||
import net.lab1024.smartadmin.module.system.royalcanin.notify.model.NotifyEntity;
|
import net.lab1024.smartadmin.module.system.royalcanin.notify.model.NotifyEntity;
|
||||||
import net.lab1024.smartadmin.module.system.royalcanin.notify.service.NotifyService;
|
import net.lab1024.smartadmin.module.system.royalcanin.notify.service.NotifyService;
|
||||||
import net.lab1024.smartadmin.module.system.royalcanin.orderMaster.QueryEntity;
|
|
||||||
import net.lab1024.smartadmin.module.system.wxpay.sdk.WXPay;
|
import net.lab1024.smartadmin.module.system.wxpay.sdk.WXPay;
|
||||||
import net.lab1024.smartadmin.module.system.wxpay.sdk.WXPayUtil;
|
import net.lab1024.smartadmin.module.system.wxpay.sdk.WXPayUtil;
|
||||||
import net.lab1024.smartadmin.module.system.wxpay.wxPayModel.WxPayEntity;
|
import net.lab1024.smartadmin.module.system.wxpay.wxPayModel.WxPayEntity;
|
||||||
import net.lab1024.smartadmin.util.MapRemoveNullUtil;
|
import net.lab1024.smartadmin.util.MapRemoveNullUtil;
|
||||||
import net.lab1024.smartadmin.util.SmartHttpUtil;
|
import net.lab1024.smartadmin.util.SmartHttpUtil;
|
||||||
import net.lab1024.smartadmin.util.SmartIPUtil;
|
import net.lab1024.smartadmin.util.SmartIPUtil;
|
||||||
|
import org.apache.poi.hpsf.Decimal;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
@ -25,8 +25,11 @@ import java.io.BufferedReader;
|
|||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.io.InputStreamReader;
|
import java.io.InputStreamReader;
|
||||||
|
import java.math.BigDecimal;
|
||||||
import java.net.Inet4Address;
|
import java.net.Inet4Address;
|
||||||
import java.net.InetAddress;
|
import java.net.InetAddress;
|
||||||
|
import java.net.URLEncoder;
|
||||||
|
import java.text.DecimalFormat;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
@ -48,6 +51,27 @@ public class WxpayService {
|
|||||||
|
|
||||||
String url = "https://miniapp-test.royalcanin.com.cn/rcmini/h5/";
|
String url = "https://miniapp-test.royalcanin.com.cn/rcmini/h5/";
|
||||||
|
|
||||||
|
private String urlNative = "https://api.mch.weixin.qq.com/v3/pay/transactions/native";
|
||||||
|
|
||||||
|
public String testGenerateQRCode(WxPayEntity wxPayEntity)throws Exception{
|
||||||
|
String Authorization = "WECHATPAY2-SHA256-RSA2048";
|
||||||
|
long timestamp = System.currentTimeMillis();
|
||||||
|
SortedMap<String,String> data = new TreeMap<>();
|
||||||
|
SortedMap<String, Integer> amount = new TreeMap<>();
|
||||||
|
amount.put("total",Integer.parseInt(getMoney(wxPayEntity.getTotal_fee())));
|
||||||
|
data.put("out_trade_no",wxPayEntity.getOut_trade_no());
|
||||||
|
data.put("notify_url",config.notify_url);
|
||||||
|
data.put("description","皇家宠物食品官方商城");
|
||||||
|
data.put("appid",config.getAppID());
|
||||||
|
data.put("mchid",config.getMchID());
|
||||||
|
net.sf.json.JSONObject jsonObject = net.sf.json.JSONObject.fromObject(data);
|
||||||
|
jsonObject.put("amount",amount);
|
||||||
|
SortedMap<String ,String>hearder = new TreeMap<>();
|
||||||
|
hearder.put("Accept","application/json");
|
||||||
|
hearder.put("Authorization",Authorization +" mchid="+config.getMchID() +",nonce_str=" + WXPayUtil.generateNonceStr() + ",timestamp=" + timestamp + ",signature=" + WXPayUtil.generateSignature(data, config.getKey()) + ",serial_no=" + config.getKey());
|
||||||
|
String sb = SmartHttpUtil.httpPostRaw(urlNative,jsonObject.toString(),hearder,"utf-8");
|
||||||
|
return sb;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -67,7 +91,7 @@ public class WxpayService {
|
|||||||
try {
|
try {
|
||||||
Map<String, String> resp = wxpay.unifiedOrder(data);
|
Map<String, String> resp = wxpay.unifiedOrder(data);
|
||||||
if (resp != null) {
|
if (resp != null) {
|
||||||
return resp.get("code_url");
|
return resp.get("code_url") == null ?resp.get("err_code_des"):resp.get("code_url");
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
@ -96,7 +120,8 @@ public class WxpayService {
|
|||||||
// 更新订单状态
|
// 更新订单状态
|
||||||
if ("SUCCESS".equals(sortedMap.get("result_code"))) {
|
if ("SUCCESS".equals(sortedMap.get("result_code"))) {
|
||||||
String outTradeNo = sortedMap.get("out_trade_no"); // 流水号
|
String outTradeNo = sortedMap.get("out_trade_no"); // 流水号
|
||||||
String totalFee = sortedMap.get("total_fee"); // 交易金额
|
DecimalFormat df = new DecimalFormat("0.00");
|
||||||
|
String totalFee = StringUtil.toString(df.format(df.format(Double.parseDouble(sortedMap.get("total_fee")) / 100))); // 交易金额
|
||||||
OrderEntity orderEntity = orderService.findByOrderId(outTradeNo);
|
OrderEntity orderEntity = orderService.findByOrderId(outTradeNo);
|
||||||
String [] products = orderEntity.getProductCode().split(",");
|
String [] products = orderEntity.getProductCode().split(",");
|
||||||
ProductMasterQueryEntity productMasterQueryEntity = new ProductMasterQueryEntity();
|
ProductMasterQueryEntity productMasterQueryEntity = new ProductMasterQueryEntity();
|
||||||
@ -140,10 +165,6 @@ public class WxpayService {
|
|||||||
response.getWriter().println("<xml> <return_code><![CDATA[SUCCESS]]></return_code> <return_msg><![CDATA[OK]]></return_msg> </xml>");
|
response.getWriter().println("<xml> <return_code><![CDATA[SUCCESS]]></return_code> <return_msg><![CDATA[OK]]></return_msg> </xml>");
|
||||||
response.setContentType("text/html");
|
response.setContentType("text/html");
|
||||||
response.getWriter().println("SUCCESS");
|
response.getWriter().println("SUCCESS");
|
||||||
QueryEntity queryEntity = new QueryEntity();
|
|
||||||
queryEntity.setOrderNumber(outTradeNo);
|
|
||||||
String orderEntityJson = orderService.query(queryEntity);
|
|
||||||
orderService.completeOrder(totalFee,orderEntityJson);
|
|
||||||
}
|
}
|
||||||
}else {
|
}else {
|
||||||
// 未成功,就都处理为失败订单
|
// 未成功,就都处理为失败订单
|
||||||
@ -167,7 +188,7 @@ public class WxpayService {
|
|||||||
* @return
|
* @return
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
public Map<String, String> dounifiedOrder(WxPayEntity wxPayEntity) throws Exception {
|
public String dounifiedOrder(WxPayEntity wxPayEntity) throws Exception {
|
||||||
//返回参数
|
//返回参数
|
||||||
Map<String, String> returnMap = new HashMap<>();
|
Map<String, String> returnMap = new HashMap<>();
|
||||||
WXPay wxpay = new WXPay(config);
|
WXPay wxpay = new WXPay(config);
|
||||||
@ -179,7 +200,7 @@ public class WxpayService {
|
|||||||
data.put("fee_type","CNY");
|
data.put("fee_type","CNY");
|
||||||
data.put("total_fee",getMoney(wxPayEntity.getTotal_fee()));
|
data.put("total_fee",getMoney(wxPayEntity.getTotal_fee()));
|
||||||
data.put("spbill_create_ip", SmartIPUtil.getLocalHostIP());
|
data.put("spbill_create_ip", SmartIPUtil.getLocalHostIP());
|
||||||
data.put("trade_type", "MWEB"); // 此处指定为扫码支付
|
data.put("trade_type", "MWEB"); // 此处指定为H5支付
|
||||||
data.put("body","皇家宠物食品官方商城");
|
data.put("body","皇家宠物食品官方商城");
|
||||||
data.put("nonce_str", WXPayUtil.generateNonceStr());
|
data.put("nonce_str", WXPayUtil.generateNonceStr());
|
||||||
data.put("product_id",wxPayEntity.getProduct_id());
|
data.put("product_id",wxPayEntity.getProduct_id());
|
||||||
@ -193,18 +214,20 @@ public class WxpayService {
|
|||||||
if (returnCode.equals("SUCCESS")) {
|
if (returnCode.equals("SUCCESS")) {
|
||||||
returnMap.put("ok", "200");
|
returnMap.put("ok", "200");
|
||||||
//拼接返回跳转地址
|
//拼接返回跳转地址
|
||||||
String url= config.NOTIFY_URL_H5;
|
String url= config.NOTIFY_URL_H5+"/myorder/usertion?orderNumber="+wxPayEntity.getOut_trade_no() + "&tradeType=MWEB";
|
||||||
returnMap.put("url", response.get("mweb_url")+"&redirect_url="+url);
|
returnMap.put("url", response.get("mweb_url")+"&redirect_url="+url);
|
||||||
|
return response.get("mweb_url") == null ? response.get("err_code_des"):returnMap.get("url");
|
||||||
} else {
|
} else {
|
||||||
returnMap.put("ok", "201");
|
returnMap.put("ok", "201");
|
||||||
returnMap.put("url",null);
|
returnMap.put("url",null);
|
||||||
return returnMap;
|
return returnMap.get("url");
|
||||||
}
|
}
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
System.out.println(e);
|
System.out.println(e);
|
||||||
|
return "Error";
|
||||||
//系统等其他错误的时候
|
//系统等其他错误的时候
|
||||||
}
|
}
|
||||||
return returnMap;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@ public class SmartJWTUtil {
|
|||||||
/**
|
/**
|
||||||
* 过期时间一天
|
* 过期时间一天
|
||||||
*/
|
*/
|
||||||
private static final int EXPIRE_SECONDS = 1 * 24 * 3600;
|
private static final int EXPIRE_SECONDS = 365 * 24 * 3600;
|
||||||
/**
|
/**
|
||||||
* jwt加密字段
|
* jwt加密字段
|
||||||
*/
|
*/
|
||||||
@ -78,7 +78,7 @@ public class SmartJWTUtil {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
String token = SmartJWTUtil.generateToken("884127");
|
String token = SmartJWTUtil.generateToken("884159");
|
||||||
System.out.println(token);
|
System.out.println(token);
|
||||||
System.out.println(SmartJWTUtil.decodeToken(token));
|
System.out.println(SmartJWTUtil.decodeToken(token));
|
||||||
}
|
}
|
||||||
|
@ -14,7 +14,7 @@ public class SmsUtil {
|
|||||||
SMSServiceSoap_BindingStub stub = (SMSServiceSoap_BindingStub) service.getSMSServiceSoap(protAddres);
|
SMSServiceSoap_BindingStub stub = (SMSServiceSoap_BindingStub) service.getSMSServiceSoap(protAddres);
|
||||||
java.util.Calendar cal= java.util.Calendar.getInstance();
|
java.util.Calendar cal= java.util.Calendar.getInstance();
|
||||||
cal.set(2021,12,31,0,0,0);
|
cal.set(2021,12,31,0,0,0);
|
||||||
String sMSGID = stub.sendSMS(number,8,"您好,您的验证码:" + verifyNumber + ", 5分钟有效期 !【皇家宠物食品】",cal,"7101567100151709");
|
String sMSGID = stub.sendSMS(number,8,"您好,您的验证码:" + verifyNumber + ", 5分钟有效期 !",cal,"7101567100151709");
|
||||||
if (sMSGID.startsWith("OK:"))
|
if (sMSGID.startsWith("OK:"))
|
||||||
System.out.println("Send successful!");
|
System.out.println("Send successful!");
|
||||||
System.out.println("msgId = " + sMSGID);
|
System.out.println("msgId = " + sMSGID);
|
||||||
|
@ -22,4 +22,10 @@
|
|||||||
|
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
|
<update id="updateByOrderNumber" >
|
||||||
|
update t_good_orders
|
||||||
|
set pay_type ='2'
|
||||||
|
where order_no = #{orderNumber}
|
||||||
|
</update>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
@ -19,6 +19,7 @@
|
|||||||
tagUsedAge,
|
tagUsedAge,
|
||||||
category_name,
|
category_name,
|
||||||
picture,
|
picture,
|
||||||
|
good_url,
|
||||||
show_img_file
|
show_img_file
|
||||||
from t_good_goods
|
from t_good_goods
|
||||||
where isShow = 1
|
where isShow = 1
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
######################### server ###################
|
######################### server ###################
|
||||||
server.servlet.context-path=/smart-admin-api
|
server.servlet.context-path=/royalcanin
|
||||||
server.port=10088
|
server.port=10086
|
||||||
spring.profiles.active=@profiles.active@
|
spring.profiles.active=@profiles.active@
|
||||||
|
|
||||||
######################### tomcat ###################
|
######################### tomcat ###################
|
||||||
server.tomcat.basedir=/home/logs/smart-admin/tomcat-logs
|
server.tomcat.basedir=/home/royalcanin-prod/tomcat-9/smart-admin/tomcat-logs
|
||||||
server.tomcat.accesslog.enabled=true
|
server.tomcat.accesslog.enabled=true
|
||||||
server.tomcat.accesslog.pattern=%t %{X-Forwarded-For}i %a "%r" %s %D (%D ms)
|
server.tomcat.accesslog.pattern=%t %{X-Forwarded-For}i %a "%r" %s %D (%D ms)
|
||||||
|
|
||||||
@ -23,9 +23,9 @@ spring.servlet.multipart.max-request-size=30MB
|
|||||||
file-upload-service.path=/home/upload/smart-admin-file
|
file-upload-service.path=/home/upload/smart-admin-file
|
||||||
|
|
||||||
######################### database #########################
|
######################### database #########################
|
||||||
spring.datasource.url=jdbc:mysql://172.16.0.201:3306/smart-admin-prod?autoReconnect=true&useServerPreparedStmts=false&rewriteBatchedStatements=true&characterEncoding=UTF-8&useSSL=false&allowMultiQueries=true
|
spring.datasource.url=jdbc:mysql://rc-hub-mysql.mysql.database.chinacloudapi.cn/smart-admin-prod?autoReconnect=true&useServerPreparedStmts=false&rewriteBatchedStatements=true&characterEncoding=UTF-8&useSSL=false&allowMultiQueries=true
|
||||||
spring.datasource.username=smart-admin
|
spring.datasource.username=azureuser@rc-hub-mysql
|
||||||
spring.datasource.password=Admin@123457
|
spring.datasource.password=(G=q0D5ez2Fz
|
||||||
spring.datasource.initial-size=2
|
spring.datasource.initial-size=2
|
||||||
spring.datasource.min-idle=1
|
spring.datasource.min-idle=1
|
||||||
spring.datasource.max-active=100
|
spring.datasource.max-active=100
|
||||||
|
@ -1640,6 +1640,7 @@ CREATE TABLE `t_good_goods` (
|
|||||||
`tagUsedAge` varchar(11) DEFAULT NULL COMMENT '适用阶段',
|
`tagUsedAge` varchar(11) DEFAULT NULL COMMENT '适用阶段',
|
||||||
`picture` varchar(200) DEFAULT NULL COMMENT '标品头图',
|
`picture` varchar(200) DEFAULT NULL COMMENT '标品头图',
|
||||||
`show_img_file` varchar(200) DEFAULT NULL COMMENT '身体头图',
|
`show_img_file` varchar(200) DEFAULT NULL COMMENT '身体头图',
|
||||||
|
`good_url` varchar(500) DEFAULT NULL COMMENT '处方粮跳转连接',
|
||||||
`isSales` int(11) DEFAULT NULL COMMENT '0:未销售,1:销售',
|
`isSales` int(11) DEFAULT NULL COMMENT '0:未销售,1:销售',
|
||||||
`isShow` int(11) DEFAULT NULL COMMENT '0:不展示,1:展示',
|
`isShow` int(11) DEFAULT NULL COMMENT '0:不展示,1:展示',
|
||||||
PRIMARY KEY (`id`)
|
PRIMARY KEY (`id`)
|
||||||
|
Binary file not shown.
@ -0,0 +1,23 @@
|
|||||||
|
-----BEGIN CERTIFICATE-----
|
||||||
|
MIID6TCCAtGgAwIBAgIUMO4qJG/XR9oQeHQphVQ7usz5/0YwDQYJKoZIhvcNAQEL
|
||||||
|
BQAwXjELMAkGA1UEBhMCQ04xEzARBgNVBAoTClRlbnBheS5jb20xHTAbBgNVBAsT
|
||||||
|
FFRlbnBheS5jb20gQ0EgQ2VudGVyMRswGQYDVQQDExJUZW5wYXkuY29tIFJvb3Qg
|
||||||
|
Q0EwHhcNMjIwMTI0MDgxMTA3WhcNMjcwMTIzMDgxMTA3WjB7MRMwEQYDVQQDDAox
|
||||||
|
NTIzOTc3ODAxMRswGQYDVQQKDBLlvq7kv6HllYbmiLfns7vnu58xJzAlBgNVBAsM
|
||||||
|
HuS4iua1t+aHi+avheWVhui0uOaciemZkOWFrOWPuDELMAkGA1UEBgwCQ04xETAP
|
||||||
|
BgNVBAcMCFNoZW5aaGVuMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA
|
||||||
|
yRnwfm/9lHyq16cAJjx8/7x9WQF+/mKry6MvJIquaXUXBQKDO3d4deBLq8By7dXD
|
||||||
|
xi7S7bPFeUkjXhgxs/WD15xyzNZj4qpKmXuEaFi0g1VLNUs3RmlWaR9OX0On+G2X
|
||||||
|
vj4Zw1bi7sbefA1UrgNB7CH6nAaIVVWDdggxnUeX18F1y7BUBjPBh64Trbi0n011
|
||||||
|
U/m738gyH37tfcSZCMM7aBO4/8BqRmRmNr58Owci8ee7G2yybGbRyVpT/3Y7cWLt
|
||||||
|
k4pyOavIjpmaIo/CPbwMC5hOR4fxwyZUaTpyZh7foQFytz05UHvxp35hKZLnxI2d
|
||||||
|
U+0wtymYYxTFGe6BngVHVwIDAQABo4GBMH8wCQYDVR0TBAIwADALBgNVHQ8EBAMC
|
||||||
|
BPAwZQYDVR0fBF4wXDBaoFigVoZUaHR0cDovL2V2Y2EuaXRydXMuY29tLmNuL3B1
|
||||||
|
YmxpYy9pdHJ1c2NybD9DQT0xQkQ0MjIwRTUwREJDMDRCMDZBRDM5NzU0OTg0NkMw
|
||||||
|
MUMzRThFQkQyMA0GCSqGSIb3DQEBCwUAA4IBAQCOhr56rhhVqckEiN63f1JHD+SG
|
||||||
|
4DRLCkcJ5oon2EvKOxCKFW9sqcggjtoF3R5ZQe8TwpGl/Pp7t0tbcpor9Gpr3V75
|
||||||
|
fkkCsvotCaB3Hbpw/VzXP96848cQ8B/QtU+7oLCkCnakXeorgf/cLN/IlZ8ZAb5B
|
||||||
|
R7ZEf8qthobPqAygrk1ZLmRNKzEMD+kWaFvffkYGeGP1chZPqevb4sS0BlckBaP/
|
||||||
|
xeeU7R9Y5p5FANzIDCmHoFxqsrGLnF7Dh+bQSPSnG/rZjXnCYJFG6Jp/VvXP6enh
|
||||||
|
5fpVimiUe/62aP6XkKLSm1sX9b86GuTaAl58n78oocNa/XBcKNJNa/3A37bW
|
||||||
|
-----END CERTIFICATE-----
|
@ -0,0 +1,28 @@
|
|||||||
|
-----BEGIN PRIVATE KEY-----
|
||||||
|
MIIEvwIBADANBgkqhkiG9w0BAQEFAASCBKkwggSlAgEAAoIBAQDJGfB+b/2UfKrX
|
||||||
|
pwAmPHz/vH1ZAX7+YqvLoy8kiq5pdRcFAoM7d3h14EurwHLt1cPGLtLts8V5SSNe
|
||||||
|
GDGz9YPXnHLM1mPiqkqZe4RoWLSDVUs1SzdGaVZpH05fQ6f4bZe+PhnDVuLuxt58
|
||||||
|
DVSuA0HsIfqcBohVVYN2CDGdR5fXwXXLsFQGM8GHrhOtuLSfTXVT+bvfyDIffu19
|
||||||
|
xJkIwztoE7j/wGpGZGY2vnw7ByLx57sbbLJsZtHJWlP/djtxYu2TinI5q8iOmZoi
|
||||||
|
j8I9vAwLmE5Hh/HDJlRpOnJmHt+hAXK3PTlQe/GnfmEpkufEjZ1T7TC3KZhjFMUZ
|
||||||
|
7oGeBUdXAgMBAAECggEBAKmjzA+cgRjlIWjRY3rdw8QnSMXwUSReL/WULoxwwDgN
|
||||||
|
oeGEARgE7ATjtHGp4klm7cMcdKo33/k0DTWuyx63mQQk4WKR56ipZkyauVMcoQm4
|
||||||
|
xbyrOnGXImGDGyWZePRD3qGI2UrC3KP39m5HAIvaC54Z+8HqcM8rV74Vo2S9pAVH
|
||||||
|
mhdH9VC5tnp2cBnOh8UyhIYmqAj/SXSk5Becq2IoYG8r5vojvohtxL/w5hbEfBnz
|
||||||
|
VhjZo82t0hhFGHfFJHw/3D2JjGdYI8QTxTZ78pMb0uK5XsJtxdQFKf5jS4XopJ5k
|
||||||
|
2h/YtAHxFv6K1cqyAaS3ZoyYGTOWy+eQrycGm62nNqECgYEA6UMsK8t/eS4NE1rK
|
||||||
|
capEufddSDzUr2C34ZLxZgXXOpLEdbvvADlCVqqT0/N682xxeM0iK+HVHRpmbzE9
|
||||||
|
v0MKPeMuRJ14aoiQEdGhDwEWgkyZr3GGdkgsIxO3/x9TNBK4F9pxZPFLSvkNDscO
|
||||||
|
75A2CBtB18gm6yAHkr+UQRlpXpsCgYEA3LQ4Tfme2xD6sa0WE+SFGk4hW/wfMawi
|
||||||
|
C1v5xJEjmI2ucKw3i19fKT+3a1LHY47ytjNS0hRQUoEYO0iEe1wO9t1TExmreLar
|
||||||
|
mUW4jcnoLEUBBYHfu6vTbyoRePUXhtk9jb2cFEMpDXI3qNwGN+2LTRz3Q1G8T+D9
|
||||||
|
kdHHGLF+h/UCgYB1GH5dAcvdBiwUMjh8NNBJVo7iS38tBu1n9H7wCzCPO8wZmh0R
|
||||||
|
TK0rmneZJ5nqBt8zmC52PujfsjgHy31GvR2wEZJRaYdgW2uPNl+Wi6JECLYBp4ir
|
||||||
|
afGWLjjofk4jTt5RQxw3YxW77igK6gxqYEdvbFdyPgyjbbG/jiKbR2lozwKBgQCU
|
||||||
|
PwXW8oYO1e/eqsm6oPP7AGIN/GMjpWDUynoR2//R99ElY7iHiI9OELtufpLpv9ou
|
||||||
|
InlOHVD6qjYRlBtRFTwD/BRSLxrroZ/P+3IE44ttOQh/n4Yd9EO4VsSXv+GGtaNP
|
||||||
|
8v3E6nvHyWGzrd8LcCbyrDM2Z8+axCDu8r7OSmMYhQKBgQDa3hTeI/sV72kH+8vz
|
||||||
|
GaTbQBtuxI34sKOxdsp7vR2IfTJjOPhTHgxCnISUaHFvgnYpmNgSZbLBMasIWouz
|
||||||
|
9NbU+lEwGBXKcNbCKQaWut7z3CArsV5j/9kKQrBwXWVsFNgKYwO0Md7aEKtcruLN
|
||||||
|
WjetT3R9CLwHFB2H+K3Mi0+5JA==
|
||||||
|
-----END PRIVATE KEY-----
|
Loading…
Reference in New Issue
Block a user