@@ -2,40 +2,40 @@ const extConfig = wx.getExtConfigSync ? wx.getExtConfigSync() : {} | |||
let weappId = extConfig.weappId; | |||
let configUrls = extConfig.attr.configUrl; | |||
let sockUrls = extConfig.attr.socketUrl; | |||
var config = { | |||
var config = { | |||
url: configUrls, | |||
wsurl: sockUrls, | |||
api: { | |||
/* | |||
*欢乐城首页专题 | |||
*/ | |||
showList:"/topic/showList", | |||
showList: "/topic/showList", | |||
/* | |||
*记录微信订阅 | |||
*/ | |||
activityDey:"/wxActivity/listStatus",//活动日历日期 | |||
activityCalendar:'/wxActivity/list',//活动日历列表 | |||
signDey:"/userSign/listStatus",//签到日期列表 | |||
continuousDye:"/userSign/signInStatus",//连续签到天数 | |||
userSign:"/userSign/signIn",//签到 | |||
signRule:"/credit/credit_rules",//签到规则 | |||
activityDey: "/wxActivity/listStatus",//活动日历日期 | |||
activityCalendar: '/wxActivity/list',//活动日历列表 | |||
signDey: "/userSign/listStatus",//签到日期列表 | |||
continuousDye: "/userSign/signInStatus",//连续签到天数 | |||
userSign: "/userSign/signIn",//签到 | |||
signRule: "/credit/credit_rules",//签到规则 | |||
wxMsg: '/user/updateMsg', | |||
/** | |||
* 获取首页按钮 | |||
*/ | |||
wxCustomizeModule:"/wxCustomizeModule/list", | |||
wxCustomizeModule: "/wxCustomizeModule/list", | |||
/** | |||
* 微信消息推送获取模板id | |||
*/ | |||
templateId: "/wxMsg/templateList", | |||
//问卷列表 | |||
questionnaire :"/wxQuestionOneself/list", | |||
questionnaire: "/wxQuestionOneself/list", | |||
//问卷详情 | |||
questionnaireDetail:"/wxQuestionOneself/detailsById", | |||
questionnaireDetail: "/wxQuestionOneself/detailsById", | |||
//提交问卷 | |||
submitQuestin:"/wxQuestionOneself/userAdd", | |||
submitQuestin: "/wxQuestionOneself/userAdd", | |||
//投诉建议add | |||
suggest:"/wxOpinion/add", | |||
suggest: "/wxOpinion/add", | |||
/** | |||
* 接口用途:login | |||
*/ | |||
@@ -44,8 +44,18 @@ var config = { | |||
* 授权后获取用户的昵称,unionId等信息 | |||
*/ | |||
getUserInfo: "/user/getUserInfo", | |||
//图片上传 | |||
imgUpload: '/upload/awsFileUpload', | |||
/** | |||
* 文件上传 | |||
*/ | |||
fileUpload: '/upload/awsFileUpload', | |||
/** | |||
* 图片上传 | |||
*/ | |||
imgUpload: '/upload/awsImgUpload', | |||
/** | |||
* 接口用途:授权后获取用户的手机号 | |||
*/ | |||
@@ -61,7 +71,7 @@ var config = { | |||
/** | |||
* 商户优惠信息 | |||
*/ | |||
listByMerchant: "/wxCouponChannel/listByMerchant", | |||
listByMerchant: "/wxCouponChannel/listByMerchant", | |||
/** | |||
* 获取券价格与库存 | |||
@@ -84,7 +94,7 @@ var config = { | |||
/** | |||
* 购物车订单详情 | |||
*/ | |||
goodsDetail:"/order/goodsDetail", | |||
goodsDetail: "/order/goodsDetail", | |||
/** | |||
* 优惠券图文混排详情 | |||
*/ | |||
@@ -104,7 +114,7 @@ var config = { | |||
/** | |||
* 频道查询 | |||
*/ | |||
couponChannelList: "/wxCouponChannel/list", | |||
couponChannelList: "/wxCouponChannel/list", | |||
/** | |||
* 换一换change | |||
*/ | |||
@@ -116,7 +126,7 @@ var config = { | |||
/** | |||
* 多少量下单 | |||
*/ | |||
goodsShopCartSave:"/order/goodsShopCartSave", | |||
goodsShopCartSave: "/order/goodsShopCartSave", | |||
/** | |||
* 支付订单 | |||
*/ | |||
@@ -388,13 +398,13 @@ var config = { | |||
// 获取直播房间回放数据和商品信息 | |||
getRoomList: "/live/roomList", | |||
//商城地图 | |||
getStoreMap:"/wxMallBuilding/getbuildingfloorlist", | |||
getStoreMap: "/wxMallBuilding/getbuildingfloorlist", | |||
//判断有没有蜂鸟地图 | |||
ifFengMap:'/fengniaomap/getConfig', | |||
ifFengMap: '/fengniaomap/getConfig', | |||
//分享小程序二维码 | |||
getQrcodeFx:"/user/userinfoQrCode", | |||
getQrcodeFx: "/user/userinfoQrCode", | |||
//添加收货地址 | |||
collectSite:"/userBasicInfoAddress/saveOrUpdate", | |||
collectSite: "/userBasicInfoAddress/saveOrUpdate", | |||
//收货地址列表 | |||
siteList: "/userBasicInfoAddress/list", | |||
//查询收货地址 | |||
@@ -402,13 +412,13 @@ var config = { | |||
//删除收获地址 | |||
siteDel: "/userBasicInfoAddress/del", | |||
//确认收货 | |||
verify:"/couponOrder/verify", | |||
verify: "/couponOrder/verify", | |||
//全包下订单 | |||
couponPackageSave :"/order/couponPackageSave", | |||
couponPackageSave: "/order/couponPackageSave", | |||
//获取动态核销码 | |||
dynamicId:"/couponOrder/dynamicId" | |||
dynamicId: "/couponOrder/dynamicId" | |||
}, | |||
weapp: { | |||
AppId: weappId | |||
@@ -1,7 +1,14 @@ | |||
{ | |||
"ext": { | |||
"attr": { | |||
"mchId": "1602801645", | |||
"car": { | |||
"etcp": { | |||
"etcpAppId": "wx192b7d2e8dcbefd0", | |||
"etcpVersion": "release", | |||
"etcpCallbackUrl": "https://admintest.malls.iformall.com/api/carCallback/etcpPaidCallback" | |||
} | |||
}, | |||
"mchId": "1604439800", | |||
"imgProxy": [ | |||
{ | |||
"newUrl": "https://ctest.malls.iformall.com/img", | |||
@@ -17,16 +24,12 @@ | |||
} | |||
], | |||
"configUrl": "https://ctest.malls.iformall.com/C/api", | |||
"etcpAppId": "wx219a81b9c87aa4f7", | |||
"etcpVersion": "release", | |||
"businessSwitch": "1", | |||
"businessVersion": "1", | |||
"etcpCallbackUrl": "https://admintest.malls.iformall.com/api/carCallback/etcpPaidCallback", | |||
"ifHaveWebSocket": "0", | |||
"ifHaveCarModular": "1" | |||
}, | |||
"name": "富茂光谷测试版", | |||
"weappId": "wx219a81b9c87aa4f7", | |||
"name": "金泸商务", | |||
"weappId": "wx649b3be73c1afe47", | |||
"appVersion": "C.test.5.2.0" | |||
}, | |||
"debug": false, | |||
@@ -74,15 +77,15 @@ | |||
}, | |||
"plugins": { | |||
"auto-points-plugin": { | |||
"version": "2.4.0", | |||
"version": "1.3.0", | |||
"provider": "wxfab2bf944bfc4da6" | |||
}, | |||
"live-player-plugin": { | |||
"version": "1.2.5", | |||
"version": "1.3.4", | |||
"provider": "wx2b03c6e691cd7370" | |||
} | |||
}, | |||
"extAppid": "wx219a81b9c87aa4f7", | |||
"extAppid": "wx649b3be73c1afe47", | |||
"extEnable": true, | |||
"permission": { | |||
"scope.userLocation": { | |||
@@ -173,7 +173,7 @@ | |||
<icon bindtap="closeTicketModal" class="close-icon" type="cancel"></icon> | |||
</view> | |||
<scroll-view bindscrolltolower="getMoreList" scroll-y style="height:800rpx;"> | |||
<view class='section' wx:for='{{ticketList}}' wx:key='{{index}}' bindtap="choicecoupon" data-title="{{item.title}}" data-id="{{item.id}}"> | |||
<view class='section' wx:for='{{ticketList}}' wx:key="index" bindtap="choicecoupon" data-title="{{item.title}}" data-id="{{item.id}}"> | |||
<view class='mms'> | |||
<!-- <text>{{index}}</text> --> | |||
<!-- <image class='gou' wx:if="{{item.id==quanid}}" mode='widthFix' src='{{gouHr}}'></image> --> | |||
@@ -119,7 +119,7 @@ | |||
<view class="particulars_go">></view> | |||
</view> | |||
</navigator> | |||
<navigator url="/pages/site/site" open-type="navigate"> | |||
<navigator url="/pages/setUserInfo/index" open-type="navigate"> | |||
<view class="particulars_list"> | |||
<view class="particulars_name">完善个人信息</view> | |||
<view class="particulars_go">></view> | |||
@@ -1,7 +1,7 @@ | |||
<!-- <button class='goback' bindtap='goback'><image src='{{wmhome}}' mode="widthFix"></image></button> --> | |||
<navbar home back text="我的卡包" color="#000" background="#ffff"></navbar> | |||
<view style="height:{{navigationBarHeight}} "></view> | |||
<view class="market" wx:if="{{showPage}}" > | |||
<view class="market" wx:if="{{showPage}}"> | |||
<!-- 卡包 我的优惠券 --> | |||
<i-tabs style="top:{{navigationBarHeight}}" class='tabs' current="{{ current_scroll }}" scroll bindchange="handleChangeScroll"> | |||
<i-tab class='i-tab' wx:for="{{tabs}}" wx:key="unique" key="{{item.key}}" title="{{item.name}}"></i-tab> | |||
@@ -16,13 +16,13 @@ | |||
</navigator> | |||
</view> | |||
<view class='section' wx:for='{{list}}' wx:key='{{index}}'> | |||
<view class='section' wx:for='{{list}}' wx:key="index"> | |||
<!-- <view class='mms' style='background:{{item.background}}'> --> | |||
<view class='mms'> | |||
<view class="gray-bg"></view> | |||
<image class="cover-img" src="{{item.coverImg}}" /> | |||
<image src="{{canTransferred}}" wx-if='{{item.supportTransfer==1&&!item.showImg}}' class='cantransferred' mode="aspectFill"/> | |||
<image src="{{canTransferred}}" wx-if='{{item.supportTransfer==1&&!item.showImg}}' class='cantransferred' mode="aspectFill" /> | |||
<view class='detail_msg'> | |||
<view class='info'> | |||
<view class='clearfix' data-id='{{item.id}}' bindtap='{{!item.showImg?"gotoConsumeDetail":""}}'> | |||
@@ -1,7 +1,7 @@ | |||
<!-- <button class='goback' bindtap='goback'><image src='{{wmhome}}' mode="widthFix"></image></button> --> | |||
<navbar home back text="我的券包" background="#ffff"></navbar> | |||
<view style="height:{{navigationBarHeight}} "></view> | |||
<view class="market" wx:if="{{showPage}}" > | |||
<view class="market" wx:if="{{showPage}}"> | |||
<!-- 券包 我的优惠券 --> | |||
<i-tabs style="top:{{navigationBarHeight}}" class='tabs' current="{{ current_scroll }}" scroll bindchange="handleChangeScroll"> | |||
<i-tab class='i-tab' wx:for="{{tabs}}" wx:key="unique" key="{{item.key}}" title="{{item.name}}"></i-tab> | |||
@@ -16,7 +16,7 @@ | |||
</navigator> | |||
</view> | |||
<view class='section' wx:for='{{list}}' wx:key='{{index}}' bindtap="gotouse" data-quancode="{{item.id}}" data-couponorderstatus="{{item.couponOrderStatus}}"> | |||
<view class='section' wx:for='{{list}}' wx:key="index" bindtap="gotouse" data-quancode="{{item.id}}" data-couponorderstatus="{{item.couponOrderStatus}}"> | |||
<view class='mms'> | |||
<view class='detail_msg'> | |||
<view class='logo'> | |||
@@ -31,7 +31,7 @@ | |||
<text class="txt1">有效期至:</text> | |||
<text class="txt2">{{item.expiredTimeStr}}</text> | |||
</view> | |||
<!-- <view class='subtitle'> | |||
<text>{{item.subTitle}}</text> | |||
</view> --> | |||
@@ -2,11 +2,11 @@ | |||
<navbar back home text="消费卡" background='#fff'></navbar> | |||
<view style="height:{{navigationBarHeight}} "></view> | |||
<!-- 折扣卡list页面 --> | |||
<view class='content' > | |||
<view class='content'> | |||
<view class="market clearfix"> | |||
<view class='tabss'> | |||
<i-tabs current="{{current_scroll}}" scroll bindchange="handleChangeScroll"> | |||
<i-tab wx:for="{{tabData}}" wx:key="unique" key="{{item.id}}" title="{{item.title}}"></i-tab> | |||
<i-tabs current="{{current_scroll}}" scroll bindchange="handleChangeScroll"> | |||
<i-tab wx:for="{{tabData}}" wx:key="unique" key="{{item.id}}" title="{{item.title}}"></i-tab> | |||
</i-tabs> | |||
</view> | |||
<view class='cards clearfix'> | |||
@@ -18,19 +18,19 @@ | |||
<button hover-class='active'>前往首页看看</button> | |||
</navigator> | |||
</view> | |||
<view class='section' wx:for='{{list}}' wx:key='{{index}}' bindtap="gotouse" data-couponId='{{item.couponId}}' data-type="{{item.type}}" data-quancode="{{item.id}}"> | |||
<view class='section' wx:for='{{list}}' wx:key="index" bindtap="gotouse" data-couponId='{{item.couponId}}' data-type="{{item.type}}" data-quancode="{{item.id}}"> | |||
<view class='mms'> | |||
<image src="{{canTransferred}}" wx-if='{{item.supportTransfer==1}}' class='cantransferred' mode="aspectFill"/> | |||
<image src="{{canTransferred}}" wx-if='{{item.supportTransfer==1}}' class='cantransferred' mode="aspectFill" /> | |||
<view class='detail_msg'> | |||
<image mode="aspectFill" style="{{mouldConfig.consumeImgH}}" src='{{item.coverImg}}' ></image> | |||
<text>{{item.title}}</text> | |||
<image mode="aspectFill" style="{{mouldConfig.consumeImgH}}" src='{{item.coverImg}}'></image> | |||
<text>{{item.title}}</text> | |||
</view> | |||
<view class='buycardbtn'> | |||
<view> | |||
<text class='rmb'>¥</text> | |||
<text class='price'>{{item.salePriceStr}}</text> | |||
</view> | |||
<view>购买</view> | |||
<view class='buycardbtn'> | |||
<view> | |||
<text class='rmb'>¥</text> | |||
<text class='price'>{{item.salePriceStr}}</text> | |||
</view> | |||
<view>购买</view> | |||
</view> | |||
</view> | |||
</view> | |||
@@ -112,12 +112,42 @@ Page({ | |||
// icon: "none" | |||
// }) | |||
// } else {} | |||
let tmeparr = [] | |||
tmeparr = JSON.parse(JSON.stringify(that.data.childArr)) | |||
console.log(that.data.childArr) | |||
tmeparr.map(item => { | |||
item.birthdate = new Date(item.birthdate).getTime() | |||
}) | |||
if (!that.data.type) { | |||
let tempArr = [] | |||
tempArr = JSON.parse(JSON.stringify(that.data.childArr)) | |||
tempArr.map(item => { | |||
if (item.birthdate) { | |||
item.birthdate = new Date(item.birthdate).getTime() | |||
let data = JSON.stringify(tempArr) | |||
Http.post({ | |||
url: '/userBasicInfoChild/saveList', data | |||
}).then(res => { | |||
console.log(res); | |||
if (res.code == 200) { | |||
wx.showToast({ | |||
title: "信息提交成功,将在3分钟内生效", | |||
icon: 'none', | |||
duration: 2000, | |||
mask: false | |||
}) | |||
setTimeout(() => { | |||
wx.navigateBack() | |||
}, 2000) | |||
} | |||
}).catch(err => { | |||
console.log(err); | |||
}) | |||
} else { | |||
wx.showToast({ | |||
title: '请填写生日', | |||
icon: 'warning', | |||
duration: 2000, | |||
}) | |||
return | |||
} | |||
}) | |||
} | |||
return | |||
Http.post({ | |||
url: config.api.updateInfo, | |||
@@ -185,11 +215,27 @@ Page({ | |||
}, | |||
childDel(e) { | |||
let index = e.currentTarget.dataset.index | |||
let id = null | |||
let tmpeObj = this.data.childArr | |||
tmpeObj.splice(index, 1) | |||
this.setData({ | |||
childArr: tmpeObj | |||
}) | |||
if (e.currentTarget.dataset.id) { | |||
id = e.currentTarget.dataset.id | |||
Http.get({ | |||
url: `/userBasicInfoChild/del?id=${id}`, | |||
}).then(res => { | |||
console.log(res); | |||
wx.showToast({ | |||
title: "删除成功", | |||
icon: 'none', | |||
duration: 2000 | |||
}) | |||
}).catch(err => { | |||
console.log(err); | |||
}) | |||
} | |||
}, | |||
childAdd() { | |||
let tmpeObj = this.data.childArr | |||
@@ -207,6 +253,24 @@ Page({ | |||
type: false | |||
}) | |||
} | |||
Http.get({ | |||
url: '/userBasicInfoChild/list?pageNum=1&pageSize=100', | |||
}).then(res => { | |||
console.log(res); | |||
if (res.data.list) { | |||
let tmpeArr = res.data.list | |||
tmpeArr.map(item => { | |||
item.birthdate = util.fmtDate(parseInt(item.birthdate)) | |||
that.setData({ | |||
childArr: tmpeArr | |||
}) | |||
}) | |||
} | |||
}).catch(err => { | |||
console.log(err) | |||
}) | |||
let tmpeDateEnd = util.formatTime(new Date(), "yyyy-MM-dd") | |||
let that = this; | |||
that.setData({ | |||
@@ -217,8 +281,6 @@ Page({ | |||
data: {}, | |||
}) | |||
.then(res => { | |||
res.data | |||
console.log(res); | |||
if (res.code == 200) { | |||
if (res.data.weight) { | |||
this.setData({ | |||
@@ -49,7 +49,7 @@ | |||
<view class="contBox"> | |||
<view class='contBox_section'> | |||
<text>姓名</text> | |||
<input wx:if="{{item.name}}" type="text" placeholder='{{item.name}}' bindinput="chidName" data-index="{{index}}" /> | |||
<input wx:if="{{item.name}}" type="text" value='{{item.name}}' bindinput="chidName" data-index="{{index}}" /> | |||
<input wx:if="{{!item.name}}" type="text" placeholder='请输入' bindinput="chidName" data-index="{{index}}" /> | |||
</view> | |||
@@ -75,11 +75,15 @@ | |||
</view> | |||
</view> | |||
<view class="det_child_box" bindtap="childDel" data-index="{{index}}"> 删除</view> | |||
<view class="det_child_box" bindtap="childDel" data-index="{{index}}" data-id="{{item.id}}">删除</view> | |||
</view> | |||
</view> | |||
<button class='btn' wx:if="{{!username}}" formType="submit" hover-class='active' style='background:linear-gradient(127deg,rgba(252,177,74,1) 0%,rgba(254,70,20,1) 100%)'>完成</button> | |||
<button class='btn' wx:if="{{username}}" formType="submit" hover-class='active' style='background:linear-gradient(127deg,rgba(252,177,74,1) 0%,rgba(254,70,20,1) 100%);'>完成</button> | |||
<view class="btns"> | |||
<button class="submit" type="primary" wx:if="{{!username}}" formType="submit" hover-class='active'>完成</button> | |||
<button class="submit" wx:if="{{username}}" type="primary" formType="submit" hover-class='active'>完成</button> | |||
</view> | |||
</form> |
@@ -167,4 +167,12 @@ radio { | |||
text-align: center; | |||
margin-top: 100rpx; | |||
margin-left: 2%; | |||
} | |||
.btns { | |||
padding: 0 40rpx 0 40rpx; | |||
} | |||
.submit { | |||
margin-top: 50rpx; | |||
} |
@@ -1,8 +1,8 @@ | |||
<navbar back home text="停车券"></navbar> | |||
<view style="height:{{navigationBarHeight}} "></view> | |||
<view class="market" > | |||
<view class="market"> | |||
<!-- 券包 我的优惠券 --> | |||
<i-tabs class='tabs' current="{{ current_scroll }}" scroll bindchange="handleChangeScroll"> | |||
<i-tabs class='tabs' current="{{ current_scroll }}" scroll bindchange="handleChangeScroll"> | |||
<i-tab class='i-tab' wx:for="{{tabs}}" wx:key="unique" key="{{item.key}}" title="{{item.name}}"></i-tab> | |||
</i-tabs> | |||
<view style='padding-top:120rpx;'> | |||
@@ -15,9 +15,9 @@ | |||
</navigator> | |||
</view> | |||
<view class='section' wx:for='{{list}}' wx:key='{{index}}' bindtap="gotouse" data-quancode="{{item.id}}" data-couponorderstatus="{{item.couponOrderStatus}}"> | |||
<view class='section' wx:for='{{list}}' wx:key="index" bindtap="gotouse" data-quancode="{{item.id}}" data-couponorderstatus="{{item.couponOrderStatus}}"> | |||
<view class='mms'> | |||
<view class="{{item.couponOrderStatus == 0 ? 'detail_msg':'detail_msgYsy'}}" > | |||
<view class="{{item.couponOrderStatus == 0 ? 'detail_msg':'detail_msgYsy'}}"> | |||
<view class='logo'> | |||
<image mode="aspectFill" src='{{item.coverImg}}'></image> | |||
</view> | |||
@@ -14,20 +14,20 @@ Page({ | |||
flag: 1, | |||
answerflag: "", | |||
flagsex: 0, | |||
useImg:0, | |||
disabled:false, | |||
showReceiptUrl:false, | |||
receiptUrl:"", | |||
useImg: 0, | |||
disabled: false, | |||
showReceiptUrl: false, | |||
receiptUrl: "", | |||
items: [{ | |||
name: 1, | |||
value: '男', | |||
checked: false | |||
}, | |||
{ | |||
name: 2, | |||
value: '女', | |||
checked: false | |||
}, | |||
name: 1, | |||
value: '男', | |||
checked: false | |||
}, | |||
{ | |||
name: 2, | |||
value: '女', | |||
checked: false | |||
}, | |||
], | |||
username: "", | |||
array: ['上班族', '学生', '企业高管', '个体户', '自由职业', '其他'], | |||
@@ -39,7 +39,7 @@ Page({ | |||
/** | |||
* 获得生日 | |||
*/ | |||
bindDateChange: function(e) { | |||
bindDateChange: function (e) { | |||
this.setData({ | |||
date: e.detail.value, | |||
flag: 2 | |||
@@ -48,7 +48,7 @@ Page({ | |||
/** | |||
* 职业 | |||
*/ | |||
bindPickerChange: function(e) { | |||
bindPickerChange: function (e) { | |||
this.setData({ | |||
index: e.detail.value | |||
}) | |||
@@ -56,30 +56,30 @@ Page({ | |||
/** | |||
* 生活半径 | |||
*/ | |||
bindPickerChange1: function(e) { | |||
bindPickerChange1: function (e) { | |||
this.setData({ | |||
index1: e.detail.value | |||
}) | |||
}, | |||
address: function() { | |||
address: function () { | |||
let that = this; | |||
wx.chooseLocation({ | |||
success: function(res) { | |||
success: function (res) { | |||
that.setData({ | |||
address: res.name + '(' + res.address + ')', | |||
addressStr: JSON.stringify(res) | |||
}) | |||
}, | |||
fail: function(error) { | |||
fail: function (error) { | |||
console.log(error) | |||
}, | |||
complete: function(data) {} | |||
complete: function (data) { } | |||
}) | |||
}, | |||
change(value){ | |||
change(value) { | |||
console.log(value) | |||
}, | |||
formSubmit: function(e) { | |||
formSubmit: function (e) { | |||
app.globalData.previewFlag = true | |||
let that = this; | |||
@@ -115,25 +115,25 @@ Page({ | |||
//获得答案 | |||
delete e.detail.value.username; | |||
let obj = e.detail.value; | |||
if (that.data&&that.data.question&&that.data.question.length>0){ | |||
let valArr22=[]; | |||
Object.keys(obj).map(function (item,index) { | |||
if (that.data && that.data.question && that.data.question.length > 0) { | |||
let valArr22 = []; | |||
Object.keys(obj).map(function (item, index) { | |||
console.log(item, index) | |||
if (!obj[item]){ | |||
if (!obj[item]) { | |||
wx.showToast({ | |||
title: '问卷调查回答不完整,请补充', | |||
duration:2000, | |||
icon:"none" | |||
duration: 2000, | |||
icon: "none" | |||
}) | |||
that.setData({ | |||
answerflag:"noanswer" | |||
answerflag: "noanswer" | |||
}) | |||
}else{ | |||
} else { | |||
that.setData({ | |||
answerflag: "answer" | |||
}) | |||
// return { ques: that.data.question[index].ques, answer: obj[item] } | |||
} | |||
}); | |||
@@ -151,14 +151,14 @@ Page({ | |||
}) | |||
} else { | |||
that.setData({ | |||
answerflag: "answer" | |||
answerflag: "answer" | |||
}) | |||
valArr22.push({ ques: item.ques, answer: obj['answer' + index]}) | |||
valArr22.push({ ques: item.ques, answer: obj['answer' + index] }) | |||
} | |||
}) | |||
this.setData({ | |||
answer:valArr22 | |||
answer: valArr22 | |||
}); | |||
} | |||
@@ -167,16 +167,16 @@ Page({ | |||
title: '请输入完整的用户信息', | |||
icon: "none" | |||
}) | |||
} | |||
} | |||
else { | |||
if (this.data.answerflag == 'noanswer'){ | |||
}else{ | |||
if (this.data.answerflag == 'noanswer') { | |||
} else { | |||
that.setData({ | |||
disabled: true | |||
}) | |||
let data ={}; | |||
let data = {}; | |||
data = { | |||
sex: sex, | |||
address: address, | |||
@@ -184,18 +184,18 @@ Page({ | |||
birthday: birthday, | |||
answer: JSON.stringify(that.data.answer), | |||
activityId: that.data.activityId | |||
}; | |||
}; | |||
if (obj.number) { | |||
data.number = obj.number | |||
} | |||
if (obj.age) { | |||
data.age = obj.age | |||
} | |||
if (that.data.receiptUrl){ | |||
if (that.data.receiptUrl) { | |||
data.imgUrl = "[" + '"' + that.data.receiptUrl + '"' + "]"; | |||
} | |||
Http.post({ | |||
url: config.api.activityJoin, | |||
data: data | |||
@@ -218,11 +218,11 @@ Page({ | |||
duration: 2000, | |||
mask: false | |||
}) | |||
}) | |||
}) | |||
} | |||
} | |||
}, | |||
radioChange: function(e) { | |||
radioChange: function (e) { | |||
this.setData({ | |||
sex: e.detail.value, | |||
flagsex: 1 | |||
@@ -231,7 +231,7 @@ Page({ | |||
/** | |||
* 生命周期函数--监听页面加载 | |||
*/ | |||
onLoad: function(options) { | |||
onLoad: function (options) { | |||
let that = this; | |||
that.getLocation(); | |||
if (options && options.activityId) { | |||
@@ -247,8 +247,9 @@ Page({ | |||
wx.chooseImage({ | |||
success(res) { | |||
const tempFilePaths = res.tempFilePaths | |||
console.log(tempFilePaths, 'tempFilePaths'); | |||
wx.uploadFile({ | |||
url: config.url+config.api.imgUpload, | |||
url: config.url + config.api.fileUpload, | |||
filePath: tempFilePaths[0], | |||
name: 'file', | |||
header: { | |||
@@ -300,7 +301,7 @@ Page({ | |||
id: activityId | |||
} | |||
}).then(res => { | |||
if (res && res.data && res.data.activity) { | |||
if (res && res.data && res.data.activity) { | |||
this.setData({ | |||
useImg: res.data.activity.useImg, | |||
imgDetail: res.data.activity.imgDetail, | |||
@@ -15,8 +15,6 @@ Page({ | |||
avatarUrl: defaultAvatarUrl, | |||
nickName: '', | |||
username: '', | |||
theme: wx.getSystemInfoSync().theme, | |||
typeLsit: {}, | |||
date: '1988-03-12', | |||
dateEnd: '', | |||
dateFlag: 1, | |||
@@ -24,7 +22,9 @@ Page({ | |||
sexArry: ['男', '女'], | |||
sexFlag: 1, | |||
height: '', | |||
weight: '' | |||
weight: '', | |||
theme: wx.getSystemInfoSync().theme, | |||
typeLsit: {} | |||
}, | |||
/** | |||
@@ -51,14 +51,18 @@ Page({ | |||
}, | |||
getUserInfo(token) { | |||
let that = this; | |||
let that = this | |||
Http.get({ | |||
url: config.api.getScore, | |||
data: { | |||
token: token | |||
} | |||
}).then(res => { | |||
console.log(res, 'res'); | |||
console.log(res, 'res') | |||
let adress = null | |||
if (res.data.address) { | |||
adress = JSON.parse(res.data.address) | |||
} | |||
this.setData({ | |||
avatarUrl: res.data.avatarUrl, | |||
nickName: res.data.nickName, | |||
@@ -69,6 +73,7 @@ Page({ | |||
dateFlag: 2, | |||
height: res.data.height, | |||
weight: res.data.weight, | |||
address: adress ? adress.name + '(' + adress.address + ')' : '' | |||
}) | |||
}).catch(err => { | |||
console.log(err, 'err'); | |||
@@ -89,7 +94,7 @@ Page({ | |||
}) | |||
}, | |||
address() { | |||
setAddress() { | |||
let that = this; | |||
wx.chooseLocation({ | |||
success: function (res) { | |||
@@ -102,19 +107,20 @@ Page({ | |||
console.log(error) | |||
}, | |||
complete: function (data) { | |||
} | |||
}) | |||
}, | |||
goSetChildren() { | |||
wx.navigateTo({ | |||
url: '/pages/edit/edit?type=1"', | |||
url: '/pages/edit/edit?type=1', | |||
}) | |||
}, | |||
goSetAdress() { | |||
wx.navigateTo({ | |||
url: '/pages/siteUser/siteUser"', | |||
url: '/pages/siteUser/siteUser', | |||
}) | |||
}, | |||
@@ -137,7 +143,19 @@ Page({ | |||
address: that.data.addressStr || null, | |||
} | |||
console.log(data, 'data'); | |||
if (data.nickName) { | |||
if (!data.nickName) { | |||
wx.showToast({ | |||
title: '请输入昵称', | |||
icon: 'error', | |||
duration: 2000 | |||
}) | |||
} else if (!data.name) { | |||
wx.showToast({ | |||
title: '请输入真实姓名', | |||
icon: 'error', | |||
duration: 2000 | |||
}) | |||
} else { | |||
Http.post({ | |||
url: "/user/updateUserInfo", | |||
data, | |||
@@ -156,12 +174,6 @@ Page({ | |||
}).catch(err => { | |||
console.log(err); | |||
}) | |||
} else { | |||
wx.showToast({ | |||
title: '请输入昵称', | |||
icon: 'error', | |||
duration: 2000 | |||
}) | |||
} | |||
}, | |||
@@ -230,9 +242,21 @@ Page({ | |||
}, | |||
onChooseAvatar(e) { | |||
const that = this | |||
const { avatarUrl } = e.detail | |||
this.setData({ | |||
avatarUrl, | |||
wx.uploadFile({ | |||
url: config.url + config.api.fileUpload, | |||
header: { | |||
'token': app.globalData.token | |||
}, | |||
filePath: avatarUrl, | |||
name: 'file', | |||
success: function (res) { | |||
that.setData({ | |||
avatarUrl: JSON.parse(res.data).data.url | |||
}) | |||
} | |||
}) | |||
}, | |||
}) |
@@ -58,7 +58,7 @@ | |||
<view class="item"> | |||
<text>身高</text> | |||
<view class="right"> | |||
<input name='height' class="input" placeholder="请输入身高" value='{{height}}' /> | |||
<input name='height' class="input" placeholder="请输入身高" value='{{height}}' /><text>cm</text> | |||
<image class="next" src="/assets/images/next.png"></image> | |||
</view> | |||
</view> | |||
@@ -66,12 +66,12 @@ | |||
<view class="item"> | |||
<text>体重</text> | |||
<view class="right"> | |||
<input name='weight' class="input" placeholder="请输入体重" value='{{weight}}' /> | |||
<input name='weight' class="input" placeholder="请输入体重" value='{{weight}}' /><text>kg</text> | |||
<image class="next" src="/assets/images/next.png"></image> | |||
</view> | |||
</view> | |||
<view class='item' bindtap='address'> | |||
<view class='itemAdress' bindtap='setAddress'> | |||
<text>家庭住址</text> | |||
<view class="right"> | |||
<view class='input' wx:if="{{address}}">{{address}}</view> | |||
@@ -42,14 +42,25 @@ | |||
display: flex; | |||
justify-content: space-between; | |||
align-items: center; | |||
margin-bottom: 65rpx; | |||
height: 35rpx; | |||
margin-bottom: 40rpx; | |||
padding-bottom: 20rpx; | |||
border-bottom: solid 1px #dddddd; | |||
} | |||
.itemAdress { | |||
display: flex; | |||
justify-content: space-between; | |||
align-items: center; | |||
margin-bottom: 40rpx; | |||
padding-bottom: 20rpx; | |||
border-bottom: solid 1px #dddddd; | |||
} | |||
.input { | |||
text-align: right; | |||
padding-left: 20rpx; | |||
width: 400rpx; | |||
line-height: 70rpx; | |||
} | |||
.greyFont { | |||
@@ -17,8 +17,33 @@ Page({ | |||
switch1Checked: false, | |||
region: ['北京市', '北京市', '东城区'], | |||
id: "", | |||
url:"", | |||
url: "", | |||
typeLsit: {} | |||
}, | |||
/** | |||
* 获取全局样式 | |||
*/ | |||
getType() { | |||
Http.get({ | |||
url: config.api.setType, | |||
data: { | |||
mouldType: app.globalData.mouldType | |||
} | |||
}).then(res => { | |||
const { | |||
code, | |||
data | |||
} = res | |||
if (code == 200) { | |||
app.globalData.typeLsit = data | |||
this.setData({ | |||
typeLsit: data, | |||
}) | |||
} | |||
}) | |||
}, | |||
go(e) { | |||
let url = e.currentTarget.dataset.url | |||
wx.navigateTo({ | |||
@@ -63,7 +88,7 @@ Page({ | |||
duration: 2000, | |||
}) | |||
wx.navigateBack({ | |||
delta:1 | |||
delta: 1 | |||
}) | |||
}).catch(err => { | |||
wx.showToast({ | |||
@@ -122,7 +147,7 @@ Page({ | |||
icon: 'none', | |||
duration: 2000, | |||
}) | |||
wx.navigateBack({ | |||
delta: 1 | |||
}) | |||
@@ -144,8 +169,8 @@ Page({ | |||
/** | |||
* 生命周期函数--监听页面加载 | |||
*/ | |||
onLoad: function(options) { | |||
onLoad: function (options) { | |||
this.getType() | |||
if (options.id) { | |||
this.setData({ | |||
id: options.id | |||
@@ -181,49 +206,49 @@ Page({ | |||
/** | |||
* 生命周期函数--监听页面初次渲染完成 | |||
*/ | |||
onReady: function() { | |||
onReady: function () { | |||
}, | |||
/** | |||
* 生命周期函数--监听页面显示 | |||
*/ | |||
onShow: function() { | |||
onShow: function () { | |||
}, | |||
/** | |||
* 生命周期函数--监听页面隐藏 | |||
*/ | |||
onHide: function() { | |||
onHide: function () { | |||
}, | |||
/** | |||
* 生命周期函数--监听页面卸载 | |||
*/ | |||
onUnload: function() { | |||
onUnload: function () { | |||
}, | |||
/** | |||
* 页面相关事件处理函数--监听用户下拉动作 | |||
*/ | |||
onPullDownRefresh: function() { | |||
onPullDownRefresh: function () { | |||
}, | |||
/** | |||
* 页面上拉触底事件的处理函数 | |||
*/ | |||
onReachBottom: function() { | |||
onReachBottom: function () { | |||
}, | |||
/** | |||
* 用户点击右上角分享 | |||
*/ | |||
onShareAppMessage: function() { | |||
onShareAppMessage: function () { | |||
} | |||
}) |
@@ -1,4 +1,4 @@ | |||
<navbar back home text="新增收货地址" background='#FD832D' color="white"></navbar> | |||
<navbar back home text="新增收货地址" color="{{typeLsit.sy_top_f.styleClass}}" background="{{typeLsit.sy_top.styleClass}}"></navbar> | |||
<view style="height:{{navigationBarHeight}} "></view> | |||
<view class="itemBox"> | |||
<view class="title">收货人</view> | |||
@@ -15,11 +15,11 @@ | |||
<view class="itemBox"> | |||
<view class="title">所在地区</view> | |||
<view class="inputBox"> | |||
<picker mode="region" class="text" bindchange="bindRegionChange" value="{{region}}" custom-item="{{customItem}}"> | |||
<view class="picker"> | |||
{{region[0]}},{{region[1]}},{{region[2]}} | |||
</view> | |||
</picker> | |||
<picker mode="region" class="text" bindchange="bindRegionChange" value="{{region}}" custom-item="{{customItem}}"> | |||
<view class="picker"> | |||
{{region[0]}},{{region[1]}},{{region[2]}} | |||
</view> | |||
</picker> | |||
<!-- <input bindinput="setRegion"></input> --> | |||
</view> | |||
</view> | |||
@@ -36,5 +36,7 @@ | |||
<switch checked="{{switch1Checked}}" bindchange="switch1Change" /> | |||
</view> | |||
</view> | |||
<view class="add" bindtap="addSite">保存</view> | |||
<view wx:if="{{id}}" class="dle" bindtap="dleSite" >删除</view> | |||
<view class="btns"> | |||
<button type="primary" class="submit" bindtap="addSite">保存</button> | |||
<button type="warn" class="submit" wx:if="{{id}}" bindtap="dleSite">删除</button> | |||
</view> |
@@ -64,4 +64,12 @@ | |||
margin-left: auto; | |||
margin-right: auto; | |||
border-radius: 12rpx; | |||
} | |||
.btns { | |||
padding: 0 40rpx 0 40rpx; | |||
} | |||
.submit { | |||
margin-top: 50rpx; | |||
} |
@@ -10,9 +10,35 @@ Page({ | |||
*/ | |||
data: { | |||
navigationBarHeight, | |||
list:[], | |||
pageNum:1, | |||
list: [], | |||
pageNum: 1, | |||
theme: wx.getSystemInfoSync().theme, | |||
typeLsit: {} | |||
}, | |||
/** | |||
* 获取全局样式 | |||
*/ | |||
getType() { | |||
Http.get({ | |||
url: config.api.setType, | |||
data: { | |||
mouldType: app.globalData.mouldType | |||
} | |||
}).then(res => { | |||
const { | |||
code, | |||
data | |||
} = res | |||
if (code == 200) { | |||
app.globalData.typeLsit = data | |||
this.setData({ | |||
typeLsit: data, | |||
}) | |||
} | |||
}) | |||
}, | |||
goAdd(e) { | |||
let url = '/pages/siteAdd/siteAdd' | |||
wx.navigateTo({ | |||
@@ -20,48 +46,56 @@ Page({ | |||
}) | |||
console.log(url) | |||
}, | |||
gitLsit(){ | |||
gitLsit() { | |||
Http.get({ | |||
url: config.api.siteList, | |||
data:{ | |||
data: { | |||
pageNum: this.data.pageNum, | |||
pageSize:1000, | |||
pageSize: 1000, | |||
} | |||
}).then(res=>{ | |||
}).then(res => { | |||
let tempLsit = res.data.list | |||
tempLsit.map(item=>{ | |||
tempLsit.map(item => { | |||
let regionSty = "" | |||
if (JSON.parse(item.region)[0] == JSON.parse(item.region)[1]){ | |||
if (JSON.parse(item.region)[0] == JSON.parse(item.region)[1]) { | |||
regionSty = JSON.parse(item.region)[1] + JSON.parse(item.region)[2] | |||
}else{ | |||
regionSty = JSON.parse(item.region)[0]+JSON.parse(item.region)[1] + JSON.parse(item.region)[2] | |||
} else { | |||
regionSty = JSON.parse(item.region)[0] + JSON.parse(item.region)[1] + JSON.parse(item.region)[2] | |||
} | |||
item.regionSty = regionSty | |||
}) | |||
console.log(tempLsit) | |||
this.setData({ | |||
list: tempLsit | |||
}) | |||
}) | |||
}, | |||
dutu(e){ | |||
dutu(e) { | |||
wx.navigateTo({ | |||
url: `/pages/siteAdd/siteAdd?id=${e.currentTarget.dataset.id}`, | |||
}) | |||
}, | |||
/** | |||
* 生命周期函数--监听页面加载 | |||
*/ | |||
onLoad: function (options) { | |||
this.getType() | |||
wx.onThemeChange((result) => { | |||
this.setData({ | |||
theme: result.theme | |||
}) | |||
}) | |||
}, | |||
/** | |||
* 生命周期函数--监听页面初次渲染完成 | |||
*/ | |||
onReady: function () { | |||
}, | |||
/** | |||
@@ -1,4 +1,4 @@ | |||
<navbar back home text="我的收货地址" background='#FD832D' color="white"></navbar> | |||
<navbar back home color="{{typeLsit.sy_top_f.styleClass}}" background="{{typeLsit.sy_top.styleClass}}" text="我的收货地址"></navbar> | |||
<view style="height:{{navigationBarHeight}} "></view> | |||
<view class="siteItem" wx:for="{{list}}" wx:key="index"> | |||
<view class="siteBox"> | |||
@@ -14,4 +14,7 @@ | |||
<image mode="aspectFit" bindtap="dutu" data-id="{{item.id}}" class="updataImg" src="https://formall.oss-accelerate.aliyuncs.com/cimg/siteUpdata.png"></image> | |||
</view> | |||
<view class="addSite" bindtap="goAdd">+新建收货地址</view> | |||
<view class="btns"> | |||
<button type="primary" class="submit" bindtap="goAdd">+新建收货地址</button> | |||
</view> |
@@ -1,9 +1,10 @@ | |||
/* pages/siteUser/siteUser.wxss */ | |||
page{ | |||
page { | |||
background-color: #eee; | |||
} | |||
.siteItem{ | |||
.siteItem { | |||
width: 88%; | |||
margin: 20rpx auto; | |||
border-radius: 10rpx; | |||
@@ -12,14 +13,17 @@ page{ | |||
background-color: #fff; | |||
position: relative; | |||
} | |||
.siteBox{ | |||
.siteBox { | |||
float: left; | |||
width: 90%; | |||
} | |||
.titleBox{ | |||
.titleBox { | |||
overflow: hidden; | |||
} | |||
.moTxet{ | |||
.moTxet { | |||
background-color: #FD832D; | |||
color: #fff; | |||
float: left; | |||
@@ -29,24 +33,29 @@ page{ | |||
margin: 10rpx; | |||
} | |||
.region{ | |||
.region { | |||
padding: 10rpx; | |||
} | |||
.regionT{ | |||
.regionT { | |||
float: left; | |||
margin: 10rpx; | |||
} | |||
.detail{ | |||
.detail { | |||
color: #999; | |||
font-size: 26rpx | |||
} | |||
.phone{ | |||
.phone { | |||
color: #999; | |||
font-size: 26rpx | |||
} | |||
.updataImg{ | |||
.updataImg { | |||
float: right; | |||
width: 60rpx; | |||
@@ -55,7 +64,8 @@ page{ | |||
margin-top: 50rpx; | |||
margin-right: 2rpx | |||
} | |||
.addSite{ | |||
.addSite { | |||
background-color: #FD832D; | |||
color: #fff; | |||
width: 90%; | |||
@@ -65,3 +75,11 @@ page{ | |||
margin: 20rpx auto; | |||
line-height: 60rpx; | |||
} | |||
.btns { | |||
padding: 0 40rpx 0 40rpx; | |||
} | |||
.submit { | |||
margin-top: 50rpx; | |||
} |
@@ -5,14 +5,14 @@ | |||
<i-tab class='i-tab' wx:for="{{tabs}}" wx:key="unique" key="{{item.key}}" title="{{item.name}}"></i-tab> | |||
</i-tabs> | |||
<view style='padding-top:114rpx;'> | |||
<view wx:for='{{list}}' wx:if="{{list.length!=0}}" class='section' wx:key='{{index}}'> | |||
<view class='detail_msg' bindtap="gotoDetail" data-id='{{item.id}}'> | |||
<view wx:for='{{list}}' wx:if="{{list.length!=0}}" class='section' wx:key="index"> | |||
<view class='detail_msg' bindtap="gotoDetail" data-id='{{item.id}}'> | |||
<view class='logo'> | |||
<image src='{{item.coverImg}}' style="{{mouldConfig.activityDeyImgH}}"></image> | |||
<image src='{{item.coverImg}}' style="{{mouldConfig.activityDeyImgH}}"></image> | |||
</view> | |||
<view > | |||
<view> | |||
<view class="title">{{item.title}}</view> | |||
<view id="text" >报名时间:{{item.startTime}}至{{item.endTime}}</view> | |||
<view id="text">报名时间:{{item.startTime}}至{{item.endTime}}</view> | |||
<view id="text">活动时间:{{item.activityStartTime}}至{{item.activityEndTime}}</view> | |||
</view> | |||
<view class='info'> | |||
@@ -20,11 +20,11 @@ | |||
<image class="frImg" wx:if="{{item.status > 1&&item.past }}" src="{{blueImg}}" mode="aspectFill" lazy-load="true"><text>已过期</text></image> | |||
<!-- <image class="frImg" wx:if="{{item.status == 2&&key==0}}" src="{{grayImg}}" mode="aspectFill" lazy-load="true"><text>报名失败</text></image> --> | |||
<!-- <image class="frImg" wx:if="{{item.status == 3&&key==0}}" src="{{grayImg}}" mode="aspectFill" lazy-load="true"><text>活动结束</text></image> --> | |||
<view> | |||
<view> | |||
<!-- <text wx:if="{{item.status == 0&&key==0}}" style='font-size:30rpx;font-weight:bold;'>报名中</text> | |||
<text wx:if="{{item.status == 1&&key==0}}" style='font-size:30rpx;font-weight:bold;'>报名成功</text> | |||
<text wx:if="{{item.status == 2&&key==0}}" style='font-size:30rpx;font-weight:bold;'>报名失败</text> --> | |||
</view> | |||
</view> | |||
</view> | |||
</view> | |||
<!-- <view class='bottom'></view> --> | |||
@@ -2,7 +2,8 @@ | |||
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html", | |||
"projectname": "C", | |||
"setting": { | |||
"compileHotReLoad": true | |||
"compileHotReLoad": true, | |||
"urlCheck": true | |||
}, | |||
"libVersion": "2.27.0" | |||
} |