Browse Source

no message

featrue/v4.1
xpz2018 5 years ago
parent
commit
8a54a8fe07
14 changed files with 17 additions and 47 deletions
  1. 4
      pages/api/axios.js
  2. 4
      pages/home/pinfo/index.js
  3. 2
      pages/html/integral/index.js
  4. 2
      pages/message/index/index.js
  5. 2
      pages/message/index/index.wxml
  6. 2
      pages/payment/index.js
  7. 16
      pages/purchase/ability/index.js
  8. 3
      pages/purchase/create/index.js
  9. 2
      pages/purchase/detail/index.js
  10. 3
      pages/shop/detail/index.js
  11. 2
      pages/shop/index/index.js
  12. 16
      pages/shop/order/index.js
  13. 4
      pages/withdrawal/checkout/index.js
  14. 2
      pages/withdrawal/vcheckout/index.js

4
pages/api/axios.js

@ -14,10 +14,10 @@ const axios = (function () {
c = this.interceptors.request.func(c) c = this.interceptors.request.func(c)
c.url = c.url.startsWith("http") ? c.url : c.baseUrl + c.url c.url = c.url.startsWith("http") ? c.url : c.baseUrl + c.url
c.success = (res) => { c.success = (res) => {
resolve(this.interceptors.response.func(res));
resolve(this.interceptors.response.func(res))
} }
c.fail = (res) => { c.fail = (res) => {
reject(this.interceptors.response.func(res));
reject(this.interceptors.response.func(res))
} }
wx.request(c) wx.request(c)
}) })

4
pages/home/pinfo/index.js

@ -175,9 +175,7 @@ Page({
updataheadservice2(imgPaths) { updataheadservice2(imgPaths) {
var that = this; var that = this;
wx.uploadFile({ wx.uploadFile({
header: {
'user-token': app.globalData.SessionId
},
header: { 'user-token': app.globalData.userToken },
url: app.apiHttp + '/saas-user/utils/uploadImage', //你的服务器地址 url: app.apiHttp + '/saas-user/utils/uploadImage', //你的服务器地址
filePath: imgPaths, //要上传文件资源的路径 filePath: imgPaths, //要上传文件资源的路径
name: 'image', //文件对应的 key,开发者在服务端可以通过这个 key 获取文件的二进制内容 name: 'image', //文件对应的 key,开发者在服务端可以通过这个 key 获取文件的二进制内容

2
pages/html/integral/index.js

@ -1,5 +1,5 @@
// pages/ztbvip/index.js // 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 util = require('../../../utils/util')
const events = require('../../../utils/event') const events = require('../../../utils/event')
import WxCountUp from '../../../utils/countup' import WxCountUp from '../../../utils/countup'

2
pages/message/index/index.js

@ -164,7 +164,7 @@ Page({
this.data.tabIndex = Number(e.detail.key) this.data.tabIndex = Number(e.detail.key)
this.onRefreshList() this.onRefreshList()
}, },
readMessage: function(){
readAllMessage: function(){
wx.showLoading({ title: '加载中', mask: true }) wx.showLoading({ title: '加载中', mask: true })
readMessage().then(result => { readMessage().then(result => {
this.setData({ ['tabList[0].badge']: 0, ['tabList[1].badge']: 0 }) this.setData({ ['tabList[0].badge']: 0, ['tabList[1].badge']: 0 })

2
pages/message/index/index.wxml

@ -14,7 +14,7 @@
</wux-tab> </wux-tab>
</wux-tabs> </wux-tabs>
</view> </view>
<wux-button outline type="positive" size="small" bind:click="readMessage">全部标识已读</wux-button>
<wux-button outline type="positive" size="small" bind:click="readAllMessage">全部标识已读</wux-button>
</view> </view>
<view style="height:90rpx;width:100%"></view> <view style="height:90rpx;width:100%"></view>

2
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 util = require('../../utils/util')
const event = require('../../utils/event') const event = require('../../utils/event')
const app = getApp() const app = getApp()

16
pages/purchase/ability/index.js

@ -1,5 +1,5 @@
// pages/agent/index/index.js // pages/agent/index/index.js
import { paperCategoryList } from "../../api/ztb"
import { paperCategoryList, getProductList } from "../../api/ztb"
const app = getApp() const app = getApp()
Page({ Page({
@ -31,7 +31,6 @@ Page({
}, },
fetchCateList: function(){ fetchCateList: function(){
paperCategoryList({ type: 1 }).then(result => { paperCategoryList({ type: 1 }).then(result => {
//成功回调
var cateList = [{id: '', name: '全部'}].concat(result.data) var cateList = [{id: '', name: '全部'}].concat(result.data)
this.setData({ cateList: cateList, cateScroll: cateList.length >= 5 }) this.setData({ cateList: cateList, cateScroll: cateList.length >= 5 })
}) })
@ -91,19 +90,10 @@ Page({
}) })
} }
} else { } else {
this.setData({
finished: true,
requesting: false,
loading: false
})
this.setData({ finished: true, requesting: false, loading: false })
} }
}).catch(err => { }).catch(err => {
//异常回调
this.setData({
requesting: false,
finished: true,
loading: false
})
this.setData({ requesting: false, loading: false })
}) })
}, },
lookItem: function (e) { lookItem: function (e) {

3
pages/purchase/create/index.js

@ -35,7 +35,6 @@ Page({
wx.showLoading({ title: '加载中', mask: true }) wx.showLoading({ title: '加载中', mask: true })
if (options.id) { if (options.id) {
getPurchaseInfo(options.id).then(result => { getPurchaseInfo(options.id).then(result => {
//成功回调
var fileList = [] var fileList = []
if (result.data.imgList && result.data.imgList.length) { if (result.data.imgList && result.data.imgList.length) {
result.data.imgList.forEach(element => { result.data.imgList.forEach(element => {
@ -120,7 +119,6 @@ Page({
} }
}, },
onLoadOptions: function (e) { onLoadOptions: function (e) {
// /paperCategoryList 获取纸品列表
const { value } = e.detail const { value } = e.detail
const options = [...this.data.cateList] const options = [...this.data.cateList]
var typeId = parseInt(value[value.length - 1]) var typeId = parseInt(value[value.length - 1])
@ -202,7 +200,6 @@ Page({
if (this.data.form.imgList.length >= 1) { if (this.data.form.imgList.length >= 1) {
this.data.form['coverImgUrl'] = this.data.form.imgList[0] this.data.form['coverImgUrl'] = this.data.form.imgList[0]
} }
// /paperCategoryList 获取纸品列表
if(!util.isEmpty(this.data.form.unitPrice) && !this.data.kg){ if(!util.isEmpty(this.data.form.unitPrice) && !this.data.kg){
this.data.form.unitPrice = math.divide(this.data.form.unitPrice, 1000) this.data.form.unitPrice = math.divide(this.data.form.unitPrice, 1000)
} }

2
pages/purchase/detail/index.js

@ -31,7 +31,6 @@ Page({
}, },
fetchInfo: function (id) { fetchInfo: function (id) {
getPurchaseInfo(id).then(result => { getPurchaseInfo(id).then(result => {
//成功回调
this.setData({ this.setData({
imageHeight: 750, imageHeight: 750,
safeBottom: app.globalData.safeBottom, safeBottom: app.globalData.safeBottom,
@ -41,7 +40,6 @@ Page({
}) })
wx.hideLoading() wx.hideLoading()
}).catch(err => { }).catch(err => {
//异常回调
wx.hideLoading() wx.hideLoading()
util.showToast(err) util.showToast(err)
}) })

3
pages/shop/detail/index.js

@ -1,5 +1,5 @@
// pages/shop/detail/index.js // pages/shop/detail/index.js
import { getProductList, getStoreProductList } from "../../api/ztb"
import { getStoreInfo, getProductList, getStoreProductList } from "../../api/ztb"
const math = require('../../../utils/math') const math = require('../../../utils/math')
const util = require('../../../utils/util') const util = require('../../../utils/util')
const app = getApp() const app = getApp()
@ -33,7 +33,6 @@ Page({
this.data.form.storeId = options.storeId this.data.form.storeId = options.storeId
wx.showLoading({ title: '加载中', mask: true }) wx.showLoading({ title: '加载中', mask: true })
getStoreInfo(options.storeId).then(result => { getStoreInfo(options.storeId).then(result => {
//成功回调
this.setData({ this.setData({
detail: result.data, detail: result.data,
imgList: result.data.coverImgUrlList, imgList: result.data.coverImgUrlList,

2
pages/shop/index/index.js

@ -1,5 +1,5 @@
// pages/shop/index/index.js // pages/shop/index/index.js
import { getStoreOverView, getStoreInfo } from "../../api/ztb"
import { getStoreOverView, getStoreInfo, depositStore } from "../../api/ztb"
const math = require('../../../utils/math') const math = require('../../../utils/math')
const util = require('../../../utils/util') const util = require('../../../utils/util')
const app = getApp() const app = getApp()

16
pages/shop/order/index.js

@ -90,26 +90,16 @@ Page({
}) })
} }
} else { } else {
this.setData({
finished: true,
requesting: false,
loading: false
})
this.setData({ finished: true, requesting: false, loading: false })
} }
}).catch(err => { }).catch(err => {
//异常回调
this.setData({
requesting: false,
loading: false
})
this.setData({ requesting: false, loading: false })
util.showToast(err) util.showToast(err)
}) })
}, },
lookItem: function (e) { lookItem: function (e) {
var item = this.data.orderList[e.currentTarget.dataset.page][e.currentTarget.dataset.index] 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}) { onTabChange: function ({detail}) {
if (this.data.tabIndex == detail.index) { if (this.data.tabIndex == detail.index) {

4
pages/withdrawal/checkout/index.js

@ -1,12 +1,11 @@
// pages/withdrawal/checkout/index.js // 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' import { $wuxKeyBoard, $wuxDialog } from '../../../components/index'
const util = require('../../../utils/util') const util = require('../../../utils/util')
// const md5 = require('../../../utils/md5') // const md5 = require('../../../utils/md5')
const math = require('../../../utils/math') const math = require('../../../utils/math')
Page({ Page({
/** /**
* 页面的初始数据 * 页面的初始数据
*/ */
@ -53,7 +52,6 @@ Page({
* 获取用户数据 * 获取用户数据
*/ */
getUserInfo: function () { getUserInfo: function () {
// /account/balance 用户余额
getBalanceInfo().then(res => { getBalanceInfo().then(res => {
this.setData({ this.setData({
accountMoney: res.data.accountMoney, accountMoney: res.data.accountMoney,

2
pages/withdrawal/vcheckout/index.js

@ -1,5 +1,5 @@
// pages/withdrawal/checkout/index.js // 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' import { $wuxDialog } from '../../../components/index'
const util = require('../../../utils/util') const util = require('../../../utils/util')
const math = require('../../../utils/math') const math = require('../../../utils/math')

Loading…
Cancel
Save