diff --git a/app.js b/app.js
index e612c7c..3df75a3 100644
--- a/app.js
+++ b/app.js
@@ -323,12 +323,35 @@ App({
}
//---如果会员没有设置默认门店,同时也没有再注册的时候选择门店--
if(pick_id==0) return func(null);
- //获取用户注册时候的门店
+ //获取用户注册时候的门店,这个门店不能关闭,同时这个门店的分类不能关闭
th.request.get("/api/weshop/pickup/get/"+os.stoid+"/"+pick_id,{
data:{},
success:function (res) {
- th.globalData.pk_store=res.data.data;
- func(th.globalData.pk_store);
+ th.globalData.pk_store=null;
+ if(res.data.code==0 && res.data.data && res.data.data.isstop==0){
+ if(res.data.data.category_id){
+ th.request.get( "/api/weshop/storagecategory/get/"+os.stoid+"/"+res.data.data.category_id, {
+ data: {},
+ success: function (ee) {
+ if(ee.data.code==0 && ee.data.data ){
+ if(ee.data.data.is_show==1){
+ th.globalData.pk_store = res.data.data;
+ func(th.globalData.pk_store);
+ }else{
+ func(null);
+ }
+ }else{
+ func(null);
+ }
+ }
+ })
+ }else{
+ th.globalData.pk_store = res.data.data;
+ func(th.globalData.pk_store);
+ }
+ }else{
+ func(null);
+ }
}
})
}else{
@@ -336,7 +359,6 @@ App({
}
})
-
},
//-------获取购物车数量----------
diff --git a/app.json b/app.json
index 2b76d1a..690151a 100644
--- a/app.json
+++ b/app.json
@@ -1,6 +1,14 @@
{
- "pages": [
+ "pages": [
"pages/index/index/index",
+ "pages/giftpack/birthdaygift/birthdaygift",
+ "pages/user/comment/comment",
+ "pages/giftpack/evaluategift/evaluategift",
+ "pages/giftpack/newvipgift/newvipgift",
+ "pages/giftpack/payment/payment",
+ "pages/giftpack/buygiftpack/giftpackbuy",
+ "pages/giftpack/giftpacklist/giftpacklist",
+ "pages/giftpack/mygiftpack/mygiftpack",
"pages/goods/categoryList/categoryList",
"pages/cart/cart/cart",
"pages/cart/cart2/cart2",
@@ -17,7 +25,6 @@
"pages/user/address_list/address_list",
"pages/user/userinfo/userinfo",
"pages/user/account/account",
- "pages/user/comment/comment",
"pages/user/return_goods_list/return_goods_list",
"pages/user/userinfo_edit/userinfo_edit",
"pages/user/collect_list/collect_list",
@@ -77,8 +84,9 @@
"pages/user/my_service/tment_eval",
"pages/user/my_service/tment_order_list",
"pages/user/my_service/beauty_deta",
-
- "pages/user/labels/labels"
+ "pages/user/labels/labels",
+ "pages/user/view_comment/view_comment",
+ "pages/user/assistance/assistance",
],
"permission": {
"scope.userLocation": {
diff --git a/components/nav_b/nav_b.js b/components/nav_b/nav_b.js
index f6c5c8d..b394f8d 100644
--- a/components/nav_b/nav_b.js
+++ b/components/nav_b/nav_b.js
@@ -1,31 +1,41 @@
-var t = getApp(), os = t.globalData.setting;
+var t = getApp(),
+ os = t.globalData.setting;
Component({
- properties: {
- },
+ properties: {},
data: {
isopen: 0,
iurl: os.imghost,
- nav_left:"首页",//导航左边
- nav_center:"预约",//导航中间
- nav_right: "我的",//导航右边
- nav_left_url: "/pages/index/index/index",//导航左边地址
- nav_center_url:"/pages/user/my_service/tment_order_list",//导航中间地址
- nav_right_url:"/pages/user/index/index",//导航右边地址
+ nav_left: "首页", //导航左边
+ nav_center: "预约", //导航中间
+ nav_right: "我的", //导航右边
+ nav_left_url: "/pages/index/index/index", //导航左边地址
+ nav_center_url: "/pages/user/my_service/tment_order_list", //导航中间地址
+ nav_right_url: "/pages/user/index/index", //导航右边地址
},
- ready: function () {
- },
+ ready: function() {},
methods: {
//--点击打开事件--
- open_box: function () {
- this.setData({ isopen: 1 });
+ open_box: function() {
+ this.setData({
+ isopen: 1
+ });
+ },
+ set_name: function(name,url) {
+ var th = this;
+ th.setData({
+ nav_center:name,
+ nav_center_url:url
+ })
},
//--关闭事件--
- close_box: function () {
- this.setData({ isopen: 0 });
+ close_box: function() {
+ this.setData({
+ isopen: 0
+ });
},
//--跳转--
- goto: function (e) {
+ goto: function(e) {
var url = e.currentTarget.dataset.url;
getApp().goto(url);
this.close_box();
diff --git a/pages/giftpack/birthdaygift/birthdaygift.js b/pages/giftpack/birthdaygift/birthdaygift.js
new file mode 100644
index 0000000..3a695eb
--- /dev/null
+++ b/pages/giftpack/birthdaygift/birthdaygift.js
@@ -0,0 +1,187 @@
+var i = require("../../../utils/util.js")
+var e = getApp(),
+ a = e.globalData.setting,
+ os = a,
+ t = e.request,
+ d = e.globalData;
+Page({
+ data: {
+ url: a.url, //接口网址
+ iurl: a.imghost, //图片前缀网址
+ itemShow: false, //项目栏目是否显示
+ cardShow: false, //代金券栏目是否显示
+ packShow: false, //福利栏目是否显示
+ textShow: false, //规则是否显示
+ integralShow: true, //积分领取是否显示
+ growUpShow: true, //成长值领取是否显示
+ itemButton: '',
+ cardButton: '',
+ getActId: '',
+ getActType: '',
+ giftID: '',
+ receiveState: '一键全部领取',
+ textTitle: '',
+ getUrl: '',
+ noShow: false,
+ cards: [], //礼包内容--礼券
+ itemWare: [], //礼包内容--服务项目
+ integralTitle: "",
+ growUpTitle: "",
+ is_sub: 0, //是否重复领取
+ },
+ GetList: function () {
+ var th = this;
+ var url = "/api/weshop/marketing/giftbag/bound/get";
+ getApp().request.promiseGet(url, {
+ data: {
+ "actId": th.data.getActId, //活动id
+ "actType":4, //活动类型 1新人礼 2评价有礼 3节日营销 4生日营销
+ "giftBagId": th.data.giftID, //礼包ID
+ "storeId": a.stoid, //商家ID
+ "userId": d.user_id //用户ID
+ }
+ }).then(res => {
+ if (res.data.code == 0) {
+ if (res.data.data.lbCoupons.length > 0 && res.data.data.lbCoupons!=null) {
+ //礼包内容--礼券
+ th.setData({
+ cardShow: true,
+ cards: res.data.data.lbCoupons
+ })
+ }
+ if (res.data.data.lbSM.length > 0 && res.data.data.lbSM!=nll) {
+ //礼包内容--服务项目
+ th.setData({
+ itemShow: true,
+ itemWare: res.data.data.lbSM
+ })
+ }
+ //礼包积分
+ if (res.data.data.lbIntegral <= 0) {
+ if (res.data.data.lbGrowthValue <= 0) {
+ th.setData({
+ packShow: false
+ })
+ } else {
+ th.setData({
+ packShow: false,
+ integralShow: false,
+ growUpShow: true
+ })
+ }
+
+ } else {
+ if (res.data.data.lbGrowthValue > 0) {
+ th.setData({
+ packShow: true
+ })
+ } else {
+ th.setData({
+ packShow: true,
+ integralShow: true,
+ growUpShow: false
+ })
+ }
+ }
+ th.setData({
+ integralTitle: '价值' + res.data.data.lbIntegral + '积分',
+ growUpTitle: '价值' + res.data.data.lbGrowthValue + '成长值'
+ })
+ if (res.data.data.receiveState == 0) {
+ th.setData({
+ receiveState: '一键全部领取'
+ })
+ } else {
+ th.setData({
+ receiveState: '已领取'
+ })
+ }
+
+ if (res.data.data.actIntro != '') {
+ th.setData({
+ textShow: true,
+ textTitle: res.data.data.actIntro
+ })
+ }
+ } else {
+ getApp().my_warnning(res.data.msg, 0, th);
+ return false;
+ }
+ })
+ },
+
+ onLoad: function onLoad(options) {
+ var th = this;
+ th.setData({
+ getActId: options.actId,
+ giftID: options.giftBagId
+ })
+ th.GetList();
+ },
+ onShow: function onShow() {
+ var th = this;
+ var textTitle = th.data.textTitle.replace(/
![]()
+
+
+
+
+
+
+
+ ______
+
+
+ 新人专享\n你的美丽我来缔造
+
+
+ ______
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 免费领取
+
+
+ {{item.fromName}}
+
+
+
+
+ {{item.fromName}}
+
+
+ {{"新人可免费享受专业"+item.fromName+",可以享受"+item.num+"次。"}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ———
+
+
+ 新人专享优惠券
+
+
+ ———
+
+
+
+
+
+
+
+
+ 全场通用
+
+
+ 品牌限定
+
+
+ 品类限定
+
+
+ 用途限定
+
+
+ 分类限定
+
+
+ {{item.sum+"元券"}}
+ {{"满"+item.buySum+"元可以用"}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ———
+
+
+ 新人专享福利
+
+
+ ———
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 本活动最终解释权归公司所有,如果有问题请联系客服
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/giftpack/birthdaygift/birthdaygift.wxss b/pages/giftpack/birthdaygift/birthdaygift.wxss
new file mode 100644
index 0000000..33e96fa
--- /dev/null
+++ b/pages/giftpack/birthdaygift/birthdaygift.wxss
@@ -0,0 +1,339 @@
+@charset "UTF-8";
+/* Author XGQ
+ * 2019-10-27
+ */
+.image_box {
+ -webkit-box-pack: center;
+ -webkit-justify-content: center;
+ justify-content: center;
+}
+.image_box image {
+ width: 100%;
+ height: 690rpx;
+}
+.top {
+ margin: -20rpx 28rpx 45rpx 28rpx;
+ padding: 10rpx 10rpx 70rpx 10rpx;
+ background-color: #FFFFFF;
+ border-radius: 0rpx 0rpx 15rpx 15rpx;
+}
+.top_box {
+ display: -webkit-box;
+ display: -webkit-flex;
+ display: flex;
+ text-align: center;
+ -webkit-box-pack: center;
+ -webkit-justify-content: center;
+ justify-content: center;
+}
+.top_box_text {
+ -webkit-box-pack: center;
+ -webkit-justify-content: center;
+ justify-content: center;
+ margin: 50rpx 15rpx 20rpx 15rpx;
+}
+.top_box_text text {
+ color: #FB6451;
+ font-size: 40rpx;
+}
+.top_item {
+ display: -webkit-box;
+ display: -webkit-flex;
+ display: flex;
+ width: 100%;
+ margin: 60rpx 0 0 0;
+}
+.top_item_img {
+ float: left;
+ width: 28%;
+ margin: 0rpx 10rpx 0rpx 20rpx;
+}
+.top_item_img image {
+ width: 150rpx;
+ height: 150rpx;
+ border-radius: 50%;
+ border: #F96865 solid 3rpx;
+}
+.top_item_center {
+ float: left;
+ width: 50%;
+}
+.top_item_center_title {
+ font-size: 35rpx;
+ color: #FB6451;
+ -webkit-box-pack: start;
+ -webkit-justify-content: flex-start;
+ justify-content: flex-start;
+ padding: 0 10rpx 15rpx 0rpx;
+ word-break: break-all;
+ /*属性规定自动换行的处理方法。normal(使用浏览器默认的换行规则。),break-all(允许在单词内换行。),keep-all(只能在半角空格或连字符处换行。)*/
+ text-overflow: ellipsis;
+ display: -webkit-box;
+ /** 对象作为伸缩盒子模型显示 **/
+ -webkit-box-orient: vertical;
+ /** 设置或检索伸缩盒对象的子元素的排列方式 **/
+ -webkit-line-clamp: 2;
+ /** 显示的行数 **/
+ overflow: hidden;
+ /** 隐藏超出的内容 **/
+}
+.top_item_center_ramke {
+ font-size: 25rpx;
+ -webkit-box-pack: start;
+ -webkit-justify-content: flex-start;
+ justify-content: flex-start;
+ line-height: 35rpx;
+ letter-spacing: 0.5rpx;
+ word-break: break-all;
+ /*属性规定自动换行的处理方法。normal(使用浏览器默认的换行规则。),break-all(允许在单词内换行。),keep-all(只能在半角空格或连字符处换行。)*/
+ text-overflow: ellipsis;
+ display: -webkit-box;
+ /** 对象作为伸缩盒子模型显示 **/
+ -webkit-box-orient: vertical;
+ /** 设置或检索伸缩盒对象的子元素的排列方式 **/
+ -webkit-line-clamp: 2;
+ /** 显示的行数 **/
+ overflow: hidden;
+ /** 隐藏超出的内容 **/
+}
+.top_item_button {
+ float: right;
+ width: 22%;
+ padding: 65rpx 20rpx 0 1rpx;
+}
+.top_item_button button {
+ font-size: 25rpx;
+ background: #fd6969;
+ color: #FFFFFF;
+ border-radius: 50rpx;
+ height: 45rpx;
+ line-height: 45rpx;
+}
+.top_card {
+ width: calc(50% - 30rpx);
+ display: inline-block;
+ margin: 15rpx;
+}
+.top_card_box {
+ background-size: cover;
+ background-position: center;
+ background-repeat: no-repeat;
+ border-radius: 20rpx;
+ height: 250rpx;
+ margin: 5rpx;
+}
+.img1 {
+ background-image: url(https://mshopimg.yolipai.net/miniapp/images/giftbag/vip01.png);
+}
+.img2 {
+ background-image: url(https://mshopimg.yolipai.net/miniapp/images/giftbag/vip02.png);
+}
+.img3 {
+ background-image: url(https://mshopimg.yolipai.net/miniapp/images/giftbag/vip03.png);
+}
+.top_card_tite_box {
+ width: 100%;
+ display: -webkit-box;
+ display: -webkit-flex;
+ display: flex;
+ -webkit-box-pack: end;
+ -webkit-justify-content: flex-end;
+ justify-content: flex-end;
+}
+.top_card_tite_a {
+ padding: 5rpx 25rpx 5rpx 25rpx;
+ line-height: 29rpx;
+ font-size: 25rpx;
+ color: #FFFFFF;
+ background: #ffa7c0;
+ border-radius: 0rpx 20rpx 0rpx 6rpx;
+}
+.top_card_tite_b {
+ padding: 5rpx 25rpx 5rpx 25rpx;
+ line-height: 29rpx;
+ font-size: 25rpx;
+ color: #FFFFFF;
+ background: #50dfdb;
+ border-radius: 0rpx 20rpx 0rpx 6rpx;
+}
+.top_card_tite_c {
+ padding: 5rpx 25rpx 5rpx 25rpx;
+ line-height: 29rpx;
+ font-size: 25rpx;
+ color: #FFFFFF;
+ background: #92cbff;
+ border-radius: 0rpx 20rpx 0rpx 6rpx;
+}
+.top_card_tite_d {
+ padding: 5rpx 25rpx 5rpx 25rpx;
+ line-height: 29rpx;
+ font-size: 25rpx;
+ color: #FFFFFF;
+ border-radius: 0rpx 20rpx 0rpx 6rpx;
+}
+.top_card_counte {
+ padding: 40rpx 20rpx 0 0;
+ text-align: center;
+ display: -webkit-box;
+ display: -webkit-flex;
+ display: flex;
+ -webkit-box-pack: center;
+ -webkit-justify-content: center;
+ justify-content: center;
+ -webkit-box-align: center;
+ -webkit-align-items: center;
+ align-items: center;
+ color: #FFFFFF;
+ font-size: 40rpx;
+}
+.top_card_remak {
+ padding: 20rpx 0 40rpx 0;
+ text-align: center;
+ display: -webkit-box;
+ display: -webkit-flex;
+ display: flex;
+ -webkit-box-pack: center;
+ -webkit-justify-content: center;
+ justify-content: center;
+ -webkit-box-align: center;
+ -webkit-align-items: center;
+ align-items: center;
+ font-size: 20rpx;
+ color: #FFFFFF;
+}
+.top_card_button_a button {
+ margin: 0 85rpx;
+ background: #ffa6bc;
+ border-radius: 50rpx;
+ line-height: 40rpx;
+ height: 40rpx;
+ color: white;
+ font-size: 25rpx;
+}
+.top_card_button_b button {
+ margin: 0 85rpx;
+ background: #50dfdb;
+ border-radius: 50rpx;
+ line-height: 40rpx;
+ height: 40rpx;
+ color: white;
+ font-size: 25rpx;
+}
+.top_card_button_c button {
+ margin: 0 85rpx;
+ background: #75bcfc;
+ border-radius: 50rpx;
+ line-height: 40rpx;
+ height: 40rpx;
+ color: white;
+ font-size: 25rpx;
+}
+.top_card_button_d button {
+ margin: 0 85rpx;
+ border-radius: 50rpx;
+ line-height: 40rpx;
+ height: 40rpx;
+ color: white;
+ font-size: 25rpx;
+}
+.top_box_image {
+ padding: 20rpx 20rpx 20rpx 20rpx;
+}
+.top_box_image image {
+ height: 216rpx;
+ width: 100%;
+}
+.top_box_image button {
+ margin: 15rpx 95rpx 0rpx 95rpx;
+ background: #fe6a6a;
+ border-radius: 50rpx;
+ line-height: 60rpx;
+ height: 60rpx;
+ color: white;
+ font-size: 30rpx;
+}
+.foot_box {
+ margin: 0 30rpx 40rpx 30rpx;
+ background: #FFFFFF;
+ border-radius: 20rpx;
+}
+.foot_box_title {
+ font-size: 43rpx;
+ color: #000000;
+ padding: 20rpx 30rpx 20rpx 30rpx;
+}
+.foot_box_text {
+ font-size: 30rpx;
+ color: #000000;
+ line-height: 48rpx;
+ padding: 20rpx 35rpx 50rpx 30rpx;
+}
+.button_box {
+ margin: 50rpx 50rpx 50rpx 50rpx;
+ text-align: center;
+}
+.button {
+ margin: 0 30rpx;
+ background: #61d3dd;
+ border-radius: 50rpx;
+ line-height: 80rpx;
+ height: 80rpx;
+ color: white;
+ font-size: 35rpx;
+}
+.button_text {
+ padding-top: 20rpx;
+ font-size: 20rpx;
+ color: white;
+ height: 100rpx;
+}
+.foot_empty {
+ height: 90rpx;
+}
+.foot_button {
+ display: -webkit-box;
+ display: -webkit-flex;
+ display: flex;
+ margin: 20rpx 0rpx 0rpx 0rpx;
+ padding: 25rpx 0rpx;
+ background: #FFFFFF;
+ text-align: center;
+ -webkit-box-pack: center;
+ -webkit-justify-content: center;
+ justify-content: center;
+ position: fixed;
+ bottom: 0;
+ left: 0;
+ width: 100%;
+}
+.foot_button_buy {
+ background: #e4010c;
+ color: #FFFFFF;
+ width: 400rpx;
+ height: 70rpx;
+ font-size: 28rpx;
+ line-height: 70rpx;
+ border-radius: 40rpx;
+}
+.foot_button_notbuy{
+ background: #999999;
+ color: #FFFFFF;
+ width: 400rpx;
+ height: 70rpx;
+ font-size: 28rpx;
+ line-height: 70rpx;
+ border-radius: 30rpx 30rpx 30rpx 30rpx;
+}
+page {
+ background-color: #9be0e5;
+}
+button::after {
+ border: none;
+}
+.foot_box_text ._img {
+ width: 100%;
+}
+.foot_box_text .img {
+ line-height: 0;
+}
+
diff --git a/pages/giftpack/buygiftpack/giftpackbuy.js b/pages/giftpack/buygiftpack/giftpackbuy.js
index 5bd9134..4573cdb 100644
--- a/pages/giftpack/buygiftpack/giftpackbuy.js
+++ b/pages/giftpack/buygiftpack/giftpackbuy.js
@@ -11,8 +11,8 @@ Page({
getStorageID: '',
getUserID: '',
wareCard: [],
- page: 0,
- pageSize: 10,
+ // page: 0,
+ // pageSize: 10,
isEmpty: false,
loadingType: 0, //定义加载方式 0---contentdown 1---contentrefresh 2---contentnomore
contentText: {
@@ -23,7 +23,7 @@ Page({
ismore: 0, //数据是否全部加载完成
is_read: 0, //是否查询过我的礼包接口
curpage: 1, //当前分页数
- pageSize: 3, //页大小
+ pageSize: 10, //页大小
total: 0, //总数量
},
onLoad: function(options) {
@@ -51,6 +51,9 @@ Page({
var th = this;
var id = e.currentTarget.dataset.id; //活动id
var my_confirm = th.selectComponent("#my_confirm"); //组件的id
+ var order_sn = e.currentTarget.dataset.order_sn; //订单号
+ var money = e.currentTarget.dataset.money; //支付金额
+
my_confirm.open(
"是否确定购买该礼包",
"取消",
@@ -64,7 +67,7 @@ Page({
"actId": '', //活动Id
"actType": '', //活动类型 1:新人礼、2:评价有礼、3:节日营销、4:生日营销
"buyType": '2', //1=积分兑换 2=余额购买
- "lbId": id, //礼包Id
+ "giftBagId": id, //礼包Id
"storeId": that.getStorageID, //商家Id
"userId": that.getUserID, //用户ID
"buyFrom": 2
@@ -80,19 +83,19 @@ Page({
}, // 设置请求的 header
success: function(res) {
if (res.data.code == 0) {
- res = res.data.data;
+ var order_sn = res.data.data.orderSn;
+ res = res.data.data.result;
+ var url = "/pages/giftpack/payment/payment?money=" + money + "&order_sn=" + order_sn;
wx.requestPayment({
timeStamp: String(res.timeStamp),
nonceStr: res.nonceStr,
package: res.packageValue,
signType: res.signType,
paySign: res.paySign,
- success: function(n) {
-
+ success: function(res) {
+ getApp().goto(url);
},
- fail: function(n) {
-
- }
+ fail: function(res) {}
});
} else {
getApp().my_warnning(res.data.msg, 0, th);
@@ -125,7 +128,7 @@ Page({
"actId": '', //活动Id
"actType": '', //活动类型 1:新人礼、2:评价有礼、3:节日营销、4:生日营销
"buyType": '1', //1=积分兑换 2=余额购买
- "lbId": id, //礼包Id
+ "giftBagId": id, //礼包Id
"storeId": that.getStorageID, //商家Id
"userId": that.getUserID //用户ID
};
@@ -196,9 +199,8 @@ Page({
navigateTo: function(e) {
var th = this;
var url = e.currentTarget.dataset.url;
- wx.navigateTo({
- url: url,
- })
+ getApp().goto(url);
+
},
//下拉事件
onReachBottom: function() {
@@ -210,5 +212,16 @@ Page({
})
th.getList();
},
-
+ //图片失败,默认图片
+ bind_bnerr2: function(e) {
+ var _errImg = e.target.dataset.errorimg;
+ var _errObj = {};
+ _errObj[_errImg] = "/public/images/empty.jpg";
+ this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ;
+ },
+ goto: function(e) {
+ var th = this;
+ var url = e.currentTarget.dataset.url;
+ getApp().goto(url);
+ }
})
\ No newline at end of file
diff --git a/pages/giftpack/buygiftpack/giftpackbuy.json b/pages/giftpack/buygiftpack/giftpackbuy.json
index f5d4df2..6acc1c4 100644
--- a/pages/giftpack/buygiftpack/giftpackbuy.json
+++ b/pages/giftpack/buygiftpack/giftpackbuy.json
@@ -1,7 +1,5 @@
{
"navigationBarTitleText": "礼包列表",
- "navigationStyle": "custom",
- "enablePullDownRefresh": false,
"usingComponents": {
"warn": "/components/long_warn/long_warn",
"my_confirm": "/components/my_confirm/my_confirm"
diff --git a/pages/giftpack/buygiftpack/giftpackbuy.wxml b/pages/giftpack/buygiftpack/giftpackbuy.wxml
index 53c9c16..925a563 100644
--- a/pages/giftpack/buygiftpack/giftpackbuy.wxml
+++ b/pages/giftpack/buygiftpack/giftpackbuy.wxml
@@ -1,6 +1,6 @@
-
+
@@ -13,13 +13,13 @@
-
+
-
+
- {{items.giftTitle}}
+ {{items.giftTitle}}
@@ -48,15 +48,29 @@
{{"已售:"+items.giftQty+"件"}}
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
@@ -71,7 +85,7 @@
当前暂无礼包
diff --git a/pages/giftpack/buygiftpack/giftpackbuy.wxss b/pages/giftpack/buygiftpack/giftpackbuy.wxss
index a43b773..45f3688 100644
--- a/pages/giftpack/buygiftpack/giftpackbuy.wxss
+++ b/pages/giftpack/buygiftpack/giftpackbuy.wxss
@@ -16,7 +16,7 @@ page {
.top_img image {
width: 100%;
- height: 660rpx;
+
}
.top_title {
@@ -150,16 +150,12 @@ page {
line-height: 110rpx;
}
-.box_button_remark {
-
-}
-
.box_button_remark text {
font-size: 28rpx;
color: #b9b5b5;
}
-.box_button_buy button {
+.box_button_dui {
display: inline-block;
width: 160rpx;
height: 50rpx;
@@ -167,17 +163,14 @@ page {
background: #fff;
color: #000;
line-height: 50rpx;
+ margin-left: 20rpx;
+ border-radius: 10rpx;
}
-.box_button_dui button {
- display: inline-block;
- width: 160rpx;
- height: 50rpx;
- font-size: 20rpx;
+.box_button_buy {
background: #d41c34;
color: #fff;
- line-height: 50rpx;
- margin-left: 20rpx;
+ border-radius: 10rpx;
}
.foot_box {
diff --git a/pages/giftpack/evaluategift/evaluategift.js b/pages/giftpack/evaluategift/evaluategift.js
new file mode 100644
index 0000000..99d8199
--- /dev/null
+++ b/pages/giftpack/evaluategift/evaluategift.js
@@ -0,0 +1,204 @@
+var i = require("../../../utils/util.js")
+var e = getApp(),
+ a = e.globalData.setting,
+ os = a,
+ t = e.request,
+ d = e.globalData;
+Page({
+ data: {
+ url: a.url, //接口网址
+ iurl: a.imghost, //图片前缀网址
+ itemShow: false, //项目栏目是否显示
+ cardShow: false, //代金券栏目是否显示
+ packShow: false, //福利栏目是否显示
+ textShow: false, //规则是否显示
+ integralShow: true, //积分领取是否显示
+ growUpShow: true, //成长值领取是否显示
+ itemButton: '',
+ cardButton: '',
+ getActId: '',
+ getActType: '',
+ giftBagId: '',
+ receiveState: '一键全部领取',
+ textTitle: '',
+ getUrl: '',
+ noShow: false,
+ cards: [], //礼包内容--礼券
+ itemWare: [], //礼包内容--服务项目
+ integralTitle: "",
+ growUpTitle: "",
+ is_sub: 0, //是否重复领取
+ orderNumber: "", //订单号
+ orderGoodsId: "", //商品id
+ orderType:1,
+ },
+ GetList: function() {
+ var th = this;
+ var url = "/api/weshop/marketing/giftbag/bound/get";
+ getApp().request.promiseGet(url, {
+ data: {
+ "actId": th.data.getActId, //活动Id
+ "actType": 2, //活动类型 1:新人礼、2:评价有礼、3:节日营销、4:生日营销
+ "storeId": a.stoid, //商家Id
+ "userId": d.user_id, //用户ID
+ "orderNumber": th.data.orderNumber,
+ "orderType": th.data.orderType,
+ "orderGoodsId": th.data.orderGoodsId,
+ "gifbagid": th.data.giftBagId
+ }
+ }).then(res => {
+ if (res.data.code == 0) {
+ if (res.data.data.lbCoupons.length > 0 && res.data.data.lbCoupons != null) {
+ //礼包内容--礼券
+ th.setData({
+ cardShow: true,
+ cards: res.data.data.lbCoupons
+ })
+ }
+ if (res.data.data.lbSM.length > 0 && res.data.data.lbSM != null) {
+ //礼包内容--服务项目
+ th.setData({
+ itemShow: true,
+ itemWare: res.data.data.lbSM
+ })
+ }
+ //礼包积分
+ if (res.data.data.lbIntegral <= 0) {
+ if (res.data.data.lbGrowthValue <= 0) {
+ th.setData({
+ packShow: false
+ })
+ } else {
+ th.setData({
+ packShow: false,
+ integralShow: false,
+ growUpShow: true
+ })
+ }
+
+ } else {
+ if (res.data.data.lbGrowthValue > 0) {
+ th.setData({
+ packShow: true
+ })
+ } else {
+ th.setData({
+ packShow: true,
+ integralShow: true,
+ growUpShow: false
+ })
+ }
+ }
+ th.setData({
+ integralTitle: '价值' + res.data.data.lbIntegral + '积分',
+ growUpTitle: '价值' + res.data.data.lbGrowthValue + '成长值'
+ })
+ if (res.data.data.receiveState == 0) {
+ th.setData({
+ receiveState: '一键全部领取'
+ })
+ } else {
+ th.setData({
+ receiveState: '已领取'
+ })
+ }
+
+ if (res.data.data.actIntro != '') {
+ th.setData({
+ textShow: true,
+ textTitle: res.data.data.actIntro
+ })
+ }
+ } else {
+ getApp().my_warnning(res.data.msg, 0, th);
+ return false;
+ }
+ })
+ },
+ onLoad: function(options) {
+ var th = this;
+ th.setData({
+ getActId: options.actId,
+ orderNumber: options.orderNumber,
+ orderGoodsId: options.orderGoodsId,
+ giftBagId: options.giftBagId
+ })
+
+ var orderType = options.orderType;
+ if (orderType) {
+ th.setData({ orderType: orderType})
+ }
+
+
+ th.GetList();
+ },
+ onShow: function() {
+ var th = this;
+ var textTitle = th.data.textTitle.replace(/![]()
+
+
+
+
+
+
+
+ ______
+
+
+ 新人专享\n你的美丽我来缔造
+
+
+ ______
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 免费领取
+
+
+ {{item.fromName}}
+
+
+
+
+ {{item.fromName}}
+
+
+ {{"新人可免费享受专业"+item.fromName+",可以享受"+item.num+"次。"}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ———
+
+
+ 新人专享优惠券
+
+
+ ———
+
+
+
+
+
+
+
+ 全场通用
+
+
+ 品牌限定
+
+
+ 品类限定
+
+
+ 用途限定
+
+
+ 分类限定
+
+
+ {{item.sum+"元券"}}
+ {{"满"+item.buySum+"元可以用"}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ———
+
+
+ 新人专享福利
+
+
+ ———
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 本活动最终解释权归公司所有,如果有问题请联系客服
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/giftpack/evaluategift/evaluategift.wxss b/pages/giftpack/evaluategift/evaluategift.wxss
new file mode 100644
index 0000000..858848e
--- /dev/null
+++ b/pages/giftpack/evaluategift/evaluategift.wxss
@@ -0,0 +1,381 @@
+@charset "UTF-8";
+
+/* Author XGQ
+ * 2019-10-27
+ */
+
+.image_box {
+ -webkit-box-pack: center;
+ -webkit-justify-content: center;
+ justify-content: center;
+}
+
+.image_box image {
+ width: 100%;
+ height: 690rpx;
+}
+
+.top {
+ margin: -20rpx 28rpx 45rpx 28rpx;
+ padding: 10rpx 10rpx 70rpx 10rpx;
+ background-color: #fff;
+ border-radius: 0rpx 0rpx 15rpx 15rpx;
+}
+
+.top_box {
+ display: -webkit-box;
+ display: -webkit-flex;
+ display: flex;
+ text-align: center;
+ -webkit-box-pack: center;
+ -webkit-justify-content: center;
+ justify-content: center;
+}
+
+.top_box_text {
+ -webkit-box-pack: center;
+ -webkit-justify-content: center;
+ justify-content: center;
+ margin: 50rpx 15rpx 20rpx 15rpx;
+}
+
+.top_box_text text {
+ color: rgb(71, 132, 239);
+ font-size: 40rpx;
+}
+
+.top_item {
+ display: -webkit-box;
+ display: -webkit-flex;
+ display: flex;
+ width: 100%;
+ margin: 60rpx 0 0 0;
+}
+
+.top_item_img {
+ float: left;
+ width: 28%;
+ margin: 0rpx 10rpx 0rpx 20rpx;
+}
+
+.top_item_img image {
+ width: 150rpx;
+ height: 150rpx;
+ border-radius: 50%;
+ border: #f96865 solid 3rpx;
+}
+
+.top_item_center {
+ float: left;
+ width: 50%;
+}
+
+.top_item_center_title {
+ font-size: 35rpx;
+ color: rgb(71, 132, 239);
+ -webkit-box-pack: start;
+ -webkit-justify-content: flex-start;
+ justify-content: flex-start;
+ padding: 0 10rpx 15rpx 0rpx;
+ word-break: break-all;
+ text-overflow: ellipsis;
+ display: -webkit-box;
+ -webkit-box-orient: vertical;
+ -webkit-line-clamp: 2;
+ overflow: hidden;
+}
+
+.top_item_center_ramke {
+ font-size: 25rpx;
+ -webkit-box-pack: start;
+ -webkit-justify-content: flex-start;
+ justify-content: flex-start;
+ line-height: 35rpx;
+ letter-spacing: 0.5rpx;
+ word-break: break-all;
+ /*属性规定自动换行的处理方法。normal(使用浏览器默认的换行规则。),break-all(允许在单词内换行。),keep-all(只能在半角空格或连字符处换行。)*/
+ text-overflow: ellipsis;
+ display: -webkit-box;
+ /** 对象作为伸缩盒子模型显示 **/
+ -webkit-box-orient: vertical;
+ /** 设置或检索伸缩盒对象的子元素的排列方式 **/
+ -webkit-line-clamp: 2;
+ /** 显示的行数 **/
+ overflow: hidden;
+ /** 隐藏超出的内容 **/
+}
+
+.top_item_button {
+ float: right;
+ width: 22%;
+ padding: 65rpx 20rpx 0 1rpx;
+}
+
+.top_item_button button {
+ font-size: 25rpx;
+ background: #fd6969;
+ color: #fff;
+ border-radius: 50rpx;
+ height: 45rpx;
+ line-height: 45rpx;
+}
+
+.top_card {
+ width: calc(50% - 30rpx);
+ display: inline-block;
+ margin: 15rpx;
+}
+
+.top_card_box {
+ background-size: cover;
+ background-position: center;
+ background-repeat: no-repeat;
+ border-radius: 20rpx;
+ height: 250rpx;
+ margin: 5rpx;
+}
+
+.img1 {
+ background-image: url(https://mshopimg.yolipai.net/miniapp/images/giftbag/vip01.png);
+}
+
+.img2 {
+ background-image: url(https://mshopimg.yolipai.net/miniapp/images/giftbag/vip02.png);
+}
+
+.img3 {
+ background-image: url(https://mshopimg.yolipai.net/miniapp/images/giftbag/vip03.png);
+}
+
+.top_card_tite_box {
+ width: 100%;
+ display: -webkit-box;
+ display: -webkit-flex;
+ display: flex;
+ -webkit-box-pack: end;
+ -webkit-justify-content: flex-end;
+ justify-content: flex-end;
+}
+
+.top_card_tite_a {
+ padding: 5rpx 25rpx 5rpx 25rpx;
+ line-height: 29rpx;
+ font-size: 25rpx;
+ color: #fff;
+ background: #ffa7c0;
+ border-radius: 0rpx 20rpx 0rpx 6rpx;
+}
+
+.top_card_tite_b {
+ padding: 5rpx 25rpx 5rpx 25rpx;
+ line-height: 29rpx;
+ font-size: 25rpx;
+ color: #fff;
+ background: #50dfdb;
+ border-radius: 0rpx 20rpx 0rpx 6rpx;
+}
+
+.top_card_tite_c {
+ padding: 5rpx 25rpx 5rpx 25rpx;
+ line-height: 29rpx;
+ font-size: 25rpx;
+ color: #fff;
+ background: #92cbff;
+ border-radius: 0rpx 20rpx 0rpx 6rpx;
+}
+
+.top_card_tite_d {
+ padding: 5rpx 25rpx 5rpx 25rpx;
+ line-height: 29rpx;
+ font-size: 25rpx;
+ color: #fff;
+ border-radius: 0rpx 20rpx 0rpx 6rpx;
+}
+
+.top_card_counte {
+ padding: 40rpx 20rpx 0 0;
+ text-align: center;
+ display: -webkit-box;
+ display: -webkit-flex;
+ display: flex;
+ -webkit-box-pack: center;
+ -webkit-justify-content: center;
+ justify-content: center;
+ -webkit-box-align: center;
+ -webkit-align-items: center;
+ align-items: center;
+ color: #fff;
+ font-size: 40rpx;
+}
+
+.top_card_remak {
+ padding: 20rpx 0 40rpx 0;
+ text-align: center;
+ display: -webkit-box;
+ display: -webkit-flex;
+ display: flex;
+ -webkit-box-pack: center;
+ -webkit-justify-content: center;
+ justify-content: center;
+ -webkit-box-align: center;
+ -webkit-align-items: center;
+ align-items: center;
+ font-size: 20rpx;
+ color: #fff;
+}
+
+.top_card_button_a button {
+ margin: 0 85rpx;
+ background: #ffa6bc;
+ border-radius: 50rpx;
+ line-height: 40rpx;
+ height: 40rpx;
+ color: white;
+ font-size: 25rpx;
+}
+
+.top_card_button_b button {
+ margin: 0 85rpx;
+ background: #50dfdb;
+ border-radius: 50rpx;
+ line-height: 40rpx;
+ height: 40rpx;
+ color: white;
+ font-size: 25rpx;
+}
+
+.top_card_button_c button {
+ margin: 0 85rpx;
+ background: #75bcfc;
+ border-radius: 50rpx;
+ line-height: 40rpx;
+ height: 40rpx;
+ color: white;
+ font-size: 25rpx;
+}
+
+.top_card_button_d button {
+ margin: 0 85rpx;
+ border-radius: 50rpx;
+ line-height: 40rpx;
+ height: 40rpx;
+ color: white;
+ font-size: 25rpx;
+}
+
+.top_box_image {
+ padding: 20rpx 20rpx 20rpx 20rpx;
+}
+
+.top_box_image image {
+ height: 216rpx;
+ width: 100%;
+}
+
+.top_box_image button {
+ margin: 15rpx 95rpx 0rpx 95rpx;
+ background: #fe6a6a;
+ border-radius: 50rpx;
+ line-height: 60rpx;
+ height: 60rpx;
+ color: white;
+ font-size: 30rpx;
+}
+
+.foot_box {
+ margin: 0 30rpx 40rpx 30rpx;
+ /* background: #FFFFFF; */
+ border-radius: 20rpx;
+ color: rgb(255, 255, 255);
+}
+
+.foot_box_title {
+ /* color: #000000; */
+ padding: 20rpx 30rpx 20rpx 30rpx;
+}
+
+.foot_box_text {
+ font-size: 30rpx;
+ /* color: #000000; */
+ line-height: 48rpx;
+ padding: 20rpx 35rpx 50rpx 30rpx;
+}
+
+.button_box {
+ margin: 50rpx 50rpx 50rpx 50rpx;
+ text-align: center;
+}
+
+.button {
+ margin: 0 30rpx;
+ background: rgb(93, 147, 245);
+ border-radius: 50rpx;
+ line-height: 80rpx;
+ height: 80rpx;
+ color: rgb(255, 255, 255);
+ font-size: 35rpx;
+}
+
+.button_text {
+ padding-top: 20rpx;
+ font-size: 22rpx;
+ color: white;
+ height: 100rpx;
+}
+
+.foot_empty {
+ height: 90rpx;
+}
+
+.foot_button {
+ display: -webkit-box;
+ display: -webkit-flex;
+ display: flex;
+ margin: 20rpx 0rpx 0rpx 0rpx;
+ padding: 25rpx 0rpx;
+ background: #fff;
+ text-align: center;
+ -webkit-box-pack: center;
+ -webkit-justify-content: center;
+ justify-content: center;
+ position: fixed;
+ bottom: 0;
+ left: 0;
+ width: 100%;
+}
+
+.foot_button_buy {
+ background: #e4010c;
+ color: #fff;
+ width: 400rpx;
+ height: 70rpx;
+ font-size: 28rpx;
+ line-height: 70rpx;
+ border-radius: 40rpx;
+}
+
+.foot_button_notbuy {
+ background: #999;
+ color: #fff;
+ width: 400rpx;
+ height: 70rpx;
+ font-size: 28rpx;
+ line-height: 70rpx;
+ border-radius: 40rpx;
+}
+
+page {
+ background-color: rgb(71, 132, 239);
+}
+
+button::after {
+ border: none;
+}
+
+.foot_box_text ._img {
+ width: 100%;
+}
+
+.foot_box_text .img {
+ line-height: 0;
+}
diff --git a/pages/giftpack/giftpacklist/giftpacklist.js b/pages/giftpack/giftpacklist/giftpacklist.js
index bfd99dd..113c1dd 100644
--- a/pages/giftpack/giftpacklist/giftpacklist.js
+++ b/pages/giftpack/giftpacklist/giftpacklist.js
@@ -3,6 +3,8 @@ var e = getApp(),
os = a,
t = e.request,
d = e.globalData;
+var ut = require("../../../utils/util.js");
+
Page({
data: {
url: a.url, //接口网址
@@ -22,7 +24,9 @@ Page({
getUrl: '',
wareCard: [],
orderSn: "", //订单编号
- lbId:""
+ lbId: "",
+ code: "", //核销码
+ c_state:"0", //判断是否已经使用, 0正常 1已使用 2已过期
},
onLoad: function(options) {
var th = this;
@@ -41,19 +45,12 @@ Page({
th.setData({
giftRemark: th.data.giftRemark.replace(/![]()
![]()
![]()
-
+
@@ -40,19 +40,19 @@
-
+
-
+
-
+
-
+
-
+
@@ -67,16 +67,16 @@
-
+
-
-
+
+
-
+
- 已自动到账
+ 奖励已发放
@@ -95,35 +95,47 @@
-
\ No newline at end of file
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/giftpack/giftpacklist/giftpacklist.wxss b/pages/giftpack/giftpacklist/giftpacklist.wxss
index 1f5ccb2..3d906ad 100644
--- a/pages/giftpack/giftpacklist/giftpacklist.wxss
+++ b/pages/giftpack/giftpacklist/giftpacklist.wxss
@@ -1,203 +1,244 @@
-
@charset "UTF-8";
+
/* Author XGQ
* 2019-12-12
*/
+
.box.data-v-3a5b7e36 {
- -webkit-align-content: center;
- align-content: center;
+ -webkit-align-content: center;
+ align-content: center;
+ background-color: #e85f93;
}
+
.box_top.data-v-3a5b7e36 {
- width: 100%;
+ width: 100%;
}
+
.box_top image.data-v-3a5b7e36 {
- width: 100%;
- height: 540rpx;
+ width: 100%;
+ max-height: 540rpx;
}
+
.box_title.data-v-3a5b7e36 {
- margin: 10rpx 20rpx 20rpx 20rpx;
- padding: 35rpx;
- background-color: #FFFFFF;
- border-radius: 20rpx;
+ margin: 10rpx 20rpx 20rpx 20rpx;
+ padding: 35rpx;
+ background-color: #fff;
+ border-radius: 40rpx;
}
+
.top_title.data-v-3a5b7e36 {
- font-size: 30rpx;
- margin-bottom: 10rpx;
+ font-size: 30rpx;
+ margin-bottom: 10rpx;
}
+
.top_time.data-v-3a5b7e36 {
- font-size: 27rpx;
- color: #B9B5B5;
+ font-size: 27rpx;
+ color: #b9b5b5;
}
+
.top_price.data-v-3a5b7e36 {
- font-size: 35rpx;
- color: #D61B30;
- margin-top: 30rpx;
- margin-bottom: 5rpx;
+ font-size: 35rpx;
+ color: #d61b30;
+ margin-top: 30rpx;
+ margin-bottom: 5rpx;
}
+
.top_foot.data-v-3a5b7e36 {
- display: -webkit-box;
- display: -webkit-flex;
- display: flex;
+ display: -webkit-box;
+ display: -webkit-flex;
+ display: flex;
}
+
.top_foot_price.data-v-3a5b7e36 {
- font-size: 22rpx;
- color: #B9B5B5;
- width: 50%;
- text-decoration: line-through;
+ font-size: 22rpx;
+ color: #b9b5b5;
+ width: 50%;
+ text-decoration: line-through;
}
+
.top_foot_qty.data-v-3a5b7e36 {
- font-size: 22rpx;
- color: #B9B5B5;
- width: 50%;
- -webkit-align-content: flex-end;
- align-content: flex-end;
- text-align: right;
+ font-size: 22rpx;
+ color: #b9b5b5;
+ width: 50%;
+ -webkit-align-content: flex-end;
+ align-content: flex-end;
+ text-align: right;
}
+
.box_ware.data-v-3a5b7e36 {
- margin: 10rpx 20rpx 20rpx 20rpx;
- padding: 35rpx;
- background-color: #FFFFFF;
- border-radius: 20rpx;
+ margin: 10rpx 20rpx 20rpx 20rpx;
+ padding: 35rpx;
+ background-color: #fff;
+ border-radius: 40rpx;
}
+
.box_ware_title.data-v-3a5b7e36 {
- font-size: 35rpx;
- margin: 5rpx 0rpx 30rpx 0rpx;
+ font-size: 35rpx;
+ margin: 5rpx 0rpx 30rpx 0rpx;
}
+
.box_ware_box.data-v-3a5b7e36 {
- display: -webkit-box;
- display: -webkit-flex;
- display: flex;
- margin: 10rpx 0rpx 25rpx 0rpx;
+ display: -webkit-box;
+ display: -webkit-flex;
+ display: flex;
+ margin: 10rpx 0rpx 25rpx 0rpx;
}
-.box_ware_img.data-v-3a5b7e36 {
+
+/* .box_ware_img.data-v-3a5b7e36 {
width: 30%;
height: 180rpx;
border: #999999 solid 1rpx;
-}
+} */
+
.box_ware_img image.data-v-3a5b7e36 {
- width: 100%;
- height: 100%;
+ /* width: 185rpx;
+ height: 190rpx; *//* background-color: rgba(138, 138, 138, 0.63); */
+ border: 2rpx solid #999;
+ width: 120rpx;
+ height: 120rpx;
}
+
.box_ware_item.data-v-3a5b7e36 {
- width: 70%;
- margin-left: 25rpx;
- position: relative;
+ width: 70%;
+ margin-left: 25rpx;
+ position: relative;
}
+
.box_ware_item_title.data-v-3a5b7e36 {
- font-size: 30rpx;
- word-break: break-all;
- text-overflow: ellipsis;
- display: -webkit-box;
- -webkit-box-orient: vertical;
- -webkit-line-clamp: 2;
- overflow: hidden;
+ font-size: 24rpx;
+ word-break: break-all;
+ text-overflow: ellipsis;
+ display: -webkit-box;
+ -webkit-box-orient: vertical;
+ -webkit-line-clamp: 2;
+ overflow: hidden;
}
+
.box_ware_count.data-v-3a5b7e36 {
- display: -webkit-box;
- display: -webkit-flex;
- display: flex;
+ display: -webkit-box;
+ display: -webkit-flex;
+ display: flex;
}
+
.box_ware_item_price.data-v-3a5b7e36 {
- font-size: 25rpx;
- color: #B9B5B5;
- position: absolute;
- bottom: 60rpx;
- left: 0;
+ font-size: 25rpx;
+ color: #b9b5b5;
+ position: absolute;
+ bottom: 60rpx;
+ left: 0;
}
+
.box_ware_item_qty.data-v-3a5b7e36 {
- font-size: 25rpx;
- position: absolute;
- bottom: 15rpx;
- left: 0;
+ font-size: 22rpx;
+ position: absolute;
+ bottom: 15rpx;
+ left: 0;
}
+
.box_ware_code.data-v-3a5b7e36 {
- position: absolute;
- bottom: 10rpx;
- right: 10rpx;
+ position: absolute;
+ right: 10rpx;
+ bottom: 10rpx;
}
+
.box_ware_code image.data-v-3a5b7e36 {
- width: 60rpx;
- height: 60rpx;
+ width: 50rpx;
+ height: 50rpx;
}
+
.box_ware_code text.data-v-3a5b7e36 {
- font-size: 20rpx;
+ font-size: 20rpx;
}
+
.foot_box.data-v-3a5b7e36 {
- margin: 10rpx 20rpx 50rpx 20rpx;
- padding: 35rpx;
- background-color: #FFFFFF;
- border-radius: 20rpx;
+ margin: 10rpx 20rpx 50rpx 20rpx;
+ padding: 35rpx;
+ background-color: #fff;
+ border-radius: 40rpx;
}
+
.foot_box_title.data-v-3a5b7e36 {
- font-size: 35rpx;
- margin-bottom: 30rpx;
+ font-size: 35rpx;
+ margin-bottom: 30rpx;
}
+
.foot_box_remark.data-v-3a5b7e36 {
- font-size: 27rpx;
- line-height: 40rpx;
+ font-size: 27rpx;
+ line-height: 40rpx;
}
+
.foot_empty.data-v-3a5b7e36 {
- height: 90rpx;
+ height: 90rpx;
}
+
.foot_button.data-v-3a5b7e36 {
- display: -webkit-box;
- display: -webkit-flex;
- display: flex;
- margin: 20rpx 0rpx 0rpx 0rpx;
- padding: 25rpx 0rpx;
- background: #FFFFFF;
- text-align: center;
- -webkit-box-pack: center;
- -webkit-justify-content: center;
- justify-content: center;
- position: fixed;
- bottom: 0;
- left: 0;
- width: 100%;
+ display: -webkit-box;
+ display: -webkit-flex;
+ display: flex;
+ margin: 20rpx 0rpx 0rpx 0rpx;
+ padding: 25rpx 0rpx;
+ background: #fff;
+ text-align: center;
+ -webkit-box-pack: center;
+ -webkit-justify-content: center;
+ justify-content: center;
+ position: fixed;
+ bottom: 0;
+ left: 0;
+ width: 100%;
}
+
.foot_button_left.data-v-3a5b7e36 {
- background: #e4010c;
- color: #FFFFFF;
- width: 250rpx;
- height: 70rpx;
- font-size: 28rpx;
- line-height: 70rpx;
- border-radius: 30rpx 0rpx 0rpx 30rpx;
+ background: #e4010c;
+ color: #fff;
+ width: 250rpx;
+ height: 70rpx;
+ font-size: 28rpx;
+ line-height: 70rpx;
+ border-radius: 40rpx;
}
+
.foot_button_right.data-v-3a5b7e36 {
- background: #ffbb42;
- color: #FFFFFF;
- width: 250rpx;
- height: 70rpx;
- font-size: 28rpx;
- line-height: 70rpx;
- border-radius: 0rpx 30rpx 30rpx 0rpx;
+ background: #ffbb42;
+ color: #fff;
+ width: 250rpx;
+ height: 70rpx;
+ font-size: 28rpx;
+ line-height: 70rpx;
+ border-radius: 40rpx;
}
+
.foot_button_buy.data-v-3a5b7e36 {
- background: #e4010c;
- color: #FFFFFF;
- width: 400rpx;
- height: 70rpx;
- font-size: 28rpx;
- line-height: 70rpx;
- border-radius: 30rpx 30rpx 30rpx 30rpx;
+ background: #e4010c;
+ color: #fff;
+ width: 400rpx;
+ height: 70rpx;
+ font-size: 28rpx;
+ line-height: 70rpx;
+ border-radius: 40rpx;
}
+
.foot_button_intalge.data-v-3a5b7e36 {
- background: #ffbb42;
- color: #FFFFFF;
- width: 400rpx;
- height: 70rpx;
- font-size: 28rpx;
- line-height: 70rpx;
- border-radius: 30rpx 30rpx 30rpx 30rpx;
+ background: #ffbb42;
+ color: #fff;
+ width: 400rpx;
+ height: 70rpx;
+ font-size: 28rpx;
+ line-height: 70rpx;
+ border-radius: 40rpx;
}
+
page.data-v-3a5b7e36 {
background-color: #e85f93;
}
+
.foot_box_remark.data-v-3a5b7e36 ._img {
width: 100%;
}
+
.foot_box_remark.data-v-3a5b7e36 .img {
line-height: 0;
}
-
+.overdue.data-v-3a5b7e36{
+ background-color: rgb(153,153,153);
+}
\ No newline at end of file
diff --git a/pages/giftpack/mygiftpack/mygiftpack.js b/pages/giftpack/mygiftpack/mygiftpack.js
index 35c810b..e1c5ca3 100644
--- a/pages/giftpack/mygiftpack/mygiftpack.js
+++ b/pages/giftpack/mygiftpack/mygiftpack.js
@@ -11,8 +11,8 @@ Page({
getStorageID: '',
getUserID: '',
wareCard: [],
- pages: 0,
- pageSize: 10,
+ // pages: 0,
+ // pageSize: 10,
isEmpty: false,
loadingType: 0, //定义加载方式 0---contentdown 1---contentrefresh 2---contentnomore
contentText: {
@@ -23,7 +23,7 @@ Page({
ismore:0,//数据是否全部加载完成
is_read:0,//是否查询过我的礼包接口
curpage: 1, //当前分页数
- pageSize: 3, //页大小
+ pageSize: 10, //页大小
total: 0, //总数量
},
@@ -34,8 +34,6 @@ Page({
th.setData({
getStorageID: a.stoid,
getUserID: d.user_id,
- pages: 1,
- pageSize: 3,
loadingType: 0,
getDate: i.formatTime(new Date().getTime())
})
@@ -169,9 +167,7 @@ Page({
navigateTo: function (e) {
var th = this;
var url = e.currentTarget.dataset.url;
- wx.navigateTo({
- url: url,
- })
+ getApp().goto(url);
},
//下拉事件
onReachBottom: function () {
@@ -183,5 +179,13 @@ Page({
})
th.getList();
},
+ //图片失败,默认图片
+ bind_bnerr2: function (e) {
+ var _errImg = e.target.dataset.errorimg;
+ var _errObj = {};
+ _errObj[_errImg] = "/public/images/empty.jpg";
+ this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ;
+
+ },
});
\ No newline at end of file
diff --git a/pages/giftpack/mygiftpack/mygiftpack.wxml b/pages/giftpack/mygiftpack/mygiftpack.wxml
index ecd8de2..0c215d5 100644
--- a/pages/giftpack/mygiftpack/mygiftpack.wxml
+++ b/pages/giftpack/mygiftpack/mygiftpack.wxml
@@ -1,7 +1,7 @@
-
+
@@ -17,7 +17,7 @@
-
+
@@ -42,7 +42,7 @@
- {{item.giftTitle}}
+ {{item.giftTitle}}
@@ -94,14 +94,11 @@
当前暂无礼包
-
diff --git a/pages/giftpack/mygiftpack/mygiftpack.wxss b/pages/giftpack/mygiftpack/mygiftpack.wxss
index f723b7b..3cd1647 100644
--- a/pages/giftpack/mygiftpack/mygiftpack.wxss
+++ b/pages/giftpack/mygiftpack/mygiftpack.wxss
@@ -12,7 +12,6 @@
.top_img image {
width: 100%;
- height: 660rpx;
}
.top_title {
@@ -236,7 +235,7 @@
}
page {
- background-color: #fb7454;
+ background-color: rgb(250, 120, 88);
}
.After_all {
height: 80rpx;
diff --git a/pages/giftpack/newvipgift/newvipgift.js b/pages/giftpack/newvipgift/newvipgift.js
new file mode 100644
index 0000000..e452000
--- /dev/null
+++ b/pages/giftpack/newvipgift/newvipgift.js
@@ -0,0 +1,187 @@
+var i = require("../../../utils/util.js")
+var e = getApp(),
+ a = e.globalData.setting,
+ os = a,
+ t = e.request,
+ d = e.globalData;
+Page({
+ data: {
+ url: a.url, //接口网址
+ iurl: a.imghost, //图片前缀网址
+ itemShow: false, //项目栏目是否显示
+ cardShow: false, //代金券栏目是否显示
+ packShow: false, //福利栏目是否显示
+ textShow: false, //规则是否显示
+ integralShow: true, //积分领取是否显示
+ growUpShow: true, //成长值领取是否显示
+ itemButton: '',
+ cardButton: '',
+ getActId: '',
+ getActType: '',
+ giftID: '',
+ receiveState: '一键全部领取',
+ textTitle: '',
+ getUrl: '',
+ noShow: false,
+ cards: [], //礼包内容--礼券
+ itemWare: [], //礼包内容--服务项目
+ integralTitle: "",
+ growUpTitle: "",
+ is_sub: 0, //是否重复领取
+ },
+ GetList: function() {
+ var th = this;
+ var url = "/api/weshop/marketing/giftbag/bound/get";
+ getApp().request.promiseGet(url, {
+ data: {
+ "actId": th.data.getActId, //活动id
+ "actType":1, //活动类型 1新人礼 2评价有礼 3节日营销 4生日营销
+ "giftBagId": th.data.giftID, //礼包ID
+ "storeId": a.stoid, //商家ID
+ "userId": d.user_id //用户ID
+ }
+ }).then(res => {
+ if (res.data.code == 0) {
+ if (res.data.data.lbCoupons != null && res.data.data.lbCoupons.length>0) {
+ //礼包内容--礼券
+ th.setData({
+ cardShow: true,
+ cards: res.data.data.lbCoupons
+ })
+ }
+ if (res.data.data.lbSM != null && res.data.data.lbSM.length>0) {
+ //礼包内容--服务项目
+ th.setData({
+ itemShow: true,
+ itemWare: res.data.data.lbSM
+ })
+ }
+ //礼包积分
+ if (res.data.data.lbIntegral <= 0) {
+ if (res.data.data.lbGrowthValue <= 0) {
+ th.setData({
+ packShow: false
+ })
+ } else {
+ th.setData({
+ packShow: false,
+ integralShow: false,
+ growUpShow: true
+ })
+ }
+
+ } else {
+ if (res.data.data.lbGrowthValue > 0) {
+ th.setData({
+ packShow: true
+ })
+ } else {
+ th.setData({
+ packShow: true,
+ integralShow: true,
+ growUpShow: false
+ })
+ }
+ }
+ th.setData({
+ integralTitle: '价值' + res.data.data.lbIntegral + '积分',
+ growUpTitle: '价值' + res.data.data.lbGrowthValue + '成长值'
+ })
+ if (res.data.data.receiveState == 0) {
+ th.setData({
+ receiveState: '一键全部领取'
+ })
+ } else {
+ th.setData({
+ receiveState: '已领取'
+ })
+ }
+
+ if (res.data.data.actIntro != '') {
+ th.setData({
+ textShow: true,
+ textTitle: res.data.data.actIntro
+ })
+ }
+ } else {
+ getApp().my_warnning(res.data.msg, 0, th);
+ return false;
+ }
+ })
+ },
+
+ onLoad: function(options) {
+ var th = this;
+ th.setData({
+ getActId: options.actId,
+ giftID: options.giftBagId
+ })
+ th.GetList();
+ },
+ onShow: function() {
+ var th = this;
+ var textTitle = th.data.textTitle.replace(/
+
+
+
+
+
+
+
+ ______
+
+
+ 新人专享\n你的美丽我来缔造
+
+
+ ______
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 免费领取
+
+
+ {{item.fromName}}
+
+
+
+
+ {{item.fromName}}
+
+
+ {{"新人可免费享受专业"+item.fromName+",可以享受"+item.num+"次。"}}
+
+
+ 数量:
+ {{item.num}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ———
+
+
+ 新人专享优惠券
+
+
+ ———
+
+
+
+
+
+
+
+
+ 全场通用
+
+
+ 品牌限定
+
+
+ 品类限定
+
+
+ 用途限定
+
+
+ 分类限定
+
+
+ {{item.sum+"元券"}}
+ {{"满"+item.buySum+"元可以用"}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ———
+
+
+ 新人专享福利
+
+
+ ———
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 本活动最终解释权归公司所有,如果有问题请联系客服
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/giftpack/newvipgift/newvipgift.wxss b/pages/giftpack/newvipgift/newvipgift.wxss
new file mode 100644
index 0000000..baf031b
--- /dev/null
+++ b/pages/giftpack/newvipgift/newvipgift.wxss
@@ -0,0 +1,410 @@
+@charset "UTF-8";
+
+/* Author XGQ
+ * 2019-10-27
+ */
+
+.image_box {
+ -webkit-box-pack: center;
+ -webkit-justify-content: center;
+ justify-content: center;
+}
+
+.image_box image {
+ width: 100%;
+ height: 690rpx;
+}
+
+.top {
+ margin: -20rpx 28rpx 45rpx 28rpx;
+ padding: 10rpx 10rpx 70rpx 10rpx;
+ background-color: #fff;
+ border-radius: 0rpx 0rpx 15rpx 15rpx;
+}
+
+.top_box {
+ display: -webkit-box;
+ display: -webkit-flex;
+ display: flex;
+ text-align: center;
+ -webkit-box-pack: center;
+ -webkit-justify-content: center;
+ justify-content: center;
+}
+
+.top_box_text {
+ -webkit-box-pack: center;
+ -webkit-justify-content: center;
+ justify-content: center;
+ margin: 50rpx 15rpx 20rpx 15rpx;
+}
+
+.top_box_text text {
+ color: #fb6451;
+ font-size: 40rpx;
+}
+
+.top_item {
+ display: -webkit-box;
+ display: -webkit-flex;
+ display: flex;
+ width: 100%;
+ margin: 60rpx 0 0 0;
+}
+
+.top_item_img {
+ float: left;
+ width: 28%;
+ margin: 0rpx 10rpx 0rpx 20rpx;
+}
+
+.top_item_img image {
+ width: 150rpx;
+ height: 150rpx;
+ border-radius: 50%;
+ border: #f96865 solid 3rpx;
+}
+
+.top_item_center {
+ float: left;
+ width: 50%;
+}
+
+.top_item_center_title {
+ font-size: 35rpx;
+ color: #fb6451;
+ -webkit-box-pack: start;
+ -webkit-justify-content: flex-start;
+ justify-content: flex-start;
+ padding: 0 10rpx 15rpx 0rpx;
+ word-break: break-all;
+ /*属性规定自动换行的处理方法。normal(使用浏览器默认的换行规则。),break-all(允许在单词内换行。),keep-all(只能在半角空格或连字符处换行。)*/
+ text-overflow: ellipsis;
+ display: -webkit-box;
+ /** 对象作为伸缩盒子模型显示 **/
+ -webkit-box-orient: vertical;
+ /** 设置或检索伸缩盒对象的子元素的排列方式 **/
+ -webkit-line-clamp: 2;
+ /** 显示的行数 **/
+ overflow: hidden;
+ /** 隐藏超出的内容 **/
+}
+
+.top_item_center_ramke {
+ font-size: 25rpx;
+ -webkit-box-pack: start;
+ -webkit-justify-content: flex-start;
+ justify-content: flex-start;
+ line-height: 35rpx;
+ letter-spacing: 0.5rpx;
+ word-break: break-all;
+ /*属性规定自动换行的处理方法。normal(使用浏览器默认的换行规则。),break-all(允许在单词内换行。),keep-all(只能在半角空格或连字符处换行。)*/
+ text-overflow: ellipsis;
+ display: -webkit-box;
+ /** 对象作为伸缩盒子模型显示 **/
+ -webkit-box-orient: vertical;
+ /** 设置或检索伸缩盒对象的子元素的排列方式 **/
+ -webkit-line-clamp: 2;
+ /** 显示的行数 **/
+ overflow: hidden;
+ /** 隐藏超出的内容 **/
+}
+
+.top_item_button {
+ float: right;
+ width: 22%;
+ padding: 65rpx 20rpx 0 1rpx;
+}
+
+.top_item_button button {
+ font-size: 25rpx;
+ background: #fd6969;
+ color: #fff;
+ border-radius: 50rpx;
+ height: 45rpx;
+ line-height: 45rpx;
+}
+
+.top_card {
+ width: calc(50% - 30rpx);
+ display: inline-block;
+ margin: 15rpx;
+}
+
+.top_card_box {
+ background-size: cover;
+ background-position: center;
+ background-repeat: no-repeat;
+ border-radius: 20rpx;
+ height: 250rpx;
+ margin: 5rpx;
+}
+
+.img1 {
+ background-image: url(https://mshopimg.yolipai.net/miniapp/images/giftbag/vip01.png);
+}
+
+.img2 {
+ background-image: url(https://mshopimg.yolipai.net/miniapp/images/giftbag/vip02.png);
+}
+
+.img3 {
+ background-image: url(https://mshopimg.yolipai.net/miniapp/images/giftbag/vip03.png);
+}
+
+.top_card_tite_box {
+ width: 100%;
+ display: -webkit-box;
+ display: -webkit-flex;
+ display: flex;
+ -webkit-box-pack: end;
+ -webkit-justify-content: flex-end;
+ justify-content: flex-end;
+}
+
+.top_card_tite_a {
+ padding: 5rpx 25rpx 5rpx 25rpx;
+ line-height: 29rpx;
+ font-size: 25rpx;
+ color: #fff;
+ background: #ffa7c0;
+ border-radius: 0rpx 20rpx 0rpx 6rpx;
+}
+
+.top_card_tite_b {
+ padding: 5rpx 25rpx 5rpx 25rpx;
+ line-height: 29rpx;
+ font-size: 25rpx;
+ color: #fff;
+ background: #50dfdb;
+ border-radius: 0rpx 20rpx 0rpx 6rpx;
+}
+
+.top_card_tite_c {
+ padding: 5rpx 25rpx 5rpx 25rpx;
+ line-height: 29rpx;
+ font-size: 25rpx;
+ color: #fff;
+ background: #92cbff;
+ border-radius: 0rpx 20rpx 0rpx 6rpx;
+}
+
+.top_card_tite_d {
+ padding: 5rpx 25rpx 5rpx 25rpx;
+ line-height: 29rpx;
+ font-size: 25rpx;
+ color: #fff;
+ border-radius: 0rpx 20rpx 0rpx 6rpx;
+}
+
+.top_card_counte {
+ padding: 40rpx 20rpx 0 0;
+ text-align: center;
+ display: -webkit-box;
+ display: -webkit-flex;
+ display: flex;
+ -webkit-box-pack: center;
+ -webkit-justify-content: center;
+ justify-content: center;
+ -webkit-box-align: center;
+ -webkit-align-items: center;
+ align-items: center;
+ color: #fff;
+ font-size: 40rpx;
+}
+
+.top_card_remak {
+ padding: 20rpx 0 40rpx 0;
+ text-align: center;
+ display: -webkit-box;
+ display: -webkit-flex;
+ display: flex;
+ -webkit-box-pack: center;
+ -webkit-justify-content: center;
+ justify-content: center;
+ -webkit-box-align: center;
+ -webkit-align-items: center;
+ align-items: center;
+ font-size: 20rpx;
+ color: #fff;
+}
+
+.top_card_button_a button {
+ margin: 0 85rpx;
+ background: #ffa6bc;
+ border-radius: 50rpx;
+ line-height: 40rpx;
+ height: 40rpx;
+ color: white;
+ font-size: 25rpx;
+}
+
+.top_card_button_b button {
+ margin: 0 85rpx;
+ background: #50dfdb;
+ border-radius: 50rpx;
+ line-height: 40rpx;
+ height: 40rpx;
+ color: white;
+ font-size: 25rpx;
+}
+
+.top_card_button_c button {
+ margin: 0 85rpx;
+ background: #75bcfc;
+ border-radius: 50rpx;
+ line-height: 40rpx;
+ height: 40rpx;
+ color: white;
+ font-size: 25rpx;
+}
+
+.top_card_button_d button {
+ margin: 0 85rpx;
+ border-radius: 50rpx;
+ line-height: 40rpx;
+ height: 40rpx;
+ color: white;
+ font-size: 25rpx;
+}
+
+.top_box_image {
+ padding: 20rpx 20rpx 20rpx 20rpx;
+}
+
+.top_box_image image {
+ height: 216rpx;
+ width: 100%;
+}
+
+.top_box_image button {
+ margin: 15rpx 95rpx 0rpx 95rpx;
+ background: #fe6a6a;
+ border-radius: 50rpx;
+ line-height: 60rpx;
+ height: 60rpx;
+ color: white;
+ font-size: 30rpx;
+}
+
+.foot_box {
+ margin: 0 30rpx 40rpx 30rpx;
+ background: #fff;
+ border-radius: 20rpx;
+}
+
+.foot_box_title {
+ color: #000;
+ padding: 20rpx 30rpx 20rpx 30rpx;
+}
+
+.foot_box_text {
+ font-size: 30rpx;
+ color: #000;
+ line-height: 48rpx;
+ padding: 20rpx 35rpx 50rpx 30rpx;
+}
+
+.button_box {
+ margin: 50rpx 50rpx 50rpx 50rpx;
+ text-align: center;
+}
+
+.button {
+ margin: 0 30rpx;
+ background: #ff9a8c;
+ border-radius: 50rpx;
+ line-height: 80rpx;
+ height: 80rpx;
+ color: white;
+ font-size: 35rpx;
+}
+
+.button_text {
+ padding-top: 20rpx;
+ font-size: 20rpx;
+ color: white;
+ height: 100rpx;
+}
+
+.foot_empty {
+ height: 90rpx;
+}
+
+.foot_button {
+ display: -webkit-box;
+ display: -webkit-flex;
+ display: flex;
+ margin: 20rpx 0rpx 0rpx 0rpx;
+ padding: 25rpx 0rpx;
+ background: #fff;
+ text-align: center;
+ -webkit-box-pack: center;
+ -webkit-justify-content: center;
+ justify-content: center;
+ position: fixed;
+ bottom: 0;
+ left: 0;
+ width: 100%;
+}
+
+.foot_button_buy {
+ background: #e4010c;
+ color: #fff;
+ width: 400rpx;
+ height: 70rpx;
+ font-size: 28rpx;
+ line-height: 70rpx;
+ border-radius: 40rpx;
+}
+
+.foot_button_notbuy {
+ background: #999;
+ color: #fff;
+ width: 400rpx;
+ height: 70rpx;
+ font-size: 28rpx;
+ line-height: 70rpx;
+ border-radius: 40rpx;
+}
+
+page {
+ background-color: #fb6451;
+}
+
+button::after {
+ border: none;
+}
+
+.foot_box_text ._img {
+ width: 100%;
+}
+
+.foot_box_text .img {
+ line-height: 0;
+}
+
+.image {
+ width: 400rpx;
+ height: 200rpx;
+}
+
+.num {
+ color: #fb6451;
+}
+
+.lvip {
+ left: 30rpx;
+ bottom: -58rpx;
+ width: 20rpx;
+ height: 90rpx;
+ z-index: 5;
+}
+
+.rvip {
+ right: 30rpx;
+ bottom: -58rpx;
+ width: 20rpx;
+ height: 90rpx;
+ z-index: 5;
+}
diff --git a/pages/giftpack/payment/payment.js b/pages/giftpack/payment/payment.js
new file mode 100644
index 0000000..6356cee
--- /dev/null
+++ b/pages/giftpack/payment/payment.js
@@ -0,0 +1,30 @@
+var e = getApp();
+var regeneratorRuntime = require('../../../utils/runtime.js');
+Page({
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ url: e.globalData.setting.imghost,
+ resourceUrl: e.globalData.setting.resourceUrl,
+ iurl: e.globalData.setting.imghost,
+ allmoney: 0,
+ order_sn: "",
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ wx.setNavigationBarTitle({
+ title: '支付成功',
+ });
+ var money = parseFloat(options.money), order_sn = options.order_sn;
+ this.setData({allmoney:money,order_sn:order_sn})
+ },
+
+ goto: function () {
+ var url = '/pages/index/index/index';
+ getApp().goto(url)
+ },
+})
\ No newline at end of file
diff --git a/pages/giftpack/payment/payment.json b/pages/giftpack/payment/payment.json
new file mode 100644
index 0000000..1111654
--- /dev/null
+++ b/pages/giftpack/payment/payment.json
@@ -0,0 +1,4 @@
+{
+ "navigationBarTitleText": "支付成功",
+ "usingComponents": {}
+}
\ No newline at end of file
diff --git a/pages/giftpack/payment/payment.wxml b/pages/giftpack/payment/payment.wxml
new file mode 100644
index 0000000..8a23c10
--- /dev/null
+++ b/pages/giftpack/payment/payment.wxml
@@ -0,0 +1,57 @@
+
+
+
+
+
+
+
+
+
+
+ 订单支付成功!
+
+
+
+
+
+
+
+ 订单编号 :
+ {{order_sn}}
+
+
+
+
+ 实付金额 :
+
+ {{filters.toFix(allmoney,2)}}元
+
+
+
+
+ 支付方式 :
+ 微信支付
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 我的礼包
+
+
+
+
+ 回到首页
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/giftpack/payment/payment.wxss b/pages/giftpack/payment/payment.wxss
new file mode 100644
index 0000000..f69e931
--- /dev/null
+++ b/pages/giftpack/payment/payment.wxss
@@ -0,0 +1,84 @@
+page {
+ border-top: 2rpx solid rgb(245, 245, 245);
+}
+.line {
+ border-top: 2rpx solid rgb(245, 245, 245);
+ width: 700rpx;
+}
+
+.payradio .Success_box {
+ padding-top: 45rpx;
+ padding-bottom: 45rpx;
+}
+
+.payradio .Success_box .Success_box_title {
+ margin-top: 45rpx;
+ color: rgb(8, 8, 8);
+}
+
+.payradio image {
+ width: 140rpx;
+ height: 140rpx;
+ display: flex;
+}
+
+.payitem_max {
+ padding: 0rpx 55rpx;
+ color: rgb(104, 104, 104);
+ padding-bottom: 30rpx;
+}
+
+.payitem_max .payitem {
+ margin-top: 30rpx;
+}
+
+.payitem_max .payitem .pay_nam {
+ width: 200rpx;
+}
+
+.payitem_max .payitem view {
+ margin-right: 50rpx;
+}
+.pay_money{
+ color: rgb(219, 27, 52);
+}
+
+.pay_User {
+ padding-left: 55rpx;
+ color: rgb(104, 104, 104);
+}
+
+.pay_User .payitem {
+ margin-top: 30rpx;
+}
+
+.pay_User .payitem .pay_Receiving {
+ width: 128rpx;
+ margin-right: 50rpx;
+}
+
+.pay_User .payitem .pay_name {
+ margin-right: 38rpx;
+ max-width: 250rpx;
+}
+
+.pay_order {
+ margin-top: 115rpx;
+ color: rgb(104, 104, 104);
+ width: 560rpx;
+ height: 62rpx;
+ border-radius: 30rpx;
+ border: 3rpx solid rgb(209, 209, 209);
+}
+
+.pay_home {
+ margin-top: 35rpx;
+ color: rgb(255, 255, 255);
+ width: 566rpx;
+ height: 68rpx;
+ border-radius: 30rpx;
+ background-color: rgb(219, 27, 52);
+}
+.address{
+ width: 470rpx;
+}
\ No newline at end of file
diff --git a/pages/goods/goodsInfo/goodsInfo.js b/pages/goods/goodsInfo/goodsInfo.js
index e967e1a..35b53a0 100644
--- a/pages/goods/goodsInfo/goodsInfo.js
+++ b/pages/goods/goodsInfo/goodsInfo.js
@@ -1335,6 +1335,12 @@ Page({
}).then(res => {
var e = res;
if (e.data.code == 0) {
+
+ //如果有开启距离的功能,没有设置默认门店,要用最近的门店作为默认门店
+ if(dd.lat && !th.data.def_pick_store){
+ th.setData({def_pick_store:e.data.data.pageData[0]});
+ }
+
//-- 如果有默认选择门店的时候,要把默认门店放在第一位 --
if (th.data.def_pick_store) {
for (var k = 0; k < e.data.data.pageData.length; k++) {
@@ -1348,7 +1354,7 @@ Page({
//单总量超出5个的时候
if (e.data.data.total > 5) {
- i.get("/api/weshop/storagecategory/page", {
+ i.get("/api/weshop/storagecategory/page", {
data: {
store_id: o.stoid,
is_show: 1,
@@ -1356,7 +1362,7 @@ Page({
},
success: function(ee) {
if (ee.data.code == 0) {
- if (ee.data.data.pageData.length > 0) {
+ if (ee.data.data && ee.data.data.pageData && ee.data.data.pageData.length > 0) {
var def_arr = new Array();
var ishas = 0;
//-- 开始就看5个门店 --
@@ -1443,16 +1449,25 @@ Page({
});
} else {
- th.setData({
- is_show_sto_cat: -1,
- only_pk: e.data.data.pageData
- });
+ th.setData({
+ is_show_sto_cat: -1,
+ only_pk: e.data.data.pageData
+ });
+ //-----如果没有默认门店,要取第一个门店作为默认店.此时没有门店分类的情况------
+ if (!th.data.def_pick_store) {
+ th.setData({def_pick_store:e.data.data.pageData[0]})
+ }
}
} else {
th.setData({
is_show_sto_cat: -1,
only_pk: e.data.data.pageData
});
+ //-----如果没有默认门店,要取第一个门店作为默认店.此时没有门店分类的情况------
+ if (!th.data.def_pick_store) {
+ th.setData({def_pick_store:e.data.data.pageData[0]})
+ }
+
}
}
});
@@ -1461,6 +1476,10 @@ Page({
is_show_sto_cat: 0,
only_pk: e.data.data.pageData
});
+ //-----如果没有默认门店,要取第一个门店作为默认店------
+ if (!th.data.def_pick_store) {
+ th.setData({def_pick_store:e.data.data.pageData[0]})
+ }
}
}
})
diff --git a/pages/index/index/index.js b/pages/index/index/index.js
index ddf3450..bd585b5 100644
--- a/pages/index/index/index.js
+++ b/pages/index/index/index.js
@@ -1,17 +1,27 @@
-var e = function (e) {
+var e = function(e) {
return e && e.__esModule ? e : {
- default: e
+ default: e
};
- }(require("../../../utils/LoadMore.js")), t = getApp(), a = t.request, o = t.globalData.setting, os = o,
- i = require("../../../utils/util.js"), ut = i, s = require("../../../utils/common.js"), n = new e.default();
+ }(require("../../../utils/LoadMore.js")),
+ t = getApp(),
+ a = t.request,
+ o = t.globalData.setting,
+ os = o,
+ i = require("../../../utils/util.js"),
+ ut = i,
+ s = require("../../../utils/common.js"),
+ n = new e.default();
var regeneratorRuntime = require('../../../utils/runtime.js');
var api = require('../../../api/api.js');
var d = getApp().globalData;
-
+
Page({
data: {
url: o.imghost,
- swiperimage: ["/miniapp/images/title.png"],//,"/miniapp/images/newpeople/newpeople.png"
+ swiperimage: [{
+ image: "/miniapp/images/title.png",
+ nav_url: 0
+ }],
resourceUrl: o.resourceUrl,
logo: o.appLogo,
homeData: null,
@@ -32,69 +42,74 @@ Page({
banner: null,
appdata: null,
- saleGoods: null,//秒杀数据
- pindGoods: null,//拼单数据
- newGoods:null,//新商品
- hotGoods:null,//hot商品
+ saleGoods: null, //秒杀数据
+ pindGoods: null, //拼单数据
+ newGoods: null, //新商品
+ hotGoods: null, //hot商品
//----控制是是否显示计时器---
- is_timer:1,
- ishow:0,
+ is_timer: 1,
+ ishow: 0,
//是不是显示自定义模板
- isTemplate:0,
- template_arr:null,
- bgcolor_t:'',
-
- banner_index:0,
- flash_index:0,
- pt_index:0,
-
- pt_timer_item:null,
- pt_timer_arr:null,
- pt_timer:null,
- pt_timer_active:0,
+ isTemplate: 0,
+ template_arr: null,
+ bgcolor_t: '',
+
+ banner_index: 0,
+ flash_index: 0,
+ pt_index: 0,
+
+ pt_timer_item: null,
+ pt_timer_arr: null,
+ pt_timer: null,
+ pt_timer_active: 0,
//看下商家是否开通会员权益
- is_boot:0,
- gd_category:null,
- is_no_more:0,
- max_sw_height:0, //banner的最大高度
- is_disgraceful:0,//是否显示新人广告
+ is_boot: 0,
+ gd_category: null,
+ is_no_more: 0,
+ max_sw_height: 0, //banner的最大高度
+ is_disgraceful: 0, //是否显示新人广告
+ new_image: "", //新人有礼弹窗图片
+ new_nav: "", //新人页面跳转地址
},
- onLoad: function () {
+ onLoad: function() {
var th = this;
- // n.init(th, "", "recommend");
//看一下商家是否开通了权益
//--初始化是否有打勾--
getApp().request.promiseGet("/api/weshop/users/grade/vip/init/get", {
- data: { storeId: os.stoid }
+ data: {
+ storeId: os.stoid
+ }
}).then(res => {
if (res.data.data) {
var is_init = res.data.data.isBool;
- th.setData({ is_boot: is_init });
+ th.setData({
+ is_boot: is_init
+ });
}
})
th.is_new();
+ // th.is_festival();
},
//关闭新用户领取广告
- close_disgraceful:function(){
+ close_disgraceful: function() {
var th = this;
- th.setData({
- is_disgraceful:0
- })
+ th.setData({
+ is_disgraceful: 0
+ })
},
async onShow() {
var th = this;
- if(getApp().globalData.user_id) getApp().requestCardNum();
+ if (getApp().globalData.user_id) getApp().requestCardNum();
await this.init_load();
//显示的时候要开启计时器
this.data.is_timer = 1;
//如果是自定义模板
if (this.data.isTemplate) {
//---先获取会员---
- t.getUserFir(function () {
- });
+ t.getUserFir(function() {});
} else {
await this.init_fir();
}
@@ -109,7 +124,9 @@ Page({
if (th.data.pt_timer_arr && th.data.pt_timer_arr.length > 0) {
for (var i in th.data.pt_timer_arr) {
var p_item = th.data.pt_timer_arr[i];
- await getApp().request.promiseGet("/api/weshop/users/get/" + os.stoid + "/" + p_item.user_id, {1: 1}).then(res => {
+ await getApp().request.promiseGet("/api/weshop/users/get/" + os.stoid + "/" + p_item.user_id, {
+ 1: 1
+ }).then(res => {
th.data.pt_timer_arr[i].head_pic = res.data.data.head_pic;
th.data.pt_timer_arr[i].nickname = res.data.data.nickname;
})
@@ -119,51 +136,61 @@ Page({
//---处理正在6个分类----
await getApp().request.promiseGet("/api/weshop/goodscategory/page", {
- data: {store_id: os.stoid, pageSize: 5,is_show:1}
+ data: {
+ store_id: os.stoid,
+ pageSize: 5,
+ is_show: 1
+ }
}).then(res => {
- if(res.data.data) {
- var gd_category = res.data.data.pageData;
-
- th.setData({gd_category: gd_category});
+ if (res.data.data) {
+ var gd_category = res.data.data.pageData;
+
+ th.setData({
+ gd_category: gd_category
+ });
}
})
},
-
+
//当隐藏的时候就关闭计时器
- onHide:function(){
- this.data.is_timer=0;
+ onHide: function() {
+ this.data.is_timer = 0;
clearInterval(this.data.pt_timer)
},
//同步初始加载
- async init_load(){
- var th=this;
- await getApp().get_isbuy();
- this.setappdata(getApp().globalData.wxapp_buy_obj);
- await getApp().getConfig_ays();
-
- //因为营销版本的功能包含了自定义模板的功能,是同时的
- //读取全局是否有弄自定义模板
- await api.get_template_fir(o.stoid).then(res=>{
- var data=res.data.data;
- if(data.length>0){
- var temp_data=data[0];
- var t_arr=JSON.parse(temp_data.json_str);
- th.setData({ template_arr: t_arr, isTemplate: 1, bgcolor_t: temp_data.bkcolor});
- }
- })
-
-
- //--首页的问题--
- if(getApp().globalData.config && getApp().globalData.config.store_name!=undefined && getApp().globalData.config.store_name!=null ){
- wx.setNavigationBarTitle({
- title: getApp().globalData.config.store_name,
- });
- }else{
- wx.setNavigationBarTitle({
- title: getApp().globalData.setting.appName,
- });
+ async init_load() {
+ var th = this;
+ await getApp().get_isbuy();
+ this.setappdata(getApp().globalData.wxapp_buy_obj);
+ await getApp().getConfig_ays();
+
+ //因为营销版本的功能包含了自定义模板的功能,是同时的
+ //读取全局是否有弄自定义模板
+ await api.get_template_fir(o.stoid).then(res => {
+ var data = res.data.data;
+ if (data.length > 0) {
+ var temp_data = data[0];
+ var t_arr = JSON.parse(temp_data.json_str);
+ th.setData({
+ template_arr: t_arr,
+ isTemplate: 1,
+ bgcolor_t: temp_data.bkcolor
+ });
}
+ })
+
+
+ //--首页的问题--
+ if (getApp().globalData.config && getApp().globalData.config.store_name != undefined && getApp().globalData.config.store_name != null) {
+ wx.setNavigationBarTitle({
+ title: getApp().globalData.config.store_name,
+ });
+ } else {
+ wx.setNavigationBarTitle({
+ title: getApp().globalData.setting.appName,
+ });
+ }
},
//---读取数据内容---
@@ -172,16 +199,23 @@ Page({
//----广告----
var e = this;
await getApp().request.promiseGet("/api/weshop/ad/list?pid=2&store_id=" + o.stoid, {
- data:{enabled:1}
- }).then(res=>{
+ data: {
+ enabled: 1
+ }
+ }).then(res => {
var a = res.data.data;
var arr = new Array();
for (var i = 0; i < a.length; i++) {
- var tt = { 'ad_code': o.imghost + a[i].ad_code, 'media_link': '' };
+ var tt = {
+ 'ad_code': o.imghost + a[i].ad_code,
+ 'media_link': ''
+ };
arr.push(tt);
}
- if (arr.length>0) e.setData({ banner: arr, });
-
+ if (arr.length > 0) e.setData({
+ banner: arr,
+ });
+
wx.stopPullDownRefresh();
})
@@ -202,20 +236,20 @@ Page({
flash_data = e.data.data.pageData;
if (flash_data == null || flash_data.length <= 0) return false;
-
+
//当前时间戳
var nt = ut.gettimestamp();
- flash_data.forEach(function (val,ind) {
- if(val.start_time>nt) flash_data[ind].status=0;
- else if(val.end_time>nt) flash_data[ind].status=1;
- if(val.buy_num>=val.goods_num) flash_data[ind].status=2;
+ flash_data.forEach(function(val, ind) {
+ if (val.start_time > nt) flash_data[ind].status = 0;
+ else if (val.end_time > nt) flash_data[ind].status = 1;
+ if (val.buy_num >= val.goods_num) flash_data[ind].status = 2;
});
var arr = new Array();
//--三个三个一组---
- for(var i=0;i< flash_data.length;i+=3){
- arr.push(flash_data.slice(i,i+3));
+ for (var i = 0; i < flash_data.length; i += 3) {
+ arr.push(flash_data.slice(i, i + 3));
}
th.setData({
saleGoods: arr
@@ -236,35 +270,35 @@ Page({
var e = res;
if (e.data.code == 0) {
var pd_data = e.data.data.pageData;
-
+
if (pd_data.length == 0) return;
-
+
//获取当前
var nt = ut.gettimestamp();
- pd_data.forEach(function (val,ind) {
- if(val.start_time>nt) pd_data[ind].status=0;
- else if(val.end_time>nt) pd_data[ind].status=1;
- if(val.buy_num>=val.goods_num) pd_data[ind].status=2;
+ pd_data.forEach(function(val, ind) {
+ if (val.start_time > nt) pd_data[ind].status = 0;
+ else if (val.end_time > nt) pd_data[ind].status = 1;
+ if (val.buy_num >= val.goods_num) pd_data[ind].status = 2;
});
-
- //获取当前时间,比较拼团中还在未开始
+
+ //获取当前时间,比较拼团中还在未开始
var timestamp = new Date().getTime();
var is_team_tepy;
- for (var j = 0; j < pd_data.length;j++ ){
+ for (var j = 0; j < pd_data.length; j++) {
pd_data[j].is_team_tepy = 1;
- if (timestamp {
var e = res;
@@ -283,8 +323,8 @@ Page({
var new_data = e.data.data.pageData;
var arr = new Array();
//--三个三个一组---
- for(var i=0;i< new_data.length;i+=3){
- arr.push(new_data.slice(i,i+3));
+ for (var i = 0; i < new_data.length; i += 3) {
+ arr.push(new_data.slice(i, i + 3));
}
th.setData({
newGoods: arr,
@@ -295,7 +335,13 @@ Page({
//------热卖-------
await getApp().request.promiseGet("/api/weshop/goods/page?page=1", {
data: {
- is_mainshow: 1, isonsale: 1, is_on_sale: 1, store_id: o.stoid, pageSize: 9,is_hot:1,orderField:"sort"
+ is_mainshow: 1,
+ isonsale: 1,
+ is_on_sale: 1,
+ store_id: o.stoid,
+ pageSize: 9,
+ is_hot: 1,
+ orderField: "sort"
}
}).then(res => {
var e = res;
@@ -303,8 +349,8 @@ Page({
var new_data = e.data.data.pageData;
var arr = new Array();
//--三个三个一组---
- for(var i=0;i< new_data.length;i+=3){
- arr.push(new_data.slice(i,i+3));
+ for (var i = 0; i < new_data.length; i += 3) {
+ arr.push(new_data.slice(i, i + 3));
}
th.setData({
hotGoods: arr,
@@ -313,18 +359,22 @@ Page({
})
//---调用信息---
// this.requestRecommend();
- this.setData({ishow:1});
+ this.setData({
+ ishow: 1
+ });
//---先获取会员---
- t.getUserFir(function () {
+ t.getUserFir(function() {
});
var goods_list = this.selectComponent("#goods_list"); //组件的id
goods_list.init();
- setTimeout(function () { goods_list.get_list();},300)
+ setTimeout(function() {
+ goods_list.get_list();
+ }, 300)
},
//--判断小程序是否过期--
- setappdata: function (t) {
+ setappdata: function(t) {
if (t.isout == 1)
wx.navigateTo({
url: "/pages/error/error?msg=小程序已经过期",
@@ -335,40 +385,42 @@ Page({
});
},
//---加载更多是靠这个函数----
- onReachBottom: function () {
+ onReachBottom: function() {
var goods_list = this.selectComponent("#goods_list"); //组件的id
- if(goods_list) goods_list.get_list();
+ if (goods_list) goods_list.get_list();
},
- onPullDownRefresh: function (e) {
+ onPullDownRefresh: function(e) {
this.data.recommend = null, this.data.currentPage = 1, n.resetConfig(), this.requestHomePage(),
this.requestRecommend();
},
- onUnload: function () {
+ onUnload: function() {
this.destroyActivityTimer();
},
- setCountTime: function (e) {
+ setCountTime: function(e) {
e.diffTime || (e.diffTime = new Date().getTime() - 1e3 * e.server_time), this.setData({
"sale.diffTime": e.diffTime
}), this.setData({
"sale.good": e.flash_sale_goods[0]
}), this.destroyActivityTimer(), this.createActivityTimer();
},
- createActivityTimer: function () {
- var e = this.data.sale, t = this;
- this.data.timer = setInterval(function () {
- var a = 1e3 * e.good.end_time - new Date().getTime() + e.diffTime, o = i.transTime(a);
+ createActivityTimer: function() {
+ var e = this.data.sale,
+ t = this;
+ this.data.timer = setInterval(function() {
+ var a = 1e3 * e.good.end_time - new Date().getTime() + e.diffTime,
+ o = i.transTime(a);
a <= 0 ? t.requestHomePage() : t.setData({
"sale.countTime": o
});
}, 1e3);
},
- destroyActivityTimer: function () {
+ destroyActivityTimer: function() {
this.data.timer && (clearInterval(this.data.timer), this.data.timer = null);
},
- onPageScroll: function (e) {
+ onPageScroll: function(e) {
this.setData({
scrollTop: e.scrollTop
});
@@ -384,34 +436,34 @@ Page({
}));--*/
},
- jumpSearch: function () {
+ jumpSearch: function() {
wx.navigateTo({
url: "/pages/goods/search/search"
});
},
- onShareAppMessage: function (e) {
+ onShareAppMessage: function(e) {
return o.share;
},
//图片失败,默认图片
- bind_bnerr: function (e) {
+ bind_bnerr: function(e) {
var _errImg = e.target.dataset.errorimg;
var _errObj = {};
- _errObj[_errImg] = this.data.url+ "/miniapp/images/del/logo.jpg";
+ _errObj[_errImg] = this.data.url + "/miniapp/images/del/logo.jpg";
this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ;
},
//图片失败,默认图片
- bind_bnerr2: function (e) {
+ bind_bnerr2: function(e) {
var _errImg = e.target.dataset.errorimg;
var _errurl = e.target.dataset.url;
- var _errObj = {};
- _errObj[_errImg] = "/miniapp/images/default_g_img.gif";
- this.setData(_errObj); //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ;
-
+ var _errObj = {};
+ _errObj[_errImg] = "/miniapp/images/default_g_img.gif";
+ this.setData(_errObj); //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ;
+
},
-//图片失败,默认图片
- bind_bnerr3: function (e) {
+ //图片失败,默认图片
+ bind_bnerr3: function(e) {
var _errImg = e.target.dataset.errorimg;
var _Img = e.target.dataset.img;
if (_Img != undefined) {
@@ -430,7 +482,7 @@ Page({
//----秒杀倒计时函数-----
countDown() {
- if(!this.data.is_timer) return false;
+ if (!this.data.is_timer) return false;
var th = this;
// 获取当前时间,同时得到活动结束时间数组
var newTime = ut.gettimestamp();
@@ -479,7 +531,7 @@ Page({
//----拼单倒计时函数-----
countDown2() {
- if(!this.data.is_timer) return false;
+ if (!this.data.is_timer) return false;
var th = this;
// 获取当前时间,同时得到活动结束时间数组
@@ -529,123 +581,179 @@ Page({
setTimeout(th.countDown2, 1000);
},
- bannerSwiperChange:function (e) {
- var index=e.detail.current;
- this.setData({banner_index:index});
+ bannerSwiperChange: function(e) {
+ var index = e.detail.current;
+ this.setData({
+ banner_index: index
+ });
},
- flashSwiperChange:function (e) {
- var index=e.detail.current;
- this.setData({flash_index:index});
+ flashSwiperChange: function(e) {
+ var index = e.detail.current;
+ this.setData({
+ flash_index: index
+ });
},
- ptSwiperChange:function (e) {
- var index=e.detail.current;
- this.setData({pt_index:index});
+ ptSwiperChange: function(e) {
+ var index = e.detail.current;
+ this.setData({
+ pt_index: index
+ });
},
Interval_pt() {
- var th=this;
- this.data.pt_timer=setInterval(function () {
- var item=ut.get_rand_item(th.data.pt_timer_arr);
- th.setData({pt_timer_active:1,pt_timer_item:item});
- setTimeout(function () {
- th.setData({pt_timer_active:0});
- },1500)
- },4000);
+ var th = this;
+ this.data.pt_timer = setInterval(function() {
+ var item = ut.get_rand_item(th.data.pt_timer_arr);
+ th.setData({
+ pt_timer_active: 1,
+ pt_timer_item: item
+ });
+ setTimeout(function() {
+ th.setData({
+ pt_timer_active: 0
+ });
+ }, 1500)
+ }, 4000);
},
//---扫一扫的函数---
- getScancode: function () {
+ getScancode: function() {
var _this = this;
// 允许从相机和相册扫码
wx.scanCode({
success: (res) => {
- var result = res.result;
- wx.navigateTo({
- url: "/pages/goods/search/search?s_key="+result,
- });
+ var result = res.result;
+ wx.navigateTo({
+ url: "/pages/goods/search/search?s_key=" + result,
+ });
}
})
},
//跳转到分类
- go_cate:function(){
+ go_cate: function() {
getApp().goto("/pages/goods/categoryList/categoryList");
},
- go_url:function(e){
- var url=e.currentTarget.dataset.url;
- getApp().goto(url);
+ go_url: function(e) {
+ var url = e.currentTarget.dataset.url;
+ getApp().goto(url);
},
- bind_bnerr_icon:function (e) {
+ bind_bnerr_icon: function(e) {
var def = "/miniapp/images/no_cate_def.png";
var _err = e.currentTarget.dataset.err;
- var ob={};
- ob[_err]=def;
+ var ob = {};
+ ob[_err] = def;
this.setData(ob);
},
//跳转到分类的商品列表
- go_cate2: function (t) {
+ go_cate2: function(t) {
var cid = t.currentTarget.dataset.cid;
var pid = t.currentTarget.dataset.pid;
var lurl = "/pages/goods/goodsList/goodsList?cat_id=" + cid + "&pid=" + pid;
- wx.navigateTo({ url: lurl });
- },
-
- //跳转到权益
- go_quanyi:function(t){
- 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;
- }
- getApp().goto("/pages/user/userqy/userqy");
- },
-
- imageLoad:function (e) {
- var imgwidth = e.detail.width;
- var imgheight = e.detail.height;
- //宽高比
- var ratio = imgwidth / imgheight;
- //计算的高度值
- var viewHeight = 715 / ratio;
- if(this.data.max_sw_height {
- // var swiperimage = th.data.swiperimage;
- // swiperimage.push("/api/weshop/marketing/newpeople/act/bound/judge");
- // if (res.data.code == 0) {
- // th.setData({
- // is_disgraceful:1
- // })
- // }
- // })
-
- // getApp().request.promiseGet("/api/weshop/marketing/newpeople/act/judge", {
- // data: {
- // storeId: o.stoid,
- // userId: d.user_id
- // }
- // }).then(res => {
- // var swiperimage = th.data.swiperimage;
- // swiperimage.push("/miniapp/images/newpeople/newpeople.png");
- // if (res.data.code == 0) {
- // th.setData({
- // swiperimage: swiperimage
- // })
- // }
- // })
+ is_new: function() {
+ var th = this;
+ wx.hideLoading();
+ getApp().request.promiseGet("/api/weshop/marketing/newpeople/act/judge", {
+ data: {
+ storeId: os.stoid,
+ userId: d.user_id
+ }
+ }).then(res => {
+ if (res.data.code == 0) {
+ var actid = res.data.data.id; //活动id
+ var giftBagId = res.data.data.giftBagId; //礼包id
+ var new_nav = "/pages/giftpack/newvipgift/newvipgift?actId=" + actid + '&' + 'actType=' + 1 + '&' + 'giftBagId=' + giftBagId;
+ var new_image = res.data.data.imageurl;
+ var swiperimage = th.data.swiperimage;
+ var img = {
+ image: "/miniapp/images/newpeople/newpeople.png",
+ nav_url: new_nav
+ }
+ swiperimage.unshift(img);
+ th.setData({
+ swiperimage: swiperimage,
+ new_image: new_image,
+ new_nav: new_nav
+ })
- }
+ getApp().request.promiseGet("/api/weshop/marketing/newpeople/act/bound/judge", {
+ data: {
+ storeId: o.stoid,
+ userId: d.user_id
+ }
+ }).then(res => {
+ if (res.data.code == 0) {
+ th.setData({
+ is_disgraceful: 1
+ })
+ }
+ })
+ }
+ })
+ },
+ is_festival: function(e) {
+ var th = this;
+ var url = "/api/weshop/marketing/holiday/act/judge";
+ getApp().request.promiseGet(url, {
+ data: {
+ storeId: os.stoid,
+ userId: d.user_id
+ }
+ }).then(res => {
+ if (res.data.code == 0) {
+ var actid = res.data.data.id; //活动id
+ var giftBagId = res.data.data.gifBagId; //礼包id
+ var nav_url = "/pages/giftpack/festival/festival?actId=" + actid + '&' + 'actType=' + 3 + '&' + 'giftBagId=' + giftBagId;
+ var swiperimage = th.data.swiperimage;
+ var actImg = res.data.data.actImg;
+ var img = {
+ image: actImg,
+ nav_url: nav_url
+ }
+ swiperimage.unshift(img);
+ th.setData({
+ swiperimage: swiperimage,
+ new_nav: nav_url
+ })
+ }
+ })
+ }
});
\ No newline at end of file
diff --git a/pages/index/index/index.wxml b/pages/index/index/index.wxml
index 94e19af..b512855 100644
--- a/pages/index/index/index.wxml
+++ b/pages/index/index/index.wxml
@@ -108,14 +108,13 @@
-
-
+
-
+
@@ -347,9 +346,9 @@
-
+
-
+
diff --git a/pages/index/index/index.wxss b/pages/index/index/index.wxss
index 8a2e497..8c7514a 100644
--- a/pages/index/index/index.wxss
+++ b/pages/index/index/index.wxss
@@ -451,6 +451,7 @@
.xc-title-img {
height: 220rpx;
width: 100%;
+ border-radius: 15rpx;
}
.title-img-frame {
@@ -906,5 +907,5 @@
}
.swiper{
height: 250rpx;
- padding-bottom:10rpx;
+ padding-bottom:30rpx;
}
\ No newline at end of file
diff --git a/pages/user/add_comment/add_comment.js b/pages/user/add_comment/add_comment.js
index ba233b8..2d02b6b 100644
--- a/pages/user/add_comment/add_comment.js
+++ b/pages/user/add_comment/add_comment.js
@@ -8,7 +8,6 @@ Page({
resourceUrl: a.resourceUrl,
iurl: a.imghost,
defaultPhoto: a.resourceUrl + "/static/images/camera.png",
-
uploadPath: [], //上传后文件路径
maxWord: 0,
is_anonymous: !1,
@@ -20,7 +19,9 @@ Page({
isLongPress: !1,
userinfo: null,
imgs: [], //本地文件再上传时的路径
- lenMore:0
+ lenMore:0,
+ goods_id: "", //商品id
+ order_id: "", //订单id
},
onLoad: async function (a) {
var th = this;
@@ -35,6 +36,10 @@ Page({
console.log(e);
th.setData({userinfo: e})
})
+ th.setData({
+ goods_id: a.goods_id,
+ order_id: a.order_id
+ })
},
keyUpChangeNum: function (t) {
this.setData({
@@ -79,7 +84,7 @@ Page({
});
});
},
- submitComment: function () {
+ submitComment: function (i) {
var a = this;
if (!a.data.service_rank || !a.data.goods_rank || !a.data.deliver_rank)
return getApp().my_warnning("请先打分",0,a);
@@ -111,9 +116,15 @@ Page({
e.post("/api/weshop/comment/savecomment", {
data:p_data,
success: function (a) {
+ if(a.data.code==0){
wx.setStorageSync("user:comment:update", !0), t.showSuccess("评论成功", function () {
- wx.navigateBack();
+ // wx.navigateBack();
+ var url = i.currentTarget.dataset.url;
+ getApp().goto(url);
});
+ }else{
+ getApp().my_warnning(a.data.msg,0,a);
+ }
}
});
//});
diff --git a/pages/user/add_comment/add_comment.wxml b/pages/user/add_comment/add_comment.wxml
index e4f7f9f..71d1232 100644
--- a/pages/user/add_comment/add_comment.wxml
+++ b/pages/user/add_comment/add_comment.wxml
@@ -106,7 +106,7 @@
- 提交评价
+ 提交评价
diff --git a/pages/user/assistance/assistance.js b/pages/user/assistance/assistance.js
new file mode 100644
index 0000000..8d29625
--- /dev/null
+++ b/pages/user/assistance/assistance.js
@@ -0,0 +1,144 @@
+var t = getApp(),
+ a = t.request,
+ o = t.globalData.setting,
+ os = o,
+ i = require("../../../utils/util.js"),
+ ut = i,
+ s = require("../../../utils/common.js");
+var regeneratorRuntime = require('../../../utils/runtime.js');
+var oo = t.globalData.setting;
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ url: os.url, //接口网址
+ iurl: os.imghost, //图片前缀网址
+ switch_head: 0, //0:我的任务,1:活动说明
+ zl_act: null, //助力活动
+ zl_user_list: [], //任务列表
+ is_load: 0, //是否已经加载
+ cur_page: 1, //页码
+ page_num: 5, //每页多少个
+ is_show_more: 0, //是否加载更多
+ help_id:"",//助力活动的id
+ timer:"",//任务列表的定时器
+
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function(options) {
+ var th = this;
+ var nav_b = th.selectComponent("#nav_b"); //组件的id
+ nav_b.set_name("助力", "");
+ // 助力活动
+ this.assistance();
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function() {
+ var th=this;
+ this.data.timer= setInterval(function () {
+ th.get_list();
+
+ },2000)
+
+ },
+ // 助力活动
+ async assistance() {
+ var th=this;
+ var user_id = getApp().globalData.user_id;
+ var store_id = os.stoid;
+
+ await getApp().request.promiseGet("/api/weshop/marketing/help/act/judge", {
+ data: {
+ storeId: store_id,
+ userId: user_id
+ }
+ }).then(res => {
+ if (res.data.code == 0) {
+
+ var help_data=res.data.data;
+ console.log(help_data.id,'数据', res.data.data);
+ th.setData({
+ zl_act:help_data,
+ help_id:help_data.id
+ });
+
+ }
+ })
+
+ },
+
+ //--点击获取用户任务列表--会员的任务列表
+ get_list:function() {
+ var th = this;
+ var help_id=this.data.help_id;
+ t.request.get("/api/weshop/marketing/help/help/user/page", {
+ data: {
+ userId:getApp().globalData.user_id,
+ storeId: os.stoid,
+ helpId: help_id
+ },
+ success: function(res) {
+ clearTimeout(th.data.timer);
+
+ if (!th.data.is_load) th.setData({
+ is_load: 1
+ })
+ 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
+ });
+ var n_all_num = th.data.cur_page * th.data.page_num;
+ if (res.data.data.total > n_all_num) th.setData({
+ is_show_more: 1
+ })
+ else th.setData({
+ is_show_more: 0
+ })
+ //页吗要更新一下
+ th.data.cur_page++;
+ } else {
+ th.setData({
+ is_show_more: 0
+ })
+ }
+
+ }
+ })
+ },
+
+ //-----跳转到领取礼包的页面------
+ go_task: function() {
+ var help_id=this.data.help_id;
+
+ getApp().goto("/pages/user/assistance/task_assistance?help_id="+help_id);
+ },
+ switch_head: function (e) {
+ var th = this;
+ var index = e.currentTarget.dataset.index; //获取当前选择的是任务还是活动说明
+ var switch_head = th.data.switch_head; //0任务,1活动说明
+ if (index != switch_head) {
+ th.setData({
+ switch_head: index
+ })
+ }
+ },
+
+ //关闭导航
+ close: function () {
+ var th = this;
+ var nav_b = th.selectComponent("#nav_b"); //组件的id
+ nav_b.close_box();
+ },
+
+})
\ No newline at end of file
diff --git a/pages/user/assistance/assistance.json b/pages/user/assistance/assistance.json
new file mode 100644
index 0000000..d1cfde4
--- /dev/null
+++ b/pages/user/assistance/assistance.json
@@ -0,0 +1,9 @@
+{
+ "navigationBarTitleText": "好友助力",
+ "navigationStyle": "custom",
+ "usingComponents": {
+ "warn": "/components/long_warn/long_warn",
+ "my_confirm": "/components/my_confirm/my_confirm",
+ "nav_b": "/components/nav_b/nav_b"
+ }
+}
\ No newline at end of file
diff --git a/pages/user/assistance/assistance.wxml b/pages/user/assistance/assistance.wxml
new file mode 100644
index 0000000..2fce9ba
--- /dev/null
+++ b/pages/user/assistance/assistance.wxml
@@ -0,0 +1,106 @@
+
+
+
+
+
+
+
+
+
+
+ 机会总是留给最有行动力的人
+
+
+
+
+
+ 活动时间:
+ {{filter.fm_time(zl_act.beginDate)}}-{{filter.fm_time(zl_act.endDate)}}
+
+
+
+
+ 立即领取
+
+
+
+
+
+
+
+
+
+
+
+ 我的任务
+
+
+
+ 活动说明
+
+
+
+
+
+
+
+
+ {{item.help_taskname}}
+
+
+
+
+ 领取礼包
+
+
+ {{item.helped}}/{{item.help_num}}
+
+
+ 查看礼包
+
+
+
+
+
+
+
+
+ 点击加载更多
+
+
+
+
+
+
+
+
+ 暂无任务记录
+
+
+
+ 已有
+ {{zl_act.countAll}}
+ 人领取了任务
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/user/assistance/assistance.wxss b/pages/user/assistance/assistance.wxss
new file mode 100644
index 0000000..39bf1cd
--- /dev/null
+++ b/pages/user/assistance/assistance.wxss
@@ -0,0 +1,132 @@
+page {
+ background-color: rgb(208, 17, 25);
+ width: 100%;
+ height: 100%;
+}
+
+.lumi {
+ position: absolute;
+ z-index: 0;
+ width: 100%;
+ height: 1100rpx;
+}
+
+.zindex {
+ position: absolute;
+ z-index: 1;
+ width: 100%;
+}
+
+.top {
+ padding-bottom: 75rpx;
+}
+
+.getgift {
+ width: 610rpx;
+ height: 130rpx;
+ padding-top: 70rpx;
+}
+
+.excitation {
+ padding-top: 30rpx;
+ color: rgb(255, 255, 255);
+ padding-bottom: 50rpx;
+}
+
+.gift {
+ width: 550rpx;
+ height: 500rpx;
+}
+
+.time {
+ color: rgb(255, 255, 255);
+ margin-bottom: 55rpx;
+ text-decoration: underline;
+ margin-top: 10rpx;
+}
+
+.take {
+ width: 440rpx;
+ height: 77rpx;
+ color: rgb(221, 45, 8);
+ background-color: rgb(252, 210, 10);
+ border-radius: 45rpx;
+ font-weight: 900;
+ line-height: 77rpx;
+ box-shadow: 0rpx 7rpx 0rpx 0rpx rgb(245, 119, 6);
+ font-size: 38rpx;
+}
+
+.head {
+ border-bottom: 4rpx solid rgb(253, 193, 7);
+ color: rgb(255, 255, 255);
+ height: 50rpx;
+ line-height: 50rpx;
+}
+
+.lhead {
+ border-top: 4rpx solid rgb(253, 193, 7);
+ border-left: 4rpx solid rgb(253, 193, 7);
+ border-right: 4rpx solid rgb(253, 193, 7);
+ width: 290rpx;
+ height: 50rpx;
+ line-height: 50rpx;
+}
+
+.rhead {
+ background-color: rgb(253, 193, 7);
+ border-bottom: 4rpx solid rgb(253, 193, 7);
+}
+
+.items {
+ padding-top: 50rpx;
+}
+
+.explain {
+ width: 30rpx;
+ height: 30rpx;
+ margin-right: 10rpx;
+}
+
+.padding {
+ padding: 0rpx 50rpx;
+}
+
+.content {
+ padding-bottom: 35rpx;
+}
+
+.width {
+ width: 290rpx;
+}
+
+.line {
+ width: 110rpx;
+ border-top: 2rpx solid rgb(255, 255, 255);
+}
+
+.loads {
+ margin-bottom: 35rpx;
+}
+
+.load {
+ margin: 0rpx 26rpx;
+}
+
+.item {
+ margin-bottom: 35rpx;
+}
+
+.state {
+ text-decoration: underline;
+}
+.nostate{
+ color: rgb(195,155,156);
+}
+.nothing {
+ padding: 50rpx 0rpx;
+}
+
+.receive {
+ padding-bottom: 50rpx;
+}
diff --git a/pages/user/assistance/assistance_success.js b/pages/user/assistance/assistance_success.js
new file mode 100644
index 0000000..280c870
--- /dev/null
+++ b/pages/user/assistance/assistance_success.js
@@ -0,0 +1,85 @@
+var auth = require("../../../utils/auth.js"), rq = require("../../../utils/request.js");
+var e = getApp(), app = e, s = e.globalData.setting, os = s, app_d = e.globalData;
+var regeneratorRuntime = require('../../../utils/runtime.js');
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ iurl: s.imghost,
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+
+ },
+
+
+ // 初始化判断微信余额
+ async weixin() {
+ var user_id = getApp().globalData.user_id;
+ var store_id = os.stoid;
+ await getApp().request.promiseGet("/api/weshop/marketing/help/act/judge", {
+ data: {
+ user_id: user_id,
+ store_id: store_id
+ }
+ }).then(res => {
+ console.log("是什么东西", res.data.code);
+
+ })
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/user/assistance/assistance_success.json b/pages/user/assistance/assistance_success.json
new file mode 100644
index 0000000..5467480
--- /dev/null
+++ b/pages/user/assistance/assistance_success.json
@@ -0,0 +1,7 @@
+{
+ "usingComponents": {
+ "warn": "/components/long_warn/long_warn",
+ "my_confirm": "/components/my_confirm/my_confirm",
+ "nav_b": "/components/nav_b/nav_b"
+ }
+}
\ No newline at end of file
diff --git a/pages/user/assistance/assistance_success.wxml b/pages/user/assistance/assistance_success.wxml
new file mode 100644
index 0000000..173aabc
--- /dev/null
+++ b/pages/user/assistance/assistance_success.wxml
@@ -0,0 +1,39 @@
+
+
+
+
+ 你好
+
+
+ 助力成功,自己也差拆一个吧~
+
+
+
+
+
+
+
+
+ 活动时间:5月23日-6月15日
+
+
+
+我也要参加
+已有126人领取礼盒
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/user/assistance/assistance_success.wxss b/pages/user/assistance/assistance_success.wxss
new file mode 100644
index 0000000..a7130a5
--- /dev/null
+++ b/pages/user/assistance/assistance_success.wxss
@@ -0,0 +1,61 @@
+page{
+ background: #d01119;
+ width: 100%;
+ height: 100%
+
+}
+.top-back{
+ width: 100%;
+ height: 60%;
+ background-repead:no-repead;
+ background-size:100% 100%;
+
+}
+.user_img{
+ width: 70rpx;
+ height: 70rpx;
+ margin-right: 15rpx;
+
+}
+.user_assis{
+ width: 85%;
+ margin: auto;
+ padding-top: 50rpx;
+}
+.caption_title{
+ margin-top: 60rpx;
+ margin-bottom: 30rpx;
+}
+.assis_liba{
+ width: 50%;
+ margin: auto;
+ height: 340rpx;
+
+}
+.activity_time{
+ border-bottom: 1rpx solid #fff;
+ margin: auto;
+ display: inline;
+}
+.cklie_button{
+ margin: auto;
+ width: 60%;
+ height: 80rpx;
+ border-radius: 50rpx;
+ margin-top: 20rpx;
+ background: #fbda0e;
+ color:#d01119;
+ line-height: 80rpx;
+ letter-spacing: 5rpx;
+ box-shadow: 0rpx 7rpx 0rpx 0rpx rgb(245, 119, 6);
+ font-size: 44rpx;
+ margin-bottom: 40rpx;
+}
+.con_div{
+z-index: 15;
+position: fixed;
+top: 0;
+left: 0;
+height: 100%;
+width: 100%;
+}
\ No newline at end of file
diff --git a/pages/user/assistance/c_filter.wxs b/pages/user/assistance/c_filter.wxs
new file mode 100644
index 0000000..b57d4fa
--- /dev/null
+++ b/pages/user/assistance/c_filter.wxs
@@ -0,0 +1,16 @@
+var filters = {
+ toFix:function(val,count){
+ return val.toFixed(count)
+ },
+ fm_time:function(ts) {
+ var d = getDate(ts*1000)
+ var fm=(d.getMonth()+1)+"月"+ d.getDate()+"日";
+ return fm;
+ },
+
+}
+
+module.exports = {
+ toFix: filters.toFix,
+ fm_time:filters.fm_time,
+}
\ No newline at end of file
diff --git a/pages/user/assistance/friend_assistance.js b/pages/user/assistance/friend_assistance.js
new file mode 100644
index 0000000..7dab41e
--- /dev/null
+++ b/pages/user/assistance/friend_assistance.js
@@ -0,0 +1,90 @@
+var auth = require("../../../utils/auth.js"), rq = require("../../../utils/request.js");
+var e = getApp(), app = e, s = e.globalData.setting, os = s, app_d = e.globalData;
+var regeneratorRuntime = require('../../../utils/runtime.js');
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ iurl: s.imghost,
+ is_show:0,//显示弹框
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+
+ },
+
+
+ // 跳转到助力成功页
+ participate_activity:function(){
+ wx.navigateTo({
+ url: '/pages/user/assistance/assistance_success',
+ })
+ },
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+
+ },
+ //点击开启礼盒
+ cklie_button:function(){
+ this.setData({ is_show:1});
+ },
+ //点击关闭礼盒
+ clike_none:function(){
+ this.setData({ is_show:0});
+ },
+ //导航球
+ close: function () {
+ var th = this;
+ var nav_b = th.selectComponent("#nav_b"); //组件的id
+ nav_b.close_box();
+ nav_b.set_name("助力", "");
+ },
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/user/assistance/friend_assistance.json b/pages/user/assistance/friend_assistance.json
new file mode 100644
index 0000000..2ee27f1
--- /dev/null
+++ b/pages/user/assistance/friend_assistance.json
@@ -0,0 +1,7 @@
+{
+ "usingComponents": {
+ "warn": "/components/long_warn/long_warn",
+ "my_confirm": "/components/my_confirm/my_confirm",
+ "nav_b": "/components/nav_b/nav_b"
+ }
+}
\ No newline at end of file
diff --git a/pages/user/assistance/friend_assistance.wxml b/pages/user/assistance/friend_assistance.wxml
new file mode 100644
index 0000000..a0301c5
--- /dev/null
+++ b/pages/user/assistance/friend_assistance.wxml
@@ -0,0 +1,38 @@
+
+
+
+ 你好
+
+
+ 拜托拜托,帮我拆礼盒得好礼~
+
+
+
+
+
+
+
+
+ 活动时间:5月23日-6月15日
+
+
+
+帮他拆礼盒
+已有126人领取礼盒
+
+
+
+
+
+ 我也要参加
+
+ 已成功帮你的小伙伴助力!
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/user/assistance/friend_assistance.wxss b/pages/user/assistance/friend_assistance.wxss
new file mode 100644
index 0000000..28e3b98
--- /dev/null
+++ b/pages/user/assistance/friend_assistance.wxss
@@ -0,0 +1,107 @@
+page{
+ background: #d01119;
+ width: 100%;
+ height: 100%
+
+}
+.top-back{
+ width: 100%;
+ height: 60%;
+ background-repead:no-repead;
+ background-size:100% 100%;
+
+}
+.user_img{
+ width: 70rpx;
+ height: 70rpx;
+ margin-right: 15rpx;
+
+}
+.user_assis{
+ width: 85%;
+ margin: auto;
+ padding-top: 50rpx;
+}
+.caption_title{
+ margin-top: 60rpx;
+ margin-bottom: 30rpx;
+}
+.assis_liba{
+ width: 50%;
+ margin: auto;
+ height: 340rpx;
+
+}
+.activity_time{
+ border-bottom: 1rpx solid #fff;
+ margin: auto;
+ display: inline;
+}
+.cklie_button{
+ margin: auto;
+ width: 60%;
+ height: 80rpx;
+ border-radius: 50rpx;
+ margin-top: 20rpx;
+ background: #fbda0e;
+ color:#d01119;
+ line-height: 80rpx;
+ letter-spacing: 5rpx;
+ box-shadow: 0rpx 7rpx 0rpx 0rpx rgb(245, 119, 6);
+ font-size: 44rpx;
+ margin-bottom: 40rpx;
+}
+.con_div{
+z-index: 15;
+position: fixed;
+top: 0;
+left: 0;
+height: 100%;
+width: 100%;
+}
+.layer-img{
+ width: 100%;
+ height: 515rpx;
+ background-repead:no-repead;
+ background-size:100% 100%;
+}
+.libao_frame{
+z-index: 15;
+position: fixed;
+width: 70%;
+top: 37.5%;
+left: 50%;
+transform: translate(-50%, -50%);
+height: auto;
+
+}
+.button-img{
+ width: 60%;
+ margin: auto;
+ color: #d01119;
+ height: 75rpx;
+ line-height: 72rpx;
+ background-repead:no-repead;
+ background-size:100% 100%;
+ position: absolute;
+ left: 19%;
+ bottom: 43%;
+}
+.success{
+ position: absolute;
+ left: 23%;
+ bottom: 36%;
+}
+.link_div{
+ width: 3rpx;
+ height: 125rpx;
+ background: #fff;
+ margin: auto;
+
+}
+.close-none{
+width: 70rpx;
+height: 70rpx;
+
+}
+
diff --git a/pages/user/assistance/task_assistance.js b/pages/user/assistance/task_assistance.js
new file mode 100644
index 0000000..8c100df
--- /dev/null
+++ b/pages/user/assistance/task_assistance.js
@@ -0,0 +1,218 @@
+var auth = require("../../../utils/auth.js"), rq = require("../../../utils/request.js");
+var e = getApp(), app = e, i = require("../../../utils/util.js"),
+ ut = i,s = e.globalData.setting, os = s, app_d = e.globalData;
+var regeneratorRuntime = require('../../../utils/runtime.js');
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ sw_index: 0,//轮播的下标控制
+ iurl: s.imghost,
+ is_task:0,//判断标题名是任务1还是2
+ activity_data:"25:20:59",//活动剩余时间
+ task_number:12,//任务数
+ is_task:0,//历史记录与任务
+ aitem:"",//活动的轮播图
+ switch_head: 0, //0:我的任务,1:记录
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function (options) {
+ var help_id=options.help_id;
+ console.log("是什么鬼",help_id);
+ var th=this;
+ th.close();
+ },
+ // 轮播图点击左边
+ click_pre:function(){
+ var index = this.data.sw_index;
+ index--;
+ if (index < 0) return;
+ this.setData({ sw_index: index })
+
+ },
+ //轮播图点击右边
+ click_next:function(){
+ var index = this.data.sw_index;
+ index++;
+ if (index >= this.data.aitem.length) return;
+ this.setData({ sw_index: index })
+
+ },
+ //任务领取
+ onlicke:function(){
+ var th=this;
+ getApp().my_warnning("任务领取成功", 1, th);
+ },
+
+//我的任务和帮拆记录的替换
+ switch_head: function (e) {
+ var th = this;
+ var index = e.currentTarget.dataset.index;//获取当前选择的是任务还是活动说明
+ var switch_head = th.data.switch_head;//0任务,1活动说明
+ if (index != switch_head) {
+ th.setData({
+ switch_head: index,
+ is_task: index
+ })
+ }
+ },
+ //划动的时候监听
+ onSli:function(e){
+
+ var ind=e.detail.current ;
+ this.setData({
+ sw_index:ind
+ })
+ },
+ //导航球
+ close: function () {
+ var th = this;
+ var nav_b = th.selectComponent("#nav_b"); //组件的id
+ nav_b.close_box();
+ nav_b.set_name("助力", "");
+ },
+
+ /**
+ * 生命周期函数--监听页面初次渲染完成
+ */
+ onReady: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function () {
+ var th=this;
+ /*-----统计-----*/
+ rq.get("/api/weshop/zl_task", {
+ data: { user_id: app_d.user_id,
+ strod_id:os.stoid
+ },
+ success: function (su) {
+
+ var data=su.data;
+ console.log('waitlist5555555555' + data.code);
+ if (data.code!=0){
+ getApp().my_warnning(data.msg,0, th);
+ return false;
+ }
+ if (data.code==0){
+ //轮播图的数据
+ var data_aissa=data.data.pageData;
+ //当前时间戳
+ var nt = ut.gettimestamp();
+
+ data_aissa.forEach(function (val, ind) {
+ console.log(nt, "当前时间","结束时间", val.end_time,"开始时间");
+ //已开始
+ if (val.start_time < nt && val.end_time > nt) data_aissa[ind].status = 0;
+ //未开始
+ else if (val.start_time > nt && val.end_time > nt) data_aissa[ind].status = 1;
+ //已结束
+
+ else if (val.start_time < nt && val.end_time < nt) data_aissa[ind].status = 2;
+
+ });
+
+ console.log("是什么东西2222222222",data_aissa);
+
+ th.setData({ aitem:data_aissa});
+
+
+ }
+
+ }
+ })
+
+ },
+ //----助力任务-----
+ countDown() {
+ if (!this.data.is_timer) return false;
+ var th = this;
+ // 获取当前时间,同时得到活动结束时间数组
+ var newTime = ut.gettimestamp();
+ var List = this.data.aitem;
+ for (var j = 0; j < List.length; j++) {
+ var endTimeList = List[j];
+ // 对结束时间进行处理渲染到页面
+ for (var i = 0; i < endTimeList.length; i++) {
+ var o = endTimeList[i];
+ var endTime = o.end_time
+ if (o.status == 0) endTime = o.start_time
+
+ var obj = null;
+ // 如果活动未结束,对时间进行处理
+ if (endTime - newTime > 0) {
+ var time = (endTime - newTime);
+ // 获取天、时、分、秒
+ var day = parseInt(time / (60 * 60 * 24));
+ var hou = parseInt(time % (60 * 60 * 24) / 3600);
+ var min = parseInt(time % (60 * 60 * 24) % 3600 / 60);
+ var sec = parseInt(time % (60 * 60 * 24) % 3600 % 60);
+ obj = {
+ day: this.timeFormat(day),
+ hou: this.timeFormat(hou),
+ min: this.timeFormat(min),
+ sec: this.timeFormat(sec)
+ }
+ } else {
+ //活动已结束,全部设置为'00'
+ obj = {
+ day: '00',
+ hou: '00',
+ min: '00',
+ sec: '00'
+ }
+ }
+ var txt = "aitem[" + j + "][" + i + "].djs";
+ th.setData({
+ [txt]: obj
+ });
+ }
+
+ }
+ setTimeout(th.countDown, 1000);
+
+ },
+
+ /**
+ * 生命周期函数--监听页面隐藏
+ */
+ onHide: function () {
+
+ },
+
+ /**
+ * 生命周期函数--监听页面卸载
+ */
+ onUnload: function () {
+
+ },
+
+ /**
+ * 页面相关事件处理函数--监听用户下拉动作
+ */
+ onPullDownRefresh: function () {
+
+ },
+
+ /**
+ * 页面上拉触底事件的处理函数
+ */
+ onReachBottom: function () {
+
+ },
+
+ /**
+ * 用户点击右上角分享
+ */
+ onShareAppMessage: function () {
+
+ }
+})
\ No newline at end of file
diff --git a/pages/user/assistance/task_assistance.json b/pages/user/assistance/task_assistance.json
new file mode 100644
index 0000000..d1cfde4
--- /dev/null
+++ b/pages/user/assistance/task_assistance.json
@@ -0,0 +1,9 @@
+{
+ "navigationBarTitleText": "好友助力",
+ "navigationStyle": "custom",
+ "usingComponents": {
+ "warn": "/components/long_warn/long_warn",
+ "my_confirm": "/components/my_confirm/my_confirm",
+ "nav_b": "/components/nav_b/nav_b"
+ }
+}
\ No newline at end of file
diff --git a/pages/user/assistance/task_assistance.wxml b/pages/user/assistance/task_assistance.wxml
new file mode 100644
index 0000000..6786641
--- /dev/null
+++ b/pages/user/assistance/task_assistance.wxml
@@ -0,0 +1,119 @@
+
+
+
+
+ {{aitem[sw_index].tite_name}}
+
+
+ 活动剩余时间: {{activity_data}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 今天剩余可领{{task_number}}个任务
+
+
+ 就选它了
+
+
+
+
+
+
+
+
+
+ 我的任务
+
+
+
+ 帮拆记录
+
+
+
+
+
+
+
+ 豪华任务一
+
+
+
+
+ 进行中
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 豪华任务一
+
+ 2019-05-12
+
+
+
+
+
+
+
+
+ 暂无任务记录
+
+
+
+ 已有
+ 126
+ 人领取了任务
+
+
+
+
+
+
+
+
+
+ 点击加载更多
+
+
+
+ 已有
+ 126
+ 人领取了任务
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/user/assistance/task_assistance.wxss b/pages/user/assistance/task_assistance.wxss
new file mode 100644
index 0000000..04c0874
--- /dev/null
+++ b/pages/user/assistance/task_assistance.wxss
@@ -0,0 +1,134 @@
+page{
+ background: #d01119;
+ width: 100%;
+ height: 100%
+
+}
+.top-back{
+ width: 100%;
+ height: 60%;
+ background-repead:no-repead;
+ background-size:100% 100%;
+
+}
+.top-frame{
+ width: 100%;
+ height: auto;
+ padding-top: 50rpx
+}
+.top-title{
+ letter-spacing:10rpx
+}
+.activity-data{
+ padding-top: 10rpx;
+ letter-spacing: 10rpx;
+
+}
+.xc-specific-more-frame{
+ width: 100%;
+ height: 40%;
+
+ margin-top: 20rpx;
+}
+.task-number{
+ margin-top: 50rpx
+}
+.task_clike{
+ margin: auto;
+ width: 60%;
+ height: 80rpx;
+ border-radius: 50rpx;
+ margin-top: 20rpx;
+ background: #fbda0e;
+ color:#d01119;
+ line-height: 80rpx;
+ letter-spacing: 5rpx;
+ box-shadow: 0rpx 7rpx 0rpx 0rpx rgb(245, 119, 6);
+}
+/* 底部列表样式 */
+
+
+.head {
+ border-bottom: 4rpx solid rgb(253, 193, 7);
+ color: rgb(255, 255, 255);
+ height: 48rpx;
+ line-height: 48rpx;
+}
+
+.lhead {
+ border-top: 4rpx solid rgb(253, 193, 7);
+ border-left: 4rpx solid rgb(253, 193, 7);
+ border-right: 4rpx solid rgb(253, 193, 7);
+ width: 290rpx;
+ height: 48rpx;
+ line-height: 48rpx;
+}
+
+.items {
+ padding-top: 50rpx;
+}
+
+.rhead {
+ background-color: rgb(253, 193, 7);
+}
+
+.unfinished {
+ width:35rpx;
+ height: 35rpx;
+ margin-right: 10rpx;
+}
+
+.padding {
+ padding: 0rpx 50rpx;
+}
+
+.width {
+ width: 290rpx;
+}
+
+.line {
+ width: 110rpx;
+ border: 1rpx solid rgb(255, 255, 255);
+}
+
+.load {
+ margin: 0rpx 26rpx;
+}
+
+.item {
+ margin-bottom: 35rpx;
+}
+
+.state {
+ text-decoration: underline;
+}
+
+.nothing {
+ padding: 50rpx 0rpx;
+}
+
+.receive {
+ padding-bottom: 50rpx;
+}
+.xc-center-img{
+ width: 100%;
+ height: 100%
+}
+
+.xc-left{
+ width: 40rpx;
+ height: 40rpx;
+}
+.bcolor {
+border-color: #fff;
+
+}
+.xc-right{
+ width: 40rpx;
+ height: 40rpx;
+}
+.user_img{
+ width: 50rpx;
+ height: 50rpx;
+
+}
\ No newline at end of file
diff --git a/pages/user/comment/comment.js b/pages/user/comment/comment.js
index cb15337..87eadde 100644
--- a/pages/user/comment/comment.js
+++ b/pages/user/comment/comment.js
@@ -124,10 +124,11 @@ Page({
//图片失败,默认图片
bind_bnerr2: function(e) {
+ var th = this;
var _errImg = e.currentTarget.dataset.errorimg;
var _errObj = {};
_errObj[_errImg] = os.imghost + "/public/images/default_goods_image_240.gif";
- //this.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ;
+ th.setData(_errObj) //注意这里的赋值方式,只是将数据列表中的此项图片路径值替换掉 ;
},
//预览图片
previewImg: function(e) {
diff --git a/pages/user/comment/comment.wxml b/pages/user/comment/comment.wxml
index 8e578e2..4e77fe1 100644
--- a/pages/user/comment/comment.wxml
+++ b/pages/user/comment/comment.wxml
@@ -7,21 +7,21 @@
-
-
-
-
-
- 当前暂无评价
-
-
- 去首页逛逛
-
+
+
+
+
+
+ 当前暂无评价
+
+
+ 去首页逛逛
+
+
-
-
-
+
+
@@ -66,16 +66,15 @@
@@ -106,12 +105,19 @@
-
- 查看订单
-
-
+
+
+ 查看订单
+
+
+
+
+
+
diff --git a/pages/user/comment/comment.wxss b/pages/user/comment/comment.wxss
index cd0a6ca..3ca00d8 100644
--- a/pages/user/comment/comment.wxss
+++ b/pages/user/comment/comment.wxss
@@ -36,6 +36,7 @@
.border_bottom {
border-bottom: 3rpx solid rgb(245, 245, 245);
}
+
/* 无评价 */
.noCollection image {
@@ -122,14 +123,17 @@
height: 39rpx;
border-radius: 9rpx;
}
-.commodity_evaluate .commodity_To_evaluate view{
+
+.commodity_evaluate .commodity_To_evaluate view {
height: 39rpx;
line-height: 39rpx;
}
-.commodity_evaluate .comment_go{
- margin-top: 10rpx;
- background-color: rgb(211, 28, 52);
+
+.commodity_evaluate .comment_go {
+ margin-left: 20rpx;
+ background-color: rgb(211, 28, 52);
color: rgb(255, 255, 255);
+ border: 2rpx solid rgb(211, 28, 52);
}
.Commodity_spec {
@@ -141,26 +145,30 @@
}
.Commodity_spec view {
- height: 28rpx;
- align-items: center;
+ height: 28rpx;
+ align-items: center;
}
.Commodity_evaluation .Comment_content {
color: rgb(153, 153, 153);
letter-spacing: 1rpx;
}
-.Commodity_evaluation .starss{
- height: 58rpx;
- /* // line-height: 58rpx; */
- align-items: center;
+
+.Commodity_evaluation .starss {
+ height: 58rpx;
+ /* // line-height: 58rpx; */
+ align-items: center;
}
-.Commodity_evaluation .commen{
+
+.Commodity_evaluation .commen {
height: 58rpx;
line-height: 58rpx;
}
-.Commodity_evaluation .starss .stars{
+
+.Commodity_evaluation .starss .stars {
line-height: 58rpx;
}
+
.Commodity_evaluation .starss .stars image {
width: 29rpx;
height: 26rpx;
@@ -173,17 +181,35 @@
margin-right: 8rpx;
margin-top: 18rpx;
border-radius: 6rpx;
- border: 3rpx solid rgb(245, 245, 245);
+ border: 2rpx solid rgb(245, 245, 245);
+ margin-left: 15rpx;
}
-.commodity_evaluate .View_evaluation{
- border:2rpx solid rgb(179, 179, 179);
- color:rgb(0, 0, 0);
+
+.commodity_evaluate .View_evaluation {
+ border: 2rpx solid rgb(179, 179, 179);
+ color: rgb(0, 0, 0);
background-color: rgb(255, 255, 255);
}
-.comment_addtime{
+
+.comment_addtime {
height: 50rpx;
}
-.title_width{ width: 146rpx; text-align:center }
-.shop-font{ color: rgb(153, 153, 153);}
-.reply{ margin-top: 10rpx}
-.get_bottom{ text-align: center; color: #999; margin-bottom: 20rpx}
\ No newline at end of file
+
+.title_width {
+ width: 146rpx;
+ text-align: center;
+}
+
+.shop-font {
+ color: rgb(153, 153, 153);
+}
+
+.reply {
+ margin-top: 10rpx;
+}
+
+.get_bottom {
+ text-align: center;
+ color: #999;
+ margin-bottom: 20rpx;
+}
diff --git a/pages/user/coupons/coupons.wxml b/pages/user/coupons/coupons.wxml
index 938ead2..595edc7 100644
--- a/pages/user/coupons/coupons.wxml
+++ b/pages/user/coupons/coupons.wxml
@@ -34,15 +34,15 @@
{{filter.getNum(detail.Sum)}}元微券
- 微券来源: {{detail.Operator==null?'微信商城':detail.Operator}}
+ 微券来源: {{detail.Operator==null?'微信商城':detail.Operator==''?"微信商城":detail.Operator}}
- 有效期: {{detail.BeginDate==null?"":time.replace_time2(detail.BeginDate)}}至{{time.replace_time2(detail.ValidDate)}}
+ 有效期: {{(detail.BeginDate==null || detail.BeginDate=='')?"":time.replace_time2(detail.BeginDate)}}至{{time.replace_time2(detail.ValidDate)}}
有效期:不限
- 使用说明: {{filter.getNum(detail.Sum)}}元优惠券,{{detail.UseObjectID==null?"全场通用":"仅限"+(detail.UseObjectName)+"使用"}},满 {{detail.BuySum==null?filter.getNum(0):filter.getNum(detail.BuySum)}}元使用{{detail.region_list_name==null?"":",不包邮地区:"+region_list_name}}
+ 使用说明: {{filter.getNum(detail.Sum)}}元优惠券,{{(detail.UseObjectID==null || detail.UseObjectID=='')?"全场通用":"仅限"+(detail.UseObjectName)+"使用"}},满 {{detail.BuySum==null?filter.getNum(0):filter.getNum(detail.BuySum)}}元使用{{detail.region_list_name==null?"":",不包邮地区:"+region_list_name}}
diff --git a/pages/user/index/index.js b/pages/user/index/index.js
index 9fb079f..87f15de 100644
--- a/pages/user/index/index.js
+++ b/pages/user/index/index.js
@@ -30,25 +30,29 @@ Page({
cz_val:0,
full_cz_val:0,
is_dengji:0, //是不是等级
+ is_banner:0,//是不是有生日活动
+ giftbagid:"",//生日活动的类型
+ actId:"",//生日活动的id
+ actImg:"",
+ is_assistance:0,//助力活动
},
- goto_service: function () {
+ goto_nav: function (e) {
var th = this;
+ var url = e.currentTarget.dataset.url;
if (th.data.userInfo != null) {
- var url = "/pages/user/my_service/i_service";
getApp().goto(url);
} else {
- if(th.data.is_nav){
wx.navigateTo({
url: '/pages/getphone/getphone',
})
- }
}
},
/**
* 生命周期函数--监听页面加载
*/
onLoad: function (options) {
-
+ this.birthday();
+ this.is_assistance();
},
/**
@@ -253,7 +257,7 @@ Page({
//!this.nomore && this.requestRecommend();
var goods_list = this.selectComponent("#goods_recommend"); //组件的id
goods_list.init();
- setTimeOut(function () { goods_list.get_list(); }, 300)
+ setTimeout(function () { goods_list.get_list(); }, 300)
},
/**
@@ -450,7 +454,58 @@ Page({
jump: function () {
getApp().goto("/pages/user/grow_value/grow_value")
+ },
+ // 判断生日营销的页面是不是存在
+ 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;
+ // var actId = res.data.data.id;
+ // var actImg = res.data.data.actImg;
+ // t.setData({ giftbagid: giftbagid, actId: actId, actImg: actImg });
+ // t.setData({ is_banner: 1 });
+ // }
+
+ // }
+ // })
+
+
+ },
+ clike_banne:function(){
+ var th = this;
+ var actId=th.data.actId;
+ var giftbagid=th.data.giftbagid;
+ if (actId != "" && giftbagid!=""){
+
+ wx.redirectTo({
+ url: "/pages/giftpack/birthdaygift/birthdaygift?actId=" + actId + "&gifbagid=" + giftbagid + "&orderType=" + 3
+ });
+ }else{
+
+ getApp().showWarning("请稍后重试");
+ }
+ },
+ // 判断助力活动是不是存在
+ is_assistance:function(){
+ // var th = this;
+ // rq.get("/api/weshop/marketing/help/act/judge", {
+ // data: { storeId: os.stoid, userId: app_d.user_id },
+ // success: function (res) {
+ // var code = res.data.code;
+ // if (code == 0) {
+ // th.setData({ is_assistance:1});
+ // }
+
+ // }
+ // })
+
}
+
+
})
\ No newline at end of file
diff --git a/pages/user/index/index.wxml b/pages/user/index/index.wxml
index 75e50a1..5b2764e 100644
--- a/pages/user/index/index.wxml
+++ b/pages/user/index/index.wxml
@@ -166,10 +166,18 @@
+
+
+
+
+
+
+
+
-
+
工具与服务
@@ -212,14 +220,21 @@
我的地址
-
+
我的服务
-
-
- 我的礼包
+
+
+ 专享礼包
+
+
+
+ 助力活动
+
+
+
diff --git a/pages/user/index/index.wxss b/pages/user/index/index.wxss
index 4c04d00..53b652a 100644
--- a/pages/user/index/index.wxss
+++ b/pages/user/index/index.wxss
@@ -344,7 +344,7 @@
.xc-tool-service .xc-tool-service-title {
width: 100%;
height: 90rpx;
- border: 2rpx solid #f2f2f2;
+
}
.xc-tool-service-img {
@@ -361,9 +361,6 @@
width: 100%;
}
-.xc-project-frame .center_v {
-}
-
.xc-project-frame .item {
width: 25%;
margin-top: 30rpx;
@@ -699,3 +696,14 @@
margin-top: 8rpx;
margin-right: 5rpx;
}
+.banner-img{
+ width: 95%;
+ height: 140rpx;
+ border-radius: 10px 10px 0px 0px;
+ margin-bottom: -5rpx;
+
+}
+.banner-frame{
+ width: 100%;
+ background: #f2f2f2;
+}
\ No newline at end of file
diff --git a/pages/user/my_service/tment_eval.js b/pages/user/my_service/tment_eval.js
index 46c8c97..c1b0076 100644
--- a/pages/user/my_service/tment_eval.js
+++ b/pages/user/my_service/tment_eval.js
@@ -23,6 +23,10 @@ Page({
arrangeTime: "", //服务日期
is_evaluate: 0, //是否评价
EvaluateDatetime: "", //评价时间
+ is_act:0, //是否能购获取图片
+ actId:0, //活动ID
+ giftBagId:0, //礼包ID
+
},
//点击星级
check_stars: function(e) {
@@ -219,6 +223,7 @@ Page({
is_evaluate: options.evaluate
})
th.query_bea();
+ th.judge_act();
},
/**
@@ -231,4 +236,46 @@ Page({
th.evaluate_get();
}
},
+ //评价其他跳转
+ evaluate_qt:function(){
+
+ wx.redirectTo({
+ url: "/pages/user/my_service/tment_order_list?state="+2
+ });
+ },
+ //点击领取礼包
+ clike_lb:function(){
+
+ var id=this.data.actId;
+ var gifbagid = this.data.gifbagid;
+ wx.redirectTo({
+ url: "/pages/giftpack/evaluategift/evaluategift?actId=" + id + "&gifbagid=&orderType=2&orderNumber="+this.data.number
+ });
+
+ },
+
+ //--评价有礼判断---
+ judge_act: function () {
+ var th = this;
+ var url = "/api/weshop/marketing/comment/act/judge";
+ getApp().request.promiseGet(url, {
+ data: {
+ orderNumber: th.data.number,
+ orderType: 2,
+ storeId: a.stoid,
+ userId: d.user_id
+ }
+ }).then(res => {
+ if (res.data.code == 0) {
+ var id = res.data.data.id;
+ var giftbagid = res.data.data.giftbagid;
+ th.setData({
+ is_act: 1,
+ actId: id,
+ giftBagId: giftbagid
+ })
+ }
+ })
+ },
+
})
\ No newline at end of file
diff --git a/pages/user/my_service/tment_eval.wxml b/pages/user/my_service/tment_eval.wxml
index 20dd053..54133a8 100644
--- a/pages/user/my_service/tment_eval.wxml
+++ b/pages/user/my_service/tment_eval.wxml
@@ -91,4 +91,15 @@
确认提交
+
+
+
+
+ 评价其他
+
+
+
+ 点击领取礼品
+
+
\ No newline at end of file
diff --git a/pages/user/my_service/tment_eval.wxss b/pages/user/my_service/tment_eval.wxss
index 2606dc7..8b0b898 100644
--- a/pages/user/my_service/tment_eval.wxss
+++ b/pages/user/my_service/tment_eval.wxss
@@ -115,6 +115,10 @@
background-color: rgb(214, 1, 33);
color: rgb(255, 255, 255);
}
+.Submission.yellow-b{
+ background-color: #ffb03f;
+
+}
.clonri {
margin: 0rpx;
diff --git a/pages/user/my_service/tment_order_list.js b/pages/user/my_service/tment_order_list.js
index 6e0134e..8ad4b7f 100644
--- a/pages/user/my_service/tment_order_list.js
+++ b/pages/user/my_service/tment_order_list.js
@@ -39,7 +39,11 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad: function(options) {
-
+ var state=options.state;
+ if (state != null && state != undefined && state!=""){
+ this.setData({ activeCategoryId: state });
+ }
+
},
changeTab: function(e) {
var th = this;
diff --git a/pages/user/view_comment/view_comment.js b/pages/user/view_comment/view_comment.js
new file mode 100644
index 0000000..95e3fc3
--- /dev/null
+++ b/pages/user/view_comment/view_comment.js
@@ -0,0 +1,127 @@
+var i = require("../../../utils/util.js"),
+ ut = i;
+var e = getApp(),
+ a = e.globalData.setting,
+ os = a,
+ t = e.request,
+ d = e.globalData;
+Page({
+
+ /**
+ * 页面的初始数据
+ */
+ data: {
+ url: a.url,
+ iurl: a.imghost,
+ comment: [], //用户单个评价的内容
+ goods_id: "", //商品id
+ order_id: "", //订单id
+ is_act: 0, //是否开启活动
+ actId: "", //活动id
+ giftBagId: "", //礼包id
+ },
+
+ /**
+ * 生命周期函数--监听页面加载
+ */
+ onLoad: function(options) {
+ var th = this;
+ th.setData({
+ goods_id: options.goods_id,
+ order_id: options.order_id
+ })
+ th.query_comment();
+ },
+
+ /**
+ * 生命周期函数--监听页面显示
+ */
+ onShow: function() {
+
+ },
+ query_comment: function() {
+ var th = this;
+ wx.showLoading({
+ title: '加载中'
+ })
+ var url = "/api/weshop/comment/list";
+ getApp().request.promiseGet(url, {
+ data: {
+ store_id: a.stoid,
+ userId: d.user_id,
+ goods_id: th.data.goods_id,
+ order_id: th.data.order_id
+ }
+ }).then(res => {
+ wx.hideLoading();
+ if (res.data.code == 0) {
+ var data = res.data.data.pageData;
+ if (data[0].img) data[0].img = ut.unserialize(data[0].img);
+ if (data[0].weapp_img) data[0].weapp_img = JSON.parse(data[0].weapp_img);
+ th.setData({
+ comment: data
+ })
+ th.judge_act(); //判断是否开启评价有礼
+ } else {
+ getApp().my_warnning("系统繁忙,请稍后再试", 0, th);
+ }
+ })
+ },
+ //评价有礼判断
+ judge_act: function() {
+ var th = this;
+ var url = "/api/weshop/marketing/comment/act/judge";
+ getApp().request.promiseGet(url, {
+ data: {
+ orderGoodsId: th.data.goods_id,
+ orderNumber: th.data.order_id,
+ orderType: 1,
+ storeId: a.stoid,
+ userId: d.user_id
+ }
+ }).then(res => {
+ if (res.data.code == 0) {
+ var id = res.data.data.id;
+ var giftbagid = res.data.data.giftbagid;
+ th.setData({
+ is_act: 1,
+ actId: id,
+ giftBagId: giftbagid
+ })
+ } else {
+
+ }
+ })
+ },
+ //预览图片
+ previewImg: function(e) {
+ var th = this;
+ var index = e.currentTarget.dataset.index;
+ var sindex = e.currentTarget.dataset.sindex;
+ var imgArr = th.data.comment;
+ var image = imgArr[0].weapp_img;
+ var imagename = "";
+ var iurl = th.data.iurl;
+ if (image != "") {
+ image = imgArr[0].weapp_img[index];
+ wx.previewImage({
+ current: iurl + image,
+ //当前图片地址
+ urls: imgArr[0].weapp_img, //所有要预览的图片的地址集合 数组形式
+ })
+ } else {
+ image = imgArr[0].img[index];
+ wx.previewImage({
+ current: iurl + image,
+ //当前图片地址
+ urls: imgArr[0].img, //所有要预览的图片的地址集合 数组形式
+ })
+ }
+ },
+ goto: function(e) {
+ var th = this;
+ var url = e.currentTarget.dataset.url;
+ getApp().goto(url);
+ }
+
+})
\ No newline at end of file
diff --git a/pages/user/view_comment/view_comment.json b/pages/user/view_comment/view_comment.json
new file mode 100644
index 0000000..eacc6fa
--- /dev/null
+++ b/pages/user/view_comment/view_comment.json
@@ -0,0 +1,7 @@
+{
+ "navigationBarTitleText": "查看评价",
+ "usingComponents": {
+ "warn": "/components/long_warn/long_warn",
+ "my_confirm": "/components/my_confirm/my_confirm"
+ }
+}
\ No newline at end of file
diff --git a/pages/user/view_comment/view_comment.wxml b/pages/user/view_comment/view_comment.wxml
new file mode 100644
index 0000000..793444c
--- /dev/null
+++ b/pages/user/view_comment/view_comment.wxml
@@ -0,0 +1,105 @@
+
+
+
+
+
+
+
+
+ {{item.goods_name}}
+
+
+
+
+ ¥
+ {{item.goods_price}}
+
+
+
+
+ x
+ {{item.goods_num}}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 宝贝评分
+
+
+
+
+
+ 描述相符
+
+
+
+
+
+
+
+
+ 物流服务
+
+
+
+
+
+
+
+ 服务态度
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 评价其他
+
+
+ 点击领取礼品
+
+
+
+
+
+
\ No newline at end of file
diff --git a/pages/user/view_comment/view_comment.wxss b/pages/user/view_comment/view_comment.wxss
new file mode 100644
index 0000000..ed974d5
--- /dev/null
+++ b/pages/user/view_comment/view_comment.wxss
@@ -0,0 +1,170 @@
+page{
+ overflow-x: hidden;
+}
+/* 商品详情和评价 */
+.commoditymax{
+ overflow-x: hidden;
+}
+.commodity {
+ border-top: 6rpx solid rgb(245, 245, 245);
+ border-bottom: 6rpx solid rgb(245, 245, 245);
+ padding: 0rpx 30rpx;
+ padding-bottom:10rpx;
+}
+
+.commodity .information {
+ height: 286rpx;
+}
+
+.commodity .information image {
+ width: 186rpx;
+ height: 186rpx;
+}
+
+.information .goods_name {
+ width: 480rpx;
+ margin-left: 25rpx;
+ height: 186rpx;
+}
+
+.information .goods_name .ellipsis-2 {
+ line-height: 40rpx;
+ height: 80rpx;
+}
+
+.information .goods_name .jc_sb {
+ margin-top: 60rpx;
+ color: rgb(212, 28, 52);
+ margin-right: 7rpx;
+}
+
+.information .goods_name .jc_sb .fs32 {
+ line-height: 40rpx;
+}
+
+.information .goods_name .jc_sb .sum {
+ margin-right: 5rpx;
+}
+
+.balin {
+ align-items: baseline;
+}
+
+.addComment {
+ width: 690rpx;
+ padding: 32rpx 0rpx 21rpx 0rpx;
+}
+
+.addComment textarea {
+ padding: 0rpx 18rpx;
+ max-height: 100rpx;
+ width: 654rpx;
+}
+
+.addComment .addimages {
+ padding: 0rpx 18rpx;
+ margin-top: 20rpx;
+ align-items: flex-end;
+ width: 652rpx;
+ margin-bottom: 15rpx;
+}
+.comment{
+ overflow: hidden;
+ text-overflow: ellipsis;
+ display: -webkit-box;
+ -webkit-box-orient: vertical;
+ -webkit-line-clamp: 3;
+}
+.addComment .addimages .images {
+ height: 140rpx;
+}
+
+.addComment .addimages .images .rel {
+ width: 140rpx;
+ height: 100%;
+ overflow: visible;
+ margin-right: 15rpx;
+}
+
+.addComment .addimages .images image .abs {
+ width: 30rpx;
+ height: 30rpx;
+ top: -7rpx;
+ right: -7rpx;
+}
+
+.addComment .addimage {
+ width: 139rpx;
+ height: 139rpx;
+ border: 2rpx dashed rgb(196, 196, 196);
+ font-size: 16rpx;
+ margin-left: 6rpx;
+}
+
+.addComment .addimage image {
+ width: 60rpx;
+ height: 58rpx;
+}
+
+.Grade {
+ width: 100%;
+ height: 310rpx;
+ border-bottom: 6rpx solid rgb(245, 245, 245);
+ padding-left: 45rpx;
+}
+
+.Grade .title {
+ width: 100%;
+ height: 105rpx;
+}
+
+.Grade .title .column {
+ height: 30rpx;
+ border-left: 6rpx solid rgb(211, 27, 58);
+ margin-right: 12rpx;
+}
+
+.Grade .score-item {
+ height: 55rpx;
+ line-height: 55rpx;
+}
+
+.Grade .score-item .stars {
+ margin-left: 83rpx;
+}
+.Grade .score-item .stars view{
+ width: 60rpx;
+ height: 55rpx;
+}
+
+.Grade .score-item .stars image {
+ width: 35rpx;
+ height: 35rpx;
+}
+.Whether {
+ padding:0rpx 31rpx;
+}
+.Whether .flex-right-vertical {
+ height: 67rpx;
+}
+
+.Whether .flex-right-vertical .radio {
+ margin-right: 15rpx;
+}
+
+.Whether .Submission {
+ margin: 40rpx 0 40rpx 0;
+}
+
+.Whether .white {
+ width: 364rpx;
+ height: 58rpx;
+ background-color: rgb(212, 28, 52);
+ border-radius: 40rpx;
+ line-height: 58rpx;
+}
+.Whether .receive{
+ background-color: rgb(255, 176, 63);
+}
+
+