mirror of
https://gitee.com/lab1024/smart-admin.git
synced 2025-10-02 02:06:38 +08:00
changemessage
This commit is contained in:
parent
df498f597a
commit
2ff3a5d256
@ -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,41 +56,42 @@ 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) => {
|
||||
export const deleteCart = (productCode) => {
|
||||
var data = {
|
||||
productCode:productCode
|
||||
productCode: productCode
|
||||
}
|
||||
return fetch('cancelCartProductInfo',data,'POST')
|
||||
return fetch('cancelCartProductInfo', data, 'POST')
|
||||
}
|
||||
/**
|
||||
* 购物车批量提交
|
||||
*/
|
||||
export const mostAddClass = (id) => {
|
||||
return fetch('/api/mostAddClass/', {id})
|
||||
return fetch('/api/mostAddClass/', { id })
|
||||
}
|
||||
/**
|
||||
* 删除购物车
|
||||
@ -106,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",
|
||||
@ -177,84 +178,84 @@ 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 = (stype, curPage,curRow) => {
|
||||
if(!curPage)
|
||||
curPage=1;
|
||||
if(!curRow)
|
||||
curRow=10;
|
||||
let queryTail='page='+curPage+'&rows='+curRow;
|
||||
if(stype)
|
||||
queryTail = '?stype='+queryTail+'&'+queryTail;
|
||||
export const userque = (stype, curPage, curRow) => {
|
||||
if (!curPage)
|
||||
curPage = 1;
|
||||
if (!curRow)
|
||||
curRow = 10;
|
||||
let queryTail = 'page=' + curPage + '&rows=' + curRow;
|
||||
if (stype)
|
||||
queryTail = '?stype=' + queryTail + '&' + queryTail;
|
||||
else
|
||||
queryTail = '?'+queryTail;
|
||||
queryTail = '?' + queryTail;
|
||||
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')
|
||||
}
|
||||
|
||||
|
||||
@ -269,58 +270,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')
|
||||
}
|
||||
|
||||
|
||||
@ -329,9 +330,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')
|
||||
}
|
||||
|
||||
|
||||
@ -339,20 +340,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')
|
||||
}
|
||||
|
||||
|
||||
@ -361,9 +362,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')
|
||||
}
|
||||
|
||||
|
||||
@ -371,25 +372,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')
|
||||
}
|
||||
|
||||
|
||||
@ -400,11 +401,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')
|
||||
}
|
||||
|
||||
|
||||
@ -412,156 +413,156 @@ 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
|
||||
}
|
||||
//用户所有的优惠券
|
||||
export const allConfig = (memberId,channelSecurity,mobile) => {
|
||||
var data = {
|
||||
}
|
||||
return fetch('couponConfig?type=getAll', data, 'POST' )
|
||||
}
|
||||
|
||||
return fetch('memberAddress?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' )
|
||||
//可用的优惠券
|
||||
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')
|
||||
}
|
||||
|
||||
|
||||
@ -615,14 +616,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')
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
<div class="settlement">
|
||||
<Myheader></Myheader>
|
||||
<div class="rc-main">
|
||||
<tabs></tabs>
|
||||
<tabs></tabs>
|
||||
</div>
|
||||
<div class="rc_contline"></div>
|
||||
<div class="rc-main">
|
||||
@ -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">
|
||||
@ -155,7 +163,7 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
goldmedal: [],
|
||||
dialogAddTitle:"",
|
||||
dialogAddTitle: "",
|
||||
addressstype: null,
|
||||
orderstatus: "",
|
||||
userisdelivery: "待收货",
|
||||
@ -213,7 +221,7 @@ export default {
|
||||
this.useraddress = data;
|
||||
},
|
||||
editAddress(item) {
|
||||
this.dialogAddTitle='修改收货地址'
|
||||
this.dialogAddTitle = "修改收货地址";
|
||||
this.editAddressData = {
|
||||
memberId: item.memberId,
|
||||
name: item.recipient,
|
||||
@ -222,7 +230,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 +239,7 @@ export default {
|
||||
this.dialogAdd = true;
|
||||
},
|
||||
addAddress() {
|
||||
this.dialogAddTitle='新增收货地址'
|
||||
this.dialogAddTitle = "新增收货地址";
|
||||
this.editAddressData = {};
|
||||
this.dialogAdd = true;
|
||||
},
|
||||
@ -239,9 +247,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 +258,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;
|
||||
}
|
||||
});
|
||||
@ -344,7 +352,8 @@ export default {
|
||||
postData[0].orderAddress.addressUserName +
|
||||
" " +
|
||||
postData[0].orderAddress.addressPhoneNumber,
|
||||
wxPay: "weixin://wxpay/bizpayurl?pr=4RJbokxzz",
|
||||
// wxPay: "weixin://wxpay/bizpayurl?pr=4RJbokxzz",
|
||||
wxPay: res.data,
|
||||
};
|
||||
this.$router.push({
|
||||
path: "/personal/userpay",
|
||||
@ -352,7 +361,7 @@ export default {
|
||||
userPayData: JSON.stringify(userPayData),
|
||||
},
|
||||
});
|
||||
}else{
|
||||
} else {
|
||||
this.$message({
|
||||
type: "warning",
|
||||
message: res.msg,
|
||||
@ -384,9 +393,7 @@ export default {
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
|
||||
@import url("../../assets/css/global.less");
|
||||
@import "./settlement.less";
|
||||
// @import url("../../assets/css/settlement.less");
|
||||
|
||||
</style>
|
@ -113,7 +113,8 @@ export default {
|
||||
computed: {},
|
||||
mounted() {
|
||||
this.userPayData = JSON.parse(this.$route.query.userPayData);
|
||||
this.qrtext=this.userPayData.wxPay
|
||||
this.qrtext=this.userPayData.wxPay;
|
||||
this.payOrderWX()
|
||||
},
|
||||
methods: {
|
||||
closeDialogSuccess() {
|
||||
@ -141,15 +142,15 @@ export default {
|
||||
}
|
||||
},
|
||||
//支付监听
|
||||
async updateOrderWX() {
|
||||
async payOrderWX() {
|
||||
let res = await updateOrderWX();
|
||||
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()
|
||||
}
|
||||
},
|
||||
},
|
||||
|
@ -568,7 +568,8 @@ export default {
|
||||
item.picFile,
|
||||
item.productName,
|
||||
item.basePrice,
|
||||
item.specifications
|
||||
item.specifications,
|
||||
item.leftAllotment
|
||||
);
|
||||
if (data) {
|
||||
this.productlist = data;
|
||||
|
Loading…
Reference in New Issue
Block a user