From 3b989eea07c08d91cf5f81d9d67b965ddea98a29 Mon Sep 17 00:00:00 2001 From: chenshengle <954534408@qq.com> Date: Thu, 23 Sep 2021 18:36:23 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E5=95=86=E5=93=81=E9=85=8D=E9=80=81?= =?UTF-8?q?=E3=80=91=E3=80=90=E5=A1=AB=E5=86=99=E8=AE=A2=E5=8D=95=E9=A1=B5?= =?UTF-8?q?=E9=9D=A2=E6=9E=84=E5=BB=BA=E5=AE=8C=E6=88=90=E3=80=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.json | 3 +- pages/bargain/bargainDatail/bargainDatail.js | 4 + .../bargain/bargainDatail/bargainDatail.wxml | 1 + pages/coupon/detail/index.js | 3 + pages/coupon/detail/index.wxml | 6 +- pages/coupon/detail/index.wxss | 26 +++ pages/fillIndent/fillIndent.js | 104 ++++++++++ pages/fillIndent/fillIndent.json | 5 + pages/fillIndent/fillIndent.wxml | 153 +++++++++++++++ pages/fillIndent/fillIndent.wxss | 182 ++++++++++++++++++ pages/index/index.js | 27 ++- pages/index/index.wxml | 2 + pages/index/index.wxss | 7 +- project.config.json | 14 ++ 14 files changed, 531 insertions(+), 6 deletions(-) create mode 100644 pages/fillIndent/fillIndent.js create mode 100644 pages/fillIndent/fillIndent.json create mode 100644 pages/fillIndent/fillIndent.wxml create mode 100644 pages/fillIndent/fillIndent.wxss diff --git a/app.json b/app.json index d533d18..93b5729 100644 --- a/app.json +++ b/app.json @@ -75,7 +75,8 @@ "pages/questionnaire/questionnaireLsit/questionnaireLsit", "pages/site/site", "pages/siteUser/siteUser", - "pages/siteAdd/siteAdd" + "pages/siteAdd/siteAdd", + "pages/fillIndent/fillIndent" ], "subpackages": [ { diff --git a/pages/bargain/bargainDatail/bargainDatail.js b/pages/bargain/bargainDatail/bargainDatail.js index 3789912..868cb35 100644 --- a/pages/bargain/bargainDatail/bargainDatail.js +++ b/pages/bargain/bargainDatail/bargainDatail.js @@ -10,6 +10,7 @@ Page({ * 页面的初始数据 */ data: { + url:"", navigationBarHeight, bannerUrl: imgurl.banner.url, wmhome: imgurl.wmhome.url, @@ -799,6 +800,9 @@ Page({ // var orderId = options.target.dataset.orderid; shareObj.path = `/pages/index/index?orderId=${that.data.orderId}&from=${"discount"}&composeOrderType=${that.data.composeOrderType}`; } + this.setData({ + url: shareObj.path + }) console.log(shareObj) // 返回shareObj // return shareObj; diff --git a/pages/bargain/bargainDatail/bargainDatail.wxml b/pages/bargain/bargainDatail/bargainDatail.wxml index 3df8e00..7a72f25 100644 --- a/pages/bargain/bargainDatail/bargainDatail.wxml +++ b/pages/bargain/bargainDatail/bargainDatail.wxml @@ -68,6 +68,7 @@ + {{url}}
diff --git a/pages/coupon/detail/index.js b/pages/coupon/detail/index.js index 93a2e9b..3a83c59 100644 --- a/pages/coupon/detail/index.js +++ b/pages/coupon/detail/index.js @@ -200,6 +200,9 @@ Page({ swiperCurrent: e.detail.current }); }, + gohome(e){ + console.log(e.currentTarget.dataset.id,"123") + }, //获取当前登录用户信息 diff --git a/pages/coupon/detail/index.wxml b/pages/coupon/detail/index.wxml index 58387bd..29b602c 100644 --- a/pages/coupon/detail/index.wxml +++ b/pages/coupon/detail/index.wxml @@ -144,8 +144,12 @@ 首页 - + + diff --git a/pages/coupon/detail/index.wxss b/pages/coupon/detail/index.wxss index c684b61..b3ff2df 100644 --- a/pages/coupon/detail/index.wxss +++ b/pages/coupon/detail/index.wxss @@ -111,6 +111,32 @@ button::after { border-radius: 8rpx; transition: all 0.6s; } +.home{ + position: relative; + background: linear-gradient(127deg, rgba(252, 177, 74, 1) 0%, rgba(254, 70, 20, 1) 100%); + height: 94rpx; + width: 230rpx; + /* margin: 0 auto 30rpx; */ + margin-left: 40rpx; + float: left; + color: #fff; + font-size: 36rpx; + line-height: 94rpx; + border-radius: 21rpx; +} +.arrive{ + position: relative; + background: linear-gradient(127deg, rgba(252, 177, 74, 1) 0%, rgba(254, 70, 20, 1) 100%); + height: 94rpx; + width: 230rpx; + /* margin: 0 auto 30rpx; */ + margin-left: 40rpx; + float: left; + color: #fff; + font-size: 36rpx; + line-height: 94rpx; + border-radius: 21rpx; +} .dot.active { width: 24rpx; diff --git a/pages/fillIndent/fillIndent.js b/pages/fillIndent/fillIndent.js new file mode 100644 index 0000000..ae4e5ac --- /dev/null +++ b/pages/fillIndent/fillIndent.js @@ -0,0 +1,104 @@ +var app = getApp(); +const navigationBarHeight = (getApp().statusBarHeight + 44) + 'px' +const extConfig = wx.getExtConfigSync ? wx.getExtConfigSync() : {} +const Http = require("../../utils/HttpBasics"); +const config = require("../../config/config.js"); +Page({ + + /** + * 页面的初始数据 + */ + data: { + navigationBarHeight, + num:1, + showShade:true, + }, + addNum(){ + let num = this.data.num + if(this.data.num>=10){ + wx.showToast({ + title: '购买总数超库存', + icon: 'none', + duration: 2000, + }) + }else{ + num = num + 1 + this.setData({ + num: num + }) + } + + }, + dleNum(){ + let num = this.data.num + if (this.data.num <=1){ + + wx.showToast({ + title: '购买总数不能为0', + icon: 'none', + duration: 2000, + }) + }else{ + + num = num - 1 + this.setData({ + num: num + }) + } + }, + /** + * 生命周期函数--监听页面加载 + */ + onLoad: function (options) { + + }, + + /** + * 生命周期函数--监听页面初次渲染完成 + */ + onReady: function () { + + }, + + /** + * 生命周期函数--监听页面显示 + */ + onShow: function () { + + }, + + /** + * 生命周期函数--监听页面隐藏 + */ + onHide: function () { + + }, + + /** + * 生命周期函数--监听页面卸载 + */ + onUnload: function () { + + }, + + /** + * 页面相关事件处理函数--监听用户下拉动作 + */ + onPullDownRefresh: function () { + + }, + + /** + * 页面上拉触底事件的处理函数 + */ + onReachBottom: function () { + + }, + + /** + * 用户点击右上角分享 + */ + onShareAppMessage: function () { + + } +}) \ No newline at end of file diff --git a/pages/fillIndent/fillIndent.json b/pages/fillIndent/fillIndent.json new file mode 100644 index 0000000..cedc479 --- /dev/null +++ b/pages/fillIndent/fillIndent.json @@ -0,0 +1,5 @@ +{ + "usingComponents": { + "navbar": "../components/navbar/navbar" + } +} \ No newline at end of file diff --git a/pages/fillIndent/fillIndent.wxml b/pages/fillIndent/fillIndent.wxml new file mode 100644 index 0000000..9315181 --- /dev/null +++ b/pages/fillIndent/fillIndent.wxml @@ -0,0 +1,153 @@ + + + + + + 北京是朝阳区三环以内 + 默认 + + 北京市朝阳区南磨房东里123号楼234号 + + 圣达菲 + 138****7654 + + 更换 + + + + + + 商品名称商品名称商品名称商品名称 商品名称商品名称 + + + ¥9.9 + + + + + {{num}} + - + + + + + + + + + 商品金额: + ¥9.9 + + + 运费: + ¥9.9 + + + 合计 + ¥15.9 + + + + + ¥15.90 + 支付 + + + + + + + + + + + 北京是朝阳区三环以内 + + 北京市朝阳区南磨房东里123号楼234号 + + 圣达菲 + 138****7654 + + + + + + + + 北京是朝阳区三环以内 + + 北京市朝阳区南磨房东里123号楼234号 + + 圣达菲 + 138****7654 + + + + + + + + 北京是朝阳区三环以内 + + 北京市朝阳区南磨房东里123号楼234号 + + 圣达菲 + 138****7654 + + + + + + + + 北京是朝阳区三环以内 + + 北京市朝阳区南磨房东里123号楼234号 + + 圣达菲 + 138****7654 + + + + + + + + 北京是朝阳区三环以内 + + 北京市朝阳区南磨房东里123号楼234号 + + 圣达菲 + 138****7654 + + + + + + + + 北京是朝阳区三环以内 + + 北京市朝阳区南磨房东里123号楼234号 + + 圣达菲 + 138****7654 + + + + + + + 北京是朝阳区三环以内 + + 北京市朝阳区南磨房东里123号楼234号 + + 圣达菲 + 138****7654 + + + + + + + + \ No newline at end of file diff --git a/pages/fillIndent/fillIndent.wxss b/pages/fillIndent/fillIndent.wxss new file mode 100644 index 0000000..831c65d --- /dev/null +++ b/pages/fillIndent/fillIndent.wxss @@ -0,0 +1,182 @@ +.page{ + background: #F4F5F9; + +} +.box{ + width: 96%; + margin: 0 auto; +} +.siteBox{ + background-color: #fff; + border-radius: 10rpx; + overflow: hidden; + margin-top: 20rpx; + position: relative; +} +.siteTitle{ + overflow: hidden; + margin: 20rpx ; +} +.text{ + float: left; + font-size: 26rpx; + color: #999; +} +.mpren{ + float: left; + font-size: 24rpx; + color: #FD832D; + margin-left: 20rpx; +} +.siteText{ + font-size: 28rpx; +} +.phoneBox{ + overflow: hidden; +} +.name{ + float: left; + font-size: 24rpx; + color: #999; +} +.phone{ + font-size: 24rpx; + color: #999; + float: left; + margin-left: 30rpx +} +.pudataSite{ + position: absolute; + padding: 10rpx; + border: 1rpx solid #999; + top: 40rpx; + right: 10rpx; + font-size: 26rpx; + border-radius: 8rpx; + color: rgb(36, 36, 36); +} +.commodityBox{ + background-color: #fff; + border-radius: 10rpx; + overflow: hidden; + margin-top: 20rpx; +} +.imgBox{ + float: left; + width: 30%; + height: 140rpx; + background-color: darkturquoise; + margin: 20rpx 0 20rpx 20rpx; +} +.commodityDie{ + + width: 60%; + float: left; + margin: 20rpx 0 20rpx 10rpx; +} +.merchandiseName{ + font-size: 26rpx; + color: #999; +} +.priceBox{ + margin-top: 10rpx; + font-size: 26rpx; + overflow: hidden; +} +.price{ + font-size: 26rpx; + color: #FD832D; + float: left; +} +.numberBox{ + + overflow: hidden; + bottom: 20rpx +} +.add{ + float: right; + width: 30rpx; + text-align: center; +} +.number{ + float: right; + width: 30rpx; + text-align: center; +} +.dle{ + float: right; + width: 30rpx; + text-align: center; +} +.costBox{ + overflow: hidden; + margin: 20rpx; +} +.costBox .text{ + font-size: 26rpx; + color: #000; + float: left; +} +.costBox .num{ + font-size: 26rpx; + float: right; +} +.accountBox{ + margin-left: 20rpx; + margin-right: 20rpx; + margin-top: 100rpx; + padding-top: 40rpx; + margin-bottom: 20rpx; + border-top: 1rpx silver solid; + + overflow: hidden; +} +.total{ + float: left; + font-size: 26rpx; +} +.money{ + float: right; + font-size: 26rpx; +} +.payBox{ + position: fixed; + bottom: 40rpx; + left: 20rpx; + width: 96%; + background-color: #fff; + padding: 30rpx 0; + border-radius: 10rpx; +} +.moneyStr{ + float: left; + color: red; + line-height: 60rpx; + border-radius: 10rpx; + font-weight: 600; + margin-left: 20rpx +} +.pay{ + float: right; + width: 220rpx; + height: 60rpx; + background-color: #FD832D; + border-radius: 10rpx; + color: #fff; + line-height: 60rpx; + margin-right: 20rpx; + text-align: center; +} +.amendBox{ + width: 100%; + top: 0; + position: fixed; + height: 100vh; + background-color: rgba(36, 36, 36, 0.3) +} +.shade{ + width: 80%; + height: 70vh; + margin: 200rpx auto 0 auto; + overflow: scroll; +} \ No newline at end of file diff --git a/pages/index/index.js b/pages/index/index.js index 1497943..05806df 100644 --- a/pages/index/index.js +++ b/pages/index/index.js @@ -7,7 +7,9 @@ Page({ /** * 页面的初始数据 */ - data: {}, + data: { + token:"" + }, /** * 生命周期函数--监听页面加载 */ @@ -16,7 +18,7 @@ Page({ let that = this; console.log(options); wx.showToast({ - title: '加载中', + title: '加载中...', icon: "loading", duration: 2000 }) @@ -82,16 +84,25 @@ Page({ wx.setStorageSync('imgurl', imgurl); if (app.globalData.token) { + that.setData({ + token: app.globalData.token + }) + this.updateUserInfo(); if (options.couponChannelId || options.orderId || options.id) { that.userStatus(options); } else { - that.userStatus(); + that.userStatus(); } } else { + // 由于 token 是网络请求,可能会在 Page.onLoad 之后才返回 // 所以此处加入 callback 以防止这种情况 app.tokenCallback = token => { + that.setData({ + token: app.globalData.token + }) + this.updateUserInfo(); if (options.couponChannelId || options.orderId || options.id) { that.userStatus(options); @@ -140,6 +151,7 @@ Page({ } }) .then(res => { + return // res = JSON.parse('{"code":11004,"message":"用户昵称未授权,请跳转到用户昵称授权页!","data":{}}') //参与拼团 @@ -377,6 +389,15 @@ Page({ }) .catch(err => { console.log(err) + this.setData({ + err:err + }) + wx.showToast({ + title: err, + icon: "loading", + duration: 20001 + }) + return if (err.code == 11004) { // 用户昵称未授权 if (options && options.orderGroupId) { diff --git a/pages/index/index.wxml b/pages/index/index.wxml index e69de29..8dd408b 100644 --- a/pages/index/index.wxml +++ b/pages/index/index.wxml @@ -0,0 +1,2 @@ +{{token}} +"w lai le " \ No newline at end of file diff --git a/pages/index/index.wxss b/pages/index/index.wxss index f859af0..adeb4d3 100644 --- a/pages/index/index.wxss +++ b/pages/index/index.wxss @@ -2,5 +2,10 @@ Page{ height: 100%; width: 100%; background:#fff; - opacity: 0; + /* opacity: 0; */ +} +.temp{ + width: 100%; + height: 100rpx; + margin-top: 40rpx; } diff --git a/project.config.json b/project.config.json index ba0a972..fb97b60 100644 --- a/project.config.json +++ b/project.config.json @@ -131,6 +131,20 @@ "pathName": "pages/siteUser/siteUser", "query": "", "scene": null + }, + { + "id": 10, + "name": "pages/index/index", + "pathName": "pages/index/index", + "query": "orderId=600924863166734336&from=discount&composeOrderType=0", + "scene": null + }, + { + "id": -1, + "name": "填写订单", + "pathName": "pages/fillIndent/fillIndent", + "query": "", + "scene": null } ] }