From 8a54a8fe07ebd6cfb6393d750287671677d8fb77 Mon Sep 17 00:00:00 2001 From: xpz2018 <107107461@qq.com> Date: Fri, 15 Jan 2021 10:36:17 +0800 Subject: [PATCH] no message --- pages/api/axios.js | 4 ++-- pages/home/pinfo/index.js | 4 +--- pages/html/integral/index.js | 2 +- pages/message/index/index.js | 2 +- pages/message/index/index.wxml | 2 +- pages/payment/index.js | 2 +- pages/purchase/ability/index.js | 16 +++------------- pages/purchase/create/index.js | 3 --- pages/purchase/detail/index.js | 2 -- pages/shop/detail/index.js | 3 +-- pages/shop/index/index.js | 2 +- pages/shop/order/index.js | 16 +++------------- pages/withdrawal/checkout/index.js | 4 +--- pages/withdrawal/vcheckout/index.js | 2 +- 14 files changed, 17 insertions(+), 47 deletions(-) diff --git a/pages/api/axios.js b/pages/api/axios.js index a9d9948..68fddf1 100644 --- a/pages/api/axios.js +++ b/pages/api/axios.js @@ -14,10 +14,10 @@ const axios = (function () { c = this.interceptors.request.func(c) c.url = c.url.startsWith("http") ? c.url : c.baseUrl + c.url c.success = (res) => { - resolve(this.interceptors.response.func(res)); + resolve(this.interceptors.response.func(res)) } c.fail = (res) => { - reject(this.interceptors.response.func(res)); + reject(this.interceptors.response.func(res)) } wx.request(c) }) diff --git a/pages/home/pinfo/index.js b/pages/home/pinfo/index.js index b3e87c0..a48c0b6 100644 --- a/pages/home/pinfo/index.js +++ b/pages/home/pinfo/index.js @@ -175,9 +175,7 @@ Page({ updataheadservice2(imgPaths) { var that = this; wx.uploadFile({ - header: { - 'user-token': app.globalData.SessionId - }, + header: { 'user-token': app.globalData.userToken }, url: app.apiHttp + '/saas-user/utils/uploadImage', //你的服务器地址 filePath: imgPaths, //要上传文件资源的路径 name: 'image', //文件对应的 key,开发者在服务端可以通过这个 key 获取文件的二进制内容 diff --git a/pages/html/integral/index.js b/pages/html/integral/index.js index 82855f8..c84d149 100644 --- a/pages/html/integral/index.js +++ b/pages/html/integral/index.js @@ -1,5 +1,5 @@ // pages/ztbvip/index.js -import { getBaseInfo, getTaskList, getPointProduct } from "../../api/ztb" +import { getBaseInfo, getTaskList, getPointList, getPointProduct } from "../../api/ztb" const util = require('../../../utils/util') const events = require('../../../utils/event') import WxCountUp from '../../../utils/countup' diff --git a/pages/message/index/index.js b/pages/message/index/index.js index e2cb14e..5134a93 100644 --- a/pages/message/index/index.js +++ b/pages/message/index/index.js @@ -164,7 +164,7 @@ Page({ this.data.tabIndex = Number(e.detail.key) this.onRefreshList() }, - readMessage: function(){ + readAllMessage: function(){ wx.showLoading({ title: '加载中', mask: true }) readMessage().then(result => { this.setData({ ['tabList[0].badge']: 0, ['tabList[1].badge']: 0 }) diff --git a/pages/message/index/index.wxml b/pages/message/index/index.wxml index 0dd68f5..e4ac086 100644 --- a/pages/message/index/index.wxml +++ b/pages/message/index/index.wxml @@ -14,7 +14,7 @@ - 全部标识已读 + 全部标识已读 diff --git a/pages/payment/index.js b/pages/payment/index.js index 3053115..0bfdc43 100644 --- a/pages/payment/index.js +++ b/pages/payment/index.js @@ -1,4 +1,4 @@ -import { getTradeOrder } from "../api/payment" +import { getTradeOrder, paymentFor } from "../api/payment" const util = require('../../utils/util') const event = require('../../utils/event') const app = getApp() diff --git a/pages/purchase/ability/index.js b/pages/purchase/ability/index.js index 6a57cdf..322a393 100644 --- a/pages/purchase/ability/index.js +++ b/pages/purchase/ability/index.js @@ -1,5 +1,5 @@ // pages/agent/index/index.js -import { paperCategoryList } from "../../api/ztb" +import { paperCategoryList, getProductList } from "../../api/ztb" const app = getApp() Page({ @@ -31,7 +31,6 @@ Page({ }, fetchCateList: function(){ paperCategoryList({ type: 1 }).then(result => { - //成功回调 var cateList = [{id: '', name: '全部'}].concat(result.data) this.setData({ cateList: cateList, cateScroll: cateList.length >= 5 }) }) @@ -91,19 +90,10 @@ Page({ }) } } else { - this.setData({ - finished: true, - requesting: false, - loading: false - }) + this.setData({ finished: true, requesting: false, loading: false }) } }).catch(err => { - //异常回调 - this.setData({ - requesting: false, - finished: true, - loading: false - }) + this.setData({ requesting: false, loading: false }) }) }, lookItem: function (e) { diff --git a/pages/purchase/create/index.js b/pages/purchase/create/index.js index f7a75ea..c7e9ce2 100644 --- a/pages/purchase/create/index.js +++ b/pages/purchase/create/index.js @@ -35,7 +35,6 @@ Page({ wx.showLoading({ title: '加载中', mask: true }) if (options.id) { getPurchaseInfo(options.id).then(result => { - //成功回调 var fileList = [] if (result.data.imgList && result.data.imgList.length) { result.data.imgList.forEach(element => { @@ -120,7 +119,6 @@ Page({ } }, onLoadOptions: function (e) { - // /paperCategoryList 获取纸品列表 const { value } = e.detail const options = [...this.data.cateList] var typeId = parseInt(value[value.length - 1]) @@ -202,7 +200,6 @@ Page({ if (this.data.form.imgList.length >= 1) { this.data.form['coverImgUrl'] = this.data.form.imgList[0] } - // /paperCategoryList 获取纸品列表 if(!util.isEmpty(this.data.form.unitPrice) && !this.data.kg){ this.data.form.unitPrice = math.divide(this.data.form.unitPrice, 1000) } diff --git a/pages/purchase/detail/index.js b/pages/purchase/detail/index.js index 6113dad..1acb7e1 100644 --- a/pages/purchase/detail/index.js +++ b/pages/purchase/detail/index.js @@ -31,7 +31,6 @@ Page({ }, fetchInfo: function (id) { getPurchaseInfo(id).then(result => { - //成功回调 this.setData({ imageHeight: 750, safeBottom: app.globalData.safeBottom, @@ -41,7 +40,6 @@ Page({ }) wx.hideLoading() }).catch(err => { - //异常回调 wx.hideLoading() util.showToast(err) }) diff --git a/pages/shop/detail/index.js b/pages/shop/detail/index.js index 8d8401d..e8d2949 100644 --- a/pages/shop/detail/index.js +++ b/pages/shop/detail/index.js @@ -1,5 +1,5 @@ // pages/shop/detail/index.js -import { getProductList, getStoreProductList } from "../../api/ztb" +import { getStoreInfo, getProductList, getStoreProductList } from "../../api/ztb" const math = require('../../../utils/math') const util = require('../../../utils/util') const app = getApp() @@ -33,7 +33,6 @@ Page({ this.data.form.storeId = options.storeId wx.showLoading({ title: '加载中', mask: true }) getStoreInfo(options.storeId).then(result => { - //成功回调 this.setData({ detail: result.data, imgList: result.data.coverImgUrlList, diff --git a/pages/shop/index/index.js b/pages/shop/index/index.js index 412c2e6..350d944 100644 --- a/pages/shop/index/index.js +++ b/pages/shop/index/index.js @@ -1,5 +1,5 @@ // pages/shop/index/index.js -import { getStoreOverView, getStoreInfo } from "../../api/ztb" +import { getStoreOverView, getStoreInfo, depositStore } from "../../api/ztb" const math = require('../../../utils/math') const util = require('../../../utils/util') const app = getApp() diff --git a/pages/shop/order/index.js b/pages/shop/order/index.js index 5416ddc..cc2a9bb 100644 --- a/pages/shop/order/index.js +++ b/pages/shop/order/index.js @@ -90,26 +90,16 @@ Page({ }) } } else { - this.setData({ - finished: true, - requesting: false, - loading: false - }) + this.setData({ finished: true, requesting: false, loading: false }) } }).catch(err => { - //异常回调 - this.setData({ - requesting: false, - loading: false - }) + this.setData({ requesting: false, loading: false }) util.showToast(err) }) }, lookItem: function (e) { var item = this.data.orderList[e.currentTarget.dataset.page][e.currentTarget.dataset.index] - wx.navigateTo({ - url: '/pages/morder/detail/index?type=1&orderId=' + item.orderId - }) + wx.navigateTo({ url: '/pages/morder/detail/index?type=1&orderId=' + item.orderId }) }, onTabChange: function ({detail}) { if (this.data.tabIndex == detail.index) { diff --git a/pages/withdrawal/checkout/index.js b/pages/withdrawal/checkout/index.js index 2a000fa..fdae059 100644 --- a/pages/withdrawal/checkout/index.js +++ b/pages/withdrawal/checkout/index.js @@ -1,12 +1,11 @@ // pages/withdrawal/checkout/index.js -import { checkPayPassword, getBalanceInfo, getBankCardList } from "../../api/payment" +import { checkPayPassword, getBalanceInfo, getBankCardList, postWithdraw } from "../../api/payment" import { $wuxKeyBoard, $wuxDialog } from '../../../components/index' const util = require('../../../utils/util') // const md5 = require('../../../utils/md5') const math = require('../../../utils/math') Page({ - /** * 页面的初始数据 */ @@ -53,7 +52,6 @@ Page({ * 获取用户数据 */ getUserInfo: function () { - // /account/balance 用户余额 getBalanceInfo().then(res => { this.setData({ accountMoney: res.data.accountMoney, diff --git a/pages/withdrawal/vcheckout/index.js b/pages/withdrawal/vcheckout/index.js index c1f3125..71a9380 100644 --- a/pages/withdrawal/vcheckout/index.js +++ b/pages/withdrawal/vcheckout/index.js @@ -1,5 +1,5 @@ // pages/withdrawal/checkout/index.js -import { getBalanceInfo, getWithdrawalList, getBankCardList } from '../../api/payment' +import { getBalanceInfo, getWithdrawalList, getBankCardList, paymentOrder } from '../../api/payment' import { $wuxDialog } from '../../../components/index' const util = require('../../../utils/util') const math = require('../../../utils/math')