mirror of
https://gitee.com/lab1024/smart-admin.git
synced 2025-10-02 10:16:38 +08:00
Merge branch 'sit-Carl' of https://gitee.com/carl_Ming_1/smart-admin into sit-Carl-V3
This commit is contained in:
commit
a7f61f9fb4
@ -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,41 +56,43 @@ 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 = {
|
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
|
||||||
}
|
}
|
||||||
return fetch('/insertCartProductInfo', data,'POST')
|
return fetch('/insertCartProductInfo', data, 'POST')
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 是否存在购物车
|
* 是否存在购物车
|
||||||
*/
|
*/
|
||||||
export const isexistCart = (id, pet,address) => {
|
export const isexistCart = (id, pet, address) => {
|
||||||
var data = { }
|
var data = {}
|
||||||
return fetch('getCartProductInfo?memberId='+id,data,'POST')
|
return fetch('getCartProductInfo?memberId=' + id, data, 'POST')
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 删除购物车
|
* 删除购物车
|
||||||
*/
|
*/
|
||||||
export const deleteCart = ( productCode) => {
|
export const deleteCart = ( productCode) => {
|
||||||
|
debugger;
|
||||||
var data = {
|
var data = {
|
||||||
productCode:productCode
|
productCode
|
||||||
}
|
}
|
||||||
return fetch('cancelCartProductInfo',data,'POST')
|
return fetch('cancelCartProductInfo',productCode,'POST')
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 购物车批量提交
|
* 购物车批量提交
|
||||||
*/
|
*/
|
||||||
export const mostAddClass = (id) => {
|
export const mostAddClass = (id) => {
|
||||||
return fetch('/api/mostAddClass/', {id})
|
return fetch('/api/mostAddClass/', { id })
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* 删除购物车
|
* 删除购物车
|
||||||
@ -106,68 +108,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",
|
||||||
@ -177,84 +179,82 @@ 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 = (stype, curPage,curRow) => {
|
export const userque = (goodsName, 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)
|
if(goodsName)
|
||||||
queryTail = '?stype='+queryTail+'&'+queryTail;
|
queryTail = '?goodsName='+goodsName;
|
||||||
else
|
|
||||||
queryTail = '?'+queryTail;
|
|
||||||
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);
|
|
||||||
var data = {
|
|
||||||
page:1,
|
|
||||||
row:10
|
|
||||||
}
|
}
|
||||||
|
str = str.substr(0, str.length - 1);
|
||||||
return fetch('product/query?petType='+usertype+str+queryTail, data, 'POST' )
|
var data = {
|
||||||
|
page: 1,
|
||||||
|
row: 10
|
||||||
|
}
|
||||||
|
|
||||||
|
return fetch('product/query?petType=' + usertype + str + queryTail, data, 'POST')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -269,58 +269,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 +329,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')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -339,20 +339,20 @@ export const memberAccount = (stype) => {
|
|||||||
export const ordermaster = (stype) => {
|
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')
|
||||||
}
|
}
|
||||||
|
|
||||||
//微信支付
|
//微信支付
|
||||||
export const payOrderWX = (stype) => {
|
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 +361,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 +371,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')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -400,11 +400,11 @@ export const dogquery = (productCode,type) => {
|
|||||||
export const oncequery = (productCode) => {
|
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 +412,156 @@ 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' )
|
|
||||||
}
|
|
||||||
|
|
||||||
//可用的优惠券
|
|
||||||
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' )
|
|
||||||
}
|
}
|
||||||
//用户所有的优惠券
|
return fetch('memberAddress?type=getAll', data, 'POST')
|
||||||
export const allConfig = (memberId,channelSecurity,mobile) => {
|
}
|
||||||
var data = {
|
|
||||||
}
|
|
||||||
return fetch('couponConfig?type=getAll', data, 'POST' )
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
//用户领取优惠券
|
//可用的优惠券
|
||||||
export const getConfig = (memberId,couponId) => {
|
export const alldiscount = (memberId, channelSecurity, mobile) => {
|
||||||
var data = {
|
var data = {
|
||||||
memberId:memberId,
|
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' )
|
|
||||||
}
|
}
|
||||||
|
return fetch('couponConfig?type=getAll', data, 'POST')
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
//地址的添加 //id/详细地址/ 收货人姓名/收货人电话号码/省份id/城市id/区域编码
|
//用户领取的优惠券
|
||||||
export const editaddress = (memberId, detailAddress,recipient,tel,provinceId,cityId,districtId) => {
|
export const getdraw = (mobile, states) => {
|
||||||
|
var data = {
|
||||||
var data = {
|
mobile: mobile,
|
||||||
memberId:844350,
|
status: states
|
||||||
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' )
|
|
||||||
}
|
}
|
||||||
|
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,) => {
|
export const generateOrderWX = (list) => {
|
||||||
// var data = {
|
var data = [{
|
||||||
// memberId:userid,
|
|
||||||
// id:id,
|
|
||||||
// isDefault:isDefault,
|
}]
|
||||||
// }
|
return fetch('generateOrderWX', list, 'POST')
|
||||||
return fetch('memberAddress?type=update', userid, '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 = {
|
var data = {
|
||||||
id:id,
|
id: id,
|
||||||
}
|
}
|
||||||
return fetch('member?type=update', data, 'POST' )
|
return fetch('member?type=update', data, 'POST')
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -615,14 +615,17 @@ 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) => {
|
||||||
export const generateOrderAlipay = (data) => {
|
return fetch('updateOrderWX', data, 'POST')
|
||||||
return fetch('generateOrderAlipay', data, 'POST' )
|
}
|
||||||
}
|
|
||||||
|
//支付宝支付二维码
|
||||||
|
export const generateOrderAlipay = (data) => {
|
||||||
|
return fetch('generateOrderAlipay', data, 'POST')
|
||||||
|
}
|
||||||
|
@ -22,8 +22,9 @@
|
|||||||
.rc-button{
|
.rc-button{
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: flex-end;
|
||||||
width: 375px;
|
width: 100%;
|
||||||
|
|
||||||
height: 80px;
|
height: 80px;
|
||||||
background: #FFFFFF;
|
background: #FFFFFF;
|
||||||
box-shadow: 0px -3px 6px rgba(0, 0, 0, 0.1);
|
box-shadow: 0px -3px 6px rgba(0, 0, 0, 0.1);
|
||||||
@ -38,6 +39,7 @@ opacity: 1;
|
|||||||
border-radius: 30px;
|
border-radius: 30px;
|
||||||
background: #E2001A;
|
background: #E2001A;
|
||||||
display: flex;
|
display: flex;
|
||||||
|
margin-right: 20px;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
|
@ -1,12 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="crumbs" v-if="showTab">
|
<div class="crumbs" v-if="showTab">
|
||||||
<el-breadcrumb separator-class="el-icon-arrow-right">
|
<el-breadcrumb separator-class="el-icon-arrow-right">
|
||||||
<el-breadcrumb-item :to=item.path v-for="(item, index) in titleLists"
|
<el-breadcrumb-item to="/" >{{ this.homepageName }}</el-breadcrumb-item>
|
||||||
:key="index">{{ item.meta.title }}</el-breadcrumb-item>
|
|
||||||
<!-- <el-breadcrumb-item>商品管理</el-breadcrumb-item>
|
<el-breadcrumb-item :to=item.path v-for="(item, index) in crumbs"
|
||||||
<el-breadcrumb-item>商品分类</el-breadcrumb-item> -->
|
:key="index">{{ item.title }}</el-breadcrumb-item>
|
||||||
</el-breadcrumb>
|
</el-breadcrumb>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -14,93 +13,25 @@
|
|||||||
import { mapState, mapMutations } from "vuex";
|
import { mapState, mapMutations } from "vuex";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
|
props:["crumbs"],
|
||||||
|
name:"crumbs",
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
title: "",
|
homepageName:'首页'
|
||||||
path: "",
|
};
|
||||||
titleLists: [
|
},
|
||||||
{
|
created(){
|
||||||
path: '/',
|
if(this.showTab != false)
|
||||||
name: 'index',
|
this.showTab=true;
|
||||||
meta:{
|
},
|
||||||
title: '首页',
|
watch: {
|
||||||
|
},
|
||||||
}
|
mounted() {
|
||||||
}
|
},
|
||||||
|
|
||||||
],
|
|
||||||
showTab: true,
|
|
||||||
isShow: true,
|
|
||||||
};
|
|
||||||
},
|
|
||||||
|
|
||||||
|
|
||||||
watch: {
|
|
||||||
$route() {
|
|
||||||
this.setTitle();
|
|
||||||
},
|
|
||||||
},
|
|
||||||
mounted() {
|
|
||||||
this.setTitle();
|
|
||||||
},
|
|
||||||
|
|
||||||
methods: {
|
|
||||||
...mapMutations(["changemessage",'selectMenu']),
|
|
||||||
setTitle() {
|
|
||||||
console.log(this.$route.matched);
|
|
||||||
console.log(this.titleLists);
|
|
||||||
let userinfo=[]
|
|
||||||
|
|
||||||
|
|
||||||
let saveUserInfo={
|
|
||||||
path:'admin',
|
|
||||||
name:'1',
|
|
||||||
meta:'b341181c-aced-11e9-89bf-00163e0e8daf',
|
|
||||||
|
|
||||||
}
|
|
||||||
userinfo.push(this.$route.matched);
|
|
||||||
let list=[];
|
|
||||||
console.log(userinfo);
|
|
||||||
userinfo.map(item=>{
|
|
||||||
console.log(item);
|
|
||||||
list=item;
|
|
||||||
})
|
|
||||||
console.log(list);
|
|
||||||
let anlist={
|
|
||||||
path:'admin',
|
|
||||||
name:'1',
|
|
||||||
meta:'b341181c-aced-11e9-89bf-00163e0e8daf',
|
|
||||||
}
|
|
||||||
list.forEach(element=>{
|
|
||||||
console.log(element);
|
|
||||||
anlist=element
|
|
||||||
})
|
|
||||||
for(let i in list){
|
|
||||||
saveUserInfo.path=list[i].path;
|
|
||||||
saveUserInfo.name=list[i].name;
|
|
||||||
saveUserInfo.meta=list[i].meta;
|
|
||||||
}
|
|
||||||
console.log(saveUserInfo);
|
|
||||||
// store.commit('se', current.name);
|
|
||||||
this.selectMenu({ data: saveUserInfo });
|
|
||||||
console.log(this.$store.state.tabsList);
|
|
||||||
this.titleLists=this.$store.state.tabsList;
|
|
||||||
// console.log(userlisa);
|
|
||||||
console.log(this.titleLists);
|
|
||||||
},
|
|
||||||
},
|
|
||||||
// created(){
|
|
||||||
// let user=this.$store.state.tabsList;
|
|
||||||
// this.tags=user;
|
|
||||||
// console.log(this.tags);
|
|
||||||
// console.log(user);
|
|
||||||
// console.log(this.$store.state.tabsList)
|
|
||||||
// },
|
|
||||||
|
|
||||||
// mounted(){
|
|
||||||
|
|
||||||
// }
|
|
||||||
|
|
||||||
|
methods: {
|
||||||
|
...mapMutations(["changemessage",'selectMenu'])
|
||||||
|
}
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
@ -1164,7 +1164,7 @@
|
|||||||
}
|
}
|
||||||
window.addEventListener("scroll", this.handleScroll, true);
|
window.addEventListener("scroll", this.handleScroll, true);
|
||||||
this.userchufang();//查询处方粮商品信息
|
this.userchufang();//查询处方粮商品信息
|
||||||
|
|
||||||
this.catmessage();//查询猫的信息
|
this.catmessage();//查询猫的信息
|
||||||
this.catclickGan();
|
this.catclickGan();
|
||||||
this.catclickShi();
|
this.catclickShi();
|
||||||
@ -1468,9 +1468,9 @@
|
|||||||
this.dataLoaded=false;
|
this.dataLoaded=false;
|
||||||
let data=[];
|
let data=[];
|
||||||
if(stype==undefined||stype==null){
|
if(stype==undefined||stype==null){
|
||||||
data = await biaomessage(0,'',1,6);
|
data = await biaomessage(0,'',1,12);
|
||||||
}else{
|
}else{
|
||||||
data = await biaomessage(this.userserachlist,'',1,6);
|
data = await biaomessage(this.userserachlist,'',1,12);
|
||||||
}
|
}
|
||||||
if(data){
|
if(data){
|
||||||
let userlist=[];
|
let userlist=[];
|
||||||
@ -1546,12 +1546,14 @@
|
|||||||
},
|
},
|
||||||
|
|
||||||
//请求处方量信息数据
|
//请求处方量信息数据
|
||||||
async userchufang() {
|
async userchufang(item) {
|
||||||
|
if(!item)
|
||||||
|
item = this.discounchufang[0].title;
|
||||||
this.dataLoaded=false;
|
this.dataLoaded=false;
|
||||||
let list=[];
|
let list=[];
|
||||||
let data = await userque();
|
let data = await userque(item,1,8);
|
||||||
if(data){
|
if(data){
|
||||||
list=data.slice(0,6);
|
list=data.slice(0,8);
|
||||||
this.processinformation=list;
|
this.processinformation=list;
|
||||||
this.chufanlist=data;
|
this.chufanlist=data;
|
||||||
this.dataLoaded=true;
|
this.dataLoaded=true;
|
||||||
@ -1560,15 +1562,17 @@
|
|||||||
//点击请求处方量标签信息数据
|
//点击请求处方量标签信息数据
|
||||||
async userquery(item) {
|
async userquery(item) {
|
||||||
this.dataLoaded=false;
|
this.dataLoaded=false;
|
||||||
|
let list=[];
|
||||||
let data = await userquery(item);
|
let data = await userquery(item);
|
||||||
if(data){
|
if(data){
|
||||||
this.processinformation=data;
|
list=data.slice(0,8);
|
||||||
|
this.processinformation=list;
|
||||||
this.dataLoaded=true;
|
this.dataLoaded=true;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//处方用粮筛选
|
//处方用粮筛选
|
||||||
userclick(item,index){
|
userclick(item,index){
|
||||||
this.userquery(index)
|
this.userchufang(index)
|
||||||
},
|
},
|
||||||
//全价猫干粮筛选
|
//全价猫干粮筛选
|
||||||
catclickGan(){
|
catclickGan(){
|
||||||
|
@ -146,6 +146,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import Myheader from "~/components/header.vue";
|
import Myheader from "~/components/header.vue";
|
||||||
|
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 {selectaddress,canceldanhao,generateOrderWX} from "../../ajax/getData";
|
||||||
@ -168,6 +169,7 @@ export default {
|
|||||||
usersalesAmount:'',
|
usersalesAmount:'',
|
||||||
leftico: require("../../assets/image/rc-left.png"),
|
leftico: require("../../assets/image/rc-left.png"),
|
||||||
orderNumber:'',
|
orderNumber:'',
|
||||||
|
userdata:"",
|
||||||
usermessage:null,
|
usermessage:null,
|
||||||
userid: null,
|
userid: null,
|
||||||
useralllist:[],
|
useralllist:[],
|
||||||
@ -196,7 +198,11 @@ export default {
|
|||||||
};
|
};
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
...mapMutations(["checkIsLogin"]),
|
||||||
|
refreshDesktopNav:function(){
|
||||||
|
RCDL.navigation.currentState=null;
|
||||||
|
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);
|
||||||
@ -221,6 +227,12 @@ userpay(){
|
|||||||
if(this.goldastates==0){
|
if(this.goldastates==0){
|
||||||
this.canceldanhao();
|
this.canceldanhao();
|
||||||
}
|
}
|
||||||
|
else if( this.customer='联系客服申请售后'){
|
||||||
|
var option = {
|
||||||
|
customer: {id: '', name: '', email: '', mobile: '', memberId: this.userdata.data.id}
|
||||||
|
}
|
||||||
|
dis_livchat(option);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
//订单支付和再次购买
|
//订单支付和再次购买
|
||||||
onceagain(){
|
onceagain(){
|
||||||
@ -317,6 +329,9 @@ if(data){
|
|||||||
|
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
this.checkIsLogin();
|
||||||
|
this.userdata=this.$store.state.userInfo;
|
||||||
|
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;
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<div class="settlement">
|
<div class="settlement">
|
||||||
<Myheader></Myheader>
|
<Myheader></Myheader>
|
||||||
<div class="rc-main">
|
<div class="rc-main">
|
||||||
<tabs></tabs>
|
<tabs></tabs>
|
||||||
</div>
|
</div>
|
||||||
<div class="rc_contline"></div>
|
<div class="rc_contline"></div>
|
||||||
<div class="rc-main">
|
<div class="rc-main">
|
||||||
@ -97,7 +97,12 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</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">
|
<div class="tc dl_cont" v-if="dialogAdd">
|
||||||
<myAddress
|
<myAddress
|
||||||
@isClose="dialogCtrl"
|
@isClose="dialogCtrl"
|
||||||
@ -109,9 +114,9 @@
|
|||||||
:visible.sync="dialogPopList"
|
:visible.sync="dialogPopList"
|
||||||
class="diallog_width"
|
class="diallog_width"
|
||||||
width="'100%"
|
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">
|
<div class="pop_list">
|
||||||
<el-row
|
<el-row
|
||||||
class="mypersonal"
|
class="mypersonal"
|
||||||
@ -120,17 +125,20 @@
|
|||||||
:class="item.isDefault ? 'active' : ''"
|
:class="item.isDefault ? 'active' : ''"
|
||||||
>
|
>
|
||||||
<el-col :span="4"
|
<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>
|
||||||
<el-col :span="16" class="tl">
|
<el-col :span="16" class="tl">
|
||||||
<div >
|
<div>
|
||||||
<p class="inline">{{ item.recipient }}</p>
|
<p class="inline">{{ item.recipient }}</p>
|
||||||
<p class="inline">{{ item.recipientPhone }}</p>
|
<p class="inline">{{ item.recipientPhone }}</p>
|
||||||
</div>
|
</div>
|
||||||
<p> {{ item.address }}</p>
|
<p>{{ item.address }}</p>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span="4">
|
<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-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<div class="popnewaddr">
|
<div class="popnewaddr">
|
||||||
@ -155,7 +163,7 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
goldmedal: [],
|
goldmedal: [],
|
||||||
dialogAddTitle:"",
|
dialogAddTitle: "",
|
||||||
addressstype: null,
|
addressstype: null,
|
||||||
orderstatus: "",
|
orderstatus: "",
|
||||||
userisdelivery: "待收货",
|
userisdelivery: "待收货",
|
||||||
@ -213,7 +221,7 @@ export default {
|
|||||||
this.useraddress = data;
|
this.useraddress = data;
|
||||||
},
|
},
|
||||||
editAddress(item) {
|
editAddress(item) {
|
||||||
this.dialogAddTitle='修改收货地址'
|
this.dialogAddTitle = "修改收货地址";
|
||||||
this.editAddressData = {
|
this.editAddressData = {
|
||||||
memberId: item.memberId,
|
memberId: item.memberId,
|
||||||
name: item.recipient,
|
name: item.recipient,
|
||||||
@ -222,7 +230,7 @@ export default {
|
|||||||
id: item.id,
|
id: item.id,
|
||||||
cityId: item.cityId,
|
cityId: item.cityId,
|
||||||
districtId: item.districtId,
|
districtId: item.districtId,
|
||||||
provinceId:item.provinceId,
|
provinceId: item.provinceId,
|
||||||
provinceName: item.provinceName,
|
provinceName: item.provinceName,
|
||||||
cityName: item.cityName,
|
cityName: item.cityName,
|
||||||
districtName: item.districtName,
|
districtName: item.districtName,
|
||||||
@ -231,7 +239,7 @@ export default {
|
|||||||
this.dialogAdd = true;
|
this.dialogAdd = true;
|
||||||
},
|
},
|
||||||
addAddress() {
|
addAddress() {
|
||||||
this.dialogAddTitle='新增收货地址'
|
this.dialogAddTitle = "新增收货地址";
|
||||||
this.editAddressData = {};
|
this.editAddressData = {};
|
||||||
this.dialogAdd = true;
|
this.dialogAdd = true;
|
||||||
},
|
},
|
||||||
@ -239,9 +247,9 @@ export default {
|
|||||||
this.useraddress.forEach((item) => {
|
this.useraddress.forEach((item) => {
|
||||||
if (item.id == cur.id) {
|
if (item.id == cur.id) {
|
||||||
item.isDefault = true;
|
item.isDefault = true;
|
||||||
item.checked=true
|
item.checked = true;
|
||||||
} else {
|
} else {
|
||||||
item.checked=false
|
item.checked = false;
|
||||||
item.isDefault = false;
|
item.isDefault = false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -250,9 +258,9 @@ export default {
|
|||||||
this.useraddress.forEach((item) => {
|
this.useraddress.forEach((item) => {
|
||||||
if (item.id == cur.id) {
|
if (item.id == cur.id) {
|
||||||
item.isDefault = true;
|
item.isDefault = true;
|
||||||
item.checked=true
|
item.checked = true;
|
||||||
} else {
|
} else {
|
||||||
item.checked=false
|
item.checked = false;
|
||||||
item.isDefault = false;
|
item.isDefault = false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -344,7 +352,8 @@ export default {
|
|||||||
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,
|
||||||
};
|
};
|
||||||
this.$router.push({
|
this.$router.push({
|
||||||
path: "/personal/userpay",
|
path: "/personal/userpay",
|
||||||
@ -352,7 +361,7 @@ export default {
|
|||||||
userPayData: JSON.stringify(userPayData),
|
userPayData: JSON.stringify(userPayData),
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
}else{
|
} else {
|
||||||
this.$message({
|
this.$message({
|
||||||
type: "warning",
|
type: "warning",
|
||||||
message: res.msg,
|
message: res.msg,
|
||||||
@ -384,9 +393,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>
|
@ -54,7 +54,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="rc-userbottom">
|
<div class="rc-userbottom">
|
||||||
<span>数量:{{ item.pcs }}件</span>
|
<span>数量:{{ item.pcs }}件</span>
|
||||||
<i>¥{{ }}</i>
|
<i>¥10</i>
|
||||||
</div>
|
</div>
|
||||||
<div class="rc-userbottomm">
|
<div class="rc-userbottomm">
|
||||||
<i>¥{{ item.userprice }}</i>
|
<i>¥{{ item.userprice }}</i>
|
||||||
@ -289,6 +289,9 @@ export default {
|
|||||||
this.goldmedal = data;
|
this.goldmedal = data;
|
||||||
this.alllist=[];
|
this.alllist=[];
|
||||||
this.useralllist=[];
|
this.useralllist=[];
|
||||||
|
this.obligation=[];
|
||||||
|
this.receiving=[];
|
||||||
|
this.pending=[];
|
||||||
for (let i = 0; i < this.goldmedal.length; i++) {
|
for (let i = 0; i < this.goldmedal.length; i++) {
|
||||||
this.useralllist.push(this.goldmedal[i].orderDetailList[0]);
|
this.useralllist.push(this.goldmedal[i].orderDetailList[0]);
|
||||||
this.alllist.push(this.goldmedal[i].orderDetailList[0])
|
this.alllist.push(this.goldmedal[i].orderDetailList[0])
|
||||||
@ -299,10 +302,11 @@ export default {
|
|||||||
}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]);
|
||||||
}
|
}
|
||||||
else if(this.goldmedal[i].status==4){
|
else if(this.useralllist[i].status==2){
|
||||||
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;
|
||||||
@ -346,7 +350,7 @@ export default {
|
|||||||
// addressDetailInfo: orderAddress[0].detailAddress,
|
// addressDetailInfo: orderAddress[0].detailAddress,
|
||||||
// },
|
// },
|
||||||
// };
|
// };
|
||||||
postData.push(oneProduct);
|
// postData.push(oneProduct);
|
||||||
let res = await generateOrderWX(postData);
|
let res = await generateOrderWX(postData);
|
||||||
let userPayData = {
|
let userPayData = {
|
||||||
orderId: res.data,
|
orderId: res.data,
|
||||||
@ -383,7 +387,7 @@ export default {
|
|||||||
message: "取消订单成功",
|
message: "取消订单成功",
|
||||||
});
|
});
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.indet();
|
this.indet(this.userdata);
|
||||||
this.activeIndex=0;
|
this.activeIndex=0;
|
||||||
this.useralllist=[];
|
this.useralllist=[];
|
||||||
}, 500);
|
}, 500);
|
||||||
|
@ -113,7 +113,8 @@ export default {
|
|||||||
computed: {},
|
computed: {},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.userPayData = JSON.parse(this.$route.query.userPayData);
|
this.userPayData = JSON.parse(this.$route.query.userPayData);
|
||||||
this.qrtext=this.userPayData.wxPay
|
this.qrtext=this.userPayData.wxPay;
|
||||||
|
this.payOrderWX()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
closeDialogSuccess() {
|
closeDialogSuccess() {
|
||||||
@ -141,15 +142,15 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
//支付监听
|
//支付监听
|
||||||
async updateOrderWX() {
|
async payOrderWX() {
|
||||||
let res = await updateOrderWX();
|
let res = await updateOrderWX();
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
this.qrtext = '成功加入群的二维码';
|
this.qrtext = '成功加入群的二维码';
|
||||||
this.dialogSuccess = true;
|
this.dialogSuccess = true;
|
||||||
clearInterval(this.time);
|
} else if (res.fail) {
|
||||||
} else {
|
|
||||||
this.dialogFail = true;
|
this.dialogFail = true;
|
||||||
clearInterval(this.time);
|
}else{
|
||||||
|
this.payOrderWX()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
@ -568,7 +568,8 @@ export default {
|
|||||||
item.picFile,
|
item.picFile,
|
||||||
item.productName,
|
item.productName,
|
||||||
item.basePrice,
|
item.basePrice,
|
||||||
item.specifications
|
item.specifications,
|
||||||
|
item.leftAllotment
|
||||||
);
|
);
|
||||||
if (data) {
|
if (data) {
|
||||||
this.productlist = data;
|
this.productlist = data;
|
||||||
|
@ -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="rc-max-width--xl rc-main">
|
<div class="rc-max-width--xl rc-main">
|
||||||
<div class="usersearch">
|
<div class="usersearch">
|
||||||
<div class="usercontentshow" ref="usercontent">
|
<div class="usercontentshow" ref="usercontent">
|
||||||
@ -310,6 +311,7 @@
|
|||||||
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 {
|
import {
|
||||||
userstype,
|
userstype,
|
||||||
biaome,
|
biaome,
|
||||||
@ -320,21 +322,27 @@ import {
|
|||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
value: "",
|
crumbs:[
|
||||||
isLoading: false,
|
{
|
||||||
userstype: [],
|
path:'/productdetails/productlist/',
|
||||||
activeIndex: "0",
|
title:'产品列表',
|
||||||
allacindex: 0,
|
}
|
||||||
userishwo: true,
|
],
|
||||||
userishwo4: true,
|
value: "",
|
||||||
userserachlist: [
|
isLoading: false,
|
||||||
{
|
userstype: [],
|
||||||
categoryName: [], //专区
|
activeIndex: "0",
|
||||||
tagUsedAge: [], //年龄
|
allacindex: 0,
|
||||||
tagFunction: [], //功能
|
userishwo: true,
|
||||||
tagBreed: [], //品种
|
userishwo4: true,
|
||||||
},
|
userserachlist: [
|
||||||
],
|
{
|
||||||
|
categoryName: [], //专区
|
||||||
|
tagUsedAge: [], //年龄
|
||||||
|
tagFunction: [], //功能
|
||||||
|
tagBreed: [], //品种
|
||||||
|
},
|
||||||
|
],
|
||||||
activeIndex1: 0,
|
activeIndex1: 0,
|
||||||
activeIndexa: "-1",
|
activeIndexa: "-1",
|
||||||
dialogInfo1: false,
|
dialogInfo1: false,
|
||||||
@ -343,6 +351,7 @@ export default {
|
|||||||
activeIndexd: "-1",
|
activeIndexd: "-1",
|
||||||
activeIndexe: "-1",
|
activeIndexe: "-1",
|
||||||
activeIndexf: "-1",
|
activeIndexf: "-1",
|
||||||
|
inRxGoods:false,
|
||||||
isadrond: true,
|
isadrond: true,
|
||||||
isshow: false,
|
isshow: false,
|
||||||
openshow: false,
|
openshow: false,
|
||||||
@ -476,7 +485,8 @@ export default {
|
|||||||
components: {
|
components: {
|
||||||
Myheader,
|
Myheader,
|
||||||
MyFooter,
|
MyFooter,
|
||||||
FixRight
|
FixRight,
|
||||||
|
tabs
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.routeParams=this.$route.query;
|
this.routeParams=this.$route.query;
|
||||||
@ -527,7 +537,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
data = await searchchanpin(searchCriteria, usertype, 1, 12);
|
data = await searchchanpin(searchCriteria, usertype, 1, 120);
|
||||||
}
|
}
|
||||||
if (data) {
|
if (data) {
|
||||||
this.rccontair = data;
|
this.rccontair = data;
|
||||||
@ -698,9 +708,12 @@ export default {
|
|||||||
tmp.checked=true;
|
tmp.checked=true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
this.inRxGoods=true;
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
this.prefecture[this.rxGoodsIndexPointer].checked=false;
|
this.prefecture[this.rxGoodsIndexPointer].checked=false;
|
||||||
|
this.inRxGoods=false;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
resetAllOptions(){
|
resetAllOptions(){
|
||||||
let _self = this;
|
let _self = this;
|
||||||
@ -736,7 +749,7 @@ export default {
|
|||||||
let isRxGoods=false;
|
let isRxGoods=false;
|
||||||
let productCode = [];
|
let productCode = [];
|
||||||
let mainProductCode = item.productCode;
|
let mainProductCode = item.productCode;
|
||||||
if(!item.ecPrice && !item.price)
|
if(this.inRxGoods)
|
||||||
{
|
{
|
||||||
isRxGoods=1;
|
isRxGoods=1;
|
||||||
productCode = [item.productCode];
|
productCode = [item.productCode];
|
||||||
|
@ -104,23 +104,23 @@ export default {
|
|||||||
|
|
||||||
register(){
|
register(){
|
||||||
console.log(this.tel)
|
console.log(this.tel)
|
||||||
if (!/^[1][3,4,5,7,8][0-9]{9}$/.test(this.tel) || this.tel === "") {
|
if ( this.alladdress==='') {
|
||||||
this.$message({
|
this.$message({
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
message: '手机号码输入有误'
|
message: '请输入详细地址 '
|
||||||
});
|
});
|
||||||
return
|
return
|
||||||
}else if(this.alladdress===''){
|
}if(!/^[1][3,4,5,7,8][0-9]{9}$/.test(this.tel) || this.tel === ""){
|
||||||
this.$message({
|
this.$message({
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
message: '请输入详细地址'
|
message: '手机号码输入有误'
|
||||||
});
|
});
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
else if(this.userpeople===''){
|
else if(this.userpeople===''){
|
||||||
this.$message({
|
this.$message({
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
message: '请输入姓名'
|
message: '请填写收货人'
|
||||||
});
|
});
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -158,7 +158,7 @@ export default {
|
|||||||
if(data){
|
if(data){
|
||||||
this.$message({
|
this.$message({
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
message: '删除成功'
|
message: '地址删除成功'
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
this.editaddress();
|
this.editaddress();
|
||||||
|
@ -363,6 +363,7 @@ export default {
|
|||||||
activeIndexd: "-1",
|
activeIndexd: "-1",
|
||||||
activeIndexe: "-1",
|
activeIndexe: "-1",
|
||||||
activeIndexf: "-1",
|
activeIndexf: "-1",
|
||||||
|
inRxGoods:false,
|
||||||
isadrond: true,
|
isadrond: true,
|
||||||
isshow: false,
|
isshow: false,
|
||||||
openshow: false,
|
openshow: false,
|
||||||
@ -590,7 +591,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
data = await searchchanpin(searchCriteria, usertype, 1, 12);
|
data = await searchchanpin(searchCriteria, usertype, 1, 120);
|
||||||
}
|
}
|
||||||
if (data) {
|
if (data) {
|
||||||
this.rccontair = data;
|
this.rccontair = data;
|
||||||
@ -706,9 +707,12 @@ export default {
|
|||||||
tmp.checked=true;
|
tmp.checked=true;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
this.inRxGoods=true;
|
||||||
}
|
}
|
||||||
else
|
else {
|
||||||
this.prefecture[this.rxGoodsIndexPointer].checked=false;
|
this.prefecture[this.rxGoodsIndexPointer].checked=false;
|
||||||
|
this.inRxGoods=false;
|
||||||
|
}
|
||||||
},
|
},
|
||||||
resetAllOptions(){
|
resetAllOptions(){
|
||||||
let _self = this;
|
let _self = this;
|
||||||
|
Loading…
Reference in New Issue
Block a user