first commit
This commit is contained in:
1
金壶/appV1/utils/models/.pydio
Normal file
1
金壶/appV1/utils/models/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
0807f328-c7d6-45af-913e-a31a04093eff
|
||||
66
金壶/appV1/utils/models/auth.js
Normal file
66
金壶/appV1/utils/models/auth.js
Normal file
@@ -0,0 +1,66 @@
|
||||
import {
|
||||
http_use,
|
||||
http_post
|
||||
} from '../http.js'
|
||||
import api from '../api'
|
||||
|
||||
class auth {
|
||||
|
||||
// 企业认证检测
|
||||
async userTypeInfo(key) {
|
||||
let res = await http_post('/common/userTypeInfo',{key})
|
||||
return res
|
||||
}
|
||||
|
||||
// 企业认证检测
|
||||
async checkAuth() {
|
||||
let res = await http_post(api.checkAuth, {
|
||||
|
||||
})
|
||||
return res
|
||||
}
|
||||
// 企业认证第一步
|
||||
async authBaisc(parames) {
|
||||
let res = await http_post(api.authBaisc, parames)
|
||||
return res
|
||||
}
|
||||
// 企业认证第一步
|
||||
async viewBaisc() {
|
||||
let res = await http_use(api.authBaisc)
|
||||
return res
|
||||
}
|
||||
|
||||
|
||||
// 企业认证第二步
|
||||
async authCertificate(parames) {
|
||||
let res = await http_post(api.authCertificate, parames)
|
||||
return res
|
||||
}
|
||||
|
||||
// 企业认证第二步
|
||||
async viewCertificate() {
|
||||
let res = await http_use(api.authCertificate)
|
||||
return res
|
||||
}
|
||||
|
||||
// 企业认证第三步
|
||||
async authBank(invoice_rise, tax_number, bank_name, bank_account, account_name) {
|
||||
|
||||
let res = await http_post(api.authBank, {
|
||||
invoice_rise,
|
||||
tax_number,
|
||||
bank_name,
|
||||
bank_account,
|
||||
account_name
|
||||
})
|
||||
|
||||
return res
|
||||
}
|
||||
|
||||
// 企业认证第三步
|
||||
async viewBank() {
|
||||
let res = await http_use(api.authBank)
|
||||
return res
|
||||
}
|
||||
}
|
||||
export default new auth
|
||||
231
金壶/appV1/utils/models/goods.js
Normal file
231
金壶/appV1/utils/models/goods.js
Normal file
@@ -0,0 +1,231 @@
|
||||
import {http_use,http_post} from '../http.js'
|
||||
import api from '../api'
|
||||
|
||||
class X_goods {
|
||||
// 专属客服
|
||||
async x_custOmer() {
|
||||
|
||||
let res = await http_post(api.x_custOmer, {
|
||||
|
||||
})
|
||||
return res
|
||||
}
|
||||
// 订单数量
|
||||
async x_order_count() {
|
||||
|
||||
let res = await http_post(api.x_order_count, {
|
||||
|
||||
})
|
||||
return res
|
||||
}
|
||||
// x_cancelOrder 取消订单
|
||||
async x_cancelOrder(order_id) {
|
||||
|
||||
let res = await http_post(api.x_cancelOrder, {
|
||||
order_id
|
||||
})
|
||||
return res
|
||||
}
|
||||
// 搜索联动列表
|
||||
async x_searchList(name) {
|
||||
|
||||
let res = await http_post(api.x_searchList, {
|
||||
name
|
||||
})
|
||||
return res
|
||||
}
|
||||
//X_update 加减购物车数量
|
||||
async X_update(id,goods_number) {
|
||||
|
||||
let res = await http_post(api.X_update, {
|
||||
id,
|
||||
goods_number
|
||||
})
|
||||
return res
|
||||
}
|
||||
|
||||
// 上传阿里云图片 获取签名
|
||||
async X_getAliyunOssStsToken() {
|
||||
|
||||
let res = await http_post(api.X_getAliyunOssStsToken, {
|
||||
|
||||
})
|
||||
return res
|
||||
}
|
||||
// X_submitSuggestion 意见反馈
|
||||
async X_submitSuggestion(status,phone,type,suggestion_content,pic_url) {
|
||||
|
||||
let res = await http_post(api.X_submitSuggestion, {
|
||||
status,
|
||||
phone,
|
||||
type,
|
||||
suggestion_content,
|
||||
pic_url
|
||||
})
|
||||
return res
|
||||
}
|
||||
//X_toPay 去支付
|
||||
async X_toPay(order_id) {
|
||||
|
||||
let res = await http_post(api.X_toPay, {
|
||||
order_id
|
||||
})
|
||||
return res
|
||||
}
|
||||
// 创建订单
|
||||
async X_create_order(id_group,address,consignee,tel,remark,address_id) {
|
||||
|
||||
let res = await http_post(api.X_create_order, {
|
||||
id_group,
|
||||
address,
|
||||
consignee,
|
||||
tel,
|
||||
remark,
|
||||
address_id
|
||||
})
|
||||
return res
|
||||
}
|
||||
//支付
|
||||
async X_appPay(order_id,pay_type) {
|
||||
console.log(order_id)
|
||||
let res = await http_post(api.X_appPay, {
|
||||
order_id,
|
||||
pay_type
|
||||
})
|
||||
console.log(res)
|
||||
return res
|
||||
}
|
||||
//X_treeUserAddress 地区三级地址
|
||||
async X_treeUserAddress() {
|
||||
|
||||
let res = await http_post(api.X_treeUserAddress, {
|
||||
|
||||
})
|
||||
return res
|
||||
}
|
||||
//X_orderPreview 确认订单
|
||||
async X_orderPreview(id_group) {
|
||||
|
||||
let res = await http_post(api.X_orderPreview, {
|
||||
id_group
|
||||
})
|
||||
return res
|
||||
}
|
||||
//添加购物车
|
||||
async X_addCar(gba_id,batch_id,goods_number,add_type) {
|
||||
|
||||
let res = await http_post(api.X_addCar, {
|
||||
gba_id,
|
||||
batch_id,
|
||||
goods_number,
|
||||
add_type
|
||||
})
|
||||
return res
|
||||
}
|
||||
// 商品分类
|
||||
async x_Classification() {
|
||||
let res = await http_post(api.x_Classification, {
|
||||
|
||||
})
|
||||
return res
|
||||
}
|
||||
// 购物车
|
||||
async x_shoppingCar() {
|
||||
|
||||
let res = await http_post(api.x_shoppingCar, {
|
||||
|
||||
})
|
||||
return res
|
||||
}
|
||||
// 删除购物车
|
||||
async X_delCar(id_group) {
|
||||
|
||||
let res = await http_post(api.X_delCar, {
|
||||
id_group
|
||||
})
|
||||
return res
|
||||
}
|
||||
//X_addCollect_app 商品收藏/ 取消收藏
|
||||
async X_addCollect_app(goods_id,status) {
|
||||
|
||||
let res = await http_post(api.X_addCollect_app, {
|
||||
goods_id,
|
||||
status
|
||||
})
|
||||
return res
|
||||
}
|
||||
// 商品收藏列表
|
||||
async x_Collectlsit() {
|
||||
|
||||
let res = await http_post(api.x_Collectlsit, {
|
||||
|
||||
})
|
||||
return res
|
||||
}
|
||||
// 商品详情
|
||||
async x_goodsDetail(sku_id) {
|
||||
|
||||
let res = await http_post(api.x_goodsDetail, {
|
||||
sku_id
|
||||
})
|
||||
return res
|
||||
}
|
||||
// 热搜
|
||||
async goodsRanking() {
|
||||
let res = await http_post(api.goodsRanking, {
|
||||
|
||||
})
|
||||
return res
|
||||
}
|
||||
// 商品搜索
|
||||
async search(
|
||||
search_words,
|
||||
cate_id,
|
||||
activity_id,
|
||||
retail_flag,
|
||||
sort_field,
|
||||
sort_order,
|
||||
term_validity,
|
||||
drug_form,
|
||||
manufacturer,
|
||||
price_start,
|
||||
price_end,
|
||||
current_page
|
||||
){
|
||||
let res = await http_post(api.search, {
|
||||
search_words,
|
||||
cate_id,
|
||||
activity_id,
|
||||
retail_flag,
|
||||
sort_field,
|
||||
sort_order,
|
||||
term_validity,
|
||||
drug_form,
|
||||
manufacturer,
|
||||
price_start,
|
||||
price_end,
|
||||
current_page
|
||||
})
|
||||
|
||||
return res
|
||||
}
|
||||
// 商品列表
|
||||
async goodsList(limit,page){
|
||||
let res = await http_post(api.goodsList, {
|
||||
limit, //每页多少条(默认20)
|
||||
page //当前页
|
||||
})
|
||||
return res
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
export default new X_goods
|
||||
|
||||
|
||||
|
||||
32
金壶/appV1/utils/models/index.js
Normal file
32
金壶/appV1/utils/models/index.js
Normal file
@@ -0,0 +1,32 @@
|
||||
import {http_use,http_post} from '../http.js'
|
||||
import api from '../api'
|
||||
|
||||
class X_index {
|
||||
|
||||
async x_index() {
|
||||
|
||||
let res = await http_post(api.x_index, {
|
||||
|
||||
})
|
||||
return res
|
||||
}
|
||||
async x_article(id){
|
||||
|
||||
let res = await http_post(api.x_article,{
|
||||
|
||||
})
|
||||
return res
|
||||
}
|
||||
async x_activity(id,limit,page,loading = true){
|
||||
|
||||
let res = await http_post(api.x_activity,{
|
||||
id,
|
||||
limit,
|
||||
page
|
||||
},loading)
|
||||
return res
|
||||
}
|
||||
}
|
||||
|
||||
export default new X_index
|
||||
|
||||
13
金壶/appV1/utils/models/message.js
Normal file
13
金壶/appV1/utils/models/message.js
Normal file
@@ -0,0 +1,13 @@
|
||||
import {
|
||||
http_use,
|
||||
http_post
|
||||
} from '../http.js'
|
||||
|
||||
class message {
|
||||
//更新用户信息
|
||||
async getList(parames) {
|
||||
let res = await http_use('/message/getList', parames)
|
||||
return res
|
||||
}
|
||||
}
|
||||
export default new message
|
||||
23
金壶/appV1/utils/models/order.js
Normal file
23
金壶/appV1/utils/models/order.js
Normal file
@@ -0,0 +1,23 @@
|
||||
import {
|
||||
http_use,
|
||||
http_post
|
||||
} from '../http.js'
|
||||
class order {
|
||||
//更新用户信息
|
||||
async getList(parames) {
|
||||
let res = await http_post('/order/index', parames)
|
||||
return res
|
||||
}
|
||||
async getInfo(order_id) {
|
||||
let res = await http_post('/order/detail', {
|
||||
order_id
|
||||
})
|
||||
return res
|
||||
}
|
||||
|
||||
async getExpress(parames) {
|
||||
let res = await http_post('/express/get_express', parames)
|
||||
return res
|
||||
}
|
||||
}
|
||||
export default new order
|
||||
35
金壶/appV1/utils/models/service.js
Normal file
35
金壶/appV1/utils/models/service.js
Normal file
@@ -0,0 +1,35 @@
|
||||
import {
|
||||
http_use,
|
||||
http_post
|
||||
} from '../http.js'
|
||||
class service {
|
||||
//更新用户信息
|
||||
async getList(parames) {
|
||||
let res = await http_post('/service/getList', parames)
|
||||
return res
|
||||
}
|
||||
|
||||
async getInfo(id) {
|
||||
let res = await http_post('/service/getInfo', {
|
||||
id
|
||||
})
|
||||
return res
|
||||
}
|
||||
|
||||
async add(parames) {
|
||||
let res = await http_post("/service/add",parames)
|
||||
return res
|
||||
}
|
||||
|
||||
async express(parames) {
|
||||
let res = await http_post("/service/express",parames)
|
||||
return res
|
||||
}
|
||||
|
||||
async cancel(parames) {
|
||||
let res = await http_post("/service/cancel",parames)
|
||||
return res
|
||||
}
|
||||
|
||||
}
|
||||
export default new service
|
||||
83
金壶/appV1/utils/models/shop.js
Normal file
83
金壶/appV1/utils/models/shop.js
Normal file
@@ -0,0 +1,83 @@
|
||||
import {
|
||||
http_use,
|
||||
http_post
|
||||
} from '../http.js'
|
||||
|
||||
import api from '../api'
|
||||
class shop {
|
||||
//更新用户信息
|
||||
async getIndexShopInfo() {
|
||||
let res = await http_use(api.getIndexShopInfo, {
|
||||
|
||||
})
|
||||
return res
|
||||
}
|
||||
//修改商家信息
|
||||
async edit_shopInfo(address, tell, business_time, Paypal, name, shop_lang, member_lang, texts, avatar,url_code,country_id) {
|
||||
let res = await http_post(api.edit_shopInfo, {
|
||||
address,
|
||||
tell,
|
||||
business_time,
|
||||
Paypal,
|
||||
name,
|
||||
shop_lang,
|
||||
member_lang,
|
||||
texts,
|
||||
avatar,
|
||||
url_code,
|
||||
country_id
|
||||
})
|
||||
return res
|
||||
}
|
||||
//获取店铺货币列表与语言种类
|
||||
async getShopLangAndCurrency() {
|
||||
let res = await http_use(api.getShopLangAndCurrency, {
|
||||
|
||||
})
|
||||
return res
|
||||
}
|
||||
// 收货地址
|
||||
async shippingAddress(){
|
||||
try {
|
||||
let res = uni.getStorageSync('address_key');
|
||||
if (res) {
|
||||
return res
|
||||
}
|
||||
res = await http_post(api.shippingAddress,{})
|
||||
uni.setStorageSync('address_key', res);
|
||||
return res
|
||||
} catch (e) {
|
||||
// error
|
||||
}
|
||||
|
||||
}
|
||||
// 收货列表
|
||||
async addressList(){
|
||||
let res = await http_post(api.addressList,{
|
||||
|
||||
})
|
||||
return res
|
||||
}
|
||||
// 默认地址
|
||||
async defaultAddress(address_id){
|
||||
let res = await http_post(api.defaultAddress,{
|
||||
address_id
|
||||
})
|
||||
return res
|
||||
}
|
||||
// 更新/新增收货地址
|
||||
async makeChangeAddress(area_id,address,address_id,consignee,tel){
|
||||
let res = await http_post(api.makeChangeAddress,{
|
||||
area_id,address,address_id,consignee,tel
|
||||
})
|
||||
return res
|
||||
}
|
||||
// 删除配送地址
|
||||
async deleteAddress(address_id){
|
||||
let res = await http_post(api.deleteAddress,{
|
||||
address_id
|
||||
})
|
||||
return res
|
||||
}
|
||||
}
|
||||
export default new shop
|
||||
77
金壶/appV1/utils/models/x_login.js
Normal file
77
金壶/appV1/utils/models/x_login.js
Normal file
@@ -0,0 +1,77 @@
|
||||
import {http_use,http_post} from '../http.js'
|
||||
import api from '../api'
|
||||
|
||||
class X_login {
|
||||
//X_accountInfo
|
||||
// 对公账号信息
|
||||
async X_accountInfo() {
|
||||
|
||||
let res = await http_post(api.X_accountInfo, {
|
||||
|
||||
})
|
||||
return res
|
||||
}
|
||||
// 注册
|
||||
async x_register(phone,smscode,password) {
|
||||
|
||||
let res = await http_post(api.x_register, {
|
||||
phone,
|
||||
smscode,
|
||||
password
|
||||
})
|
||||
return res
|
||||
}
|
||||
// 手机短信验证码
|
||||
async phonecode_app(phone,smscode,status) {
|
||||
|
||||
let res = await http_post(api.phonecode_app, {
|
||||
phone,
|
||||
smscode,
|
||||
status
|
||||
})
|
||||
return res
|
||||
}
|
||||
// 登录
|
||||
async login(phone,password,appid,timestamp,sign) {
|
||||
|
||||
let res = await http_post(api.login, {
|
||||
phone,
|
||||
password,
|
||||
appid,
|
||||
timestamp,
|
||||
sign
|
||||
})
|
||||
return res
|
||||
}
|
||||
// 忘记密码
|
||||
async forgetPassword_app(phone,smscode,password) {
|
||||
|
||||
let res = await http_post(api.forgetPassword_app, {
|
||||
phone,
|
||||
smscode,
|
||||
password
|
||||
})
|
||||
return res
|
||||
}
|
||||
// 个人中心手机号码
|
||||
async x_tell() {
|
||||
|
||||
let res = await http_post(api.x_tell, {
|
||||
|
||||
})
|
||||
return res
|
||||
}
|
||||
// X_editphone 登录后修改密码
|
||||
async X_editphone(ordpassword,password) {
|
||||
|
||||
let res = await http_post(api.X_editphone, {
|
||||
ordpassword,
|
||||
password
|
||||
})
|
||||
return res
|
||||
}
|
||||
}
|
||||
export default new X_login
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user