瀏覽代碼

【商品配送】【填写订单页面构建完成】

release
chenshengle 3 年之前
父節點
當前提交
3b989eea07
共有 14 個文件被更改,包括 531 次插入6 次删除
  1. +2
    -1
      app.json
  2. +4
    -0
      pages/bargain/bargainDatail/bargainDatail.js
  3. +1
    -0
      pages/bargain/bargainDatail/bargainDatail.wxml
  4. +3
    -0
      pages/coupon/detail/index.js
  5. +5
    -1
      pages/coupon/detail/index.wxml
  6. +26
    -0
      pages/coupon/detail/index.wxss
  7. +104
    -0
      pages/fillIndent/fillIndent.js
  8. +5
    -0
      pages/fillIndent/fillIndent.json
  9. +153
    -0
      pages/fillIndent/fillIndent.wxml
  10. +182
    -0
      pages/fillIndent/fillIndent.wxss
  11. +24
    -3
      pages/index/index.js
  12. +2
    -0
      pages/index/index.wxml
  13. +6
    -1
      pages/index/index.wxss
  14. +14
    -0
      project.config.json

+ 2
- 1
app.json 查看文件

@@ -75,7 +75,8 @@
"pages/questionnaire/questionnaireLsit/questionnaireLsit", "pages/questionnaire/questionnaireLsit/questionnaireLsit",
"pages/site/site", "pages/site/site",
"pages/siteUser/siteUser", "pages/siteUser/siteUser",
"pages/siteAdd/siteAdd"
"pages/siteAdd/siteAdd",
"pages/fillIndent/fillIndent"
], ],
"subpackages": [ "subpackages": [
{ {


+ 4
- 0
pages/bargain/bargainDatail/bargainDatail.js 查看文件

@@ -10,6 +10,7 @@ Page({
* 页面的初始数据 * 页面的初始数据
*/ */
data: { data: {
url:"",
navigationBarHeight, navigationBarHeight,
bannerUrl: imgurl.banner.url, bannerUrl: imgurl.banner.url,
wmhome: imgurl.wmhome.url, wmhome: imgurl.wmhome.url,
@@ -799,6 +800,9 @@ Page({
// var orderId = options.target.dataset.orderid; // var orderId = options.target.dataset.orderid;
shareObj.path = `/pages/index/index?orderId=${that.data.orderId}&from=${"discount"}&composeOrderType=${that.data.composeOrderType}`; shareObj.path = `/pages/index/index?orderId=${that.data.orderId}&from=${"discount"}&composeOrderType=${that.data.composeOrderType}`;
} }
this.setData({
url: shareObj.path
})
console.log(shareObj) console.log(shareObj)
// 返回shareObj // 返回shareObj
// return shareObj; // return shareObj;


+ 1
- 0
pages/bargain/bargainDatail/bargainDatail.wxml 查看文件

@@ -68,6 +68,7 @@
</view> </view>
</view> </view>
</view> </view>
<view>{{url}}</view>


<form bindsubmit="submit" report-submit='true'> <form bindsubmit="submit" report-submit='true'>
<view class="btns clearfix" wx:if="{{data.orderStatus != 7&&discountStatus==1&&todayDate<=data.pressEndDate&&data.orderStatus!=1&&data.orderStatus != 9}}" hover-class="none" hover-stop-propagation="false"> <view class="btns clearfix" wx:if="{{data.orderStatus != 7&&discountStatus==1&&todayDate<=data.pressEndDate&&data.orderStatus!=1&&data.orderStatus != 9}}" hover-class="none" hover-stop-propagation="false">


+ 3
- 0
pages/coupon/detail/index.js 查看文件

@@ -200,6 +200,9 @@ Page({
swiperCurrent: e.detail.current swiperCurrent: e.detail.current
}); });
}, },
gohome(e){
console.log(e.currentTarget.dataset.id,"123")
},




//获取当前登录用户信息 //获取当前登录用户信息


+ 5
- 1
pages/coupon/detail/index.wxml 查看文件

@@ -144,8 +144,12 @@
<image src='{{homeSelectedO}}' mode="widthFix"></image> <image src='{{homeSelectedO}}' mode="widthFix"></image>
<text class='btnTxt'>首页</text> <text class='btnTxt'>首页</text>
</button> </button>
<button form-type="submit" disabled='{{showbutton}}' hover-class='active' class='buy' wx:if="{{data.type!=8&&data.type!=50&&data.type!=51&&data.salePriceStr!=0&&data.remainInventory!=0&&endtime!='活动已结束'&&data.activityStatus!=0}}">
<button form-type="submit" disabled='{{showbutton}}' hover-class='active' class='buy' wx:if="{{data.type!=11&&data.type!=8&&data.type!=50&&data.type!=51&&data.salePriceStr!=0&&data.remainInventory!=0&&endtime!='活动已结束'&&data.activityStatus!=0}}">
<text class='txt'>{{data.salePriceStr}}元</text>马上购买</button> <text class='txt'>{{data.salePriceStr}}元</text>马上购买</button>
<button wx:if="{{data.type==11}}" bindtap="gohome" data-id="{{data.id}}" class="home">配送到家
</button>
<button wx:if="{{data.type==11}}" form-type="submit" class="arrive">到店购买
</button>
<button form-type="submit" disabled='{{showbutton}}' class='buy' wx:if="{{data.type!=8&&data.type!=50&&data.type!=51&&data.salePriceStr==0&&data.remainInventory!=0&&endtime!='活动已结束'&&data.activityStatus!=0}}">免费领取</button> <button form-type="submit" disabled='{{showbutton}}' class='buy' wx:if="{{data.type!=8&&data.type!=50&&data.type!=51&&data.salePriceStr==0&&data.remainInventory!=0&&endtime!='活动已结束'&&data.activityStatus!=0}}">免费领取</button>
<button form-type="submit" disabled='{{showbutton}}' class='buy' wx:if="{{data.type==51&&data.remainInventory!=0||data.type==50&&data.remainInventory!=0}}">马上兑换</button> <button form-type="submit" disabled='{{showbutton}}' class='buy' wx:if="{{data.type==51&&data.remainInventory!=0||data.type==50&&data.remainInventory!=0}}">马上兑换</button>
<button class='buy buyHr' disabled='true' wx:if="{{data.remainInventory==0&&endtime!='活动已结束'||data.remainInventory==0&&data.type==8}}">已售罄</button> <button class='buy buyHr' disabled='true' wx:if="{{data.remainInventory==0&&endtime!='活动已结束'||data.remainInventory==0&&data.type==8}}">已售罄</button>


+ 26
- 0
pages/coupon/detail/index.wxss 查看文件

@@ -111,6 +111,32 @@ button::after {
border-radius: 8rpx; border-radius: 8rpx;
transition: all 0.6s; 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 { .dot.active {
width: 24rpx; width: 24rpx;


+ 104
- 0
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 () {

}
})

+ 5
- 0
pages/fillIndent/fillIndent.json 查看文件

@@ -0,0 +1,5 @@
{
"usingComponents": {
"navbar": "../components/navbar/navbar"
}
}

+ 153
- 0
pages/fillIndent/fillIndent.wxml 查看文件

@@ -0,0 +1,153 @@
<navbar back home text="填写订单" background='#FD832D' color="white"></navbar>
<view style="height:{{navigationBarHeight}} "></view>
<view class="box">
<view class="siteBox">
<view class="siteTitle">
<view class="text">北京是朝阳区三环以内</view>
<view class="mpren">默认</view>
</view>
<view class="siteTitle siteText">北京市朝阳区南磨房东里123号楼234号</view>
<view class="siteTitle phoneBox">
<view class="name">圣达菲</view>
<view class="phone">138****7654</view>
</view>
<view class="pudataSite">更换</view>
</view>

<view class="commodityBox">
<view class="imgBox"></view>
<view class="commodityDie">
<view class="merchandiseName">商品名称商品名称商品名称商品名称 商品名称商品名称
</view>
<view class="priceBox">
<view class="price">¥9.9</view>

<view class="numberBox">
<view class="add" bindtap="addNum">+</view>
<view class="number">{{num}}</view>
<view class="dle" bindtap="dleNum">-</view>
</view>
</view>

</view>
</view>

<view class="commodityBox">
<view class="costBox">
<view class="text">商品金额:</view>
<view class="num">¥9.9</view>
</view>
<view class="costBox">
<view class="text">运费:</view>
<view class="num">¥9.9</view>
</view>
<view class="accountBox">
<view class="total">合计</view>
<view class="money">¥15.9</view>
</view>
</view>

<view class="payBox">
<view class="moneyStr">¥15.90</view>
<view class="pay">支付</view>
</view>


</view>

<view class="amendBox" wx:if="{{showShade}}">
<view class="siteBox shade">
<view class="siteItem">
<view>
<view class="siteTitle">
<view class="text">北京是朝阳区三环以内</view>
</view>
<view class="siteTitle siteText">北京市朝阳区南磨房东里123号楼234号</view>
<view class="siteTitle phoneBox" style="border-bottom: 1rpx #999 solid;padding-bottom: 20rpx;">
<view class="name">圣达菲</view>
<view class="phone">138****7654</view>
</view>
</view>
</view>

<view class="siteItem">
<view>
<view class="siteTitle">
<view class="text">北京是朝阳区三环以内</view>
</view>
<view class="siteTitle siteText">北京市朝阳区南磨房东里123号楼234号</view>
<view class="siteTitle phoneBox" style="border-bottom: 1rpx #999 solid;padding-bottom: 20rpx;">
<view class="name">圣达菲</view>
<view class="phone">138****7654</view>
</view>
</view>
</view>

<view class="siteItem">
<view>
<view class="siteTitle">
<view class="text">北京是朝阳区三环以内</view>
</view>
<view class="siteTitle siteText">北京市朝阳区南磨房东里123号楼234号</view>
<view class="siteTitle phoneBox" style="border-bottom: 1rpx #999 solid;padding-bottom: 20rpx;">
<view class="name">圣达菲</view>
<view class="phone">138****7654</view>
</view>
</view>
</view>

<view class="siteItem">
<view>
<view class="siteTitle">
<view class="text">北京是朝阳区三环以内</view>
</view>
<view class="siteTitle siteText">北京市朝阳区南磨房东里123号楼234号</view>
<view class="siteTitle phoneBox" style="border-bottom: 1rpx #999 solid;padding-bottom: 20rpx;">
<view class="name">圣达菲</view>
<view class="phone">138****7654</view>
</view>
</view>
</view>

<view class="siteItem">
<view>
<view class="siteTitle">
<view class="text">北京是朝阳区三环以内</view>
</view>
<view class="siteTitle siteText">北京市朝阳区南磨房东里123号楼234号</view>
<view class="siteTitle phoneBox" style="border-bottom: 1rpx #999 solid;padding-bottom: 20rpx;">
<view class="name">圣达菲</view>
<view class="phone">138****7654</view>
</view>
</view>
</view>

<view class="siteItem">
<view>
<view class="siteTitle">
<view class="text">北京是朝阳区三环以内</view>
</view>
<view class="siteTitle siteText">北京市朝阳区南磨房东里123号楼234号</view>
<view class="siteTitle phoneBox" style="border-bottom: 1rpx #999 solid;padding-bottom: 20rpx;">
<view class="name">圣达菲</view>
<view class="phone">138****7654</view>
</view>
</view>
</view>
<view class="siteItem">
<view>
<view class="siteTitle">
<view class="text">北京是朝阳区三环以内</view>
</view>
<view class="siteTitle siteText">北京市朝阳区南磨房东里123号楼234号</view>
<view class="siteTitle phoneBox" style="border-bottom: 1rpx #999 solid;padding-bottom: 20rpx;">
<view class="name">圣达菲</view>
<view class="phone">138****7654</view>
</view>
</view>
</view>



</view>
</view>

+ 182
- 0
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;
}

+ 24
- 3
pages/index/index.js 查看文件

@@ -7,7 +7,9 @@ Page({
/** /**
* 页面的初始数据 * 页面的初始数据
*/ */
data: {},
data: {
token:""
},
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
@@ -16,7 +18,7 @@ Page({
let that = this; let that = this;
console.log(options); console.log(options);
wx.showToast({ wx.showToast({
title: '加载中',
title: '加载中...',
icon: "loading", icon: "loading",
duration: 2000 duration: 2000
}) })
@@ -82,16 +84,25 @@ Page({
wx.setStorageSync('imgurl', imgurl); wx.setStorageSync('imgurl', imgurl);


if (app.globalData.token) { if (app.globalData.token) {
that.setData({
token: app.globalData.token
})
this.updateUserInfo(); this.updateUserInfo();
if (options.couponChannelId || options.orderId || options.id) { if (options.couponChannelId || options.orderId || options.id) {
that.userStatus(options); that.userStatus(options);
} else { } else {
that.userStatus();
that.userStatus();
} }
} else { } else {
// 由于 token 是网络请求,可能会在 Page.onLoad 之后才返回 // 由于 token 是网络请求,可能会在 Page.onLoad 之后才返回
// 所以此处加入 callback 以防止这种情况 // 所以此处加入 callback 以防止这种情况
app.tokenCallback = token => { app.tokenCallback = token => {
that.setData({
token: app.globalData.token
})
this.updateUserInfo(); this.updateUserInfo();
if (options.couponChannelId || options.orderId || options.id) { if (options.couponChannelId || options.orderId || options.id) {
that.userStatus(options); that.userStatus(options);
@@ -140,6 +151,7 @@ Page({
} }
}) })
.then(res => { .then(res => {
return
// res = JSON.parse('{"code":11004,"message":"用户昵称未授权,请跳转到用户昵称授权页!","data":{}}') // res = JSON.parse('{"code":11004,"message":"用户昵称未授权,请跳转到用户昵称授权页!","data":{}}')
//参与拼团 //参与拼团
@@ -377,6 +389,15 @@ Page({
}) })
.catch(err => { .catch(err => {
console.log(err) console.log(err)
this.setData({
err:err
})
wx.showToast({
title: err,
icon: "loading",
duration: 20001
})
return
if (err.code == 11004) { if (err.code == 11004) {
// 用户昵称未授权 // 用户昵称未授权
if (options && options.orderGroupId) { if (options && options.orderGroupId) {


+ 2
- 0
pages/index/index.wxml 查看文件

@@ -0,0 +1,2 @@
<view class="temp">{{token}}</view>
<view class="">"w lai le "</view>

+ 6
- 1
pages/index/index.wxss 查看文件

@@ -2,5 +2,10 @@ Page{
height: 100%; height: 100%;
width: 100%; width: 100%;
background:#fff; background:#fff;
opacity: 0;
/* opacity: 0; */
}
.temp{
width: 100%;
height: 100rpx;
margin-top: 40rpx;
} }

+ 14
- 0
project.config.json 查看文件

@@ -131,6 +131,20 @@
"pathName": "pages/siteUser/siteUser", "pathName": "pages/siteUser/siteUser",
"query": "", "query": "",
"scene": null "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
} }
] ]
} }


Loading…
取消
儲存