diff --git a/app.json b/app.json index 309e5e6..62e5cf2 100644 --- a/app.json +++ b/app.json @@ -21,6 +21,7 @@ "pages/home/me/mydevice/device", "pages/home/me/sq/sq", "pages/home/me/yjfk/yjfk", + "pages/home/me/jcjb/jcjb", "pages/home/xyc/wdyw/wdyw", "pages/home/xyc/tdyw/tdyw", "pages/home/me/grzl/grzl", diff --git a/pages/home/me/indexx.js b/pages/home/me/indexx.js index a6effe3..09c2e22 100644 --- a/pages/home/me/indexx.js +++ b/pages/home/me/indexx.js @@ -160,6 +160,11 @@ Page({ url: '/pages/home/me/manual/manual' }) }, + go2Jcjb(){ + wx.navigateTo({ + url: '/pages/home/me/jcjb/jcjb' + }) + }, getUserInfo(){ req.getRequest('/api/user/curt',{}).then((res)=>{ if(res.data.code==200){ diff --git a/pages/home/me/indexx.wxml b/pages/home/me/indexx.wxml index 45c1005..6eb6e7e 100644 --- a/pages/home/me/indexx.wxml +++ b/pages/home/me/indexx.wxml @@ -53,6 +53,10 @@ 小程序版本 V1.0 + + + + 解除羁绊 diff --git a/pages/home/me/jcjb/jcjb.js b/pages/home/me/jcjb/jcjb.js new file mode 100644 index 0000000..87c387e --- /dev/null +++ b/pages/home/me/jcjb/jcjb.js @@ -0,0 +1,97 @@ +// pages/home/me/jcjb/jcjb.js +const app = getApp();//新建页面时 默认引入 +const req = app.xzjlReq();//初始化一个的request() 实例 +Page({ + + /** + * 页面的初始数据 + */ + data: { + timeout:3, + showTimeout:false, + showDialog:false + }, + go2Reback(){ + wx.navigateBack({ changed: true }); + }, + handleLongPress() { + this.setData({showTimeout:true}) + const setIn = setInterval(() => { + this.setData({ + timeout: this.data.timeout - 1 + }) + },1000) + setTimeout(() => { + clearInterval(setIn) + this.setData({ + showTimeout:false, + showDialog:true + }) + req.patchRequest('/api/user/curt/lover/unbinding',{}).then((res) => { + console.log(res,'已经解除羁绊'); + }) + }, 3000) + }, + closeDialog(){ + this.setData({showDialog:false}) + wx.switchTab({ + url: '/pages/home/me/indexx' + }) + }, + + /** + * 生命周期函数--监听页面加载 + */ + onLoad(options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady() { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow() { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide() { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload() { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh() { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom() { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage() { + + } +}) \ No newline at end of file diff --git a/pages/home/me/jcjb/jcjb.json b/pages/home/me/jcjb/jcjb.json new file mode 100644 index 0000000..cdf14a7 --- /dev/null +++ b/pages/home/me/jcjb/jcjb.json @@ -0,0 +1,4 @@ +{ + "usingComponents": { + } +} \ No newline at end of file diff --git a/pages/home/me/jcjb/jcjb.wxml b/pages/home/me/jcjb/jcjb.wxml new file mode 100644 index 0000000..d676309 --- /dev/null +++ b/pages/home/me/jcjb/jcjb.wxml @@ -0,0 +1,29 @@ + + + +解除羁绊 + + + + + + {{ timeout }} + +确定与对方解除羁绊吗? +解除羁绊后,你们的数据将保留90天。90天内,如果再次建立羁绊,你们的数据将恢复。如果超过90天未再次建立羁绊,所有数据将永远清除,不可找回。 + + + + + + + +长按3秒解除羁绊 + + + + + 羁绊已解除 + 好的 + + \ No newline at end of file diff --git a/pages/home/me/jcjb/jcjb.wxss b/pages/home/me/jcjb/jcjb.wxss new file mode 100644 index 0000000..27d965c --- /dev/null +++ b/pages/home/me/jcjb/jcjb.wxss @@ -0,0 +1,148 @@ +/* pages/home/me/jcjb/jcjb.wxss */ +.reback{ + position: absolute; + margin-left: 20rpx; + margin-top:108rpx; + width:48rpx; + height:48rpx; + background-repeat: no-repeat; + background-size:100% 100%; + background-image: url(https://xzjl-1257436036.cos.ap-nanjing.myqcloud.com/me/reback.png); +} + +.title{ + position: absolute; + left: 278rpx; + top: 108rpx; + width: 196rpx; + height: 48rpx; + color: rgba(108, 108, 108, 1); + font-size: 32rpx; + text-align: center; + font-family: SourceHanSansSC-regular; +} + +.main-img { + position: absolute; + top: 240rpx; + left: 174rpx; + width: 400rpx; + height: 400rpx; +} + +.main-img image { + width: 100%; + height: 100%; +} + +.text1 { + position: absolute; + top: 740rpx; + width: 100%; + color: rgba(248, 99, 42, 1); + font-size: 48rpx; + font-weight: 700; + text-align: center; + font-family: SourceHanSansSC-bold; +} + +.text2 { + position: absolute; + top: 852rpx; + width: 100%; + padding: 0 100rpx; + box-sizing: border-box; + color: rgba(248, 99, 42, 1); + font-size: 16px; + text-align: justify; + font-family: SourceHanSansSC-regular; +} + +.btn-container { + width: 100%; + position: absolute; + bottom: 300rpx; + display: flex; + justify-content: center; +} + +.btn { + width: 181rpx; + height: 181rpx; + background: linear-gradient(233.49deg, rgba(248,99,42,1) 10.48%,rgba(249,135,89,1) 89.2%); + box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.4); + border: 4px solid rgba(255, 255, 255, 1); + border-radius: 50%; +} + +.btn image { + width: 100%; + height: 100%; +} + +.text3 { + position: absolute; + bottom: 182rpx; + width: 100%; + text-align: center; + color: rgba(108, 108, 108, 1); + font-size: 20px; + font-weight: 700; +} + +.timeout { + position: absolute; + top: 310rpx; + width: 100%; + color: rgba(248, 99, 42, 1); + font-size: 100px; + text-align: center; + font-weight: 700; +} + +.dialog { + position: absolute; + width: 100%; + height: 100%; + background-color: rgba(255, 255, 255, 0.8); +} + +.dialog-main{ + position: absolute; + left: 82rpx; + top: 544rpx; + width: 586rpx; + height: 434rpx; + line-height: 20px; + border-radius: 15px; + background-color: rgba(255, 255, 255, 1); + color: rgba(16, 16, 16, 1); + font-size: 14px; + text-align: center; + box-shadow: 1px 2px 6px 0px rgba(0, 0, 0, 0.4); +} + +.dialog-text { + width: 100%; + margin-top: 146rpx; + color: rgba(108, 108, 108, 1); + font-size: 36rpx; + text-align: center; +} + +.dialog-btn { + width: 210rpx; + height: 70rpx; + margin: 120rpx auto; + box-sizing: border-box; + border-radius: 20rpx; + background: linear-gradient(233.49deg, rgba(248,99,42,1) 10.48%,rgba(249,135,89,1) 89.2%); + text-align: center; + box-shadow: 0px 2px 6px 0px rgba(0, 0, 0, 0.4); + border: 3px solid rgba(255, 255, 255, 1); + color: #fff; + font-size: 28rpx; + display: flex; + justify-content: center; + align-items: center; +} \ No newline at end of file diff --git a/pages/home/me/yjfk/yjfk.js b/pages/home/me/yjfk/yjfk.js index 2fe02ca..5026e13 100644 --- a/pages/home/me/yjfk/yjfk.js +++ b/pages/home/me/yjfk/yjfk.js @@ -21,7 +21,7 @@ Page({ const contactWay = e.detail.value.contactWay; if (!/^1[3456789]\d{9}$/.test(contactWay)) { wx.showToast({ - title: '手机号码格式不正确', + title: '手机号码', icon: 'none' }); return; diff --git a/project.private.config.json b/project.private.config.json index c0eb7a7..052831f 100644 --- a/project.private.config.json +++ b/project.private.config.json @@ -28,6 +28,13 @@ "query": "", "launchMode": "default", "scene": null + }, + { + "name": "", + "pathName": "pages/home/me/jcjb/jcjb", + "query": "", + "launchMode": "default", + "scene": null } ] }