diff --git a/components/diy_advertising/diy_advertising.js b/components/diy_advertising/diy_advertising.js
index 2ae1a91..a2f3aa1 100644
--- a/components/diy_advertising/diy_advertising.js
+++ b/components/diy_advertising/diy_advertising.js
@@ -12,8 +12,8 @@ Component({
yc:false,
btn: 1,
ad:false,
- autoplay:false,
- interval:5000,
+ autoplay:true,
+ interval:3000,
duration:1000,
someData: {},
max_sw_height:null,
@@ -36,4 +36,4 @@ Component({
if (this.data.max_sw_height < viewHeight) this.setData({ max_sw_height: viewHeight });
}
}
-})
\ No newline at end of file
+})
diff --git a/components/diy_picMax/diy_picMax.wxss b/components/diy_picMax/diy_picMax.wxss
index 170aa45..8886b2d 100644
--- a/components/diy_picMax/diy_picMax.wxss
+++ b/components/diy_picMax/diy_picMax.wxss
@@ -1,5 +1,5 @@
.picMax{width: 100%;position: relative;}
-.pic_item{display: inline-block; top:0;left:0;vertical-align: middle}
+.pic_item{display: block; top:0;left:0;float:left}
.pic_item image{width: 100%; height: 100%}
.width_1{width: 187.5rpx}.width_2{width: 375rpx;}.width_3{width: 562.5rpx}.width_4{width:748rpx;}
/* .height_1{height: 187.5rpx;}.height_2{height: 375rpx;}.height_3{height: 562.5rpx}.height_4{height: 748rpx;} */
diff --git a/pages/cart/cart2_pt/cart2_pt.js b/pages/cart/cart2_pt/cart2_pt.js
index c3ce082..7a5c415 100644
--- a/pages/cart/cart2_pt/cart2_pt.js
+++ b/pages/cart/cart2_pt/cart2_pt.js
@@ -439,7 +439,6 @@ Page({
'content-type': 'application/json'
},// 设置请求的 header
success: function (res) {
-
th.data.is_summit_ing=0; //是否提交中
wx.hideLoading();
if (res.statusCode == 200) {
@@ -469,7 +468,8 @@ Page({
util_pay.pay(data.data, function() {
setTimeout(function () {
wx.navigateTo({
- url: "/pages/payment/pay_success/pay_success?type=1&order_sn="+data.data,
+ //url: "/pages/payment/pay_success/pay_success?type=1&order_sn="+data.data,
+ url: "/pages/team/team_success/team_success?ordersn=" + data.data,
})
},1000)
}, function () {
diff --git a/pages/getphone/getphone.js b/pages/getphone/getphone.js
index 9a6e927..ddf27f8 100644
--- a/pages/getphone/getphone.js
+++ b/pages/getphone/getphone.js
@@ -54,9 +54,11 @@ Page({
//接下来写业务代码登录
//最后,记得返回刚才的页面
if (e.encryptedData==undefined){
+ /*---
wx.navigateTo({
url: '/pages/user/binding_info/binding_info',
- })
+ })--*/
+ return app.my_warnning("登录需要授权手机号码!", 0, that);
return false;
}
var r=getApp().globalData.getu;
@@ -105,6 +107,7 @@ Page({
},
failStatus: function (t) {
+ /*---
return "100" === t.data.result ? (i.goHome(), wx.navigateTo({
url: "/pages/user/binding_info/binding_info?nickName=" + r.nickName + "&userHeadPic=" + r.avatarUrl
}), !1) : (i.clearAuth(), i.alertLoginErrorAndGoHome(t.data.msg), a.request.post("/api/user/logout", {
@@ -115,7 +118,8 @@ Page({
failStatus: function () {
return !1;
}
- }), !1);
+ }), !1);--*/
+ return app.my_warnning("授权登入失败,请稍后再试!", 0, that);
},
fail: function (t) {
return i.clearAuth(), i.alertLoginErrorAndGoHome(), !1;
diff --git a/pages/getphone/getphone.json b/pages/getphone/getphone.json
index 41fff8a..fb13409 100644
--- a/pages/getphone/getphone.json
+++ b/pages/getphone/getphone.json
@@ -1,3 +1,6 @@
{
- "navigationBarTitleText": "绑定手机"
+ "navigationBarTitleText": "绑定手机",
+ "usingComponents": {
+ "warn": "/components/long_warn/long_warn"
+ }
}
diff --git a/pages/getphone/getphone.wxml b/pages/getphone/getphone.wxml
index 8f80327..e511fa5 100644
--- a/pages/getphone/getphone.wxml
+++ b/pages/getphone/getphone.wxml
@@ -6,4 +6,5 @@
暂不绑定
-
\ No newline at end of file
+
+
\ No newline at end of file
diff --git a/pages/giftpack/giftpacklist/giftpacklist.js b/pages/giftpack/giftpacklist/giftpacklist.js
index ec28d16..ef408c7 100644
--- a/pages/giftpack/giftpacklist/giftpacklist.js
+++ b/pages/giftpack/giftpacklist/giftpacklist.js
@@ -315,10 +315,20 @@ Page({
bind_bnerr2: function(e) {
var _errImg = e.target.dataset.errorimg;
var _errObj = {};
- _errObj[_errImg] = "/public/images/empty.jpg";
+ _errObj[_errImg] = "/miniapp/images/giftbag/gift01.png";
this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ;
+ },
+
+ //图片失败,默认图片
+ bind_bnerr: function (e) {
+ var _errImg = e.target.dataset.errorimg;
+ var _errObj = {};
+ _errObj[_errImg] = this.data.iurl + "miniapp/images/big_back.jpg";
+ this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ;
+ //this.setData({ giftImage: this.data.iurl + "/miniapp/images/giftbag/gift01.png"});
},
+
//关闭导航
close: function() {
var th = this;
diff --git a/pages/giftpack/giftpacklist/giftpacklist.wxml b/pages/giftpack/giftpacklist/giftpacklist.wxml
index 57c9994..aef38d6 100644
--- a/pages/giftpack/giftpacklist/giftpacklist.wxml
+++ b/pages/giftpack/giftpacklist/giftpacklist.wxml
@@ -1,6 +1,6 @@
-
+
diff --git a/pages/giftpack/giftpacklist/giftpacklist.wxss b/pages/giftpack/giftpacklist/giftpacklist.wxss
index 3d906ad..be61320 100644
--- a/pages/giftpack/giftpacklist/giftpacklist.wxss
+++ b/pages/giftpack/giftpacklist/giftpacklist.wxss
@@ -96,6 +96,7 @@
border: 2rpx solid #999;
width: 120rpx;
height: 120rpx;
+ background-color: #f8f8f8;
}
.box_ware_item.data-v-3a5b7e36 {
@@ -241,4 +242,4 @@ page.data-v-3a5b7e36 {
}
.overdue.data-v-3a5b7e36{
background-color: rgb(153,153,153);
-}
\ No newline at end of file
+}
diff --git a/pages/user/assistance/assistance.js b/pages/user/assistance/assistance.js
index 88dd11d..2b95357 100644
--- a/pages/user/assistance/assistance.js
+++ b/pages/user/assistance/assistance.js
@@ -81,7 +81,7 @@ Page({
}
return ut.null_promise();
}).then(res => {
- if (res.data.code == 0)
+ if ( res && res.data &&res.data.code == 0)
th.setData({
s_num: res.data.data.countAll
})
@@ -135,7 +135,7 @@ Page({
})
}
} else {
- getApp().my_warnning(res.data.msg, 0, th);
+ //getApp().my_warnning(res.data.msg, 0, th);
th.setData({
is_show_more: 1,
page: page
diff --git a/pages/user/assistance/assistance_success.js b/pages/user/assistance/assistance_success.js
index f09db9a..8ffd0dd 100644
--- a/pages/user/assistance/assistance_success.js
+++ b/pages/user/assistance/assistance_success.js
@@ -18,23 +18,25 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
- //var helpid=options.helpid;
- var helpid=23;
+ var helpid=options.helpid;
this.init(helpid);
+ var nav_b = this.selectComponent("#nav_b"); //组件的id
+ nav_b.set_name("助力", "/pages/user/assistance/assistance");
+
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function (e) {
-
+
},
// ----初始化----
- init:function(helpid) {
+ init:function(helpid) {
var user_id = getApp().globalData.user_id;
var store_id = os.stoid;
var th=this;
-
+
//链式调用接口,先获取活动,在获取参与活动的人数
getApp().request.promiseGet("/api/weshop/marketing/help/help/act/get", {
data: {
@@ -49,10 +51,10 @@ Page({
storeId: store_id,
helpId: helpid
}
- })
+ })
}
return ut.null_promise();
-
+
}).then(res=>{
if(res.data.code==0){
th.setData({s_num:res.data.data.countAll});
@@ -70,6 +72,6 @@ Page({
},
cklie_button:function(){
- getApp().goto("/pages/user/assistance/assistance")
+ getApp().goto("/pages/user/assistance/assistance")
}
-})
\ No newline at end of file
+})
diff --git a/pages/user/assistance/friend_assistance.js b/pages/user/assistance/friend_assistance.js
index 42711a4..8701da5 100644
--- a/pages/user/assistance/friend_assistance.js
+++ b/pages/user/assistance/friend_assistance.js
@@ -21,6 +21,7 @@ Page({
userId: 0, //任务用户的ID
s_num: 0, //分享的人数
taskId:0, //活动从表ID
+ helpId:0,
},
/**
@@ -28,64 +29,24 @@ Page({
*/
onLoad: function(options) {
var th = this;
-
+
+ var nav_b = th.selectComponent("#nav_b"); //组件的id
+ nav_b.set_name("助力", "/pages/user/assistance/assistance");
+
if (options.tasking) this.data.tasking = options.tasking;
if (options.userId) this.data.userId = options.userId;
//任务是不是为空
if (this.data.tasking == 0 || this.data.tasking == undefined) {
- this.data.tasking = decodeURIComponent(options.scene);
+ this.data.tasking = decodeURIComponent(options.scene);
}
-
- if (this.data.tasking != null && this.data.tasking != 'undefined' && this.data.tasking != "" && this.data.tasking !=
- 0) {
-
- getApp().request.promiseGet("/api/weshop/marketing/help/help/tasking/get", {
- data: {
- taskingId: th.data.tasking,
- storeId: os.stoid
- }
- }).then(res => {
- if (res.data.code == 0) {
- th.data.userId = res.data.data.userId;
- th.data.taskId = res.data.data.taskId;
- //获取活动的时间
- return getApp().request.promiseGet("/api/weshop/marketing/help/help/act/get", {
- data: {
- helpId: res.data.data.helpFormId,
- storeId: os.stoid
- }
- })
- }
- return ut.null_promise();
- }).then(res => {
- if (res.data.code == 0) {
- th.setData({
- zl_act: res.data.data
- })
- //获取活动的参与的人数
- return getApp().request.promiseGet("/api/weshop/marketing/help/involve/help/act/people/count", {
- data: {
- helpId: res.data.data.id,
- storeId: os.stoid
- }
- })
- }
- return ut.null_promise();
- }).then(res => {
- if (res.data.code == 0) {
- th.setData({
- s_num: res.data.data.countAll
- });
- }
- })
-
- }
+ getApp().getUserFir(function() {});
+
},
// 跳转到助力成功页
participate_activity: function() {
wx.navigateTo({
- url: '/pages/user/assistance/assistance_success',
+ url: '/pages/user/assistance/assistance_success?helpid='+this.data.helpId,
})
},
@@ -93,11 +54,63 @@ Page({
* 生命周期函数--监听页面显示
*/
onShow: function() {
+ if (this.data.tasking != null && this.data.tasking != 'undefined' && this.data.tasking != "" && this.data.tasking !=
+ 0) {
+
+ getApp().request.promiseGet("/api/weshop/marketing/help/help/tasking/get", {
+ data: {
+ taskingId: th.data.tasking,
+ storeId: os.stoid
+ }
+ }).then(res => {
+ if (res.data.code == 0) {
+ th.data.userId = res.data.data.userId;
+ th.data.taskId = res.data.data.taskId;
+ th.data.helpId=res.data.data.helpFormId;
+ //获取活动的时间
+ return getApp().request.promiseGet("/api/weshop/marketing/help/help/act/get", {
+ data: {
+ helpId: res.data.data.helpFormId,
+ storeId: os.stoid
+ }
+ })
+ }
+ return ut.null_promise();
+ }).then(res => {
+ if (res.data.code == 0) {
+ th.setData({
+ zl_act: res.data.data
+ })
+ //获取活动的参与的人数
+ return getApp().request.promiseGet("/api/weshop/marketing/help/involve/help/act/people/count", {
+ data: {
+ helpId: res.data.data.id,
+ storeId: os.stoid
+ }
+ })
+ }
+ return ut.null_promise();
+ }).then(res => {
+ if (res && res.data && res.data.code == 0) {
+ th.setData({
+ s_num: res.data.data.countAll
+ });
+ }
+ })
+ }
},
//点击开启礼盒
cklie_button: function() {
var th = this;
+ //--先判断会员状态--
+ var user_info = getApp().globalData.userInfo;
+ if (user_info == null || user_info.mobile == undefined || user_info.mobile == "" || user_info.mobile == null) {
+ wx.navigateTo({
+ url: '/pages/getphone/getphone',
+ })
+ return false;
+ }
var t_user_id = app_d.user_id;
var data = {
id: this.data.tasking,
@@ -126,7 +139,7 @@ Page({
//点击关闭礼盒
clike_none: function() {
this.setData({is_show: 0});
- getApp().goto("/pages/user/assistance/assistance_success");
+ getApp().goto("/pages/user/assistance/assistance_success?helpid="+this.data.helpId);
},
//导航球
close: function() {
diff --git a/pages/user/assistance/giftpacklist.js b/pages/user/assistance/giftpacklist.js
index 44758af..d033364 100644
--- a/pages/user/assistance/giftpacklist.js
+++ b/pages/user/assistance/giftpacklist.js
@@ -210,7 +210,8 @@ Page({
var json = {
"actId": th.data.id, //活动Id
"actType": 5, //活动类型 1:新人礼、2:评价有礼、3:节日营销、4:生日营销
- "giftBagId": 1, //礼包Id
+ //"giftBagId": 1, //礼包Id
+ "giftBagId": th.giftBagId, //礼包Id
"storeId": a.stoid, //商家Id
"userId": d.user_id //用户ID
};
@@ -335,7 +336,7 @@ Page({
var _errImg = e.target.dataset.errorimg;
var _errObj = {};
_errObj[_errImg] ="/miniapp/images/giftbag/gift01.png";
- this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ;
+ this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ;
},
@@ -343,9 +344,9 @@ Page({
bind_bnerr: function (e) {
var _errImg = e.target.dataset.errorimg;
var _errObj = {};
- _errObj[_errImg] = this.data.iurl + "/miniapp/images/empty.jpg";
- //this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ;
- this.setData({ giftImage: this.data.iurl + "/miniapp/images/giftbag/gift01.png"});
+ _errObj[_errImg] = this.data.iurl + "miniapp/images/big_back.jpg";
+ this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ;
+ //this.setData({ giftImage: this.data.iurl + "/miniapp/images/giftbag/gift01.png"});
},
@@ -355,4 +356,4 @@ Page({
var nav_b = th.selectComponent("#nav_b"); //组件的id
nav_b.close_box();
}
-});
\ No newline at end of file
+});
diff --git a/pages/user/assistance/task_assistance.js b/pages/user/assistance/task_assistance.js
index cc62f8f..f0413b5 100644
--- a/pages/user/assistance/task_assistance.js
+++ b/pages/user/assistance/task_assistance.js
@@ -424,7 +424,7 @@ Page({
});
} else {
th.setData({ is_user_list: 1 });
- getApp().my_warnning(su.data.msg, 0, th);
+ //getApp().my_warnning(su.data.msg, 0, th);
}
}
})
@@ -678,10 +678,10 @@ Page({
if (th.data.is_generate) return;
th.data.is_generate = 1;
- var scene = 1;
+ var scene = this.data.is_user_task.id;
///二微码
var path3 = os.url + "/api/wx/open/app/user/getWeAppEwm/" +
- os.stoid + "?sceneValue=" + scene + "&pageValue=pages/index/index/index";
+ os.stoid + "?sceneValue=" + scene + "&pageValue=pages/user/assistance/friend_assistance";
//读取文件成功则OK--
wx.getImageInfo({
src: path3,
@@ -689,8 +689,8 @@ Page({
var ewm_path = res.path; //
//var act_time="2019.06.26 - 2019.07.02"; //活动的时间
- var bg_time = ut.formar_no_full(th.data.dynamic.beginDate);
- var end_time = ut.formar_no_full(th.data.dynamic.endDate);
+ var bg_time = ut.formar_no_full(th.data.dynamic.beginDate,'.');
+ var end_time = ut.formar_no_full(th.data.dynamic.endDate,'.');
var act_time = bg_time + "-" + end_time;
@@ -943,9 +943,12 @@ Page({
th.setData({
is_share: 1
})
+ wx.showLoading({
+ title: "加载中",
+ })
var url = "/api/weshop/marketing/help/help/task/involve/page";
getApp().request.promiseGet(url, {
- isShowLoading: true,
+ isShowLoading: false,
data: {
storeId: os.stoid,
taskId: taskid,
@@ -981,6 +984,7 @@ Page({
th.data.head_pic_arr.length = 0;
for (var i in images) {
var img_path = images[i].headPic;
+ img_path=img_path.replace("http://thirdwx.qlogo.cn", "https://wx.qlogo.cn");
await getApp().request.promise_downimg(img_path).then(res => {
th.data.head_pic_arr.push(res);
})
diff --git a/pages/user/assistance/task_assistance.wxml b/pages/user/assistance/task_assistance.wxml
index f1e8a12..f44df8b 100644
--- a/pages/user/assistance/task_assistance.wxml
+++ b/pages/user/assistance/task_assistance.wxml
@@ -56,10 +56,10 @@
立即兑换
-
-
- 测试专用帮被人拆
-
+
@@ -153,7 +153,6 @@
-
diff --git a/pages/user/assistance/task_assistance.wxss b/pages/user/assistance/task_assistance.wxss
index b84cdcb..3302ba0 100644
--- a/pages/user/assistance/task_assistance.wxss
+++ b/pages/user/assistance/task_assistance.wxss
@@ -174,6 +174,7 @@ page {
width: 86%;
margin: auto;
margin-top: 50rpx;
+ justify-content: center;
}
.plan-frame .plan_num {
diff --git a/pages/user/index/index.js b/pages/user/index/index.js
index 06d59f8..f293086 100644
--- a/pages/user/index/index.js
+++ b/pages/user/index/index.js
@@ -40,6 +40,7 @@ Page({
actId: "", //生日活动的id
actImg: "",
is_assistance: 0, //助力活动
+ ad_img:"",
},
goto_nav: function(e) {
var th = this;
@@ -56,7 +57,18 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
+ var th=this;
this.birthday();
+ getApp().request.promiseGet("/api/weshop/ad/list?pid=401&store_id=" + os.stoid, {
+ data: {
+ enabled: 1
+ }
+ }).then(res => {
+ if(res.data.code==0 && res.data.data){
+ var item=res.data.data[0];
+ th.setData({ad_img:item.ad_code})
+ }
+ })
},
/**
@@ -551,12 +563,12 @@ Page({
},
// 判断生日营销的页面是不是存在
birthday: function() {
-
+
var th = this;
rq.get("/api/weshop/marketing/birthday/act/judge", {
data: { storeId: os.stoid, userId: app_d.user_id },
success: function (res) {
-
+
var code = res.data.code;
if (code == 0) {
var giftbagid = res.data.data.giftBagId;
@@ -575,7 +587,7 @@ Page({
var th = this;
var actId = th.data.actId;
var giftbagid = th.data.giftbagid;
-
+
if (actId != "" && giftbagid != "") {
getApp().goto("/pages/giftpack/birthdaygift/birthdaygift?actId=" + actId + "&gifbagid=" + giftbagid + "&orderType=" + 3);
@@ -584,7 +596,7 @@ Page({
getApp().showWarning("请稍后重试");
}
},
- // 判断助力活动是不是存在
+ // 判断助力活动是不是存在
is_assistance: function() {
var th = this;
rq.get("/api/weshop/marketing/help/act/judge", {
@@ -607,4 +619,4 @@ Page({
-})
\ No newline at end of file
+})
diff --git a/pages/user/index/index.wxml b/pages/user/index/index.wxml
index 1375433..64a77e8 100644
--- a/pages/user/index/index.wxml
+++ b/pages/user/index/index.wxml
@@ -1,7 +1,7 @@
-
-
+
+
@@ -69,19 +69,19 @@
加入plus会员预计可省3031元
-
+
立即开通
-
+
加入plus会员预计可省3031元
-
+
立即续费
@@ -232,7 +232,7 @@
助力活动
-
+
@@ -262,7 +262,7 @@
-
+
@@ -290,4 +290,4 @@
-
\ No newline at end of file
+
diff --git a/public/static/images/model/bg.jpg b/public/static/images/model/bg.jpg
deleted file mode 100644
index 35849b8..0000000
--- a/public/static/images/model/bg.jpg
+++ /dev/null
diff --git a/public/static/images/model/bg1.jpg b/public/static/images/model/bg1.jpg
deleted file mode 100644
index 3e5f2e1..0000000
--- a/public/static/images/model/bg1.jpg
+++ /dev/null
diff --git a/utils/util.js b/utils/util.js
index 423d6f7..9d8771e 100644
--- a/utils/util.js
+++ b/utils/util.js
@@ -236,13 +236,13 @@ function check_mobile(phoneMobile){
var ob={code:1};
if (phoneMobile.length === 0) {
ob.title='输入的手机号为空';
- ob.code=-1;
+ ob.code=-1;
} else if (phoneMobile.length < 11) {
ob.title ='手机号长度有误!';
- ob.code = -1;
+ ob.code = -1;
} else if (!myreg.test(phoneMobile)) {
ob.title = '手机号格式有误!';
- ob.code = -1;
+ ob.code = -1;
}
return ob;
}
@@ -280,31 +280,31 @@ function draw_randon_rect(ctx,x,y,r,w,h){
// ctx.setStrokeStyle('transparent')
// 左上角
ctx.arc(x + r, y + r, r, Math.PI, Math.PI * 1.5)
-
+
// border-top
ctx.moveTo(x + r, y)
ctx.lineTo(x + w - r, y)
ctx.lineTo(x + w, y + r)
// 右上角
ctx.arc(x + w - r, y + r, r, Math.PI * 1.5, Math.PI * 2)
-
+
// border-right
ctx.lineTo(x + w, y + h - r)
ctx.lineTo(x + w - r, y + h)
// 右下角
ctx.arc(x + w - r, y + h - r, r, 0, Math.PI * 0.5)
-
+
// border-bottom
ctx.lineTo(x + r, y + h)
ctx.lineTo(x, y + h - r)
// 左下角
ctx.arc(x + r, y + h - r, r, Math.PI * 0.5, Math.PI)
-
+
// border-left
ctx.lineTo(x, y + r)
- ctx.lineTo(x + r, y)
+ ctx.lineTo(x + r, y)
// 这里是使用 fill 还是 stroke都可以,二选一即可,但是需要与上面对应
- ctx.fill();
+ ctx.fill();
}
/**
@@ -324,7 +324,7 @@ function get_box_arr(num,x,y,sp,r){
/**
* @param {Object} ctx 画图句柄
- * @param {Object} x x坐标
+ * @param {Object} x x坐标
* @param {Object} y y坐标
* @param {Object} img 画的图片
* @param {Object} color 边框的颜色
@@ -345,7 +345,7 @@ function draw_circle(ctx,x,y,r,img,color,unit){
function null_promise(){
- var promise=new Promise(function(resolve, reject){ var ob={code:-1,data:null}; resolve(ob); }); return promise;
+ var promise=new Promise(function(resolve, reject){ var ob={code:-1,data:null}; resolve(ob); }); return promise;
}
module.exports = {
@@ -371,9 +371,11 @@ module.exports = {
for (var o in n) new RegExp("(" + o + ")").test(r) && (r = r.replace(RegExp.$1, 1 == RegExp.$1.length ? n[o] : ("00" + n[o]).substr(("" + n[o]).length)));
return r;
},
- formar_no_full(e){
+ formar_no_full(e,char){
var t= new Date(1e3 * e);
- return t.getFullYear() +"-"+(t.getMonth() + 1)+"-"+t.getDate();
+ var c="-";
+ if(char) c=char;
+ return t.getFullYear() +c+(t.getMonth() + 1)+c+t.getDate();
},
json2Form: function(e) {
@@ -442,7 +444,7 @@ module.exports = {
sub_last: sub_last,//去掉末尾一个字符
measureText: measureText,//画布需要的函数
check_mobile: check_mobile,//验证手机
- get_rand_item:get_rand_item, //随机获取元素
+ get_rand_item:get_rand_item, //随机获取元素
getDistance:getDistance, //获取俩个经纬网度之间的距离
draw_randon_rect:draw_randon_rect ,//画图画圆角矩形
null_promise:null_promise,//返回空的promise