mirror of
https://gitee.com/lab1024/smart-admin.git
synced 2025-10-01 17:56:39 +08:00
Merge remote-tracking branch 'origin/sit-Leung' into sit-jiamin-v2
This commit is contained in:
commit
065db958c7
@ -31,13 +31,13 @@ export const courselist = (offset, courseId, type, sort, selectScreen = []) => {
|
||||
courseId,
|
||||
selectScreenStr
|
||||
}
|
||||
return fetch( '/api/courselist', data)
|
||||
return fetch('/api/courselist', data)
|
||||
}
|
||||
/**
|
||||
* 获取课程详情
|
||||
*/
|
||||
export const getDetail = (id) => {
|
||||
fetch( '/api/courseDetail/index/' + id)
|
||||
fetch('/api/courseDetail/index/' + id)
|
||||
}
|
||||
|
||||
/**
|
||||
@ -56,32 +56,32 @@ export const getleckCourse = (name, offset) => {
|
||||
* 加入购物车
|
||||
*/
|
||||
|
||||
export const postCourseId = (productCode,buyCount,memberId, mobile,productImg,productName,productPrice,specifications) => {
|
||||
export const postCourseId = (productCode, buyCount, memberId, mobile, productImg, productName, productPrice, specifications, leftAllotment) => {
|
||||
var data = {
|
||||
buyCount:buyCount,
|
||||
buyCount: buyCount,
|
||||
memberId: memberId,
|
||||
mobile:mobile,
|
||||
productCode:productCode,
|
||||
mobile: mobile,
|
||||
productCode: productCode,
|
||||
productImg: productImg,
|
||||
productName:productName,
|
||||
productPrice:productPrice,
|
||||
specifications:specifications
|
||||
productName: productName,
|
||||
productPrice: productPrice,
|
||||
specifications: specifications,
|
||||
leftAllotment: leftAllotment
|
||||
}
|
||||
return fetch('/insertCartProductInfo', data,'POST')
|
||||
return fetch('/insertCartProductInfo', data, 'POST')
|
||||
}
|
||||
/**
|
||||
* 是否存在购物车
|
||||
*/
|
||||
export const isexistCart = (id, pet,address) => {
|
||||
var data = { }
|
||||
return fetch('getCartProductInfo?memberId='+id,data,'POST')
|
||||
export const isexistCart = (id, pet, address) => {
|
||||
var data = {}
|
||||
return fetch('getCartProductInfo?memberId=' + id, data, 'POST')
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除购物车
|
||||
*/
|
||||
export const deleteCart = ( productCode) => {
|
||||
debugger;
|
||||
var data = {
|
||||
productCode
|
||||
}
|
||||
@ -91,7 +91,7 @@ export const deleteCart = ( productCode) => {
|
||||
* 购物车批量提交
|
||||
*/
|
||||
export const mostAddClass = (id) => {
|
||||
return fetch('/api/mostAddClass/', {id})
|
||||
return fetch('/api/mostAddClass/', { id })
|
||||
}
|
||||
/**
|
||||
* 删除购物车
|
||||
@ -107,68 +107,68 @@ export const mostAddClass = (id) => {
|
||||
/**
|
||||
* 发送验证码
|
||||
*/
|
||||
export const sendMsg = (mobile, pet,address) => {
|
||||
export const sendMsg = (mobile, pet, address) => {
|
||||
var data = {
|
||||
phoneNumber:mobile,
|
||||
phoneNumber: mobile,
|
||||
}
|
||||
return fetch('sendMsg', data, 'POST' )
|
||||
return fetch('sendMsg', data, 'POST')
|
||||
}
|
||||
|
||||
/**
|
||||
* 发送验证码数据
|
||||
*/
|
||||
export const vadatnmsg = (msgNum,hash,tamp) => {
|
||||
export const vadatnmsg = (msgNum, hash, tamp) => {
|
||||
var data = {
|
||||
msgNum:msgNum,
|
||||
tamp:tamp,
|
||||
hash:hash
|
||||
msgNum: msgNum,
|
||||
tamp: tamp,
|
||||
hash: hash
|
||||
}
|
||||
return fetch('validateNum', data, 'POST' )
|
||||
return fetch('validateNum', data, 'POST')
|
||||
}
|
||||
|
||||
/**
|
||||
* 筛选标签
|
||||
*/
|
||||
export const userstype = (stype, pet,address) => {
|
||||
export const userstype = (stype, pet, address) => {
|
||||
var data = {
|
||||
petType:0,
|
||||
petType: 0,
|
||||
}
|
||||
return fetch('productSearchTag/query?petType=' + 0, data, 'POST' )
|
||||
return fetch('productSearchTag/query?petType=' + 0, data, 'POST')
|
||||
}
|
||||
/**
|
||||
* 登录
|
||||
*/
|
||||
export const userLongin = (mobile, pet,address) => {
|
||||
export const userLongin = (mobile, pet, address) => {
|
||||
var data = {
|
||||
id:'',
|
||||
mobile:mobile,
|
||||
id: '',
|
||||
mobile: mobile,
|
||||
}
|
||||
return fetch('member?type=get', data, 'POST' )
|
||||
return fetch('member?type=get', data, 'POST')
|
||||
}
|
||||
|
||||
//注册
|
||||
export const useredit = (mobile, pet,address) => {
|
||||
//注册
|
||||
export const useredit = (mobile, pet, address) => {
|
||||
var data = {
|
||||
mobile:mobile,
|
||||
memberName:'',
|
||||
realName:'',
|
||||
gender:'',
|
||||
email:'',
|
||||
openId:'',
|
||||
unionId:'',
|
||||
birthday:'',
|
||||
provinceId:'',
|
||||
cityId:'',
|
||||
districtId:'',
|
||||
storeCode:'',
|
||||
remark:'',
|
||||
memberMark:'',
|
||||
|
||||
remark:''
|
||||
mobile: mobile,
|
||||
memberName: '',
|
||||
realName: '',
|
||||
gender: '',
|
||||
email: '',
|
||||
openId: '',
|
||||
unionId: '',
|
||||
birthday: '',
|
||||
provinceId: '',
|
||||
cityId: '',
|
||||
districtId: '',
|
||||
storeCode: '',
|
||||
remark: '',
|
||||
memberMark: '',
|
||||
|
||||
remark: ''
|
||||
}
|
||||
return fetch('member?type=add', data, 'POST' )
|
||||
return fetch('member?type=add', data, 'POST')
|
||||
}
|
||||
//查询标品全部信息
|
||||
//查询标品全部信息
|
||||
// export const userquery = (mobile, pet,address) => {
|
||||
// var data = {
|
||||
// channelId:"15",
|
||||
@ -178,14 +178,14 @@ export const useredit = (mobile, pet,address) => {
|
||||
// return fetch('h5/brand/query', data, 'POST' )
|
||||
// }
|
||||
//点击商品全部信息
|
||||
export const userquery = (stype, ) => {
|
||||
export const userquery = (stype,) => {
|
||||
|
||||
console.log(stype);
|
||||
var data = {
|
||||
goodsName:stype
|
||||
goodsName: stype
|
||||
|
||||
}
|
||||
return fetch('goods?petType='+stype, data, 'POST' )
|
||||
return fetch('goods?petType=' + stype, data, 'POST')
|
||||
}
|
||||
//处方信息
|
||||
export const userque = (goodsName, curPage,curRow) => {
|
||||
@ -198,62 +198,62 @@ export const userque = (goodsName, curPage,curRow) => {
|
||||
queryTail = '?goodsName='+goodsName;
|
||||
var data = {
|
||||
}
|
||||
return fetch('goods'+queryTail, data, 'POST' )
|
||||
return fetch('goods' + queryTail, data, 'POST')
|
||||
}
|
||||
|
||||
|
||||
|
||||
//标品全部信息
|
||||
export const biaomessage = (stype,name,curPage,curRow) => {
|
||||
if(!curPage)
|
||||
curPage=1;
|
||||
if(!curRow)
|
||||
curRow=10;
|
||||
let queryTail='&page='+curPage+'&rows='+curRow;
|
||||
if(stype.length>1){
|
||||
let list={};
|
||||
stype.map(item=>{
|
||||
console.log(item);
|
||||
list=item
|
||||
})
|
||||
var str = "?";
|
||||
for(var key in list){
|
||||
str = str + key + "=" + list[key] + "&";
|
||||
}
|
||||
stype = str.substr(0,str.length-1);
|
||||
return fetch('product/query'+stype+queryTail, '', 'POST' )
|
||||
}else{
|
||||
return fetch('product/query?petType='+stype+queryTail, '', 'POST' )
|
||||
}
|
||||
export const biaomessage = (stype, name, curPage, curRow) => {
|
||||
if (!curPage)
|
||||
curPage = 1;
|
||||
if (!curRow)
|
||||
curRow = 10;
|
||||
let queryTail = '&page=' + curPage + '&rows=' + curRow;
|
||||
if (stype.length > 1) {
|
||||
let list = {};
|
||||
stype.map(item => {
|
||||
console.log(item);
|
||||
list = item
|
||||
})
|
||||
var str = "?";
|
||||
for (var key in list) {
|
||||
str = str + key + "=" + list[key] + "&";
|
||||
}
|
||||
stype = str.substr(0, str.length - 1);
|
||||
return fetch('product/query' + stype + queryTail, '', 'POST')
|
||||
} else {
|
||||
return fetch('product/query?petType=' + stype + queryTail, '', 'POST')
|
||||
}
|
||||
}
|
||||
|
||||
export const searchchanpin = (stype,usertype,curPage,curRow) => {
|
||||
export const searchchanpin = (stype, usertype, curPage, curRow) => {
|
||||
|
||||
console.log(stype,usertype);
|
||||
|
||||
if(!curPage)
|
||||
curPage=1;
|
||||
if(!curRow)
|
||||
curRow=10;
|
||||
let queryTail='&page='+curPage+'&rows='+curRow;
|
||||
console.log(stype, usertype);
|
||||
|
||||
if (!curPage)
|
||||
curPage = 1;
|
||||
if (!curRow)
|
||||
curRow = 10;
|
||||
let queryTail = '&page=' + curPage + '&rows=' + curRow;
|
||||
console.log(stype);
|
||||
let list={};
|
||||
stype.map(item=>{
|
||||
let list = {};
|
||||
stype.map(item => {
|
||||
console.log(item);
|
||||
list=item
|
||||
})
|
||||
list = item
|
||||
})
|
||||
var str = "&";
|
||||
for(var key in list){
|
||||
for (var key in list) {
|
||||
|
||||
str = str + key + "=" + list[key] + "&";
|
||||
}
|
||||
str = str.substr(0,str.length-1);
|
||||
var data = {
|
||||
page:1,
|
||||
row:10
|
||||
str = str + key + "=" + list[key] + "&";
|
||||
}
|
||||
|
||||
return fetch('product/query?petType='+usertype+str+queryTail, data, 'POST' )
|
||||
str = str.substr(0, str.length - 1);
|
||||
var data = {
|
||||
page: 1,
|
||||
row: 10
|
||||
}
|
||||
|
||||
return fetch('product/query?petType=' + usertype + str + queryTail, data, 'POST')
|
||||
}
|
||||
|
||||
|
||||
@ -268,58 +268,58 @@ export const searchchanpin = (stype,usertype,curPage,curRow) => {
|
||||
|
||||
|
||||
//查询订单
|
||||
export const userindent = (phoneNumber,orderNumber,) => {
|
||||
var data = {
|
||||
phoneNumber:phoneNumber,
|
||||
orderNumber:orderNumber,
|
||||
export const userindent = (phoneNumber, orderNumber,) => {
|
||||
var data = {
|
||||
phoneNumber: phoneNumber,
|
||||
orderNumber: orderNumber,
|
||||
}
|
||||
return fetch('orderMaster/?type=query', data, 'POST' )
|
||||
return fetch('orderMaster/?type=query', data, 'POST')
|
||||
}
|
||||
//查询订单详情
|
||||
export const userin = (orderNumber,) => {
|
||||
var data = {
|
||||
orderNumber:orderNumber,
|
||||
var data = {
|
||||
orderNumber: orderNumber,
|
||||
}
|
||||
return fetch('orderMaster/?type=query', data, 'POST' )
|
||||
return fetch('orderMaster/?type=query', data, 'POST')
|
||||
}
|
||||
|
||||
|
||||
|
||||
//取消订单
|
||||
export const canceldanhao = (phoneNumber,orderNumber) => {
|
||||
export const canceldanhao = (phoneNumber, orderNumber) => {
|
||||
var data = {
|
||||
phoneNumber:phoneNumber,
|
||||
orderNumber:orderNumber,
|
||||
phoneNumber: phoneNumber,
|
||||
orderNumber: orderNumber,
|
||||
|
||||
}
|
||||
return fetch('cancelOrder/', data, 'POST' )
|
||||
return fetch('cancelOrder/', data, 'POST')
|
||||
}
|
||||
|
||||
|
||||
export const biaomessa = (stype) => {
|
||||
console.log(stype);
|
||||
var data = {
|
||||
name:stype,
|
||||
page:1,
|
||||
row:10
|
||||
name: stype,
|
||||
page: 1,
|
||||
row: 10
|
||||
}
|
||||
return fetch('product/query', data, 'POST' )
|
||||
return fetch('product/query', data, 'POST')
|
||||
}
|
||||
|
||||
export const biaome = (usertype,stype,curPage,rows) => {
|
||||
if(!curPage)
|
||||
curPage=1;
|
||||
if(!rows)
|
||||
rows=10;
|
||||
let queryTail='&page='+curPage+'&rows='+rows;
|
||||
let username='&name='+stype
|
||||
export const biaome = (usertype, stype, curPage, rows) => {
|
||||
if (!curPage)
|
||||
curPage = 1;
|
||||
if (!rows)
|
||||
rows = 10;
|
||||
let queryTail = '&page=' + curPage + '&rows=' + rows;
|
||||
let username = '&name=' + stype
|
||||
console.log(stype);
|
||||
var data = {
|
||||
name:stype,
|
||||
rows:10,
|
||||
page:1,
|
||||
name: stype,
|
||||
rows: 10,
|
||||
page: 1,
|
||||
}
|
||||
return fetch('product/query?petType='+usertype+username+queryTail,data, 'POST' )
|
||||
return fetch('product/query?petType=' + usertype + username + queryTail, data, 'POST')
|
||||
}
|
||||
|
||||
|
||||
@ -328,9 +328,9 @@ export const biaome = (usertype,stype,curPage,rows) => {
|
||||
export const memberAccount = (stype) => {
|
||||
console.log(stype);
|
||||
var data = {
|
||||
memberId:stype
|
||||
memberId: stype
|
||||
}
|
||||
return fetch('memberAccount?type=history', data, 'POST' )
|
||||
return fetch('memberAccount?type=history', data, 'POST')
|
||||
}
|
||||
|
||||
|
||||
@ -338,20 +338,20 @@ export const memberAccount = (stype) => {
|
||||
export const ordermaster = (stype) => {
|
||||
console.log(stype);
|
||||
var data = {
|
||||
|
||||
memberId:'223782'
|
||||
|
||||
memberId: '223782'
|
||||
}
|
||||
return fetch('memberAccount', data, 'POST' )
|
||||
return fetch('memberAccount', data, 'POST')
|
||||
}
|
||||
|
||||
//微信支付
|
||||
export const payOrderWX = (stype) => {
|
||||
console.log(stype);
|
||||
var data = {
|
||||
|
||||
memberId:'223782'
|
||||
|
||||
memberId: '223782'
|
||||
}
|
||||
return fetch('memberAccount', data, 'POST' )
|
||||
return fetch('memberAccount', data, 'POST')
|
||||
}
|
||||
|
||||
|
||||
@ -360,9 +360,9 @@ export const payOrderWX = (stype) => {
|
||||
export const insercar = (stype) => {
|
||||
console.log(stype);
|
||||
var data = {
|
||||
petType:stype
|
||||
petType: stype
|
||||
}
|
||||
return fetch('product/insertCartProductInfo', data, 'POST' )
|
||||
return fetch('product/insertCartProductInfo', data, 'POST')
|
||||
}
|
||||
|
||||
|
||||
@ -370,25 +370,25 @@ export const insercar = (stype) => {
|
||||
|
||||
|
||||
//查询猫狗商品信息
|
||||
export const catquery = (productCode,type) => {
|
||||
export const catquery = (productCode, type) => {
|
||||
console.log(productCode);
|
||||
var data = {
|
||||
|
||||
petType:0
|
||||
|
||||
petType: 0
|
||||
|
||||
}
|
||||
return fetch('h5/product/query', data, 'POST' )
|
||||
return fetch('h5/product/query', data, 'POST')
|
||||
}
|
||||
//查询猫狗商品信息
|
||||
export const dogquery = (productCode,type) => {
|
||||
export const dogquery = (productCode, type) => {
|
||||
console.log(productCode);
|
||||
var data = {
|
||||
|
||||
petType:1,
|
||||
pet_type:0
|
||||
|
||||
petType: 1,
|
||||
pet_type: 0
|
||||
|
||||
}
|
||||
return fetch('h5/product/query', data, 'POST' )
|
||||
return fetch('h5/product/query', data, 'POST')
|
||||
}
|
||||
|
||||
|
||||
@ -399,11 +399,11 @@ export const dogquery = (productCode,type) => {
|
||||
export const oncequery = (productCode) => {
|
||||
|
||||
var data = {
|
||||
|
||||
productCode:productCode
|
||||
|
||||
productCode: productCode
|
||||
|
||||
}
|
||||
return fetch( "goodsByProductCode?productCode="+productCode, data, 'POST' )
|
||||
return fetch("goodsByProductCode?productCode=" + productCode, data, 'POST')
|
||||
}
|
||||
|
||||
|
||||
@ -411,60 +411,30 @@ export const oncequery = (productCode) => {
|
||||
export const goodsmessage = (productCode) => {
|
||||
|
||||
var data = {
|
||||
productCode:productCode
|
||||
productCode: productCode
|
||||
|
||||
}
|
||||
return fetch( "productMaster/query?productCode="+productCode, data, 'POST' )
|
||||
return fetch("productMaster/query?productCode=" + productCode, data, 'POST')
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//优惠券的插入
|
||||
export const inserdiscount = (mobile,couponId) => {
|
||||
var data = {
|
||||
mobile:mobile,
|
||||
couponId:couponId
|
||||
}
|
||||
return fetch('coupon?type=fetch', data, 'POST' )
|
||||
//优惠券的插入
|
||||
export const inserdiscount = (mobile, couponId) => {
|
||||
var data = {
|
||||
mobile: mobile,
|
||||
couponId: couponId
|
||||
}
|
||||
return fetch('coupon?type=fetch', data, 'POST')
|
||||
}
|
||||
|
||||
|
||||
//优惠券的查询
|
||||
export const getdiscount = (memberId,channelSecurity,mobile) => {
|
||||
var data = {
|
||||
memberId:memberId,
|
||||
mobile:mobile
|
||||
}
|
||||
return fetch('memberAddress?type=getAll', data, 'POST' )
|
||||
}
|
||||
|
||||
//可用的优惠券
|
||||
export const alldiscount = (memberId,channelSecurity,mobile) => {
|
||||
var data = {
|
||||
memberId:memberId,
|
||||
}
|
||||
return fetch('couponConfig?type=getAll', data, 'POST' )
|
||||
}
|
||||
|
||||
|
||||
//用户领取的优惠券
|
||||
export const getdraw = (mobile,states) => {
|
||||
var data = {
|
||||
mobile:mobile,
|
||||
status:states
|
||||
}
|
||||
return fetch('coupon?type=getAll', data, 'POST' )
|
||||
}
|
||||
|
||||
|
||||
//微信支付
|
||||
export const generateOrderWX = (list) => {
|
||||
var data = [{
|
||||
|
||||
|
||||
}]
|
||||
return fetch('generateOrderWX', list, 'POST' )
|
||||
//优惠券的查询
|
||||
export const getdiscount = (memberId, channelSecurity, mobile) => {
|
||||
var data = {
|
||||
memberId: memberId,
|
||||
mobile: mobile
|
||||
}
|
||||
|
||||
//再次支付
|
||||
@ -480,93 +450,128 @@ export const goodsmessage = (productCode) => {
|
||||
}
|
||||
|
||||
|
||||
//用户领取优惠券
|
||||
export const getConfig = (memberId,couponId) => {
|
||||
var data = {
|
||||
memberId:memberId,
|
||||
couponId:couponId,
|
||||
}
|
||||
return fetch('coupon?type=fetch', data, 'POST' )
|
||||
}
|
||||
|
||||
|
||||
//用户下的优惠券
|
||||
export const userConfig = (memberId,couponId) => {
|
||||
var data = {
|
||||
memberId:memberId,
|
||||
couponId:couponId,
|
||||
}
|
||||
return fetch('coupon?type=fetch', data, 'POST' )
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//用户订单的查询
|
||||
// export const customerorders = (memberId,channelSecurity,mobile) => {
|
||||
// var data = {
|
||||
// productName:'幼猫全价粮',
|
||||
// buyCount:'2',
|
||||
// productId:'210352',
|
||||
// payAmount:'517',
|
||||
// memberId:'844350',
|
||||
// phoneNumber:'18112621098',
|
||||
// }
|
||||
// return fetch('generateOrderWX', data, 'POST' )
|
||||
// }
|
||||
|
||||
|
||||
//地址的查询
|
||||
export const selectaddress = (memberId, pet,address) => {
|
||||
var data = {
|
||||
memberId:memberId,
|
||||
}
|
||||
return fetch('memberAddress?type=getAll', data, 'POST' )
|
||||
//可用的优惠券
|
||||
export const alldiscount = (memberId, channelSecurity, mobile) => {
|
||||
var data = {
|
||||
memberId: memberId,
|
||||
}
|
||||
return fetch('couponConfig?type=getAll', data, 'POST')
|
||||
}
|
||||
|
||||
|
||||
//地址的添加 //id/详细地址/ 收货人姓名/收货人电话号码/省份id/城市id/区域编码
|
||||
export const editaddress = (memberId, detailAddress,recipient,tel,provinceId,cityId,districtId) => {
|
||||
|
||||
var data = {
|
||||
memberId:844350,
|
||||
provinceId:25,
|
||||
cityId:36,
|
||||
districtId:418,
|
||||
detailAddress:'古美路1455弄46号302',
|
||||
recipient:'蒋缘缘2',
|
||||
recipientPhone:'13671516167',
|
||||
zipCode:'214423',
|
||||
default:false,
|
||||
}
|
||||
return fetch('memberAddress?type=add', memberId, 'POST' )
|
||||
//用户领取的优惠券
|
||||
export const getdraw = (mobile, states) => {
|
||||
var data = {
|
||||
mobile: mobile,
|
||||
status: states
|
||||
}
|
||||
return fetch('coupon?type=getAll', data, 'POST')
|
||||
}
|
||||
|
||||
//删除
|
||||
export const editdelete = (memberId,ids) => {
|
||||
var data = {
|
||||
memberId:memberId,
|
||||
ids:ids,
|
||||
}
|
||||
return fetch('memberAddress?type=delete', data, 'POST' )
|
||||
}
|
||||
|
||||
//地址的编辑
|
||||
export const editupdate = (userid,) => {
|
||||
// var data = {
|
||||
// memberId:userid,
|
||||
// id:id,
|
||||
// isDefault:isDefault,
|
||||
// }
|
||||
return fetch('memberAddress?type=update', userid, 'POST' )
|
||||
}
|
||||
//微信支付
|
||||
export const generateOrderWX = (list) => {
|
||||
var data = [{
|
||||
|
||||
|
||||
}]
|
||||
return fetch('generateOrderWX', list, 'POST')
|
||||
}
|
||||
//用户所有的优惠券
|
||||
export const allConfig = (memberId, channelSecurity, mobile) => {
|
||||
var data = {
|
||||
}
|
||||
return fetch('couponConfig?type=getAll', data, 'POST')
|
||||
}
|
||||
|
||||
|
||||
//用户领取优惠券
|
||||
export const getConfig = (memberId, couponId) => {
|
||||
var data = {
|
||||
memberId: memberId,
|
||||
couponId: couponId,
|
||||
}
|
||||
return fetch('coupon?type=fetch', data, 'POST')
|
||||
}
|
||||
|
||||
|
||||
//用户下的优惠券
|
||||
export const userConfig = (memberId, couponId) => {
|
||||
var data = {
|
||||
memberId: memberId,
|
||||
couponId: couponId,
|
||||
}
|
||||
return fetch('coupon?type=fetch', data, 'POST')
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
//用户订单的查询
|
||||
// export const customerorders = (memberId,channelSecurity,mobile) => {
|
||||
// var data = {
|
||||
// productName:'幼猫全价粮',
|
||||
// buyCount:'2',
|
||||
// productId:'210352',
|
||||
// payAmount:'517',
|
||||
// memberId:'844350',
|
||||
// phoneNumber:'18112621098',
|
||||
// }
|
||||
// return fetch('generateOrderWX', data, 'POST' )
|
||||
// }
|
||||
|
||||
|
||||
//地址的查询
|
||||
export const selectaddress = (memberId, pet, address) => {
|
||||
var data = {
|
||||
memberId: memberId,
|
||||
}
|
||||
return fetch('memberAddress?type=getAll', data, 'POST')
|
||||
}
|
||||
|
||||
|
||||
//地址的添加 //id/详细地址/ 收货人姓名/收货人电话号码/省份id/城市id/区域编码
|
||||
export const editaddress = (memberId, detailAddress, recipient, tel, provinceId, cityId, districtId) => {
|
||||
|
||||
var data = {
|
||||
memberId: 844350,
|
||||
provinceId: 25,
|
||||
cityId: 36,
|
||||
districtId: 418,
|
||||
detailAddress: '古美路1455弄46号302',
|
||||
recipient: '蒋缘缘2',
|
||||
recipientPhone: '13671516167',
|
||||
zipCode: '214423',
|
||||
default: false,
|
||||
}
|
||||
return fetch('memberAddress?type=add', memberId, 'POST')
|
||||
}
|
||||
|
||||
//删除
|
||||
export const editdelete = (memberId, ids) => {
|
||||
var data = {
|
||||
memberId: memberId,
|
||||
ids: ids,
|
||||
}
|
||||
return fetch('memberAddress?type=delete', data, 'POST')
|
||||
}
|
||||
|
||||
//地址的编辑
|
||||
export const editupdate = (userid,) => {
|
||||
// var data = {
|
||||
// memberId:userid,
|
||||
// id:id,
|
||||
// isDefault:isDefault,
|
||||
// }
|
||||
return fetch('memberAddress?type=update', userid, 'POST')
|
||||
}
|
||||
|
||||
//修改密码
|
||||
export const userchange = (id, pet,address) => {
|
||||
export const userchange = (id, pet, address) => {
|
||||
var data = {
|
||||
id:id,
|
||||
id: id,
|
||||
}
|
||||
return fetch('member?type=update', data, 'POST' )
|
||||
return fetch('member?type=update', data, 'POST')
|
||||
}
|
||||
|
||||
|
||||
@ -620,14 +625,17 @@ export const getOrderList = (user, status) => {
|
||||
|
||||
|
||||
|
||||
//购物车操作
|
||||
export const memberAddress = (type,data) => {
|
||||
return fetch('memberAddress?type='+type, data, 'POST' )
|
||||
}
|
||||
//购物车操作
|
||||
export const memberAddress = (type, data) => {
|
||||
return fetch('memberAddress?type=' + type, data, 'POST')
|
||||
}
|
||||
|
||||
|
||||
//支付宝支付二维码
|
||||
export const generateOrderAlipay = (data) => {
|
||||
return fetch('generateOrderAlipay', data, 'POST' )
|
||||
}
|
||||
|
||||
//微信支付二维码
|
||||
export const updateOrderWX = (data) => {
|
||||
return fetch('updateOrderWX', data, 'POST')
|
||||
}
|
||||
|
||||
//支付宝支付二维码
|
||||
export const generateOrderAlipay = (data) => {
|
||||
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>
|
@ -4,6 +4,11 @@ body {
|
||||
line-height: 1.5;
|
||||
color: #666;
|
||||
}
|
||||
/deep/.el-button--primary {
|
||||
background-color: #e1001a;
|
||||
color:#fff;
|
||||
}
|
||||
|
||||
.rc-menu--xs .rc-screen-reader{
|
||||
left:28%;
|
||||
}
|
||||
|
@ -12,7 +12,6 @@ ul li ol li em strong i {
|
||||
}
|
||||
.rc-main {
|
||||
position: relative;
|
||||
margin-top: 5.25rem;
|
||||
|
||||
.active{
|
||||
border: 2px solid #E2001A;
|
||||
@ -33,7 +32,6 @@ ul li ol li em strong i {
|
||||
width: 100%;
|
||||
margin: 0 auto;
|
||||
overflow: hidden;
|
||||
margin-top: 20px;
|
||||
.ts-scrollable-container{
|
||||
h2{
|
||||
font-weight: bold;
|
||||
@ -384,7 +382,6 @@ border-radius: 100px;
|
||||
width: 100%;
|
||||
margin: 0 auto;
|
||||
overflow: hidden;
|
||||
margin-top: 40px;
|
||||
.ts-scrollable-container{
|
||||
h2{
|
||||
font-weight: bold;
|
||||
@ -441,7 +438,6 @@ cursor: pointer;
|
||||
|
||||
}
|
||||
.rc-main {
|
||||
margin-top: 7.25rem;
|
||||
|
||||
}
|
||||
.ts-scrollable-container{
|
||||
|
@ -459,11 +459,11 @@ export default {
|
||||
font-size: 16px;
|
||||
margin-left: 2px;
|
||||
width:100%;
|
||||
padding-bottom:.25rem;
|
||||
padding-bottom:.5rem;
|
||||
background:url("../assets/image/ico-location.png") no-repeat 98% center;
|
||||
background-size:16px;
|
||||
position:relative;
|
||||
top:.5rem;
|
||||
top:.45rem;
|
||||
padding-left:.875rem;
|
||||
}
|
||||
.ts-area-picker-mobile{
|
||||
|
@ -14,6 +14,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapMutations } from "vuex";
|
||||
export default {
|
||||
data(){
|
||||
return{
|
||||
@ -39,6 +40,7 @@ export default {
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
...mapMutations(["checkIsLogin"]),
|
||||
lianxi(item,index){
|
||||
if(item.title=='在线客服'){
|
||||
var option = {
|
||||
@ -85,10 +87,14 @@ export default {
|
||||
this.gotop = false
|
||||
}
|
||||
}
|
||||
},
|
||||
created(){
|
||||
|
||||
},
|
||||
mounted(){
|
||||
//Check login
|
||||
let usernot=JSON.parse(localStorage.getItem("userInfo"));
|
||||
this.checkIsLogin();
|
||||
let usernot = this.$store.state.userInfo;
|
||||
//console.log(usernot);
|
||||
if(usernot==null ||usernot==undefined){
|
||||
this.loginornot=true
|
||||
|
@ -1,9 +1,9 @@
|
||||
<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-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>
|
||||
</el-breadcrumb>
|
||||
</div>
|
||||
@ -11,171 +11,73 @@
|
||||
|
||||
<script>
|
||||
import { mapState, mapMutations } from "vuex";
|
||||
|
||||
import tabs from "~/components/tabs.vue";
|
||||
export default {
|
||||
props:["crumbs"],
|
||||
props:["crumbs","crumbStyle"],
|
||||
name:"crumbs",
|
||||
data() {
|
||||
return {
|
||||
homepageName:'首页'
|
||||
displayData:[],
|
||||
homepageName:'定制营养方案',
|
||||
nameMapping:{
|
||||
'/productdetails/productlist':'产品分类',
|
||||
'/usersearch/search':'产品搜索',
|
||||
'/personal/mypersonal':'个人中心',
|
||||
'/personal/usermember/':'会员权益',
|
||||
'/personal/integral/':'积分明细',
|
||||
'/personal/settlement/':'订单确认',
|
||||
'/myorder/userrecord/':'购物车'
|
||||
},
|
||||
};
|
||||
},
|
||||
created(){
|
||||
if(this.showTab != false)
|
||||
this.showTab=true;
|
||||
this.build();
|
||||
},
|
||||
watch: {
|
||||
crumbs(val) {
|
||||
this.crumbs = val;
|
||||
this.build();
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
|
||||
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>
|
||||
|
||||
<style lang="less" scoped>
|
||||
.crumbs{
|
||||
width: 93%;
|
||||
margin: 0 auto;
|
||||
display: flex;
|
||||
height: 40px;
|
||||
align-items: center;
|
||||
margin-top: 70px;
|
||||
/deep/.el-breadcrumb__inner.is-link:hover {
|
||||
color:#E2001A;
|
||||
}
|
||||
.tags-scroll-content {
|
||||
position: relative;
|
||||
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;
|
||||
}
|
||||
}
|
||||
.ts-crumbs{
|
||||
padding-left:1.25rem;
|
||||
}
|
||||
</style>
|
||||
|
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>
|
||||
<nuxt-link to="/">返回首页</nuxt-link>
|
||||
</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}) => {
|
||||
route.matched.forEach((item, index) => {
|
||||
item.meta.title = route.meta[index].title || '';
|
||||
item.meta.redirect = route.meta[index].redirect || '';//设置重定向
|
||||
})
|
||||
}
|
||||
}
|
@ -1,10 +1,10 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="rc-header">
|
||||
<Myheader></Myheader>
|
||||
</div>
|
||||
<div class="rc-main">
|
||||
<tabs></tabs>
|
||||
<Myheader></Myheader>
|
||||
<div class="rc-top"></div>
|
||||
<tabs :crumbs="crumbs"></tabs>
|
||||
|
||||
<div class="rc-main rc-max-width--xl">
|
||||
<div class="cart-list">
|
||||
<div class="header">
|
||||
<div class="list-left">
|
||||
@ -114,12 +114,21 @@
|
||||
import Myheader from "~/components/header.vue";
|
||||
import MyFooter from '~/components/rc-footer.vue'
|
||||
import tabs from "@/components/tabs.vue";
|
||||
import { mapMutations } from "vuex";
|
||||
import { isexistCart, generateOrderWX, deleteCart } from "../../ajax/getData";
|
||||
export default {
|
||||
middleware: "metaTitle",
|
||||
meta: { title: "购物车" },
|
||||
data() {
|
||||
return {
|
||||
crumbs:[
|
||||
{
|
||||
path:'/productdetails/productlist/',
|
||||
},
|
||||
{
|
||||
path:'/myorder/userrecord/'
|
||||
}
|
||||
],
|
||||
ordersum: 1,
|
||||
usercheckbox: false,
|
||||
shopnum: 0,
|
||||
@ -174,26 +183,26 @@ export default {
|
||||
},
|
||||
mounted() {
|
||||
this.carmessage();
|
||||
this.checkIsLogin();
|
||||
},
|
||||
|
||||
components: {
|
||||
Myheader,
|
||||
tabs,
|
||||
MyFooter,
|
||||
MyFooter
|
||||
},
|
||||
methods: {
|
||||
//请求猫
|
||||
|
||||
...mapMutations(["checkIsLogin"]),
|
||||
async carmessage() {
|
||||
let user = JSON.parse(localStorage.getItem("userInfo"));
|
||||
let user = this.$store.state.userInfo;
|
||||
this.userid = user.data.id;
|
||||
let data = await isexistCart(user.data.id);
|
||||
this.cartData = data;
|
||||
// this.goldmedal = data;
|
||||
},
|
||||
async userjie(list) {
|
||||
let user = JSON.parse(localStorage.getItem("userInfo"));
|
||||
console.log(user);
|
||||
let user = this.$store.state.userInfo;
|
||||
this.userid = user.data.id;
|
||||
let data = await generateOrderWX(list);
|
||||
if (data) {
|
||||
@ -201,7 +210,6 @@ export default {
|
||||
type: "warning",
|
||||
message: data.msg,
|
||||
});
|
||||
console.log(data);
|
||||
this.$router.push({
|
||||
path: "/personal/settlement",
|
||||
query: {
|
||||
@ -209,12 +217,11 @@ export default {
|
||||
},
|
||||
});
|
||||
}
|
||||
console.log(data);
|
||||
},
|
||||
|
||||
//删除购物车
|
||||
async deletsmessage(productCode) {
|
||||
let user = JSON.parse(localStorage.getItem("userInfo"));
|
||||
let user = this.$store.state.userInfo;
|
||||
this.userid = user.data.id;
|
||||
let data = await deleteCart( productCode);
|
||||
if (data) {
|
||||
@ -287,7 +294,6 @@ export default {
|
||||
if (this.ys1 == false) {
|
||||
this.$nextTick(() => {
|
||||
this.userdelete = "删除";
|
||||
console.log(this.userdelete);
|
||||
});
|
||||
} else if (this.ys1 == true) {
|
||||
this.$nextTick(() => {
|
||||
@ -504,10 +510,6 @@ export default {
|
||||
}
|
||||
}
|
||||
.rc-main {
|
||||
width: 92%;
|
||||
margin: 0 auto;
|
||||
padding-top: 60px;
|
||||
max-width: 1400px;
|
||||
.cart-list {
|
||||
width: 100%;
|
||||
border: 1px solid #d7d7d7;
|
||||
@ -775,8 +777,8 @@ export default {
|
||||
width: 100%;
|
||||
}
|
||||
ul {
|
||||
margin-top: -32px;
|
||||
margin-left: 140px;
|
||||
margin-top: -2rem;
|
||||
margin-left: 9.75rem;
|
||||
width: 50%;
|
||||
.del {
|
||||
display: none;
|
||||
@ -796,6 +798,7 @@ export default {
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
z-index: 10;
|
||||
margin-bottom:0;
|
||||
.rc-shop {
|
||||
display: none;
|
||||
}
|
||||
|
@ -2,6 +2,7 @@
|
||||
<div>
|
||||
<Myheader></Myheader>
|
||||
<div class="rc-top"></div>
|
||||
<tabs :crumbs="crumbs"></tabs>
|
||||
<div class="rc-max-width--xl rc-padding-y--md">
|
||||
<ul>
|
||||
<li v-for="(item,index) in userrecord" :key="index">
|
||||
@ -36,6 +37,14 @@ import Myheader from '~/components/header.vue'
|
||||
export default {
|
||||
data(){
|
||||
return{
|
||||
crumbs:[
|
||||
{
|
||||
path:'/personal/mypersonal',
|
||||
},
|
||||
{
|
||||
path:'/personal/integral/',
|
||||
}
|
||||
],
|
||||
userrecord:[
|
||||
{
|
||||
title:'日期',
|
||||
|
@ -3,6 +3,7 @@
|
||||
<Myheader></Myheader>
|
||||
<!-- <tabs></tabs> -->
|
||||
<div class="rc-top"></div>
|
||||
<tabs :crumbs="crumbs" :crumbStyle="`padding-left:0;`"></tabs>
|
||||
<div class="rc-layout-container rc-one-column rc-full-width ts-mypersonal">
|
||||
<div class="rc-column">
|
||||
<!-- <div class="rc-title">
|
||||
@ -152,16 +153,21 @@ export default {
|
||||
meta: {title: '个人中心'},
|
||||
data() {
|
||||
return {
|
||||
userlog:false,
|
||||
islogin:false,
|
||||
dialogInfo1:false,
|
||||
userid:null,
|
||||
usertitle:'',
|
||||
rcvalue:5000,
|
||||
usermessage:'关注皇家爱宠荟,修改个人资料',
|
||||
userimage:require("../../assets/image/rc-new.png"),
|
||||
userlogin:'登录注册',
|
||||
userorder: "新手铲屎官",
|
||||
crumbs:[
|
||||
{
|
||||
path:'/personal/mypersonal',
|
||||
}
|
||||
],
|
||||
userlog:false,
|
||||
islogin:false,
|
||||
dialogInfo1:false,
|
||||
userid:null,
|
||||
usertitle:'',
|
||||
rcvalue:5000,
|
||||
usermessage:'关注皇家爱宠荟,修改个人资料',
|
||||
userimage:require("../../assets/image/rc-new.png"),
|
||||
userlogin:'登录注册',
|
||||
userorder: "新手铲屎官",
|
||||
prefecture: [
|
||||
{
|
||||
title: "待付款",
|
||||
|
@ -10,7 +10,7 @@ ul li ol li em strong i {
|
||||
|
||||
|
||||
.settlement {
|
||||
padding-top: 60px;
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -465,7 +465,9 @@ ul li ol li em strong i {
|
||||
display: none;
|
||||
border: none;
|
||||
padding: 0;
|
||||
|
||||
&.show {
|
||||
display:block;
|
||||
}
|
||||
&.active {
|
||||
display: block;
|
||||
border: none;
|
||||
|
@ -1,9 +1,7 @@
|
||||
<template>
|
||||
<div class="settlement">
|
||||
<Myheader></Myheader>
|
||||
<div class="rc-main">
|
||||
<tabs></tabs>
|
||||
</div>
|
||||
<div class="rc-top"></div>
|
||||
<div class="rc_contline"></div>
|
||||
<div class="rc-main">
|
||||
<div class="address-list">
|
||||
@ -28,7 +26,7 @@
|
||||
<span>{{ item.address }}</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="mypersonal add">
|
||||
<div class="mypersonal add" :class="useraddress.length>0?'':'show'">
|
||||
<div
|
||||
class="my-delivery"
|
||||
@click="addAddress"
|
||||
@ -67,10 +65,12 @@
|
||||
<span>配送方式:</span>
|
||||
<i>{{ shopprice.price }}</i>
|
||||
</li>
|
||||
<!--
|
||||
<li>
|
||||
<span> 活动促销:</span>
|
||||
<i>{{ shopprice.distribution }}</i>
|
||||
</li>
|
||||
-->
|
||||
<li>
|
||||
<span>商品总价:</span>
|
||||
<i class="red">{{ sumPrice }}</i>
|
||||
@ -97,7 +97,12 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<el-dialog :visible.sync="dialogAdd" class="diallog_width" width="'100%" :title="dialogAddTitle">
|
||||
<el-dialog
|
||||
:visible.sync="dialogAdd"
|
||||
class="diallog_width"
|
||||
width="'100%"
|
||||
:title="dialogAddTitle"
|
||||
>
|
||||
<div class="tc dl_cont" v-if="dialogAdd">
|
||||
<myAddress
|
||||
@isClose="dialogCtrl"
|
||||
@ -109,9 +114,9 @@
|
||||
:visible.sync="dialogPopList"
|
||||
class="diallog_width"
|
||||
width="'100%"
|
||||
title="选择收货地址"
|
||||
title="选择收货地址"
|
||||
>
|
||||
<div class="tc dl_cont" style="padding-bottom: 50px;position: relative;">
|
||||
<div class="tc dl_cont" style="padding-bottom: 50px; position: relative">
|
||||
<div class="pop_list">
|
||||
<el-row
|
||||
class="mypersonal"
|
||||
@ -120,17 +125,20 @@
|
||||
:class="item.isDefault ? 'active' : ''"
|
||||
>
|
||||
<el-col :span="4"
|
||||
><input type="checkbox" v-model="item.checked" @click="selectPopAddress(item)"
|
||||
><input
|
||||
type="checkbox"
|
||||
v-model="item.checked"
|
||||
@click="selectPopAddress(item)"
|
||||
/></el-col>
|
||||
<el-col :span="16" class="tl">
|
||||
<div >
|
||||
<div>
|
||||
<p class="inline">{{ item.recipient }}</p>
|
||||
<p class="inline">{{ item.recipientPhone }}</p>
|
||||
</div>
|
||||
<p> {{ item.address }}</p>
|
||||
<p>{{ item.address }}</p>
|
||||
</el-col>
|
||||
<el-col :span="4">
|
||||
<i @click="editAddress(item)" class="el-icon-edit"></i>
|
||||
<i @click="editAddress(item)" class="el-icon-edit"></i>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div class="popnewaddr">
|
||||
@ -154,8 +162,16 @@ export default {
|
||||
meta: { title: "订单结算" },
|
||||
data() {
|
||||
return {
|
||||
crumbs:[
|
||||
{
|
||||
path:'/productdetails/productlist/',
|
||||
},
|
||||
{
|
||||
path:'/personal/settlement'
|
||||
}
|
||||
],
|
||||
goldmedal: [],
|
||||
dialogAddTitle:"",
|
||||
dialogAddTitle: "",
|
||||
addressstype: null,
|
||||
orderstatus: "",
|
||||
userisdelivery: "待收货",
|
||||
@ -213,7 +229,7 @@ export default {
|
||||
this.useraddress = data;
|
||||
},
|
||||
editAddress(item) {
|
||||
this.dialogAddTitle='修改收货地址'
|
||||
this.dialogAddTitle = "修改收货地址";
|
||||
this.editAddressData = {
|
||||
memberId: item.memberId,
|
||||
name: item.recipient,
|
||||
@ -222,7 +238,7 @@ export default {
|
||||
id: item.id,
|
||||
cityId: item.cityId,
|
||||
districtId: item.districtId,
|
||||
provinceId:item.provinceId,
|
||||
provinceId: item.provinceId,
|
||||
provinceName: item.provinceName,
|
||||
cityName: item.cityName,
|
||||
districtName: item.districtName,
|
||||
@ -231,7 +247,7 @@ export default {
|
||||
this.dialogAdd = true;
|
||||
},
|
||||
addAddress() {
|
||||
this.dialogAddTitle='新增收货地址'
|
||||
this.dialogAddTitle = "新增收货地址";
|
||||
this.editAddressData = {};
|
||||
this.dialogAdd = true;
|
||||
},
|
||||
@ -239,9 +255,9 @@ export default {
|
||||
this.useraddress.forEach((item) => {
|
||||
if (item.id == cur.id) {
|
||||
item.isDefault = true;
|
||||
item.checked=true
|
||||
item.checked = true;
|
||||
} else {
|
||||
item.checked=false
|
||||
item.checked = false;
|
||||
item.isDefault = false;
|
||||
}
|
||||
});
|
||||
@ -250,9 +266,9 @@ export default {
|
||||
this.useraddress.forEach((item) => {
|
||||
if (item.id == cur.id) {
|
||||
item.isDefault = true;
|
||||
item.checked=true
|
||||
item.checked = true;
|
||||
} else {
|
||||
item.checked=false
|
||||
item.checked = false;
|
||||
item.isDefault = false;
|
||||
}
|
||||
});
|
||||
@ -268,7 +284,9 @@ export default {
|
||||
let orderAddress = this.useraddress.filter((item) => item.isDefault);
|
||||
let postData = [];
|
||||
this.goldmedal.forEach((item) => {
|
||||
let basePoint = (item.basePoint?item.basePoint:0);
|
||||
let oneProduct = {
|
||||
basePoint:basePoint,
|
||||
productName: item.productName,
|
||||
buyCount: item.buyCount,
|
||||
productId: item.productCode,
|
||||
@ -344,7 +362,9 @@ export default {
|
||||
postData[0].orderAddress.addressUserName +
|
||||
" " +
|
||||
postData[0].orderAddress.addressPhoneNumber,
|
||||
wxPay: "weixin://wxpay/bizpayurl?pr=4RJbokxzz",
|
||||
// wxPay: "weixin://wxpay/bizpayurl?pr=4RJbokxzz",
|
||||
// wxPay: "weixin://wxpay/bizpayurl?pr=4RJbokxzz",
|
||||
wxPay: res.msg,
|
||||
};
|
||||
this.$router.push({
|
||||
path: "/personal/userpay",
|
||||
@ -352,7 +372,7 @@ export default {
|
||||
userPayData: JSON.stringify(userPayData),
|
||||
},
|
||||
});
|
||||
}else{
|
||||
} else {
|
||||
this.$message({
|
||||
type: "warning",
|
||||
message: res.msg,
|
||||
@ -384,9 +404,7 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
|
||||
@import url("../../assets/css/global.less");
|
||||
//@import url("../../assets/css/global.less");
|
||||
@import "./settlement.less";
|
||||
// @import url("../../assets/css/settlement.less");
|
||||
|
||||
</style>
|
@ -2,7 +2,8 @@
|
||||
<div>
|
||||
<Myheader></Myheader>
|
||||
<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-center" >
|
||||
@ -53,15 +54,24 @@
|
||||
<script>
|
||||
import Myheader from '~/components/header.vue'
|
||||
import Myfooter from '~/components/rc-footer.vue'
|
||||
import tabs from "~/components/tabs.vue";
|
||||
export default {
|
||||
data(){
|
||||
|
||||
return{
|
||||
banners:[
|
||||
{src:require("../../assets/image/rc-new.png"),link:""},
|
||||
{src:require("../../assets/image/rc-new1.png"),link:""},
|
||||
{src:require("../../assets/image/rc-new2.png"),link:""},
|
||||
],
|
||||
crumbs:[
|
||||
{
|
||||
path:'/personal/mypersonal',
|
||||
},
|
||||
{
|
||||
path:'/personal/usermember/',
|
||||
}
|
||||
],
|
||||
banners:[
|
||||
{src:require("../../assets/image/rc-new.png"),link:""},
|
||||
{src:require("../../assets/image/rc-new1.png"),link:""},
|
||||
{src:require("../../assets/image/rc-new2.png"),link:""},
|
||||
],
|
||||
userid:null,
|
||||
userimage:require("../../assets/image/rc-new.png"),
|
||||
userorder:'新手铲屎官',
|
||||
@ -251,7 +261,8 @@ methods:{
|
||||
},
|
||||
components:{
|
||||
Myheader,
|
||||
Myfooter
|
||||
Myfooter,
|
||||
tabs
|
||||
},
|
||||
mounted(){
|
||||
console.log(this.$refs.userblock);
|
||||
|
@ -1,8 +1,8 @@
|
||||
<template>
|
||||
<div class="page_modules">
|
||||
<Myheader></Myheader>
|
||||
<div class="rc-top rc-md-up"></div>
|
||||
<div class="cont_modules">
|
||||
<tabs></tabs>
|
||||
<el-row class="order_info">
|
||||
<el-col :span="6" class="ph_hidden">
|
||||
<ul class="li_inline">
|
||||
@ -19,7 +19,7 @@
|
||||
<el-col :span="6" class="ready_right">
|
||||
<div class="inline_right">
|
||||
<p>付款金额:</p>
|
||||
<p class="price">{{ userPayData.userprice }}</p>
|
||||
<p class="price">¥{{ userPayData.userprice }}</p>
|
||||
</div>
|
||||
<div class="inline_right">
|
||||
<p>收货信息:</p>
|
||||
@ -93,18 +93,20 @@ export default {
|
||||
return {
|
||||
activeIndex: 0,
|
||||
isSucess: false,
|
||||
dialogSuccess: false,
|
||||
paytype: "微信",
|
||||
userpaystype: [
|
||||
{
|
||||
paytype: "微信",
|
||||
payimage: require("../../assets/pay/wx.png"),
|
||||
},
|
||||
/*
|
||||
{
|
||||
paytype: "支付宝",
|
||||
payimage: require("../../assets/pay/zfb.png"),
|
||||
},
|
||||
*/
|
||||
],
|
||||
dialogSuccess: true,
|
||||
dialogFail: false,
|
||||
userPayData: {},
|
||||
qrtext:'',
|
||||
@ -163,15 +165,18 @@ export default {
|
||||
}
|
||||
},
|
||||
//支付监听
|
||||
async updateOrderWX() {
|
||||
let res = await updateOrderWX();
|
||||
|
||||
async payOrderWX() {
|
||||
let res = await updateOrderWX(this.userPayData.orderId);
|
||||
if (res.success) {
|
||||
this.qrtext = '成功加入群的二维码';
|
||||
this.dialogSuccess = true;
|
||||
clearInterval(this.time);
|
||||
} else {
|
||||
|
||||
} else if (res.fail) {
|
||||
this.dialogFail = true;
|
||||
clearInterval(this.time);
|
||||
|
||||
}else{
|
||||
this.payOrderWX()
|
||||
}
|
||||
},
|
||||
},
|
||||
@ -311,7 +316,7 @@ export default {
|
||||
}
|
||||
}
|
||||
.paycord {
|
||||
display: none;
|
||||
//display: none;
|
||||
}
|
||||
}
|
||||
</style>
|
@ -2,8 +2,8 @@
|
||||
<div>
|
||||
<div class="user">
|
||||
<Myheader></Myheader>
|
||||
<unlogin></unlogin>
|
||||
<tabs></tabs>
|
||||
<div class="rc-top"></div>
|
||||
<tabs :crumbs="crumbs"></tabs>
|
||||
<div class="online" id="fixed-catbar-seperator"></div>
|
||||
<div class="rc-top"></div>
|
||||
<div
|
||||
@ -321,10 +321,24 @@ export default {
|
||||
stopIndex++;
|
||||
}
|
||||
}
|
||||
productAttachmentList = newlist[0].productAttachmentList;
|
||||
if(curItem.productAttachmentList != undefined)
|
||||
productAttachmentList = curItem.productAttachmentList;
|
||||
if(curItem.productName == undefined)
|
||||
curItem = newlist[0];
|
||||
userbuy = true;
|
||||
}
|
||||
if(!curItem || curItem.productName == undefined)
|
||||
throw new Error("商品信息错误");
|
||||
let crumbs = [
|
||||
{
|
||||
path:'/productdetails/productlist/',
|
||||
},
|
||||
{
|
||||
title: curItem.productName,
|
||||
}
|
||||
];
|
||||
return {
|
||||
crumbs,
|
||||
activeIndexa,
|
||||
curItem,
|
||||
newlist,
|
||||
@ -568,7 +582,8 @@ export default {
|
||||
item.picFile,
|
||||
item.productName,
|
||||
item.basePrice,
|
||||
item.specifications
|
||||
item.specifications,
|
||||
item.leftAllotment
|
||||
);
|
||||
if (data) {
|
||||
this.productlist = data;
|
||||
@ -629,6 +644,8 @@ export default {
|
||||
this.activeIndexa = index;
|
||||
this.curItem = item;
|
||||
this.productAttachmentList = item.productAttachmentList;
|
||||
this.crumbs.pop();
|
||||
this.crumbs.push({title: item.productName});
|
||||
},
|
||||
},
|
||||
|
||||
@ -637,6 +654,5 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
@import url("../../assets/css/global.less");
|
||||
@import url("../../assets/css/producted.less");
|
||||
</style>
|
@ -325,7 +325,6 @@ export default {
|
||||
crumbs:[
|
||||
{
|
||||
path:'/productdetails/productlist/',
|
||||
title:'产品列表',
|
||||
}
|
||||
],
|
||||
value: "",
|
||||
|
@ -1,11 +1,8 @@
|
||||
<template>
|
||||
<div>
|
||||
<transition name="fade">
|
||||
<div class="userloding" v-show="isLoading"></div>
|
||||
</transition>
|
||||
|
||||
<Myheader></Myheader>
|
||||
<div class="rc-top"></div>
|
||||
<tabs :crumbs="crumbs"></tabs>
|
||||
<div class="rc-max-width--xl rc-main">
|
||||
<div class="usersearch">
|
||||
<div class="form-search">
|
||||
@ -329,13 +326,18 @@
|
||||
import Myheader from "~/components/header.vue";
|
||||
import MyFooter from '~/components/rc-footer.vue'
|
||||
import FixRight from "~/components/fixed-right.vue";
|
||||
import tabs from "~/components/tabs.vue";
|
||||
import { biaome, userstype, searchchanpin, userquery } from "../../ajax/getData";
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
value: "",
|
||||
crumbs:[
|
||||
{
|
||||
path:'/usersearch/search/',
|
||||
}
|
||||
],
|
||||
isLoading: true,
|
||||
|
||||
userserachlist: [
|
||||
{
|
||||
categoryName: [], //专区
|
||||
@ -516,7 +518,8 @@ export default {
|
||||
components: {
|
||||
Myheader,
|
||||
MyFooter,
|
||||
FixRight
|
||||
FixRight,
|
||||
tabs
|
||||
},
|
||||
mounted() {
|
||||
this.usetmessage();
|
||||
|
Loading…
Reference in New Issue
Block a user