[更新数据]
This commit is contained in:
@@ -5,12 +5,22 @@
|
|||||||
|
|
||||||
import {req} from "../request"
|
import {req} from "../request"
|
||||||
|
|
||||||
const index = () => req({url: "orders"}) //登录
|
const index = () => req({url: "orders"}) //全部订单
|
||||||
|
const unpaid = () => req({url: "orders/unpaid"}) //待付款
|
||||||
|
const paid = () => req({url: "orders/paid"}) //待发货
|
||||||
|
const delive = () => req({url: "orders/delivered"}) //待收货
|
||||||
|
const refund = () => req({url: "orders/refunds"}) //退款
|
||||||
const cancel = (orderId) => req({url: "orders/cancel/" + orderId}) //取消订单
|
const cancel = (orderId) => req({url: "orders/cancel/" + orderId}) //取消订单
|
||||||
const orders = (orderId) => req({url: "orders/" + orderId}) //订单-详情
|
const orders = (orderId) => req({url: "orders/" + orderId}) //订单-详情
|
||||||
|
const paymen = (orderId) => req({url: "payments/order/" + orderId}) //订单支付-详情
|
||||||
|
|
||||||
export default({
|
export default({
|
||||||
index,
|
index,
|
||||||
|
unpaid,
|
||||||
|
paid,
|
||||||
|
delive,
|
||||||
|
refund,
|
||||||
cancel,
|
cancel,
|
||||||
orders
|
orders,
|
||||||
|
paymen
|
||||||
})
|
})
|
||||||
@@ -3,10 +3,10 @@ import {errInfo} from './err'
|
|||||||
import {updToken} from './updateToken'
|
import {updToken} from './updateToken'
|
||||||
|
|
||||||
// 请求方式配置
|
// 请求方式配置
|
||||||
const api = "https://new-web-test.cnskl.com/api/"
|
// const api = "https://new-web-test.cnskl.com/api/"
|
||||||
// const api = "https://mi-org.cnskl.com/api/"
|
const api = "https://mi-org.cnskl.com/api/"
|
||||||
const header = {
|
const header = {
|
||||||
"Accept": "application/json"
|
"Accept" : "application/json"
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ Component({
|
|||||||
jumpUrl(e) {
|
jumpUrl(e) {
|
||||||
let id = e.currentTarget.dataset.id
|
let id = e.currentTarget.dataset.id
|
||||||
wx.navigateTo({
|
wx.navigateTo({
|
||||||
url : '/pages/mall_details/mall_details?id=' + id,
|
url : '/pages/mall/mall_details/mall_details?id=' + id,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<view class="coupon-name">
|
<view class="coupon-name">
|
||||||
免费券专区
|
免费券专区
|
||||||
</view>
|
</view>
|
||||||
<navigator hover-class="none" url="/pages/mall_goods/mall_goods?type=couponCut" class="coupon-more">
|
<navigator hover-class="none" url="/pages/mall/mall_goods/mall_goods?type=couponCut" class="coupon-more">
|
||||||
更多<image class="coupon-more-icon" src="/static/mall_icon/mallIndex_more.png"></image>
|
更多<image class="coupon-more-icon" src="/static/mall_icon/mallIndex_more.png"></image>
|
||||||
</navigator>
|
</navigator>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ Component({
|
|||||||
hotTap(e) {
|
hotTap(e) {
|
||||||
let id = e.currentTarget.dataset.id
|
let id = e.currentTarget.dataset.id
|
||||||
wx.navigateTo({
|
wx.navigateTo({
|
||||||
url : '/pages/mall_details/mall_details?id=' + id,
|
url : '/pages/mall/mall_details/mall_details?id=' + id,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<view class="hot-name">
|
<view class="hot-name">
|
||||||
优惠热卖
|
优惠热卖
|
||||||
</view>
|
</view>
|
||||||
<navigator hover-class="none" url="/pages/mall_goods/mall_goods?type=hotCut" class="hot-more">
|
<navigator hover-class="none" url="/pages/mall/mall_goods/mall_goods?type=hotCut" class="hot-more">
|
||||||
更多<image class="hot-more-icon" src="/static/mall_icon/mallIndex_more.png"></image>
|
更多<image class="hot-more-icon" src="/static/mall_icon/mallIndex_more.png"></image>
|
||||||
</navigator>
|
</navigator>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ Component({
|
|||||||
push(e) {
|
push(e) {
|
||||||
let id = e.currentTarget.dataset.id
|
let id = e.currentTarget.dataset.id
|
||||||
wx.navigateTo({
|
wx.navigateTo({
|
||||||
url : '/pages/mall_details/mall_details?id=' + id,
|
url : '/pages/mall/mall_details/mall_details?id=' + id,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -94,3 +94,20 @@
|
|||||||
line-height: 38rpx;
|
line-height: 38rpx;
|
||||||
color: #aaabab;
|
color: #aaabab;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* 上拉加载 */
|
||||||
|
.pagesLoding{
|
||||||
|
text-align: center;
|
||||||
|
line-height: 90rpx;
|
||||||
|
color: gray;
|
||||||
|
clear: both;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pagesLoding-icon{
|
||||||
|
width: 28rpx;
|
||||||
|
height: 28rpx;
|
||||||
|
vertical-align: middle;
|
||||||
|
margin-right: 10rpx;
|
||||||
|
margin-bottom: 3rpx;
|
||||||
|
}
|
||||||
@@ -22,14 +22,14 @@ Component({
|
|||||||
handeItemTap(e) {
|
handeItemTap(e) {
|
||||||
let id = e.currentTarget.dataset.id
|
let id = e.currentTarget.dataset.id
|
||||||
wx.navigateTo({
|
wx.navigateTo({
|
||||||
url: '/pages/mall_goods/mall_goods?sort=' + id,
|
url: '/pages/mall/mall_goods/mall_goods?sort=' + id,
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
// 查看更所分类
|
// 查看更所分类
|
||||||
homeTap() {
|
homeTap() {
|
||||||
wx.navigateTo({
|
wx.navigateTo({
|
||||||
url: '/pages/mall_classify/mall_classify',
|
url: '/pages/mall/mall_classify/mall_classify',
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
<view class="videoList">
|
<view class="videoList">
|
||||||
<view class="videoList-label">
|
<view class="videoList-label">
|
||||||
<view class="videoList-img">
|
<view class="videoList-img">
|
||||||
<image class="videoList-cover" src="/static/img/goods_text.png" mode="aspectFill"></image>
|
<image class="videoList-cover" src="/static/images/goods_text.png" mode="aspectFill"></image>
|
||||||
<view class="videoList-tips">
|
<view class="videoList-tips">
|
||||||
<image src="/static/mall_icon/liveIng_icon.png"></image>正在直播
|
<image src="/static/mall_icon/liveIng_icon.png"></image>正在直播
|
||||||
</view>
|
</view>
|
||||||
@@ -29,7 +29,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="videoList-label">
|
<view class="videoList-label">
|
||||||
<view class="videoList-img">
|
<view class="videoList-img">
|
||||||
<image class="videoList-cover" src="/static/img/goods_text.png" mode="aspectFill"></image>
|
<image class="videoList-cover" src="/static/images/goods_text.png" mode="aspectFill"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="videoList-cont">
|
<view class="videoList-cont">
|
||||||
<view class="videoList-title">风光雪月跨年季</view>
|
<view class="videoList-title">风光雪月跨年季</view>
|
||||||
|
|||||||
@@ -3,8 +3,6 @@
|
|||||||
* 5g获客星光网 - 商城
|
* 5g获客星光网 - 商城
|
||||||
*/
|
*/
|
||||||
|
|
||||||
const data = require("../../data/demo")
|
|
||||||
|
|
||||||
Page({
|
Page({
|
||||||
/**
|
/**
|
||||||
* 页面的初始数据
|
* 页面的初始数据
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<view class="mallBox">
|
<view class="mallBox">
|
||||||
<view class="mallCont">
|
<view class="mallCont">
|
||||||
<!-- 搜索 -->
|
<!-- 搜索 -->
|
||||||
<navigator hover-class="none" url="/pages/mall_search/mall_search" class="mallCont-search">
|
<navigator hover-class="none" url="/pages/mall/mall_search/mall_search" class="mallCont-search">
|
||||||
<image class="mallCont-search-icon" src="/static/mall_icon/mall_search.png"></image>
|
<image class="mallCont-search-icon" src="/static/mall_icon/mall_search.png"></image>
|
||||||
搜索商品
|
搜索商品
|
||||||
</navigator>
|
</navigator>
|
||||||
|
|||||||
@@ -26,7 +26,7 @@
|
|||||||
<view class="address-tool-btn" bindtap="selectAddress" data-index="{{addressIndex}}">选择地址</view>
|
<view class="address-tool-btn" bindtap="selectAddress" data-index="{{addressIndex}}">选择地址</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="address-tool" wx:else>
|
<view class="address-tool" wx:else>
|
||||||
<navigator hover-class="none" url="/pages/mall_address_form/mall_address_form?type=Compile&id={{item.address_id}}&default={{item.default}}">
|
<navigator hover-class="none" url="/pages/mall/mall_address_form/mall_address_form?type=Compile&id={{item.address_id}}&default={{item.default}}">
|
||||||
<image src="/static/mall_icon/mallAddress_modify.png"></image>
|
<image src="/static/mall_icon/mallAddress_modify.png"></image>
|
||||||
</navigator>
|
</navigator>
|
||||||
<image bindtap="addressRemove" data-index="{{addressIndex}}" data-id="{{item.address_id}}" src="/static/mall_icon/mallAddress_del.png"></image>
|
<image bindtap="addressRemove" data-index="{{addressIndex}}" data-id="{{item.address_id}}" src="/static/mall_icon/mallAddress_del.png"></image>
|
||||||
@@ -37,10 +37,10 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="pack-center pages-hint" wx:else>
|
<view class="pack-center pages-hint" wx:else>
|
||||||
<image src="/static/img/null_icon.png"></image>
|
<image src="/static/images/null_icon.png"></image>
|
||||||
<view>还未添加收货地址</view>
|
<view>还未添加收货地址</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="address-footer">
|
<view class="address-footer">
|
||||||
<navigator url="/pages/mall_address_form/mall_address_form?type=Add">添加地址</navigator>
|
<navigator url="/pages/mall/mall_address_form/mall_address_form?type=Add">添加地址</navigator>
|
||||||
</view>
|
</view>
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
<scroll-view class="assessList-float" scroll-x>
|
<scroll-view class="assessList-float" scroll-x>
|
||||||
<!-- wx:for="{{item.cover}}" wx:key="items" wx:for-item="items" -->
|
<!-- wx:for="{{item.cover}}" wx:key="items" wx:for-item="items" -->
|
||||||
<view class="assessList-picture">
|
<view class="assessList-picture">
|
||||||
<image src="/static/img/goods_text.png" mode="aspectFill" bindtap="clickImg" data-img="{{items}}"
|
<image src="/static/images/goods_text.png" mode="aspectFill" bindtap="clickImg" data-img="{{items}}"
|
||||||
data-index="{{goodsIndex}}"></image>
|
data-index="{{goodsIndex}}"></image>
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<!-- 评价表单 -->
|
<!-- 评价表单 -->
|
||||||
<view class="goods">
|
<view class="goods">
|
||||||
<image class="goodsImg" src="/static/img/goods_text.png" mode="aspectFill"></image>
|
<image class="goodsImg" src="/static/images/goods_text.png" mode="aspectFill"></image>
|
||||||
<view class="goodsCont">
|
<view class="goodsCont">
|
||||||
<view class="nowrap goodsCont-name">
|
<view class="nowrap goodsCont-name">
|
||||||
商品名称哦
|
商品名称哦
|
||||||
|
|||||||
@@ -212,8 +212,10 @@ Page({
|
|||||||
params = new Array
|
params = new Array
|
||||||
|
|
||||||
for (var i of arrCart){
|
for (var i of arrCart){
|
||||||
|
if(i.is_check == true) {
|
||||||
params.push(i.id)
|
params.push(i.id)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
let listData = params.join(",")
|
let listData = params.join(",")
|
||||||
|
|
||||||
@@ -224,7 +226,7 @@ Page({
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
wx.navigateTo({
|
wx.navigateTo({
|
||||||
url: '/pages/mall_order_submit/mall_order_submit?cart_ids=' + listData + '&type=arrCart'
|
url: '/pages/mall/mall_order_submit/mall_order_submit?cart_ids=' + listData + '&type=arrCart'
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
@@ -30,9 +30,9 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="cart-hint" wx:else>
|
<view class="cart-hint" wx:else>
|
||||||
<image class="cart-hint-img" src="/static/img/car_icon.png"></image>
|
<image class="cart-hint-img" src="/static/mall_icon/car_icon.png"></image>
|
||||||
<view>购物车空空如也,快去首页购物吧~</view>
|
<view>购物车空空如也,快去首页购物吧~</view>
|
||||||
<navigator class="cart-hint-click" hover-class="none" url="/pages/index/index" open-type="switchTab">
|
<navigator class="cart-hint-click" hover-class="none" url="/pages/mall/index" open-type="switchTab">
|
||||||
去购物
|
去购物
|
||||||
</navigator>
|
</navigator>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -246,7 +246,7 @@ Page({
|
|||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
wx.navigateTo({
|
wx.navigateTo({
|
||||||
url: '/pages/mall_order_submit/mall_order_submit?skuId=' + this.data.changeSku.sku_id + '&qty=' + this.data.goodsNumber
|
url: '/pages/mall/mall_order_submit/mall_order_submit?skuId=' + this.data.changeSku.sku_id + '&qty=' + this.data.goodsNumber
|
||||||
})
|
})
|
||||||
|
|
||||||
this.setData({
|
this.setData({
|
||||||
|
|||||||
@@ -70,8 +70,8 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 企业名称 -->
|
<!-- 企业名称 -- 暂时隐藏 -->
|
||||||
<view class="coupon">
|
<view class="coupon" style="display: none">
|
||||||
<view class="specs">
|
<view class="specs">
|
||||||
<view class="specsName">
|
<view class="specsName">
|
||||||
<image class="specsName-company" src="/static/mall_icon/mallDetails_company.png"></image>
|
<image class="specsName-company" src="/static/mall_icon/mallDetails_company.png"></image>
|
||||||
@@ -89,8 +89,8 @@
|
|||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
<!-- 用户评价 -->
|
<!-- 用户评价 -- 暂时隐藏 -->
|
||||||
<view class="assess">
|
<view class="assess" style="display: none">
|
||||||
<view class="assess-title">
|
<view class="assess-title">
|
||||||
<view class="assess-title-name">用户评价<text>(100)</text></view>
|
<view class="assess-title-name">用户评价<text>(100)</text></view>
|
||||||
<navigator hover-class="none" url="/pages/mall_assess/mall_assess" class="assess-title-more">
|
<navigator hover-class="none" url="/pages/mall_assess/mall_assess" class="assess-title-more">
|
||||||
@@ -106,7 +106,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="nowrap-multi assess-user-text">产品好好,真棒产品好好,真棒产品好好,真棒</view>
|
<view class="nowrap-multi assess-user-text">产品好好,真棒产品好好,真棒产品好好,真棒</view>
|
||||||
</view>
|
</view>
|
||||||
<image class="assess-img" src="/static/img/goods_text.png"></image>
|
<image class="assess-img" src="/static/images/goods_text.png"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="assess-label">
|
<view class="assess-label">
|
||||||
<view class="assess-cont">
|
<view class="assess-cont">
|
||||||
@@ -116,7 +116,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="nowrap-multi assess-user-text">产品好好,真棒产品好好,真棒产品好好,真棒</view>
|
<view class="nowrap-multi assess-user-text">产品好好,真棒产品好好,真棒产品好好,真棒</view>
|
||||||
</view>
|
</view>
|
||||||
<image class="assess-img" src="/static/img/goods_text.png"></image>
|
<image class="assess-img" src="/static/images/goods_text.png"></image>
|
||||||
</view>
|
</view>
|
||||||
</scroll-view>
|
</scroll-view>
|
||||||
</view>
|
</view>
|
||||||
@@ -207,7 +207,7 @@
|
|||||||
<image bindtap="specsHide" class="couponClose" src="/static/mall_icon/mall_close.png"></image>
|
<image bindtap="specsHide" class="couponClose" src="/static/mall_icon/mall_close.png"></image>
|
||||||
<view class="specsEject-cont">
|
<view class="specsEject-cont">
|
||||||
<view class="specsEject-goods">
|
<view class="specsEject-goods">
|
||||||
<image class="specsEject-goods-img" src="/static/img/goods_text.png" mode="aspectFill"></image>
|
<image class="specsEject-goods-img" src="/static/images/goods_text.png" mode="aspectFill"></image>
|
||||||
<view class="specsEject-goods-text">
|
<view class="specsEject-goods-text">
|
||||||
<view class="specsEject-goods-price">¥{{changeSku.prices.price}}</view>
|
<view class="specsEject-goods-price">¥{{changeSku.prices.price}}</view>
|
||||||
<view class="specsEject-goods-norms">
|
<view class="specsEject-goods-norms">
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ Page({
|
|||||||
* 页面的初始数据
|
* 页面的初始数据
|
||||||
*/
|
*/
|
||||||
data: {
|
data: {
|
||||||
stateType : 'ALL', //订单类型
|
stateType : 'all', //订单类型
|
||||||
orderArr : [], //订单列表
|
orderArr : [], //订单列表
|
||||||
},
|
},
|
||||||
|
|
||||||
@@ -34,16 +34,54 @@ Page({
|
|||||||
this.orderInfo()
|
this.orderInfo()
|
||||||
},
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单tab
|
||||||
|
*/
|
||||||
|
orderTab(e){
|
||||||
|
this.setData({
|
||||||
|
stateType: e.currentTarget.dataset.state
|
||||||
|
})
|
||||||
|
this.orderInfo()
|
||||||
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 订单列表
|
* 订单列表
|
||||||
*/
|
*/
|
||||||
orderInfo(){
|
orderInfo(){
|
||||||
wx.$api.orders.index().then(res=>{
|
let stateType = this.data.stateType
|
||||||
console.log(res.data)
|
|
||||||
|
if(stateType == 'all') {
|
||||||
|
wx.$api.order.index().then(res=>{
|
||||||
this.setData({
|
this.setData({
|
||||||
orderArr : res.data
|
orderArr : res.data
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
} else if(stateType == 'unpaid') {
|
||||||
|
wx.$api.order.unpaid().then(res=>{
|
||||||
|
this.setData({
|
||||||
|
orderArr : res.data
|
||||||
|
})
|
||||||
|
})
|
||||||
|
} else if(stateType == 'paid') {
|
||||||
|
wx.$api.order.paid().then(res=>{
|
||||||
|
this.setData({
|
||||||
|
orderArr : res.data
|
||||||
|
})
|
||||||
|
})
|
||||||
|
} else if(stateType == 'delive') {
|
||||||
|
wx.$api.order.delive().then(res=>{
|
||||||
|
this.setData({
|
||||||
|
orderArr : res.data
|
||||||
|
})
|
||||||
|
})
|
||||||
|
} else if(stateType == 'refunds') {
|
||||||
|
wx.$api.order.refund().then(res=>{
|
||||||
|
this.setData({
|
||||||
|
orderArr : res.data
|
||||||
|
})
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -52,7 +90,7 @@ Page({
|
|||||||
orderPay(e){
|
orderPay(e){
|
||||||
let orderId = e.currentTarget.dataset.orderid
|
let orderId = e.currentTarget.dataset.orderid
|
||||||
wx.navigateTo({
|
wx.navigateTo({
|
||||||
url: '/pages/many_pay/many_pay?orderid=' + orderId + "&type=orderPay",
|
url: '/pages/mall/mall_pay/mall_pay?orderid=' + orderId,
|
||||||
})
|
})
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,23 +1,22 @@
|
|||||||
<!-- 订单tab -->
|
<!-- 订单tab -->
|
||||||
<view class="order-tab">
|
<view class="order-tab">
|
||||||
<view class="order-tab-item {{stateType == 'ALL' ? 'active':''}}" data-state="ALL" bindtap="orderTab">
|
<view class="order-tab-item {{stateType == 'all' ? 'active':''}}" data-state="all" bindtap="orderTab">
|
||||||
全部
|
全部
|
||||||
</view>
|
</view>
|
||||||
<view class="order-tab-item {{stateType == '' ? 'active':''}}" data-state="" bindtap="orderTab">
|
<view class="order-tab-item {{stateType == 'unpaid' ? 'active':''}}" data-state="unpaid" bindtap="orderTab">
|
||||||
待支付
|
待支付
|
||||||
</view>
|
</view>
|
||||||
<view class="order-tab-item {{stateType == '' ? 'active':''}}" data-state="" bindtap="orderTab">
|
<view class="order-tab-item {{stateType == 'paid' ? 'active':''}}" data-state="paid" bindtap="orderTab">
|
||||||
待发货
|
待发货
|
||||||
</view>
|
</view>
|
||||||
<view class="order-tab-item {{stateType == '' ? 'active':''}}" data-state="" bindtap="orderTab">
|
<view class="order-tab-item {{stateType == 'delive' ? 'active':''}}" data-state="delive" bindtap="orderTab">
|
||||||
待收货
|
待收货
|
||||||
</view>
|
</view>
|
||||||
<view class="order-tab-item {{stateType == '' ? 'active':''}}" data-state="" bindtap="orderTab">
|
<view class="order-tab-item {{stateType == 'refunds' ? 'active':''}}" data-state="refunds" bindtap="orderTab">
|
||||||
已完成
|
已完成 <!-- 退款 -->
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
<view class="order-content" wx:if="{{orderArr != ''}}">
|
||||||
<view class="order-content">
|
|
||||||
<view class="order-list" wx:for="{{orderArr}}" wx:key="orderArr" wx:for-item="goods">
|
<view class="order-list" wx:for="{{orderArr}}" wx:key="orderArr" wx:for-item="goods">
|
||||||
<view class="order-company">
|
<view class="order-company">
|
||||||
<view class="order-company-name">
|
<view class="order-company-name">
|
||||||
@@ -44,7 +43,12 @@
|
|||||||
bindtap="orderPay">立即支付</view>
|
bindtap="orderPay">立即支付</view>
|
||||||
<view class="order-footer-btn" wx:if="{{goods.canCancel == true}}" data-orderid="{{goods.orderid}}"
|
<view class="order-footer-btn" wx:if="{{goods.canCancel == true}}" data-orderid="{{goods.orderid}}"
|
||||||
bindtap="orderDelete">取消订单</view>
|
bindtap="orderDelete">取消订单</view>
|
||||||
<navigator hover-class="none" url="/pages/mall_order_data/mall_order_data?orderId={{goods.orderid}}" class="order-footer-btn">订单详情</navigator>
|
<navigator hover-class="none" url="/pages/mall/mall_order_data/mall_order_data?orderId={{goods.orderid}}" class="order-footer-btn">订单详情</navigator>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
|
<view wx:else class="pack-center pages-hint">
|
||||||
|
<image src="/static/mall_icon/null_icon.png"></image>
|
||||||
|
<view>暂无订单</view>
|
||||||
|
</view>
|
||||||
@@ -26,7 +26,7 @@ Page({
|
|||||||
* 订单详情
|
* 订单详情
|
||||||
*/
|
*/
|
||||||
orderData(orderId){
|
orderData(orderId){
|
||||||
wx.$api.orders.orders(orderId).then(res=>{
|
wx.$api.order.orders(orderId).then(res=>{
|
||||||
console.log(res)
|
console.log(res)
|
||||||
this.setData({
|
this.setData({
|
||||||
orderData: res
|
orderData: res
|
||||||
@@ -64,8 +64,9 @@ Page({
|
|||||||
orderPay(e){
|
orderPay(e){
|
||||||
let orderId = e.currentTarget.dataset.orderid
|
let orderId = e.currentTarget.dataset.orderid
|
||||||
wx.navigateTo({
|
wx.navigateTo({
|
||||||
url: '/pages/many_pay/many_pay?orderid=' + orderId + "&type=orderPay",
|
url: '/pages/mall/mall_pay/mall_pay?orderid=' + orderId,
|
||||||
})
|
})
|
||||||
|
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -73,9 +74,9 @@ Page({
|
|||||||
*/
|
*/
|
||||||
orderDelete(e) {
|
orderDelete(e) {
|
||||||
let orderId = e.currentTarget.dataset.orderid
|
let orderId = e.currentTarget.dataset.orderid
|
||||||
wx.$api.orders.cancel(orderId).then(res=>{
|
wx.$api.order.cancel(orderId).then(res=>{
|
||||||
wx.redirectTo({
|
wx.redirectTo({
|
||||||
url: '/pages/mall_order/mall_order?stateType=ALL',
|
url: '/pages/mall/mall_order/mall_order',
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -117,37 +117,35 @@ Page({
|
|||||||
remark : this.data.remark,
|
remark : this.data.remark,
|
||||||
address_id : this.data.addressDel.address_id
|
address_id : this.data.addressDel.address_id
|
||||||
}).then(res=>{
|
}).then(res=>{
|
||||||
console.log(res.trade_no)
|
|
||||||
wx.$api.mall.wechat({
|
wx.$api.mall.wechat({
|
||||||
trade_no : res.trade_no
|
trade_no : res.trade_no
|
||||||
}).then(res=>{
|
}).then(res=>{
|
||||||
console.log(res)
|
let payInfo = JSON.parse(res)
|
||||||
// let payInfo = JSON.parse(res.data)
|
wx.requestPayment({
|
||||||
// wx.requestPayment({
|
timeStamp: payInfo.timeStamp,
|
||||||
// timeStamp: payInfo.timeStamp,
|
nonceStr : payInfo.nonceStr,
|
||||||
// nonceStr : payInfo.nonceStr,
|
package : payInfo.package,
|
||||||
// package : payInfo.package,
|
paySign : payInfo.paySign,
|
||||||
// paySign : payInfo.paySign,
|
signType : payInfo.signType,
|
||||||
// signType : payInfo.signType,
|
success : res=>{
|
||||||
// success : res=>{
|
if(res.errMsg == "requestPayment:ok"){
|
||||||
// if(res.errMsg == "requestPayment:ok"){
|
wx.showToast({
|
||||||
// wx.showToast({
|
title: '支付成功',
|
||||||
// title: '支付成功',
|
icon : 'success'
|
||||||
// icon : 'success'
|
})
|
||||||
// })
|
setTimeout(()=>{
|
||||||
// setTimeout(()=>{
|
wx.reLaunch({
|
||||||
// wx.reLaunch({
|
url: '/pages/mall/mall_order/mall_order'
|
||||||
// url: '/pages/coupon/coupon?type=couponPublic'
|
})
|
||||||
// })
|
},2000)
|
||||||
// },2000)
|
}
|
||||||
// }
|
},
|
||||||
// },
|
fail : res=>{
|
||||||
// fail : res=>{
|
wx.reLaunch({
|
||||||
// wx.reLaunch({
|
url: '/pages/mall/mall_order/mall_order?stateType=unpaid'
|
||||||
// url: '/pages/order/order?stateType=unpay'
|
})
|
||||||
// })
|
}
|
||||||
// }
|
})
|
||||||
// })
|
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<view class="order-content">
|
<view class="order-content">
|
||||||
<view class="order-address">
|
<view class="order-address">
|
||||||
<view wx:if="{{addressDel != ''}}" bindtap="addressTap">
|
<view wx:if="{{addressDel != ''}}" bindtap="addressTap">
|
||||||
<navigator url="/pages/mall_address/mall_address?type=selectAddress" hover-class="none">
|
<navigator url="/pages/mall/mall_address/mall_address?type=selectAddress" hover-class="none">
|
||||||
<image class="arrows-right" src="/static/mall_icon/mall_arrow.png" mode="widthFix"></image>
|
<image class="arrows-right" src="/static/mall_icon/mall_arrow.png" mode="widthFix"></image>
|
||||||
<view class="order-address-name">
|
<view class="order-address-name">
|
||||||
<text>{{addressDel.name}}</text>{{addressDel.mobile}}
|
<text>{{addressDel.name}}</text>{{addressDel.mobile}}
|
||||||
@@ -10,7 +10,7 @@
|
|||||||
<view class="order-address-text">{{addressDel.full_address}}</view>
|
<view class="order-address-text">{{addressDel.full_address}}</view>
|
||||||
</navigator>
|
</navigator>
|
||||||
</view>
|
</view>
|
||||||
<navigator class="order-add-address arrows-add" wx:else url="/pages/address/address?type=selectAddress">
|
<navigator class="order-add-address arrows-add" wx:else url="/pages/mall/mall_address/mall_address?type=selectAddress">
|
||||||
添加收货地址
|
添加收货地址
|
||||||
<image class="arrows-add-img" src="/static/mall_icon/mall_arrow.png" mode="widthFix"></image>
|
<image class="arrows-add-img" src="/static/mall_icon/mall_arrow.png" mode="widthFix"></image>
|
||||||
</navigator>
|
</navigator>
|
||||||
|
|||||||
@@ -261,12 +261,14 @@ page {
|
|||||||
.couponEject {
|
.couponEject {
|
||||||
position: fixed;
|
position: fixed;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
bottom: -100%;
|
bottom: -10000%;
|
||||||
left: 0;
|
left: 0;
|
||||||
border-radius: 30rpx 30rpx 0 0;
|
border-radius: 30rpx 30rpx 0 0;
|
||||||
background-color: white;
|
background-color: white;
|
||||||
z-index: 101;
|
z-index: 101;
|
||||||
transition: .2s;
|
transition: .2s;
|
||||||
|
max-height: 50%;
|
||||||
|
overflow-y: scroll;
|
||||||
}
|
}
|
||||||
|
|
||||||
.couponEject.active {
|
.couponEject.active {
|
||||||
|
|||||||
@@ -10,21 +10,63 @@ Page({
|
|||||||
* 页面的初始数据
|
* 页面的初始数据
|
||||||
*/
|
*/
|
||||||
data: {
|
data: {
|
||||||
|
orderData : '', //订单详情
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 生命周期函数--监听页面加载
|
* 生命周期函数--监听页面加载
|
||||||
*/
|
*/
|
||||||
onLoad (options) {
|
onLoad (options) {
|
||||||
|
console.log(options.orderid)
|
||||||
|
this.orderInfo(options.orderid)
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 订单支付
|
||||||
|
*/
|
||||||
|
orderInfo(orderId) {
|
||||||
|
wx.$api.order.paymen(orderId).then(res=>{
|
||||||
|
console.log(res)
|
||||||
|
this.setData({
|
||||||
|
orderData : res
|
||||||
|
})
|
||||||
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 订单支付
|
* 订单支付
|
||||||
*/
|
*/
|
||||||
payment() {
|
payment() {
|
||||||
wx.redirectTo({
|
wx.$api.mall.wechat({
|
||||||
url: '/pages/mall_order_data/mall_order_data',
|
trade_no : this.orderData.trade_no
|
||||||
|
}).then(res=>{
|
||||||
|
console.log(res)
|
||||||
|
let payInfo = JSON.parse(res)
|
||||||
|
wx.requestPayment({
|
||||||
|
timeStamp: payInfo.timeStamp,
|
||||||
|
nonceStr : payInfo.nonceStr,
|
||||||
|
package : payInfo.package,
|
||||||
|
paySign : payInfo.paySign,
|
||||||
|
signType : payInfo.signType,
|
||||||
|
success : res=>{
|
||||||
|
if(res.errMsg == "requestPayment:ok"){
|
||||||
|
wx.showToast({
|
||||||
|
title: '支付成功',
|
||||||
|
icon : 'success'
|
||||||
|
})
|
||||||
|
setTimeout(()=>{
|
||||||
|
wx.reLaunch({
|
||||||
|
url: '/pages/mall/mall_order/mall_order?stateType=all'
|
||||||
|
})
|
||||||
|
},2000)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
fail : res=>{
|
||||||
|
wx.reLaunch({
|
||||||
|
url: '/pages/mall/mall_order/mall_order?stateType=unpaid'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -4,20 +4,20 @@
|
|||||||
<view class="order-total">
|
<view class="order-total">
|
||||||
<view class="order-total-li order-total-number">
|
<view class="order-total-li order-total-number">
|
||||||
<view class="order-total-name">订单编号</view>
|
<view class="order-total-name">订单编号</view>
|
||||||
454fdsf54f5d4f54sdf4d
|
{{orderData.trade_no}}
|
||||||
</view>
|
</view>
|
||||||
<view class="order-total-li">
|
<view class="order-total-li">
|
||||||
<view class="order-total-name">商品总价</view>
|
<view class="order-total-name">商品总价</view>
|
||||||
¥999.00
|
¥{{orderData.amount}}
|
||||||
</view>
|
</view>
|
||||||
<view class="order-total-li">
|
<view class="order-total-li">
|
||||||
<view class="order-total-name">运费</view>
|
<view class="order-total-name">运费</view>
|
||||||
-¥999.00
|
¥{{orderData.freight}}
|
||||||
</view>
|
</view>
|
||||||
<view class="order-total-li">
|
<view class="order-total-li">
|
||||||
<view class="order-total-name">应付总价</view>
|
<view class="order-total-name">应付总价</view>
|
||||||
<view class="coupon-picker-red">
|
<view class="coupon-picker-red">
|
||||||
¥999.00
|
¥{{orderData.total}}
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -30,7 +30,7 @@
|
|||||||
<image class="payContList-label-img" src="/static/mall_icon/pay_00.png"></image>
|
<image class="payContList-label-img" src="/static/mall_icon/pay_00.png"></image>
|
||||||
<view>微信支付</view>
|
<view>微信支付</view>
|
||||||
</view>
|
</view>
|
||||||
<radio class="radio" value="1" checked></radio>
|
<radio class="radio" checked></radio>
|
||||||
</view>
|
</view>
|
||||||
</radio-group>
|
</radio-group>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -32,7 +32,6 @@ Page({
|
|||||||
*/
|
*/
|
||||||
hotkeyInfo () {
|
hotkeyInfo () {
|
||||||
wx.$api.mall.hotkey({}).then(res=>{
|
wx.$api.mall.hotkey({}).then(res=>{
|
||||||
console.log(res)
|
|
||||||
this.setData({
|
this.setData({
|
||||||
hotkey : res
|
hotkey : res
|
||||||
})
|
})
|
||||||
@@ -43,10 +42,9 @@ Page({
|
|||||||
* 搜索
|
* 搜索
|
||||||
*/
|
*/
|
||||||
searchForm(e) {
|
searchForm(e) {
|
||||||
console.log(e.detail.value.search)
|
|
||||||
let searchValue = e.detail.value.search
|
let searchValue = e.detail.value.search
|
||||||
wx.redirectTo({
|
wx.redirectTo({
|
||||||
url: '/pages/mall_goods/mall_goods?title=' + searchValue
|
url: '/pages/mall/mall_goods/mall_goods?title=' + searchValue
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<view class="videoList">
|
<view class="videoList">
|
||||||
<view class="videoList-label">
|
<view class="videoList-label">
|
||||||
<view class="videoList-img">
|
<view class="videoList-img">
|
||||||
<image class="videoList-cover" src="/static/img/goods_text.png" mode="aspectFill"></image>
|
<image class="videoList-cover" src="/static/images/goods_text.png" mode="aspectFill"></image>
|
||||||
<view class="videoList-tips">
|
<view class="videoList-tips">
|
||||||
<view class="videoList-tips-img"><image src="/static/mall_icon/liveIng_icon_white.png"></image></view>
|
<view class="videoList-tips-img"><image src="/static/mall_icon/liveIng_icon_white.png"></image></view>
|
||||||
<view class="videoList-tips-text">正在直播</view>
|
<view class="videoList-tips-text">正在直播</view>
|
||||||
@@ -24,7 +24,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="videoList-label">
|
<view class="videoList-label">
|
||||||
<view class="videoList-img">
|
<view class="videoList-img">
|
||||||
<image class="videoList-cover" src="/static/img/goods_text.png" mode="aspectFill"></image>
|
<image class="videoList-cover" src="/static/images/goods_text.png" mode="aspectFill"></image>
|
||||||
<view class="videoList-tips videoList-tips-end">
|
<view class="videoList-tips videoList-tips-end">
|
||||||
<view class="videoList-tips-img"><image src="/static/mall_icon/liveEnd_icon_white.png"></image></view>
|
<view class="videoList-tips-img"><image src="/static/mall_icon/liveEnd_icon_white.png"></image></view>
|
||||||
<view class="videoList-tips-text">已结束</view>
|
<view class="videoList-tips-text">已结束</view>
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
艾米家的傻钢^
|
艾米家的傻钢^
|
||||||
<text>游客</text>
|
<text>游客</text>
|
||||||
</view>
|
</view>
|
||||||
<image class="userTop-img" src="/static/img/goods_text.png"></image>
|
<image class="userTop-img" src="/static/images/goods_text.png"></image>
|
||||||
</view>
|
</view>
|
||||||
<view class="userTop-nav">
|
<view class="userTop-nav">
|
||||||
<view class="userTop-label">
|
<view class="userTop-label">
|
||||||
@@ -34,13 +34,13 @@
|
|||||||
</view>
|
</view>
|
||||||
|
|
||||||
<view class="userNav">
|
<view class="userNav">
|
||||||
<navigator hover-class="none" url="/pages/user_coupon/user_coupon" class="userNav-label">
|
<navigator hover-class="none" url="/pages/user/user_coupon/user_coupon" class="userNav-label">
|
||||||
<view class="userNav-label-img">
|
<view class="userNav-label-img">
|
||||||
<image src="/static/user_iocn/userNav_00.png"></image>
|
<image src="/static/user_iocn/userNav_00.png"></image>
|
||||||
</view>
|
</view>
|
||||||
<text>我的卡券</text>
|
<text>我的卡券</text>
|
||||||
</navigator>
|
</navigator>
|
||||||
<navigator hover-class="none" url="/pages/mall_order/mall_order" class="userNav-label">
|
<navigator hover-class="none" url="/pages/mall/mall_order/mall_order" class="userNav-label">
|
||||||
<view class="userNav-label-img">
|
<view class="userNav-label-img">
|
||||||
<image src="/static/user_iocn/userNav_01.png"></image>
|
<image src="/static/user_iocn/userNav_01.png"></image>
|
||||||
</view>
|
</view>
|
||||||
@@ -71,7 +71,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<text>项目预购</text>
|
<text>项目预购</text>
|
||||||
</view>
|
</view>
|
||||||
<navigator hover-class="none" url="/pages/mall_cart/mall_cart" class="userTool-label">
|
<navigator hover-class="none" url="/pages/mall/mall_cart/mall_cart" class="userTool-label">
|
||||||
<view class="userTool-label-img">
|
<view class="userTool-label-img">
|
||||||
<image src="/static/user_iocn/userTool_02.png"></image>
|
<image src="/static/user_iocn/userTool_02.png"></image>
|
||||||
<view class="userTool-label-tips">2</view>
|
<view class="userTool-label-tips">2</view>
|
||||||
@@ -84,7 +84,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<text>客服服务</text>
|
<text>客服服务</text>
|
||||||
</view>
|
</view>
|
||||||
<navigator hover-class="none" url="/pages/mall_address/mall_address" class="userTool-label">
|
<navigator hover-class="none" url="/pages/mall/mall_address/mall_address" class="userTool-label">
|
||||||
<view class="userTool-label-img">
|
<view class="userTool-label-img">
|
||||||
<image src="/static/user_iocn/userTool_04.png"></image>
|
<image src="/static/user_iocn/userTool_04.png"></image>
|
||||||
</view>
|
</view>
|
||||||
|
|||||||
@@ -133,11 +133,11 @@ Page({
|
|||||||
}
|
}
|
||||||
if(verification==2){
|
if(verification==2){
|
||||||
wx.navigateTo({
|
wx.navigateTo({
|
||||||
url: '/pages/user_coupon_data/user_coupon_data?user_coupon_id='+couponid+'&type='+type
|
url: '/pages/user/user_coupon_data/user_coupon_data?user_coupon_id='+couponid+'&type='+type
|
||||||
})
|
})
|
||||||
}else if(verification==1){
|
}else if(verification==1){
|
||||||
wx.navigateTo({
|
wx.navigateTo({
|
||||||
url: '/pages/coupon_goods/coupon_goods?user_coupon_id='+couponid
|
url: '/pages/ticket/goods/goods?user_coupon_id='+couponid
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -70,6 +70,18 @@
|
|||||||
{
|
{
|
||||||
"name": "搜索",
|
"name": "搜索",
|
||||||
"pathName": "pages/company/search/search",
|
"pathName": "pages/company/search/search",
|
||||||
|
"query": "",
|
||||||
|
"scene": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "pages/mall/index",
|
||||||
|
"pathName": "pages/mall/index",
|
||||||
|
"query": "",
|
||||||
|
"scene": null
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "pages/user/index",
|
||||||
|
"pathName": "pages/user/index",
|
||||||
"scene": null
|
"scene": null
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|||||||
BIN
static/mall_icon/car_icon.png
Normal file
BIN
static/mall_icon/car_icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 200 KiB |
Reference in New Issue
Block a user