diff --git a/app.json b/app.json index 193eafe..7c2092e 100644 --- a/app.json +++ b/app.json @@ -35,7 +35,8 @@ "pages/index/calendar/calendar", "pages/index/city/selectcity", "pages/opera/stage/stage_photo", - "pages/user/discount/answer_topic/answer_topic" + "pages/user/discount/answer_topic/answer_topic", + "pages/special/straddlen/new_years" ], "usingComponents": { "van-icon": "@vant/weapp/icon/index", diff --git a/config.js b/config.js index 0ecd237..0881a83 100644 --- a/config.js +++ b/config.js @@ -144,7 +144,11 @@ const router_list = [ { id: 36, router_name: "pages/user/discount/answer_topic/answer_topic" - }, + },//答题专题 + { + id: 37, + router_name: "pages/special/straddlen/new_years" + },//专题 ] module.exports = { router_list diff --git a/pages/special/straddlen/new_years.js b/pages/special/straddlen/new_years.js new file mode 100644 index 0000000..5a19e4e --- /dev/null +++ b/pages/special/straddlen/new_years.js @@ -0,0 +1,256 @@ +const app = getApp() +import { + http, + httpUtil, + login_check +} from '../../../utils/util' +import { + host +} from '../../../Gdata' +Page({ + + /** + * 页面的初始数据 + */ + data: { + straddlen_list: [ + + { + id: 1, + url: 'https://mahuaimage2.oss-cn-qingdao.aliyuncs.com/mini_app/video/61cac6ad5dd76ec9ccbf0d9d2160aa9df5baed8fd5236.jpg' + }, + { + id: 2, + url: 'https://mahuaimage2.oss-cn-qingdao.aliyuncs.com/mini_app/video/61cac6ad9b188ec9ccbf0d9d2160aa9df5baed8fd5236.jpg', + }, + { + id: 3, + url: 'https://mahuaimage2.oss-cn-qingdao.aliyuncs.com/mini_app/video/61cac6adc235bec9ccbf0d9d2160aa9df5baed8fd5236.jpg', + router_path: '/pages/opera/show/show_detail?cycle_id=4266' + }, + { + id: 4, + url: 'https://mahuaimage2.oss-cn-qingdao.aliyuncs.com/mini_app/video/61cac6adf10ecec9ccbf0d9d2160aa9df5baed8fd5236.jpg' + }, + { + id: 5, + url: "https://mahuaimage2.oss-cn-qingdao.aliyuncs.com/mini_app/video/61cac6ae147744ea45ce96dac01e01bd1272c5e0a212d.jpg", + router_path: '/pages/opera/show/show_detail?cycle_id=4191' + }, + { + id: 6, + url: "https://mahuaimage2.oss-cn-qingdao.aliyuncs.com/mini_app/video/61cac6ae3fe584ea45ce96dac01e01bd1272c5e0a212d.jpg", + + }, + { + id: 7, + url: "https://mahuaimage2.oss-cn-qingdao.aliyuncs.com/mini_app/video/61cac6ae5bfb74ea45ce96dac01e01bd1272c5e0a212d.jpg", + router_path: '/pages/opera/show/show_detail?cycle_id=4265' + }, + { + id: 8, + url: "https://mahuaimage2.oss-cn-qingdao.aliyuncs.com/mini_app/video/61cac6ae9b83c4ea45ce96dac01e01bd1272c5e0a212d.jpg", + }, + { + id: 9, + url: "https://mahuaimage2.oss-cn-qingdao.aliyuncs.com/mini_app/video/61cac6aeb107a4ea45ce96dac01e01bd1272c5e0a212d.jpg", + router_path: '/pages/opera/show/show_detail?cycle_id=4239' + }, + { + id: 10, + url: "https://mahuaimage2.oss-cn-qingdao.aliyuncs.com/mini_app/video/61cac6aee19f54ea45ce96dac01e01bd1272c5e0a212d.jpg", + }, + { + id: 11, + url: "https://mahuaimage2.oss-cn-qingdao.aliyuncs.com/mini_app/video/61cac6af04e4abcbc9f3782865f83b94490981e992789.jpg", + router_path: '/pages/opera/show/show_detail?cycle_id=4296' + }, + { + id: 12, + url: 'https://mahuaimage2.oss-cn-qingdao.aliyuncs.com/mini_app/video/61cac6af30d73bcbc9f3782865f83b94490981e992789.jpg' + }, + { + id: 13, + url: "https://mahuaimage2.oss-cn-qingdao.aliyuncs.com/mini_app/video/61cac6af47235bcbc9f3782865f83b94490981e992789.jpg", + router_path: '/pages/opera/show/show_detail?cycle_id=4276' + }, + { + id: 14, + url: 'https://mahuaimage2.oss-cn-qingdao.aliyuncs.com/mini_app/video/61cac6af7c267bcbc9f3782865f83b94490981e992789.jpg' + }, + { + id: 15, + url: "https://mahuaimage2.oss-cn-qingdao.aliyuncs.com/mini_app/video/61cac6af99dacbcbc9f3782865f83b94490981e992789.jpg", + router_path: '/pages/opera/show/show_detail?cycle_id=4301' + }, + { + id: 16, + url: 'https://mahuaimage2.oss-cn-qingdao.aliyuncs.com/mini_app/video/61cac6afd5a84bcbc9f3782865f83b94490981e992789.jpg' + }, + { + id: 17, + url: "https://mahuaimage2.oss-cn-qingdao.aliyuncs.com/mini_app/video/61cac6afec8efbcbc9f3782865f83b94490981e992789.jpg", + router_path: '/pages/opera/show/show_detail?cycle_id=4306' + }, + { + id: 18, + url: 'https://mahuaimage2.oss-cn-qingdao.aliyuncs.com/mini_app/video/61cac6b01ff896db52cca6602afb21f90def085ebe24c.jpg' + }, + ], + form_list: { + activity_id: 37, + name: '', + mobile: '', + content: '' + }, + input1_top: 100, + input2_top: 176, + + }, + onChange(e) { + // console.log(e.currentTarget.dataset.router); + + let url = e.currentTarget.dataset.router + if (!url) { + return + } + console.log(url); + wx.navigateTo({ + url + }) + }, + bindUserName(e) { + console.log(e, 'bindUserName'); + // let username=e.detail.value + this.data.form_list.name = e.detail.value + }, + bindNumber(e) { + console.log(e, 'bindNumber'); + this.data.form_list.mobile = e.detail.value + }, + bindOpinion(e) { + console.log(e, 'bindOpinion'); + this.data.form_list.content = e.detail.value + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + let iphone_width = app.globalData.screenWidth + console.log(iphone_width,'屏幕宽度'); + if (iphone_width <= 320) { + console.log(320); + this.setData({ + input1_top: 96, + input2_top: 166, + }) + }else if(iphone_width > 320&&iphone_width <= 375){ + console.log('320-375'); + this.setData({ + input1_top: 96, + input2_top: 172, + }) + }else if(iphone_width > 375&&iphone_width < 400){ + console.log('375-400'); + this.setData({ + input1_top: 102, + input2_top: 170, + }) + } + }, + onSubmit() { + if (!login_check()) { + return + } + let { name, mobile, content } = this.data.form_list + if (!name) { + wx.showToast({ + title: '请输入姓名', + icon: 'none', + mask: true + }) + return + } + if (!mobile) { + wx.showToast({ + title: '请填写手机号', + icon: 'none', + mask: true + }) + return + } + var myreg = /^(((13[0-9]{1})|(15[0-9]{1})|(18[0-9]{1})|(17[0-9]{1}))+\d{8})$/; + if (!myreg.test(mobile)) { + wx.showToast({ + title: '手机号错误', + icon: 'none', + mask: true + }) + return + } + if (!content) { + wx.showToast({ + title: '请填写你想说的话', + icon: 'none', + mask: true + }) + return + } + http("/api/v1/topic-reply", "post", { ...this.data.form_list }).then(res => { + wx.showToast({ + title: '提交成功', + icon: 'none', + mask: true + }) + }) + // console.log(this.data.form_list, '111111'); + }, + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + } +}) \ No newline at end of file diff --git a/pages/special/straddlen/new_years.json b/pages/special/straddlen/new_years.json new file mode 100644 index 0000000..8835af0 --- /dev/null +++ b/pages/special/straddlen/new_years.json @@ -0,0 +1,3 @@ +{ + "usingComponents": {} +} \ No newline at end of file diff --git a/pages/special/straddlen/new_years.wxml b/pages/special/straddlen/new_years.wxml new file mode 100644 index 0000000..44ec7cd --- /dev/null +++ b/pages/special/straddlen/new_years.wxml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/pages/special/straddlen/new_years.wxss b/pages/special/straddlen/new_years.wxss new file mode 100644 index 0000000..4a24ed0 --- /dev/null +++ b/pages/special/straddlen/new_years.wxss @@ -0,0 +1,68 @@ +/* pages/special/straddlen/new_years.wxss */ +.img image { + width: 100%; + display: block; + margin-top: -1rpx; +} + +.positRel { + position: relative; +} + +.input { + /* transform: rotate(-3deg); */ +} + +.input input { + font-size: 28rpx; + line-height: 28rpx; + /* border: 1px solid red; */ + height: 40rpx; +} + +.input.input1 { + width: 120rpx; + /* height: 75rpx; */ + /* margin-bottom: 38rpx; */ + /* margin-left: 68rpx; */ + text-align: center; + position: absolute; + left: 236rpx; + top: 100rpx; + transform: rotate(-3deg); +} + +.input.input2 { + width: 300rpx; + position: absolute; + left: 236rpx; + top: 175rpx; + /* padding-left: 10rpx; */ + transform: rotate(-3deg); + text-align: center; +} + +.input.input3 { + position: absolute; + left: 230rpx; + top: 330rpx; +} + +.text3 { + width: 330rpx; + height: 110rpx; + /* border: 1px solid red; */ + font-size: 28rpx; + line-height: 28rpx; + transform: rotate(-5deg); + +} + +.img .submit { + position: absolute; + right: 60rpx; + bottom: 270rpx; + width: 160rpx; + height: 80rpx; + z-index: 10; +} \ No newline at end of file diff --git a/project.config.json b/project.config.json index 291b5df..e765673 100644 --- a/project.config.json +++ b/project.config.json @@ -30,15 +30,15 @@ "outputPath": "" }, "enableEngineNative": false, - "bundle": false, "useIsolateContext": true, - "useCompilerModule": true, - "userConfirmedUseCompilerModuleSwitch": false, "userConfirmedBundleSwitch": false, "packNpmManually": false, "packNpmRelationList": [], "minifyWXSS": true, - "minifyWXML": true + "disableUseStrict": false, + "minifyWXML": true, + "showES6CompileOption": false, + "useCompilerPlugins": false }, "compileType": "miniprogram", "libVersion": "2.21.1",