diff --git a/app.json b/app.json
index 73cb4fb..fb04943 100644
--- a/app.json
+++ b/app.json
@@ -89,8 +89,12 @@
"pages/giftpack/mygiftpack/mygiftpack",
"pages/user/assistance/giftpacklist",
- "pages/user/assistance/task_assistance"
+ "pages/user/assistance/task_assistance",
+ "pages/user/assistance/friend_assistance",
+ "pages/user/assistance/assistance_success",
+ "pages/user/assistance/assistance",
+ "pages/test/zhuli_test"
],
"permission": {
diff --git a/pages/test/zhuli_test.js b/pages/test/zhuli_test.js
new file mode 100644
index 0000000..452f7cd
--- /dev/null
+++ b/pages/test/zhuli_test.js
@@ -0,0 +1,60 @@
+var e = getApp(),
+ a = e.globalData.setting,
+ os = a;
+var regeneratorRuntime = require('../../utils/runtime.js');
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ iurl: a.imghost, //图片地址前缀\
+ taskId:0,
+ mobile:0,
+ },
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function(options) {
+ wx.setNavigationBarTitle({
+ title: "测试帮忙助力",
+ })
+ var th = this;
+ var taskId=options.taskId;
+ this.data.taskId=taskId;
+ },
+
+ getphoneValue:function(e){
+ this.data.mobile=e.detail.value;
+ },
+ //测试正在进行任务
+ bindReg:async function () {
+ var userinfo=null;
+ await getApp().request.promiseGet("/api/weshop/users/page",{
+ data:{mobile:this.data.mobile,store_id:os.stoid}
+ }).then(res=>{
+ userinfo=res.data.data.pageData[0];
+ })
+ if(!userinfo) {
+ getApp().my_warnning("未找到会员",0,this); return false;
+ }
+
+ var task=null;
+ await getApp().request.promiseGet("/api/weshop/marketing/help/help/task/get",{
+ data:{taskId:this.data.taskId,storeId:os.stoid,userId:userinfo.user_id}
+ }).then(res=>{
+ task=res.data.data;
+ })
+ if(!task) {
+ getApp().my_warnning("未找任务",0,this); return false;
+ }
+
+ if(task.status!=0){
+ getApp().my_warnning("任务不是进行中",0,this); return false;
+ }
+ var taking=task.id;
+ getApp().goto("/pages/user/assistance/friend_assistance?tasking=" + taking + "&userId=" + userinfo.user_id);
+ },
+
+
+})
diff --git a/pages/test/zhuli_test.json b/pages/test/zhuli_test.json
new file mode 100644
index 0000000..007d140
--- /dev/null
+++ b/pages/test/zhuli_test.json
@@ -0,0 +1,6 @@
+{
+ "navigationBarTitleText": "助力测试专用",
+ "usingComponents": {
+ "warn": "/components/long_warn/long_warn"
+ }
+}
\ No newline at end of file
diff --git a/pages/test/zhuli_test.wxml b/pages/test/zhuli_test.wxml
new file mode 100644
index 0000000..d86ec97
--- /dev/null
+++ b/pages/test/zhuli_test.wxml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 去帮忙助力
+
+
+
+
+
+
diff --git a/pages/test/zhuli_test.wxss b/pages/test/zhuli_test.wxss
new file mode 100644
index 0000000..11ea42a
--- /dev/null
+++ b/pages/test/zhuli_test.wxss
@@ -0,0 +1,146 @@
+page{
+ border-top: 3rpx solid #EAEAEC;
+}
+.index {
+ position: absolute; width: 100%;
+ z-index: 1;
+}
+
+.logins {
+ width: 100%;
+ padding-top: 60rpx;
+ padding-bottom: 120rpx;
+}
+
+.login_img {
+ width: 192rpx;
+ height: 192rpx;
+ border-radius: 50%
+}
+
+.input_phone {
+ height: 55rpx;
+ line-height: 55rpx;
+ margin-left:10rpx ;
+ position: relative; top:10rpx
+}
+
+.input_code {
+ width: 360rpx;
+ height: 55rpx;
+ line-height: 55rpx;
+ border-radius: 12rpx;
+ margin-right: 20rpx;
+ border: 3rpx solid rgb(230, 230, 230);
+ padding-left: 40rpx;
+ color:#ef8179
+}
+
+.codes {
+ margin-bottom: 65rpx;
+}
+
+.get_code {
+ width: 176rpx;
+ height: 65rpx;
+ line-height: 65rpx;
+ border:1rpx solid rgb(236, 109, 95);
+ color: #ed7067;
+ border-radius: 12rpx;
+ right: 0;
+ top:5rpx;
+}
+
+.userlogin {
+ width: 100%;
+ height: 95rpx;
+ line-height: 95rpx;
+ background-color: #ffc5c0;
+ color: rgb(255, 255, 255);
+ margin-bottom: 30rpx;
+ margin-top: 50rpx
+ }
+
+.userlogin.on{
+ background-color: #eb6359;
+}
+
+.go_index {
+ color: #9d9d9d;
+ margin-bottom: 300rpx;
+}
+
+.sr {
+ width: 90%; margin: 0 auto;
+}
+
+.checkbox {
+ width: 25rpx;
+ height: 25rpx;
+ color: rgb(0, 0, 0);
+ margin-right: 50rpx;
+ margin-bottom: 30rpx
+}
+
+.agrs {
+ padding: 0rpx 65rpx;
+}
+
+.agreement {
+ color: rgb(236, 109, 95);
+ display: initial;
+}
+
+.popup {
+ position: fixed;
+ z-index: 10;
+ background-color: rgba(153, 153, 153, 0.568);
+ height: 100%;
+ width: 100%;
+}
+
+.content {
+ max-height: 800rpx;
+min-height: 100rpx;
+padding: 60rpx 35rpx;
+background-color: rgb(255, 255, 255);
+width: 570rpx;
+margin-bottom: 70rpx;
+overflow-y: scroll;
+border-radius: 15rpx;
+line-height: 50rpx;
+font-size: 26rpx;
+color: #545454;
+
+
+}
+
+.close {
+ width: 65rpx;
+ height: 65rpx;
+}
+
+.xy {
+ display: initial;color: #9c9c9c; line-height: 34rpx
+}
+
+.get_code.on{
+ color: #666;
+}
+.tubiao_set{
+ width: 50rpx; height: 64rpx; margin-right:30rpx; position: relative; top:5rpx;
+}
+.tubiao_set2{
+ width: 46rpx; height: 64rpx; margin-right:34rpx;
+}
+.phone_view{
+ border-bottom:1rpx solid #e8e8e8 ;
+ height: 96rpx; margin-top:50rpx
+
+}
+.phone_view.mt{
+ margin-top:20rpx
+}
+.reg_btn{
+ margin-top:40rpx; margin-bottom: 20rpx
+}
diff --git a/pages/user/assistance/assistance.js b/pages/user/assistance/assistance.js
index 4900b35..bea0ea2 100644
--- a/pages/user/assistance/assistance.js
+++ b/pages/user/assistance/assistance.js
@@ -20,7 +20,7 @@ Page({
switch_head: 0, //0:我的任务,1:活动说明
zl_act: null, //助力活动
zl_user_list: [], //任务列表
- is_load: 0, //是否已经加载
+ is_load: 0, //是否已经加载
cur_page: 1, //页码
page_num: 5, //每页多少个
is_show_more: 0, //是否加载更多
@@ -37,15 +37,16 @@ Page({
var th = this;
var nav_b = th.selectComponent("#nav_b"); //组件的id
nav_b.set_name("助力", "/pages/user/assistance/assistance");
- // 助力活动
- th.assistance();
+
},
/**
* 生命周期函数--监听页面显示
*/
onShow: function() {
-
+ var th = this;
+ // 助力活动
+ th.assistance();
},
// 助力活动
assistance() {
@@ -94,7 +95,9 @@ Page({
var th = this;
var page = th.data.page;
+ if(page==1)th.data.zl_user_list=[];
var help_id = this.data.help_id;
+ var r=Math.random()*100;
t.request.get("/api/weshop/marketing/help/help/user/page", {
isShowLoading: true,
data: {
@@ -102,7 +105,8 @@ Page({
storeId: os.stoid,
helpId: help_id,
page: page,
- pageSize: 5
+ pageSize: 5,
+ r:r,
},
success: function(res) {
clearTimeout(th.data.timer);
@@ -113,7 +117,7 @@ Page({
})
if (res.data.code == 0) {
var list = th.data.zl_user_list;
- //连接数组
+ //连接数组
list = list.concat(res.data.data.pageData);
th.setData({
zl_user_list: list,
@@ -180,4 +184,4 @@ Page({
getApp().goto("/pages/user/assistance/giftpacklist?orderSn=" + orderSn);
}
-})
\ No newline at end of file
+})
diff --git a/pages/user/assistance/giftpacklist.js b/pages/user/assistance/giftpacklist.js
index adf92ba..44758af 100644
--- a/pages/user/assistance/giftpacklist.js
+++ b/pages/user/assistance/giftpacklist.js
@@ -334,10 +334,21 @@ 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/empty.jpg";
+ //this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ;
+ this.setData({ giftImage: this.data.iurl + "/miniapp/images/giftbag/gift01.png"});
+
+ },
+
//关闭导航
close: function() {
var th = this;
diff --git a/pages/user/assistance/giftpacklist.wxml b/pages/user/assistance/giftpacklist.wxml
index a2311dc..01ac169 100644
--- a/pages/user/assistance/giftpacklist.wxml
+++ b/pages/user/assistance/giftpacklist.wxml
@@ -1,6 +1,6 @@
-
+
@@ -105,9 +105,13 @@