123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108 |
- import fly from '../api/request.js'
- // 用户登录
- export function userLogin(code) {
- return fly.request({
- url: '/auth/mobile/token/social?grant_type=mobil&mobile=MINI@'+code,
- method: 'post',
- headers:{
- 'Authorization': 'Basic dGVzdDp0ZXN0'
- }
- })
- }
- // 获取验证码
- export function getSmsCode(mobile) {
- return fly.request({
- url: '/admin/mobile/'+mobile,
- method: 'get',
- headers:{
- 'Authorization': 'Basic dGVzdDp0ZXN0'
- }
- })
- }
- // 输入验证码获取token
- export function getSmsToken(mobile, code) {
- return fly.request({
- url: `/auth/mobile/token/sms?mobile=SMS@${mobile}&code=${code}&grant_type=mobile`,
- method: 'post',
- headers:{
- 'Authorization': 'Basic dGVzdDp0ZXN0'
- }
- })
- }
- // 输入验证码获取token
- export function bindOpenId(code) {
- return fly.request({
- url: `/admin/social/bind?state=MINI&code=${code}`,
- method: 'post'
- })
- }
- // 获取用户信息,判断token是否过期
- export function getUserInfo() {
- return fly.request({
- url: '/admin/user/info',
- method: 'get'
- })
- }
- // 获取样品单列表
- export function getSampleList(form) {
- return fly.request({
- url: '/inventory/sample/page',
- method: 'get',
- params: form
- })
- }
- // 获取样品单详情
- export function getSampleDetail(sdpId) {
- return fly.request({
- url: `/inventory/sample/${sdpId}`,
- method: 'get'
- })
- }
- // 获取样品单qa日志
- export function getSampleQaLog(sdpId) {
- return fly.request({
- url: `/inventory/sample/qalog/upload/${sdpId}`,
- method: 'get'
- })
- }
- // 修改样品单qa日志
- export function changeSampleQaLog(sdpId,mark) {
- return fly.request({
- url: `/inventory/sample/qalog/upload/picture?sdpId=${sdpId}&mark=${mark}`,
- method: 'put'
- })
- }
- // 添加样品单qa日志
- export function addSampleQaLog(sdpId,mark) {
- return fly.request({
- url: `/inventory/sample/qalog/upload/log?sdpId=${sdpId}&mark=${mark}`,
- method: 'post'
- })
- }
- // 添加qa图片
- export function addSamplePic(form) {
- return fly.request({
- url: `/inventory/sample/qalog/upload/picture?sdpId=${sdpId}`,
- method: 'post',
- data: form
- })
- }
- // 删除qa图片
- export function delSamplePic(sdpId, url) {
- return fly.request({
- url: `/inventory/sample/qalog/upload/picture?sdpId=${sdpId}&url=${url}`,
- method: 'delete'
- })
- }
|