first commit
This commit is contained in:
1
衣莎项目/源码/YiShaXiYi/mall/.pydio
Normal file
1
衣莎项目/源码/YiShaXiYi/mall/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
2ccab46c-8ec5-4b91-b259-8e7e203c49ed
|
||||
1
衣莎项目/源码/YiShaXiYi/mall/auth/.pydio
Normal file
1
衣莎项目/源码/YiShaXiYi/mall/auth/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
ccdddbe7-34c2-4ec0-a0ca-b3c7ed05f1cb
|
||||
116
衣莎项目/源码/YiShaXiYi/mall/auth/auth.js
Normal file
116
衣莎项目/源码/YiShaXiYi/mall/auth/auth.js
Normal file
@@ -0,0 +1,116 @@
|
||||
// mall/auth/auth.js
|
||||
const app = getApp();
|
||||
const regeneratorRuntime = app.loadAsync()
|
||||
const model = app.loadModel("index")
|
||||
const http = app.loadHttp()
|
||||
const util = app.loadUtils("util")
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
index: "1",//tab选中
|
||||
cartNum: 0
|
||||
},
|
||||
// tab选中
|
||||
async tabSwitch(e) {
|
||||
let index = e.currentTarget.dataset.index
|
||||
if (index != 1 && index != 4 && index != 2) {
|
||||
let isLogin = await util.isLoginJump()
|
||||
if (isLogin == 1) return;
|
||||
}
|
||||
if (index == 2) {
|
||||
wx.navigateTo({
|
||||
url: "/mall/shopcart/shopcart"
|
||||
})
|
||||
return
|
||||
}
|
||||
if (index == 3) {
|
||||
wx.navigateTo({
|
||||
url: "/mall/laundryList/laundryList"
|
||||
})
|
||||
return
|
||||
}
|
||||
if (index == 4) {
|
||||
wx.redirectTo({
|
||||
url: "/pages/auth/auth?index=1"
|
||||
})
|
||||
return
|
||||
}
|
||||
this.setData({
|
||||
index: index
|
||||
})
|
||||
},
|
||||
// 实时更新购物车角标
|
||||
async realUpdateCarker() {
|
||||
let res = await model.shopCart.getCart()
|
||||
app.globalData.cartNum = res.length
|
||||
var that = this
|
||||
app.setWatching('cartNum', (v) => {
|
||||
that.setData({
|
||||
cartNum: v
|
||||
});
|
||||
});
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
this.realUpdateCarker()
|
||||
let that = this
|
||||
// 需要跳转到首页tabbar时需要路径参数index,否则不激活
|
||||
that.setData({
|
||||
index: options.index || '1'
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow: function () {
|
||||
this.realUpdateCarker()
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage: function () {
|
||||
|
||||
}
|
||||
})
|
||||
5
衣莎项目/源码/YiShaXiYi/mall/auth/auth.json
Normal file
5
衣莎项目/源码/YiShaXiYi/mall/auth/auth.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"usingComponents": {
|
||||
"index":"../index/index"
|
||||
}
|
||||
}
|
||||
36
衣莎项目/源码/YiShaXiYi/mall/auth/auth.wxml
Normal file
36
衣莎项目/源码/YiShaXiYi/mall/auth/auth.wxml
Normal file
@@ -0,0 +1,36 @@
|
||||
<!-- mall/auth/auth.wxml -->
|
||||
<view class="auth">
|
||||
<index wx:if="{{ index == 1 }}"></index>
|
||||
<!-- <shopcart wx:if="{{ index == 2 }}" ></shopcart> -->
|
||||
</view>
|
||||
<view class="TabBar">
|
||||
<view class="cu-bar tabbar bg-white">
|
||||
<view data-index="1" bind:tap="tabSwitch" class="action">
|
||||
<view class="cuIcon-cu-image">
|
||||
<image src="{{ index == 1 ? '/static/img/icon/scs.png' : '/static/img/icon/scs1.png' }}"></image>
|
||||
</view>
|
||||
<view class="{{ index == 1 ? 'text-green' : 'text-gray' }} mt10">商城</view>
|
||||
</view>
|
||||
<view data-index="2" bind:tap="tabSwitch" class="action">
|
||||
<view class="cuIcon-cu-image">
|
||||
<image src="{{ index == 2 ? '/static/img/icon/gwcs.png' : '/static/img/icon/gwcs1.png' }}"></image>
|
||||
<view wx:if="{{ cartNum > 0 }}" class="cu-tag badge">{{ cartNum }}</view>
|
||||
</view>
|
||||
<view class="{{ index == 2 ? 'text-green' : 'text-gray' }} mt10">购物车</view>
|
||||
</view>
|
||||
<view data-index="3" bind:tap="tabSwitch" class="action">
|
||||
<view class="cuIcon-cu-image">
|
||||
<image src="{{ index == 3 ? '/static/img/icon/dd1.png' : '/static/img/icon/dd.png' }}"></image>
|
||||
</view>
|
||||
<view class="{{ index == 3 ? 'text-green' : 'text-gray' }} mt10">订单</view>
|
||||
</view>
|
||||
<view data-index="4" bind:tap="tabSwitch" class="action">
|
||||
<view class="cuIcon-cu-image">
|
||||
<image src="{{ index == 4 ? '/static/img/icon/syxz.png' : '/static/img/icon/sy.png' }}"></image>
|
||||
</view>
|
||||
<view class="{{ index == 4 ? 'text-green' : 'text-gray' }} mt10">返回首页</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- toasta提示 -->
|
||||
<i-toast id="toast" />
|
||||
8
衣莎项目/源码/YiShaXiYi/mall/auth/auth.wxss
Normal file
8
衣莎项目/源码/YiShaXiYi/mall/auth/auth.wxss
Normal file
@@ -0,0 +1,8 @@
|
||||
/* mall/auth/auth.wxss */
|
||||
.cuIcon-cu-image image{
|
||||
width: 33rpx !important;
|
||||
height: 37rpx !important;
|
||||
}
|
||||
.TabBar{
|
||||
box-shadow: 0px -8px 20px 0px rgba(14, 5, 9, 0.06);
|
||||
}
|
||||
1
衣莎项目/源码/YiShaXiYi/mall/chooseStores/.pydio
Normal file
1
衣莎项目/源码/YiShaXiYi/mall/chooseStores/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
55e994aa-3e6e-4e57-add6-b95c5f4c3e24
|
||||
141
衣莎项目/源码/YiShaXiYi/mall/chooseStores/chooseStores.js
Normal file
141
衣莎项目/源码/YiShaXiYi/mall/chooseStores/chooseStores.js
Normal file
@@ -0,0 +1,141 @@
|
||||
// user/address/address.js
|
||||
const app = getApp();
|
||||
const util = app.loadUtils("util");
|
||||
const regeneratorRuntime = app.loadAsync();
|
||||
const model = app.loadModel("index");
|
||||
const http = app.loadHttp();
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
system: app.globalData.system, //设备相关信息
|
||||
pageTitle: "门店地址选择", //头部标题
|
||||
isBack: true,//显示返回
|
||||
name: "",//收货人姓名
|
||||
tel: "",//收货人手机号
|
||||
store: {},//门店信息
|
||||
},
|
||||
// 选择门店地址的方法
|
||||
async add() {
|
||||
wx.navigateTo({
|
||||
url: "/mall/chooseStores/storesAdd/storesAdd"
|
||||
})
|
||||
},
|
||||
//
|
||||
async getUserTelNum(){
|
||||
let res = await http.http.request2({url:`${http.api.getUserTelNum}`, method:"POST"})
|
||||
this.setData({
|
||||
tel:res.data.data.telnum
|
||||
})
|
||||
},
|
||||
// 获取缓存中的门店信息
|
||||
async getStore() {
|
||||
let res = await model.storage.getSetting("store")
|
||||
if (!!res) {
|
||||
model.storage.deleteStorage('store')
|
||||
this.setData({
|
||||
store: res
|
||||
})
|
||||
}
|
||||
},
|
||||
// 选择并填写门店后返回上一页
|
||||
async subAdd(e) {
|
||||
let value = e.detail.value
|
||||
// if (value.name == "") {
|
||||
// model.msg.dataMsg({
|
||||
// content: "请输入联系人",
|
||||
// type: "warning"
|
||||
// })
|
||||
// return
|
||||
// }
|
||||
if (value.tel == "") {
|
||||
model.msg.dataMsg({
|
||||
content: "请输入手机号",
|
||||
type: "warning"
|
||||
})
|
||||
return
|
||||
}
|
||||
if (!(/^1[3456789]\d{9}$/.test(value.tel))) {
|
||||
model.msg.dataMsg({
|
||||
content: "请输入正确的手机号",
|
||||
type: "warning"
|
||||
})
|
||||
return false;
|
||||
}
|
||||
// if (!this.data.store.address) {
|
||||
// model.msg.dataMsg({
|
||||
// content: "请选择门店地址",
|
||||
// type: "warning"
|
||||
// })
|
||||
// return
|
||||
// }
|
||||
let storeChange = {
|
||||
tel: value.tel,
|
||||
store: this.data.store
|
||||
}
|
||||
await model.storage.setStorage("storeChange", storeChange)
|
||||
wx.navigateBack({
|
||||
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
this.setData({
|
||||
modify: options.modify
|
||||
})
|
||||
this.getUserTelNum()
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow: function () {
|
||||
this.getStore()
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage: function () {
|
||||
|
||||
}
|
||||
})
|
||||
4
衣莎项目/源码/YiShaXiYi/mall/chooseStores/chooseStores.json
Normal file
4
衣莎项目/源码/YiShaXiYi/mall/chooseStores/chooseStores.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"navigationBarTextStyle": "black",
|
||||
"usingComponents": {}
|
||||
}
|
||||
35
衣莎项目/源码/YiShaXiYi/mall/chooseStores/chooseStores.wxml
Normal file
35
衣莎项目/源码/YiShaXiYi/mall/chooseStores/chooseStores.wxml
Normal file
@@ -0,0 +1,35 @@
|
||||
<!-- 头部 -->
|
||||
<nav-bar isBack="{{isBack}}" pageTitle="{{pageTitle}}" system="{{system}}"></nav-bar>
|
||||
<!-- user/address/address.wxml -->
|
||||
<view class="address">
|
||||
<form bindsubmit="subAdd">
|
||||
<view class="list_text pd30 mt20">
|
||||
<!-- <view class="text_row">
|
||||
<view class="text_row1 flex-con2">联系人</view>
|
||||
<view class="text_row2 flex-con2">
|
||||
<input name="name" type="text" value="" placeholder="请输入姓名" />
|
||||
</view>
|
||||
<view class="text_row3 flex-con3"></view>
|
||||
</view> -->
|
||||
<view class="text_row">
|
||||
<view class="text_row1 flex-con2">电话</view>
|
||||
<view class="text_row2 flex-con2">
|
||||
<input name="tel" type="text" value="{{tel}}" placeholder="请输入手机号" />
|
||||
</view>
|
||||
<view class="text_row3 flex-con3"></view>
|
||||
</view>
|
||||
<view class="text_row">
|
||||
<view class="text_row1 flex-con2">门店</view>
|
||||
<view class="text_row2 flex-con2" bind:tap="add">
|
||||
<span>{{store.address ||'请选择门店地址'}}</span>
|
||||
</view>
|
||||
<view class="text_row3 flex-con3" bind:tap="add">
|
||||
<image src="/static/img/icon/rthyrthertherth.png" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<button class="sub" form-type="submit">确定</button>
|
||||
</form>
|
||||
</view>
|
||||
<!-- toasta提示 -->
|
||||
<i-toast id="toast" />
|
||||
107
衣莎项目/源码/YiShaXiYi/mall/chooseStores/chooseStores.wxss
Normal file
107
衣莎项目/源码/YiShaXiYi/mall/chooseStores/chooseStores.wxss
Normal file
@@ -0,0 +1,107 @@
|
||||
/* user/address/address.wxss */
|
||||
.list_text{
|
||||
background-color: #ffffff;
|
||||
}
|
||||
.text_row{
|
||||
display: flex;
|
||||
height: 100rpx;
|
||||
width: 100%;
|
||||
border-bottom: 2rpx solid #ebebeb;
|
||||
}
|
||||
.text_row1{
|
||||
flex: 2;
|
||||
font-size: 32rpx;
|
||||
font-weight: 700;
|
||||
font-stretch: normal;
|
||||
letter-spacing: 0px;
|
||||
color: #333333;
|
||||
}
|
||||
.text_row2{
|
||||
padding-left: 15rpx;
|
||||
flex: 7;
|
||||
font-size: 32rpx;
|
||||
font-weight: normal;
|
||||
font-stretch: normal;
|
||||
letter-spacing: 0px;
|
||||
color: #666666;
|
||||
}
|
||||
.text_row2 span{
|
||||
font-family: PingFang-SC-Medium;
|
||||
font-size: 32rpx;
|
||||
font-weight: normal;
|
||||
font-stretch: normal;
|
||||
letter-spacing: 0px;
|
||||
color: #cccccc;
|
||||
display: -webkit-box !important;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 2;
|
||||
overflow: hidden;
|
||||
}
|
||||
.text_row3{
|
||||
flex: 1;
|
||||
}
|
||||
.text_row3 image{
|
||||
width: 15rpx;
|
||||
height: 33rpx;
|
||||
}
|
||||
.text_row:last-child{
|
||||
border: 0;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
.label-1__text, .label-2__text {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
height: 100%;
|
||||
width: 50%;
|
||||
|
||||
}
|
||||
|
||||
.label-1__icon {
|
||||
position: relative;
|
||||
margin-right: 10px;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
background: #fcfff4;
|
||||
}
|
||||
|
||||
.label-1__icon-checked {
|
||||
position: absolute;
|
||||
top: 3px;
|
||||
left: 3px;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
background: #1aad19;
|
||||
}
|
||||
|
||||
.label-2__icon {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
margin-right: 10px;
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
border:#ebebeb solid 2rpx;
|
||||
background: #ffffff;
|
||||
border-radius: 50px;
|
||||
}
|
||||
|
||||
.label-2__icon-checked {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 50%;
|
||||
margin: -6px 0 0 -6px;
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
background: #1aad19;
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.label-4_text{
|
||||
text-align: center;
|
||||
margin-top: 15px;
|
||||
}
|
||||
1
衣莎项目/源码/YiShaXiYi/mall/chooseStores/storesAdd/.pydio
Normal file
1
衣莎项目/源码/YiShaXiYi/mall/chooseStores/storesAdd/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
553c5cd2-49fb-4a7f-8900-7368d4b6fe78
|
||||
220
衣莎项目/源码/YiShaXiYi/mall/chooseStores/storesAdd/storesAdd.js
Normal file
220
衣莎项目/源码/YiShaXiYi/mall/chooseStores/storesAdd/storesAdd.js
Normal file
@@ -0,0 +1,220 @@
|
||||
// mall/chooseStores/storesAdd/storesAdd.js
|
||||
const app = getApp();
|
||||
const regeneratorRuntime = app.loadAsync();
|
||||
const model = app.loadModel("index");
|
||||
const http = app.loadHttp();
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
system: app.globalData.system, //设备相关信息
|
||||
pageTitle: "选择门店", //头部标题
|
||||
isBack: true,//显示返回
|
||||
items: [{
|
||||
type: 'radio',
|
||||
label: '省',
|
||||
value: '省',
|
||||
checked: true,
|
||||
children: [],
|
||||
groups: ['001']
|
||||
}, {
|
||||
type: 'radio',
|
||||
label: '市',
|
||||
value: '市',
|
||||
checked: true,
|
||||
children: [],
|
||||
groups: ['002']
|
||||
}, {
|
||||
type: 'radio',
|
||||
label: '区',
|
||||
value: '区',
|
||||
checked: true,
|
||||
children: [],
|
||||
groups: ['003']
|
||||
}],
|
||||
storeList: [],//门店列表
|
||||
add: {
|
||||
provice: "",
|
||||
city: "",
|
||||
country: ""
|
||||
}
|
||||
},
|
||||
// 顶部选择
|
||||
onChange(e) {
|
||||
let that = this
|
||||
const { checkedItems, items, checkedValues } = e.detail
|
||||
console.log(checkedValues);
|
||||
|
||||
let params = {}
|
||||
checkedItems.forEach((n) => {
|
||||
if (n.checked) {
|
||||
if (n.value === '省') {
|
||||
that.setData({
|
||||
add: {
|
||||
provice: "",
|
||||
city: "",
|
||||
country: ""
|
||||
}
|
||||
})
|
||||
const selected = n.children.filter((n) => n.checked).map((n) => n.id).join(' ')
|
||||
params = {
|
||||
pid: selected,
|
||||
level: "city"
|
||||
}
|
||||
that.setData({
|
||||
"items[0].label": checkedValues[0],
|
||||
"items[1].label": "市",
|
||||
"items[2].label": "区",
|
||||
"add.provice": selected
|
||||
})
|
||||
} else if (n.value === '市') {
|
||||
const selected = n.children.filter((n) => n.checked).map((n) => n.id).join(' ')
|
||||
params = {
|
||||
pid: selected,
|
||||
level: "district",
|
||||
}
|
||||
that.setData({
|
||||
"items[1].label": checkedValues[1],
|
||||
"items[2].label": "区",
|
||||
"add.city": selected
|
||||
})
|
||||
} else if (n.value === '区') {
|
||||
const selected = n.children.filter((n) => n.checked).map((n) => n.id).join(' ')
|
||||
params = selected
|
||||
that.setData({
|
||||
"add.country": selected
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
if (!!params.pid) {
|
||||
this.getAdd(params)
|
||||
}
|
||||
this.getRepos(this.data.add)
|
||||
},
|
||||
// 获取列表
|
||||
async getRepos(data = {}) {
|
||||
let res = await http.http.request2({ url: `${http.api.shopAllList}`, method: "POST", data: data })
|
||||
let storeList = res.data.data
|
||||
storeList.map((v, i) => {
|
||||
storeList[i].show = false
|
||||
})
|
||||
this.setData({
|
||||
storeList: storeList
|
||||
})
|
||||
},
|
||||
// 点击选中
|
||||
async storeChange(e) {
|
||||
let index = e.currentTarget.dataset.index
|
||||
let storeList = this.data.storeList
|
||||
storeList.map((v, i) => {
|
||||
if (v.show) {
|
||||
storeList[i].show = false
|
||||
}
|
||||
if (i == index) {
|
||||
storeList[i].show = true
|
||||
}
|
||||
})
|
||||
this.setData({
|
||||
storeList: storeList
|
||||
})
|
||||
await model.storage.setStorage("store", storeList[index])
|
||||
wx.navigateBack({
|
||||
|
||||
})
|
||||
},
|
||||
// 获取省市区
|
||||
async getAdd(params = { pid: 1, level: "province" }) {
|
||||
let res = await http.http.request2({ url: `${http.api.getDistrict}`, method: "POST", data: params })
|
||||
let rel = res.data.data
|
||||
let children = []
|
||||
|
||||
rel.map((v, i) => {
|
||||
let data = {}
|
||||
data.label = v.name
|
||||
data.value = v.name
|
||||
data.id = v.id
|
||||
children[i] = data
|
||||
})
|
||||
if (params.level == "province") {
|
||||
this.setData({
|
||||
'items[0].children': children
|
||||
})
|
||||
} else if (params.level == "city") {
|
||||
this.setData({
|
||||
'items[1].children': children
|
||||
})
|
||||
} else if (params.level == "district") {
|
||||
this.setData({
|
||||
'items[2].children': children
|
||||
})
|
||||
}
|
||||
},
|
||||
onOpen(e) {
|
||||
this.setData({ opened: true })
|
||||
},
|
||||
onClose(e) {
|
||||
this.setData({ opened: false })
|
||||
},
|
||||
/**
|
||||
* 阻止触摸移动
|
||||
*/
|
||||
noop() { },
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
this.getRepos()
|
||||
this.getAdd()
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady: function () {
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage: function () {
|
||||
|
||||
}
|
||||
})
|
||||
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"usingComponents": {
|
||||
"wux-filterbar":"../../../extend/wux/dist/filterbar/index"
|
||||
}
|
||||
}
|
||||
24
衣莎项目/源码/YiShaXiYi/mall/chooseStores/storesAdd/storesAdd.wxml
Normal file
24
衣莎项目/源码/YiShaXiYi/mall/chooseStores/storesAdd/storesAdd.wxml
Normal file
@@ -0,0 +1,24 @@
|
||||
<!-- 头部 -->
|
||||
<nav-bar isBack="{{isBack}}" pageTitle="{{pageTitle}}" system="{{system}}"></nav-bar>
|
||||
<!-- mall/chooseStores/storesAdd/storesAdd.wxml -->
|
||||
<view class="storesAdd">
|
||||
<wux-filterbar items="{{ items }}" bindchange="onChange" bind:open="onOpen" bind:close="onClose" />
|
||||
<view class="addList">
|
||||
<view wx:for="{{ storeList }}" wx:key="{{index}}" class="flex-con2 add_row" data-index="{{index}}" bind:tap="storeChange">
|
||||
<view class="dis-flex flex1">
|
||||
<view class="flex1 dis-flex1">
|
||||
<view class="flex1 add_row_ts flex-con2">
|
||||
<image src="/static/img/icon/md.png" />
|
||||
<span>{{item.name}} {{item.telnum}}</span>
|
||||
</view>
|
||||
<view class="mt10 add_text">{{item.address}}</view>
|
||||
</view>
|
||||
<view class="add_row_img flex-con2 ml20">
|
||||
<image src="{{ item.show ? '/static/img/icon/smd1.png' : '/static/img/icon/smd.png' }}" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- toasta提示 -->
|
||||
<i-toast id="toast" />
|
||||
33
衣莎项目/源码/YiShaXiYi/mall/chooseStores/storesAdd/storesAdd.wxss
Normal file
33
衣莎项目/源码/YiShaXiYi/mall/chooseStores/storesAdd/storesAdd.wxss
Normal file
@@ -0,0 +1,33 @@
|
||||
/* mall/chooseStores/storesAdd/storesAdd.wxss */
|
||||
.addList{
|
||||
margin-top: 20rpx;
|
||||
background-color: #ffffff;
|
||||
padding: 0 30rpx;
|
||||
}
|
||||
.add_row{
|
||||
height: 165rpx;
|
||||
border-bottom: 2rpx solid #ebebeb;
|
||||
}
|
||||
.add_row:last-child{
|
||||
border-bottom:0;
|
||||
}
|
||||
.add_row_ts image{
|
||||
width: 32rpx;
|
||||
height: 30rpx;
|
||||
}
|
||||
.add_row_ts span{
|
||||
margin-left: 10rpx;
|
||||
font-family: PingFang-SC-Medium;
|
||||
font-size: 32rpx;
|
||||
font-weight: 500;
|
||||
color: #333333;
|
||||
}
|
||||
.add_text{
|
||||
font-family: PingFang-SC-Regular;
|
||||
font-size: 26rpx;
|
||||
color: #999999;
|
||||
}
|
||||
.add_row_img image{
|
||||
width: 40rpx;
|
||||
height: 40rpx;
|
||||
}
|
||||
1
衣莎项目/源码/YiShaXiYi/mall/couponCard/.pydio
Normal file
1
衣莎项目/源码/YiShaXiYi/mall/couponCard/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
e878456e-be30-4d7a-9584-0518432926dd
|
||||
126
衣莎项目/源码/YiShaXiYi/mall/couponCard/couponCard.js
Normal file
126
衣莎项目/源码/YiShaXiYi/mall/couponCard/couponCard.js
Normal file
@@ -0,0 +1,126 @@
|
||||
// user/couponCard/couponCard.js
|
||||
const app = getApp();
|
||||
const regeneratorRuntime = app.loadAsync()
|
||||
const util = app.loadUtils("util")
|
||||
const model = app.loadModel("index")
|
||||
const http = app.loadHttp()
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
system: app.globalData.system, //设备相关信息
|
||||
pageTitle: "使用优惠券", //头部标题
|
||||
isBack: true,//显示返回
|
||||
isEnv: true,//红包选中状态
|
||||
couponList: [],//数据列表
|
||||
total_price: 101,//订单金额
|
||||
},
|
||||
|
||||
// 不使用红包
|
||||
async noEnv() {
|
||||
this.setData({
|
||||
isEnv: !this.data.isEnv
|
||||
})
|
||||
let coupon = {}
|
||||
await model.storage.setStorage("coupon", coupon)
|
||||
wx.navigateBack({
|
||||
delta: 1
|
||||
})
|
||||
},
|
||||
// 选中红包
|
||||
async selectEnv(e) {
|
||||
let item = e.currentTarget.dataset.item
|
||||
let coupon = {
|
||||
id: item.id,
|
||||
price: item.coupon_price
|
||||
}
|
||||
await model.storage.setStorage("coupon", coupon)
|
||||
wx.navigateBack({
|
||||
delta: 1
|
||||
})
|
||||
},
|
||||
// 显示隐藏内容
|
||||
isShow(e) {
|
||||
let index = e.currentTarget.dataset.index
|
||||
let list = this.data.couponList
|
||||
list[index].show = !list[index].show
|
||||
this.setData({
|
||||
couponList: list
|
||||
})
|
||||
},
|
||||
// 获取可用优惠券
|
||||
async getCoupon() {
|
||||
let res = await http.http.request2({ url: `${http.api.userCoupon}`, method: "POST", data: { total_price: this.data.total_price, status: 1 } })
|
||||
let cou = res.data.data
|
||||
if (cou.length <= 0) {
|
||||
return
|
||||
}
|
||||
cou.map((v, i) => {
|
||||
cou[i].show = true
|
||||
cou[i].end_time = util.formatTime(v.end_time, 'Y-M-D h:m:s')
|
||||
})
|
||||
this.setData({
|
||||
couponList: cou
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
this.setData({
|
||||
total_price:options.total
|
||||
})
|
||||
this.getCoupon()
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage: function () {
|
||||
|
||||
}
|
||||
})
|
||||
7
衣莎项目/源码/YiShaXiYi/mall/couponCard/couponCard.json
Normal file
7
衣莎项目/源码/YiShaXiYi/mall/couponCard/couponCard.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"navigationBarTextStyle": "black",
|
||||
"usingComponents": {
|
||||
"wux-cell-group": "../../extend/wux/dist/cell-group/index",
|
||||
"wux-cell": "../../extend/wux/dist/cell/index"
|
||||
}
|
||||
}
|
||||
42
衣莎项目/源码/YiShaXiYi/mall/couponCard/couponCard.wxml
Normal file
42
衣莎项目/源码/YiShaXiYi/mall/couponCard/couponCard.wxml
Normal file
@@ -0,0 +1,42 @@
|
||||
<!-- 头部 -->
|
||||
<nav-bar isBack="{{isBack}}" pageTitle="{{pageTitle}}" system="{{system}}"></nav-bar>
|
||||
<!-- user/couponCard/couponCard.wxml -->
|
||||
<view class="couponCard">
|
||||
<view class="no_coupon mt20">
|
||||
<wux-cell-group>
|
||||
<wux-cell bind:tap="noEnv" title="不使用红包" rightUrl="{{ isEnv ? '/static/img/icon/wxPay1.png' : '/static/img/icon/wxPay2.png' }}"></wux-cell>
|
||||
</wux-cell-group>
|
||||
</view>
|
||||
<view class="coupon">
|
||||
<view class="coupon_list mt30" wx:for="{{couponList}}" wx:key="{{index}}" data-item="{{item}}" bind:tap="selectEnv">
|
||||
<view class="coupon_list_l">
|
||||
<view>
|
||||
¥
|
||||
<span>{{item.coupon_price}}</span>
|
||||
</view>
|
||||
</view>
|
||||
<view class="coupon_list_r">
|
||||
<view>
|
||||
<view class="coupon_list_r_top">
|
||||
{{item.coupon_title}}
|
||||
<!-- <span class="ml40">即将过期</span> -->
|
||||
</view>
|
||||
<view class="coupon_list_r_p mt10">满{{item.use_min_price}}元可用</view>
|
||||
<view class="coupon_list_r_p">有效期至:{{item.end_time}}</view>
|
||||
<view class="coupon_list_r_p mt10">线上、线下洗衣通用</view>
|
||||
<view class="coupon_list_r_p {{ item.show ? 'clamp1' : '' }}" data-index="{{index}}" bind:tap="isShow">
|
||||
上装、下装、皮质类、箱包类、下装、皮质类、箱包类、其他
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="coupon_list_b">
|
||||
<span data-index="{{index}}" bind:tap="isShow">
|
||||
<image class="{{ item.show ? '' : 'rotate' }}" src="/static/img/icon/qwfgqfqf.png" />
|
||||
</span>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- toasta提示 -->
|
||||
<i-toast id="toast" />
|
||||
65
衣莎项目/源码/YiShaXiYi/mall/couponCard/couponCard.wxss
Normal file
65
衣莎项目/源码/YiShaXiYi/mall/couponCard/couponCard.wxss
Normal file
@@ -0,0 +1,65 @@
|
||||
/* user/couponCard/couponCard.wxss */
|
||||
|
||||
.coupon{
|
||||
padding: 0 30rpx;
|
||||
}
|
||||
.coupon_list{
|
||||
background: #ffffff;
|
||||
padding: 50rpx 0;
|
||||
border-left: 4rpx solid #1dbf53;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
}
|
||||
.coupon_list_l{
|
||||
display: inline-block;
|
||||
padding: 0 34rpx;
|
||||
font-size: 32rpx;
|
||||
color: #1dbf53;
|
||||
margin-top: 40rpx;
|
||||
}
|
||||
.coupon_list_l span{
|
||||
font-size: 60rpx;
|
||||
}
|
||||
.coupon_list_r{
|
||||
display: inline-block;
|
||||
flex: 1;
|
||||
/* padding-right: 55rpx; */
|
||||
}
|
||||
.coupon_list_b{
|
||||
height: 100%;
|
||||
width: 80rpx;
|
||||
position: relative;
|
||||
}
|
||||
.coupon_list_b span{
|
||||
position: absolute;
|
||||
top: 173rpx;
|
||||
left: 0;
|
||||
}
|
||||
.coupon_list_b span image{
|
||||
width: 21px;
|
||||
height: 10px;
|
||||
}
|
||||
.coupon_list_r_top{
|
||||
font-size: 32rpx;
|
||||
color: #333333;
|
||||
}
|
||||
.coupon_list_r_top span{
|
||||
width: 105rpx;
|
||||
height: 32rpx;
|
||||
background-color: #fff1f0;
|
||||
border-radius: 5rpx;
|
||||
font-size: 20rpx;
|
||||
color: #ff4026;
|
||||
text-align: center;
|
||||
line-height: 32rpx;
|
||||
display: inline-block;
|
||||
}
|
||||
.coupon_list_r_p{
|
||||
font-size: 24rpx;
|
||||
line-height: 36rpx;
|
||||
color: #999999;
|
||||
}
|
||||
|
||||
.rotate{
|
||||
transform: rotate(180deg);
|
||||
}
|
||||
1
衣莎项目/源码/YiShaXiYi/mall/index/.pydio
Normal file
1
衣莎项目/源码/YiShaXiYi/mall/index/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
652d4c58-8f92-4f48-a0e8-f71e13b66f51
|
||||
77
衣莎项目/源码/YiShaXiYi/mall/index/index.js
Normal file
77
衣莎项目/源码/YiShaXiYi/mall/index/index.js
Normal file
@@ -0,0 +1,77 @@
|
||||
// mall/index/index.js
|
||||
const app = getApp();
|
||||
const regeneratorRuntime = app.loadAsync()
|
||||
const model = app.loadModel("index")
|
||||
const http = app.loadHttp()
|
||||
const util = app.loadUtils("util")
|
||||
Component({
|
||||
/**
|
||||
* 组件的属性列表
|
||||
*/
|
||||
properties: {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 组件的初始数据
|
||||
*/
|
||||
data: {
|
||||
system: app.globalData.system, //设备相关信息
|
||||
pageTitle: "商城", //头部标题
|
||||
isBack: false,//显示返回
|
||||
titleColor: { //头部背景和文字颜色
|
||||
bColor: "#1dbf53",
|
||||
tColor: "#ffffff"
|
||||
},
|
||||
TabCur: 0,
|
||||
scrollLeft: 0,
|
||||
category: [],// 商品大分类
|
||||
product: [],//大分类下的商品
|
||||
},
|
||||
created() {
|
||||
this.storeCategory()
|
||||
},
|
||||
/**
|
||||
* 组件的方法列表
|
||||
*/
|
||||
methods: {
|
||||
// tab
|
||||
tabSelect(e) {
|
||||
this.setData({
|
||||
TabCur: e.currentTarget.dataset.id,
|
||||
scrollLeft: (e.currentTarget.dataset.id - 1) * 60,
|
||||
product: []
|
||||
})
|
||||
this.storeProduct()
|
||||
},
|
||||
// 获取商城分类获取
|
||||
async storeCategory() {
|
||||
let res = await http.http.request1({ url: `${http.api.storeCategory}`, method: "GET" })
|
||||
this.setData({
|
||||
category: res.data.data,
|
||||
TabCur: res.data.data[0].id
|
||||
})
|
||||
this.storeProduct()
|
||||
},
|
||||
// 获取分类下商品
|
||||
async storeProduct() {
|
||||
let res = await http.http.request1({ url: `${http.api.storeProduct}/${this.data.TabCur}`, method: "GET" })
|
||||
this.setData({
|
||||
product: res.data.data
|
||||
})
|
||||
},
|
||||
// 添加商品到购物车
|
||||
async addCart(e) {
|
||||
let item = e.currentTarget.dataset.item
|
||||
item.num = 0
|
||||
item.attr = []
|
||||
model.shopCart.setCart(item)
|
||||
},
|
||||
// 去详情
|
||||
goInfo(e) {
|
||||
wx.navigateTo({
|
||||
url: "/mall/index/shopInfo/shopInfo?id=" + e.currentTarget.dataset.id
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
5
衣莎项目/源码/YiShaXiYi/mall/index/index.json
Normal file
5
衣莎项目/源码/YiShaXiYi/mall/index/index.json
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"navigationBarTextStyle":"white",
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
||||
34
衣莎项目/源码/YiShaXiYi/mall/index/index.wxml
Normal file
34
衣莎项目/源码/YiShaXiYi/mall/index/index.wxml
Normal file
@@ -0,0 +1,34 @@
|
||||
<!-- 头部 -->
|
||||
<nav-bar isBack="{{isBack}}" pageTitle="{{pageTitle}}" system="{{system}}" titleColor="{{titleColor}}"></nav-bar>
|
||||
<!-- mall/index/index.wxml -->
|
||||
<view class="index">
|
||||
<view class="index_tab">
|
||||
<scroll-view scroll-x class="bg-white nav" scroll-with-animation scroll-left="{{scrollLeft}}">
|
||||
<view wx:for="{{category}}" wx:key class="cu-item {{item.id==TabCur?'text-green cur':''}}" bindtap="tabSelect" data-id="{{item.id}}">
|
||||
{{item.name}}
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<scroll-view class="index_cen">
|
||||
<view catchtap="goInfo" class="shop_list" wx:for="{{ product }}" wx:key="{{index}}" data-id="{{ item.id }}" >
|
||||
<view class="shop_img">
|
||||
<image lazy-load src="{{item.image}}" />
|
||||
</view>
|
||||
<view class="shop_cen">
|
||||
<view class="shop_title">{{item.name}}</view>
|
||||
<view class="shop_info">
|
||||
<view class="shop_info_l">
|
||||
<view class="opri">原价¥{{item.original_price}}</view>
|
||||
<view class="ppri"><span>¥</span>{{item.price}}</view>
|
||||
</view>
|
||||
<view class="shop_info_r">
|
||||
<image data-item="{{item}}" catchtap="addCart" lazy-load src="/static/img/icon/jrgwc.png" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="clear"></view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<!-- toasta提示 -->
|
||||
<i-toast id="toast" />
|
||||
126
衣莎项目/源码/YiShaXiYi/mall/index/index.wxss
Normal file
126
衣莎项目/源码/YiShaXiYi/mall/index/index.wxss
Normal file
@@ -0,0 +1,126 @@
|
||||
/* mall/index/index.wxss */
|
||||
@import "../../extend/ColorUI/css/main.wxss";
|
||||
|
||||
.bg-white {
|
||||
background-color: #1dbf53 !important;
|
||||
color: #beffd4 !important;
|
||||
font-size: 30rpx !important;
|
||||
}
|
||||
|
||||
.nav .cu-item {
|
||||
padding: 0 40rpx !important;
|
||||
}
|
||||
|
||||
.nav .cu-item.cur {
|
||||
border-bottom: 0 !important;
|
||||
}
|
||||
|
||||
.cur {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.nav .cu-item.cur::before {
|
||||
position: absolute;
|
||||
content: "";
|
||||
width: 30rpx;
|
||||
height: 6rpx;
|
||||
background-color: #beffd4;
|
||||
border-radius: 3rpx;
|
||||
bottom: 15rpx;
|
||||
left: 50%;
|
||||
margin-left: -15rpx;
|
||||
}
|
||||
|
||||
.text-green {
|
||||
font-size: 32rpx !important;
|
||||
color: #fff !important;
|
||||
}
|
||||
|
||||
.index_cen {
|
||||
margin-top: 20rpx;
|
||||
padding: 0 20rpx 150rpx;
|
||||
}
|
||||
|
||||
.shop_list {
|
||||
width: 348rpx;
|
||||
height: 536rpx;
|
||||
background-color: #fff;
|
||||
border-radius: 2%;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.shop_list:nth-child(2n) {
|
||||
margin-left: 14rpx;
|
||||
}
|
||||
|
||||
.shop_list:nth-child(n+3) {
|
||||
margin-top: 14rpx;
|
||||
}
|
||||
|
||||
.clear {
|
||||
clear: both;
|
||||
}
|
||||
|
||||
.shop_img {
|
||||
width: 100%;
|
||||
height: 310rpx;
|
||||
}
|
||||
|
||||
.shop_img image {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.shop_cen {
|
||||
padding: 0 25rpx;
|
||||
}
|
||||
|
||||
.shop_title {
|
||||
height: 80rpx;
|
||||
margin-top: 10rpx;
|
||||
font-weight: 600;
|
||||
font-size: 30rpx;
|
||||
color: #333;
|
||||
display: -webkit-box !important;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 2;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.shop_info {
|
||||
display: flex;
|
||||
margin-top: 39rpx;
|
||||
}
|
||||
|
||||
.shop_info_l {
|
||||
flex: 2;
|
||||
}
|
||||
|
||||
.shop_info_r {
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
-webkit-flex-direction: column-reverse;
|
||||
flex-direction: column-reverse;
|
||||
}
|
||||
|
||||
.shop_info_r image {
|
||||
width: 50rpx;
|
||||
height: 50rpx;
|
||||
}
|
||||
|
||||
.opri {
|
||||
font-size: 22rpx;
|
||||
color: #999;
|
||||
text-decoration: line-through;
|
||||
}
|
||||
|
||||
.ppri {
|
||||
margin-top: 19rpx;
|
||||
font-size: 32rpx;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.ppri span {
|
||||
font-size: 22rpx;
|
||||
color: #333;
|
||||
}
|
||||
1
衣莎项目/源码/YiShaXiYi/mall/index/shopInfo/.pydio
Normal file
1
衣莎项目/源码/YiShaXiYi/mall/index/shopInfo/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
c84c7f07-94d2-432b-96a8-31cc08bbc571
|
||||
220
衣莎项目/源码/YiShaXiYi/mall/index/shopInfo/shopInfo.js
Normal file
220
衣莎项目/源码/YiShaXiYi/mall/index/shopInfo/shopInfo.js
Normal file
@@ -0,0 +1,220 @@
|
||||
// mall/index/shopInfo/shopInfo.js
|
||||
const app = getApp();
|
||||
const regeneratorRuntime = app.loadAsync()
|
||||
const model = app.loadModel("index")
|
||||
const http = app.loadHttp()
|
||||
const util = app.loadUtils("util")
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
system: app.globalData.system, //设备相关信息
|
||||
pageTitle: "详情", //头部标题
|
||||
isBack: true,//显示返回
|
||||
imgUrls: [
|
||||
'https://ss0.bdstatic.com/94oJfD_bAAcT8t7mm9GUKT-xh_/timg?image&quality=100&size=b4000_4000&sec=1564218168&di=f9df8e6bc2e9d02f6f1b7fc73247d927&src=http://ac-r.static.booking.cn/images/hotel/max1024x768/987/98767654.jpg',
|
||||
'https://ss0.bdstatic.com/94oJfD_bAAcT8t7mm9GUKT-xh_/timg?image&quality=100&size=b4000_4000&sec=1564218168&di=f9df8e6bc2e9d02f6f1b7fc73247d927&src=http://ac-r.static.booking.cn/images/hotel/max1024x768/987/98767654.jpg',
|
||||
'https://ss0.bdstatic.com/94oJfD_bAAcT8t7mm9GUKT-xh_/timg?image&quality=100&size=b4000_4000&sec=1564218168&di=f9df8e6bc2e9d02f6f1b7fc73247d927&src=http://ac-r.static.booking.cn/images/hotel/max1024x768/987/98767654.jpg'
|
||||
],
|
||||
indicatorDots: false,
|
||||
autoplay: true,
|
||||
interval: 3000,
|
||||
duration: 1000,
|
||||
current: 0,
|
||||
visible: false,
|
||||
cartNum: 0,//角标
|
||||
id: "",//商品id
|
||||
shopInfo: {},//商品的详情信息
|
||||
shopAttr: [],//商品的属性
|
||||
attr: [],//勾选了的属性
|
||||
type: null,//0购物车 1购买
|
||||
num: 1,//商品的数量
|
||||
},
|
||||
// 轮播图下表
|
||||
currentChange(e) {
|
||||
this.setData({
|
||||
current: e.detail.current
|
||||
})
|
||||
},
|
||||
//弹出层开启关闭
|
||||
onClose(e) {
|
||||
let type = e.currentTarget.dataset.type
|
||||
this.setData({
|
||||
visible: !this.data.visible,
|
||||
type: type
|
||||
})
|
||||
},
|
||||
// 打开弹出层
|
||||
onOpen() {
|
||||
this.setData({
|
||||
visible: true
|
||||
})
|
||||
},
|
||||
// 选择数量
|
||||
numChang(e) {
|
||||
this.setData({
|
||||
num: e.detail.value
|
||||
})
|
||||
},
|
||||
// 选择完确定
|
||||
async sure() {
|
||||
let shopInfo = this.data.shopInfo
|
||||
let data = {
|
||||
id: shopInfo.id,
|
||||
name: shopInfo.name,
|
||||
image: shopInfo.top_img,
|
||||
original_price: shopInfo.original_price,
|
||||
price: shopInfo.price,
|
||||
num: this.data.num,
|
||||
attr: this.data.attr
|
||||
}
|
||||
this.setData({
|
||||
visible: false
|
||||
})
|
||||
if (this.data.type == 0) {
|
||||
model.shopCart.setCart(data)
|
||||
return
|
||||
}
|
||||
let isLogin = await util.isLoginJump()
|
||||
if (isLogin == 1) return;
|
||||
app.globalData.temCart = {
|
||||
total: (data.num * data.price).toFixed(2),
|
||||
allCart: [data]
|
||||
}
|
||||
wx.navigateTo({
|
||||
url: "/mall/placeOrder/placeOrder"
|
||||
})
|
||||
},
|
||||
// 获取商品的详情
|
||||
async getShopInfo() {
|
||||
let res = await http.http.request1({ url: `${http.api.storeProductDetails}/${this.data.id}`, method: "GET" })
|
||||
this.setData({
|
||||
shopInfo: res.data.data
|
||||
})
|
||||
this.getAttr()
|
||||
},
|
||||
// 获取商品属性
|
||||
async getAttr() {
|
||||
let res = await http.http.request1({ url: `${http.api.storeProductAttr}/${this.data.id}`, method: "GET" })
|
||||
res.data.data.map((v, i) => {
|
||||
res.data.data[i].index = i
|
||||
})
|
||||
this.setData({
|
||||
shopAttr: res.data.data
|
||||
})
|
||||
},
|
||||
// 实时更新购物车角标
|
||||
async realUpdateCarker() {
|
||||
var that = this
|
||||
app.setWatching('cartNum', (v) => {
|
||||
that.setData({
|
||||
cartNum: v
|
||||
});
|
||||
});
|
||||
},
|
||||
// 去往购物车
|
||||
goCart() {
|
||||
wx.navigateTo({
|
||||
url: "/mall/shopcart/shopcart"
|
||||
})
|
||||
},
|
||||
// 选择商品属性
|
||||
selectAttr(e) {
|
||||
let { i1, i2 } = e.currentTarget.dataset
|
||||
let shopAttr = this.data.shopAttr
|
||||
let attr = this.data.attr //选中的商品属性
|
||||
let isShow = [] //当前选中或者移除的所有isShow字段
|
||||
shopAttr[i1].attr_vals.map((v, i) => {
|
||||
if (i2 == i) {
|
||||
shopAttr[i1].attr_vals[i].isShow = !shopAttr[i1].attr_vals[i].isShow
|
||||
} else {
|
||||
shopAttr[i1].attr_vals[i].isShow = false
|
||||
}
|
||||
isShow.push(v.isShow)
|
||||
})
|
||||
// 获取当前商品属性选中的下表,然后插入对应下表的method_value到attr
|
||||
let is = isShow.indexOf(true)
|
||||
if (is != -1) {
|
||||
attr[i1] = shopAttr[i1].attr_vals[is].method_value
|
||||
} else {
|
||||
attr[i1] = ""
|
||||
}
|
||||
this.setData({
|
||||
shopAttr: shopAttr,
|
||||
attr: attr
|
||||
})
|
||||
},
|
||||
// 商品详情查看大图
|
||||
bigShopImg(e) {
|
||||
let imgI = e.currentTarget.dataset.url, imgsArr = this.data.shopInfo.imgs, news = [];
|
||||
imgsArr.map((v, i) => {
|
||||
news.push(v.detail_img)
|
||||
})
|
||||
wx.previewImage({
|
||||
current: imgI, // 当前显示图片的http链接
|
||||
urls: news // 需要预览的图片http链接列表
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
this.realUpdateCarker()
|
||||
// 接收商品id
|
||||
this.setData({
|
||||
id: options.id
|
||||
})
|
||||
this.getShopInfo()
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage: function () {
|
||||
|
||||
}
|
||||
})
|
||||
7
衣莎项目/源码/YiShaXiYi/mall/index/shopInfo/shopInfo.json
Normal file
7
衣莎项目/源码/YiShaXiYi/mall/index/shopInfo/shopInfo.json
Normal file
@@ -0,0 +1,7 @@
|
||||
{
|
||||
"navigationBarTextStyle": "black",
|
||||
"usingComponents": {
|
||||
"wux-popup":"../../../extend/wux/dist/popup/index",
|
||||
"wux-input-number": "../../../extend/wux/dist/input-number/index"
|
||||
}
|
||||
}
|
||||
100
衣莎项目/源码/YiShaXiYi/mall/index/shopInfo/shopInfo.wxml
Normal file
100
衣莎项目/源码/YiShaXiYi/mall/index/shopInfo/shopInfo.wxml
Normal file
@@ -0,0 +1,100 @@
|
||||
<!-- 头部 -->
|
||||
<nav-bar isBack="{{isBack}}" pageTitle="{{pageTitle}}" system="{{system}}"></nav-bar>
|
||||
<!-- mall/index/shopInfo/shopInfo.wxml -->
|
||||
<view class="shopInfo">
|
||||
<view class="shopInfo_title">
|
||||
<view class="shopInfo_img">
|
||||
<!-- <swiper bindchange="currentChange" indicator-dots="{{indicatorDots}}" circular autoplay="{{autoplay}}" interval="{{interval}}" duration="{{duration}}">
|
||||
<block wx:for="{{shopInfo.imgs}}" wx:key="{{index}}">
|
||||
<swiper-item> -->
|
||||
<image src="{{shopInfo.top_img}}" class="slide-image" />
|
||||
<!-- </swiper-item>
|
||||
</block>
|
||||
</swiper>
|
||||
<view class="slide-image_item">{{current+1}}/{{shopInfo.imgs.length}}</view> -->
|
||||
</view>
|
||||
<view class="shopInfo_title_cen">
|
||||
<view class="shop_title">{{shopInfo.name}}</view>
|
||||
<view class="shop_info">
|
||||
<view class="shop_info_l">
|
||||
<view class="opri">原价¥{{shopInfo.original_price}}</view>
|
||||
<view class="ppri">
|
||||
<span>¥</span>
|
||||
{{shopInfo.price}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="shop_info_r">
|
||||
<view class="flex-con1">
|
||||
<span>{{shopInfo.sales+shopInfo.invent_sales}}</span>
|
||||
<view>人已购买</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="shop_text mt20">
|
||||
<view class="shop_text_title">商品详情</view>
|
||||
<view class="mt40">
|
||||
<rich-text nodes="{{shopInfo.summary}}"></rich-text>
|
||||
</view>
|
||||
<view class="shop_text_p">规格:5KG/袋</view>
|
||||
<view class="shop_text_p">包装:普装</view>
|
||||
<view class="shop_text_p">保质期:24个月</view>
|
||||
</view> -->
|
||||
<view wx:if="{{shopInfo.imgs.length > 0}}" class="shop_introduce">
|
||||
<view class="shop_text_title">商品详情</view>
|
||||
<image mode="widthFix" wx:for="{{shopInfo.imgs}}" wx:key="{{ index }}" src="{{item.detail_img}}" data-url="{{item.detail_img}}" bind:tap="bigShopImg" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="shop_go">
|
||||
<view class="shop_cart flex-con3" bind:tap="goCart">
|
||||
<view class="shop_cart_img">
|
||||
<image src="/static/img/icon/gwcs.png" />
|
||||
<span>{{cartNum}}</span>
|
||||
</view>
|
||||
</view>
|
||||
<view data-type="0" class="add_cart" bind:tap="onClose">加入购物车</view>
|
||||
<view data-type="1" class="buy" bind:tap="onClose">立即购买</view>
|
||||
</view>
|
||||
<!-- 购物车弹出 -->
|
||||
<wux-popup position="bottom" visible="{{ visible }}" catchtap="onClose">
|
||||
<view class="cart" catchtap="onOpen">
|
||||
<view class="pd30">
|
||||
<view class="cart_title">
|
||||
<view class="cart_title_img">
|
||||
<image src="{{shopInfo.top_img}}" />
|
||||
</view>
|
||||
<view class="cart_title_info">
|
||||
<view>
|
||||
<view class="cart_title_info_name">{{shopInfo.name}}</view>
|
||||
<view class="cart_title_info_mon">
|
||||
<span>¥</span>
|
||||
{{shopInfo.price}}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cart_title_close" catchtap="onClose">
|
||||
<image src="/static/img/icon/dasdasd_05.png" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="cart_spe mt10" wx:for="{{shopAttr}}" wx:key="i">
|
||||
<view class="cart_spe_title mt40">{{item.method_name}}</view>
|
||||
<view class="cart_spe_cen">
|
||||
<view wx:for="{{item.attr_vals}}" wx:for-item="list" wx:key="{{index}}" data-i1="{{item.index}}" data-i2="{{index}}" class="cart_spe_row mt30 fl mr20 {{ list.isShow ?'spe_row_active':'' }}" bind:tap="selectAttr">
|
||||
{{list.method_value}}
|
||||
</view>
|
||||
<view class="clear"></view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="shop_num">
|
||||
<view class="shop_numl">数量</view>
|
||||
<view class="shop_numr">
|
||||
<wux-input-number wux-sub-class="wux_sub" wux-input-class="wux_input" wux-add-class="wux_add" min="1" default-value="1" slot="footer" bindchange="numChang" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cart_sub" catchtap="sure">确定</view>
|
||||
</view>
|
||||
</wux-popup>
|
||||
<!-- toasta提示 -->
|
||||
<i-toast id="toast" />
|
||||
331
衣莎项目/源码/YiShaXiYi/mall/index/shopInfo/shopInfo.wxss
Normal file
331
衣莎项目/源码/YiShaXiYi/mall/index/shopInfo/shopInfo.wxss
Normal file
@@ -0,0 +1,331 @@
|
||||
/* mall/index/shopInfo/shopInfo.wxss */
|
||||
|
||||
.shopInfo {
|
||||
margin-bottom: 120rpx;
|
||||
}
|
||||
|
||||
.shopInfo_title {
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.slide-image {
|
||||
width: 100%;
|
||||
height: 600rpx;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
swiper {
|
||||
height: 600rpx !important;
|
||||
}
|
||||
|
||||
.shopInfo_img {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.slide-image_item {
|
||||
position: absolute;
|
||||
bottom: 20rpx;
|
||||
right: 20rpx;
|
||||
width: 80rpx;
|
||||
height: 40rpx;
|
||||
background-color: rgba(0, 0, 0, 0.4);
|
||||
border-radius: 20rpx;
|
||||
text-align: center;
|
||||
line-height: 40rpx;
|
||||
font-size: 26rpx;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.shopInfo_title_cen {
|
||||
padding: 0 30rpx 40rpx 30rpx;
|
||||
}
|
||||
|
||||
.shop_title {
|
||||
margin-top: 32rpx;
|
||||
font-size: 36rpx;
|
||||
color: #333;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.shopInfo_title_info {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.shop_info {
|
||||
display: flex;
|
||||
margin-top: 39rpx;
|
||||
}
|
||||
|
||||
.shop_info_l {
|
||||
flex: 2;
|
||||
}
|
||||
|
||||
.shop_info_r {
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
-webkit-flex-direction: column-reverse;
|
||||
flex-direction: column-reverse;
|
||||
font-size: 22rpx;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.shop_info_r span {
|
||||
font-size: 22rpx;
|
||||
color: #333;
|
||||
line-height: 32rpx;
|
||||
}
|
||||
|
||||
.opri {
|
||||
font-size: 26rpx;
|
||||
color: #999;
|
||||
text-decoration: line-through;
|
||||
}
|
||||
|
||||
.ppri {
|
||||
margin-top: 20rpx;
|
||||
font-size: 40rpx;
|
||||
color: #ff4737;
|
||||
}
|
||||
|
||||
.ppri span {
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.shop_text {
|
||||
padding: 45rpx 30rpx;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.shop_text_title {
|
||||
margin-top: 35rpx;
|
||||
font-size: 36rpx;
|
||||
color: #333;
|
||||
font-weight: 500;
|
||||
padding-bottom: 20rpx;
|
||||
position: relative;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.shop_text_title::before {
|
||||
position: absolute;
|
||||
content: "";
|
||||
left: 50%;
|
||||
bottom: 0;
|
||||
width: 40rpx;
|
||||
height: 4rpx;
|
||||
margin-left: -20rpx;
|
||||
background-color: #333;
|
||||
}
|
||||
|
||||
.shop_text_p {
|
||||
margin-top: 20rpx;
|
||||
font-size: 28rpx;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.shop_introduce {
|
||||
margin-top: 20rpx;
|
||||
padding: 35rpx 20rpx;
|
||||
background-color: #fff;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.shop_introduce image {
|
||||
/* height: auto; */
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.shop_go {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
width: 100%;
|
||||
height: 100rpx;
|
||||
background-color: #fff;
|
||||
box-shadow: 0px -8px 20px 0px rgba(14, 5, 9, 0.06);
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.shop_cart {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.add_cart, .buy {
|
||||
width: 296rpx;
|
||||
height: 100rpx;
|
||||
line-height: 100rpx;
|
||||
text-align: center;
|
||||
display: inline-block;
|
||||
font-size: 32rpx;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.add_cart {
|
||||
background-color: #323332;
|
||||
}
|
||||
|
||||
.buy {
|
||||
background-color: #1dbf53;
|
||||
}
|
||||
|
||||
.shop_cart_img {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.shop_cart_img span {
|
||||
position: absolute;
|
||||
right: -10rpx;
|
||||
top: -15rpx;
|
||||
width: 30rpx;
|
||||
height: 30rpx;
|
||||
line-height: 30rpx;
|
||||
text-align: center;
|
||||
border-radius: 50%;
|
||||
background-color: #ff4838;
|
||||
font-size: 20rpx;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.shop_cart_img image {
|
||||
height: 40rpx;
|
||||
width: 40rpx;
|
||||
}
|
||||
|
||||
.cart {
|
||||
padding: 30rpx 0 230rpx 0;
|
||||
position: relative;
|
||||
min-height: 500rpx;
|
||||
}
|
||||
|
||||
.cart_title {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.cart_title_img, .cart_title_close {
|
||||
display: inline-block;
|
||||
}
|
||||
|
||||
.cart_title_close image {
|
||||
width: 30rpx;
|
||||
height: 30rpx;
|
||||
}
|
||||
|
||||
.cart_title_img image {
|
||||
width: 190rpx;
|
||||
height: 190rpx;
|
||||
}
|
||||
|
||||
.cart_title_info {
|
||||
flex: 1;
|
||||
padding-left: 27rpx;
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
-webkit-flex-direction: column-reverse;
|
||||
flex-direction: column-reverse;
|
||||
}
|
||||
|
||||
.cart_title_info view {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.cart_title_info_name {
|
||||
font-size: 36rpx;
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.cart_title_info_mon {
|
||||
margin-top: 20rpx;
|
||||
font-size: 40rpx;
|
||||
font-weight: 500;
|
||||
color: #ff4737;
|
||||
}
|
||||
|
||||
.cart_title_info_mon span {
|
||||
font-size: 28rpx;
|
||||
}
|
||||
|
||||
.cart_sub {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
width: 100%;
|
||||
height: 100rpx;
|
||||
background-image: linear-gradient(#1dbf53, #1dbf53), linear-gradient(#2fd152, #2fd152);
|
||||
background-blend-mode: normal, normal;
|
||||
text-align: center;
|
||||
line-height: 100rpx;
|
||||
font-size: 38rpx;
|
||||
font-weight: 500;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.cart_spe_title {
|
||||
text-align: left;
|
||||
font-size: 28rpx;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.cart_spe_row {
|
||||
padding: 19rpx 49rpx;
|
||||
background-color: #f7f7f7;
|
||||
border-radius: 30rpx;
|
||||
font-size: 28rpx;
|
||||
color: #666;
|
||||
display: inline-block;
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
border: solid 2rpx #f7f7f7;
|
||||
}
|
||||
|
||||
.spe_row_active {
|
||||
border: solid 2rpx #1dbf53;
|
||||
color: #1dbf53;
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.shop_num {
|
||||
display: flex;
|
||||
margin-top: 42rpx;
|
||||
}
|
||||
|
||||
.shop_numl, .shop_numr {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.shop_numl {
|
||||
text-align: left;
|
||||
font-size: 28rpx;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.shop_numr {
|
||||
display: -webkit-flex;
|
||||
display: flex;
|
||||
-webkit-flex-direction: row-reverse;
|
||||
flex-direction: row-reverse;
|
||||
}
|
||||
|
||||
.wux_sub {
|
||||
border: 0 !important;
|
||||
color: #272727 !important;
|
||||
}
|
||||
|
||||
.wux_input {
|
||||
border: 0 !important;
|
||||
background-color: #f5f5f5 !important;
|
||||
}
|
||||
|
||||
.wux_add {
|
||||
border: 0 !important;
|
||||
color: #272727 !important;
|
||||
}
|
||||
|
||||
.clear {
|
||||
clear: both;
|
||||
}
|
||||
1
衣莎项目/源码/YiShaXiYi/mall/laundryList/.pydio
Normal file
1
衣莎项目/源码/YiShaXiYi/mall/laundryList/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
6b7c2571-61c0-4188-b16b-e307c388e526
|
||||
1
衣莎项目/源码/YiShaXiYi/mall/laundryList/laundryInfo/.pydio
Normal file
1
衣莎项目/源码/YiShaXiYi/mall/laundryList/laundryInfo/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
6cf74d7a-c223-48ed-a046-127eeae7bc1e
|
||||
168
衣莎项目/源码/YiShaXiYi/mall/laundryList/laundryInfo/laundryInfo.js
Normal file
168
衣莎项目/源码/YiShaXiYi/mall/laundryList/laundryInfo/laundryInfo.js
Normal file
@@ -0,0 +1,168 @@
|
||||
// mall/laundryList/laundryInfo/laundryInfo.js
|
||||
const app = getApp();
|
||||
const regeneratorRuntime = app.loadAsync()
|
||||
const model = app.loadModel("index")
|
||||
const http = app.loadHttp()
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
system: app.globalData.system, //设备相关信息
|
||||
pageTitle: "订单详情", //头部标题
|
||||
isBack: true,//显示返回
|
||||
shopNum: 2,//显示的商品数量
|
||||
orderId: "",//订单id
|
||||
orderInof: {},//订单详情
|
||||
},
|
||||
// 点击查看更多商品
|
||||
more() {
|
||||
this.setData({
|
||||
shopNum: 999999
|
||||
})
|
||||
},
|
||||
// 获取详情信息
|
||||
async storeOrderDetail() {
|
||||
let res = await http.http.request2({ url: `${http.api.storeOrderDetail}`, method: "POST", data: { order_id: this.data.orderId } })
|
||||
let rel = res.data.data
|
||||
if (rel.status == 1) {
|
||||
rel.status_name = "待付款"
|
||||
rel.status_img = "/static/img/icon/shop_dfk.png"
|
||||
} else if (rel.status == 2) {
|
||||
rel.status_name = "待发货"
|
||||
rel.status_img = "/static/img/icon/shop_yfk.png"
|
||||
} else if (rel.status == 3) {
|
||||
rel.status_name = "待收货"
|
||||
rel.status_img = "/static/img/icon/shop_dsh.png"
|
||||
} else if (rel.status == 4) {
|
||||
rel.status_name = "已完成"
|
||||
rel.status_img = "/static/img/icon/shop_wc.png"
|
||||
} else if (rel.status == 5) {
|
||||
rel.status_name = "已取消"
|
||||
rel.status_img = "/static/img/icon/shop_x.png"
|
||||
}else if (rel.status == 6){
|
||||
rel.status_name = "待退款"
|
||||
rel.status_img = "/static/img/icon/shop_tui.png"
|
||||
}else if (rel.status == 7){
|
||||
rel.status_name = "已退款"
|
||||
rel.status_img = "/static/img/icon/shop_tui.png"
|
||||
}
|
||||
// 去除地址中的,
|
||||
rel.user_address = rel.user_address.replace(/,/g, "");
|
||||
this.setData({
|
||||
orderInof: rel
|
||||
})
|
||||
},
|
||||
// 待付款订单支付
|
||||
async orderPay(e) {
|
||||
// let id = e.currentTarget.dataset.id
|
||||
// let data = {
|
||||
// orderID: id,
|
||||
// payType: 2,
|
||||
// userCouponID: 0,
|
||||
// userCardID: 0
|
||||
// }
|
||||
// let res = await model.payment.pay(http.api.pre_order, data)
|
||||
// if (res == 1) {
|
||||
// this.storeOrderDetail()
|
||||
// }
|
||||
|
||||
let orderInfo = this.data.orderInof
|
||||
let data = {
|
||||
orederId: orderInfo.id,
|
||||
order_num: orderInfo.order_no,
|
||||
realPrice: orderInfo.order_total_price,
|
||||
fjPrice: 0,//附加金额商城订单为0
|
||||
type: 1,//1是商城订单
|
||||
}
|
||||
wx.navigateTo({
|
||||
url: `/user/payment/payment?data=${JSON.stringify(data)}`
|
||||
})
|
||||
},
|
||||
// 取消订单
|
||||
async orderCancel(e) {
|
||||
let id = e.currentTarget.dataset.id
|
||||
wx.showModal({
|
||||
title: '取消订单',
|
||||
content: '是否取消订单',
|
||||
success(res) {
|
||||
if (res.confirm) {
|
||||
http.http.request2({ url: `${http.api.cancelOrderStatus}`, method: "GET", data: { order_id: id } })
|
||||
.then(res => {
|
||||
if (res.data.status == 1) {
|
||||
wx.showToast({
|
||||
title: '取消成功',
|
||||
icon: 'none',
|
||||
duration: 800
|
||||
})
|
||||
setTimeout(() => {
|
||||
wx.navigateBack({
|
||||
|
||||
})
|
||||
}, 800)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
this.setData({
|
||||
orderId: options.id
|
||||
})
|
||||
this.storeOrderDetail()
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage: function () {
|
||||
|
||||
}
|
||||
})
|
||||
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
}
|
||||
114
衣莎项目/源码/YiShaXiYi/mall/laundryList/laundryInfo/laundryInfo.wxml
Normal file
114
衣莎项目/源码/YiShaXiYi/mall/laundryList/laundryInfo/laundryInfo.wxml
Normal file
@@ -0,0 +1,114 @@
|
||||
<!-- 头部 -->
|
||||
<nav-bar isBack="{{isBack}}" pageTitle="{{pageTitle}}" system="{{system}}"></nav-bar>
|
||||
<!-- mall/laundryList/laundryInfo/laundryInfo.wxml -->
|
||||
<view class="laundryInfo">
|
||||
<view class="order_start flex-con3" style="top:{{system.statusHeight+system.titleHeight+'px'}}">
|
||||
<image src="{{orderInof.status_img}}" />
|
||||
{{orderInof.status_name}}
|
||||
</view>
|
||||
<view class="laundryInfo_cen">
|
||||
<view class="shop_list">
|
||||
<view class="shop_list_title">商品信息</view>
|
||||
<view class="shop_list_row dis-flex" wx:for="{{ orderInof.order_detail }}" wx:key="{{ index }}" wx:if="{{ index < shopNum }}">
|
||||
<view class="shop_list_img">
|
||||
<image src="{{item.image}}" />
|
||||
</view>
|
||||
<view class="flex1 ml20 dis-flex1">
|
||||
<view class="flex1 flex-con2">
|
||||
<view class="flex1 text1">{{item.product_name}}</view>
|
||||
<view class="flex1 text-right text1">¥{{item.price}}</view>
|
||||
</view>
|
||||
<view class="flex1 flex-con2">
|
||||
<view class="flex1 text2">{{item.attr}}</view>
|
||||
<view class="flex1 text-right text1">×{{item.count}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view wx:if="{{shopNum <= 2 && orderInof.order_detail.length>2}}" bind:tap="more" class="more_shop flex-con3">
|
||||
共{{orderInof.order_detail.length}}件
|
||||
<image class="ml20" src="/static/img/icon/asfa51f3a1f3a5f13a.png" />
|
||||
</view>
|
||||
</view>
|
||||
<view class="mon mt20">
|
||||
<view class="mon_cen pdtb20 dis-flex">
|
||||
<view class="flex1 mon_p">商品总金额</view>
|
||||
<view class="flex1 text-right mon_p">¥{{orderInof.order_total_price}}</view>
|
||||
</view>
|
||||
<view class="mon_cen pdtb20 dis-flex">
|
||||
<view class="flex1 mon_p">优惠</view>
|
||||
<view class="flex1 text-right mon_span">
|
||||
-¥{{orderInof.favourable != null ?orderInof.favourable :0}}
|
||||
</view>
|
||||
</view>
|
||||
<!-- <view class="mon_cen pdtb20 dis-flex">
|
||||
<view class="flex1 mon_p">运费(实付满99.00元免运费)</view>
|
||||
<view class="text-right mon_p">¥{{orderInof.postage}}</view>
|
||||
</view> -->
|
||||
<view class="mt20 pt40 pb20 rem flex-con2">
|
||||
<view class="dis-flex mon_p">实际支付</view>
|
||||
<view class="flex1 text-right mon_span2">¥{{orderInof.total_price}}</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mon mt20">
|
||||
<view class="list_title">配送详情</view>
|
||||
<view class="mon_cen pdtb20 dis-flex">
|
||||
<view class="flex1 mon_p">配送方式</view>
|
||||
<view class="flex1 text-right mon_i">{{orderInof.take_type == 1?"快递":"门店自取"}}</view>
|
||||
</view>
|
||||
<view class="mon_cen pdtb20 dis-flex">
|
||||
<view class="flex1 mon_p">收货地址</view>
|
||||
<view wx:if="{{orderInof.take_type == 1}}" class="flex2 text-right mon_i">
|
||||
<view>{{orderInof.realname}} {{orderInof.telnum}}</view>
|
||||
<view>{{orderInof.user_address}}</view>
|
||||
</view>
|
||||
<view wx:if="{{orderInof.take_type == 2}}" class="flex2 text-right mon_i">
|
||||
<view>{{orderInof.name}} {{orderInof.shopTelnum}}</view>
|
||||
<view>{{orderInof.address}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mon mt20">
|
||||
<view class="list_title">订单详情</view>
|
||||
<view class="mon_cen pdtb20 dis-flex">
|
||||
<view class="flex1 mon_p">订单详情</view>
|
||||
<view class="flex1 text-right mon_i">{{orderInof.order_no}}</view>
|
||||
</view>
|
||||
<view class="mon_cen pdtb20 dis-flex">
|
||||
<view class="flex1 mon_p">下单时间</view>
|
||||
<view class="flex1 text-right mon_i">{{orderInof.create_time}}</view>
|
||||
</view>
|
||||
<view class="mon_cen pdtb20 dis-flex">
|
||||
<view class="flex1 mon_p">支付方式</view>
|
||||
<view class="flex1 text-right mon_i">
|
||||
{{orderInof.pay_type == 1 ?"余额支付":"微信支付"}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="mon_cen pdtb20 dis-flex">
|
||||
<view class="flex1 mon_p">支付时间</view>
|
||||
<view class="flex1 text-right mon_i">
|
||||
{{orderInof.pay_time == 0?"未支付":orderInof.pay_time}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="mon_cen pdtb20 dis-flex">
|
||||
<view class="flex1 mon_p">订单状态</view>
|
||||
<view class="flex1 text-right mon_i">{{orderInof.status_name}}</view>
|
||||
</view>
|
||||
<view class="mon_cen pdtb20 dis-flex">
|
||||
<view class="flex1 mon_p">订单备注</view>
|
||||
<view class="flex2 text-right mon_i">{{orderInof.remark}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 付款或者取消 -->
|
||||
<view class="pay_cancel flex-con5 pd30">
|
||||
<span wx:if="{{orderInof.status == 1}}" data-id="{{orderInof.id}}" bind:tap="orderPay" class="lau_pay ml20">
|
||||
付款
|
||||
</span>
|
||||
<span wx:if="{{orderInof.status == 1}}" data-id="{{orderInof.id}}" bind:tap="orderCancel" class="lau_cancel ml20">
|
||||
取消订单
|
||||
</span>
|
||||
<button open-type="contact" class="lau_service ml20">联系客服</button>
|
||||
</view>
|
||||
<!-- toasta提示 -->
|
||||
<i-toast id="toast" />
|
||||
173
衣莎项目/源码/YiShaXiYi/mall/laundryList/laundryInfo/laundryInfo.wxss
Normal file
173
衣莎项目/源码/YiShaXiYi/mall/laundryList/laundryInfo/laundryInfo.wxss
Normal file
@@ -0,0 +1,173 @@
|
||||
/* mall/laundryList/laundryInfo/laundryInfo.wxss */
|
||||
|
||||
.laundryInfo {
|
||||
padding-bottom: 120rpx;
|
||||
}
|
||||
|
||||
.order_start {
|
||||
position: fixed;
|
||||
left: 0;
|
||||
right: 0;
|
||||
height: 90rpx;
|
||||
background-color: #1dbf53;
|
||||
font-family: PingFang-SC-Bold;
|
||||
font-size: 36rpx;
|
||||
color: #fff;
|
||||
z-index: 9999;
|
||||
}
|
||||
|
||||
.order_start image {
|
||||
width: 50rpx;
|
||||
height: 50rpx;
|
||||
margin-right: 25rpx;
|
||||
}
|
||||
|
||||
.laundryInfo_cen {
|
||||
margin-top: 110rpx;
|
||||
padding: 0 20rpx;
|
||||
}
|
||||
|
||||
.shop_list {
|
||||
padding: 30rpx 0;
|
||||
background-color: #fff;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
|
||||
.shop_list_title {
|
||||
font-weight: 400;
|
||||
padding-left: 30rpx;
|
||||
padding-bottom: 30rpx;
|
||||
border-bottom: 2rpx solid #ebebeb;
|
||||
font-family: PingFang-SC-Medium;
|
||||
font-size: 32rpx;
|
||||
color: #333;
|
||||
margin-bottom: 44rpx;
|
||||
}
|
||||
|
||||
.shop_list_row {
|
||||
height: 100rpx;
|
||||
padding: 0 30rpx;
|
||||
margin-bottom: 44rpx;
|
||||
}
|
||||
|
||||
.shop_list_row:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.shop_list_img image {
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
}
|
||||
|
||||
.text1 {
|
||||
font-family: PingFang-SC-Medium;
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.text2 {
|
||||
font-family: PingFang-SC-Medium;
|
||||
font-size: 22rpx;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.mon {
|
||||
padding: 30rpx 30rpx;
|
||||
background-color: #fff;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
|
||||
.mon_p {
|
||||
font-family: PingFang-SC-Medium;
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.mon_span {
|
||||
font-family: PingFang-SC-Medium;
|
||||
font-size: 28rpx;
|
||||
color: #ff4838;
|
||||
}
|
||||
|
||||
.mon_span2 {
|
||||
font-weight: 500;
|
||||
font-family: PingFang-SC-Bold;
|
||||
font-size: 32rpx;
|
||||
color: #ff4838;
|
||||
}
|
||||
|
||||
.rem {
|
||||
border-top: 2rpx solid #ebebeb;
|
||||
}
|
||||
|
||||
.rem input {
|
||||
padding-left: 30rpx;
|
||||
}
|
||||
|
||||
.list_title {
|
||||
font-weight: 400;
|
||||
padding-bottom: 30rpx;
|
||||
border-bottom: 2rpx solid #ebebeb;
|
||||
font-family: PingFang-SC-Medium;
|
||||
font-size: 32rpx;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.mon_i {
|
||||
font-family: PingFang-SC-Medium;
|
||||
font-size: 28rpx;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.pay_cancel {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
height: 100rpx;
|
||||
background-color: #fff;
|
||||
z-index: 9999;
|
||||
}
|
||||
|
||||
.pay_cancel span, .pay_cancel button {
|
||||
padding: 15rpx 55rpx !important;
|
||||
border: solid 1px #ebebeb !important;
|
||||
font-family: PingFang-SC-Medium !important;
|
||||
font-size: 26rpx !important;
|
||||
color: #333 !important;
|
||||
border-radius: 100rpx !important;
|
||||
font-weight: 400 !important;
|
||||
}
|
||||
|
||||
.pay_cancel button {
|
||||
line-height: normal;
|
||||
margin: 0;
|
||||
background-color: #fff;
|
||||
box-shadow: 0;
|
||||
}
|
||||
|
||||
.pay_cancel button::after {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.lau_pay {
|
||||
border: solid 2rpx #1dbf45 !important;
|
||||
color: #1dbf45 !important;
|
||||
}
|
||||
|
||||
.more_shop {
|
||||
margin: 20rpx 30rpx 0;
|
||||
height: 50rpx;
|
||||
line-height: 50rpx;
|
||||
text-align: center;
|
||||
background-color: #f6f6f6;
|
||||
border-radius: 10rpx;
|
||||
font-family: PingFang-SC-Medium;
|
||||
font-size: 26rpx;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.more_shop image {
|
||||
width: 21rpx;
|
||||
height: 10rpx;
|
||||
}
|
||||
147
衣莎项目/源码/YiShaXiYi/mall/laundryList/laundryList.js
Normal file
147
衣莎项目/源码/YiShaXiYi/mall/laundryList/laundryList.js
Normal file
@@ -0,0 +1,147 @@
|
||||
// mall/laundryList/laundryList.js
|
||||
const app = getApp();
|
||||
const regeneratorRuntime = app.loadAsync()
|
||||
const model = app.loadModel("index")
|
||||
const http = app.loadHttp()
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
system: app.globalData.system, //设备相关信息
|
||||
pageTitle: "商城订单", //头部标题
|
||||
isBack: true,//显示返回,
|
||||
isLoading: true,//加载显示关闭
|
||||
current: "0",//选择订单状态
|
||||
orderList: [],//订单列表
|
||||
},
|
||||
// tab选中事件
|
||||
handleChange({ detail }) {
|
||||
this.setData({
|
||||
current: detail.key
|
||||
});
|
||||
this.getOrderList()
|
||||
},
|
||||
// 查看详情
|
||||
openInfo(e) {
|
||||
let id = e.currentTarget.dataset.id
|
||||
wx.navigateTo({
|
||||
url: "/mall/laundryList/laundryInfo/laundryInfo?id=" + id
|
||||
})
|
||||
},
|
||||
// 获取订单列表
|
||||
async getOrderList() {
|
||||
let res = await http.http.request2({ url: `${http.api.userStoreOrder}`, method: "POST", data: { status: this.data.current } })
|
||||
this.setData({
|
||||
orderList: res.data.data,
|
||||
isLoading: false
|
||||
})
|
||||
},
|
||||
// 申请退款
|
||||
async applyReturn(e) {
|
||||
let that = this;
|
||||
let id = e.currentTarget.dataset.id;
|
||||
wx.showModal({
|
||||
title: '确定退款',
|
||||
content: '退款成功后,将不可取消退款!',
|
||||
success(res) {
|
||||
if (res.confirm) {
|
||||
http.http.request2({ url: `${http.api.applyReturn}`, method: "POST", data: { order_id: id } })
|
||||
.then(res => {
|
||||
if (res.data.status == 1) {
|
||||
wx.showToast({
|
||||
title: '请等待后台人员审核!!!',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
that.getOrderList()
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
// 确认收货
|
||||
async recGoods(e) {
|
||||
let that = this;
|
||||
let id = e.currentTarget.dataset.id;
|
||||
wx.showModal({
|
||||
content: '确定收货',
|
||||
success(res) {
|
||||
if (res.confirm) {
|
||||
wx.showLoading({
|
||||
title: '加载中',
|
||||
})
|
||||
http.http.request2({ url: `${http.api.confirmReceipt}`, method: "POST", data: { order_id: id } })
|
||||
.then(res => {
|
||||
if (res.data.status == 1) {
|
||||
wx.hideLoading()
|
||||
wx.showToast({
|
||||
title: '确认成功!',
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
})
|
||||
that.getOrderList()
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow: function () {
|
||||
this.getOrderList()
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage: function () {
|
||||
|
||||
}
|
||||
})
|
||||
6
衣莎项目/源码/YiShaXiYi/mall/laundryList/laundryList.json
Normal file
6
衣莎项目/源码/YiShaXiYi/mall/laundryList/laundryList.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"usingComponents": {
|
||||
"i-tabs": "../../extend/iview/dist/tabs/index",
|
||||
"i-tab": "../../extend/iview/dist/tab/index"
|
||||
}
|
||||
}
|
||||
54
衣莎项目/源码/YiShaXiYi/mall/laundryList/laundryList.wxml
Normal file
54
衣莎项目/源码/YiShaXiYi/mall/laundryList/laundryList.wxml
Normal file
@@ -0,0 +1,54 @@
|
||||
<!-- 头部 -->
|
||||
<nav-bar isBack="{{isBack}}" pageTitle="{{pageTitle}}" system="{{system}}"></nav-bar>
|
||||
<!-- mall/laundryList/laundryList.wxml -->
|
||||
<view class="laundryList">
|
||||
<view class="order_tab" style="top:{{system.statusHeight+system.titleHeight+'px'}}">
|
||||
<i-tabs current="{{ current }}" color="#1dbf45" bindchange="handleChange">
|
||||
<i-tab key="0" title="全部"></i-tab>
|
||||
<i-tab key="1" title="待付款"></i-tab>
|
||||
<i-tab key="2" title="待发货"></i-tab>
|
||||
<i-tab key="3" title="待收货"></i-tab>
|
||||
<i-tab key="4" title="已完成"></i-tab>
|
||||
</i-tabs>
|
||||
</view>
|
||||
<view wx:if="{{orderList.length>0}}" class="laundry">
|
||||
<view wx:for="{{orderList}}" wx:key="" class="laundry_row dis-flex1 mb20" data-id="{{item.id}}" bind:tap="openInfo">
|
||||
<view class="laundry_row1 flex-con2 pd30">
|
||||
<view class="flex1 row1-l">{{item.create_time}}</view>
|
||||
<view class="flex1 row1-r">{{item.status_name}}</view>
|
||||
</view>
|
||||
<view class="flex1 flex-con2 laundry_row2 pd30">
|
||||
<scroll-view scroll-x scroll-with-animation class="bg-white nav">
|
||||
<view class="shop_img" wx:for="{{item.image}}" wx:key="" wx:for-item="list">
|
||||
<image lazy-load="{{true}}" src="{{list.image}}" />
|
||||
</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
<view class="laundry_row3 flex-con2 pd30">
|
||||
<view class="flex1 row3-l">
|
||||
合计:¥{{item.order_total_price}}
|
||||
<span>共{{item.image.length}}件</span>
|
||||
</view>
|
||||
<view class="flex1 row3-r flex-con5">
|
||||
<span wx:if="{{item.status == 1}}">付款</span>
|
||||
<span wx:if="{{item.status == 2}}" data-id="{{item.id}}" catchtap="applyReturn">
|
||||
申请退款
|
||||
</span>
|
||||
<span wx:if="{{item.status == 3}}" data-id="{{item.id}}" catchtap="recGoods">
|
||||
确认收货
|
||||
</span>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view wx:elif="{{orderList.length<=0}}" class="empty flex-con3">
|
||||
<view>
|
||||
<image class="empty_img" src="/static/img/icon/order-konw-icon.png" />
|
||||
<view>暂无内容</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 加载动画 -->
|
||||
<loading-prog isLoading="{{isLoading}}"></loading-prog>
|
||||
<!-- toasta提示 -->
|
||||
<i-toast id="toast" />
|
||||
84
衣莎项目/源码/YiShaXiYi/mall/laundryList/laundryList.wxss
Normal file
84
衣莎项目/源码/YiShaXiYi/mall/laundryList/laundryList.wxss
Normal file
@@ -0,0 +1,84 @@
|
||||
/* mall/laundryList/laundryList.wxss */
|
||||
|
||||
.order_tab {
|
||||
position: fixed;
|
||||
width: 100%;
|
||||
height: auto;
|
||||
top: 0;
|
||||
z-index: 998;
|
||||
background-color: #fff;
|
||||
box-shadow: 0px 8rpx 5rpx 0px rgba(156, 156, 156, 0.03);
|
||||
}
|
||||
|
||||
.laundry {
|
||||
margin-top: 52px;
|
||||
}
|
||||
|
||||
.laundry_row {
|
||||
height: 379rpx;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.laundry_row1 {
|
||||
height: 89rpx;
|
||||
border-bottom: 2rpx solid #f2f2f2;
|
||||
}
|
||||
|
||||
.laundry_row3 {
|
||||
height: 108rpx;
|
||||
border-top: 2rpx solid #f2f2f2;
|
||||
}
|
||||
|
||||
.laundry_row2 scroll-view {
|
||||
height: 100rpx;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.shop_img {
|
||||
display: inline-block;
|
||||
margin-right: 30rpx;
|
||||
}
|
||||
|
||||
.shop_img image {
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
background-color: #ccc;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.row1-l {
|
||||
font-family: PingFang-SC-Medium;
|
||||
font-size: 26rpx;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.row1-r {
|
||||
font-family: PingFang-SC-Medium;
|
||||
font-size: 26rpx;
|
||||
color: #666;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.row3-l {
|
||||
font-family: PingFang-SC-Medium;
|
||||
font-size: 26rpx;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.row3-l span {
|
||||
font-family: PingFang-SC-Medium;
|
||||
font-size: 22rpx;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.row3-r span {
|
||||
width: 160rpx;
|
||||
height: 58rpx;
|
||||
border-radius: 58rpx;
|
||||
border: solid 2rpx #1dbf45;
|
||||
font-family: PingFang-SC-Medium;
|
||||
font-size: 26rpx;
|
||||
color: #1dbf45;
|
||||
text-align: center;
|
||||
line-height: 58rpx;
|
||||
}
|
||||
1
衣莎项目/源码/YiShaXiYi/mall/paid/.pydio
Normal file
1
衣莎项目/源码/YiShaXiYi/mall/paid/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
40a94428-2717-4eca-b229-be029ce9ae98
|
||||
79
衣莎项目/源码/YiShaXiYi/mall/paid/paid.js
Normal file
79
衣莎项目/源码/YiShaXiYi/mall/paid/paid.js
Normal file
@@ -0,0 +1,79 @@
|
||||
// mall/paid/paid.js
|
||||
const app = getApp();
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
system: app.globalData.system, //设备相关信息
|
||||
pageTitle: "付款成功", //头部标题
|
||||
isBack: false,//显示返回
|
||||
name: '支付成功',
|
||||
},
|
||||
// 跳转
|
||||
goUrl(e) {
|
||||
let url = e.currentTarget.dataset.url
|
||||
wx.redirectTo({
|
||||
url: url
|
||||
})
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
this.setData({
|
||||
name: options.name,
|
||||
pageTitle: options.name
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage: function () {
|
||||
|
||||
}
|
||||
})
|
||||
3
衣莎项目/源码/YiShaXiYi/mall/paid/paid.json
Normal file
3
衣莎项目/源码/YiShaXiYi/mall/paid/paid.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
}
|
||||
15
衣莎项目/源码/YiShaXiYi/mall/paid/paid.wxml
Normal file
15
衣莎项目/源码/YiShaXiYi/mall/paid/paid.wxml
Normal file
@@ -0,0 +1,15 @@
|
||||
<!-- 头部 -->
|
||||
<nav-bar isBack="{{isBack}}" pageTitle="{{pageTitle}}" system="{{system}}"></nav-bar>
|
||||
<!--user/wardrobe/wardrobeInfo/wardrobeInfo.wxml-->
|
||||
<view class="wardrobeInfo">
|
||||
<view class="wardrobeInfo_suo">
|
||||
<image src="/static/img/success-icon.png" />
|
||||
</view>
|
||||
<view class="wardrobeInfo_tit">{{name}}</view>
|
||||
<view class="wardrobeInfo_sub flex-con1">
|
||||
<view class="wardrobeInfo_sub_l" data-url="/mall/auth/auth?index=1" bind:tap="goUrl">返回首页</view>
|
||||
<view class="wardrobeInfo_sub_r" data-url="/mall/laundryList/laundryList" bind:tap="goUrl">查看订单</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- toasta提示 -->
|
||||
<i-toast id="toast" />
|
||||
49
衣莎项目/源码/YiShaXiYi/mall/paid/paid.wxss
Normal file
49
衣莎项目/源码/YiShaXiYi/mall/paid/paid.wxss
Normal file
@@ -0,0 +1,49 @@
|
||||
/* mall/paid/paid.wxss *//* user/wardrobe/wardrobeInfo/wardrobeInfo.wxss */
|
||||
page{
|
||||
background-color: #ffffff !important;
|
||||
height: 100%;
|
||||
}
|
||||
.wardrobeInfo{
|
||||
width: 660rpx;
|
||||
margin: 130rpx auto 0;
|
||||
}
|
||||
.wardrobeInfo_suo{
|
||||
display: block;
|
||||
text-align: center;
|
||||
}
|
||||
.wardrobeInfo_suo image{
|
||||
width: 231rpx;
|
||||
height: 231rpx;
|
||||
}
|
||||
.wardrobeInfo_tit{
|
||||
margin-top: 70rpx;
|
||||
font-family: PingFang-SC-Medium;
|
||||
font-size: 45rpx;
|
||||
color: #333333;
|
||||
font-weight: 400;
|
||||
text-align: center;
|
||||
}
|
||||
.wardrobeInfo_tit1{
|
||||
margin-top: 40rpx;
|
||||
font-family: PingFang-SC-Regular;
|
||||
font-size: 32rpx;
|
||||
text-align: center;
|
||||
color: #666666;
|
||||
}
|
||||
.wardrobeInfo_sub_l,.wardrobeInfo_sub_r{
|
||||
margin-top: 100rpx;
|
||||
width: 310rpx;
|
||||
height: 90rpx;
|
||||
line-height: 90rpx;
|
||||
text-align: center;
|
||||
border-radius: 45rpx;
|
||||
border: solid 2rpx #1dbf53;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
.wardrobeInfo_sub_l{
|
||||
color: #1dbf53;
|
||||
}
|
||||
.wardrobeInfo_sub_r{
|
||||
background-color: #1dbf53;
|
||||
color: #ffffff;
|
||||
}
|
||||
1
衣莎项目/源码/YiShaXiYi/mall/placeOrder/.pydio
Normal file
1
衣莎项目/源码/YiShaXiYi/mall/placeOrder/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
a1bdcf33-63b5-458c-ae49-68241f0a946b
|
||||
373
衣莎项目/源码/YiShaXiYi/mall/placeOrder/placeOrder.js
Normal file
373
衣莎项目/源码/YiShaXiYi/mall/placeOrder/placeOrder.js
Normal file
@@ -0,0 +1,373 @@
|
||||
// mall/placeOrder/placeOrder.js
|
||||
const app = getApp();
|
||||
const regeneratorRuntime = app.loadAsync()
|
||||
const model = app.loadModel("index")
|
||||
const http = app.loadHttp()
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
system: app.globalData.system, //设备相关信息
|
||||
pageTitle: "提交订单", //头部标题
|
||||
isBack: true,//显示返回
|
||||
mode: "1",//收货方式 1门店 2收货
|
||||
remark: "",//订单备注
|
||||
address: {
|
||||
all: "请选择收货地址",
|
||||
userName: "姓名",
|
||||
telNumber: "手机号"
|
||||
},//收货地址
|
||||
store: {
|
||||
name: "亲! 请选择门店地址",
|
||||
address: "选择门店地址"
|
||||
},//门店地址信息
|
||||
temCart: {},//购物车勾选的商品信息
|
||||
oldCart: null,//购物车勾选中的信息原始样本
|
||||
coupon: {},//优惠券
|
||||
all: "",//总价
|
||||
userInfo: {//用户姓名手机号 包河区 新艺苑
|
||||
name: "",
|
||||
tel: ""
|
||||
},
|
||||
giftCard: {},//卡劵
|
||||
isgiftCard: "",//拼接的卡劵信息方便操作
|
||||
isPay: 2,//1卡支付 2微信支付
|
||||
postage: {},//邮费配置
|
||||
},
|
||||
// 订单备注
|
||||
remarkInput(e) {
|
||||
this.setData({
|
||||
remark: e.detail.value
|
||||
})
|
||||
},
|
||||
// 选择支付方式
|
||||
selectPay(e) {
|
||||
let type = e.currentTarget.dataset.type
|
||||
let url = e.currentTarget.dataset.url
|
||||
if (type == 2) {
|
||||
this.setData({
|
||||
isgiftCard: "",
|
||||
giftCard: {},
|
||||
isPay: type
|
||||
})
|
||||
} else if (type == 1) {
|
||||
wx.navigateTo({
|
||||
url: url
|
||||
})
|
||||
}
|
||||
this._calculation()
|
||||
},
|
||||
// 获取选择的门店
|
||||
async getStore() {
|
||||
let res = await model.storage.getSetting("storeChange")
|
||||
if (!!res) {
|
||||
model.storage.deleteStorage('storeChange')
|
||||
console.log(res)
|
||||
if (JSON.stringify(res.store) == '{}'){
|
||||
this.setData({
|
||||
store: {
|
||||
name: "未选择地址",
|
||||
address: "您未选择任何门店,请留意,客服电话!!!"
|
||||
},
|
||||
userInfo: {
|
||||
name: res.name,
|
||||
tel: res.tel
|
||||
}
|
||||
})
|
||||
}else{
|
||||
this.setData({
|
||||
store: res.store,
|
||||
userInfo: {
|
||||
name: res.name,
|
||||
tel: res.tel
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
},
|
||||
// 获取默认收货人
|
||||
async getConsignee() {
|
||||
let res = await http.http.request2({ url: `${http.api.defaultUserAddress}`, method: "POST" })
|
||||
let add = res.data.data
|
||||
if (!!add.id) {
|
||||
add.all = add.provinceName + add.cityName + add.countryName + add.detail
|
||||
this.setData({
|
||||
address: add
|
||||
})
|
||||
}
|
||||
},
|
||||
// 选择收货方式
|
||||
wayDelivery(e) {
|
||||
let mode = e.currentTarget.dataset.mode
|
||||
this.setData({
|
||||
mode: mode
|
||||
})
|
||||
},
|
||||
// 选择收货地址
|
||||
receivingAdd() {
|
||||
if (this.data.mode == 1) {
|
||||
wx.navigateTo({
|
||||
url: "/mall/chooseStores/chooseStores"
|
||||
})
|
||||
return
|
||||
}
|
||||
wx.navigateTo({
|
||||
url: "/user/addList/addList"
|
||||
})
|
||||
},
|
||||
// 获取收货地址并且赋值到页面
|
||||
async getAdd() {
|
||||
let data = await model.storage.getSetting("address")
|
||||
if (!!data) {
|
||||
model.storage.deleteStorage('address')
|
||||
data.all = data.provinceName + data.cityName + data.countyName + data.detailInfo
|
||||
this.setData({
|
||||
address: data || ""
|
||||
})
|
||||
// If the wechat address is chosen and the back end doesn't want to handle it,
|
||||
// let me add the address interface and add it as the default address.
|
||||
if (!data.id) {
|
||||
let addData = {
|
||||
userName: data.userName,
|
||||
telNumber: data.telNumber,
|
||||
provinceName: data.provinceName,
|
||||
cityName: data.cityName,
|
||||
countryName: data.countyName,
|
||||
address: data.all,
|
||||
detail: data.detailInfo,
|
||||
is_default: 1
|
||||
}
|
||||
http.http.request2({ url: `${http.api.userAddress}`, method: "POST", data: addData })
|
||||
}
|
||||
}
|
||||
},
|
||||
// 获取优惠券
|
||||
async getCoupon() {
|
||||
let coupon = await model.storage.getSetting("coupon")
|
||||
if (!!coupon) {
|
||||
model.storage.deleteStorage('coupon')
|
||||
this.setData({
|
||||
coupon: coupon
|
||||
})
|
||||
}
|
||||
this._calculation()
|
||||
},
|
||||
// 获取卡劵
|
||||
async getGiftCard() {
|
||||
let giftCard = await model.storage.getSetting("giftCard")
|
||||
if (!!giftCard) {
|
||||
model.storage.deleteStorage('giftCard')
|
||||
this.setData({
|
||||
giftCard: giftCard,
|
||||
isgiftCard: giftCard.title + " " + giftCard.price + '折',
|
||||
isPay: 1
|
||||
})
|
||||
}
|
||||
this._calculation()
|
||||
},
|
||||
// 计算商品优惠完的总价格
|
||||
// 总 - 优惠券 + 运费
|
||||
_calculation() {
|
||||
let temCart = this.data.temCart
|
||||
let coupon = this.data.coupon.price || 0
|
||||
let postage = this.data.postage
|
||||
let all = temCart.total - coupon
|
||||
if (all <= parseFloat(postage.satisfy_money)) {
|
||||
all += parseFloat(postage.postage_money)
|
||||
}
|
||||
if (this.data.mode == 1){
|
||||
all-=10
|
||||
}
|
||||
this.setData({
|
||||
all: all.toFixed(2)
|
||||
})
|
||||
},
|
||||
// 商城下单
|
||||
async storeOrder(e) {
|
||||
let formId = e.detail.formId
|
||||
if (!this.data.userInfo.tel && this.data.mode == 1) {
|
||||
model.msg.dataMsg({
|
||||
type: "warning",
|
||||
content: "请选择收货手机号"
|
||||
})
|
||||
return
|
||||
}
|
||||
if (!this.data.address.all && this.data.mode == 2) {
|
||||
model.msg.dataMsg({
|
||||
type: "warning",
|
||||
content: "请选择收货地址"
|
||||
})
|
||||
return
|
||||
}
|
||||
let products = this.data.temCart.allCart
|
||||
let oldCart = this.data.oldCart
|
||||
let arr3 = []
|
||||
products.map((v, i) => {
|
||||
let data = {
|
||||
store_product_id: v.store_product_id,
|
||||
count: v.count,
|
||||
attr: v.attr,
|
||||
image: v.image
|
||||
}
|
||||
arr3[i] = data
|
||||
})
|
||||
let data = {
|
||||
take_type: 1,
|
||||
shop_id: 0,
|
||||
username: "",
|
||||
telnum: 0,
|
||||
address_id: 0,
|
||||
products: arr3,
|
||||
remark: this.data.remark
|
||||
}
|
||||
|
||||
if (this.data.mode == 1) {
|
||||
data.take_type = 2
|
||||
data.username = this.data.userInfo.name
|
||||
data.telnum = this.data.userInfo.tel
|
||||
if (this.data.store.id !== 'null' || this.data.store.id !== 'undefined'){
|
||||
data.shop_id = this.data.store.id || 0
|
||||
}
|
||||
} else if (this.data.mode == 2) {
|
||||
data.address_id = this.data.address.id
|
||||
}
|
||||
let res = await http.http.request2({ url: `${http.api.storeOrder}`, method: "POST", data: data })
|
||||
// 下单成功时候就清除购物车
|
||||
let rel = res.data.data
|
||||
// 如果下单成功掉支付
|
||||
if (rel.pass) {
|
||||
model.shopCart.deleteCart(oldCart)
|
||||
let payData = {
|
||||
orderID: rel.store_order_id,
|
||||
payType: this.data.isPay,
|
||||
form_id: formId,
|
||||
userCouponID: 0,
|
||||
userCardID: 0
|
||||
}
|
||||
// 优惠券
|
||||
if (!!this.data.coupon.id) {
|
||||
payData.userCouponID = this.data.coupon.id
|
||||
}
|
||||
// 卡
|
||||
if (this.data.isPay == 1) {
|
||||
payData.userCardID = this.data.giftCard.id
|
||||
}
|
||||
// 吊起支付
|
||||
let pay = await model.payment.pay(http.api.pre_order, payData)
|
||||
if(pay == 3) return;
|
||||
if (pay == 1) {
|
||||
wx.redirectTo({
|
||||
url: "/mall/paid/paid?name=支付成功"
|
||||
})
|
||||
return
|
||||
}
|
||||
setTimeout(() => {
|
||||
wx.redirectTo({
|
||||
url: "/mall/paid/paid?name=待支付"
|
||||
})
|
||||
}, 800)
|
||||
}
|
||||
},
|
||||
// 获取当前邮费配置
|
||||
async postage() {
|
||||
let res = await http.http.request2({ url: `${http.api.postage}`, method: "POST", data: { type: 1 } })
|
||||
if (res.data.status) {
|
||||
this.setData({
|
||||
postage: res.data.data
|
||||
})
|
||||
}
|
||||
this._calculation()
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad: function (options) {
|
||||
this.getConsignee()
|
||||
var that = this
|
||||
app.setWatching('temCart', (n) => {
|
||||
// 深拷贝,保留一份原始选中,方便删除
|
||||
var _obj = JSON.stringify(n),
|
||||
objClone = JSON.parse(_obj);
|
||||
|
||||
let temCart = n
|
||||
let allCart = temCart.allCart
|
||||
let attr = ""
|
||||
allCart.map((v, i) => {
|
||||
allCart[i].count = allCart[i].num
|
||||
allCart[i].store_product_id = allCart[i].id
|
||||
if (!(typeof v.attr == "string")) {
|
||||
if (v.attr.length > 0) {
|
||||
v.attr.map((v, i) => {
|
||||
attr += v + ","
|
||||
})
|
||||
allCart[i].attr = attr.substr(0, attr.length - 1)
|
||||
} else {
|
||||
allCart[i].attr = ""
|
||||
}
|
||||
attr = ""
|
||||
}
|
||||
})
|
||||
temCart.allCart = allCart
|
||||
// temCart.total = (temCart.total).toFixed(2)
|
||||
that.setData({
|
||||
temCart: temCart,
|
||||
oldCart: objClone
|
||||
})
|
||||
});
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow: function () {
|
||||
this.postage()
|
||||
this.getAdd()
|
||||
this.getCoupon()
|
||||
this.getStore()
|
||||
this.getGiftCard()
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面隐藏
|
||||
*/
|
||||
onHide: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面卸载
|
||||
*/
|
||||
onUnload: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面相关事件处理函数--监听用户下拉动作
|
||||
*/
|
||||
onPullDownRefresh: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 页面上拉触底事件的处理函数
|
||||
*/
|
||||
onReachBottom: function () {
|
||||
|
||||
},
|
||||
|
||||
/**
|
||||
* 用户点击右上角分享
|
||||
*/
|
||||
onShareAppMessage: function () {
|
||||
|
||||
}
|
||||
})
|
||||
6
衣莎项目/源码/YiShaXiYi/mall/placeOrder/placeOrder.json
Normal file
6
衣莎项目/源码/YiShaXiYi/mall/placeOrder/placeOrder.json
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"usingComponents": {
|
||||
"wux-cell-group": "../../extend/wux/dist/cell-group/index",
|
||||
"wux-cell": "../../extend/wux/dist/cell/index"
|
||||
}
|
||||
}
|
||||
100
衣莎项目/源码/YiShaXiYi/mall/placeOrder/placeOrder.wxml
Normal file
100
衣莎项目/源码/YiShaXiYi/mall/placeOrder/placeOrder.wxml
Normal file
@@ -0,0 +1,100 @@
|
||||
<!-- 头部 -->
|
||||
<nav-bar isBack="{{isBack}}" pageTitle="{{pageTitle}}" system="{{system}}" />
|
||||
<!-- mall/placeOrder/placeOrder.wxml -->
|
||||
<view class="placeOrder">
|
||||
<view class="expMode flex-con3">
|
||||
<view class="mode_cen">
|
||||
<view data-mode="1" bind:tap="wayDelivery" class="mode {{ mode == 1 ? 'mode_active' :'' }}">
|
||||
门店自取
|
||||
</view>
|
||||
<!-- <view data-mode="2" bind:tap="wayDelivery" class="mode {{ mode == 2 ? 'mode_active' :'' }}">
|
||||
快递寄送
|
||||
</view> -->
|
||||
</view>
|
||||
</view>
|
||||
<view class="pd20">
|
||||
<view class="receiving mt30 flex-con3" bind:tap="receivingAdd">
|
||||
<view class="dis-flex flex1">
|
||||
<view class="flex1">
|
||||
<view class="flex-con1 receiving_img clamp1">
|
||||
<image class="{{ mode == 1 ? 'receiving_img2' : '' }}" src="{{ mode == 1 ? '/static/img/icon/add2.png' : '/static/img/icon/add1.png' }}" />
|
||||
<span wx:if="{{ mode == 1 }}" class="flex1 ml20">
|
||||
{{ store.name }} {{store.telnum ? "("+store.telnum +")" :""}}
|
||||
</span>
|
||||
<span wx:if="{{ mode == 2 }}" class="flex1 ml20">{{ address.all }}</span>
|
||||
</view>
|
||||
<view wx:if="{{ mode == 1 }}" class="mt30 receiving_p">
|
||||
{{ store.address }}
|
||||
</view>
|
||||
<view wx:if="{{ mode == 2 }}" class="mt30 receiving_p">
|
||||
{{ address.userName }} {{ address.telNumber }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="flex-con3 receiving-r">
|
||||
<image src="/static/img/icon/right-r.png" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="shop_list mt20">
|
||||
<view class="shop_list_row dis-flex" wx:for="{{ temCart.allCart }}" wx:key="{{ index }}">
|
||||
<view class="shop_list_img">
|
||||
<image src="{{item.image}}" />
|
||||
</view>
|
||||
<view class="flex1 ml20 dis-flex1">
|
||||
<view class="flex1 flex-con2">
|
||||
<view class="flex1 text1">{{item.name}}</view>
|
||||
<view class="flex1 text-right text1">¥{{item.price}}</view>
|
||||
</view>
|
||||
<view class="flex1 flex-con2">
|
||||
<view class="flex1 text2">
|
||||
<span>
|
||||
{{item.attr}}
|
||||
</span>
|
||||
</view>
|
||||
<view class="flex1 text-right text1">×{{item.num}}</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="mt20">
|
||||
<wux-cell-group>
|
||||
<wux-cell data-type="2" bind:tap="selectPay" thumb="/static/img/icon/wxlogo2.png" title="微信支付" rightUrl="{{isPay == 2 ? '/static/img/icon/wxPay2.png' : '/static/img/icon/wxPay1.png'}}"></wux-cell>
|
||||
<wux-cell data-type="1" bind:tap="selectPay" data-url="/user/payment/card/card?type=1" right="text_right_cell2" thumb="{{!!giftCard.logo?giftCard.logo:'/static/img/icon/yhk.png'}}" title="{{isgiftCard != ''?isgiftCard:'会员卡支付'}}" rightUrl="{{isPay == 1 ? '/static/img/icon/wxPay2.png' : '/static/img/icon/wxPay1.png'}}"></wux-cell>
|
||||
</wux-cell-group>
|
||||
</view>
|
||||
<view class="mon mt20">
|
||||
<!-- <navigator url="/mall/couponCard/couponCard?total={{temCart.total}}" class="mon_cen pdtb20 dis-flex">
|
||||
<view class="flex1 mon_p">优惠</view>
|
||||
<view class="flex1 flex-con5 mon_span">
|
||||
<image src="/static/img/icon/right-r.png" />
|
||||
<span wx:if="{{ !!coupon && !!coupon.price }}" class="mr20">-¥{{coupon.price}}</span>
|
||||
<span wx:else class="mr20">选择优惠券</span>
|
||||
</view>
|
||||
</navigator> -->
|
||||
<view class="mon_cen pdtb20 dis-flex">
|
||||
<view class="flex1 mon_p">商品总金额</view>
|
||||
<view class="flex1 text-right mon_p">¥{{temCart.total}}</view>
|
||||
</view>
|
||||
<!-- <view class="mon_cen pdtb20 dis-flex">
|
||||
<view class="flex1 mon_p">运费</view>
|
||||
<view class="flex1 text-right mon_p">¥{{temCart.total>postage.satisfy_money?0:(mode==1?0:postage.postage_money)}}</view>
|
||||
</view> -->
|
||||
<view class="mt20 pt40 pb20 rem flex-con2">
|
||||
<view class="dis-flex mon_p">备注</view>
|
||||
<input class="flex1" type="text" bindinput="remarkInput" placeholder="如有问题请备注" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 支付 -->
|
||||
<view class="shop_pay">
|
||||
<view class="flex-con5 flex1 pay_num">
|
||||
合计:¥{{all<=0?0:all}}
|
||||
</view>
|
||||
<form report-submit bindsubmit="storeOrder">
|
||||
<button class="pay_sub" form-type="submit">支付</button>
|
||||
</form>
|
||||
</view>
|
||||
<!-- toasta提示 -->
|
||||
<i-toast id="toast" />
|
||||
|
||||
183
衣莎项目/源码/YiShaXiYi/mall/placeOrder/placeOrder.wxss
Normal file
183
衣莎项目/源码/YiShaXiYi/mall/placeOrder/placeOrder.wxss
Normal file
@@ -0,0 +1,183 @@
|
||||
/* mall/placeOrder/placeOrder.wxss */
|
||||
|
||||
.placeOrder {
|
||||
margin-bottom: 120rpx;
|
||||
}
|
||||
|
||||
.expMode {
|
||||
width: 750rpx;
|
||||
height: 90rpx;
|
||||
background-color: #1dbf53;
|
||||
}
|
||||
|
||||
.mode_cen {
|
||||
display: flex;
|
||||
height: 60rpx;
|
||||
line-height: 60rpx;
|
||||
}
|
||||
|
||||
.mode {
|
||||
flex: 1;
|
||||
padding: 0 45rpx;
|
||||
font-family: PingFang-SC-Bold;
|
||||
font-size: 28rpx;
|
||||
color: #beffd4;
|
||||
}
|
||||
|
||||
.mode_active {
|
||||
background-color: #fff;
|
||||
border-radius: 30rpx;
|
||||
color: #1dbf53;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.receiving {
|
||||
width: 710rpx;
|
||||
height: 180rpx;
|
||||
background-color: #fff;
|
||||
border-radius: 10rpx;
|
||||
padding: 0 29rpx;
|
||||
}
|
||||
|
||||
.receiving_img {
|
||||
font-family: PingFang-SC-Bold;
|
||||
font-size: 34rpx;
|
||||
font-weight: 700;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.receiving_img image {
|
||||
width: 30rpx;
|
||||
height: 36rpx;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.receiving_img2 {
|
||||
width: 36rpx !important;
|
||||
height: 34rpx !important;
|
||||
}
|
||||
|
||||
.receiving_p {
|
||||
font-family: PingFang-SC-Medium;
|
||||
font-size: 28rpx;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.receiving-r image {
|
||||
width: 14rpx;
|
||||
height: 30rpx;
|
||||
}
|
||||
|
||||
.shop_list {
|
||||
padding: 40rpx 0;
|
||||
background-color: #fff;
|
||||
border-radius: 10rpx;
|
||||
}
|
||||
|
||||
.shop_list_row {
|
||||
height: 100rpx;
|
||||
padding: 0 30rpx;
|
||||
margin-bottom: 44rpx;
|
||||
}
|
||||
|
||||
.shop_list_row:last-child {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
.shop_list_img image {
|
||||
width: 100rpx;
|
||||
height: 100rpx;
|
||||
}
|
||||
|
||||
.text1 {
|
||||
font-family: PingFang-SC-Medium;
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.text2 {
|
||||
font-family: PingFang-SC-Medium;
|
||||
font-size: 22rpx;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.mon {
|
||||
padding: 20rpx 30rpx;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.mon_p {
|
||||
font-family: PingFang-SC-Medium;
|
||||
font-size: 28rpx;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.mon_span {
|
||||
font-family: PingFang-SC-Medium;
|
||||
font-size: 28rpx;
|
||||
color: #ff4838;
|
||||
}
|
||||
|
||||
.mon_span image {
|
||||
height: 28rpx;
|
||||
width: 15rpx;
|
||||
}
|
||||
|
||||
.rem {
|
||||
border-top: 2rpx solid #ebebeb;
|
||||
}
|
||||
|
||||
.rem input {
|
||||
padding-left: 30rpx;
|
||||
}
|
||||
|
||||
/* 支付 */
|
||||
|
||||
.shop_pay {
|
||||
position: fixed;
|
||||
height: 100rpx;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
background-color: #fff;
|
||||
border-bottom: 2rpx solid #ebebeb;
|
||||
z-index: 99999;
|
||||
}
|
||||
|
||||
.pay_sub {
|
||||
width: 260rpx;
|
||||
height: 100rpx;
|
||||
line-height: 100rpx;
|
||||
text-align: center;
|
||||
background-color: #1dbf53;
|
||||
font-family: PingFang-SC-Medium;
|
||||
font-size: 32rpx;
|
||||
color: #fff;
|
||||
border-radius: 0;
|
||||
border: 0;
|
||||
}
|
||||
pay_sub::after{
|
||||
width: 0;
|
||||
height: 0;
|
||||
border: 0;
|
||||
}
|
||||
.pay_num {
|
||||
margin-right: 30rpx;
|
||||
font-weight: 600;
|
||||
font-family: PingFang-SC-Bold;
|
||||
font-size: 30rpx;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
|
||||
/* 新增 */
|
||||
.pla-se-card{
|
||||
padding-top: 20rpx;
|
||||
padding-bottom: 20rpx;
|
||||
}
|
||||
.pla-se-card-img{
|
||||
height: 28rpx;
|
||||
width: 15rpx;
|
||||
}
|
||||
1
衣莎项目/源码/YiShaXiYi/mall/shopcart/.pydio
Normal file
1
衣莎项目/源码/YiShaXiYi/mall/shopcart/.pydio
Normal file
@@ -0,0 +1 @@
|
||||
d2590945-a9c1-4e88-9507-de2bd20b4522
|
||||
182
衣莎项目/源码/YiShaXiYi/mall/shopcart/shopcart.js
Normal file
182
衣莎项目/源码/YiShaXiYi/mall/shopcart/shopcart.js
Normal file
@@ -0,0 +1,182 @@
|
||||
// mall/shopcart/shopcart.js
|
||||
const app = getApp();
|
||||
const regeneratorRuntime = app.loadAsync()
|
||||
const model = app.loadModel("index")
|
||||
const http = app.loadHttp()
|
||||
const util = app.loadUtils("util")
|
||||
Page({
|
||||
/**
|
||||
* 组件的初始数据
|
||||
*/
|
||||
data: {
|
||||
system: app.globalData.system, //设备相关信息
|
||||
pageTitle: "购物车", //头部标题
|
||||
isBack: true,//显示返回
|
||||
right: [
|
||||
{
|
||||
text: '删除',
|
||||
style: 'background-color: #F4333C; color: white',
|
||||
}],
|
||||
cartList: [],//购物车
|
||||
total: 0,//购物车商品总价格
|
||||
allShow: false,
|
||||
isAllShow: false,//判断是否已经全选
|
||||
postage:{},//邮费
|
||||
},
|
||||
//获取本地缓存中的购物车商品
|
||||
async getCart() {
|
||||
let cart = await model.shopCart.getCart()
|
||||
cart.map((v, i) => {
|
||||
cart[i].isShow = false
|
||||
cart[i].allMon = (v.price * v.num).toFixed(2)
|
||||
})
|
||||
this.setData({
|
||||
cartList: cart
|
||||
})
|
||||
this.getTotalPrice()
|
||||
},
|
||||
// 增加和减少商品数量
|
||||
async handleChange1(e) {
|
||||
let item = e.currentTarget.dataset.item
|
||||
let value = e.detail.value
|
||||
let cartList = this.data.cartList
|
||||
item.num = value
|
||||
// 更新购物车,返回最新购物车
|
||||
let newCart = await model.shopCart.updateCart(item)
|
||||
newCart.map((v, i) => {
|
||||
for (let j = 0; j < cartList.length; j++) {
|
||||
// 判断对应数据,来修改对应的isShow
|
||||
if (util.Compare(v, cartList[j], "num")) {
|
||||
newCart[i].isShow = cartList[j].isShow
|
||||
newCart[i].allMon = (v.price * v.num).toFixed(2)
|
||||
}
|
||||
}
|
||||
})
|
||||
this.setData({
|
||||
cartList: newCart
|
||||
})
|
||||
this.getTotalPrice()
|
||||
},
|
||||
// 侧滑删除事件
|
||||
async onClick(e) {
|
||||
let that = this
|
||||
let item = e.currentTarget.dataset.item
|
||||
item.num = 0
|
||||
// 更新购物车,返回最新购物车
|
||||
let newCart = await model.shopCart.updateCart(item)
|
||||
newCart.map((v, i) => {
|
||||
newCart[i].allMon = (v.price * v.num).toFixed(2)
|
||||
})
|
||||
that.setData({
|
||||
cartList: newCart
|
||||
})
|
||||
that.getTotalPrice()
|
||||
model.msg.dataMsg({
|
||||
content: "删除成功",
|
||||
type: "success"
|
||||
})
|
||||
},
|
||||
// 计算选中的总价格
|
||||
getTotalPrice() {
|
||||
let cartList = this.data.cartList
|
||||
let total = 0
|
||||
cartList.map((v, i) => {
|
||||
if (v.isShow) {
|
||||
total += v.num * v.price
|
||||
}
|
||||
})
|
||||
this.setData({
|
||||
total: total.toFixed(2)
|
||||
})
|
||||
// 总价格同步到全局变量中
|
||||
app.globalData.temCart.total = total.toFixed(2)
|
||||
},
|
||||
// 商品的勾选事件
|
||||
checklist(e) {
|
||||
let that = this
|
||||
let index = e.currentTarget.dataset.index
|
||||
let cartList = this.data.cartList
|
||||
let allShow = false //如果为true说明全部数据都全选
|
||||
let arr1 = []
|
||||
if (cartList.length <= 0) {
|
||||
return
|
||||
}
|
||||
// 如果为-1说明是全选
|
||||
if (index == -1 && !this.data.isAllShow) {
|
||||
this.setData({
|
||||
isAllShow: true
|
||||
})
|
||||
cartList.map((v, i) => {
|
||||
cartList[i].isShow = true
|
||||
})
|
||||
} else if (this.data.isAllShow && index == -1) {
|
||||
this.setData({
|
||||
isAllShow: false
|
||||
})
|
||||
cartList.map((v, i) => {
|
||||
cartList[i].isShow = false
|
||||
})
|
||||
} else {
|
||||
this.setData({
|
||||
isAllShow: false
|
||||
})
|
||||
cartList[index].isShow = !cartList[index].isShow
|
||||
}
|
||||
// 每次勾选时判断是否已经全选
|
||||
cartList.map((v, i) => {
|
||||
arr1.push(v.isShow)
|
||||
})
|
||||
if (arr1.indexOf(false) == -1) {
|
||||
allShow = true
|
||||
}
|
||||
this.setData({
|
||||
cartList: cartList,
|
||||
allShow: allShow
|
||||
})
|
||||
this.getTotalPrice()
|
||||
},
|
||||
// 商品提交事件
|
||||
async placeOrder() {
|
||||
let isLogin = await util.isLoginJump()
|
||||
if (isLogin == 1) return;
|
||||
let cartList = this.data.cartList
|
||||
let newCart = []
|
||||
cartList.map((v, i) => {
|
||||
if (v.isShow) {
|
||||
newCart.push(v)
|
||||
}
|
||||
})
|
||||
app.globalData.temCart.allCart = newCart
|
||||
if (newCart.length <= 0) {
|
||||
return
|
||||
}
|
||||
wx.navigateTo({
|
||||
url: "/mall/placeOrder/placeOrder"
|
||||
})
|
||||
},
|
||||
// 获取当前邮费配置
|
||||
async postage() {
|
||||
let res = await http.http.request1({ url: `${http.api.postage}`, method: "POST", data: { type: 1 } })
|
||||
if (res.data.status) {
|
||||
this.setData({
|
||||
postage: res.data.data
|
||||
})
|
||||
}
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad() {
|
||||
this.postage()
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
||||
*/
|
||||
onShow: function () {
|
||||
this.setData({
|
||||
total: 0,
|
||||
allShow: false
|
||||
})
|
||||
this.getCart()
|
||||
},
|
||||
})
|
||||
10
衣莎项目/源码/YiShaXiYi/mall/shopcart/shopcart.json
Normal file
10
衣莎项目/源码/YiShaXiYi/mall/shopcart/shopcart.json
Normal file
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"wux-input-number": "../../extend/wux/dist/input-number/index",
|
||||
"wux-swipe-action": "../../extend/wux/dist/swipe-action/index",
|
||||
"wux-cell-group": "../../extend/wux/dist/cell-group/index",
|
||||
"wux-cell": "../../extend/wux/dist/cell/index",
|
||||
"i-input-number": "../../extend/iview/dist/input-number/index"
|
||||
}
|
||||
}
|
||||
65
衣莎项目/源码/YiShaXiYi/mall/shopcart/shopcart.wxml
Normal file
65
衣莎项目/源码/YiShaXiYi/mall/shopcart/shopcart.wxml
Normal file
@@ -0,0 +1,65 @@
|
||||
<!-- 头部 -->
|
||||
<nav-bar isBack="{{isBack}}" pageTitle="{{pageTitle}}" system="{{system}}"></nav-bar>
|
||||
<!-- mall/shopcart/shopcart.wxml -->
|
||||
<view class="shopcart">
|
||||
<view class="shop_list">
|
||||
<view wx:for="{{ cartList }}" wx:key="{{index}}" data-index="{{index}}" catchtap="checklist">
|
||||
<wux-cell-group>
|
||||
<wux-swipe-action autoClose right="{{ right }}" data-item="{{ item }}" bind:click="onClick">
|
||||
<view class="shop_list_row" wx:if="{{ item.num != 0 }}">
|
||||
<view class="shop_select">
|
||||
<image src="{{item.isShow ? '/static/img/icon/wxPay2.png' : '/static/img/icon/wxPay1.png' }}" />
|
||||
</view>
|
||||
<view class="shop_info">
|
||||
<view class="shop_img">
|
||||
<image src="{{item.image}}" />
|
||||
</view>
|
||||
<view class="shop_info_p">
|
||||
<view class="shop_info_title">
|
||||
<view class="shop_title">{{item.name}}</view>
|
||||
<view class="shop_j">
|
||||
<span class="mr10" wx:if="{{ !!item.attr && item.attr.length >=0 }}" wx:for="{{item.attr}}" wx:key wx:for-item="list" >{{list}}</span>
|
||||
</view>
|
||||
</view>
|
||||
<view class="shop_mon_num">
|
||||
<view class="mon">¥{{item.allMon}}</view>
|
||||
<view class="num">
|
||||
<i-input-number i-class="my-i-number" data-item="{{ item }}" value="{{ item.num }}" min="0" max="100" bindchange="handleChange1" />
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</wux-swipe-action>
|
||||
</wux-cell-group>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 购物车为空时 -->
|
||||
<view wx:if="{{ cartList.length <= 0 }}" class="cart_kong">
|
||||
<view>
|
||||
<image src="/static/img/icon/cart-kong.png" />
|
||||
<view class="cart_kong_p">购物车空空如也~</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="cart_sub">
|
||||
<!-- <view class="cart_tips">
|
||||
<view class="cart_tips_p">不满{{postage.satisfy_money}}元包邮,配送费¥{{postage.postage_money}}</view>
|
||||
<view class="add_shop">继续凑单 ></view>
|
||||
</view> -->
|
||||
<view class="cart_but">
|
||||
<view class="cart_in">
|
||||
<view class="cart_all" data-index="-1" bind:tap="checklist">
|
||||
<image src="{{ allShow ? '/static/img/icon/wxPay2.png' : '/static/img/icon/wxPay1.png' }}" />
|
||||
全选
|
||||
</view>
|
||||
<view class="all_num">
|
||||
<span>(不含运费)</span>
|
||||
合计:¥{{total}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="purchase flex-con3" bind:tap="placeOrder">立即购买</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- toasta提示 -->
|
||||
<i-toast id="toast" />
|
||||
249
衣莎项目/源码/YiShaXiYi/mall/shopcart/shopcart.wxss
Normal file
249
衣莎项目/源码/YiShaXiYi/mall/shopcart/shopcart.wxss
Normal file
@@ -0,0 +1,249 @@
|
||||
/* mall/shopcart/shopcart.wxss */
|
||||
|
||||
page {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.mr10 {
|
||||
margin-right: 10rpx;
|
||||
}
|
||||
|
||||
.shopcart {
|
||||
padding: 20rpx;
|
||||
padding-bottom: 280rpx;
|
||||
}
|
||||
|
||||
.shop_list {
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.shop_list_row {
|
||||
height: 200rpx;
|
||||
display: flex;
|
||||
padding: 0 35rpx;
|
||||
-webkit-align-items: center;
|
||||
align-items: center;
|
||||
border-bottom: #ebebeb solid 2rpx;
|
||||
background: #fff;
|
||||
}
|
||||
|
||||
.shop_list_row:last-child {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.shop_select {
|
||||
line-height: 200rpx;
|
||||
}
|
||||
|
||||
.shop_select image {
|
||||
margin-right: 25rpx;
|
||||
width: 35rpx;
|
||||
height: 35rpx;
|
||||
}
|
||||
|
||||
.shop_info {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.shop_img {
|
||||
margin-right: 20rpx;
|
||||
height: 150rpx;
|
||||
width: 150rpx;
|
||||
background: #1dbf53;
|
||||
}
|
||||
|
||||
.shop_img image {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.shop_info_p {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-flow: column;
|
||||
}
|
||||
|
||||
.shop_info_title {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.shop_title {
|
||||
font-family: PingFang-SC-Bold;
|
||||
font-size: 30rpx;
|
||||
color: #333;
|
||||
font-weight: 600;
|
||||
display: -webkit-box !important;
|
||||
-webkit-box-orient: vertical;
|
||||
-webkit-line-clamp: 1;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.shop_j {
|
||||
margin-top: 10rpx;
|
||||
font-family: PingFang-SC-Medium;
|
||||
font-size: 22rpx;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.shop_mon_num {
|
||||
display: flex;
|
||||
-webkit-align-items: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.mon {
|
||||
flex: 1;
|
||||
font-family: PingFang-SC-Bold;
|
||||
font-size: 32rpx;
|
||||
color: #ff4737;
|
||||
}
|
||||
|
||||
.wux_sub {
|
||||
border: 0 !important;
|
||||
color: #272727 !important;
|
||||
}
|
||||
|
||||
.wux_input {
|
||||
border: 0 !important;
|
||||
background-color: #f5f5f5 !important;
|
||||
}
|
||||
|
||||
.wux_add {
|
||||
border: 0 !important;
|
||||
color: #272727 !important;
|
||||
}
|
||||
|
||||
.my-i-number view, .my-i-number input {
|
||||
border: 0 !important;
|
||||
}
|
||||
|
||||
.my-i-number input {
|
||||
background-color: #f5f5f5 !important;
|
||||
}
|
||||
|
||||
.cart_sub {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
width: 100%;
|
||||
background-color: #fff;
|
||||
border-bottom: 2rpx solid #e9e9e9;
|
||||
z-index: 99999;
|
||||
}
|
||||
|
||||
.cart_tips {
|
||||
height: 80rpx;
|
||||
background-color: #fcf0f0;
|
||||
display: flex;
|
||||
display: -webkit-flex;
|
||||
-webkit-align-items: center;
|
||||
align-items: center;
|
||||
-webkit-justify-content: center;
|
||||
justify-content: center;
|
||||
padding: 0 27rpx 0 38rpx;
|
||||
}
|
||||
|
||||
.cart_tips_p {
|
||||
flex: 1;
|
||||
text-align: left;
|
||||
font-size: 24rpx;
|
||||
color: #666;
|
||||
}
|
||||
|
||||
.add_shop {
|
||||
font-size: 24rpx;
|
||||
color: #1dbf53;
|
||||
}
|
||||
|
||||
.cart_but {
|
||||
/* height: 100rpx; */
|
||||
display: flex;
|
||||
display: -webkit-flex;
|
||||
-webkit-align-items: center;
|
||||
align-items: center;
|
||||
-webkit-justify-content: center;
|
||||
justify-content: center;
|
||||
padding-bottom: calc(env(safe-area-inset-bottom) / 2);
|
||||
height: calc(100rpx + env(safe-area-inset-bottom) / 2);
|
||||
}
|
||||
|
||||
.cart_in {
|
||||
height: 100%;
|
||||
flex: 1;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.purchase {
|
||||
width: 260rpx;
|
||||
height: 100rpx;
|
||||
text-align: center;
|
||||
line-height: calc(100rpx + env(safe-area-inset-bottom) / 2);
|
||||
background-color: #1dbf53;
|
||||
font-size: 32rpx;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.cart_all {
|
||||
flex: 1;
|
||||
height: 100%;
|
||||
padding-left: 45rpx;
|
||||
display: -webkit-flex;
|
||||
-webkit-align-items: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.cart_all image {
|
||||
width: 35rpx;
|
||||
height: 35rpx;
|
||||
margin-right: 17rpx;
|
||||
}
|
||||
|
||||
.all_num {
|
||||
padding-right: 14rpx;
|
||||
font-size: 30rpx;
|
||||
color: #333;
|
||||
font-weight: 600;
|
||||
display: flex;
|
||||
display: -webkit-flex;
|
||||
-webkit-align-items: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.all_num span {
|
||||
font-size: 22rpx;
|
||||
color: #999;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.cart_kong {
|
||||
height: 600rpx;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
display: flex;
|
||||
display: -webkit-flex;
|
||||
-webkit-align-items: center;
|
||||
align-items: center;
|
||||
-webkit-justify-content: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.cart_kong image {
|
||||
width: 104rpx;
|
||||
height: 88rpx;
|
||||
}
|
||||
|
||||
.cart_kong_p {
|
||||
margin-top: 33rpx;
|
||||
font-family: PingFang-SC-Medium;
|
||||
font-size: 26rpx;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.delete_tips {
|
||||
text-align: right;
|
||||
font-size: 24rpx;
|
||||
color: #999;
|
||||
margin-bottom: 5rpx;
|
||||
}
|
||||
Reference in New Issue
Block a user