diff --git a/app.json b/app.json
index 6396a49..900da75 100644
--- a/app.json
+++ b/app.json
@@ -210,7 +210,10 @@
"pages/togoin/togoin",
"pages/user/Detailed/Detailed",
"pages/user/user_fw/user_fw",
- "pages/user/cardinfo/cardinfo"
+ "pages/user/cardinfo/cardinfo",
+ "pages/user/nick_avatar/nick_avatar",
+ "pages/user/slimming/slimming",
+ "pages/user/punchInhistory/punchInhistory"
]
}
diff --git a/packageC/pages/presell/cart/cart.js b/packageC/pages/presell/cart/cart.js
index 6e8d46c..1d27fc8 100644
--- a/packageC/pages/presell/cart/cart.js
+++ b/packageC/pages/presell/cart/cart.js
@@ -803,10 +803,9 @@ Page({
} else {
o_condition = parseFloat(o_condition) - parseFloat(th.data.presell.presell_deposit);
if (o_condition < 0) o_condition = 0;
-
- if (o_condition1 < 0) o_condition1 = 0;
- else if(o_condition1>th.data.goods.use_commission && th.data.bn_use_commission){
- o_condition1-=th.data.bn_use_commission;
+ //if (o_condition1 < 0) o_condition1 = 0;
+ else if(o_condition>th.data.goods.use_commission && th.data.bn_use_commission){
+ o_condition-=th.data.bn_use_commission;
}
th.setData({ exp_price: 0, order_m: o_condition, show_submit: 1, })
@@ -2225,7 +2224,7 @@ Page({
var e_str = ut.formatTime(end_time);
var new_date = new Date(); //新建一个日期对象,默认现在的时间
var old_date = new Date(e_str.replace(/-/g, '/')); //设置过去的一个时间点,"yyyy-MM-dd HH:mm:ss"格式化日期
- var difftime = (new_date - old_date) / 1000; //计算时间差,并把毫秒转换成秒
+ var difftime =Math.abs((new_date - old_date) / 1000); //计算时间差,并把毫秒转换成秒
var days = parseInt(difftime / 86400); // 天 24*60*60*1000
var hours = parseInt(difftime / 3600) - 24 * days; // 小时 60*60 总小时数-过去的小时数=现在的小时数
var minutes = parseInt(difftime % 3600 / 60); // 分钟 -(day*24) 以60秒为一整份 取余 剩下秒数 秒数/60 就是分钟数
@@ -2244,7 +2243,7 @@ Page({
var e_str = ut.formatTime(end_time);
var new_date = new Date(); //新建一个日期对象,默认现在的时间
var old_date = new Date(e_str.replace(/-/g, '/')); //设置过去的一个时间点,"yyyy-MM-dd HH:mm:ss"格式化日期
- var difftime = (new_date - old_date) / 1000; //计算时间差,并把毫秒转换成秒
+ var difftime =Math.abs((new_date - old_date) / 1000); //计算时间差,并把毫秒转换成秒
var days = parseInt(difftime / 86400); // 天 24*60*60*1000
var hours = parseInt(difftime / 3600) - 24 * days; // 小时 60*60 总小时数-过去的小时数=现在的小时数
var minutes = parseInt(difftime % 3600 / 60); // 分钟 -(day*24) 以60秒为一整份 取余 剩下秒数 秒数/60 就是分钟数
diff --git a/packageE/pages/user/nick_avatar/nick_avatar.js b/packageE/pages/user/nick_avatar/nick_avatar.js
new file mode 100644
index 0000000..0c9d9da
--- /dev/null
+++ b/packageE/pages/user/nick_avatar/nick_avatar.js
@@ -0,0 +1,106 @@
+// pages/user/userfw/userfw.js
+var e = getApp(), os = e.globalData.setting;
+var utils = require('../../../../utils/util.js');
+var regeneratorRuntime = require('../../../../utils/runtime.js');
+
+
+Page({
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ defaultAvatar: os.imghost + "/miniapp/images/no-head.jpg",
+ ob: {},
+ load: 0
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ if(getApp().globalData.up_nick_avatar){
+ this.setData({
+ ob: JSON.parse(JSON.stringify(getApp().globalData.up_nick_avatar))
+ })
+ getApp().globalData.up_nick_avatar=null;
+ }
+
+ },
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: async function () {
+
+ },
+
+
+ onChooseAvatar: function (e) {
+ console.log(e, 1111);
+ var th = this;
+ getApp().request.uploadFile(os.url + "/api/weshop/comment/uploadCommentImg", {
+ filePath: e.detail.avatarUrl,
+ name: "file",
+ success: function (t) {
+ var u = t.data.data;
+ th.setData({'ob.head_pic': u})
+ }
+ });
+
+ },
+
+ get_val: function (e) {
+ console.log(e, 2222);
+ this.setData({'ob.nickname': e.detail.value})
+ },
+
+ save_data() {
+
+ if (!this.data.ob.head_pic) {
+ wx.showToast({
+ title: '请选择头像',
+ icon: 'none',
+ duration: 2000
+ });
+ return false;
+ }
+
+ if (!this.data.ob.nickname) {
+ wx.showToast({
+ title: '请输入昵称',
+ icon: 'none',
+ duration: 2000
+ });
+ return false;
+ }
+
+ if (this.data.load) return false;
+ this.setData({load: 1})
+
+
+ wx.showLoading();
+ getApp().request.put("/api/weshop/users/update", {
+ data: {
+ storeId: os.stoid,
+ user_id: getApp().globalData.user_id,
+ nickname: this.data.ob.nickname,
+ head_pic: this.data.ob.head_pic
+
+ },
+ success: function (su) {
+ wx.hideLoading();
+ if (su.data.code == 0) {
+ wx.navigateBack({delta: 1})
+ }else{
+ this.setData({load: 0})
+ wx.showToast({
+ title: su.data.msg,
+ icon: 'none',
+ duration: 2000
+ });
+ }
+ }
+ });
+ }
+
+
+})
\ No newline at end of file
diff --git a/packageE/pages/user/nick_avatar/nick_avatar.json b/packageE/pages/user/nick_avatar/nick_avatar.json
new file mode 100644
index 0000000..5abf709
--- /dev/null
+++ b/packageE/pages/user/nick_avatar/nick_avatar.json
@@ -0,0 +1,4 @@
+{
+ "navigationBarTitleText": "个人信息",
+ "usingComponents": {}
+}
\ No newline at end of file
diff --git a/packageE/pages/user/nick_avatar/nick_avatar.wxml b/packageE/pages/user/nick_avatar/nick_avatar.wxml
new file mode 100644
index 0000000..091c9cc
--- /dev/null
+++ b/packageE/pages/user/nick_avatar/nick_avatar.wxml
@@ -0,0 +1,25 @@
+
+
+ 头像
+
+
+
+
+ 昵称
+
+
+
+
+
+
+
+
+
+
+ 确认修改
+
+
+
+
\ No newline at end of file
diff --git a/packageE/pages/user/nick_avatar/nick_avatar.wxss b/packageE/pages/user/nick_avatar/nick_avatar.wxss
new file mode 100644
index 0000000..7808fc6
--- /dev/null
+++ b/packageE/pages/user/nick_avatar/nick_avatar.wxss
@@ -0,0 +1,30 @@
+.avatar_btn{ width: 60rpx !important; height: 60rpx !important; border-radius:50%; border: none !important;
+ margin-left:0 !important;margin-right: 0 !important; }
+.head_img{ width: 60rpx; height: 60rpx; border-radius: 50%}
+
+.page_set{ border-top: 20rpx solid #eee; }
+.item{ height: 80rpx; border-bottom: 1rpx solid #eee;padding:0 20rpx}
+.nick_inp{ text-align: right; color: #999}
+
+
+.confirm {
+ width: 100%;
+ left: 0rpx;
+ bottom: 0rpx;
+ height: 130rpx;
+ background-color: rgb(255, 255, 255);
+ z-index: 9;
+
+}
+
+.confirmtext {
+ width: 495rpx;
+ height: 65rpx;
+ color: rgb(255, 255, 255);
+ background-color: rgb(214, 1, 33);
+ border-radius: 35rpx;
+}
+
+.load{
+ background-color:#ea3993 !important;
+}
\ No newline at end of file
diff --git a/packageE/pages/user/punchInhistory/punchInhistory.js b/packageE/pages/user/punchInhistory/punchInhistory.js
new file mode 100644
index 0000000..6e2cbd8
--- /dev/null
+++ b/packageE/pages/user/punchInhistory/punchInhistory.js
@@ -0,0 +1,166 @@
+var e = getApp(), os = e.globalData.setting;
+var utils = require('../../../../utils/util.js');
+var regeneratorRuntime = require('../../../../utils/runtime.js');
+const request = getApp().request;
+let app = getApp();
+
+
+Page({
+
+ filters: {
+ toFix(val) {
+ if (val === undefined) return 0;
+ if (val === null) return 0;
+ if (isNaN(val)) return 0;
+ if (val === '') return 0;
+ return parseFloat(val).toFixed(2);
+ },
+ //获取样式
+ set_def: function (val, def, is_price) {
+ if (val == undefined) {
+ if (def) return def;
+ return "-"
+ }
+ if (is_price) {
+ return parseFloat(val + "").toFixed(2);
+ }
+ return val;
+ },
+ },
+
+
+ data:{
+ imghost: app.globalData.setting.imghost,
+ keyword: '',
+ list: [],
+ list2:[],
+ diffweight:'',
+ standardweight:'',
+ howday:'',
+ },
+
+ onLoad(options) {
+ var that = this;
+ if (options.customerid != undefined && options.customerid != "" && options.customerid != null) {
+
+ that.setData({
+ customerid:options.customerid,
+ diffweight:options.diffweight,
+ standardweight:options.standardweight,
+ howday:options.howday
+ })
+ }
+
+
+ var userInfo = getApp().globalData.userInfo;
+ if (userInfo) {
+ that.userInfo = userInfo;
+ that.loding = 1;
+ that.init_data();
+ }
+
+
+ wx.getSystemInfo({
+ success: function (res) {
+ var clientWidth = res.windowWidth;
+ var clientHeight = res.windowHeight;
+ var rpxR = 750 / clientWidth;
+ var calc = clientHeight * rpxR;
+ that.setData({
+ calc:calc
+ })
+ }
+ })
+
+ },
+
+ onShow: function () {
+ if (getApp().globalData.userInfo && !this.userInfo) {
+ this.setData({
+ userInfo:userInfo
+ })
+
+ this.loding = 1;
+ this.init_data();
+ }
+ },
+
+
+ //初始化数据
+ init_data() {
+ var that = this;
+ let userInfo = getApp().globalData.userInfo;
+
+ let req = {
+ customerid: that.data.customerid,
+ store_id: userInfo.store_id, //用户id
+ //staffid: getApp().globalData.RoleData.StaffId, //商户编号
+ ApiName: 'api.slimming.clock.registration.sum.query',
+ };
+
+ that.get_list(req);
+ },
+
+
+ //获取门店报表
+ get_list(req) {
+ var that = this;
+ if (that.loading) {
+ return false;
+ }
+ that.loading = 1;
+
+ if (req) {
+
+ that.setData({
+ noMore:false,
+ list:[],
+ list2:[]
+ })
+ } else {
+ if (that.noMore) {
+ that.loading = 0;
+ return false;
+ }
+ req = that.req; //如果不是全选的参数,就是page分页+1
+ req.page++;
+ }
+
+ //请求参数进行存储
+ that.req = req;
+
+ wx.showLoading({
+ title: '加载中'
+ });
+
+ var url = '/api/weshop/delphiapi/pageErpApi?accdb='+getApp().globalData.config.erpid;
+
+ getApp().request.promiseGet(url, {
+ data: req
+ })
+ .then((res) => {
+ wx.hideLoading();
+ that.loading = 0;
+
+ if (res.data.code == 0 && res.data.data && res.data.data.pageData && res.data.data.pageData.length) {
+
+ var list=that.data.list;
+
+ for (let i = 0; i < res.data.data.pageData.length; i++) {
+ list.push(res.data.data.pageData[i]);
+ }
+
+ that.setData({
+ list:list
+ })
+
+ } else {
+ getApp().confirmBox(res.data.msg)
+ }
+ });
+ },
+
+
+})
+
+
diff --git a/packageE/pages/user/punchInhistory/punchInhistory.json b/packageE/pages/user/punchInhistory/punchInhistory.json
new file mode 100644
index 0000000..68c131d
--- /dev/null
+++ b/packageE/pages/user/punchInhistory/punchInhistory.json
@@ -0,0 +1,8 @@
+{
+ "navigationBarTitleText": "瘦身日记",
+ "usingComponents": {
+ "qr_code": "/components/qr_code/qr_code",
+ "warn": "/components/long_warn/long_warn",
+ "nodata": "/components/nodata/nodata"
+ }
+}
\ No newline at end of file
diff --git a/packageE/pages/user/punchInhistory/punchInhistory.wxml b/packageE/pages/user/punchInhistory/punchInhistory.wxml
new file mode 100644
index 0000000..e736cac
--- /dev/null
+++ b/packageE/pages/user/punchInhistory/punchInhistory.wxml
@@ -0,0 +1,77 @@
+
+
+
+
+ 总览
+
+
+
+ {{diffweight||"-"}}
+ 累计减重(斤)
+
+
+
+ {{howday||"-"}}
+ 到店次数
+
+
+
+ {{standardweight||"-"}}
+ 目标体重(斤)
+
+
+
+
+
+
+
+
+
+
+ {{item.fyearmonth}} 减重 {{item.diffweight}} 斤 到店 {{ item.weightqty }} 次
+
+
+
+
+
+
+
+
+ {{item2.billdate}}
+
+
+ {{item2.weight}}斤
+
+
+ 减重 {{item2.diffweight}}斤
+
+
+
+
+
+
+ {{item2.remark}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ - 已经到底了 -
+
+
+
+
+
+
+
diff --git a/packageE/pages/user/punchInhistory/punchInhistory.wxss b/packageE/pages/user/punchInhistory/punchInhistory.wxss
new file mode 100644
index 0000000..3da3215
--- /dev/null
+++ b/packageE/pages/user/punchInhistory/punchInhistory.wxss
@@ -0,0 +1,379 @@
+page{
+ background-color: #f2f2f2;
+}
+
+.tab_sec_list {
+ background-color: #fff;
+ border-bottom: 1rpx solid #eee;
+ border-top: 1rpx solid #eee;
+
+}
+
+.tab_th {
+ background-color: #fff;
+ flex-shrink: 0;
+ height: 68rpx;
+ line-height: 68rpx;
+ width: 187rpx;
+ text-align: center;
+ position: relative;
+ font-size: 24rpx;
+ color: #A6A6A6FF;
+}
+
+.coo {
+ color: rgba(56, 56, 56, 1);
+}
+
+.h_line {
+ position: absolute;
+ left: 50%;
+ margin-left: -30rpx;
+ width: 44rpx;
+ height: 7rpx;
+ overflow: hidden;
+ background-color: rgba(254, 58, 98, 1);
+ display: none;
+ border-radius: 17rpx !important;
+ bottom: -4rpx;
+}
+
+.tab_thactive {
+ background-color: #fff;
+ flex-shrink: 0;
+ height: 63rpx;
+ line-height: 63rpx;
+ width: 187rpx;
+ text-align: center;
+ /* border-bottom: 1rpx solid #eee;
+ border-top: 1rpx solid #eee; */
+ position: relative;
+ font-weight: bolder;
+ color: rgba(254, 58, 98, 1);
+ font-size: 35rpx;
+}
+
+.tab_thactive .h_line {
+ display: block !important;
+ border-radius: 8rpx !important;
+}
+
+.container {
+ margin-top: 73rpx;
+}
+
+/* 图表 */
+.chart_card {
+ position: relative;
+ display: flex;
+ background: rgba(255, 255, 255, 1);
+ border-radius: 17rpx;
+ margin: 20rpx 23rpx;
+}
+
+.net4 {
+ height: 60rpx;
+ color: rgba(56, 56, 56, 1);
+ font-size: 35rpx;
+ text-align: center;
+ display: flex;
+ align-items: center;
+}
+
+.charts-box {
+ /* width: 550rpx; */
+ width: 100%;
+ height: 350rpx;
+ /* margin-left: 50rpx; */
+}
+
+.cont {
+ margin-top: 88rpx;
+ width: 100%;
+}
+.pl{
+ max-width: 200rpx;
+ margin-right: 4rpx;
+ height: 40rpx;
+}
+/* 图表下面 */
+.box {
+ display: flex;
+ flex-wrap: wrap;
+ justify-content: space-between;
+ box-sizing: border-box;
+ padding: 21rpx 26rpx;
+ margin: 20rpx 23rpx;
+ width: 705rpx;
+ height: 363rpx;
+ opacity: 1;
+ background: #FFFFFFFF;
+ border-radius: 17rpx;
+}
+
+.box_item1 {
+ display: flex;
+ flex-direction: column;
+ width: 320rpx;
+ height: 147rpx;
+ background: #F9FAFE;
+ color: #333446;
+ text-align: center;
+ border-radius: 17rpx;
+
+}
+
+.box_item2 {
+ display: flex;
+ flex-direction: column;
+ width: 320rpx;
+ height: 147rpx;
+ background: #FFE3E9;
+ color: #FE3A62;
+ text-align: center;
+ border-radius: 17rpx;
+}
+
+/* 门店报表 */
+.n_top {
+ display: flex;
+ flex-direction: column;
+ /* height: 224rpx; */
+ /* background: #FFFFFFFF; */
+ /* padding-bottom: 20rpx; */
+ border-radius: 0 0 17rpx 17rpx;
+}
+
+/* 搜索框 */
+.search-box {
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ background: #FFFFFFFF;
+ padding-top: 20rpx;
+ padding-bottom: 20rpx;
+}
+
+.btn_sear {
+ display: flex;
+ justify-content: center;
+ align-items: center;
+ color: #fff;
+ width: 107rpx;
+ height: 68rpx;
+ border-radius: 17rpx;
+ margin: 0 14rpx 0 18rpx;
+ background: linear-gradient(270deg, rgba(255, 24, 126, 1) 0%, rgba(255, 89, 64, 1) 100%);
+ letter-spacing: 4rpx;
+ text-indent: 4rpx;
+}
+
+.inp_view {
+ background-color: rgb(249, 250, 254);
+ height: 82rpx;
+ width: 228rpx;
+ border-radius: 10rpx;
+ color: rgba(128, 128, 128, 1);
+}
+
+.line {
+ height: 4rpx;
+ background: #C4C4C4;
+ margin: 0 15rpx;
+ width: 35rpx;
+}
+
+.sign_tb {
+ width: 35rpx;
+ height: 35rpx;
+ margin-right: 10rpx;
+}
+
+/* 搜索框下面 */
+.total_count {
+ width: 94%;
+ height: 180rpx;
+ margin: 3% 3% 0 3%;
+ background: white;
+ padding-bottom: 20rpx;
+ border-radius:17rpx;
+}
+
+.total_box {
+ display: flex;
+ justify-content: space-between;
+ /* padding: 0 102rpx; */
+ padding: 0 30rpx;
+}
+
+.total_number {
+ width: 200rpx;
+ text-align: center;
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ font-size: 24rpx;
+ color: rgba(56, 56, 56, 1);
+}
+
+.detail_number {
+ color: rgba(254, 58, 98, 1);
+ margin-top: 10rpx;
+ width: 200rpx;
+}
+
+.inp_view3 {
+ background-color: rgb(249, 250, 254);
+ height: 82rpx;
+ width: 228rpx;
+ border-radius: 17rpx;
+ color: #A6A6A6FF;
+}
+.inp_view4 {
+ background-color: rgb(249, 250, 254);
+ height: 82rpx;
+ width: 250rpx;
+ border-radius: 17rpx;
+ color: #A6A6A6FF;
+}
+/* 门店数据 */
+.card_title {
+ display: flex;
+ align-items: center;
+ font-size: 32rpx;
+ color: rgba(0, 0, 0, 1);
+ height: 37rpx;
+ padding: 10rpx 0;
+}
+
+.card_box {
+ background: #FFFFFFFF;
+ /* width: 750rpx; */
+ width: 100%;
+ box-sizing: border-box;
+ padding-top: 21rpx;
+ margin-top: 10rpx;
+ font-size: 24rpx;
+ border-radius: 17rpx;
+}
+
+.tiny_box1 {
+ display: flex;
+ flex-direction: column;
+ align-items: center;
+ width: 10%;
+ margin-left: 10rpx;
+}
+.tiny_box2 {
+ display: flex;
+ flex-direction: column;
+ width: 40%;
+}
+.tiny_box3 {
+ display: flex;
+ flex-direction: column;
+ /* align-items: ; */
+ width: 50%;
+}
+.ellipsis-22 {
+ display: -webkit-box;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ display: -webkit-box;
+ -webkit-line-clamp: 2;
+ -webkit-box-orient: vertical;
+ white-space: normal;
+ word-break: break-all;
+ word-warp: break-word;
+}
+
+.tiny_number {
+ color: rgba(254, 58, 98, 1);
+ margin-bottom: 10rpx;
+ height: 37rpx;
+ line-height: 37rpx;
+ width: 150rpx;
+ text-align: center;
+}
+
+.line2 {
+ margin-top: 10rpx;
+ width: 2rpx;
+ height: 70rpx;
+ background: rgba(229, 229, 229, 1);
+}
+
+/* 筛选弹窗 */
+.pp_title {
+ height: 93rpx;
+ line-height: 93rpx;
+ border-bottom: 1rpx solid #eee;
+
+}
+
+.close_btn {
+ width: 40rpx;
+ height: 40rpx;
+ float: right;
+ position: relative;
+ top: 20rpx;
+ margin-right: 20rpx;
+}
+
+.saixuan_name {
+ height: 42rpx;
+ line-height: 42rpx;
+}
+
+.inp_view {
+ width: 240rpx;
+ background-color: rgb(249, 250, 254);
+ height: 70rpx;
+ border-radius: 11rpx;
+ color: rgba(128, 128, 128, 1);
+ margin-right: 33rpx;
+ margin-left: 12rpx;
+}
+
+.inp_view2 {
+ background-color: rgb(249, 250, 254);
+ height: 70rpx;
+ border-radius: 11rpx;
+ color: rgba(128, 128, 128, 1);
+}
+
+.clear_inp {
+ position: absolute;
+ top: 22rpx;
+ right: 0;
+}
+
+.btn_set {
+ margin: 20rpx auto;
+ width: 95%;
+ height: 93rpx;
+ border-radius: 20rpx;
+ color: #fff;
+ line-height: 93rpx;
+ background: linear-gradient(180deg, rgba(255, 24, 126, 1) 0%, rgba(255, 89, 64, 1) 100%);
+ letter-spacing: 4rpx;
+ text-indent: 4rpx;
+}
+
+.line3 {
+ height: 1rpx;
+ background: rgba(128, 128, 128, 1);
+ width: 56rpx;
+ margin-right: 14rpx;
+}
+
+/* 商品概况部分 */
+.search-box .inp {
+ background: #F9FAFE;
+ height: 82rpx;
+ border-radius: 16rpx;
+ width: 524rpx;
+ color: rgba(166, 166, 166, 1) !important;
+ position: relative;
+ margin-left: 4rpx;
+}
diff --git a/packageE/pages/user/slimming/g_filter.wxs b/packageE/pages/user/slimming/g_filter.wxs
new file mode 100644
index 0000000..15e36ca
--- /dev/null
+++ b/packageE/pages/user/slimming/g_filter.wxs
@@ -0,0 +1,14 @@
+//获取样式
+var toFixTwo = function(val) {
+ if (val === undefined) return "-";
+ if (val === null) return "-";
+ if (isNaN(val)) return "-";
+ if (val === '') return "-";
+ if (val === 0) return "-";
+ return parseFloat(parseFloat(val).toFixed(2)) ;
+}
+
+module.exports = {
+ toFixTwo: toFixTwo,
+
+}
diff --git a/packageE/pages/user/slimming/slimming.js b/packageE/pages/user/slimming/slimming.js
new file mode 100644
index 0000000..b1f08d8
--- /dev/null
+++ b/packageE/pages/user/slimming/slimming.js
@@ -0,0 +1,142 @@
+var e = getApp(), os = e.globalData.setting;
+var utils = require('../../../../utils/util.js');
+var regeneratorRuntime = require('../../../../utils/runtime.js');
+
+Page({
+ /**
+ * 页面的初始数据
+ */
+ data: {
+
+ userInfo:null,
+ iurl: os.imghost,
+ portrait_list: [],
+ loading: 0,
+ portrait_req: {},
+ industry:'',
+ is_get:0
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ var that=this;
+
+ this.setData({
+ userInfo: getApp().globalData.userInfo
+ })
+
+
+ getApp().getConfig(function (e){
+ that.init_data();
+ })
+
+
+ },
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: async function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+
+ },
+
+ init_data() {
+
+ let userInfo = getApp().globalData.userInfo;
+ var portrait_req = {
+ ApiName:'api.slimming.member.portrait',
+ store_id: userInfo.store_id,
+ //StaffId: that.idd,
+ vipid: userInfo.erpvipid,
+ };
+ this.get_service_portrait(portrait_req);
+ },
+
+
+ get_service_portrait(portrait_req) {
+
+ //var str='{"code":0,"msg":"操作成功!","data":[{"id":"a1ff01bc-b755-4a5c-8675-06b33354d5ec","customerno":"18650904780","customername":"心如水","sex":"女","mobiletel":"18650904780","birthday":"2000-11-23","age":22,"signingdate":"2022-11-22","weightlosscourse":4,"shapecourse":3,"weight":62,"targetweight":30,"subtracted":26,"advisername":"泉州万达纪莉(工号:07)","beautyconsultant":"泉州万达纪莉(工号:07)","diffweight":24,"minweight":100,"ideaweight":92,"tostoreqty":3,"dayweight":102,"previousweight":100,"lastweight":102,"actualweight":22,"ringratioweight":2,"undeduced":10,"standardweight":98}]}';
+ //var res=JSON.parse(str);
+ //this.setData({portrait_list: res.data});
+ //return false;
+ var that = this;
+ if (that.loading) {
+ return false;
+ }
+ that.loading = 1;
+
+ if (portrait_req) {
+ that.setData({
+ noMore: false,
+ portrait_list: [],
+ is_get: 0,
+ noMore: false
+ })
+
+ } else {
+ if (that.noMore) {
+ that.loading = 0;
+ return false;
+ }
+ portrait_req = that.portrait_req; //如果不是全选的参数,就是page分页+1
+ portrait_req.page++;
+ }
+
+ //请求参数进行存储
+ that.portrait_req = portrait_req;
+ wx.showLoading({
+ title: '加载中'
+ });
+
+ console.log(getApp().globalData.config,1111);
+
+
+ var url = '/api/weshop/delphiapi/pageErpApi?accdb='+getApp().globalData.config.erpid;
+ getApp().request.promiseGet(url, {
+ data: portrait_req
+ })
+ .then((res) => {
+ wx.hideLoading();
+ that.loading = 0;
+
+ that.setData({is_get: 1})
+
+ if (res.data.code == 0 && res.data.data && res.data.data.pageData && res.data.data.pageData.length) {
+
+ var list=res.data.data.pageData;
+
+ list[0].weight = list[0].weight * 2
+ if (list[0].tostoreqty == 0) {
+ list[0].undeduced = list[0].undeduced + list[0].actualweight
+ list[0].actualweight = 0
+ list[0].ringratioweight = 0
+
+ } else if (list[0].tostoreqty == 1) {
+ list[0].ringratioweight = 0
+ }
+
+ that.setData({portrait_list: list})
+
+ } else {
+ that.setData({
+ noMore:true
+ })
+ }
+ });
+ },
+
+ goto:function (e){
+ var url=e.currentTarget.dataset.url;
+ getApp().goto(url);
+ }
+
+
+})
\ No newline at end of file
diff --git a/packageE/pages/user/slimming/slimming.json b/packageE/pages/user/slimming/slimming.json
new file mode 100644
index 0000000..68c131d
--- /dev/null
+++ b/packageE/pages/user/slimming/slimming.json
@@ -0,0 +1,8 @@
+{
+ "navigationBarTitleText": "瘦身日记",
+ "usingComponents": {
+ "qr_code": "/components/qr_code/qr_code",
+ "warn": "/components/long_warn/long_warn",
+ "nodata": "/components/nodata/nodata"
+ }
+}
\ No newline at end of file
diff --git a/packageE/pages/user/slimming/slimming.wxml b/packageE/pages/user/slimming/slimming.wxml
new file mode 100644
index 0000000..208b2ae
--- /dev/null
+++ b/packageE/pages/user/slimming/slimming.wxml
@@ -0,0 +1,147 @@
+
+
+
+
+
+
+
+
+
+ {{item.customername || '-'}}
+ {{item.mobiletel || '-'}}
+ {{item.age || '-'}}
+ 岁
+
+
+
+
+ 减重疗程数:
+
+ {{item.weightlosscourse || '0'}}
+
+
+ 塑形疗程数:
+ {{item.shapecourse || '0'}}
+
+
+
+
+ 购买日期:
+ {{item.signingdate || '-'}}
+
+
+
+
+
+
+
+
+ 日常打卡
+ 查看全部
+
+
+
+
+
+
+ {{ g_filter.toFixTwo(item.dayweight ) }}
+
+
+ _ _
+
+ 斤
+
+
+
+
+ 今日体重
+
+
+
+
+
+
+ {{g_filter.toFixTwo(item.ringratioweight)}}
+ 斤
+
+
+
+ 环比重量
+
+
+
+ {{ g_filter.toFixTwo(item.actualweight)}}
+ 斤
+
+
+
+
+ 实际减重
+
+
+
+ {{g_filter.toFixTwo(item.diffweight)}}
+ 斤
+
+
+
+ 累计减重
+
+
+
+
+
+
+ {{item.tostoreqty || '0'}}
+ 次
+
+
+
+ 累计到店
+
+
+
+ {{ g_filter.toFixTwo(item.undeduced)}}
+ 斤
+
+
+
+ 未减斤数
+
+
+
+ {{g_filter.toFixTwo(item.minweight) }}
+ 斤
+
+
+ 最低体重
+
+
+
+
+ 初始体重{{ g_filter.toFixTwo(item.weight) }}斤
+
+ 标准体重{{ g_filter.toFixTwo(item.standardweight)}}斤
+
+ 应减斤数{{g_filter.toFixTwo(item.subtracted)}}斤
+
+
+
+ 减重顾问
+ {{item.advisername || '-'}}
+
+
+ 减重塑形师
+ {{item.beautyconsultant || '-'}}
+
+
+
+
+
+
+- 已经到底了 -
+
diff --git a/packageE/pages/user/slimming/slimming.wxss b/packageE/pages/user/slimming/slimming.wxss
new file mode 100644
index 0000000..76e091d
--- /dev/null
+++ b/packageE/pages/user/slimming/slimming.wxss
@@ -0,0 +1,144 @@
+page{
+ background-color: #f2f2f2; line-height: normal;
+}
+
+.pd20 {
+ padding: 20rpx;
+}
+.fs26 {
+ font-size: 26rpx;
+}
+.fs28 {
+ font-size: 28rpx;
+}
+.fs30 {
+ font-size: 30rpx;
+}
+.fs32 {
+ font-size: 32rpx;
+}
+
+.mgt20 {
+ margin-top: 20rpx !important;
+}
+
+.card {
+ background-color: white;
+ border-radius: 16rpx;
+ overflow: hidden;
+}
+.txt-center{
+ text-align: center;
+}
+.fw_box {
+ height: 210rpx;
+ box-sizing: border-box;
+}
+
+.fw_img {
+ margin-right: 26rpx;
+ width: 158rpx;
+ height: 158rpx;
+ border-radius: 50%;
+}
+
+.img_right {
+ width: 70%;
+ flex-direction: column;
+}
+
+.c-38 {
+ color: #383838;
+}
+
+.mgl {
+ margin-left: 30rpx;
+}
+
+.fw_see_more {
+ border: 1.75rpx solid #FE3A62;
+ border-radius: 88rpx;
+ width: 123rpx;
+ height: 48rpx;
+ color: #FE3A62;
+ line-height: 48rpx;
+ text-align: center;
+}
+
+.fw_detail_box {
+ flex-direction: column;
+ border-bottom: 1rpx solid #F0F0F0;
+}
+
+.fw_day_weight {
+ color: #FE3A62;
+ font-size: 84rpx;
+ width: 250rpx;
+ text-align: right;
+ margin-left: 40rpx;
+}
+
+.fw_no_day_weight {
+ color: #FE3A62;
+ font-size: 84rpx;
+ width: 250rpx;
+ text-align: right;
+ margin-left: 40rpx;
+ margin-right: 50rpx;
+ margin-bottom: 20rpx;
+}
+
+.mgt40 {
+ margin-top: 40rpx
+}
+
+.fw_edit_img_box {
+ width: 30rpx;
+ height: 30rpx;
+ margin-top: 20rpx;
+ padding: 20rpx;
+}
+
+.fw_edit_img {
+ width: 30rpx;
+ height: 30rpx;
+}
+
+.fw_tiny_box {
+ height: 160rpx;
+ padding: 20rpx 0;
+ box-sizing: border-box;
+ border-bottom: 1rpx solid #F0F0F0;
+}
+
+.fw_tiny_top {
+ flex-direction: column;
+ width: 33%;
+}
+
+.fs52 {
+ font-size: 52rpx;
+}
+
+.fw_3weight {
+ height: 68rpx;
+ border-bottom: 1rpx solid #F0F0F0;
+ padding: 20rpx 0;
+ box-sizing: border-box;
+}
+
+.fw_bottom_box {
+ height: 68rpx;
+ border-bottom: 1rpx solid #F0F0F0;
+ padding: 20rpx 0;
+ box-sizing: border-box;
+ padding: 0 20rpx;
+}
+
+.lh68 {
+ line-height: 68rpx;
+}
+
+.jc_c{
+ justify-content: center;
+}
\ No newline at end of file
diff --git a/pages/giftpack/public/buy_com.wxml b/pages/giftpack/public/buy_com.wxml
index de45b20..2d984d1 100644
--- a/pages/giftpack/public/buy_com.wxml
+++ b/pages/giftpack/public/buy_com.wxml
@@ -37,7 +37,7 @@
- 距离:{{item.distance>1000?filters.toFix(item.distance/1000,2)+'km':filters.toFix(item.distance,0)+"m"}}
+ 距离:{{item.distance>1000?filter.toFix(item.distance/1000,2)+'km':filter.toFix(item.distance,0)+"m"}}
@@ -63,7 +63,7 @@
- 距离:{{item.distance>1000?filters.toFix(item.distance/1000,2)+"km":filters.toFix(item.distance,0)+"m"}}
+ 距离:{{item.distance>1000?filter.toFix(item.distance/1000,2)+"km":filter.toFix(item.distance,0)+"m"}}
@@ -91,7 +91,7 @@
- 距离:{{item.distance>1000?filters.toFix(item.distance/1000,2)+"km":filters.toFix(item.distance,0)+"m"}}
+ 距离:{{item.distance>1000?filter.toFix(item.distance/1000,2)+"km":filter.toFix(item.distance,0)+"m"}}
@@ -138,7 +138,8 @@
-
+
+
@@ -178,7 +179,7 @@
{{def_pick_store.pickup_name}}
- 距离:{{def_pick_store.distance>1000?filters.toFix(def_pick_store.distance/1000,2)+"km":filters.toFix(def_pick_store.distance,0)+"m"}}
+ 距离:{{def_pick_store.distance>1000?filter.toFix(def_pick_store.distance/1000,2)+"km":filter.toFix(def_pick_store.distance,0)+"m"}}
diff --git a/pages/user/index/filter.wxs b/pages/user/index/filter.wxs
index 433b6b2..ac29de7 100644
--- a/pages/user/index/filter.wxs
+++ b/pages/user/index/filter.wxs
@@ -22,6 +22,7 @@ var is_close = function (name,c_list) {
map['AI测肤']="20";
map['附近门店']="21";
map['积分签到']="22";
+ map['瘦身日记']="23";
var index=map[name];
//我的权益要判断5,和11
diff --git a/pages/user/index/index.js b/pages/user/index/index.js
index 89f3bbb..10463d3 100644
--- a/pages/user/index/index.js
+++ b/pages/user/index/index.js
@@ -42,13 +42,15 @@ Page({
actId: "", //生日活动的id
actImg: "",
is_assistance: 0, //助力活动
- ad_img: "",
- usertop_ad: [],//会员顶部配置
- add_card_data: '', //等级卡的内容
- getusercode_vailtime:10,//会员二维码时效
+ ad_img: "",
+ usertop_ad: [],//会员顶部配置
+ add_card_data: '', //等级卡的内容
+ getusercode_vailtime:10,//会员二维码时效
hiddenCS: true,
- is_show_recommend:false
+ is_show_recommend:false,
+
+ has_rj:0
},
goto_nav: function (e) {
@@ -176,6 +178,34 @@ Page({
if (e != undefined && e != null && e.mobile) {
+ if(this.data.has_rj==0){
+ var portrait_req = {
+ ApiName:'api.slimming.member.portrait',
+ store_id: e.store_id,
+ //StaffId: that.idd,
+ vipid: e.erpvipid,
+ };
+
+
+ var url = '/api/weshop/delphiapi/pageErpApi?accdb='+getApp().globalData.config.erpid;
+ getApp().request.promiseGet(url, {
+ data: portrait_req
+ })
+ .then((res) => {
+ if (res.data.code == 0 && res.data.data && res.data.data.pageData && res.data.data.pageData.length) {
+ this.setData({has_rj:1})
+ }else {
+ this.setData({has_rj:-1})
+ }
+
+ })
+
+
+
+
+ }
+
+
// 判断是否开启美业
getApp().promiseGet('/api/weshop/store/getTabSys/' + os.stoid, {}).then(res => {
if (res.data.code == 0) {
diff --git a/pages/user/index/index.wxml b/pages/user/index/index.wxml
index 48d58c9..4600b26 100644
--- a/pages/user/index/index.wxml
+++ b/pages/user/index/index.wxml
@@ -252,6 +252,14 @@
套盒商品
+
+
+
+ {{item.name}}
+
+
+
+
diff --git a/pages/user/userinfo/userinfo.js b/pages/user/userinfo/userinfo.js
index 1034f50..26c8251 100644
--- a/pages/user/userinfo/userinfo.js
+++ b/pages/user/userinfo/userinfo.js
@@ -658,37 +658,46 @@ Page({
// 获取用户头像昵称
getUserProfile(e) {
var th = this;
- new Promise((resolve, reject) => {
- wx.getUserProfile({
- desc: '用于完善会员资料', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写
- success: (res) => {
- th.data.user.nickname = res.userInfo.nickName;
- th.data.user.head_pic = res.userInfo.avatarUrl;
- this.setData({
- userInfo: res.userInfo,
- hasUserInfo: true,
- user: th.data.user,
- });
- resolve(res.userInfo);
- },
- });
- }).then((userInfo) => {
- getApp().request.put("/api/weshop/users/update", {
- data: {
- storeId: r.stoid,
- user_id: getApp().globalData.user_id,
- nickname: userInfo.nickName,
- head_pic: userInfo.avatarUrl
-
- },
- success: function(su) {
- if (su.data.code == 0) {
- console.log("update user info OK");
- }
- }
- });
- });
+ var ob={
+ nickname:this.data.user.nickname,
+ head_pic:this.data.user.head_pic,
+ }
+ getApp().globalData.up_nick_avatar=ob;
+ getApp().goto('/packageE/pages/user/nick_avatar/nick_avatar');
+
+
+ // new Promise((resolve, reject) => {
+ // wx.getUserProfile({
+ // desc: '用于完善会员资料', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写
+ // success: (res) => {
+ // th.data.user.nickname = res.userInfo.nickName;
+ // th.data.user.head_pic = res.userInfo.avatarUrl;
+ // this.setData({
+ // userInfo: res.userInfo,
+ // hasUserInfo: true,
+ // user: th.data.user,
+ // });
+ // resolve(res.userInfo);
+ // },
+ //
+ // });
+ // }).then((userInfo) => {
+ // getApp().request.put("/api/weshop/users/update", {
+ // data: {
+ // storeId: r.stoid,
+ // user_id: getApp().globalData.user_id,
+ // nickname: userInfo.nickName,
+ // head_pic: userInfo.avatarUrl
+ //
+ // },
+ // success: function(su) {
+ // if (su.data.code == 0) {
+ // console.log("update user info OK");
+ // }
+ // }
+ // });
+ // });
},