|
@@ -129,7 +129,7 @@ let app = getApp();
|
|
|
var appEv = app.$vm.$options;
|
|
var appEv = app.$vm.$options;
|
|
|
import uniPopup from '@/components/uni-popup/uni-popup.vue'
|
|
import uniPopup from '@/components/uni-popup/uni-popup.vue'
|
|
|
import authorizeModule from '@/components/authorize-module/index'
|
|
import authorizeModule from '@/components/authorize-module/index'
|
|
|
-import { get, post } from "@/request/api.js";
|
|
|
|
|
|
|
+import { get, post, u_post } from "@/request/api.js";
|
|
|
export default {
|
|
export default {
|
|
|
components: { uniPopup, authorizeModule },
|
|
components: { uniPopup, authorizeModule },
|
|
|
data() {
|
|
data() {
|
|
@@ -177,9 +177,7 @@ export default {
|
|
|
methods: {
|
|
methods: {
|
|
|
loadData: function() {
|
|
loadData: function() {
|
|
|
let that = this;
|
|
let that = this;
|
|
|
- post("ShuZiTeaIntegral/integral/integralInfoNew", {
|
|
|
|
|
- userId: 2064
|
|
|
|
|
- }).then(res => {
|
|
|
|
|
|
|
+ u_post("ShuZiTeaIntegral/integral/integralInfoNew").then(res => {
|
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
|
that.integerInfo = res.integerInfo
|
|
that.integerInfo = res.integerInfo
|
|
|
that.userInof = res.userInof
|
|
that.userInof = res.userInof
|
|
@@ -220,9 +218,7 @@ export default {
|
|
|
// 签到
|
|
// 签到
|
|
|
setSignIn: function() {
|
|
setSignIn: function() {
|
|
|
let that = this;
|
|
let that = this;
|
|
|
- post("ShuZiTeaIntegral/integral/reportNew", {
|
|
|
|
|
- userId: 2064
|
|
|
|
|
- }).then(res => {
|
|
|
|
|
|
|
+ u_post("ShuZiTeaIntegral/integral/reportNew").then(res => {
|
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
|
console.log(res)
|
|
console.log(res)
|
|
|
appEv.errTips(res.msg)
|
|
appEv.errTips(res.msg)
|
|
@@ -259,9 +255,7 @@ export default {
|
|
|
let obj = res.goods
|
|
let obj = res.goods
|
|
|
that.goods = []
|
|
that.goods = []
|
|
|
if (obj.length > 0) {
|
|
if (obj.length > 0) {
|
|
|
- for (var i in obj) {
|
|
|
|
|
- that.goods.push(obj[i])
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ that.goods = [...that.goods,...obj]
|
|
|
} else {
|
|
} else {
|
|
|
if (page == 1) {
|
|
if (page == 1) {
|
|
|
that.haveGoods = true
|
|
that.haveGoods = true
|
|
@@ -285,7 +279,7 @@ export default {
|
|
|
// 获取兑换方式
|
|
// 获取兑换方式
|
|
|
integralMethodChange: function() {
|
|
integralMethodChange: function() {
|
|
|
let that = this;
|
|
let that = this;
|
|
|
- post("ShuZiTeaIntegral/integral/integralMethodChange").then(res => {
|
|
|
|
|
|
|
+ u_post("ShuZiTeaIntegral/integral/integralMethodChange").then(res => {
|
|
|
if (res.status == 200) {
|
|
if (res.status == 200) {
|
|
|
that.way_list = res.data
|
|
that.way_list = res.data
|
|
|
}
|
|
}
|
|
@@ -331,28 +325,24 @@ export default {
|
|
|
} else {
|
|
} else {
|
|
|
data.jeType = 3
|
|
data.jeType = 3
|
|
|
}
|
|
}
|
|
|
-
|
|
|
|
|
- const info = reqApi.integralClickExchange(data)
|
|
|
|
|
- if (info) {
|
|
|
|
|
- info.then(res => {
|
|
|
|
|
- if (res.status == 200) {
|
|
|
|
|
- appEv.errTips(res.msg)
|
|
|
|
|
- let goodsId = that.goodsId;
|
|
|
|
|
- let count = 1;
|
|
|
|
|
- let goodsType = 5;
|
|
|
|
|
- let ojsType = 1;
|
|
|
|
|
- let payType = !isShow ? 3 : isShow && pay_way == 0 ? 4 : isShow && pay_way == 1 ? 5 : isShow && that.way_list[that.currrent].Integral == 0 ? 6 : ''
|
|
|
|
|
- setTimeout(() => {
|
|
|
|
|
- uni.navigateTo({
|
|
|
|
|
- url: '/pages/to-pay-list/index?goodsId=' + goodsId + "&count=" + count + '&goodsType=' + goodsType + '&ojsType=' + ojsType + '&payType=' + payType
|
|
|
|
|
- })
|
|
|
|
|
- }, 800)
|
|
|
|
|
- } else {
|
|
|
|
|
- appEv.errTips(res.msg)
|
|
|
|
|
- that.isShow = true;
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ u_post("ShuZiTeaIntegral/integral/integralMethodChange",data).then(res => {
|
|
|
|
|
+ if (res.status == 200) {
|
|
|
|
|
+ appEv.errTips(res.msg)
|
|
|
|
|
+ let goodsId = that.goodsId;
|
|
|
|
|
+ let count = 1;
|
|
|
|
|
+ let goodsType = 5;
|
|
|
|
|
+ let ojsType = 1;
|
|
|
|
|
+ let payType = !isShow ? 3 : isShow && pay_way == 0 ? 4 : isShow && pay_way == 1 ? 5 : isShow && that.way_list[that.currrent].Integral == 0 ? 6 : ''
|
|
|
|
|
+ setTimeout(() => {
|
|
|
|
|
+ uni.navigateTo({
|
|
|
|
|
+ url: '/pages/to-pay-list/index?goodsId=' + goodsId + "&count=" + count + '&goodsType=' + goodsType + '&ojsType=' + ojsType + '&payType=' + payType
|
|
|
|
|
+ })
|
|
|
|
|
+ }, 800)
|
|
|
|
|
+ } else {
|
|
|
|
|
+ appEv.errTips(res.msg)
|
|
|
|
|
+ that.isShow = true;
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
},
|
|
},
|
|
|
// 更改协议选中情况
|
|
// 更改协议选中情况
|
|
|
checkboxChange: function(e) {
|
|
checkboxChange: function(e) {
|