123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847 |
- import request from "./index.js"
- import store from "../store/index.js"
- //接口管理
- // 第一版接口 开始
- // 登录接口
- function login(tel, pwd) {
- return request('data/api.login/in', {
- phone: tel,
- password: pwd
- }, 'POST')
- }
- // 图形验证
- function graphVer() {
- return request('data/api.login/captcha')
- }
- // 验证码登录接口
- function loginVer(tel, verify) {
- return request('data/api.login/phone', {
- phone: tel,
- verify: verify
- })
- }
- // 注册
- function register(tel, pwd, repwd, code, icode, pay_password) {
- return request('data/api.login/register', {
- phone: tel,
- password: pwd,
- true_password: repwd,
- verify: code,
- invite_code: icode,
- pay_password: pay_password
- })
- }
- // 发送验证码
- function smsCode(tel, captcha, uniqid) {
- return request('data/api.login/sendsms', {
- phone: tel,
- captcha,
- uniqid
- })
- }
- // 忘记密码
- function forget(tel, code, pwd, repwd) {
- return request('data/api.login/change', {
- phone: tel,
- verify: code,
- password: pwd,
- true_password: repwd
- })
- }
- // 获取用户信息
- function get_user_info() {
- request('data/api.auth.center/get').then(res => {
- if (res.code == 1) {
- uni.setStorageSync("user_info", res.data)
- uni.setStorageSync("token", res.data.token.token)
- } else {
- uni.showToast({
- title: res.info,
- icon: "none"
- })
- setTimeout(() => {
- uni.reLaunch({
- url: "/pages/login/login"
- })
- }, 1500)
- }
- })
- }
- // 首页 热门推荐
- function popular(limit, page, name = "") {
- return request('data/api.auth.collection/getHot', {
- limit,
- page,
- name
- }, "GET")
- }
- //首页 最新发布
- function new_list(limit, page) {
- return request('data/api.auth.collection/getNew', {
- limit,
- page
- }, "GET")
- }
- //藏品详情
- function collection_info(id) {
- return request('data/api.auth.collection/getInfo', {
- id
- }, "GET")
- }
- //首页 盲盒专区
- function box_list(limit, page, name = "") {
- return request('data/api.auth.Bind/getBindList', {
- limit,
- page,
- name
- }, "GET")
- }
- //盲盒详情
- function box_info(id) {
- return request("data/api.auth.Bind/getBindInfo", {
- id
- }, "GET")
- }
- //我的盲盒
- function my_box(limit, page) {
- return request("data/api.auth.Bind/getUserBox", {
- limit,
- page,
- }, "GET")
- }
- //开盲盒
- function open_box(id) {
- return request("data/api.auth.bind/openBox", {
- id
- }, "GET")
- }
- // 生成订单
- function create_order(id, Ticket, RandStr) {
- // console.log(JSON.stringify(uni.signStr))
- return request("data/api.auth.collection/buy", {
- id,
- Ticket,
- RandStr
- }, "POST")
- }
- //余额支付
- function balancepay(order_no, pay_password) {
- return request("data/api.auth.collection/payment", {
- order_no,
- payment_code: "M7659936020981218107",
- pay_password
- })
- }
- //支付宝支付
- function zfbpay(order_no) {
- return request("data/api.auth.collection/payment", {
- order_no,
- payment_code: "2",
- type: "2",
- pay_type: "1"
- })
- }
- //微信支付
- function wxpay(order_no) {
- return request("data/api.auth.collection/payment", {
- order_no,
- payment_code: "1",
- type: "2",
- pay_type: "1"
- })
- }
- //盲盒余额支付
- function box_balancepay(order_no, pay_password) {
- return request("data/api.auth.bind/payment", {
- order_no,
- payment_code: "M7659936020981218107",
- pay_password
- })
- }
- //盲盒支付宝支付
- function box_zfbpay(order_no) {
- return request("data/api.auth.bind/payment", {
- order_no,
- payment_code: "2",
- type: "2",
- pay_type: "1"
- })
- }
- //盲盒微信支付
- function box_wxpay(order_no) {
- return request("data/api.auth.bind/payment", {
- order_no,
- payment_code: "1",
- type: "2",
- pay_type: "1"
- })
- }
- //藏馆
- function collection(limit, page) {
- return request("data/api.auth.collection/getList", {
- limit,
- page
- }, "GET")
- }
- //藏馆详情
- function collection2_info(id) {
- return request("data/api.auth.collection/getCangInfo", {
- id
- }, "GET")
- }
- //修改个人信息
- function set_user_info(nickname, headimg) {
- return request('data/api.auth.center/set', {
- nickname,
- headimg,
- })
- }
- //我的藏品
- function mycollection(limit, page, status) {
- return request("data/api.auth.collection/getUserCollection", {
- limit,
- page,
- status
- }, "GET")
- }
- // 意见反馈
- function feedback(imgs, content) {
- return request('data/api.auth.center/message', {
- imgs,
- content
- })
- }
- //验证原手机
- function oldtel(phone, verify) {
- return request('data/api.auth.center/verifyPhone', {
- phone,
- verify
- })
- }
- //验证新手机
- function newtel(phone, verify) {
- return request('data/api.auth.center/changePhone', {
- phone,
- verify
- })
- }
- //购买盲盒 生成订单
- function createboxorder(id) {
- return request("data/api.auth.Bind/buy", {
- id
- })
- }
- //实名认证
- function authentication(username, card, captcha, uniqid) {
- return request("data/api.auth.center/auth", {
- username,
- card,
- captcha,
- uniqid
- })
- }
- //我的团队
- function team(limit) {
- return request("data/api.auth.center/getFrom", {
- limit: 200,
- page: 1
- }, "GET")
- }
- //关于我们
- function about() {
- return request("data/api.data/aboutUs")
- }
- //隐私政策 用户协议
- function aboutall() {
- return request("data/api.data/getAbout")
- }
- //首页轮播图
- function banner() {
- return request("data/api.data/getSlider")
- }
- //订单列表
- function order_list(limit, page, status) {
- return request("data/api.auth.center/getOrderList", {
- limit,
- page,
- status
- }, "GET")
- }
- //搜索用户 手机或者hash值
- function search_user(phone) {
- return request("data/api.auth.collection/getNews", {
- phone
- }, "GET")
- }
- //赠送 藏品id 手机号或者hash 支付密码
- function givesome(id, phone, password) {
- return request("data/api.auth.collection/giving", {
- id,
- phone,
- password
- })
- }
- //赠送 盲盒id 手机号或者hash 支付密码
- function givesome_box(id, phone, password) {
- return request("data/api.auth.bind/giving", {
- id,
- phone,
- password
- })
- }
- //获取转赠记录
- function get_increase_all(limit, page, type) {
- return request("data/api.auth.center/givLog", {
- limit,
- page,
- type
- }, "GET")
- }
- //获取最新一条公告
- function get_notice() {
- return request("data/api.news/newArticle", {}, "GET")
- }
- //获取公告列表
- function get_notice_list(class_id) {
- return request("data/api.news/getItem", {
- class_id
- }, "GET")
- }
- //获取公告详情
- function get_notice_info(id) {
- return request("data/api.news/getInfo", {
- id
- }, "GET")
- }
- //查询订单是否排队
- function get_islineup(order_no) {
- return request("data/api.auth.collection/searchOrder", {
- order_no
- })
- }
- // 第一版接口 结束
- // 第二版市场合成部分
- //合成列表
- function compound_list(limit, page) {
- return request("data/api.auth.Synthetic/getSynList", {
- limit,
- page
- }, "GET")
- }
- //合成点进去详情
- function compound_details(id, password) {
- return request("data/api.auth.Synthetic/getInfo", {
- id
- }, "GET")
- }
- //合成
- function compound(id, collection_user_id) {
- return request("data/api.auth.Synthetic/syn", {
- id,
- collection_user_id
- })
- }
- //合成记录
- function compound_history(limit, page) {
- return request("data/api.auth.Synthetic/getSynLog", {
- limit,
- page
- }, "GET")
- }
- //市场列表 type 1藏品 2盲盒 goods_id藏品或者盲盒id
- function market_list(limit, page, type, goods_id, sort, name = "", is_guan, series_id) {
- return request("data/api.auth.mark/getUserMark", {
- limit,
- page,
- type,
- goods_id,
- sort: sort + '',
- name,
- is_guan,
- series_id
- }, "GET")
- }
- //市场详情
- function market_details(id) {
- return request("data/api.auth.mark/getMarkInfo", {
- id
- }, "GET")
- }
- //获取藏品
- function get_collection(limit, page) {
- return request("data/api.auth.mark/getCollect", {
- limit,
- page
- }, "GET")
- }
- //获取盲盒
- function get_box(limit, page) {
- return request("data/api.auth.mark/getBox", {
- limit,
- page
- }, "GET")
- }
- //转售
- function resale(price, type, id, password) {
- return request("data/api.auth.mark/sell", {
- price,
- type,
- id,
- password
- })
- }
- //市场生成订单
- function create_market_order(id) {
- return request("data/api.auth.mark/addOrder", {
- id
- })
- }
- //市场支付 余额支付
- function market_paybalance(order_no, pay_password) {
- return request("data/api.auth.mark/payment", {
- order_no,
- payment_code: "M7659936020981218107",
- pay_password
- })
- }
- //市场支付 支付宝支付
- function market_payzfb(order_no) {
- return request("data/api.auth.mark/payment", {
- order_no,
- payment_code: "2",
- type: "2",
- pay_type: "1"
- })
- }
- //市场支付 微信支付
- function market_paywx(order_no) {
- return request("data/api.auth.mark/payment", {
- order_no,
- payment_code: "1",
- type: '2',
- pay_type: '1'
- })
- }
- //我的钱包 充值
- function recharge(money) {
- return request("data/api.auth.TopUp/addOrder", {
- money,
- })
- }
- //我的钱包 余额支付 支付
- function wallet_paybalance(order_id) {
- // return request("data/api.auth.TopUp/payment", {
- // order_id,
- // payment_code: "M7531241478305643555"
- // })
- }
- //我的钱包 支付宝支付 支付
- function wallet_paywx(order_id) {
- return request("data/api.auth.TopUp/payment", {
- order_id,
- payment_code: "M7625469023871354552",
- p_type: 2
- })
- }
- //我的钱包 微信支付 支付
- function wallet_payzfb(order_id) {
- return request("data/api.auth.TopUp/payment", {
- order_id,
- payment_code: "M7625469023871354552",
- p_type: 1,
- pay_type: 1
- })
- }
- //我的钱包 提现 type:alipay_account支付宝 wechat_wallet微信 amount:数量 alipay_user:支付宝姓名 alipay_code:微信或者支付宝账号
- function wallet_with(data) {
- return request("/data/api.auth.Transfer/add", data)
- }
- //余额明细
- function mx(limit, page) {
- return request("data/api.auth.center/msgAccount", {
- limit,
- page
- })
- }
- //转售记录
- function resale_history(limit, page) {
- return request("data/api.auth.mark/getSellLog", {
- limit,
- page
- }, "GET")
- }
- //取消转售
- function cancel_resale(id) {
- return request("data/api.auth.mark/undo", {
- id
- }, "GET")
- }
- //修改支付密码 验证码 旧支付密码 新支付密码 确认支付密码
- function update_paypass(verify, oldPwd, newPwd, truePwd) {
- return request("data/api.auth.center/setPayPwd", {
- verify,
- oldPwd,
- newPwd,
- truePwd
- })
- }
- // 排行榜
- function reak(limit, page) {
- return request('data/api.auth.rank/rank', {
- limit,
- page
- }, "GET")
- }
- // 商品编号
- function getGoodsList(page, limit, sort, jin, goods_id) {
- return request('data/api.auth.mark/getGoodsList', {
- page,
- limit,
- sort,
- jin,
- goods_id
- }, "GET")
- }
- //藏品折叠
- function collection_fold(limit, page, name) {
- return request("data/api.auth.collection/getUserCollection1", {
- limit,
- page,
- name
- }, "GET")
- }
- function collection_fold_info(collection_id, limit, page) {
- return request("data/api.auth.collection/getInfo1", {
- collection_id,
- limit,
- page
- }, "GET")
- }
- // 首页发售订阅
- function subscribe() {
- return request('data/api.auth.collection/subscribe', {}, "GET")
- }
- // 取消藏品订单
- function cancel1(order_id) {
- return request('data/api.auth.order/cancel1', {
- order_id
- })
- }
- // 藏品寄售
- function jishou(id) {
- return request('data/api.auth.collection/jishou', {
- id
- }, "GET")
- }
- // 第二版市场合成部分
- // 抽签预约
- function appointment(id) {
- return request('data/api.auth.draw/draw', {
- id
- })
- }
- function reMsg(id) {
- return request('/data/api.auth.center/reMsg', {
- id
- })
- }
- function msgList(limit, page) {
- return request('/data/api.auth.center/msgList', {
- limit,
- page
- })
- }
- // 获取标签
- function getMark1(get_type) {
- return request('data/api.News/getMark', {
- get_type
- }, 'GET')
- }
- // 咨询内容
- function getItem1(type, limit, page, mark) {
- return request('data/api.News/getItem', {
- type,
- limit,
- page,
- mark
- }, 'GET')
- }
- // 辟谣墙列表
- function piyaoList() {
- return request('data/api.News/piyaoList', {})
- }
- // 我要提问
- function piyaoConsult(imgs, matter, content, is_anonymous) {
- return request('data/api.auth.Center/piyaoConsult', {
- imgs,
- matter,
- content,
- is_anonymous
- })
- }
- // 我的水晶
- function Integral() {
- return request('data/api.auth.Integral/get', {})
- }
- // 商品详情
- function goodsInfo(id) {
- return request('data/api.auth.Integral/goodsInfo', {
- id
- })
- }
- // 盲盒记录
- function getBindOpen(id, limit, page) {
- return request('data/api.auth.bind/getBindOpen', {
- id,
- limit,
- page
- }, 'GET')
- }
- // 创作者列表
- function Creator(id, limit, page) {
- return request('data/api.data/Creator', {
- id,
- limit,
- page
- }, 'GET')
- }
- // 藏品详情的寄售记录
- function transferRecord(limit, page, collection_id, order_no) {
- return request('data/api.auth.mark/transferRecord', {
- limit,
- page,
- collection_id,
- order_no
- }, 'GET')
- }
- // 品牌方
- function Brand(limit, page) {
- return request('data/api.data/Brand', {
- limit,
- page
- }, 'GET')
- }
- // 首页精选活动
- function baseMode() {
- return request('data/api.data/baseMode', {
- }, 'GET')
- }
- // 商品详情
- function IntegralgoodsInfo(id) {
- return request('data/api.auth.Integral/goodsInfo', {
- id
- })
- }
- // 积分账单
- function bill(page, limit, type, date, types) {
- return request('data/api.auth.Integral/bill', {
- page,
- limit,
- type,
- date,
- types
- })
- }
- function user_coll(coll_id) {
- return request('data/api.auth.Center/user_coll', {
- coll_id
- })
- }
- function heList(coll_id) {
- return request('data/api.auth.Synthetic/heList', {
- coll_id
- }, 'GET')
- }
- // 抽签预约
- function collectionAppointment(collection_id) {
- return request('data/api.auth.draw/collectionAppointment', {
- collection_id
- }, 'GET')
- }
- function getUserMessage(pages, limit) {
- return request('data/api.auth.news/getUserMessage', {
- pages,
- limit
- }, 'GET')
- }
- function Ismessage() {
- return request('data/api.auth.news/Ismessage', {}, 'GET')
- }
- function confirmColl(id, collection_id, collection_user_id) {
- return request('data/api.auth.Synthetic/confirmColl', {
- id,
- collection_id,
- collection_user_id
- }, 'GET')
- }
- // 市场分类
- function getCategory(limit) {
- return request('data/api.auth.mark/getCategory', {
- limit
- }, 'GET')
- }
- function open() {
- return request('data/api.auth.Center/open', {
- })
- }
- function getHot() {
- return request('/data/api.auth.Draw/getHot', {
- }, 'GET')
- }
- export default {
- getHot,
- open,
- getCategory,
- confirmColl,
- Ismessage,
- getUserMessage,
- collectionAppointment,
- heList,
- user_coll,
- bill,
- IntegralgoodsInfo,
- baseMode,
- Brand,
- transferRecord,
- Creator,
- getBindOpen,
- goodsInfo,
- Integral,
- piyaoConsult,
- piyaoList,
- getItem1,
- getMark1,
- msgList,
- reMsg,
- appointment,
- cancel1,
- login,
- register,
- smsCode,
- get_user_info,
- forget,
- feedback,
- popular,
- new_list,
- box_list,
- collection_info,
- create_order,
- balancepay,
- zfbpay,
- jishou,
- wxpay,
- box_balancepay,
- box_zfbpay,
- box_wxpay,
- box_info,
- collection,
- mycollection,
- collection2_info,
- set_user_info,
- oldtel,
- newtel,
- createboxorder,
- authentication,
- team,
- about,
- aboutall,
- loginVer,
- banner,
- order_list,
- search_user,
- givesome,
- my_box,
- get_increase_all,
- get_notice,
- get_notice_list,
- get_notice_info,
- open_box,
- get_islineup,
- givesome_box,
- // 第一部分结束
- compound_list,
- compound_details,
- compound,
- compound_history,
- market_list,
- market_details,
- get_collection,
- get_box,
- resale,
- create_market_order,
- market_paybalance,
- market_payzfb,
- market_paywx,
- recharge,
- wallet_paybalance,
- wallet_payzfb,
- wallet_paywx,
- wallet_with,
- mx,
- resale_history,
- cancel_resale,
- update_paypass,
- reak,
- getGoodsList,
- collection_fold,
- collection_fold_info,
- subscribe,
- graphVer
- }
|