diff --git a/config/config.js b/config/config.js index c4d7bb6..297d2ca 100755 --- a/config/config.js +++ b/config/config.js @@ -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 diff --git a/ext.json b/ext.json index 3c0587f..34dfe10 100644 --- a/ext.json +++ b/ext.json @@ -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": { diff --git a/index/passCar.wxml b/index/passCar.wxml index dbe9a3b..50daf4a 100644 --- a/index/passCar.wxml +++ b/index/passCar.wxml @@ -173,7 +173,7 @@ - + diff --git a/index/user.wxml b/index/user.wxml index 7e41085..0aba97c 100644 --- a/index/user.wxml +++ b/index/user.wxml @@ -119,7 +119,7 @@ > - + 完善个人信息 > diff --git a/pages/cardorder/index/index.wxml b/pages/cardorder/index/index.wxml index 8e2ad5e..df1f204 100644 --- a/pages/cardorder/index/index.wxml +++ b/pages/cardorder/index/index.wxml @@ -1,7 +1,7 @@ - + @@ -16,13 +16,13 @@ - - + + - + diff --git a/pages/couponorder/index/index.wxml b/pages/couponorder/index/index.wxml index c7bc4a3..a8089df 100644 --- a/pages/couponorder/index/index.wxml +++ b/pages/couponorder/index/index.wxml @@ -1,7 +1,7 @@ - + @@ -16,7 +16,7 @@ - + - + diff --git a/pages/discountCardList/discountCardList.wxml b/pages/discountCardList/discountCardList.wxml index 5f59c97..aacfa0f 100644 --- a/pages/discountCardList/discountCardList.wxml +++ b/pages/discountCardList/discountCardList.wxml @@ -2,11 +2,11 @@ - + - - + + @@ -18,19 +18,19 @@ - + - + - - {{item.title}} + + {{item.title}} - - - - {{item.salePriceStr}} - - 购买 + + + + {{item.salePriceStr}} + + 购买 diff --git a/pages/edit/edit.js b/pages/edit/edit.js index 082ce71..441d9d1 100644 --- a/pages/edit/edit.js +++ b/pages/edit/edit.js @@ -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({ diff --git a/pages/edit/edit.wxml b/pages/edit/edit.wxml index 8be1bef..d6dc91b 100644 --- a/pages/edit/edit.wxml +++ b/pages/edit/edit.wxml @@ -49,7 +49,7 @@ 姓名 - + @@ -75,11 +75,15 @@ - 删除 + 删除 - - + + + + + + \ No newline at end of file diff --git a/pages/edit/edit.wxss b/pages/edit/edit.wxss index 23bbc3f..1ca5da0 100644 --- a/pages/edit/edit.wxss +++ b/pages/edit/edit.wxss @@ -167,4 +167,12 @@ radio { text-align: center; margin-top: 100rpx; margin-left: 2%; +} + +.btns { + padding: 0 40rpx 0 40rpx; +} + +.submit { + margin-top: 50rpx; } \ No newline at end of file diff --git a/pages/passCar/couponList/couponList.wxml b/pages/passCar/couponList/couponList.wxml index 71731aa..04991e6 100644 --- a/pages/passCar/couponList/couponList.wxml +++ b/pages/passCar/couponList/couponList.wxml @@ -1,8 +1,8 @@ - + - + @@ -15,9 +15,9 @@ - + - + diff --git a/pages/radetail/joinActivity/edit.js b/pages/radetail/joinActivity/edit.js index fa505c0..a4bb74f 100644 --- a/pages/radetail/joinActivity/edit.js +++ b/pages/radetail/joinActivity/edit.js @@ -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, diff --git a/pages/setUserInfo/index.js b/pages/setUserInfo/index.js index edaee0a..eed6acb 100644 --- a/pages/setUserInfo/index.js +++ b/pages/setUserInfo/index.js @@ -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 + }) + } }) + }, }) \ No newline at end of file diff --git a/pages/setUserInfo/index.wxml b/pages/setUserInfo/index.wxml index 34ff370..19909b7 100644 --- a/pages/setUserInfo/index.wxml +++ b/pages/setUserInfo/index.wxml @@ -58,7 +58,7 @@ 身高 - + cm @@ -66,12 +66,12 @@ 体重 - + kg - + 家庭住址 {{address}} diff --git a/pages/setUserInfo/index.wxss b/pages/setUserInfo/index.wxss index 0909b13..a284d72 100644 --- a/pages/setUserInfo/index.wxss +++ b/pages/setUserInfo/index.wxss @@ -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 { diff --git a/pages/siteAdd/siteAdd.js b/pages/siteAdd/siteAdd.js index 070081b..b6d9e6c 100644 --- a/pages/siteAdd/siteAdd.js +++ b/pages/siteAdd/siteAdd.js @@ -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 () { } }) \ No newline at end of file diff --git a/pages/siteAdd/siteAdd.wxml b/pages/siteAdd/siteAdd.wxml index ea4f697..a2369e1 100644 --- a/pages/siteAdd/siteAdd.wxml +++ b/pages/siteAdd/siteAdd.wxml @@ -1,4 +1,4 @@ - + 收货人 @@ -15,11 +15,11 @@ 所在地区 - - - {{region[0]}},{{region[1]}},{{region[2]}} - - + + + {{region[0]}},{{region[1]}},{{region[2]}} + + @@ -36,5 +36,7 @@ -保存 -删除 \ No newline at end of file + + + + \ No newline at end of file diff --git a/pages/siteAdd/siteAdd.wxss b/pages/siteAdd/siteAdd.wxss index 53f1c2f..0a6b0a7 100644 --- a/pages/siteAdd/siteAdd.wxss +++ b/pages/siteAdd/siteAdd.wxss @@ -64,4 +64,12 @@ margin-left: auto; margin-right: auto; border-radius: 12rpx; +} + +.btns { + padding: 0 40rpx 0 40rpx; +} + +.submit { + margin-top: 50rpx; } \ No newline at end of file diff --git a/pages/siteUser/siteUser.js b/pages/siteUser/siteUser.js index a28e7cd..727d600 100644 --- a/pages/siteUser/siteUser.js +++ b/pages/siteUser/siteUser.js @@ -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 () { - + }, /** diff --git a/pages/siteUser/siteUser.wxml b/pages/siteUser/siteUser.wxml index 64abba8..a0f3e0c 100644 --- a/pages/siteUser/siteUser.wxml +++ b/pages/siteUser/siteUser.wxml @@ -1,4 +1,4 @@ - + @@ -14,4 +14,7 @@ -+新建收货地址 \ No newline at end of file + + + + \ No newline at end of file diff --git a/pages/siteUser/siteUser.wxss b/pages/siteUser/siteUser.wxss index d33e629..ecc2cfd 100644 --- a/pages/siteUser/siteUser.wxss +++ b/pages/siteUser/siteUser.wxss @@ -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; +} \ No newline at end of file diff --git a/pages/user/myactivity/index.wxml b/pages/user/myactivity/index.wxml index 50753ed..cc7a628 100644 --- a/pages/user/myactivity/index.wxml +++ b/pages/user/myactivity/index.wxml @@ -5,14 +5,14 @@ - - + + - + {{item.title}} - 报名时间:{{item.startTime}}至{{item.endTime}} + 报名时间:{{item.startTime}}至{{item.endTime}} 活动时间:{{item.activityStartTime}}至{{item.activityEndTime}} @@ -20,11 +20,11 @@ 已过期 - + - + diff --git a/project.private.config.json b/project.private.config.json index 4cbe363..f160107 100644 --- a/project.private.config.json +++ b/project.private.config.json @@ -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" } \ No newline at end of file