From 71fceeed24d3d78ab09253aca9f73415420bf745 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E7=AD=89=E9=A3=8E=E6=9D=A5?= <136327134@qq.com>
Date: Wed, 12 Sep 2018 18:54:09 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dbug?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
application/routine/view/crmebN/app.js | 306 +++++-----
application/routine/view/crmebN/app.json | 2 +
.../crmebN/pages/integral-con/integral-con.js | 62 +-
.../pages/integral-con/integral-con.wxml | 22 +-
.../pages/order-confirm/order-confirm.js | 5 +-
.../crmebN/pages/orders-con/orders-con.js | 533 +++++++++---------
.../view/crmebN/pages/payment/payment.js | 8 +
.../view/crmebN/pages/payment/payment.wxml | 2 +-
.../view/crmebN/pages/product-con/index.wxml | 4 +-
.../crmebN/pages/product-countdown/index.wxml | 8 +-
.../crmebN/pages/product-countdown/index.wxss | 7 +-
.../crmebN/pages/product-pinke/index.wxml | 15 +-
.../crmebN/pages/product-pinke/index.wxss | 4 +-
.../crmebN/pages/refund-order/refund-order.js | 7 +-
.../crmebN/pages/refund-page/refund-page.js | 8 +-
.../routine/view/crmebN/pages/user/user.js | 293 ++++------
.../routine/view/crmebN/pages/user/user.wxml | 11 +-
.../routine/view/crmebN/project.config.json | 2 +-
18 files changed, 662 insertions(+), 637 deletions(-)
diff --git a/application/routine/view/crmebN/app.js b/application/routine/view/crmebN/app.js
index cf47c0ee..efd46faf 100644
--- a/application/routine/view/crmebN/app.js
+++ b/application/routine/view/crmebN/app.js
@@ -2,155 +2,169 @@
var app = getApp();
// var wxh = require('../../utils/wxh.js');
App({
- onLaunch: function () {
- // 展示本地存储能力
- var that = this;
- var logs = wx.getStorageSync('logs') || []
- logs.unshift(Date.now())
- wx.setStorageSync('logs', logs)
- that.getRoutineStyle();
- },
- globalData: {
- routineStyle:'#ffffff',
- uid: null,
- openPages:'',
- spid:0,
- urlImages: '',
- url: 'https://shop.crmeb.net/'
- },
- getRoutineStyle:function(){
- var that = this;
- wx.request({
- url: that.globalData.url + '/routine/login/get_routine_style',
- method: 'post',
- dataType : 'json',
- success: function (res) {
- that.globalData.routineStyle = res.data.data.routine_style;
- that.setBarColor();
- }
- })
- },
- setBarColor:function(){
- var that = this;
- wx.setNavigationBarColor({
- frontColor: '#000000',
- backgroundColor: that.globalData.routineStyle,
- })
- },
- setUserInfo : function(){
- var that = this;
- if (that.globalData.uid == null) {//是否存在用户信息,如果不存在跳转到首页
- wx.showToast({
- title: '用户信息获取失败',
- icon: 'none',
- duration: 1500,
- })
- setTimeout(function () {
- wx.navigateTo({
- url: '/pages/enter/enter',
- })
- }, 2000)
- }
- },
- getUserInfo: function () {
- var that = this;
- wx.getUserInfo({
- lang: 'zh_CN',
- success: function (res) {
- var userInfo = res.userInfo
- wx.login({
- success: function (res) {
- if (res.code) {
- userInfo.code = res.code;
- userInfo.spid = that.globalData.spid;
- wx.request({
- url: that.globalData.url + '/routine/login/index',
- method: 'post',
- dataType : 'json',
- data: {
- info: userInfo
- },
- success: function (res) {
- that.globalData.uid = res.data.data.uid;
- if (!res.data.data.status){
- wx.redirectTo({
- url: '/pages/login-status/login-status',
- })
- }
- if (that.globalData.openPages != '') {
- wx.reLaunch({
- url: that.globalData.openPages
- })
- } else {
- wx.switchTab({
- url: '/pages/index/index'
- })
- }
- },
- fail: function () {
- console.log('获取用户信息失败');
- wx.navigateTo({
- url: '/pages/enter/enter',
- })
- },
- })
- } else {
- console.log('登录失败!' + res.errMsg)
+ onLaunch: function () {
+ // 展示本地存储能力
+ var that = this;
+ var logs = wx.getStorageSync('logs') || []
+ logs.unshift(Date.now())
+ wx.setStorageSync('logs', logs)
+ that.getRoutineStyle();
+ },
+ globalData: {
+ routineStyle:'#ffffff',
+ uid: null,
+ openPages:'',
+ spid:0,
+ urlImages: '',
+ url: 'https://shop.crmeb.net/'
+ },
+ getRoutineStyle:function(){
+ var that = this;
+ wx.request({
+ url: that.globalData.url + '/routine/login/get_routine_style',
+ method: 'post',
+ dataType : 'json',
+ success: function (res) {
+ that.globalData.routineStyle = res.data.data.routine_style;
+ that.setBarColor();
}
- },
- fail: function () {
- console.log('获取用户信息失败');
- wx.navigateTo({
- url: '/pages/enter/enter',
+ })
+ },
+ setBarColor:function(){
+ var that = this;
+ wx.setNavigationBarColor({
+ frontColor: '#000000',
+ backgroundColor: that.globalData.routineStyle,
+ })
+ },
+ setUserInfo : function(){
+ var that = this;
+ if (that.globalData.uid == null) {//是否存在用户信息,如果不存在跳转到首页
+ wx.showToast({
+ title: '用户信息获取失败',
+ icon: 'none',
+ duration: 1500,
})
- },
+ setTimeout(function () {
+ wx.navigateTo({
+ url: '/pages/enter/enter',
+ })
+ }, 2000)
+ }
+ },
+ getUserInfo: function () {
+ var that = this;
+ wx.getUserInfo({
+ lang: 'zh_CN',
+ success: function (res) {
+ var userInfo = res.userInfo
+ wx.login({
+ success: function (res) {
+ if (res.code) {
+ userInfo.code = res.code;
+ userInfo.spid = that.globalData.spid;
+ wx.request({
+ url: that.globalData.url + '/routine/login/index',
+ method: 'post',
+ dataType : 'json',
+ data: {
+ info: userInfo
+ },
+ success: function (res) {
+ that.globalData.uid = res.data.data.uid;
+ if (!res.data.data.status){
+ wx.redirectTo({
+ url: '/pages/login-status/login-status',
+ })
+ }
+ if (that.globalData.openPages != '') {
+ wx.navigateTo({
+ url: that.globalData.openPages
+ })
+ } else {
+ wx.switchTab({
+ url: '/pages/index/index'
+ })
+ }
+ },
+ fail: function () {
+ console.log('获取用户信息失败');
+ wx.navigateTo({
+ url: '/pages/enter/enter',
+ })
+ },
+ })
+ } else {
+ console.log('登录失败!' + res.errMsg)
+ }
+ },
+ fail: function () {
+ console.log('获取用户信息失败');
+ wx.navigateTo({
+ url: '/pages/enter/enter',
+ })
+ },
+ })
+ },
+ fail:function(){
+ console.log('获取用户信息失败');
+ wx.navigateTo({
+ url: '/pages/enter/enter',
+ })
+ },
})
- },
- fail:function(){
- console.log('获取用户信息失败');
- wx.navigateTo({
- url: '/pages/enter/enter',
- })
- },
- })
- },
- getUserInfoEnter: function () {
- var that = this;
- wx.getUserInfo({
- lang: 'zh_CN',
- success: function (res) {
- var userInfo = res.userInfo
- wx.login({
- success: function (res) {
- if (res.code) {
- userInfo.code = res.code;
- userInfo.spid = that.globalData.spid;
- wx.request({
- url: that.globalData.url + '/routine/login/index',
- method: 'post',
- dataType : 'json',
- data: {
- info: userInfo
- },
- success: function (res) {
- that.globalData.uid = res.data.data.uid;
- if (that.globalData.openPages != '') {
- wx.reLaunch({
- url: that.globalData.openPages
- })
- } else {
- wx.reLaunch({
- url: '/pages/index/index'
- })
- }
- }
- })
- } else {
- console.log('登录失败!' + res.errMsg)
+ },
+ getUserInfoEnter: function () {
+ var that = this;
+ wx.getUserInfo({
+ lang: 'zh_CN',
+ success: function (res) {
+ var userInfo = res.userInfo
+ wx.login({
+ success: function (res) {
+ if (res.code) {
+ userInfo.code = res.code;
+ userInfo.spid = that.globalData.spid;
+ wx.request({
+ url: that.globalData.url + '/routine/login/index',
+ method: 'post',
+ dataType : 'json',
+ data: {
+ info: userInfo
+ },
+ success: function (res) {
+ that.globalData.uid = res.data.data.uid;
+ if (that.globalData.openPages != '') {
+ wx.navigateTo({
+ url: that.globalData.openPages
+ })
+ } else {
+ wx.reLaunch({
+ url: '/pages/index/index'
+ })
+ }
+ }
+ })
+ } else {
+ console.log('登录失败!' + res.errMsg)
+ }
+ },
+ fail: function (res) {
+ wx.showToast({
+ title: '授权失败,请重新打开小程序',
+ icon: 'none',
+ duration: 1500,
+ })
+ }
+ })
+ },
+ fail: function (res) {
+ wx.showToast({
+ title: '授权失败,请重新授权',
+ icon: 'none',
+ duration: 1500,
+ })
}
- }
})
- }
- })
- },
+ },
})
\ No newline at end of file
diff --git a/application/routine/view/crmebN/app.json b/application/routine/view/crmebN/app.json
index 32513e56..33c763c0 100644
--- a/application/routine/view/crmebN/app.json
+++ b/application/routine/view/crmebN/app.json
@@ -18,6 +18,7 @@
"pages/spread/spread",
"pages/promotion-order/promotion-order",
"pages/coupon/coupon",
+ "pages/cut-list/cut-list",
"pages/news-list/news-list",
"pages/product-con/index",
"pages/product-pinke/index",
@@ -33,6 +34,7 @@
"pages/integral-con/integral-con",
"pages/orders-con/orders-con",
"pages/order-confirm/order-confirm",
+ "pages/pink-list/index",
"pages/productSort/productSort",
"pages/address/address",
"pages/feree/feree",
diff --git a/application/routine/view/crmebN/pages/integral-con/integral-con.js b/application/routine/view/crmebN/pages/integral-con/integral-con.js
index 982c7688..e4673e00 100644
--- a/application/routine/view/crmebN/pages/integral-con/integral-con.js
+++ b/application/routine/view/crmebN/pages/integral-con/integral-con.js
@@ -1,18 +1,52 @@
// pages/integral-con/integral-con.js
+var app = getApp();
Page({
/**
* 页面的初始数据
*/
data: {
-
+ userInfo:[],
+ integralInfo:[],
+ first:0,
+ limit:8,
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
-
+ this.getUserInfo();
+ this.getList();
+ },//user_integral_list
+ getList:function(){
+ var that = this;
+ wx.request({
+ url: app.globalData.url + '/routine/auth_api/user_integral_list?uid=' + app.globalData.uid,
+ method: 'GET',
+ data:{
+ first: that.data.first,
+ limit: that.data.limit,
+ },
+ success: function (res) {
+ that.setData({
+ integralInfo: res.data.data,
+ })
+ }
+ });
+ },
+ getUserInfo:function(){
+ var that = this;
+ wx.request({
+ url: app.globalData.url + '/routine/auth_api/my?uid=' + app.globalData.uid,
+ method: 'POST',
+ success: function (res) {
+ that.setData({
+ userInfo: res.data.data,
+ })
+ console.log(that.data.userInfo);
+ }
+ });
},
/**
@@ -54,7 +88,29 @@ Page({
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
-
+ var that = this;
+ var first = that.data.first;
+ var limit = that.data.limit;
+ if (!first) first = 1;
+ var startpage = limit * first;
+ wx.request({
+ url: app.globalData.url + '/routine/auth_api/user_integral_list?uid=' + app.globalData.uid,
+ method: 'GET',
+ data: {
+ first: startpage,
+ limit: that.data.limit,
+ },
+ success: function (res) {
+ var len = res.data.data.length;
+ for (var i = 0; i < len; i++) {
+ that.data.integralInfo.push(res.data.data[i])
+ }
+ that.setData({
+ first: first + 1,
+ integralInfo: that.data.integralInfo
+ });
+ }
+ });
},
/**
diff --git a/application/routine/view/crmebN/pages/integral-con/integral-con.wxml b/application/routine/view/crmebN/pages/integral-con/integral-con.wxml
index d0f5fa93..dd80cbb7 100644
--- a/application/routine/view/crmebN/pages/integral-con/integral-con.wxml
+++ b/application/routine/view/crmebN/pages/integral-con/integral-con.wxml
@@ -1,28 +1,30 @@
积分明细
-
+
+
- 支付订单,订单编号178954654145
- 2017/10/10 14:50
+ {{item.mark}}
+ {{item.add_time}}
- -1666积分
+ +{{item.number}}积分
-
+
- 支付订单,订单编号178954654145
- 2017/10/10 14:50
+ {{item.mark}}
+ {{item.add_time}}
- -1666积分
+ -{{item.number}}积分
+
diff --git a/application/routine/view/crmebN/pages/order-confirm/order-confirm.js b/application/routine/view/crmebN/pages/order-confirm/order-confirm.js
index 3ad9dc02..2b21d398 100644
--- a/application/routine/view/crmebN/pages/order-confirm/order-confirm.js
+++ b/application/routine/view/crmebN/pages/order-confirm/order-confirm.js
@@ -315,9 +315,10 @@ Page({
url: '/pages/buycar/buycar'
});
},
- toAddress:function(){
+ toAddress: function () {
+ var that = this;
wx.navigateTo({ //跳转至指定页面并关闭其他打开的所有页面(这个最好用在返回至首页的的时候)
- url: '/pages/addaddress/addaddress?cartId=' + this.data.cartId + '&pinkId=' + that.data.pinkId + '&couponId=' + that.data.couponId
+ url: '/pages/addaddress/addaddress?cartId=' + that.data.cartId + '&pinkId=' + that.data.pinkId + '&couponId=' + that.data.couponId
})
},
getConfirm: function (cartIdsStr){
diff --git a/application/routine/view/crmebN/pages/orders-con/orders-con.js b/application/routine/view/crmebN/pages/orders-con/orders-con.js
index ba441a9a..70e0359f 100644
--- a/application/routine/view/crmebN/pages/orders-con/orders-con.js
+++ b/application/routine/view/crmebN/pages/orders-con/orders-con.js
@@ -3,283 +3,288 @@ var app = getApp();
var wxh = require('../../utils/wxh.js');
Page({
- /**
- * 页面的初始数据
- */
- data: {
- url: app.globalData.urlImages
- },
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ url: app.globalData.urlImages
+ },
- /**
- * 生命周期函数--监听页面加载
- */
- onLoad: function (e) {
- app.setBarColor();
- var header = {
- 'content-type': 'application/x-www-form-urlencoded'
- };
- var uni = e.order_id;
- var that = this;
- wx.showLoading({ title: "正在加载中……" });
- wx.request({
- url: app.globalData.url + '/routine/auth_api/get_order?uid=' + app.globalData.uid,
- data: { uni: uni },
- method: 'get',
- header: header,
- success: function (res) {
- wx.hideLoading();
- that.setData({
- ordercon:res.data.data
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (e) {
+ app.setBarColor();
+ var header = {
+ 'content-type': 'application/x-www-form-urlencoded'
+ };
+ var uni = e.order_id;
+ var that = this;
+ wx.showLoading({ title: "正在加载中……" });
+ wx.request({
+ url: app.globalData.url + '/routine/auth_api/get_order?uid=' + app.globalData.uid,
+ data: { uni: uni },
+ method: 'get',
+ header: header,
+ success: function (res) {
+ wx.hideLoading();
+ that.setData({
+ ordercon:res.data.data
+ });
+ },
+ fail: function (res) {
+ console.log('submit fail');
+ },
+ complete: function (res) {
+ console.log('submit complete');
+ }
});
- },
- fail: function (res) {
- console.log('submit fail');
- },
- complete: function (res) {
- console.log('submit complete');
- }
- });
- },
- getPay:function(e){
- var that = this;
- wx.request({
- url: app.globalData.url + '/routine/auth_api/pay_order?uid=' + app.globalData.uid +'&uni='+e.target.dataset.id,
- method: 'get',
- success: function (res) {
- var data = res.data.data;
- if (res.data.code == 200 && res.data.data.status == 'WECHAT_PAY') {
- var jsConfig = res.data.data.result.jsConfig;
- console.log(jsConfig);
- wx.requestPayment({
- timeStamp: jsConfig.timeStamp,
- nonceStr: jsConfig.nonceStr,
- package: jsConfig.package,
- signType: jsConfig.signType,
- paySign: jsConfig.paySign,
- success: function (res) {
- wx.showToast({
- title: '支付成功',
- icon: 'success',
- duration: 1000,
- })
- setTimeout(function () {
- wx.navigateTo({ //跳转至指定页面并关闭其他打开的所有页面(这个最好用在返回至首页的的时候)
- url: '/pages/orders-con/orders-con?order_id=' + data.result.orderId
- })
- }, 1200)
- },
- fail: function (res) {
- wx.showToast({
- title: '支付失败',
- icon: 'success',
- duration: 1000,
- })
- // setTimeout(function () {
- // wx.navigateTo({
- // url: '/pages/orders-con/orders-con?order_id=' + data.result.orderId
- // })
- // }, 1200)
- },
- complete: function (res) {
- console.log(res);
- if (res.errMsg == 'requestPayment:cancel') {
- wx.showToast({
- title: '取消支付',
- icon: 'none',
- duration: 1000,
- })
- // setTimeout(function () {
- // wx.navigateTo({ //跳转至指定页面并关闭其他打开的所有页面(这个最好用在返回至首页的的时候)
- // url: '/pages/orders-con/orders-con?order_id=' + data.result.orderId
- // })
- // }, 1200)
- }
- },
- })
- } else if (res.data.code == 200){
- wx.showToast({
- title: res.data.msg,
- icon: 'success',
- duration: 2000
- })
- setTimeout(function () {
- wx.navigateTo({ //跳转至指定页面并关闭其他打开的所有页面(这个最好用在返回至首页的的时候)
- url: '/pages/orders-con/orders-con?order_id=' + data.result.orderId
- })
- }, 1200)
- }else{
- wx.showToast({
- title: res.data.msg,
- icon: 'none',
- duration: 2000
- })
- setTimeout(function () {
- wx.navigateTo({ //跳转至指定页面并关闭其他打开的所有页面(这个最好用在返回至首页的的时候)
- url: '/pages/orders-con/orders-con?order_id=' + data.result.orderId
- })
- }, 1200)
- }
- },
- fail: function (res) {
- console.log('submit fail');
- }
- });
- },
- delOrder:function(e){
- var header = {
- 'content-type': 'application/x-www-form-urlencoded'
- };
- var uni = e.currentTarget.dataset.uni;
- var that = this;
- wx.showModal({
- title: '确认删除订单?',
- content: '订单删除后将无法查看',
- success: function (res) {
- if (res.confirm) {
- wx.request({
- url: app.globalData.url + '/routine/auth_api/user_remove_order?uid=' + app.globalData.uid,
- data: { uni: uni },
+ },
+ getPay:function(e){
+ var that = this;
+ wx.request({
+ url: app.globalData.url + '/routine/auth_api/pay_order?uid=' + app.globalData.uid +'&uni='+e.target.dataset.id,
method: 'get',
- header: header,
success: function (res) {
- if (res.data.code == 200) {
- wx.showToast({
- title: '成功',
- icon: 'success',
- duration: 2000
- })
- } else {
- wx.showToast({
- title: res.data.msg,
- icon: 'none',
- duration: 2000
- })
- }
- // that.setData({
- // ordercon: that.data.ordercon
- // });
+ var data = res.data.data;
+ if (res.data.code == 200 && res.data.data.status == 'WECHAT_PAY') {
+ var jsConfig = res.data.data.result.jsConfig;
+ console.log(jsConfig);
+ wx.requestPayment({
+ timeStamp: jsConfig.timeStamp,
+ nonceStr: jsConfig.nonceStr,
+ package: jsConfig.package,
+ signType: jsConfig.signType,
+ paySign: jsConfig.paySign,
+ success: function (res) {
+ wx.showToast({
+ title: '支付成功',
+ icon: 'success',
+ duration: 1000,
+ })
+ setTimeout(function () {
+ wx.navigateTo({ //跳转至指定页面并关闭其他打开的所有页面(这个最好用在返回至首页的的时候)
+ url: '/pages/orders-con/orders-con?order_id=' + data.result.orderId
+ })
+ }, 1200)
+ },
+ fail: function (res) {
+ wx.showToast({
+ title: '支付失败',
+ icon: 'success',
+ duration: 1000,
+ })
+ // setTimeout(function () {
+ // wx.navigateTo({
+ // url: '/pages/orders-con/orders-con?order_id=' + data.result.orderId
+ // })
+ // }, 1200)
+ },
+ complete: function (res) {
+ console.log(res);
+ if (res.errMsg == 'requestPayment:cancel') {
+ wx.showToast({
+ title: '取消支付',
+ icon: 'none',
+ duration: 1000,
+ })
+ // setTimeout(function () {
+ // wx.navigateTo({ //跳转至指定页面并关闭其他打开的所有页面(这个最好用在返回至首页的的时候)
+ // url: '/pages/orders-con/orders-con?order_id=' + data.result.orderId
+ // })
+ // }, 1200)
+ }
+ },
+ })
+ } else if (res.data.code == 200){
+ wx.showToast({
+ title: res.data.msg,
+ icon: 'success',
+ duration: 2000
+ })
+ setTimeout(function () {
+ wx.navigateTo({ //跳转至指定页面并关闭其他打开的所有页面(这个最好用在返回至首页的的时候)
+ url: '/pages/orders-con/orders-con?order_id=' + data.result.orderId
+ })
+ }, 1200)
+ }else{
+ wx.showToast({
+ title: res.data.msg,
+ icon: 'none',
+ duration: 2000
+ })
+ setTimeout(function () {
+ wx.navigateTo({ //跳转至指定页面并关闭其他打开的所有页面(这个最好用在返回至首页的的时候)
+ url: '/pages/orders-con/orders-con?order_id=' + data.result.orderId
+ })
+ }, 1200)
+ }
},
fail: function (res) {
- console.log('submit fail');
- },
- complete: function (res) {
- console.log('submit complete');
+ console.log('submit fail');
}
- });
- } else if (res.cancel) {
- console.log('用户点击取消')
- }
- }
- })
- },
- goTel:function(e){
- console.log(e);
- wx.makePhoneCall({
- phoneNumber: e.currentTarget.dataset.tel //仅为示例,并非真实的电话号码
- })
- },
- goJoinPink:function(e){
- var uni = e.currentTarget.dataset.uni;
- wx.navigateTo({
- url: '/pages/join-pink/index?id=' + uni,
- })
- },
- confirmOrder:function(e){
- var header = {
- 'content-type': 'application/x-www-form-urlencoded'
- };
- var uni = e.currentTarget.dataset.uni;
- var that = this;
- wx.showModal({
- title: '确认收货',
- content: '为保障权益,请收到货确认无误后,再确认收货',
- success: function (res) {
- if (res.confirm) {
- wx.request({
- url: app.globalData.url + '/routine/auth_api/user_take_order?uid=' + app.globalData.uid,
- data: { uni: uni },
- method: 'get',
- header: header,
+ });
+ },
+ delOrder:function(e){
+ var header = {
+ 'content-type': 'application/x-www-form-urlencoded'
+ };
+ var uni = e.currentTarget.dataset.uni;
+ var that = this;
+ wx.showModal({
+ title: '确认删除订单?',
+ content: '订单删除后将无法查看',
success: function (res) {
- if(res.data.code==200){
- wx.navigateTo({
- url: '/pages/orders-list/orders-list?nowstatus=4',
- })
- }else{
- wx.showToast({
- title: res.data.msg,
- icon: 'none',
- duration: 2000
- })
- }
- that.setData({
- ordercon: that.data.ordercon
- });
- },
- fail: function (res) {
- console.log('submit fail');
- },
- complete: function (res) {
- console.log('submit complete');
+ if (res.confirm) {
+ wx.request({
+ url: app.globalData.url + '/routine/auth_api/user_remove_order?uid=' + app.globalData.uid,
+ data: { uni: uni },
+ method: 'get',
+ header: header,
+ success: function (res) {
+ if (res.data.code == 200) {
+ wx.showToast({
+ title: '成功',
+ icon: 'success',
+ duration: 2000
+ })
+ setTimeout(function(){
+ wx.navigateTo({
+ url: '/pages/orders-list/orders-list',
+ })
+ },1500)
+ } else {
+ wx.showToast({
+ title: res.data.msg,
+ icon: 'none',
+ duration: 2000
+ })
+ }
+ // that.setData({
+ // ordercon: that.data.ordercon
+ // });
+ },
+ fail: function (res) {
+ console.log('submit fail');
+ },
+ complete: function (res) {
+ console.log('submit complete');
+ }
+ });
+ } else if (res.cancel) {
+ console.log('用户点击取消')
+ }
}
- });
- } else if (res.cancel) {
- console.log('用户点击取消')
- }
- }
- })
- },
- goIndex:function(){
- wx.switchTab({
- url: '/pages/index/index'
- })
- },
- /**
- * 生命周期函数--监听页面初次渲染完成
- */
- onReady: function () {
-
- },
+ })
+ },
+ goTel:function(e){
+ console.log(e);
+ wx.makePhoneCall({
+ phoneNumber: e.currentTarget.dataset.tel //仅为示例,并非真实的电话号码
+ })
+ },
+ goJoinPink:function(e){
+ var uni = e.currentTarget.dataset.uni;
+ wx.navigateTo({
+ url: '/pages/join-pink/index?id=' + uni,
+ })
+ },
+ confirmOrder:function(e){
+ var header = {
+ 'content-type': 'application/x-www-form-urlencoded'
+ };
+ var uni = e.currentTarget.dataset.uni;
+ var that = this;
+ wx.showModal({
+ title: '确认收货',
+ content: '为保障权益,请收到货确认无误后,再确认收货',
+ success: function (res) {
+ if (res.confirm) {
+ wx.request({
+ url: app.globalData.url + '/routine/auth_api/user_take_order?uid=' + app.globalData.uid,
+ data: { uni: uni },
+ method: 'get',
+ header: header,
+ success: function (res) {
+ if(res.data.code==200){
+ wx.navigateTo({
+ url: '/pages/orders-list/orders-list?nowstatus=4',
+ })
+ }else{
+ wx.showToast({
+ title: res.data.msg,
+ icon: 'none',
+ duration: 2000
+ })
+ }
+ that.setData({
+ ordercon: that.data.ordercon
+ });
+ },
+ fail: function (res) {
+ console.log('submit fail');
+ },
+ complete: function (res) {
+ console.log('submit complete');
+ }
+ });
+ } else if (res.cancel) {
+ console.log('用户点击取消')
+ }
+ }
+ })
+ },
+ goIndex:function(){
+ wx.switchTab({
+ url: '/pages/index/index'
+ })
+ },
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
- /**
- * 生命周期函数--监听页面显示
- */
- onShow: function () {
-
- },
+ },
- /**
- * 生命周期函数--监听页面隐藏
- */
- onHide: function () {
-
- },
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
- /**
- * 生命周期函数--监听页面卸载
- */
- onUnload: function () {
-
- },
+ },
- /**
- * 页面相关事件处理函数--监听用户下拉动作
- */
- onPullDownRefresh: function () {
-
- },
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
- /**
- * 页面上拉触底事件的处理函数
- */
- onReachBottom: function () {
-
- },
+ },
- /**
- * 用户点击右上角分享
- */
- onShareAppMessage: function () {
-
- }
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function () {
+
+ }
})
\ No newline at end of file
diff --git a/application/routine/view/crmebN/pages/payment/payment.js b/application/routine/view/crmebN/pages/payment/payment.js
index ca18a78a..b01e3300 100644
--- a/application/routine/view/crmebN/pages/payment/payment.js
+++ b/application/routine/view/crmebN/pages/payment/payment.js
@@ -39,6 +39,14 @@ Page({
},
success: function (res) { }
})
+ if (!e.detail.value.number) {
+ wx.showToast({
+ title: '请输入充值金额',
+ icon: 'none',
+ duration: 1000,
+ })
+ return false;
+ }
wx.request({
url: app.globalData.url + '/routine/auth_api/user_wechat_recharge?uid=' + app.globalData.uid,
method: 'GET',
diff --git a/application/routine/view/crmebN/pages/payment/payment.wxml b/application/routine/view/crmebN/pages/payment/payment.wxml
index a23e185f..c40af97a 100644
--- a/application/routine/view/crmebN/pages/payment/payment.wxml
+++ b/application/routine/view/crmebN/pages/payment/payment.wxml
@@ -1,7 +1,7 @@
-
+
-
+
+
-
正在拼单
@@ -125,5 +119,4 @@
-
-
+
\ No newline at end of file
diff --git a/application/routine/view/crmebN/pages/product-pinke/index.wxss b/application/routine/view/crmebN/pages/product-pinke/index.wxss
index d8662765..72485906 100644
--- a/application/routine/view/crmebN/pages/product-pinke/index.wxss
+++ b/application/routine/view/crmebN/pages/product-pinke/index.wxss
@@ -36,7 +36,7 @@ swiper-item{position: relative; width: 100%;}
.foot .fn-btns .item{flex: 1; text-align: center; font-size: 22rpx; color: #666;}
.foot .fn-btns .item .iconfont{font-size: 35rpx; color: #999;position:relative;}
.foot .fn-btns .item .iconfont.icon-xingxing{color: #ff7000;}
-.foot .btns-wrapper{width: 445rpx; height: 100%; line-height: 110rpx; color: #fff; font-size: 30rpx;}
+.foot .btns-wrapper{width: 688rpx; height: 100%; line-height: 110rpx; color: #fff; font-size: 30rpx;}
.foot .btns-wrapper view{flex: 1; text-align: center;}
.foot .btns-wrapper .buy-btn{background-color: #ff7000;}
.foot .btns-wrapper .payment-btn{background-color: #ff3d3d;}
@@ -70,4 +70,4 @@ swiper-item{position: relative; width: 100%;}
.form-btn{width:100%;height:100%;line-height:110rpx;font-size:30rpx;}
.form-btn button{color:#fff;border:none;border-radius:0;height:110rpx;line-height:110rpx;}
@import "/pages/foo-tan/foo-tan.wxss";
-@import "/wxParse/wxParse.wxss";
+@import "/wxParse/wxParse.wxss";
\ No newline at end of file
diff --git a/application/routine/view/crmebN/pages/refund-order/refund-order.js b/application/routine/view/crmebN/pages/refund-order/refund-order.js
index cd285bb9..c34d136c 100644
--- a/application/routine/view/crmebN/pages/refund-order/refund-order.js
+++ b/application/routine/view/crmebN/pages/refund-order/refund-order.js
@@ -33,13 +33,13 @@ Page({
search: e.detail.value
});
},
- getorderlist: function (e) {
+ getorderlist: function () {
var header = {
'content-type': 'application/x-www-form-urlencoded',
};
var that = this;
var search = that.data.search;
- var limit = 4;
+ var limit = 8;
var orderType = that.data.orderType;
var first = that.data.first;
var startpage = limit * first;
@@ -49,7 +49,6 @@ Page({
method: 'get',
header: header,
success: function (res) {
- console.log(res);
var $data = res.data.data;
if (!startpage && !$data.length){
wx.showToast({
@@ -115,7 +114,7 @@ Page({
* 页面上拉触底事件的处理函数
*/
onReachBottom: function () {
-
+ this.getorderlist();
},
/**
diff --git a/application/routine/view/crmebN/pages/refund-page/refund-page.js b/application/routine/view/crmebN/pages/refund-page/refund-page.js
index 8ef163ca..2283d8fa 100644
--- a/application/routine/view/crmebN/pages/refund-page/refund-page.js
+++ b/application/routine/view/crmebN/pages/refund-page/refund-page.js
@@ -103,9 +103,8 @@ Page({
success: function (res) {
wx.hideLoading();
var data = JSON.parse(res.data);
- console.log(data);
if (data.code == 200) {
- that.data.dataimg.push(data.data.url);
+ that.data.dataimg.push(app.globalData.url+data.data.url);
}
that.setData({
dataimg: that.data.dataimg
@@ -184,6 +183,11 @@ Page({
icon: 'success',
duration: 2000
})
+ setTimeout(function(){
+ wx.navigateTo({
+ url: '/pages/orders-con/orders-con?order_id=' + that.data.orderId
+ })
+ },1500)
}else{
wx.showToast({
title: res.data.msg,
diff --git a/application/routine/view/crmebN/pages/user/user.js b/application/routine/view/crmebN/pages/user/user.js
index d81b897b..0b124e82 100644
--- a/application/routine/view/crmebN/pages/user/user.js
+++ b/application/routine/view/crmebN/pages/user/user.js
@@ -2,179 +2,132 @@ var app = getApp();
// pages/user/user.js
Page({
- /**
- * 页面的初始数据
- */
- data: {
- url: app.globalData.urlImages,
- userinfo:[],
- orderStatusNum:[],
- coupon:'',
- collect:''
- },
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ url: app.globalData.urlImages,
+ userinfo:[],
+ orderStatusNum:[],
+ coupon:'',
+ collect:''
+ },
- /**
- * 生命周期函数--监听页面加载
- */
- onLoad: function (options) {
- app.setBarColor();
- app.setUserInfo();
- var header = {
- 'content-type': 'application/x-www-form-urlencoded',
- };
- var that = this;
- wx.request({
- url: app.globalData.url + '/routine/auth_api/my?uid=' + app.globalData.uid,
- method: 'POST',
- header: header,
- success: function (res) {
- that.setData({
- userinfo: res.data.data,
- orderStatusNum: res.data.data.orderStatusNum
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ app.setBarColor();
+ app.setUserInfo();
+ var header = {
+ 'content-type': 'application/x-www-form-urlencoded',
+ };
+ var that = this;
+ wx.request({
+ url: app.globalData.url + '/routine/auth_api/my?uid=' + app.globalData.uid,
+ method: 'POST',
+ header: header,
+ success: function (res) {
+ that.setData({
+ userinfo: res.data.data,
+ orderStatusNum: res.data.data.orderStatusNum
+ })
+ }
+ });
+ },
+ goNotification:function(){
+ wx.navigateTo({
+ url: '/pages/news-list/news-list',
})
- that.coupon();
- that.collect();
- }
- });
- },
- goNotification:function(){
- wx.navigateTo({
- url: '/pages/news-list/news-list',
- })
- },
- onShow: function () {
- var header = {
- 'content-type': 'application/x-www-form-urlencoded',
- };
- var that = this;
- wx.request({
- url: app.globalData.url + '/routine/auth_api/my?uid=' + app.globalData.uid,
- method: 'POST',
- header: header,
- success: function (res) {
- that.setData({
- userinfo: res.data.data
+ },
+ onShow: function () {
+ var header = {
+ 'content-type': 'application/x-www-form-urlencoded',
+ };
+ var that = this;
+ wx.request({
+ url: app.globalData.url + '/routine/auth_api/my?uid=' + app.globalData.uid,
+ method: 'POST',
+ header: header,
+ success: function (res) {
+ that.setData({
+ userinfo: res.data.data
+ })
+ }
+ });
+ },
+ /**
+ * 生命周期函数--我的余额
+ */
+ money:function(){
+ wx.navigateTo({
+ url: '/pages/main/main?now=' + this.data.userinfo.now_money + '&uid='+app.globalData.uid,
+ success: function (res) { },
+ fail: function (res) { },
+ complete: function (res) { },
})
- that.coupon();
- that.collect();
- }
- });
- },
- /**
- * 生命周期函数--优惠卷个数
- */
- coupon: function () {
- var header = {
- 'content-type': 'application/x-www-form-urlencoded',
- };
- var that = this;
- wx.request({
- url: app.globalData.url + '/routine/auth_api/get_use_coupons?uid=' + app.globalData.uid,
- data:{types:0},
- method: 'GET',
- header: header,
- success: function (res) {
- that.setData({
- // coupon: res.data.data.length
+ },
+ /**
+ * 生命周期函数--我的积分
+ */
+ integral: function () {
+ wx.navigateTo({
+ url: '/pages/integral-con/integral-con?inte=' + this.data.userinfo.integral + '&uid=' + app.globalData.uid,
+ success: function (res) { },
+ fail: function (res) { },
+ complete: function (res) { },
})
- }
- })
- },
- /**
- * 生命周期函数--收藏个数
- */
- collect: function () {
- var header = {
- 'content-type': 'application/x-www-form-urlencoded',
- 'cookie': app.globalData.sessionId//读取cookie
- };
- var that = this;
- wx.request({
- url: app.globalData.url + '/routine/auth_api/get_user_collect_product?uid=' + app.globalData.uid,
- method: 'GET',
- header: header,
- success: function (res) {
- that.setData({
- // collect: res.data.data.length
+ },
+ /**
+ * 生命周期函数--我的优惠卷
+ */
+ coupons: function () {
+ wx.navigateTo({
+ url: '/pages/coupon/coupon',
+ success: function (res) { },
+ fail: function (res) { },
+ complete: function (res) { },
})
- }
- })
- },
- /**
- * 生命周期函数--我的余额
- */
- money:function(){
- wx.navigateTo({
- url: '/pages/main/main?now=' + this.data.userinfo.now_money + '&uid='+app.globalData.uid,
- success: function (res) { },
- fail: function (res) { },
- complete: function (res) { },
- })
- },
- /**
- * 生命周期函数--我的积分
- */
- integral: function () {
- wx.navigateTo({
- url: '/pages/integral-con/integral-con?inte=' + this.data.userinfo.integral + '&uid=' + app.globalData.uid,
- success: function (res) { },
- fail: function (res) { },
- complete: function (res) { },
- })
- },
- /**
- * 生命周期函数--我的优惠卷
- */
- coupons: function () {
- wx.navigateTo({
- url: '/pages/coupon/coupon',
- success: function (res) { },
- fail: function (res) { },
- complete: function (res) { },
- })
- },
- /**
- * 生命周期函数--我的收藏
- */
- collects: function () {
- wx.navigateTo({
- url: '/pages/collect/collect',
- success: function (res) { },
- fail: function (res) { },
- complete: function (res) { },
- })
- },
- /**
- * 生命周期函数--我的推广人
- */
- extension:function(){
- wx.navigateTo({
- url: '/pages/feree/feree',
- success: function (res) { },
- fail: function (res) { },
- complete: function (res) { },
- })
- },
- /**
- * 生命周期函数--我的推广
- */
- myextension: function () {
- wx.navigateTo({
- url: '/pages/extension/extension',
- success: function (res) { },
- fail: function (res) { },
- complete: function (res) { },
- })
- },
- /**
- * 生命周期函数--我的砍价
- */
- // cut_down_the_price:function(){
- // wx.navigateTo({
- // url: '../../pages/feree/feree',
- // success: function (res) { },
- // fail: function (res) { },
- // complete: function (res) { },
- // })
- // }
+ },
+ /**
+ * 生命周期函数--我的收藏
+ */
+ collects: function () {
+ wx.navigateTo({
+ url: '/pages/collect/collect',
+ })
+ },
+ /**
+ * 生命周期函数--我的推广人
+ */
+ extension:function(){
+ wx.navigateTo({
+ url: '/pages/feree/feree',
+ success: function (res) { },
+ fail: function (res) { },
+ complete: function (res) { },
+ })
+ },
+ /**
+ * 生命周期函数--我的推广
+ */
+ myextension: function () {
+ wx.navigateTo({
+ url: '/pages/extension/extension',
+ success: function (res) { },
+ fail: function (res) { },
+ complete: function (res) { },
+ })
+ },
+ /**
+ * 生命周期函数--我的砍价
+ */
+ // cut_down_the_price:function(){
+ // wx.navigateTo({
+ // url: '../../pages/feree/feree',
+ // success: function (res) { },
+ // fail: function (res) { },
+ // complete: function (res) { },
+ // })
+ // }
})
\ No newline at end of file
diff --git a/application/routine/view/crmebN/pages/user/user.wxml b/application/routine/view/crmebN/pages/user/user.wxml
index 1755e24c..62cc544c 100644
--- a/application/routine/view/crmebN/pages/user/user.wxml
+++ b/application/routine/view/crmebN/pages/user/user.wxml
@@ -19,11 +19,11 @@
我的积分
- {{coupon ? coupon : 0}}
+ {{userinfo.couponCount ? userinfo.couponCount : 0}}
优惠券
- {{collect ? collect : 0}}
+ {{userinfo.like ? userinfo.like : 0}}
收藏商品
@@ -56,6 +56,7 @@
+ {{orderStatusNum.noRefund}}
退款/售后
@@ -152,8 +153,4 @@
-
-
-
-
-
+
\ No newline at end of file
diff --git a/application/routine/view/crmebN/project.config.json b/application/routine/view/crmebN/project.config.json
index 620b4c3d..e2eba4ec 100644
--- a/application/routine/view/crmebN/project.config.json
+++ b/application/routine/view/crmebN/project.config.json
@@ -10,7 +10,7 @@
"compileType": "miniprogram",
"libVersion": "1.9.94",
"appid": "wx7bc36cccc15e4be2",
- "projectname": "crmebn_831",
+ "projectname": "crmebn",
"condition": {
"search": {
"current": -1,