删除2.5小程序源码
@ -1,55 +0,0 @@
|
||||
//app.js
|
||||
var app = getApp();
|
||||
// var wxh = require('../../utils/wxh.js');
|
||||
App({
|
||||
onLaunch: function () {
|
||||
// 展示本地存储能力
|
||||
var that = this;
|
||||
var logs = wx.getStorageSync('logs') || []
|
||||
logs.unshift(Date.now())
|
||||
wx.setStorageSync('logs', logs)
|
||||
that.getRoutineStyle();
|
||||
},
|
||||
globalData: {
|
||||
routineStyle:'#ffffff',
|
||||
uid: null,
|
||||
openPages:'',
|
||||
spid:0,
|
||||
urlImages: '',
|
||||
url: 'https://shop.crmeb.net/'
|
||||
},
|
||||
getRoutineStyle:function(){
|
||||
var that = this;
|
||||
wx.request({
|
||||
url: that.globalData.url + '/routine/login/get_routine_style',
|
||||
method: 'post',
|
||||
dataType : 'json',
|
||||
success: function (res) {
|
||||
that.globalData.routineStyle = res.data.data.routine_style;
|
||||
that.setBarColor();
|
||||
}
|
||||
})
|
||||
},
|
||||
setBarColor:function(){
|
||||
var that = this;
|
||||
wx.setNavigationBarColor({
|
||||
frontColor: '#000000',
|
||||
backgroundColor: that.globalData.routineStyle,
|
||||
})
|
||||
},
|
||||
setUserInfo : function(){
|
||||
var that = this;
|
||||
if (that.globalData.uid == null) {//是否存在用户信息,如果不存在跳转到首页
|
||||
wx.showToast({
|
||||
title: '用户信息获取失败',
|
||||
icon: 'none',
|
||||
duration: 1500,
|
||||
})
|
||||
setTimeout(function () {
|
||||
wx.navigateTo({
|
||||
url: '/pages/load/load',
|
||||
})
|
||||
}, 1500)
|
||||
}
|
||||
},
|
||||
})
|
||||
@ -1,83 +0,0 @@
|
||||
{
|
||||
"pages": [
|
||||
"pages/loading/loading",
|
||||
"pages/load/load",
|
||||
"pages/login-status/login-status",
|
||||
"pages/payment/payment",
|
||||
"pages/home/home",
|
||||
"pages/new-con/new-con",
|
||||
"pages/new-list/new-list",
|
||||
"pages/index/index",
|
||||
"pages/refunding/refunding",
|
||||
"pages/miao-list/miao-list",
|
||||
"pages/coupon-status/coupon-status",
|
||||
"pages/addaddress/addaddress",
|
||||
"pages/product-countdown/index",
|
||||
"pages/refund-page/refund-page",
|
||||
"pages/refund-order/refund-order",
|
||||
"pages/spread/spread",
|
||||
"pages/promotion-order/promotion-order",
|
||||
"pages/coupon/coupon",
|
||||
"pages/news-list/news-list",
|
||||
"pages/product-con/index",
|
||||
"pages/comment-con/comment-con",
|
||||
"pages/orderForm/orderForm",
|
||||
"pages/orders-list/orders-list",
|
||||
"pages/comment/comment",
|
||||
"pages/foo-tan/foo-tan",
|
||||
"pages/buycar/buycar",
|
||||
"pages/mycut/mycut",
|
||||
"pages/user/user",
|
||||
"pages/integral-con/integral-con",
|
||||
"pages/orders-con/orders-con",
|
||||
"pages/order-confirm/order-confirm",
|
||||
"pages/productSort/productSort",
|
||||
"pages/address/address",
|
||||
"pages/feree/feree",
|
||||
"pages/feree-two/feree-two",
|
||||
"pages/cash/cash",
|
||||
"pages/logistics/logistics",
|
||||
"pages/extension/extension",
|
||||
"pages/unshop/unshop",
|
||||
"pages/main/main",
|
||||
"pages/collect/collect",
|
||||
"pages/promotion-card/promotion-card"
|
||||
],
|
||||
"window": {
|
||||
"backgroundTextStyle": "light",
|
||||
"navigationBarBackgroundColor": "#fff",
|
||||
"navigationBarTitleText": "WeChat",
|
||||
"navigationBarTextStyle": "black"
|
||||
},
|
||||
"tabBar": {
|
||||
"backgroundColor": "#FFFFFF",
|
||||
"color": "#999",
|
||||
"selectedColor": "#ff3d3d",
|
||||
"list": [
|
||||
{
|
||||
"pagePath": "pages/index/index",
|
||||
"iconPath": "images/1-1.png",
|
||||
"selectedIconPath": "images/1-2.png",
|
||||
"text": "首页"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/productSort/productSort",
|
||||
"iconPath": "images/2-1.png",
|
||||
"selectedIconPath": "images/2-2.png",
|
||||
"text": "分类"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/buycar/buycar",
|
||||
"iconPath": "images/3-1.png",
|
||||
"selectedIconPath": "images/3-2.png",
|
||||
"text": "购物车"
|
||||
},
|
||||
{
|
||||
"pagePath": "pages/user/user",
|
||||
"iconPath": "images/4-1.png",
|
||||
"selectedIconPath": "images/4-2.png",
|
||||
"text": "我的"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
||||
@ -1,41 +0,0 @@
|
||||
@import '/font/font.wxss';
|
||||
|
||||
/**app.wxss**/
|
||||
page{font-size: 28rpx; background-color: #f7f7f7; color: #333;}
|
||||
.flex{display: flex;}
|
||||
|
||||
/* 星星 */
|
||||
.start{width: 122rpx; height: 30rpx; background-image: url('data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAHoAAADMCAYAAAC8yreMAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyJpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMy1jMDExIDY2LjE0NTY2MSwgMjAxMi8wMi8wNi0xNDo1NjoyNyAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmNvbS94YXAvMS4wL21tLyIgeG1sbnM6c3RSZWY9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9zVHlwZS9SZXNvdXJjZVJlZiMiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENTNiAoV2luZG93cykiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6RkVCNkIwQzY0MzlBMTFFOEI2NEU4QTM5MkZFREZGNjEiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6RkVCNkIwQzc0MzlBMTFFOEI2NEU4QTM5MkZFREZGNjEiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDpGRUI2QjBDNDQzOUExMUU4QjY0RThBMzkyRkVERkY2MSIgc3RSZWY6ZG9jdW1lbnRJRD0ieG1wLmRpZDpGRUI2QjBDNTQzOUExMUU4QjY0RThBMzkyRkVERkY2MSIvPiA8L3JkZjpEZXNjcmlwdGlvbj4gPC9yZGY6UkRGPiA8L3g6eG1wbWV0YT4gPD94cGFja2V0IGVuZD0iciI/Pmre9csAAAZlSURBVHja7JxLctNAFEWRk3lgwjQ4iedkBcACgGQDFEuAHcAGcHaQrADCZ453QOb5OExhACzAMU+UKiUc/Z7UL+pWn1vVVLClq2dftbr18UmWy+UdNHyN+AoIGhE0ImjkpdZL33mdlL2zIe1D9ve+tD+Oa7L0H37t06WzHn0g7UnWDg12Pkv/aGvXBv1I2svc/9M967nDD2PpH3XtSel5dPGhey7twcprv6SNHR2mLP3jqL3loXtT2gtp76UtCzaW6p60b9LeSXum/ACW/tTesEdP5d9XLffAN9Le1ixj6R9v7dPlW23QXa+NJjXvW/rHW/t0mWgP3QcdZ4gulmm7LrUrJ2NfpT1WbuxE2m7DZS3946y95WRsT9qlYmO/s3WaytKf2hVBp1P3I8UG00nEd8Xylv7U3uGCSZ0u79jqMlDv3mvnpkYkch30XeN67wbq3XvtbYK+zKbxx0YfxtI/2trXG2xgls3qZtkE4WPuvfTW2cvcjO+4xQew9Kf22vNoxBiNCBoRNCJoRNCIoJFCpefRSZLw7QSostPlde0KyK1uq0Nx6GaMRgSNCBoRNCJoRNCIoBFBoxVBPOij9qn+quN8Pt+4urr65z0ajfbH4/Ef6x4N8aAHfwn52lv+hngwxNpPT09veMtrEA968Nb55w7dTW5qnJ2dzWW5/7wlt19ra2vj1UN4WZ51QW9me+petodWfcj0kdOZtE+KL8fS39/aa4KW8XhzsVg8kvcqvSW7dAc4lkP5bDKZfGobNMQDK/8clWA16PPz807eW1tbEA+8qT1HJSgIupO3BA3xIObaIR70UXvNGC2Tr6/yuspbcjzZ2dnZLcsT4oGHtctsek8CU3mn63Q5j4Ya0IN/esokPfpI0ZtfyToQD4Zee5Pez02NSATxIJLaIR4EUnt2eC70lvEc4kGotaeXNUej0T9v+ftoMplce6e3LBeLxbW3zLghHvgu17/UaHsejZiMIYJGBI36Uems++eXXb6dIU36Sp9I4IfwQYpZN2M0ImhE0IigEUEjgkYEjQgaNRTkwBoN5QohPZpDNyJoRNAosMlY1LCaabuJaFegjKU3sBqH6gqUsfQGVuNILoAylt7aoI8KXjvMDokuZOlvWnvRrx/ltcP0kOuDN7CaFjCZbMxsDZRpMB4Dq2nobwaTSdUVKLO9vV1aO7Aanb8ZTCYLo5O/BJ1UBA2sRrEutSvH6DhhNQ3G6C5AmbrlgNV4BKuxAMpYegOraVm7BVDG0htYzS3Vruyhzr25qRGJgNVEUjuwGoe1dwXKWHoDq+lQu2ugjKU3sJq6LyiwhwP52SyTMUTQaDCCYUKPRgSNCBoRNOrzegCcsWGpLM9B/GyWnZJDNyJogkYEjQgaETQiaETQiKCRWuEyTFpwRiwZI9b+MEwUsmSMWPvDMGkoS8aItT8ME4UsGSPW/nEzTGp+w2zJGLH2h2GS96/gjFgyRqz9YZjcnHUnFUGbMUas/WGY6NalduUY7S/DpGaMtmSMWPvDMFH4WzJGrP1hmCj8LRkj1v4wTAz9LRkj1v4wTJBZ0DBMPK09KoaJJWPE2h+GSYUsGSPW/jBMij4Ev9TI93wmY0zGEEEjgkYEjQgaETQiaETQiKDRtUqvdXNZkR6NCBoRNCJo1ONk7Mfnh842cv/pCd80PRoRNHKmW32UiHNze6npvp0ZJtN2O5DPHJCQa/eOYeIzByTk2r1imPjOAQm5dq8YJr5zQEKu3Y5hUjBGr07GfOWA9O0fFsMkxxgpCtpnDggME41yjJGSoL3lgMAw0c3MXSzTdl1qV47RThgjZWO0rxyQJsvCMFEwTELjgIRce68Mk9A4ICHXHhTDpG8OSMi1c/cqEsEwiaR27xgmPnNAQq69d4ZJSByQkGvnwYOBCYYJkzEUg0rH6J9fdp1thMd96dGIoBFBI/0ZT+mjJ5wKcXqFOHQjgkYEjQgaETQiaETQBI0IGhE0CkPr2hVixkOEXLu6R8eMhwi5dtXdqxSxIHvTbKWAvfwTil1k6R9L7U7uXsWOhwi59soeHSseIuTa1WiLi4uLaPEQUaEtJOho8RCgLZoLtIVntVeO0bHiIUKuvdWsGzzEcGqvDBo8xHBqd3qte+h4iJBr56ZGJAJtEUnt6qBjxkOEXHvtbUrwEMOo/VbRFmg4YzQiaETQiKCRG/0VYAAoPZtWWzW/DQAAAABJRU5ErkJggg=='); background-repeat: no-repeat; background-size: 122rpx auto;}
|
||||
.start.star5{background-position: 0 3rpx;}
|
||||
.start.star4{background-position: 0 -30rpx;}
|
||||
.start.star3{background-position: 0 -70rpx;}
|
||||
.start.star2{background-position: 0 -105rpx;}
|
||||
.start.star1{background-position: 0 -140rpx;}
|
||||
.start.star0{background-position: 0 -175rpx;}
|
||||
|
||||
.model-bg {display: none; z-index: 50; position: fixed; left: 0; top:0; width: 100%; height: 100%; background-color: rgba(0,0,0,.7);}
|
||||
.model-bg.show{display: block;}
|
||||
|
||||
.fl{ float:left; }
|
||||
.fr{ float:right; }
|
||||
.clear{ clear:both; height: 0; line-height: 0; font-size: 0; }
|
||||
.clearfix:after{ content:"."; display:block; height:0; visibility:hidden; clear:both; overflow: hidden;}
|
||||
@keyframes myfirst
|
||||
{
|
||||
from {transform: rotate(0deg);}
|
||||
to {transform: rotate(360deg);}
|
||||
}
|
||||
.loadingpic {
|
||||
animation: myfirst linear 1s infinite;
|
||||
font-size:40rpx;margin-right:22rpx;
|
||||
}
|
||||
.loading{width:100%;height:100rpx;line-height:100rpx;align-items:center;justify-content:center;}
|
||||
.line{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
|
||||
.line2{word-break:break-all;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;}
|
||||
.zhao{position:fixed;top:0;left:0;right:0;bottom:0;background-color:#000;opacity:0.7;}
|
||||
.index-con{position:fixed; left:6rpx;top: 20%; width: 80rpx; height: 100rpx;}
|
||||
.index-con image{width: 82rpx; height: 82rpx;}
|
||||
.index-con navigator{width: 82rpx; height: 100rpx;position: absolute;bottom: 0;left: 0}
|
||||
.index-con .index-area{display:inline-block;top:88rpx;left:0px;position:relative;height: 600rpx;width:82rpx;}
|
||||
|
||||
|
||||
@ -1 +0,0 @@
|
||||
{"dir":"dist"}
|
||||
|
Before Width: | Height: | Size: 5.7 KiB |
|
Before Width: | Height: | Size: 2.5 KiB |
|
Before Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 27 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 2.4 KiB |
|
Before Width: | Height: | Size: 1.3 KiB |
|
Before Width: | Height: | Size: 1.8 KiB |
|
Before Width: | Height: | Size: 1.6 KiB |
|
Before Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 9.2 KiB |
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 1.7 KiB |
|
Before Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 2.0 KiB |
|
Before Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 1.9 KiB |
|
Before Width: | Height: | Size: 5.3 KiB |
|
Before Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
|
Before Width: | Height: | Size: 7.9 KiB |
|
Before Width: | Height: | Size: 2.6 KiB |
|
Before Width: | Height: | Size: 2.3 KiB |
|
Before Width: | Height: | Size: 1.5 KiB |
|
Before Width: | Height: | Size: 57 KiB |
|
Before Width: | Height: | Size: 3.1 KiB |
|
Before Width: | Height: | Size: 3.5 KiB |
|
Before Width: | Height: | Size: 3.6 KiB |
|
Before Width: | Height: | Size: 2.9 KiB |
|
Before Width: | Height: | Size: 3.4 KiB |
|
Before Width: | Height: | Size: 2.1 KiB |
|
Before Width: | Height: | Size: 12 KiB |
|
Before Width: | Height: | Size: 1.4 KiB |
@ -1,156 +0,0 @@
|
||||
var app = getApp();
|
||||
Page({
|
||||
data: {
|
||||
_num:1,
|
||||
region: ['省','市','区'],
|
||||
cartId : '',
|
||||
pinkId : '',
|
||||
couponId : '',
|
||||
id:0,
|
||||
userAddress:[]
|
||||
},
|
||||
onLoad: function (options) {
|
||||
app.setBarColor();
|
||||
app.setUserInfo();
|
||||
if (options.cartId){
|
||||
this.setData({
|
||||
cartId: options.cartId,
|
||||
pinkId: options.pinkId,
|
||||
couponId: options.couponId,
|
||||
})
|
||||
}
|
||||
if (options.id){
|
||||
this.setData({
|
||||
id: options.id
|
||||
})
|
||||
this.getUserAddress();
|
||||
}
|
||||
},
|
||||
getUserAddress: function () {//get_user_address
|
||||
var that = this;
|
||||
|
||||
wx.request({
|
||||
url: app.globalData.url + '/routine/auth_api/get_user_address?uid=' + app.globalData.uid,
|
||||
method: 'GET',
|
||||
data: {
|
||||
addressId : that.data.id
|
||||
},
|
||||
success: function (res) {
|
||||
console.log(res);
|
||||
var regionOne = "region.0";
|
||||
var regionTwo = "region.1";
|
||||
var regionTherr = "region.2";
|
||||
that.setData({
|
||||
userAddress: res.data.data,
|
||||
[regionOne]: res.data.data.province,
|
||||
[regionTwo]: res.data.data.city,
|
||||
[regionTherr]: res.data.data.district,
|
||||
_num: res.data.data.is_default == 1 ? 0 : 1
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
bindRegionChange: function (e) {
|
||||
this.setData({
|
||||
region: e.detail.value
|
||||
})
|
||||
},
|
||||
defaulttap:function(e){
|
||||
var num = this.data._num;
|
||||
if(num==1){
|
||||
this.setData({
|
||||
_num: 0
|
||||
})
|
||||
}else{
|
||||
this.setData({
|
||||
_num: 1
|
||||
})
|
||||
}
|
||||
},
|
||||
|
||||
formSubmit: function (e) {
|
||||
var warn = "";
|
||||
var that = this;
|
||||
var flag = true;
|
||||
var cartId = '';
|
||||
var name = e.detail.value.name;
|
||||
var phone = e.detail.value.phone;
|
||||
var area = JSON.stringify(this.data.region);
|
||||
var fulladdress = e.detail.value.fulladdress;
|
||||
var addressP = {};
|
||||
if (name == "") {
|
||||
warn = '请输入姓名';
|
||||
} else if (!/^1(3|4|5|7|8)\d{9}$/i.test(phone)) {
|
||||
warn = '您输入的手机号有误'
|
||||
} else if (area == '["省","市","区"]'){
|
||||
warn = '请选择地区';
|
||||
} else if (fulladdress == "") {
|
||||
warn = "请填写具体地址";
|
||||
} else{
|
||||
flag = false;
|
||||
}
|
||||
if(flag==true){
|
||||
wx.showModal({
|
||||
title: '提示',
|
||||
content: warn
|
||||
})
|
||||
}else{
|
||||
addressP.province = this.data.region[0];
|
||||
addressP.city = this.data.region[1];
|
||||
addressP.district = this.data.region[2];
|
||||
|
||||
wx.request({
|
||||
url: app.globalData.url + '/routine/auth_api/edit_user_address?uid=' + app.globalData.uid,
|
||||
method: 'POST',
|
||||
data: {
|
||||
address: addressP,
|
||||
is_default : that.data._num == 0 ? 1 : 0,
|
||||
real_name : name,
|
||||
post_code : '',
|
||||
phone : phone,
|
||||
detail : fulladdress,
|
||||
id:that.data.id
|
||||
},
|
||||
success: function (res) {
|
||||
if (res.data.code == 200) {
|
||||
if (that.data.id) {
|
||||
wx.showToast({
|
||||
title: '修改成功',
|
||||
icon: 'success',
|
||||
duration: 1000
|
||||
})
|
||||
}else{
|
||||
wx.showToast({
|
||||
title: '添加成功',
|
||||
icon: 'success',
|
||||
duration: 1000
|
||||
})
|
||||
}
|
||||
setTimeout(function () {
|
||||
if (that.data.cartId) {
|
||||
|
||||
var cartId = that.data.cartId;
|
||||
var pinkId = that.data.pinkId;
|
||||
var couponId = that.data.couponId;
|
||||
that.setData({
|
||||
cartId: '',
|
||||
pinkId: '',
|
||||
couponId:'',
|
||||
})
|
||||
wx.navigateTo({ //跳转至指定页面并关闭其他打开的所有页面(这个最好用在返回至首页的的时候)
|
||||
url: '/pages/order-confirm/order-confirm?id=' + cartId + '&addressId=' + that.data.id + '&pinkId=' + pinkId + '&couponId=' + couponId
|
||||
})
|
||||
} else {
|
||||
wx.navigateTo({ //跳转至指定页面并关闭其他打开的所有页面(这个最好用在返回至首页的的时候)
|
||||
url: '/pages/address/address'
|
||||
})
|
||||
}
|
||||
},1200)
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
})
|
||||
@ -1,3 +0,0 @@
|
||||
{
|
||||
"navigationBarTitleText": "添加收获地址"
|
||||
}
|
||||
@ -1,20 +0,0 @@
|
||||
<form bindsubmit="formSubmit">
|
||||
<view class='information'>
|
||||
<view class='information-li flex'><label>姓名</label><input type='text' placeholder='请输入姓名' placeholder-class='placeholder' name="name" value='{{userAddress.real_name}}'/></view>
|
||||
<view class='information-li flex'><label>联系电话</label><input type='number' placeholder-class='placeholder' placeholder='请输入联系电话' name="phone" value='{{userAddress.phone}}'></input></view>
|
||||
<view class='information-li flex'>
|
||||
<label class='area'>所在地区</label>
|
||||
<picker mode="region" bindchange="bindRegionChange" value="{{region}}" custom-item="{{customItem}}">
|
||||
<text class='areas' data-text="C">{{region[0]}},{{region[1]}},{{region[2]}}</text>
|
||||
<text class='iconfont icon-dizhi map'></text>
|
||||
</picker>
|
||||
</view>
|
||||
<view class='information-li flex'><label>详细地址</label><input type='text' placeholder-class='placeholder' placeholder='请填写具体地址' name="fulladdress" value='{{userAddress.detail}}'></input></view>
|
||||
</view>
|
||||
<view class='default' bindtap='defaulttap'>
|
||||
<text class='iconfont icon-duihao1 duihao {{_num==0?"active":""}}'></text>
|
||||
设置为默认地址
|
||||
</view>
|
||||
<button class='but' formType="submit">立即保存</button>
|
||||
</form>
|
||||
|
||||
@ -1,13 +0,0 @@
|
||||
.information{width:100%;height:364rpx;background-color:#ffffff;display:block;}
|
||||
.information-li{height:90rpx;padding:0 20rpx;line-height:90rpx;border-bottom:1rpx solid #F7F7F7;}
|
||||
.information-li label,.cashNum label{width:170rpx;display:inline-block;}
|
||||
.information-li input,.cashNum input{width:100%;height:100%;}
|
||||
.placeholder{color:#cccccc;}
|
||||
.but{width:710rpx;height:90rpx;line-height:90rpx;text-align:center;background-color:#F84426;color:#ffffff;font-size:32rpx;margin-top:70rpx;}
|
||||
.areas{color:#808080;display:inline-block;width:510rpx; overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
|
||||
.map{float:right;font-size:45rpx;color:#F14233;}
|
||||
.area{width:137rpx !important;}
|
||||
.default{height:90rpx;line-height:90rpx;padding:0 20rpx;background-color:#ffffff;margin-top:20rpx;color:#333333;}
|
||||
.duihao{height:45rpx;line-height:45rpx;text-align:center;border-radius:50%;border:1rpx solid #DEDEDE;display:inline-block;width:45rpx;font-size:30rpx;color:#ffffff;margin-right:21rpx;}
|
||||
.active{background-color:#F84426;}
|
||||
|
||||
@ -1,212 +0,0 @@
|
||||
// pages/address/address.js
|
||||
var app = getApp();
|
||||
Page({
|
||||
data: {
|
||||
_num:'',
|
||||
cartId: '',
|
||||
pinkId: '',
|
||||
couponId: '',
|
||||
addressArray:[]
|
||||
},
|
||||
onLoad: function (options) {
|
||||
app.setBarColor();
|
||||
app.setUserInfo();
|
||||
if (options.cartId) {
|
||||
this.setData({
|
||||
cartId: options.cartId,
|
||||
pinkId: options.pinkId,
|
||||
couponId: options.couponId,
|
||||
})
|
||||
}
|
||||
this.getAddress();
|
||||
},
|
||||
getWxAddress:function(){
|
||||
var that = this;
|
||||
wx.authorize({
|
||||
scope: 'scope.address',
|
||||
success: function(res) {
|
||||
wx.chooseAddress({
|
||||
success: function(res) {
|
||||
console.log(res);
|
||||
var addressP = {};
|
||||
addressP.province = res.provinceName;
|
||||
addressP.city = res.cityName;
|
||||
addressP.district = res.countyName;
|
||||
wx.request({
|
||||
url: app.globalData.url + '/routine/auth_api/edit_user_address?uid=' + app.globalData.uid + '&openid=' + app.globalData.openid,
|
||||
method: 'POST',
|
||||
data: {
|
||||
address: addressP,
|
||||
is_default: 1,
|
||||
real_name: res.userName,
|
||||
post_code: res.postalCode,
|
||||
phone: res.telNumber,
|
||||
detail: res.detailInfo,
|
||||
id: 0
|
||||
},
|
||||
success: function (res) {
|
||||
if (res.data.code == 200) {
|
||||
wx.showToast({
|
||||
title: '添加成功',
|
||||
icon: 'success',
|
||||
duration: 1000
|
||||
})
|
||||
that.getAddress();
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
fail: function(res) {
|
||||
if (res.errMsg == 'chooseAddress:cancel'){
|
||||
wx.showToast({
|
||||
title: '取消选择',
|
||||
icon: 'none',
|
||||
duration: 1500
|
||||
})
|
||||
}
|
||||
},
|
||||
complete: function(res) {},
|
||||
})
|
||||
},
|
||||
fail: function(res) {
|
||||
console.log(res);
|
||||
},
|
||||
complete: function(res) {},
|
||||
})
|
||||
},
|
||||
getAddress: function () {
|
||||
var that = this;
|
||||
var header = {
|
||||
'content-type': 'application/x-www-form-urlencoded',
|
||||
};
|
||||
wx.request({
|
||||
url: app.globalData.url + '/routine/auth_api/user_address_list?uid=' + app.globalData.uid,
|
||||
method: 'POST',
|
||||
header: header,
|
||||
success: function (res) {
|
||||
if (res.data.code == 200) {
|
||||
that.setData({
|
||||
addressArray: res.data.data
|
||||
})
|
||||
for (var i in res.data.data) {
|
||||
if (res.data.data[i].is_default) {
|
||||
that.setData({
|
||||
_num: res.data.data[i].id
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
addAddress:function(){
|
||||
|
||||
var cartId = this.data.cartId;
|
||||
var pinkId = this.data.pinkId;
|
||||
var couponId = this.data.couponId;
|
||||
this.setData({
|
||||
cartId: '',
|
||||
pinkId:'',
|
||||
couponId:'',
|
||||
})
|
||||
wx.navigateTo({ //跳转至指定页面并关闭其他打开的所有页面(这个最好用在返回至首页的的时候)
|
||||
url: '/pages/addaddress/addaddress?cartId=' + cartId + '&pinkId=' + pinkId + '&couponId=' + couponId
|
||||
})
|
||||
},
|
||||
goOrder:function(e){
|
||||
var id = e.currentTarget.dataset.id;
|
||||
var cartId = '';
|
||||
var pinkId = '';
|
||||
var couponId = '';
|
||||
if (this.data.cartId && id){
|
||||
cartId = this.data.cartId;
|
||||
pinkId = this.data.pinkId;
|
||||
couponId = this.data.couponId;
|
||||
this.setData({
|
||||
cartId : '',
|
||||
pinkId : '',
|
||||
couponId : '',
|
||||
})
|
||||
wx.navigateTo({ //跳转至指定页面并关闭其他打开的所有页面(这个最好用在返回至首页的的时候)
|
||||
url: '/pages/order-confirm/order-confirm?id=' + cartId + '&addressId=' + id + '&pinkId=' + pinkId + '&couponId=' + couponId
|
||||
})
|
||||
}
|
||||
},
|
||||
delAddress:function(e){
|
||||
var id = e.currentTarget.dataset.id;
|
||||
var that = this;
|
||||
var header = {
|
||||
'content-type': 'application/x-www-form-urlencoded',
|
||||
};
|
||||
wx.request({
|
||||
url: app.globalData.url + '/routine/auth_api/remove_user_address?uid=' + app.globalData.uid,
|
||||
method: 'GET',
|
||||
header: header,
|
||||
data:{
|
||||
addressId:id
|
||||
},
|
||||
success: function (res) {
|
||||
if (res.data.code == 200) {
|
||||
wx.showToast({
|
||||
title: '删除成功',
|
||||
icon: 'success',
|
||||
duration: 1000,
|
||||
})
|
||||
that.getAddress();
|
||||
} else {
|
||||
wx.showToast({
|
||||
title: res.data.msg,
|
||||
icon: 'none',
|
||||
duration: 1000,
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
editAddress: function (e) {
|
||||
var cartId = this.data.cartId;
|
||||
var pinkId = this.data.pinkId;
|
||||
var couponId = this.data.couponId;
|
||||
this.setData({
|
||||
cartId: '',
|
||||
pinkId: '',
|
||||
couponId: '',
|
||||
})
|
||||
wx.navigateTo({ //跳转至指定页面并关闭其他打开的所有页面(这个最好用在返回至首页的的时候)
|
||||
url: '/pages/addaddress/addaddress?id=' + e.currentTarget.dataset.id + '&cartId=' + cartId + '&pinkId=' + pinkId + '&couponId=' + couponId
|
||||
})
|
||||
},
|
||||
activetap:function(e){
|
||||
var id = e.target.dataset.idx;
|
||||
var that = this;
|
||||
var header = {
|
||||
'content-type': 'application/x-www-form-urlencoded',
|
||||
};
|
||||
wx.request({
|
||||
url: app.globalData.url + '/routine/auth_api/set_user_default_address?uid=' + app.globalData.uid,
|
||||
method: 'GET',
|
||||
header: header,
|
||||
data:{
|
||||
addressId:id
|
||||
},
|
||||
success: function (res) {
|
||||
if (res.data.code == 200) {
|
||||
wx.showToast({
|
||||
title: '设置成功',
|
||||
icon: 'success',
|
||||
duration: 1000,
|
||||
})
|
||||
that.setData({
|
||||
_num: id
|
||||
})
|
||||
} else {
|
||||
wx.showToast({
|
||||
title: res.data.msg,
|
||||
icon: 'none',
|
||||
duration: 1000,
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
@ -1 +0,0 @@
|
||||
{"navigationBarTitleText": "收获地址管理"}
|
||||
@ -1,26 +0,0 @@
|
||||
<view class="header"></view>
|
||||
<view class='address_ul'>
|
||||
<block wx:for="{{addressArray}}">
|
||||
<view class='address_li'>
|
||||
<view class='addressx' data-id="{{item.id}}" bindtap='goOrder'>
|
||||
<view class='addressName'>收货人:{{item.real_name}}<text class='addressphone'>{{item.phone}}</text></view>
|
||||
<view class='addressLock'>收货地址:{{item.province}}{{item.city}}{{item.district}}{{item.detail}}</view>
|
||||
</view>
|
||||
<view class='addressc flex'>
|
||||
<view data-idx='{{item.id}}' class='Maddress' bindtap='activetap' >
|
||||
<text class='iconfont icon-duihao1 Choice {{_num==item.id?"active":""}}' data-idx='{{item.id}}'></text>
|
||||
设为默认地址
|
||||
</view>
|
||||
<view>
|
||||
<text class='edit' data-id="{{item.id}}" bindtap='editAddress'>编辑</text>
|
||||
<text class='del' data-id="{{item.id}}" bindtap='delAddress'>删除</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
<view style='height:80rpx'></view>
|
||||
<view class='footer'>
|
||||
<view class='system-address' bindtap='addAddress'>新增地址</view>
|
||||
<view class='weixin-address' bindtap='getWxAddress'>微信地址</view>
|
||||
</view>
|
||||
@ -1,411 +0,0 @@
|
||||
// import bm from '../../utils/baseMath.js'
|
||||
// // pages/buycar/buycar.js
|
||||
var app = getApp();
|
||||
// // var wx = require('../../utils/wx.js');
|
||||
|
||||
Page({
|
||||
data: {
|
||||
isAttrInfo:'attrInfo',
|
||||
itemAttrInfo : '',
|
||||
foothidden:false,
|
||||
url: app.globalData.urlImages,
|
||||
countmoney:"",
|
||||
cartNum:"",
|
||||
isAllSelect:false,
|
||||
minusStatus: 'disabled',
|
||||
cartList:[],
|
||||
cartInvalid:[],
|
||||
cartIdsStr:''
|
||||
},
|
||||
|
||||
setNumber: function (e) {
|
||||
var that = this;
|
||||
var index = e.currentTarget.dataset.item;
|
||||
var cartList = that.data.cartList;
|
||||
var num = parseInt(e.detail.value);
|
||||
var cart_num = num ? num : 1;
|
||||
if (cartList[index].productInfo.attrInfo.stock){
|
||||
if (cart_num > cartList[index].productInfo.stock) cart_num = cartList[index].productInfo.attrInfo.stock
|
||||
}else{
|
||||
if (cart_num > cartList[index].productInfo.attrInfo.stock) cart_num = cartList[index].productInfo.stock
|
||||
}
|
||||
cartList[index].cart_num = cart_num;
|
||||
that.setData({
|
||||
cartList: cartList
|
||||
})
|
||||
wx.request({
|
||||
url: app.globalData.url + '/routine/auth_api/set_buy_cart_num?uid=' + app.globalData.uid,
|
||||
method: 'GET',
|
||||
data:{
|
||||
cartId: cartList[index].id,
|
||||
cartNum: cart_num
|
||||
},
|
||||
success: function (res) {
|
||||
if (res.data.code == 400) {
|
||||
wx.showToast({
|
||||
title: res.data.msg,
|
||||
icon: 'none',
|
||||
duration: 1000,
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
onLoad: function (options) {
|
||||
app.setBarColor();
|
||||
app.setUserInfo();
|
||||
this.carnum();
|
||||
this.countmoney();
|
||||
this.getList();
|
||||
},
|
||||
btntap: function (e) {
|
||||
this.data.foothidden = !this.data.foothidden;
|
||||
this.setData({
|
||||
foothidden: this.data.foothidden
|
||||
})
|
||||
},
|
||||
getList:function(){
|
||||
var that = this;
|
||||
var header = {
|
||||
'content-type': 'application/x-www-form-urlencoded',
|
||||
};
|
||||
wx.request({
|
||||
url: app.globalData.url + '/routine/auth_api/get_cart_list?uid=' + app.globalData.uid,
|
||||
method: 'POST',
|
||||
header: header,
|
||||
success: function (res) {
|
||||
if(res.data.code == 200){
|
||||
that.setData({
|
||||
cartList: res.data.data.valid,
|
||||
cartInvalid: res.data.data.invalid
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
//加
|
||||
numAddClick: function (event) {
|
||||
var index = event.currentTarget.dataset.index;
|
||||
this.data.cartList[index].cart_num = +this.data.cartList[index].cart_num + 1;
|
||||
var minusStatus = this.data.cartList[index].cart_num <= 1 ? 'disabled' : 'normal';
|
||||
this.setData({ cartList: this.data.cartList, minusStatus: minusStatus});
|
||||
this.carnum();
|
||||
this.countmoney();
|
||||
this.addCartNum(this.data.cartList[index].cart_num, this.data.cartList[index].id);
|
||||
},
|
||||
//减
|
||||
numDescClick: function (event) {
|
||||
var index = event.currentTarget.dataset.index;
|
||||
this.data.cartList[index].cart_num = this.data.cartList[index].cart_num <= 1 ? 1 : +this.data.cartList[index].cart_num - 1;
|
||||
var minusStatus = this.data.cartList[index].cart_num <= 1 ? 'disabled' : 'normal';
|
||||
this.setData({ cartList: this.data.cartList, minusStatus: minusStatus});
|
||||
this.carnum();
|
||||
this.countmoney();
|
||||
this.addCartNum(this.data.cartList[index].cart_num, this.data.cartList[index].id);
|
||||
},
|
||||
//单选;
|
||||
switchSelect:function(e){
|
||||
var index = e.currentTarget.dataset.index;
|
||||
this.data.cartList[index].checked = !this.data.cartList[index].checked;
|
||||
var len = this.data.cartList.length;
|
||||
var selectnum = [];
|
||||
for(var i = 0; i < len ;i++){
|
||||
if (this.data.cartList[i].checked==true){
|
||||
selectnum.push(true);
|
||||
}
|
||||
}
|
||||
if (selectnum.length==len){
|
||||
this.data.isAllSelect = true;
|
||||
}else{
|
||||
this.data.isAllSelect = false;
|
||||
}
|
||||
this.setData({
|
||||
cartList: this.data.cartList,
|
||||
isAllSelect: this.data.isAllSelect
|
||||
});
|
||||
this.carnum();
|
||||
this.countmoney();
|
||||
this.confirmOrder();
|
||||
},
|
||||
//全选
|
||||
allChecked:function(e){
|
||||
var selectAllStatus = this.data.isAllSelect;
|
||||
selectAllStatus = !selectAllStatus;
|
||||
var array = this.data.cartList;
|
||||
for (var i = 0; i < array.length;i++){
|
||||
array[i].checked = selectAllStatus;
|
||||
};
|
||||
this.setData({
|
||||
cartList:this.data.cartList,
|
||||
isAllSelect: selectAllStatus
|
||||
})
|
||||
this.carnum();
|
||||
this.countmoney();
|
||||
this.confirmOrder();
|
||||
},
|
||||
//数量
|
||||
carnum(){
|
||||
var carnum = 0;
|
||||
var array = this.data.cartList;
|
||||
for(var i = 0;i<array.length;i++){
|
||||
if (array[i].checked==true){
|
||||
carnum += parseInt(array[i].cart_num);
|
||||
}
|
||||
}
|
||||
this.setData({
|
||||
cartNum: carnum
|
||||
})
|
||||
},
|
||||
//总共价钱;
|
||||
countmoney(){
|
||||
var carmoney = 0;
|
||||
var array = this.data.cartList;
|
||||
for (var i = 0; i < array.length; i++) {
|
||||
if (array[i].checked == true) {
|
||||
if (array[i].productInfo.attrInfo){
|
||||
carmoney += parseFloat(array[i].cart_num * array[i].productInfo.attrInfo.price);
|
||||
}else{
|
||||
carmoney += parseFloat(array[i].cart_num * array[i].productInfo.price);
|
||||
}
|
||||
}
|
||||
}
|
||||
this.setData({
|
||||
countmoney: carmoney.toFixed(2)
|
||||
})
|
||||
},
|
||||
confirmOrder:function(){
|
||||
var array = this.data.cartList;
|
||||
var cartIds = [];
|
||||
for (var i = 0; i < array.length; i++) {
|
||||
if (array[i].checked == true) {
|
||||
cartIds.push(array[i].id);
|
||||
}
|
||||
}
|
||||
if (cartIds.length > 0) {
|
||||
this.goConfirm(cartIds);
|
||||
}else{
|
||||
this.setData({
|
||||
cartIdsStr: ''
|
||||
})
|
||||
}
|
||||
},
|
||||
goConfirm : function(cartIds){
|
||||
if (cartIds.length > 0) {
|
||||
this.setData({
|
||||
cartIdsStr: cartIds.join(',')
|
||||
})
|
||||
}
|
||||
// console.log(this);
|
||||
},
|
||||
addCartNum: function (cartNum, cartId){
|
||||
var header = {
|
||||
'content-type': 'application/x-www-form-urlencoded',
|
||||
};
|
||||
wx.request({
|
||||
url: app.globalData.url + '/routine/auth_api/change_cart_num?uid=' + app.globalData.uid,
|
||||
method: 'GET',
|
||||
data: {
|
||||
cartNum: cartNum,
|
||||
cartId: cartId
|
||||
},
|
||||
header: header,
|
||||
success: function (res) {
|
||||
if (res.data.code == 200) {
|
||||
wx.showToast({
|
||||
title: '成功',
|
||||
icon: 'success',
|
||||
duration: 2000
|
||||
})
|
||||
} else {
|
||||
wx.showToast({
|
||||
title: res.data.msg,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
collectAll: function () {
|
||||
var array = this.data.cartList;
|
||||
var productIds = [];
|
||||
var that = this;
|
||||
for (var i = 0; i < array.length; i++) {
|
||||
if (array[i].checked == true) {
|
||||
productIds.push(array[i].product_id);
|
||||
}
|
||||
}
|
||||
if (productIds.length > 0) {
|
||||
var header = {
|
||||
'content-type': 'application/x-www-form-urlencoded',
|
||||
};
|
||||
wx.request({
|
||||
url: app.globalData.url + '/routine/auth_api/collect_product_all?uid=' + app.globalData.uid,
|
||||
method: 'GET',
|
||||
data: {
|
||||
productId: productIds.join(',')
|
||||
},
|
||||
header: header,
|
||||
success: function (res) {
|
||||
if (res.data.code == 200) {
|
||||
wx.showToast({
|
||||
title: '收藏成功',
|
||||
icon: 'success',
|
||||
duration: 2000
|
||||
})
|
||||
} else {
|
||||
wx.showToast({
|
||||
title: res.data.msg,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
console.log(productIds);
|
||||
},
|
||||
cartDelAll:function(){
|
||||
var array = this.data.cartList;
|
||||
var ids = [];
|
||||
var that = this;
|
||||
for (var i = 0; i < array.length; i++) {
|
||||
if (array[i].checked == true) {
|
||||
ids.push(array[i].id);
|
||||
}
|
||||
}
|
||||
if (ids.length > 0){
|
||||
var header = {
|
||||
'content-type': 'application/x-www-form-urlencoded',
|
||||
};
|
||||
wx.request({
|
||||
url: app.globalData.url + '/routine/auth_api/remove_cart?uid=' + app.globalData.uid,
|
||||
method: 'GET',
|
||||
data: {
|
||||
ids: ids.join(',')
|
||||
},
|
||||
header: header,
|
||||
success: function (res) {
|
||||
if (res.data.code == 200) {
|
||||
wx.showToast({
|
||||
title: '删除成功',
|
||||
icon: 'success',
|
||||
duration: 2000
|
||||
})
|
||||
for (var i = 0; i < ids.length; i++) {
|
||||
for (var j = 0; j < array.length; j++) {
|
||||
if (ids[i] == array[j].id) {
|
||||
array.splice(j, 1);
|
||||
}
|
||||
}
|
||||
}
|
||||
that.setData({
|
||||
cartList: array
|
||||
})
|
||||
} else {
|
||||
wx.showToast({
|
||||
title: res.data.msg,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
cartDel:function(e){
|
||||
var that = this;
|
||||
if (e.currentTarget.dataset.id){
|
||||
var header = {
|
||||
'content-type': 'application/x-www-form-urlencoded',
|
||||
};
|
||||
wx.request({
|
||||
url: app.globalData.url + '/routine/auth_api/remove_cart?uid=' + app.globalData.uid,
|
||||
method: 'GET',
|
||||
data: {
|
||||
ids: e.currentTarget.dataset.id
|
||||
},
|
||||
header: header,
|
||||
success: function (res) {
|
||||
if(res.data.code == 200){
|
||||
wx.showToast({
|
||||
title: '删除成功',
|
||||
icon: 'success',
|
||||
duration: 2000
|
||||
})
|
||||
var cartInvalid = that.data.cartInvalid;
|
||||
for (var i = 0; i < cartInvalid.length ; i++){
|
||||
if (e.currentTarget.dataset.id == cartInvalid[i].id){
|
||||
cartInvalid.splice(i,1);
|
||||
that.setData({
|
||||
cartInvalid: cartInvalid
|
||||
})
|
||||
}
|
||||
}
|
||||
}else{
|
||||
wx.showToast({
|
||||
title: res.data.msg,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow: function () {
|
||||
this.carnum();
|
||||
this.countmoney();
|
||||
this.getList();
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage: function () {
|
||||
|
||||
}
|
||||
})
|
||||
@ -1,3 +0,0 @@
|
||||
{
|
||||
"navigationBarTitleText": "购物车"
|
||||
}
|
||||
@ -1,82 +0,0 @@
|
||||
<form>
|
||||
<view class='head flex'>
|
||||
<view class='txt'>购物数量({{cartNum}})</view>
|
||||
<view class='btn' bindtap='btntap' wx:if='{{!foothidden}}'>管理</view>
|
||||
<view class='btn' bindtap='btntap' wx:if='{{foothidden}}'>取消</view>
|
||||
</view>
|
||||
<view class='car-list'>
|
||||
<block wx:for="{{cartList}}" wx:key>
|
||||
<view class='list-item flex'>
|
||||
<view class='select-btn flex' data-index='{{index}}' bindtap='switchSelect'>
|
||||
<label class="checkbox">
|
||||
<checkbox value="{{index}}" checked="{{item.checked}}" />
|
||||
</label>
|
||||
</view>
|
||||
<view class='picture'><image src='{{url}}{{item.productInfo.image}}'></image></view>
|
||||
<view class='pro-info flex'>
|
||||
<view class='pro-title'>{{item.productInfo.store_name}}</view>
|
||||
<view class='pro-des' wx:if="{{item.productInfo.attrInfo}}">{{item.productInfo.attrInfo.suk}}</view>
|
||||
<view class='pro-price' wx:if="{{item.productInfo.attrInfo}}"><text>¥</text>{{item.productInfo.attrInfo.price}}</view>
|
||||
<view class='pro-price' wx:else><text>¥</text>{{item.productInfo.price}}</view>
|
||||
<!-- <view class='pro-price'><text>¥</text>{{item.productInfo.attrInfo.price}}</view> -->
|
||||
</view>
|
||||
<view class='count-wrapper flex'>
|
||||
<text data-index="{{index}}" bindtap="numDescClick" class='{{minusStatus}}'>-</text>
|
||||
<!-- <text class='num'>{{item.cart_num}}</text> -->
|
||||
<input class='num' data-item='{{index}}' type="number" value='{{item.cart_num}}' bindblur='setNumber'/>
|
||||
<text class='add' data-index="{{index}}" bindtap="numAddClick">+</text>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
<!-- 失效页面 -->
|
||||
<view class='fail-list' wx:if="{{cartInvalid.length > 0}}">
|
||||
<view class='title-bar flex'>
|
||||
<text class='line'></text>
|
||||
<text class='txt'>失效商品</text>
|
||||
<text class='line'></text>
|
||||
</view>
|
||||
<view class='fail-item flex' wx:for="{{cartInvalid}}">
|
||||
<view class='pro-img'><image src='{{url}}{{item.productInfo.image}}'></image></view>
|
||||
<view class='pro-infos flex'>
|
||||
<view class='title'>{{item.productInfo.store_name}}</view>
|
||||
<view class='pro-price' wx:if="{{item.productInfo.attrInfo}}"><text>¥</text>{{item.productInfo.attrInfo.price}}</view>
|
||||
<view class='pro-price' wx:else><text>¥</text>{{item.productInfo.price}}</view>
|
||||
</view>
|
||||
<view class='del-btn' data-id="{{item.id}}" bindtap="cartDel">删除</view>
|
||||
</view>
|
||||
</view>
|
||||
<view style='height:120rpx;'></view>
|
||||
<view class='foot'>
|
||||
<view class='pay-wrapper flex' hidden='{{foothidden}}'>
|
||||
<view class='left-wrapper flex'>
|
||||
<view class='all-select' bindtap="allChecked">
|
||||
<label class="checkbox">
|
||||
<checkbox value="Boolean" checked="{{isAllSelect}}"/>
|
||||
</label>
|
||||
</view>
|
||||
<view class='txt'>全选</view>
|
||||
<view class='count-num'>
|
||||
<text>合计:</text>¥{{countmoney}}
|
||||
</view>
|
||||
</view>
|
||||
<navigator class='flex' hover-class="none" url="/pages/order-confirm/order-confirm?id={{cartIdsStr}}">
|
||||
<view class='pay-btn'>立即结算</view>
|
||||
</navigator>
|
||||
</view>
|
||||
<view class='delete-wrapper flex'>
|
||||
<view class='left-wrapper flex'>
|
||||
<view class='all-select' bindtap="allChecked">
|
||||
<label class="checkbox">
|
||||
<checkbox value="Boolean" checked="{{isAllSelect}}"/>
|
||||
</label>
|
||||
</view>
|
||||
<view class='txt'>全选</view>
|
||||
</view>
|
||||
<view class='right-wrapper flex'>
|
||||
<view class='collection-btn' bindtap='collectAll'>移入收藏</view>
|
||||
<view class='delete-btn' bindtap='cartDelAll'>删除</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</form>
|
||||
@ -1,42 +0,0 @@
|
||||
.head{z-index: 99; position: fixed;left: 0; top: 0; width: 100%; height: 70rpx; padding: 0 28rpx; background-color: #ff3d3d; color: #fff; justify-content: space-between; align-items: center; box-sizing: border-box;}
|
||||
.car-list{position: relative; margin-top: 80rpx; background-color: #fff;}
|
||||
.car-list .list-item{position: relative; padding: 20rpx 0; border-bottom: 1px solid #eee; }
|
||||
.select-btn{width: 83rpx; text-align: center; align-items: center; justify-content: center;}
|
||||
.select-btn checkbox .wx-checkbox-input{border-radius: 50%}
|
||||
.select-btn checkbox .wx-checkbox-input.wx-checkbox-input-checked{color: #fff!important; border:1px solid #ff3d3d;background-color: #ff3d3d; border-radius: 50%;}
|
||||
.picture{width: 200rpx; height: 200rpx;}
|
||||
.picture image{width: 100%; height: 100%;}
|
||||
.pro-info{width: 425rpx; margin: 0 20rpx; flex-direction: column; justify-content: space-around;}
|
||||
.pro-info .pro-title{display: -webkit-box; display:-moz-box; display:box;-webkit-box-orient: vertical; -moz-box-orient: vertical; -webkit-line-clamp: 2;-moz-line-clamp: 2;overflow: hidden; color: #262626;}
|
||||
.pro-info .pro-des{font-size: 24rpx; color: #ababab; overflow: hidden;white-space: nowrap;text-overflow: ellipsis;}
|
||||
.pro-info .pro-price{font-size: 38rpx; color: #ff3d3d;}
|
||||
.pro-info .pro-price text{font-size: 25rpx;}
|
||||
.count-wrapper{position: absolute; right:20rpx; bottom:20rpx;width: 160rpx; height: 47rpx; box-sizing: border-box; border: 1px solid #ddd; border-radius: 3px; align-items: center;}
|
||||
.count-wrapper text{flex: 1;text-align: center; height: 100%; font-size: 36rpx; color:#454545; line-height: 37rpx;}
|
||||
.count-wrapper .num{flex: initial;width: 66rpx; color: #333; font-size: 28rpx;border-left: 1px solid #ddd;border-right: 1px solid #ddd; line-height: 47rpx;text-align: center}
|
||||
.disabled{color:#ccc !important;}
|
||||
.fail-list .title-bar{width: 100%; height: 118rpx; align-items: center; color: #aaa;justify-content: center;}
|
||||
.fail-list .title-bar .line{width: 70rpx; height: 1px; background-color: #ddd; }
|
||||
.fail-list .title-bar .txt{margin: 0 35rpx;}
|
||||
.fail-item{position: relative; padding: 20rpx; background-color: #fff; justify-content: space-between; border-bottom: 1px solid #eee;}
|
||||
.fail-item .pro-img,.fail-item .pro-img image{width: 185rpx; height: 185rpx;}
|
||||
.fail-item .pro-infos{width: 495rpx; flex-direction: column; justify-content: space-around;}
|
||||
.fail-item .pro-infos .title{color: #777;display: -webkit-box; display:-moz-box; display:box;-webkit-box-orient: vertical; -moz-box-orient: vertical; -webkit-line-clamp: 2;-moz-line-clamp: 2;overflow: hidden;}
|
||||
.fail-item .pro-infos .price{font-size: 38rpx; color: #999;}
|
||||
.fail-item .pro-infos .price text{font-size: 25rpx;}
|
||||
.fail-item .del-btn{position: absolute; right: 20rpx; bottom: 30rpx; width: 130rpx; height: 50rpx; box-sizing: border-box; text-align: center; line-height: 50rpx; border:1px solid #ff3d3d; font-size: 24rpx; color: #ff3d3d; border-radius: 3px;}
|
||||
.foot{position: fixed;left: 0; bottom: 0; width: 100%; height: 99rpx; background-color: #fff; border-top: 1px solid #eee; }
|
||||
.foot .all-select{width: 87rpx; text-align: center; align-items: center; justify-content: center;}
|
||||
.foot .all-select checkbox .wx-checkbox-input{border-radius: 50%}
|
||||
.foot .all-select checkbox .wx-checkbox-input.wx-checkbox-input-checked{color: #fff!important; border:1px solid #ff3d3d;background-color: #ff3d3d; border-radius: 50%;}
|
||||
.foot .count-num{margin-left: 75rpx;color:#FF3D3D;}
|
||||
.foot .count-num>text{color:#000000;}
|
||||
.foot .pay-btn{width: 275rpx; height: 99rpx; background-color: #ff3d3d; text-align: center; line-height: 99rpx; color: #fff;}
|
||||
.foot .left-wrapper{flex: 1; align-items: center;}
|
||||
.delete-wrapper{align-items: center; height: 100%;}
|
||||
.delete-wrapper .right-wrapper{width: 370rpx;padding-right: 20rpx; justify-content: space-between;}
|
||||
.delete-wrapper .right-wrapper .collection-btn{width: 175rpx; height: 65rpx; text-align: center; line-height: 65rpx;color: #ff3d3d; border:1px solid #ff3d3d; border-radius: 3px;}
|
||||
.delete-wrapper .right-wrapper .delete-btn{width: 175rpx; height: 65rpx; text-align: center; line-height: 65rpx;color: #999; border:1px solid #999; border-radius: 3px;}
|
||||
|
||||
|
||||
|
||||
@ -1,173 +0,0 @@
|
||||
var app = getApp();
|
||||
// pages/cash/cash.js
|
||||
Page({
|
||||
data: {
|
||||
ooo:'',
|
||||
_num:0,
|
||||
url: app.globalData.urlImages,
|
||||
hiddentap: true,
|
||||
hidde: true,
|
||||
money:'',
|
||||
index:0,
|
||||
array:["请选择银行","招商银行","建设银行","农业银行"]
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad:function (opends) {
|
||||
app.setBarColor();
|
||||
app.setUserInfo();
|
||||
var that = this;
|
||||
this.getUserInfo();
|
||||
this.getUserExtractBank();
|
||||
wx.request({
|
||||
url: app.globalData.url + '/routine/auth_api/minmoney?uid=' + app.globalData.uid,
|
||||
method: 'POST',
|
||||
success: function (res) {
|
||||
that.setData({
|
||||
minmoney: res.data.msg
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
getUserInfo:function(){
|
||||
var that = this;
|
||||
wx.request({
|
||||
url: app.globalData.url + '/routine/auth_api/my?uid=' + app.globalData.uid,
|
||||
method: 'POST',
|
||||
success: function (res) {
|
||||
that.setData({
|
||||
money: res.data.data.now_money
|
||||
})
|
||||
}
|
||||
});
|
||||
},
|
||||
getUserExtractBank:function () {
|
||||
var that = this;
|
||||
wx.request({
|
||||
url: app.globalData.url + '/routine/auth_api/get_user_extract_bank?uid=' + app.globalData.uid,
|
||||
method: 'get',
|
||||
success: function (res) {
|
||||
that.setData({
|
||||
array: res.data.data
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
cardtap:function(e){
|
||||
var flag = this.data.hiddentap;
|
||||
if (flag){
|
||||
this.setData({
|
||||
hiddentap: false
|
||||
})
|
||||
}else{
|
||||
this.setData({
|
||||
hiddentap: true
|
||||
})
|
||||
}
|
||||
},
|
||||
idnumtap: function (e) {
|
||||
this.setData({
|
||||
_num: e.target.dataset.idnum,
|
||||
hiddentap: true
|
||||
})
|
||||
if (e.target.dataset.idnum==1){
|
||||
this.setData({
|
||||
hidde: false
|
||||
})
|
||||
}else{
|
||||
this.setData({
|
||||
hidde: true
|
||||
})
|
||||
}
|
||||
},
|
||||
maskhide:function(e){
|
||||
this.setData({
|
||||
hiddentap: true
|
||||
})
|
||||
},
|
||||
bindPickerChange:function(e){
|
||||
this.setData({
|
||||
index: e.detail.value
|
||||
})
|
||||
},
|
||||
formSubmit:function(e){
|
||||
var header = {
|
||||
// 'content-type': 'application/x-www-form-urlencoded',
|
||||
'cookie': app.globalData.sessionId//读取cookie
|
||||
};
|
||||
var that = this;
|
||||
var flag = true;
|
||||
var warn = "";
|
||||
var minmon = that.data.minmoney;
|
||||
var mymoney = that.data.money;
|
||||
var list={};
|
||||
if (that.data.hidde==true){
|
||||
list.$name = e.detail.value.name;
|
||||
list.cardnum = e.detail.value.cardnum;
|
||||
list.bankname = that.data.array[that.data.index];
|
||||
list.money = e.detail.value.money;
|
||||
list.money = Number(list.money);
|
||||
list.extract_type = 'bank';
|
||||
if (list.$name == "") {
|
||||
warn = "请填写持卡人姓名";
|
||||
} else if (list.cardnum == "") {
|
||||
warn = "请输入银行卡号";
|
||||
} else if (list.bankname == "请选择银行") {
|
||||
warn = "请选择银行";
|
||||
} else if (list.money < minmon) {
|
||||
warn = "请输入正确的金额"
|
||||
} else if (list.money > mymoney) {
|
||||
warn = "您的余额不足"
|
||||
}else {
|
||||
flag = false;
|
||||
}
|
||||
if (flag == true) {
|
||||
wx.showModal({
|
||||
title: '提示',
|
||||
content: warn
|
||||
})
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
list.weixin = e.detail.value.weixin;
|
||||
list.money = e.detail.value.wmoney;
|
||||
list.money = Number(list.money);
|
||||
list.extract_type = 'weixin';
|
||||
if (list.weixin == "") {
|
||||
warn = "请填写微信号";
|
||||
} else if (list.money < minmon) {
|
||||
warn = "请输入正确的金额"
|
||||
} else if (list.money > mymoney) {
|
||||
warn = "您的余额不足"
|
||||
} else {
|
||||
flag = false;
|
||||
}
|
||||
if (flag == true) {
|
||||
wx.showModal({
|
||||
title: '提示',
|
||||
content: warn
|
||||
})
|
||||
return false;
|
||||
}
|
||||
}
|
||||
wx.request({
|
||||
url: app.globalData.url + '/routine/auth_api/user_extract?uid=' + app.globalData.uid,
|
||||
data: { lists: list},
|
||||
method: 'POST',
|
||||
header: header,
|
||||
success: function (res) {
|
||||
that.setData({
|
||||
money: (that.data.money - list.money).toFixed(2)
|
||||
})
|
||||
wx.showToast({
|
||||
title: res.data.msg,
|
||||
icon: 'success',
|
||||
duration: 1500
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
})
|
||||
@ -1 +0,0 @@
|
||||
{"navigationBarTitleText": "提现"}
|
||||
@ -1,32 +0,0 @@
|
||||
<view class='header'>
|
||||
<view class="money flex" bindtap='cardtap'>{{_num==0?"银行卡":"微信钱包"}}<text class='iconfont icon-xialajiantou cashxia'></text></view>
|
||||
<view class='cashdown' hidden='{{hiddentap}}'>
|
||||
<view class='cashdown-li' data-idnum='0' bindtap='idnumtap'><text class='iconfont icon-msnui-card card'></text><text class='cash-text'>银行卡</text><text class='cashdui iconfont {{_num==0?"icon-duihao":""}}'></text></view>
|
||||
<view class='cashdown-li' data-idnum='1' bindtap='idnumtap'><text class='iconfont icon-weixin weixin'></text><text class='cash-text' >微信钱包</text><text class='cashdui iconfont {{_num==1?"icon-duihao":""}}'></text></view>
|
||||
</view>
|
||||
</view>
|
||||
<form bindsubmit="formSubmit">
|
||||
<view class='information' hidden='{{_num==0?false:true}}'>
|
||||
<view class='information-li flex'><label>持卡人</label><input type='text' placeholder-class='placeholder' placeholder='某某人' name="name"/></view>
|
||||
<view class='information-li flex'><label>卡号</label><input type='number' placeholder-class='placeholder' placeholder='请输入银行卡号' name="cardnum"></input></view>
|
||||
<view class='information-li flex'><label>提现金额</label><input type='number' placeholder-class='placeholder' placeholder='最低提现金额为{{minmoney}}' name="money"></input></view>
|
||||
<view class='information-li flex'>
|
||||
<label class='bankname'>银行</label>
|
||||
<picker bindchange="bindPickerChange" value="{{index}}" range="{{array}}">
|
||||
<text class='Bank'>{{array[index]}}</text>
|
||||
<text class='iconfont icon-xiala bankxia'></text>
|
||||
</picker>
|
||||
</view>
|
||||
|
||||
|
||||
</view>
|
||||
<view class='cash' hidden='{{hidde}}' >
|
||||
<view class='cashNum flex'><label>微信号</label><input type='text' placeholder-class='placeholder' placeholder='微信号' name="weixin"></input></view>
|
||||
<view class='cashNum flex'><label>提现金额</label><input type='number' placeholder-class='placeholder' placeholder='最低提现金额为{{minmoney}}' name="wmoney"></input></view>
|
||||
|
||||
</view>
|
||||
<view class='balance'>当前用户余额为{{money}}</view>
|
||||
<button class='but' formType="submit">提现</button>
|
||||
</form>
|
||||
<view class='mask' hidden='{{hiddentap}}' bindtap='maskhide'></view>
|
||||
|
||||
@ -1,22 +0,0 @@
|
||||
.money{height:100rpx;line-height:100rpx;font-size:30rpx;color:#333333;background-color:#FFFFFF;border-bottom:1rpx solid #F4F4F4;justify-content:space-between;padding:0 30rpx;}
|
||||
.cashxia{font-size:50rpx !important;color:#B6B6B6;}
|
||||
.information{width:100%;height:415rpx;background-color:#ffffff;display:block;margin-top:20rpx;}
|
||||
.information-li{height:100rpx;padding:0 30rpx;line-height:100rpx;border-bottom:1rpx solid #F7F7F7;}
|
||||
.information-li label,.cashNum label{width:170rpx;display:inline-block;}
|
||||
.information-li input,.cashNum input{width:100%;height:100%;}
|
||||
.placeholder{color:#B0B0B0;}
|
||||
.cash{width:100%;height:210rpx;background-color:#ffffff;margin-top:20rpx;}
|
||||
.cashNum{padding:0 30rpx;border-bottom:1px solid #EAEAEA;color:#333333;height:100rpx;line-height:100rpx;}
|
||||
.balance{padding:0 30rpx;font-size:24rpx;color:#999999;height:60rpx;line-height:59rpx;}
|
||||
.but{width:690rpx;height:90rpx;line-height:90rpx;text-align:center;background-color:#FF3D3D;color:#ffffff;font-size:32rpx;margin-top:70rpx;}
|
||||
.header{position:relative;z-index:99;}
|
||||
.cashdown{background-color:#ffffff;width:100%;position:absolute;top:100rpx;}
|
||||
.cashdown .cashdown-li{height:83rpx;line-height:83rpx;border-top:1rpx solid #F4F4F4;padding:0 30rpx;color:#666666;position:relative;}
|
||||
.mask{position: fixed;top:0;left:0;bottom:0;right:0;background-color:#000000;opacity:0.6;}
|
||||
.card,.weixin{color:#00A8FF;font-size:40rpx;position:absolute;top:1rpx;}
|
||||
.cashdui{color:#FF3D3D;font-size:36rpx;float:right;}
|
||||
.weixin{color:#3BAF34;}
|
||||
.cash-text{margin-left:58rpx;}
|
||||
.Bank{color:#808080;display:inline-block;width:510rpx;}
|
||||
.bankxia{float:right;font-size:45rpx;color:#999999;}
|
||||
.bankname{width:137rpx !important;}
|
||||
@ -1,70 +0,0 @@
|
||||
var app = getApp();
|
||||
// pages/collect/collect.js
|
||||
Page({
|
||||
data: {
|
||||
url: app.globalData.urlImages,
|
||||
sum:'',
|
||||
Arraylist:[]
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
app.setBarColor();
|
||||
app.setUserInfo();
|
||||
this.getcollect();
|
||||
},
|
||||
getcollect:function(){
|
||||
var that = this;
|
||||
var header = {
|
||||
'content-type': 'application/x-www-form-urlencoded',
|
||||
}
|
||||
wx.request({
|
||||
url: app.globalData.url + '/routine/auth_api/get_user_collect_product?uid=' + app.globalData.uid,
|
||||
method: 'GET',
|
||||
header: header,
|
||||
success: function (res) {
|
||||
if (res.data.code==200){
|
||||
that.setData({
|
||||
sum: res.data.data.length,
|
||||
Arraylist: res.data.data
|
||||
})
|
||||
}else{
|
||||
// console.log(res);
|
||||
that.setData({
|
||||
sum: 0,
|
||||
Arraylist: []
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady: function () {
|
||||
|
||||
},
|
||||
del:function(e){
|
||||
var that=this;
|
||||
var id = e.target.dataset.id;
|
||||
console.log(id);
|
||||
var header = {
|
||||
'content-type': 'application/x-www-form-urlencoded',
|
||||
};
|
||||
wx.request({
|
||||
url: app.globalData.url + '/routine/auth_api/get_user_collect_product_del?uid=' + app.globalData.uid,
|
||||
data:{pid:id},
|
||||
method: 'GET',
|
||||
header: header,
|
||||
success: function (res) {
|
||||
if (res.data.code == 200){
|
||||
that.getcollect();
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
})
|
||||
@ -1 +0,0 @@
|
||||
{"navigationBarTitleText": "我的收藏"}
|
||||
@ -1,26 +0,0 @@
|
||||
<view class="collect">
|
||||
<view class='collect-title'>您收藏了<text class='title-num'>{{sum}}</text>件商品</view>
|
||||
<view class='collect-ul'>
|
||||
<block wx:for="{{Arraylist}}">
|
||||
|
||||
<view class='collect-li flex'>
|
||||
<navigator url="/pages/product-con/index?id={{item.pid}}" hover-class="none">
|
||||
<view class='images'>
|
||||
<image src='{{url}}{{item.image}}'></image>
|
||||
<!-- <text class='imagebg'></text> -->
|
||||
</view>
|
||||
</navigator>
|
||||
<view class='li-right'>
|
||||
<view class='text'>{{item.store_name}}</view>
|
||||
<view class='conter'>销量:{{item.sales}}</view>
|
||||
<view class='money flex'>
|
||||
<view class='money-view on'>¥<text class='moneyNum'>{{item.price}}</text></view>
|
||||
<view data-id="{{item.pid}}" class='iconfont icon-shanchu del' bindtap='del'></view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
@ -1,254 +0,0 @@
|
||||
// pages/comment-con/comment-con.js
|
||||
var app = getApp();
|
||||
var wxh = require('../../utils/wxh.js');
|
||||
Page({
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
xinghidden:true,
|
||||
xinghidden2:true,
|
||||
xinghidden3: true,
|
||||
url: '',
|
||||
hidden:false,
|
||||
unique:'',
|
||||
uni:'',
|
||||
dataimg:[]
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (e) {
|
||||
app.setBarColor();
|
||||
app.setUserInfo();
|
||||
var header = {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
};
|
||||
var that = this;
|
||||
if (e.unique) {
|
||||
var unique = e.unique;
|
||||
that.setData({
|
||||
unique: unique,
|
||||
});
|
||||
}
|
||||
if (e.uni){
|
||||
that.setData({
|
||||
uni: e.uni
|
||||
});
|
||||
}
|
||||
wx.showLoading({ title: "正在加载中……" });
|
||||
wx.request({
|
||||
url: app.globalData.url + '/routine/auth_api/get_order_product?uid=' + app.globalData.uid,
|
||||
data: { unique: unique},
|
||||
method: 'get',
|
||||
header: header,
|
||||
success: function (res) {
|
||||
wx.hideLoading();
|
||||
that.setData({
|
||||
ordercon: res.data.data
|
||||
});
|
||||
},
|
||||
fail: function (res) {
|
||||
console.log('submit fail');
|
||||
},
|
||||
complete: function (res) {
|
||||
console.log('submit complete');
|
||||
}
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady: function () {
|
||||
|
||||
},
|
||||
tapxing:function(e){
|
||||
var index = e.target.dataset.index;
|
||||
this.setData({
|
||||
xinghidden: false,
|
||||
xing: index
|
||||
})
|
||||
},
|
||||
tapxing2: function (e) {
|
||||
var index = e.target.dataset.index;
|
||||
this.setData({
|
||||
xinghidden2: false,
|
||||
xing2: index
|
||||
})
|
||||
},
|
||||
tapxing3: function (e) {
|
||||
var index = e.target.dataset.index;
|
||||
this.setData({
|
||||
xinghidden3: false,
|
||||
xing3: index
|
||||
})
|
||||
},
|
||||
delImages:function(e){
|
||||
var that = this;
|
||||
var dataimg = that.data.dataimg;
|
||||
var index = e.currentTarget.dataset.id;
|
||||
dataimg.splice(index,1);
|
||||
that.setData({
|
||||
dataimg: dataimg
|
||||
})
|
||||
|
||||
},
|
||||
uploadpic:function(e){
|
||||
var that = this;
|
||||
wx.chooseImage({
|
||||
count: 1, //最多可以选择的图片总数
|
||||
sizeType: ['compressed'], // 可以指定是原图还是压缩图,默认二者都有
|
||||
sourceType: ['album', 'camera'], // 可以指定来源是相册还是相机,默认二者都有
|
||||
success: function (res) {
|
||||
// 返回选定照片的本地文件路径列表,tempFilePath可以作为img标签的src属性显示图片
|
||||
var tempFilePaths = res.tempFilePaths;
|
||||
//启动上传等待中...
|
||||
wx.showLoading({
|
||||
title: '图片上传中',
|
||||
})
|
||||
var len = tempFilePaths.length;
|
||||
for (var i = 0; i < len; i++) {
|
||||
wx.uploadFile({
|
||||
url: app.globalData.url + '/routine/auth_api/upload?uid=' + app.globalData.uid,
|
||||
filePath: tempFilePaths[i],
|
||||
name: 'pics',
|
||||
formData: {
|
||||
'filename': 'pics'
|
||||
},
|
||||
header: {
|
||||
"Content-Type": "multipart/form-data"
|
||||
},
|
||||
success: function (res) {
|
||||
wx.hideLoading();
|
||||
if(res.statusCode == 403){
|
||||
wx.showToast({
|
||||
title: res.data,
|
||||
icon: 'none',
|
||||
duration: 1500,
|
||||
})
|
||||
} else {
|
||||
var data = JSON.parse(res.data);
|
||||
data.data.url = app.globalData.url + data.data.url;
|
||||
that.data.dataimg.push(data);
|
||||
that.setData({
|
||||
dataimg: that.data.dataimg
|
||||
});
|
||||
var len2 = that.data.dataimg.length;
|
||||
if (len2 >= 8) {
|
||||
that.setData({
|
||||
hidden: true
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
fail: function (res) {
|
||||
wx.showToast({
|
||||
title: '上传图片失败',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
formSubmit:function(e){
|
||||
var header = {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
};
|
||||
var that = this;
|
||||
var unique = that.data.unique;
|
||||
var comment = e.detail.value.comment;
|
||||
var product_score = that.data.xing;
|
||||
var service_score = that.data.xing2;
|
||||
var pics = [];
|
||||
var dataimg = that.data.dataimg;
|
||||
for (var i = 0; i < dataimg.length;i++){
|
||||
pics.push(that.data.url+dataimg[i].data.url)
|
||||
};
|
||||
if (comment==""){
|
||||
wx.showToast({
|
||||
title: '请填写你对宝贝的心得!',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
return false;
|
||||
}
|
||||
wx.showLoading({ title: "正在发布评论……" });
|
||||
wx.request({
|
||||
url: app.globalData.url + '/routine/auth_api/user_comment_product?uid=' + app.globalData.uid+'&unique=' + unique,
|
||||
data: {comment: comment, product_score: product_score, service_score: service_score, pics: pics},
|
||||
method: 'post',
|
||||
header: header,
|
||||
success: function (res) {
|
||||
wx.hideLoading();
|
||||
if (res.data.code==200){
|
||||
wx.showToast({
|
||||
title: '评价成功',
|
||||
icon: 'success',
|
||||
duration: 1000
|
||||
})
|
||||
setTimeout(function(){
|
||||
wx.navigateTo({
|
||||
url: '/pages/orders-con/orders-con?order_id='+that.data.uni,
|
||||
})
|
||||
},1200)
|
||||
}else{
|
||||
wx.showToast({
|
||||
title: res.data.msg,
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
}
|
||||
},
|
||||
fail: function (res) {
|
||||
console.log('submit fail');
|
||||
},
|
||||
complete: function (res) {
|
||||
console.log('submit complete');
|
||||
}
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage: function () {
|
||||
|
||||
}
|
||||
})
|
||||
@ -1,3 +0,0 @@
|
||||
{
|
||||
"navigationBarTitleText": "评论页面"
|
||||
}
|
||||
@ -1,60 +0,0 @@
|
||||
<view class="commcon">
|
||||
<view class='commcon-header flex'>
|
||||
<view class='commcon-pic'><image src='{{url}}{{ordercon.cart_info.productInfo.image}}'></image></view>
|
||||
<view class='commcon-con flex'>
|
||||
<view class='commcon-name'>{{ordercon.cart_info.productInfo.store_name}}</view>
|
||||
<view class='commcon-text'>{{ordercon.cart_info.productInfo.store_name}}</view>
|
||||
<view class='commcon-money'><text>¥</text>{{ordercon.cart_info.productInfo.price}}<text></text><text class='commcon-num'>x{{ordercon.cart_info.cart_num}}</text></view>
|
||||
</view>
|
||||
</view>
|
||||
<form bindsubmit="formSubmit">
|
||||
<view class='commcon-ping'>
|
||||
<textarea placeholder='宝贝满足你的期待么?说说你的想法,分享给想买的他们吧~' placeholder-class='placeholder' name = 'comment'></textarea>
|
||||
<view class='imgul'>
|
||||
<block wx:for="{{dataimg}}">
|
||||
<view class='imgpic'>
|
||||
<image src='{{item.data.url}}' class='dataimg'></image>
|
||||
<icon class='iconfont icon-guanbi guanbi' data-id='{{index}}' bindtap='delImages'></icon>
|
||||
</view>
|
||||
</block>
|
||||
<view class='upimg' bindtap='uploadpic' hidden='{{hidden}}'></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class='commcon-ul flex'>
|
||||
<view class='commcon-li flex'>
|
||||
<text class='li-lien'>商品质量</text>
|
||||
<view class='commconxing li-lien'>
|
||||
<icon bindtap='tapxing' data-index='1' class='iconfont icon-pingjia {{xing>=1?"icon-xingxing1":""}}'></icon>
|
||||
<icon bindtap='tapxing' data-index='2' class='iconfont icon-pingjia {{xing>=2?"icon-xingxing1":""}}'></icon>
|
||||
<icon bindtap='tapxing' data-index='3' class='iconfont icon-pingjia {{xing>=3?"icon-xingxing1":""}}'></icon>
|
||||
<icon bindtap='tapxing' data-index='4' class='iconfont icon-pingjia {{xing>=4?"icon-xingxing1":""}}'></icon>
|
||||
<icon bindtap='tapxing' data-index='5' class='iconfont icon-pingjia {{xing>=5?"icon-xingxing1":""}}'></icon>
|
||||
</view>
|
||||
<text class='li-lien li-lien3' hidden='{{xinghidden}}'>{{xing}}分</text>
|
||||
</view>
|
||||
<view class='commcon-li flex'>
|
||||
<text class='li-lien'>服务态度</text>
|
||||
<view class='commconxing li-lien'>
|
||||
<icon bindtap='tapxing2' data-index='1' class='iconfont icon-pingjia {{xing2>=1?"icon-xingxing1":""}}'></icon>
|
||||
<icon bindtap='tapxing2' data-index='2' class='iconfont icon-pingjia {{xing2>=2?"icon-xingxing1":""}}'></icon>
|
||||
<icon bindtap='tapxing2' data-index='3' class='iconfont icon-pingjia {{xing2>=3?"icon-xingxing1":""}}'></icon>
|
||||
<icon bindtap='tapxing2' data-index='4' class='iconfont icon-pingjia {{xing2>=4?"icon-xingxing1":""}}'></icon>
|
||||
<icon bindtap='tapxing2' data-index='5' class='iconfont icon-pingjia {{xing2>=5?"icon-xingxing1":""}}'></icon>
|
||||
</view>
|
||||
<text class='li-lien li-lien3' hidden='{{xinghidden2}}'>{{xing2}}分</text>
|
||||
</view>
|
||||
<!-- <view class='commcon-li flex'>
|
||||
<text class='li-lien'>物流服务</text>
|
||||
<view class='commconxing li-lien'>
|
||||
<icon bindtap='tapxing3' data-index='1' class='iconfont icon-pingjia {{xing3>=1?"icon-xingxing1":""}}'></icon>
|
||||
<icon bindtap='tapxing3' data-index='2' class='iconfont icon-pingjia {{xing3>=2?"icon-xingxing1":""}}'></icon>
|
||||
<icon bindtap='tapxing3' data-index='3' class='iconfont icon-pingjia {{xing3>=3?"icon-xingxing1":""}}'></icon>
|
||||
<icon bindtap='tapxing3' data-index='4' class='iconfont icon-pingjia {{xing3>=4?"icon-xingxing1":""}}'></icon>
|
||||
<icon bindtap='tapxing3' data-index='5' class='iconfont icon-pingjia {{xing3>=5?"icon-xingxing1":""}}'></icon>
|
||||
</view>
|
||||
<text class='li-lien li-lien3' hidden='{{xinghidden3}}'>{{xing3}}分</text>
|
||||
</view> -->
|
||||
</view>
|
||||
<button class='commcon-btn' formType="submit">发布评论</button>
|
||||
</form>
|
||||
</view>
|
||||
@ -1,190 +0,0 @@
|
||||
|
||||
var app = getApp();
|
||||
// pages/comment/comment.js
|
||||
Page({
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
url: app.globalData.urlImages,
|
||||
comm:1,
|
||||
productId:'',
|
||||
uinfo:[],
|
||||
alllength:'',
|
||||
newlength:'',
|
||||
piclength:''
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
app.setBarColor();
|
||||
app.setUserInfo();
|
||||
var productId = options.productId;
|
||||
this.setData({
|
||||
productId: productId
|
||||
})
|
||||
this.comment();
|
||||
this.alllen();
|
||||
this.newlen();
|
||||
this.piclen();
|
||||
},
|
||||
alllen:function(){
|
||||
var that = this;
|
||||
var productId = that.data.productId;
|
||||
var filter='all';
|
||||
wx.request({
|
||||
url: app.globalData.url + '/routine/auth_api/product_reply_list?uid=' + app.globalData.uid,
|
||||
data: { productId: productId, filter: filter },
|
||||
method: 'GET',
|
||||
success: function (res) {
|
||||
if (res.data.code == 200) {
|
||||
that.setData({
|
||||
alllength: res.data.data.length
|
||||
})
|
||||
} else {
|
||||
that.setData({
|
||||
alllength: ''
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
newlen: function () {
|
||||
var that = this;
|
||||
var productId = that.data.productId;
|
||||
var filter = 'new';
|
||||
wx.request({
|
||||
url: app.globalData.url + '/routine/auth_api/product_reply_list?uid=' + app.globalData.uid,
|
||||
data: { productId: productId, filter: filter },
|
||||
method: 'GET',
|
||||
success: function (res) {
|
||||
if (res.data.code == 200) {
|
||||
that.setData({
|
||||
newlength: res.data.data.length
|
||||
})
|
||||
} else {
|
||||
that.setData({
|
||||
newlength: ''
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
piclen: function () {
|
||||
var that = this;
|
||||
var productId = that.data.productId;
|
||||
var filter = 'pic';
|
||||
wx.request({
|
||||
url: app.globalData.url + '/routine/auth_api/product_reply_list?uid=' + app.globalData.uid,
|
||||
data: { productId: productId, filter: filter },
|
||||
method: 'GET',
|
||||
success: function (res) {
|
||||
if (res.data.code == 200) {
|
||||
that.setData({
|
||||
piclength: res.data.data.length
|
||||
})
|
||||
} else {
|
||||
that.setData({
|
||||
piclength: ''
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
comment: function (){
|
||||
var that=this;
|
||||
var comm = that.data.comm;
|
||||
var filter='';
|
||||
if (comm==1){
|
||||
filter = 'all';
|
||||
} else if (comm == 2){
|
||||
filter = 'new';
|
||||
} else if (comm == 3) {
|
||||
filter = 'pic';
|
||||
} else{
|
||||
return false;
|
||||
}
|
||||
var productId = that.data.productId;
|
||||
wx.request({
|
||||
url: app.globalData.url + '/routine/auth_api/product_reply_list?uid=' + app.globalData.uid,
|
||||
data: { productId: productId, filter: filter},
|
||||
method: 'GET',
|
||||
success: function (res) {
|
||||
if(res.data.code==200){
|
||||
that.setData({
|
||||
uinfo: res.data.data,
|
||||
replyCount: res.data.data.length
|
||||
})
|
||||
}else{
|
||||
that.setData({
|
||||
uinfo: [],
|
||||
replyCount:''
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady: function () {
|
||||
|
||||
},
|
||||
commentap:function(e){
|
||||
var index = e.target.dataset.index;
|
||||
this.setData({
|
||||
comm: index
|
||||
})
|
||||
this.comment();
|
||||
},
|
||||
getImagePreview:function(e){//图片预览
|
||||
wx.previewImage({
|
||||
current: e.currentTarget.dataset.image, // 当前显示图片的http链接
|
||||
urls: e.currentTarget.dataset.images // 需要预览的图片http链接列表
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage: function () {
|
||||
|
||||
}
|
||||
})
|
||||
@ -1,3 +0,0 @@
|
||||
{
|
||||
"navigationBarTitleText": "评论列表"
|
||||
}
|
||||
@ -1,24 +0,0 @@
|
||||
<view class="comment">
|
||||
<view class='comment-header'>
|
||||
<text data-index='1' class='{{comm == 1?"comment-on":""}}' bindtap='commentap'>全部({{alllength}})</text>
|
||||
<text data-index='2' class='{{comm == 2?"comment-on":""}}' bindtap='commentap'>最新({{newlength}})</text>
|
||||
<text data-index='3' class='{{comm == 3?"comment-on":""}}' bindtap='commentap'>有图({{piclength}})</text>
|
||||
<!-- <text data-index='4' class='header-cha {{comm == 4?"comment-on":""}}' bindtap='commentap'>差评(2)</text> -->
|
||||
</view>
|
||||
<view class='comment-ul'>
|
||||
|
||||
<view class='comment-li' wx:for="{{uinfo}}">
|
||||
<view class='li-view1'><image src='{{item.avatar}}' class='li-pic li-title'></image><text class='li-title'>{{item.nickname}}</text><view class='start star{{item.star}} li-title'></view></view>
|
||||
<view class='li-text'>{{item.comment}}</view>
|
||||
<view class='flex flex-pic'>
|
||||
<block wx:for="{{item.pics}}" wx:for-item="items">
|
||||
<image src='{{items}}' class='li-pic2' bindtap='getImagePreview' data-image="{{items}}" data-images="{{item.pics}}"></image>
|
||||
</block>
|
||||
</view>
|
||||
<view class='li-time'><text>{{item.add_time}}</text>
|
||||
<text>{{item.suk}}</text>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
@ -1,15 +0,0 @@
|
||||
.comment .comment-header{height:100rpx;line-height:100rpx;background-color:#fff;padding:0 20rpx;}
|
||||
.comment .comment-header text{height:56rpx;padding:0 18rpx;font-size:24rpx;color:#666666;background-color:#FFE7E7;margin-right:15rpx;display:inline-block;border-radius:50rpx;line-height:56rpx;}
|
||||
.comment .header-cha{background-color:#F5F5F5!important;}
|
||||
.comment .comment-ul{margin-top:2rpx;}
|
||||
.comment .comment-li{background-color:#fff;margin-bottom:10rpx;}
|
||||
.comment .li-view1{padding:20rpx 20rpx 29rpx 20rpx;}
|
||||
.comment .li-view1 .li-title{display:inline-block;vertical-align:middle;margin-right:12rpx;font-size:28rpx;color:#000000;}
|
||||
.comment .li-pic{width:57rpx;height:57rpx;border-radius:50%;}
|
||||
.comment .li-text{font-size:26rpx;color:#000000;padding:0 20rpx;}
|
||||
.comment .li-time{margin-top:23rpx;font-size:24rpx;color:#888888;padding:0 20rpx 30rpx 20rpx;}
|
||||
.comment .li-time text{margin-right:15rpx;}
|
||||
.comment .flex-pic{flex-wrap:wrap;justify-content:flex-start;padding:0!important;}
|
||||
.comment .li-pic2{width:163rpx;height:163rpx;margin-top:23rpx;margin-left:20rpx;
|
||||
}
|
||||
.comment-on{background-color:#FF3D3D!important;color:#fff!important;}
|
||||
@ -1,134 +0,0 @@
|
||||
// pages/coupon/coupon.js
|
||||
// var fileData = require('../../utils/util.js'); //暴露的接口;
|
||||
var app = getApp();
|
||||
Page({
|
||||
data: {
|
||||
_active:0,
|
||||
headerArray: ['可领取'],
|
||||
couponArray:"",
|
||||
userstatus:"",
|
||||
title: '加载中...',
|
||||
cartId:'',
|
||||
pinkId:'',
|
||||
addressId:'',
|
||||
totalPrice:''
|
||||
},
|
||||
headertap:function(e){
|
||||
this.setData({
|
||||
_active: e.target.dataset.idx
|
||||
});
|
||||
},
|
||||
onLoad: function (options) {
|
||||
app.setBarColor();
|
||||
app.setUserInfo();
|
||||
if (options.cartId){
|
||||
this.setData({
|
||||
cartId: options.cartId,
|
||||
totalPrice: options.totalPrice,
|
||||
pinkId: options.pinkId,
|
||||
addressId: options.addressId,
|
||||
})
|
||||
this.getCouponOrderList();
|
||||
}else {
|
||||
this.getCouponList();
|
||||
}
|
||||
},
|
||||
getCouponUser:function(e){
|
||||
// e.currentTarget.dataset.id;
|
||||
var that = this;
|
||||
var id = e.currentTarget.dataset.id;
|
||||
if (that.data.cartId) {
|
||||
var cartId = that.data.cartId;
|
||||
var totalPrice = that.data.totalPrice;
|
||||
var addressId = that.data.addressId;
|
||||
var pinkId = that.data.pinkId;
|
||||
that.setData({
|
||||
cartId:'',
|
||||
totalPrice:'',
|
||||
addressId:'',
|
||||
pinkId:'',
|
||||
})
|
||||
wx.navigateTo({ //跳转至指定页面并关闭其他打开的所有页面(这个最好用在返回至首页的的时候)
|
||||
url: '/pages/order-confirm/order-confirm?id=' + cartId + '&couponId=' + id + '&addressId=' + addressId + '&pinkId=' + pinkId
|
||||
})
|
||||
} else {
|
||||
var header = {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
};
|
||||
wx.request({
|
||||
url: app.globalData.url + '/routine/auth_api/user_get_coupon?uid=' + app.globalData.uid,
|
||||
method: 'POST',
|
||||
header: header,
|
||||
data: {
|
||||
couponId: id
|
||||
},
|
||||
success: function (res) {
|
||||
var array = that.data.couponArray;
|
||||
if (res.data.code == 200) {
|
||||
for (var i in array) {
|
||||
if (array[i].id == id) {
|
||||
array[i].is_use = true;
|
||||
}
|
||||
}
|
||||
that.setData({
|
||||
couponArray: array
|
||||
})
|
||||
wx.showToast({
|
||||
title: '领取成功',
|
||||
icon: 'success',
|
||||
duration: 1500
|
||||
})
|
||||
} else {
|
||||
wx.showToast({
|
||||
title: res.data.msg,
|
||||
icon: 'none',
|
||||
duration: 1500
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
getCouponOrderList:function(){
|
||||
var that = this;
|
||||
var that = this;
|
||||
wx.request({
|
||||
url: app.globalData.url + '/routine/auth_api/get_use_coupon_order?uid=' + app.globalData.uid,
|
||||
method: 'GET',
|
||||
data: {
|
||||
totalPrice: that.data.totalPrice
|
||||
},
|
||||
success: function (res) {
|
||||
that.setData({
|
||||
userstatus: '立即使用',
|
||||
couponArray: res.data.data,
|
||||
title: "没有数据了",
|
||||
loadinghidden: true
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
getCouponList:function(){
|
||||
var that = this;
|
||||
var header = {
|
||||
'content-type': 'application/x-www-form-urlencoded'
|
||||
};
|
||||
var that = this;
|
||||
wx.request({
|
||||
url: app.globalData.url + '/routine/auth_api/get_issue_coupon_list?uid=' + app.globalData.uid,
|
||||
method: 'POST',
|
||||
header: header,
|
||||
data: {
|
||||
limit: 10
|
||||
},
|
||||
success: function (res) {
|
||||
that.setData({
|
||||
userstatus: '立即领取',
|
||||
couponArray: res.data.data,
|
||||
title: "没有数据了",
|
||||
loadinghidden: true
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
@ -1,19 +0,0 @@
|
||||
{"navigationBarTitleText": "优惠券",
|
||||
"list": [
|
||||
{
|
||||
"term": "满1000元使用",
|
||||
"time": "2017/09/26至2017/10/26使用",
|
||||
"money": "500"
|
||||
},
|
||||
{
|
||||
"term": "满1000元使用",
|
||||
"time": "2017/09/26至2017/10/26使用",
|
||||
"money": "500"
|
||||
},
|
||||
{
|
||||
"term": "满1000元使用",
|
||||
"time": "2017/09/26至2017/10/26使用",
|
||||
"money": "500"
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -1,21 +0,0 @@
|
||||
<!-- <view class="header-ul flex"> -->
|
||||
<!-- <block wx:for="{{headerArray}}">
|
||||
<view data-idx='{{index}}' class='header-li {{_active==index?"active":""}}' bindtap='headertap'>{{item}}</view>
|
||||
</block> -->
|
||||
<!-- </view> -->
|
||||
<view class='coupon-ul'>
|
||||
<block wx:for="{{couponArray}}">
|
||||
<view class='coupon-li flex {{item.is_use?"coupon-use":""}}' bindtap='getCouponUser' data-id="{{item.id}}">
|
||||
<view class='coupon-text {{item.is_use?"use-text":""}}'>
|
||||
<view class='coupon-term'>满{{item.use_min_price}}元使用</view>
|
||||
<!-- <view class='coupon-time'>{{item.add_time}}至{{item.end_time}}使用</view> -->
|
||||
</view>
|
||||
<view class='coupon-text2'>
|
||||
<view class='coupon-money'>¥<text class='coupon-num'>{{item.coupon_price}}</text></view>
|
||||
<view class='coupon-but use-but' wx:if="{{item.is_use}}">已领取</view>
|
||||
<view class='coupon-but ' wx:else>{{userstatus}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
<view class='loading flex'><text class='loadingpic iconfont icon-jiazaizhong' hidden='{{loadinghidden}}'></text><text>{{title}}</text></view>
|
||||
@ -1,86 +0,0 @@
|
||||
var app = getApp();
|
||||
// pages/coupon/coupon.js
|
||||
// var fileData = require('../../utils/util.js'); //暴露的接口;
|
||||
Page({
|
||||
data: {
|
||||
url: app.globalData.urlImages,
|
||||
_active:0,
|
||||
headerArray: ['全部', '未使用', '已使用','已过期'],
|
||||
couponArray:"",
|
||||
userstatus:"",
|
||||
title:"正在加载中..."
|
||||
|
||||
},
|
||||
headertaps:function(e){
|
||||
this.setData({
|
||||
_active: e.target.dataset.idx
|
||||
});
|
||||
},
|
||||
onLoad: function (options) {
|
||||
app.setBarColor();
|
||||
app.setUserInfo();
|
||||
var header = {
|
||||
'content-type': 'application/x-www-form-urlencoded',
|
||||
};
|
||||
var that = this;
|
||||
//flag = 1{0表示正常,1未使用,2已使用,3已过期,4新增券}
|
||||
var flag = this.data._active;
|
||||
setTimeout(function(){
|
||||
wx.request({
|
||||
url: app.globalData.url + '/routine/auth_api/get_use_coupons?uid=' + app.globalData.uid,
|
||||
data:{types:0},
|
||||
method: 'GET',
|
||||
header: header,
|
||||
success: function (res) {
|
||||
if (res.data.code==200){
|
||||
that.setData({
|
||||
couponArray: res.data.data,
|
||||
title: "没有数据了",
|
||||
loadinghidden: true
|
||||
})
|
||||
} else{
|
||||
that.setData({
|
||||
couponArray: [],
|
||||
title: "没有数据了",
|
||||
loadinghidden: false
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},1000)
|
||||
},
|
||||
headertap:function(e){
|
||||
var that = this;
|
||||
// console.log(e);
|
||||
var header = {
|
||||
'content-type': 'application/x-www-form-urlencoded',
|
||||
};
|
||||
var $type=e.target.dataset.idx
|
||||
wx.request({
|
||||
url: app.globalData.url + '/routine/auth_api/get_use_coupons?uid=' + app.globalData.uid,
|
||||
data: {types:$type},
|
||||
method: 'GET',
|
||||
header: header,
|
||||
success: function (res) {
|
||||
if (res.data.code==200){
|
||||
that.setData({
|
||||
couponArray: res.data.data,
|
||||
title: "没有数据了",
|
||||
loadinghidden: true,
|
||||
_active: $type
|
||||
})
|
||||
}else{
|
||||
that.setData({
|
||||
couponArray: [],
|
||||
title: "没有数据了",
|
||||
loadinghidden: false,
|
||||
_active: ''
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
})
|
||||
@ -1,19 +0,0 @@
|
||||
{"navigationBarTitleText": "优惠券",
|
||||
"list": [
|
||||
{
|
||||
"term": "满1000元使用",
|
||||
"time": "2017/09/26至2017/10/26使用",
|
||||
"money": "500"
|
||||
},
|
||||
{
|
||||
"term": "满1000元使用",
|
||||
"time": "2017/09/26至2017/10/26使用",
|
||||
"money": "500"
|
||||
},
|
||||
{
|
||||
"term": "满1000元使用",
|
||||
"time": "2017/09/26至2017/10/26使用",
|
||||
"money": "500"
|
||||
}
|
||||
]
|
||||
}
|
||||
@ -1,27 +0,0 @@
|
||||
<view class="header-ul flex">
|
||||
<block wx:for="{{headerArray}}">
|
||||
<view data-idx='{{index}}' class='header-li {{_active==index?"active":""}}' bindtap='headertap'>{{item}}</view>
|
||||
</block>
|
||||
<!-- <view class='header-li active'>全部</view> -->
|
||||
<!-- <view class='header-li'>未使用</view>
|
||||
<view class='header-li'>已使用</view>
|
||||
<view class='header-li'>已过期</view> -->
|
||||
</view>
|
||||
<view class='coupon-ul'>
|
||||
<block wx:for="{{couponArray}}">
|
||||
<view class='coupon-li flex {{(item.status==1||item.status==2)?"coupon-use":""}}'>
|
||||
<view class='coupon-text {{(!item.status)?"use-text":""}}'>
|
||||
<view class='coupon-term'>满{{item.use_min_price}}元使用</view>
|
||||
<view class='coupon-time'>{{item.add_time}}至{{item.end_time}}使用</view>
|
||||
</view>
|
||||
<view class='coupon-text2'>
|
||||
<view class='coupon-money'>¥<text class='coupon-num'>{{item.coupon_price}}</text></view>
|
||||
<view class='coupon-but {{(item.status==1||item.status==-1)?"use-but":""}}' wx:if="{{item.status==0}}" >未使用</view>
|
||||
<view class='coupon-but {{(item.status==1||item.status==-1)?"coupon-use":""}}' wx:if="{{item.status==1}}" >已使用</view>
|
||||
<view class='coupon-but {{(item.status==1||item.status==-1)?"use-text":""}}' wx:if="{{item.status==2}}" >已过期</view>
|
||||
</view>
|
||||
<view class='{{item.status==0?"coupon-new":""}}'></view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
<view class='loading flex'><text class='loadingpic iconfont icon-jiazaizhong' hidden='{{loadinghidden}}'></text><text>{{title}}</text></view>
|
||||
@ -1,39 +0,0 @@
|
||||
<view class="catlist">
|
||||
<image src='{{url}}{{lovely.img}}'></image>
|
||||
</view>
|
||||
<view class="catlist-nav flex">
|
||||
<image src='{{url}}{{titleImage.banner}}'></image>
|
||||
<view class="catlist-list">
|
||||
<swiper autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}" indicator-active-color="{{indicatorActivecolor}}" vertical="{{ vertical}}" circular="{{circular}}">
|
||||
<block wx:for="{{title}}">
|
||||
<swiper-item>
|
||||
<view>{{item.info}}</view>
|
||||
</swiper-item>
|
||||
</block>
|
||||
</swiper>
|
||||
</view>
|
||||
</view>
|
||||
<view class='catlist-ul flex'>
|
||||
<view class='catlist-li' wx:for="{{cutList}}" wx:for-item="item" data-id="{{item.id}}" bindtap='cut'>
|
||||
<image src='{{url}}{{item.image}}' class='li-pic'></image>
|
||||
<view class='catlist-text line' >{{item.title}}</view>
|
||||
<view class='text-color'>
|
||||
<view>最低
|
||||
<text class='color-num'>¥{{item.min_price}}</text>
|
||||
<view class='none-num'>原价¥{{item.price}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class='pic-list flex'>
|
||||
<!-- <view class='pic-con'>
|
||||
<block wx:for="{{item.userInfo}}" wx:for-item="items" wx:if="{{index < 2}}">
|
||||
<image src='{{items}}'></image>
|
||||
</block>
|
||||
<view class='pic-dai'>...</view>
|
||||
</view> -->
|
||||
<text>{{item.userInfoCount}}人正在参加</text>
|
||||
<view class='color-but'>去砍价</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
<include src="/pages/home/home.wxml"/>
|
||||
@ -1,128 +0,0 @@
|
||||
<view class='bg'></view>
|
||||
<view class="cut-one">
|
||||
<view class='cutone-bg'>
|
||||
<view class='cutone-header'>{{count.lookCount}}<text>人查看</text>{{count.shareCount}}<text>人分享</text>{{count.userCount}}<text>人参与</text></view>
|
||||
<view class='cutone-guize' bindtap='rules'>
|
||||
<view class='guize-huo'>活动</view>
|
||||
<view>规则</view>
|
||||
</view>
|
||||
<view class='cutone-time'>活动结束倒计时<!--<text>{{countDownDay}}</text>天 --><text>{{countDownHour}}</text>时<text>{{countDownMinute}}</text>分<text>{{countDownSecond}}</text>秒</view>
|
||||
</view>
|
||||
<view class='cutone-padding'>
|
||||
<view class='cutone-k'>
|
||||
<view class='cutone-write'>
|
||||
<image src='{{url}}{{product.image}}'></image>
|
||||
<view class='write-text line2'>{{product.title}}</view>
|
||||
<view class='flex write-money'>
|
||||
<view class='write-num'>最低¥<text>{{product.min_price}}</text></view>
|
||||
<view class='write-yuan'>原价¥{{product.price}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 参与砍价 -->
|
||||
<!-- <view class='cutone-but' bindtap='setBargain' wx:if="{{!status}}">立即参与</view> -->
|
||||
<!--砍价进行中 -->
|
||||
<view class='cutone-cut' wx:if="{{status == 1}}">已有<text>{{HelpCount}}</text>位好友成功帮您砍价</view>
|
||||
<view class='cutone-pro' wx:if="{{status == 1}}">距离目标还有{{HelpPrice}}元</view>
|
||||
<!-- 进度条 -->
|
||||
<view class="progress compressing" wx:if="{{status == 1}}"><view class="bar" style="width: {{pricePercent}}%;"></view></view>
|
||||
<view class='flex pro-money' wx:if="{{status == 1}}">
|
||||
<view class='price-y'>
|
||||
<view>原价</view>
|
||||
<view>¥{{product.price}}</view>
|
||||
</view>
|
||||
<view class='price-m'>
|
||||
<view>目标</view>
|
||||
<view>¥{{product.min_price}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<button class='cutone-but' wx:if="{{status == 1}}" open-type='share'>喊好友帮砍一刀</button>
|
||||
<!--帮好友砍价进行中 -->
|
||||
<view class='cutfried flex' wx:if="{{status == 2}}"><image src='/images/banner1.jpg'></image><text>{{bargainUserInfo.nickname}} 邀请您帮忙砍价</text></view>
|
||||
<view class='cutone-pro' wx:if="{{status == 2}}">距离目标还有{{HelpPrice}}元</view>
|
||||
<!-- 进度条 -->
|
||||
<view class="progress compressing" wx:if="{{status == 2}}"><view class="bar" style="width: {{pricePercent}}%;"></view></view>
|
||||
<view class='flex pro-money' wx:if="{{status == 2}}">
|
||||
<view class='price-y'>
|
||||
<view>原价</view>
|
||||
<view>¥{{product.price}}</view>
|
||||
</view>
|
||||
<view class='price-m'>
|
||||
<view>目标</view>
|
||||
<view>¥{{product.min_price}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class='cutone-but' bindtap='setBargainHelp' wx:if="{{status == 2}}">帮好友砍一刀</view>
|
||||
<!--已帮好友砍价 -->
|
||||
<!-- 进度条 -->
|
||||
<view class='cutone-pro' wx:if="{{status == 3}}">距离目标还有{{HelpPrice}}元</view>
|
||||
<view class="progress compressing" wx:if="{{status == 3}}"><view class="bar" style="width: {{pricePercent}}%;"></view></view>
|
||||
<view class='flex pro-money' wx:if="{{status == 3}}">
|
||||
<view class='price-y'>
|
||||
<view>原价</view>
|
||||
<view>¥{{product.price}}</view>
|
||||
</view>
|
||||
<view class='price-m'>
|
||||
<view>目标</view>
|
||||
<view>¥{{product.min_price}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class='cut-over' wx:if="{{status == 3}}">已帮助好友砍价</view>
|
||||
<view class='cutone-but' wx:if="{{status == 3}}" bindtap='setBargain'>我也要参与</view>
|
||||
<!--砍价结束 -->
|
||||
<view class='cut-over' wx:if="{{status == 4}}">恭喜您成功砍到最低价,快去支付订单吧!</view>
|
||||
<view class='cutone-but' wx:if="{{status == 4}}" bindtap='goOrderPay'>立即支付订单</view>
|
||||
<view class='rebut' bindtap='getCutList' wx:if="{{status == 4}}">低价拿更多商品</view>
|
||||
<view class='cutone-but cutone-but2' wx:if="{{status == 5}}">活动已结束</view>
|
||||
<view class='rebut' bindtap='getCutList' wx:if="{{status == 5}}">低价拿更多商品</view>
|
||||
|
||||
|
||||
|
||||
|
||||
<view class='cutone-list'>
|
||||
<view class='list-title'>
|
||||
<text>砍价帮</text>
|
||||
</view>
|
||||
<view class='cutone-ul'>
|
||||
<block wx:for="{{bargainUserHelp}}">
|
||||
<view class='cutone-li flex'>
|
||||
<view class='li-pic flex'>
|
||||
<image src='{{item.avatar}}'></image>
|
||||
<view>
|
||||
<view class='pic-title line'>{{item.nickname}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view>砍掉{{item.price}}元</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
<view class='cutone-tiao'>· 只显示最近15个好友砍价纪录 ·</view>
|
||||
</view>
|
||||
<view class='cutone-list cutone-list2'>
|
||||
<view class='list-title'>
|
||||
<text>商品详情</text>
|
||||
</view>
|
||||
<view class='shop-con'>
|
||||
<template is="wxParse" data="{{wxParseData:description.nodes}}"/>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class='cut-tan' hidden='{{hiddens}}'>
|
||||
<view class='tan-title'>活动规则<icon class='iconfont icon-guanbi1 tanguan' bindtap='butguan'></icon></view>
|
||||
<view class='tan-con'>
|
||||
<template is="wxParse" data="{{wxParseData:rule.nodes}}"/>
|
||||
</view>
|
||||
</view>
|
||||
<view class='zhao' hidden='{{hiddens}}' bindtap='butguan'></view>
|
||||
<view class='cut-tan2' hidden='{{hiddens2}}'>
|
||||
<view class='tan2-bg'><icon class='iconfont icon-guanbi1 tanguan tanguan2' bindtap='butguan2'></icon></view>
|
||||
<view class='tan2-con'>您已砍掉<text>{{bargainUserHelpUserInfo.price}}</text>元,听说分享次数越多砍价成功的机会越大哦!</view>
|
||||
<button class='tan2-bnt' wx:if="{{status == 1}}" open-type='share'>立即分享</button>
|
||||
<button class='tan2-bnt' wx:if="{{status == 4}}" bindtap='butguan'>立即下订单</button>
|
||||
<button class='tan2-bnt' wx:if="{{status == 2}}" bindtap='setBargain'>我要参与</button>
|
||||
</view>
|
||||
<view class='zhao' hidden='{{hiddens2}}' bindtap='butguan2'></view>
|
||||
<include src="/pages/home/home.wxml"/>
|
||||
<import src="/wxParse/wxParse.wxml"/>
|
||||
|
||||
@ -1,88 +0,0 @@
|
||||
var app = getApp();
|
||||
var wxh = require('../../utils/wxh.js');
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
logo:'',
|
||||
name:'',
|
||||
url: app.globalData.urlImages,
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
app.setBarColor();
|
||||
this.getEnterLogo();
|
||||
if (options.scene){
|
||||
app.globalData.spid = options.scene;
|
||||
}
|
||||
},
|
||||
getEnterLogo:function(){
|
||||
var that = this;
|
||||
wx.request({
|
||||
url: app.globalData.url + '/routine/login/get_enter_logo',
|
||||
method: 'post',
|
||||
dataType : 'json',
|
||||
success: function (res) {
|
||||
that.setData({
|
||||
logo: app.globalData.url + res.data.data.site_logo,
|
||||
name: res.data.data.site_name
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady: function () {
|
||||
|
||||
},
|
||||
getUserInfo: function () {
|
||||
app.getUserInfoEnter();
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage: function () {
|
||||
|
||||
}
|
||||
})
|
||||
@ -1,3 +0,0 @@
|
||||
{
|
||||
"navigationBarTitleText": "授权页面"
|
||||
}
|
||||
@ -1,7 +0,0 @@
|
||||
<view class='enter'>
|
||||
<image src="{{url}}{{logo}}"></image>
|
||||
<view class='enter-title'>{{name}}</view>
|
||||
<view class='enter-con'>你的信息和数据将受到保护</view>
|
||||
<button class='enter-but flex' open-type="getUserInfo" type="primary" bindtap='getUserInfo' ><icon class='iconfont icon-weixing'></icon>微信授权登录</button>
|
||||
</view>
|
||||
|
||||
@ -1,6 +0,0 @@
|
||||
.enter{width:425rpx;text-align:center;margin:168rpx auto 0 auto;display:block;}
|
||||
.enter image{width:136rpx;height:136rpx;border-radius:8rpx;}
|
||||
.enter-title{color:#333333;font-size:32rpx;margin:45rpx 0 32rpx 0;}
|
||||
.enter-con{font-size:26rpx;color:#999999;line-height:1.7;}
|
||||
.enter-but{width:360rpx;height:70rpx;border-radius:8rpx;background-color:#319FF5;font-size:26rpx;color:#fff;margin-top:70rpx;align-items:center;justify-content:center;}
|
||||
.enter-but icon{font-size:35rpx;margin-right:15rpx;}
|
||||
@ -1,87 +0,0 @@
|
||||
var app = getApp();
|
||||
Page({
|
||||
data: {
|
||||
url: app.globalData.urlImages,
|
||||
userinfo: [],
|
||||
yearsum:'',
|
||||
extractsum:''
|
||||
},
|
||||
onLoad: function (options) {
|
||||
app.setBarColor();
|
||||
app.setUserInfo();
|
||||
var header = {
|
||||
'content-type': 'application/x-www-form-urlencoded',
|
||||
};
|
||||
this.money(header);
|
||||
this.Yesterday_commission(header);
|
||||
this.extract(header);
|
||||
},
|
||||
money: function (header) {
|
||||
var that = this;
|
||||
wx.request({
|
||||
url: app.globalData.url + '/routine/auth_api/my?uid=' + app.globalData.uid,
|
||||
method: 'POST',
|
||||
header: header,
|
||||
success: function (res) {
|
||||
if (res.data.code == 200) {
|
||||
that.setData({
|
||||
userinfo: res.data.data
|
||||
})
|
||||
}else{
|
||||
that.setData({
|
||||
userinfo: []
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
cash: function () {
|
||||
var that = this;
|
||||
wx.navigateTo({
|
||||
url: '/pages/cash/cash?uid='+ app.globalData.uid,
|
||||
})
|
||||
},
|
||||
Yesterday_commission: function (header) {
|
||||
var that = this;
|
||||
wx.request({
|
||||
url: app.globalData.url + '/routine/auth_api/yesterdayCommission?uid=' + app.globalData.uid,
|
||||
method: 'POST',
|
||||
header: header,
|
||||
success: function (res) {
|
||||
if (res.data.code == 200) {
|
||||
that.setData({
|
||||
yearsum: res.data.data
|
||||
})
|
||||
}else{
|
||||
that.setData({
|
||||
yearsum: ''
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
extract: function (header) {
|
||||
var that = this;
|
||||
wx.request({
|
||||
url: app.globalData.url + '/routine/auth_api/extractsum?uid=' + app.globalData.uid,
|
||||
method: 'POST',
|
||||
header: header,
|
||||
success: function (res) {
|
||||
if (res.data.code == 200) {
|
||||
that.setData({
|
||||
extractsum: res.data.data
|
||||
})
|
||||
}else{
|
||||
that.setData({
|
||||
extractsum: ''
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
spread: function () {
|
||||
wx.navigateTo({
|
||||
url: "/pages/spread/spread",
|
||||
})
|
||||
}
|
||||
})
|
||||
@ -1 +0,0 @@
|
||||
{"navigationBarTitleText": "推广统计"}
|
||||
@ -1,30 +0,0 @@
|
||||
<view class="header">
|
||||
<view class='header-bg'>
|
||||
<view class='money'>{{userinfo.now_money}}</view>
|
||||
<view class='text'>累计推广金</view>
|
||||
</view>
|
||||
<view class='tip' bindtap='cash'>立即提现</view>
|
||||
</view>
|
||||
<view class='exten-item'>
|
||||
<view class='exten-list flex'>
|
||||
<view><text class='exten-bg1 exten-bg'></text>昨日推广佣金</view>
|
||||
<view class='exten-money'>{{yearsum}}元</view>
|
||||
</view>
|
||||
<view class='exten-list flex'>
|
||||
<view><text class='exten-bg2 exten-bg'></text>累计可提佣金</view>
|
||||
<view class='exten-money'>{{userinfo.now_money}}元</view>
|
||||
</view>
|
||||
<view class='exten-list flex'>
|
||||
<view><text class='exten-bg3 exten-bg'></text>累计已提佣金</view>
|
||||
<view class='exten-money'>{{extractsum}}元</view>
|
||||
</view>
|
||||
<view class='exten-list flex' bindtap='spread'>
|
||||
<view><text class='exten-bg4 exten-bg'></text>推广详情</view>
|
||||
<view class='exten-money iconfont icon-xiala iconxia'></view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class='flex extentui'>
|
||||
<view><text class='exten-bg5 exten-bg'></text>推广活动说明</view>
|
||||
<view class='exten-money iconfont icon-xiala iconxia'></view>
|
||||
</view> -->
|
||||
|
||||
@ -1,84 +0,0 @@
|
||||
|
||||
var app = getApp();
|
||||
Page({
|
||||
data: {
|
||||
url: app.globalData.urlImages,
|
||||
fereeArray: [],
|
||||
page: 1,
|
||||
count: '',
|
||||
first:0,
|
||||
limit:20,
|
||||
title: "",
|
||||
loadinghidden: false
|
||||
},
|
||||
onLoad: function (options) {
|
||||
app.setBarColor();
|
||||
app.setUserInfo();
|
||||
if (options.uid){
|
||||
this.setData({
|
||||
uid: options.uid
|
||||
})
|
||||
this.getSpreadListTwo();
|
||||
}else{
|
||||
wx.showToast({
|
||||
title: '参数错误',
|
||||
icon: 'none',
|
||||
duration: 1000,
|
||||
})
|
||||
setTimeout(function(){
|
||||
wx.navigateTo({
|
||||
url: '/pages/feree/feree'
|
||||
})
|
||||
},1200);
|
||||
}
|
||||
},
|
||||
getSpreadListTwo:function(){
|
||||
var that = this;
|
||||
wx.request({
|
||||
url: app.globalData.url + '/routine/auth_api/get_spread_list_two?uid=' + app.globalData.uid,
|
||||
data: {
|
||||
two_uid: that.data.uid,
|
||||
first: that.data.first,
|
||||
limit: that.data.limit
|
||||
},
|
||||
method: 'GET',
|
||||
success: function (res) {
|
||||
if (res.data.code == 200) {
|
||||
that.setData({
|
||||
count: res.data.data.count ? res.data.data.count : 0,
|
||||
fereeArray: res.data.data.list,
|
||||
loadinghidden: true,
|
||||
title: '加载完成'
|
||||
})
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
onReachBottom: function () {
|
||||
var that = this;
|
||||
var limit = 20;
|
||||
var first = that.data.first;
|
||||
var startpage = limit * first;
|
||||
var array = that.data.fereeArray;
|
||||
wx.request({
|
||||
url: app.globalData.url + '/routine/auth_api/get_spread_list_two?uid=' + app.globalData.uid,
|
||||
data: {
|
||||
two_uid: that.data.uid,
|
||||
limit: limit,
|
||||
first: startpage
|
||||
},
|
||||
method: 'GET',
|
||||
success: function (res) {
|
||||
var len = res.data.data.list.length;
|
||||
for (var i = 0; i < len; i++) {
|
||||
array.push(res.data.data.list[i])
|
||||
}
|
||||
that.setData({
|
||||
fereeArray: array,
|
||||
loadinghidden: true,
|
||||
title: '加载完成'
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
@ -1,3 +0,0 @@
|
||||
{
|
||||
"navigationBarTitleText": "我的二级粉丝列表"
|
||||
}
|
||||
@ -1,19 +0,0 @@
|
||||
<view class="header">
|
||||
<text class='tuipic'></text>
|
||||
二级粉丝统计:{{count}}
|
||||
</view>
|
||||
<view class='feree-ul'>
|
||||
<block wx:for="{{fereeArray}}">
|
||||
<view class='feree-li flex'>
|
||||
<image src='{{item.avatar}}' class='feree-pic'></image>
|
||||
<view class='feree-conter'>
|
||||
<view class='feree-name'>{{item.nickname}}</view>
|
||||
<view class='feree-text'>
|
||||
<text>关注时间: {{item.add_time}}</text>\r\n\r\n\r\n\r\n
|
||||
<text>消费金额: {{item.price}}</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
<view class='loading flex'><text class='loadingpic iconfont icon-jiazaizhong' hidden='{{loadinghidden}}'></text><text>{{title}}</text></view>
|
||||
@ -1,11 +0,0 @@
|
||||
.header{height:70rpx;line-height:70rpx;background-color:#FF3D3D;color:#ffffff;padding:0 30rpx;font-size:26rpx;}
|
||||
.tuipic{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA3hpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQyIDc5LjE2MDkyNCwgMjAxNy8wNy8xMy0wMTowNjozOSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDplN2ZhMTA1Zi1jNWUxLTdlNGItODQ2MC05M2JkOGVlODY0OTYiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NEEzNzY5NTI0MkE5MTFFODhEREZCQTAwRkU5QzcyNDYiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NEEzNzY5NTE0MkE5MTFFODhEREZCQTAwRkU5QzcyNDYiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTUuNSAoV2luZG93cykiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo2OGE3NWUzOS0wNTIzLTMwNGMtOTllMS03ZjljMzNjN2YzZTAiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6ZTdmYTEwNWYtYzVlMS03ZTRiLTg0NjAtOTNiZDhlZTg2NDk2Ii8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+ni2fxgAAAihJREFUeNrEl0soRFEYx+9MYzMpREjyTpTII3k0XokVsRiRrBUWVkpWlhaivLJXs2IxG49SRCF5ZMUGjTzKK/JIyvH/dKZOt3tn7r1zZvzrV/dxvnP/99xzz/cdG2NMkaBjUMSPr8AuWAUe8BEwkgxIYJlp6wL0A4derN3km8aDWtADqoXrNp32GWCaj0ae1RFIAr1gHZyDH/52m0KbFRZcj8Cl7j/Qg6PAEHjQ6XDdpAHSPagw8gkqwQ4Y48OupW8LkzUBrIB0/wUtA21gDZQq4VEMmNIz0ACWQLQSXrUAt9pADv9vbUpkNKw2MAcSlcipmH5pv4EO0KhEXq1kwAFGlP9RGRmoB4X/ZCCZDDRJ6CjFYlwuDX+5BAPzIN9CnJ0MpEkwMGM1kAykWoz9Eo5dfAW9pfxmMJ7Wmx8HN2FF2SAOPINrUAGqTPbxl5E+mXXtgUwhu42ajD+loDMWmi5BgWCiz0TsBv2GdyFOQEqt26CTn8/yRPNmIHafHI8zeRoURqIOXAVp30gNa5lcTQomUnjppjd/HP6Gh5JNeHhJR307gVejTbtYE7qZfG2BDGE0poV7a8CuLkq9YTBBVXSJ8IwJ4ANZWlVxGngJg4ln0K2aF5pVsQ80g0fJKTdWVezcBNuY1IAniSMw4//eWuhtSvL4xiMUvfNVMeDOK9BN2lAO8KXWjF7BIsg3srG1GdieO0EXnx+VOumbMuIROAAL4MToBPkVYABMi5NuhI1zMQAAAABJRU5ErkJggg==");background-repeat:no-repeat;background-size:100% 100%;width:35rpx;height:35rpx;display:inline-block;vertical-align:middle;margin-right:18rpx;}
|
||||
.feree-li{height:152rpx;padding:0 30rpx;}
|
||||
.feree-li:nth-of-type(even){background-color:#ffffff;}
|
||||
.feree-pic{width:110rpx;height:110rpx;margin-top:22rpx;border-radius:50%;}
|
||||
.feree-conter{margin:30rpx 0 0 24rpx;}
|
||||
.feree-name{font-size:30rpx;color:#363636;}
|
||||
.feree-text{font-size:24rpx;color:#666666;margin-top:15rpx;}
|
||||
.feree-money{margin-left:26rpx;}
|
||||
.loading{font-size:30rpx;width:100%;height:100rpx;line-height:100rpx;justify-content:center;}
|
||||
.loadingpic{font-size:40rpx;margin:4rpx 20rpx 0 0;}
|
||||
@ -1,73 +0,0 @@
|
||||
|
||||
var app = getApp();
|
||||
Page({
|
||||
data: {
|
||||
url: app.globalData.urlImages,
|
||||
fereeArray:[],
|
||||
page:1,
|
||||
count: '',
|
||||
first: 0,
|
||||
limit: 20,
|
||||
title:"",
|
||||
loadinghidden:false
|
||||
},
|
||||
onLoad: function (options) {
|
||||
app.setBarColor();
|
||||
app.setUserInfo();
|
||||
var that = this;
|
||||
var header = {
|
||||
'content-type': 'application/x-www-form-urlencoded',
|
||||
};
|
||||
wx.request({
|
||||
url: app.globalData.url + '/routine/auth_api/get_spread_list?uid=' + app.globalData.uid,
|
||||
method: 'GET',
|
||||
data: {
|
||||
first: that.data.first,
|
||||
limit: that.data.limit
|
||||
},
|
||||
success: function (res) {
|
||||
if (res.data.code == 200) {
|
||||
that.setData({
|
||||
count: res.data.data.count ? res.data.data.count : 0,
|
||||
fereeArray: res.data.data.list,
|
||||
loadinghidden: true,
|
||||
title: '加载完成'
|
||||
})
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
toTwo:function(e){
|
||||
if (e.currentTarget.dataset.id) {
|
||||
wx.navigateTo({
|
||||
url: '/pages/feree-two/feree-two?uid=' + e.currentTarget.dataset.id,
|
||||
})
|
||||
}
|
||||
},
|
||||
onReachBottom: function () {
|
||||
var that = this;
|
||||
var limit = 20;
|
||||
var first = that.data.first;
|
||||
var startpage = limit * first;
|
||||
var array = that.data.fereeArray;
|
||||
wx.request({
|
||||
url: app.globalData.url + '/routine/auth_api/get_spread_list?uid=' + app.globalData.uid,
|
||||
data: {
|
||||
limit: limit,
|
||||
first: startpage
|
||||
},
|
||||
method: 'GET',
|
||||
success: function (res) {
|
||||
var len = res.data.data.list.length;
|
||||
for (var i = 0; i < len; i++) {
|
||||
array.push(res.data.data.list[i])
|
||||
}
|
||||
that.setData({
|
||||
fereeArray: array,
|
||||
loadinghidden: true,
|
||||
title: '加载完成'
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
@ -1 +0,0 @@
|
||||
{"navigationBarTitleText": "我的粉丝列表"}
|
||||
@ -1,20 +0,0 @@
|
||||
<view class="header">
|
||||
<text class='tuipic'></text>
|
||||
粉丝统计:{{count}}
|
||||
</view>
|
||||
<view class='feree-ul'>
|
||||
<block wx:for="{{fereeArray}}">
|
||||
<view class='feree-li flex' bindtap='toTwo' data-id="{{item.uid}}">
|
||||
<image src='{{item.avatar}}' class='feree-pic'></image>
|
||||
<view class='feree-conter'>
|
||||
<view class='feree-name'>{{item.nickname}}</view>
|
||||
<view class='feree-text'>
|
||||
<text>关注时间: {{item.add_time}}</text>\r\n\r\n\r\n\r\n
|
||||
<text>消费金额: {{item.price}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="next"><text class='iconfont icon-xiala'></text></view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
<view class='loading flex'><text class='loadingpic iconfont icon-jiazaizhong' hidden='{{loadinghidden}}'></text><text>{{title}}</text></view>
|
||||
@ -1,13 +0,0 @@
|
||||
.header{height:70rpx;line-height:70rpx;background-color:#FF3D3D;color:#ffffff;padding:0 30rpx;font-size:26rpx;}
|
||||
.tuipic{background-image:url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACAAAAAgCAYAAABzenr0AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAA3hpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuNi1jMTQyIDc5LjE2MDkyNCwgMjAxNy8wNy8xMy0wMTowNjozOSAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wTU09Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC9tbS8iIHhtbG5zOnN0UmVmPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvc1R5cGUvUmVzb3VyY2VSZWYjIiB4bWxuczp4bXA9Imh0dHA6Ly9ucy5hZG9iZS5jb20veGFwLzEuMC8iIHhtcE1NOk9yaWdpbmFsRG9jdW1lbnRJRD0ieG1wLmRpZDplN2ZhMTA1Zi1jNWUxLTdlNGItODQ2MC05M2JkOGVlODY0OTYiIHhtcE1NOkRvY3VtZW50SUQ9InhtcC5kaWQ6NEEzNzY5NTI0MkE5MTFFODhEREZCQTAwRkU5QzcyNDYiIHhtcE1NOkluc3RhbmNlSUQ9InhtcC5paWQ6NEEzNzY5NTE0MkE5MTFFODhEREZCQTAwRkU5QzcyNDYiIHhtcDpDcmVhdG9yVG9vbD0iQWRvYmUgUGhvdG9zaG9wIENDIDIwMTUuNSAoV2luZG93cykiPiA8eG1wTU06RGVyaXZlZEZyb20gc3RSZWY6aW5zdGFuY2VJRD0ieG1wLmlpZDo2OGE3NWUzOS0wNTIzLTMwNGMtOTllMS03ZjljMzNjN2YzZTAiIHN0UmVmOmRvY3VtZW50SUQ9InhtcC5kaWQ6ZTdmYTEwNWYtYzVlMS03ZTRiLTg0NjAtOTNiZDhlZTg2NDk2Ii8+IDwvcmRmOkRlc2NyaXB0aW9uPiA8L3JkZjpSREY+IDwveDp4bXBtZXRhPiA8P3hwYWNrZXQgZW5kPSJyIj8+ni2fxgAAAihJREFUeNrEl0soRFEYx+9MYzMpREjyTpTII3k0XokVsRiRrBUWVkpWlhaivLJXs2IxG49SRCF5ZMUGjTzKK/JIyvH/dKZOt3tn7r1zZvzrV/dxvnP/99xzz/cdG2NMkaBjUMSPr8AuWAUe8BEwkgxIYJlp6wL0A4derN3km8aDWtADqoXrNp32GWCaj0ae1RFIAr1gHZyDH/52m0KbFRZcj8Cl7j/Qg6PAEHjQ6XDdpAHSPagw8gkqwQ4Y48OupW8LkzUBrIB0/wUtA21gDZQq4VEMmNIz0ACWQLQSXrUAt9pADv9vbUpkNKw2MAcSlcipmH5pv4EO0KhEXq1kwAFGlP9RGRmoB4X/ZCCZDDRJ6CjFYlwuDX+5BAPzIN9CnJ0MpEkwMGM1kAykWoz9Eo5dfAW9pfxmMJ7Wmx8HN2FF2SAOPINrUAGqTPbxl5E+mXXtgUwhu42ajD+loDMWmi5BgWCiz0TsBv2GdyFOQEqt26CTn8/yRPNmIHafHI8zeRoURqIOXAVp30gNa5lcTQomUnjppjd/HP6Gh5JNeHhJR307gVejTbtYE7qZfG2BDGE0poV7a8CuLkq9YTBBVXSJ8IwJ4ANZWlVxGngJg4ln0K2aF5pVsQ80g0fJKTdWVezcBNuY1IAniSMw4//eWuhtSvL4xiMUvfNVMeDOK9BN2lAO8KXWjF7BIsg3srG1GdieO0EXnx+VOumbMuIROAAL4MToBPkVYABMi5NuhI1zMQAAAABJRU5ErkJggg==");background-repeat:no-repeat;background-size:100% 100%;width:35rpx;height:35rpx;display:inline-block;vertical-align:middle;margin-right:18rpx;}
|
||||
.feree-li{height:152rpx;padding:0 30rpx;position:reletive;}
|
||||
.next{position:absolute;top:123rpx;right:16rpx;}
|
||||
.next .icon-xiala{color: #bbb;font-size: 40rpx;}
|
||||
.feree-li:nth-of-type(even){background-color:#ffffff;}
|
||||
.feree-pic{width:110rpx;height:110rpx;margin-top:22rpx;border-radius:50%;}
|
||||
.feree-conter{margin:30rpx 0 0 24rpx;}
|
||||
.feree-name{font-size:30rpx;color:#363636;}
|
||||
.feree-text{font-size:24rpx;color:#666666;margin-top:15rpx;}
|
||||
.feree-money{margin-left:26rpx;}
|
||||
.loading{font-size:30rpx;width:100%;height:100rpx;line-height:100rpx;justify-content:center;}
|
||||
.loadingpic{font-size:40rpx;margin:4rpx 20rpx 0 0;}
|
||||
@ -1,62 +0,0 @@
|
||||
// pages/product-con/index.js
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function () {
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage: function () {
|
||||
|
||||
}
|
||||
})
|
||||
@ -1 +0,0 @@
|
||||
{}
|
||||
@ -1,36 +0,0 @@
|
||||
<view class="model-bg {{show==true ? 'show':''}} {{prostatus==true ? 'show':''}}" bindtap='modelbg'></view>
|
||||
<view class="model-proinfo {{prostatus==true ? 'show':''}}">
|
||||
<view class='hd-wrapper'>
|
||||
<image src='{{url}}{{productSelect.image}}'></image>
|
||||
<view class='txt-info'>
|
||||
<view class='title'>{{productSelect.store_name}}</view>
|
||||
<view class='price'>¥{{productSelect.price}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class='bd-wrapper'>
|
||||
<block wx:for="{{productAttr}}">
|
||||
<view class='parameter-item'>
|
||||
<view class='title-bar'>{{item.attr_name}}</view>
|
||||
<view class='item-wrapper'>
|
||||
<block wx:for="{{item.attr_value}}" wx:for-item="items">
|
||||
<view data-key="{{items.attr}}" class='item {{items.check?"sizecolor":""}}' bindtap='tapsize'>{{items.attr}}</view>
|
||||
</block>
|
||||
</view>
|
||||
</view>
|
||||
</block>
|
||||
</view>
|
||||
<view class='count-box flex'>
|
||||
购买数量
|
||||
<view class='count-wrappers flex'>
|
||||
<text data-index="{{index}}" bindtap="bindMinus" class='{{minusStatus}}'>-</text>
|
||||
<input class='num' type="number" value='{{num}}' bindblur='setNumber'/>
|
||||
<!-- <text class='num'>{{num}}</text> -->
|
||||
<text class='add' data-index="{{index}}" bindtap="bindPlus">+</text>
|
||||
</view>
|
||||
</view>
|
||||
<view style='height:100rpx;'></view>
|
||||
<form bindsubmit="subBuy" report-submit='true'>
|
||||
<button class='foot-wrapper' form-type='submit'>确定</button>
|
||||
<!-- <view class='foot-wrapper' bindtap='subBuy'>确定</view> -->
|
||||
</form>
|
||||
</view>
|
||||
@ -1,20 +0,0 @@
|
||||
/* pages/foo-tan/foo-tan.wxss */
|
||||
.model-proinfo{z-index: 80; position: fixed; left: 0; bottom: 0; width: 100%; background-color: #fff; padding: 0 30rpx; box-sizing: border-box; transform: translate3d(0,120%,0); transition: all .3s cubic-bezier(.25,.5,.5,.9);}
|
||||
.model-proinfo .hd-wrapper{position: relative; padding-left: 244rpx;}
|
||||
.model-proinfo .hd-wrapper image{width: 214rpx; height: 214rpx; border:10rpx solid #fff; box-sizing: border-box; position: absolute; left: 0; top: -30rpx; box-shadow: 1px 1px 2px 1px #e4e4e4; border-radius: 5px;}
|
||||
.model-proinfo .hd-wrapper .txt-info{ width: 445rpx; height: 180rpx; padding-top: 36rpx; box-sizing: border-box;}
|
||||
.model-proinfo .hd-wrapper .txt-info .title{display: -webkit-box; display:-moz-box; display:box;-webkit-box-orient: vertical; -moz-box-orient: vertical; -webkit-line-clamp: 2;-moz-line-clamp: 2;overflow: hidden;}
|
||||
.model-proinfo .hd-wrapper .txt-info .price{margin-top: 25rpx; font-size: 32rpx; color: #ff3d3d;}
|
||||
.model-proinfo .bd-wrapper .parameter-item{padding: 30rpx 0; border-bottom: 1px solid #eaeaea;}
|
||||
.model-proinfo .bd-wrapper .item-wrapper{display: flex; flex-wrap: wrap;}
|
||||
.model-proinfo .bd-wrapper .item-wrapper .item{height: 58rpx; text-align: center; line-height: 58rpx; background-color: #eeeeee; font-size: 24rpx; border-radius: 3px; margin: 28rpx 35rpx 0 0;padding:0rpx 20rpx;}
|
||||
.model-proinfo.show{transform: translate3d(0,0,0);}
|
||||
.count-wrappers{position: absolute; right:20rpx; top:50%;width: 160rpx; height: 47rpx; box-sizing: border-box; border: 1px solid #ddd; border-radius: 3px; align-items: center; margin-top: -23.5rpx;}
|
||||
.count-wrappers text{flex: 1;text-align: center; height: 100%; font-size: 36rpx; color:#454545; line-height: 37rpx;}
|
||||
.count-wrappers .num{flex: initial;text-align:center;
|
||||
width: 66rpx; color: #333; font-size: 28rpx;border-left: 1px solid #ddd;border-right: 1px solid #ddd; line-height: 47rpx;}
|
||||
.count-wrappers .disabled{color:#ccc;}
|
||||
.count-box{position: relative; height: 106rpx; line-height: 106rpx;}
|
||||
.foot-wrapper{position: absolute; left: 0; bottom: 0; width: 100%; height: 100rpx; line-height: 100rpx; text-align: center; background-color: #ff3d3d; color: #fff;border-radius:0;}
|
||||
.model-proinfo.show{transform: translate3d(0,0,0);}
|
||||
.sizecolor{background-color:#FF3D3D! important;color:#fff! important;}
|
||||