|
@@ -14,6 +14,14 @@ import $reg from '@/common/config/common.js'
|
|
|
*/
|
|
|
export function SellerLogin(params) {
|
|
|
return new Promise(function(resolve,reject) {
|
|
|
+ if( params.mobile == ''){
|
|
|
+ uni.showToast({title: '请输入账户名',duration: 2000,mask:true, icon:'none'})
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if( params.password == ''){
|
|
|
+ uni.showToast({title: '请输入密码',duration: 2000,mask:true,icon:'none'})
|
|
|
+ return
|
|
|
+ }
|
|
|
request.post('/SellerLogin/login',params, true,res => {
|
|
|
if(res.code == 0){
|
|
|
resolve(res)
|
|
@@ -22,4 +30,152 @@ export function SellerLogin(params) {
|
|
|
}
|
|
|
})
|
|
|
})
|
|
|
+}
|
|
|
+/**
|
|
|
+ *@协销微信授权登录
|
|
|
+ *@param code 微信Code
|
|
|
+ */
|
|
|
+export function SellerWxLogin(params) {
|
|
|
+ return new Promise(function(resolve,reject) {
|
|
|
+ request.post('/SellerLogin/wxLogin',params, true,res => {
|
|
|
+ if(res.code == 0){
|
|
|
+ resolve(res)
|
|
|
+ }else{
|
|
|
+ reject(res)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+}
|
|
|
+/**
|
|
|
+ *@协销订单列表
|
|
|
+ *@param listType 订单类型
|
|
|
+ *@param orderNo 密码
|
|
|
+ *@param pageNum 页码
|
|
|
+ *@param pageSize 条数
|
|
|
+ *@param serviceProviderId 密码
|
|
|
+ */
|
|
|
+export function getSellerOrderList(params) {
|
|
|
+ return new Promise(function(resolve,reject) {
|
|
|
+ request.lodingGet('/seller/order/list',params,res => {
|
|
|
+ if(res.code == 0){
|
|
|
+ resolve(res)
|
|
|
+ }else{
|
|
|
+ reject(res)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+}
|
|
|
+/**
|
|
|
+ *@协销加入购物车
|
|
|
+ *@param mobile 手机号
|
|
|
+ *@param Password 密码
|
|
|
+ */
|
|
|
+export function SellerAddCart(params) {
|
|
|
+ return new Promise(function(resolve,reject) {
|
|
|
+ request.post('/seller/addCart',params, true,res => {
|
|
|
+ if(res.code == 0){
|
|
|
+ resolve(res)
|
|
|
+ }else{
|
|
|
+ reject(res)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+}
|
|
|
+/**
|
|
|
+ *@协销商品搜索
|
|
|
+ *@param clubUserId 协销ID
|
|
|
+ *@param pageNum 页码
|
|
|
+ *@param pageSize 条数
|
|
|
+ *@param searchWord 搜索关键词
|
|
|
+ */
|
|
|
+export function getSellerProduct(params) {
|
|
|
+ return new Promise(function(resolve,reject) {
|
|
|
+ request.get('/seller/product/search',params,res => {
|
|
|
+ if(res.code == 0){
|
|
|
+ resolve(res)
|
|
|
+ }else{
|
|
|
+ reject(res)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+}
|
|
|
+/**
|
|
|
+ *@协销商品搜索
|
|
|
+ *@param clubId 会所ID
|
|
|
+ *@param serviceProviderId 页码
|
|
|
+ */
|
|
|
+export function getSellerShoppingInfo(params) {
|
|
|
+ return new Promise(function(resolve,reject) {
|
|
|
+ request.get('/seller/shoppingInfo',params,res => {
|
|
|
+ if(res.code == 0){
|
|
|
+ resolve(res)
|
|
|
+ }else{
|
|
|
+ reject(res)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+}
|
|
|
+/**
|
|
|
+ *@协销购物车
|
|
|
+ *@param clubId 会所ID
|
|
|
+ *@param serviceProviderId 页码
|
|
|
+ */
|
|
|
+export function shoppingCartAddCart(params) {
|
|
|
+ return new Promise(function(resolve,reject) {
|
|
|
+ request.post('/shoppingCart/addCart',params, true,res => {
|
|
|
+ if(res.code == 0){
|
|
|
+ resolve(res)
|
|
|
+ }else{
|
|
|
+ reject(res)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+}
|
|
|
+/**
|
|
|
+ *@协销购物车删除商品
|
|
|
+ *@param clubId 会所ID
|
|
|
+ *@param serviceProviderId 页码
|
|
|
+ */
|
|
|
+export function shoppingCartDelete(params) {
|
|
|
+ return new Promise(function(resolve,reject) {
|
|
|
+ request.post('/shoppingCart/delete',params, true,res => {
|
|
|
+ if(res.code == 0){
|
|
|
+ resolve(res)
|
|
|
+ }else{
|
|
|
+ reject(res)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+}
|
|
|
+/**
|
|
|
+ *@协销购物车删除商品
|
|
|
+ *@param clubId 会所ID
|
|
|
+ *@param serviceProviderId 页码
|
|
|
+ */
|
|
|
+export function getshoppingCartInfo(params) {
|
|
|
+ return new Promise(function(resolve,reject) {
|
|
|
+ request.lodingGet('/shoppingCart/shoppingInfo',params,res => {
|
|
|
+ if(res.code == 0){
|
|
|
+ resolve(res)
|
|
|
+ }else{
|
|
|
+ reject(res)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+}
|
|
|
+/**
|
|
|
+ *@协销购物车商品增减
|
|
|
+ *@param clubId 会所ID
|
|
|
+ *@param serviceProviderId 页码
|
|
|
+ */
|
|
|
+export function shoppingCartUpdate(params) {
|
|
|
+ return new Promise(function(resolve,reject) {
|
|
|
+ request.post('/shoppingCart/update',params,true,res => {
|
|
|
+ if(res.code == 0){
|
|
|
+ resolve(res)
|
|
|
+ }else{
|
|
|
+ reject(res)
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
}
|