Commit e262f568 by 严立

1.ui 组件路径整理

2.增加退款逻辑
parent 0776c7ac
Showing with 138 additions and 87 deletions
import iMui from './component/m-init.js' import iMui from './component/m-ui/m-init.js'
import iBase64 from './npm/base64.js' import iBase64 from './npm/base64.js'
import iMiment from './npm/miment.js' import iMiment from './npm/miment.js'
import pageExtend from './utils/extend/page.js' import pageExtend from './utils/extend/page.js'
......
...@@ -65,17 +65,17 @@ ...@@ -65,17 +65,17 @@
"usingComponents": { "usingComponents": {
"coupon-code": "/component/coupon-code/coupon-code", "coupon-code": "/component/coupon-code/coupon-code",
"swiper-point": "./component/swiper-point/swiper-point", "swiper-point": "./component/swiper-point/swiper-point",
"m-button-bottom": "./component/m-button-bottom/m-button-bottom", "m-button-bottom": "./component/m-ui/m-button-bottom/m-button-bottom",
"m-checkbox": "./component/m-checkbox/m-checkbox", "m-checkbox": "./component/m-ui/m-checkbox/m-checkbox",
"m-dialog": "./component/m-dialog/m-dialog", "m-dialog": "./component/m-ui/m-dialog/m-dialog",
"m-image-picker": "./component/m-image-picker/m-image-picker", "m-image-picker": "./component/m-ui/m-image-picker/m-image-picker",
"m-input": "./component/m-input/m-input", "m-input": "./component/m-ui/m-input/m-input",
"m-nav": "./component/m-nav/m-nav", "m-nav": "./component/m-ui/m-nav/m-nav",
"m-popup": "./component/m-popup/m-popup", "m-popup": "./component/m-ui/m-popup/m-popup",
"m-textarea": "./component/m-textarea/m-textarea", "m-textarea": "./component/m-ui/m-textarea/m-textarea",
"m-tab": "./component/m-tab/m-tab", "m-tab": "./component/m-ui/m-tab/m-tab",
"m-segment": "./component/m-segment/m-segment", "m-segment": "./component/m-ui/m-segment/m-segment",
"m-toast": "./component/m-toast/m-toast" "m-toast": "./component/m-ui/m-toast/m-toast"
}, },
"window": { "window": {
"navigationStyle": "custom", "navigationStyle": "custom",
......
@import '../m-main.wxss'; @import '../m-ui/m-main.wxss';
/* 券码弹窗 */ /* 券码弹窗 */
.coupon_code_container { .coupon_code_container {
......
@import './theme/layout.wxss';
@import './theme/theme.wxss';
\ No newline at end of file
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
<text class="regular">{{title}}</text> <text class="regular">{{title}}</text>
</view> </view>
<view class="dialog-content row cc"> <view class="dialog-content row cc">
<text class="secondary">{{content}}</text> <text class="fs30 c31">{{content}}</text>
</view> </view>
<view class="dialog-operation row cc ac border-base"> <view class="dialog-operation row cc ac border-base">
<button class="dialog-operation-confirm row cc ac" bindtap="onConfirm">{{confirm}}</button> <button class="dialog-operation-confirm row cc ac" bindtap="onConfirm">{{confirm}}</button>
...@@ -33,10 +33,10 @@ ...@@ -33,10 +33,10 @@
<text class="regular">{{title}}</text> <text class="regular">{{title}}</text>
</view> </view>
<view class="dialog-content row cc"> <view class="dialog-content row cc">
<text class="secondary">{{content}}</text> <text class="fs30 c31">{{content}}</text>
</view> </view>
<view class="dialog-operation row cb ac border-base"> <view class="dialog-operation row cb ac border-base">
<button class="dialog-operation-cancel row cc ac secondary" bindtap="onCancel">{{cancel}}</button> <button class="dialog-operation-cancel row cc ac fs30 c31" bindtap="onCancel">{{cancel}}</button>
<view class="dialog-operation-line row cc ac border-base"></view> <view class="dialog-operation-line row cc ac border-base"></view>
<button class="dialog-operation-confirm row cc ac" bindtap="onConfirm">{{confirm}}</button> <button class="dialog-operation-confirm row cc ac" bindtap="onConfirm">{{confirm}}</button>
</view> </view>
...@@ -50,13 +50,13 @@ ...@@ -50,13 +50,13 @@
<text class="regular">{{title}}</text> <text class="regular">{{title}}</text>
</view> </view>
<view class="dialog-content row cc"> <view class="dialog-content row cc">
<text class="secondary">{{content}}</text> <text class="fs30 c31">{{content}}</text>
</view> </view>
<view class="dialog-input row cc"> <view class="dialog-input row cc">
<input class="dialog-input-element" auto-focus placeholder="{{placeholder}}" placeholder-class="dialog-input-placeholder" value="{{inputContent}}" bindinput="onInput"></input> <input class="dialog-input-element" auto-focus placeholder="{{placeholder}}" placeholder-class="dialog-input-placeholder" value="{{inputContent}}" bindinput="onInput"></input>
</view> </view>
<view class="dialog-operation row cb ac border-base"> <view class="dialog-operation row cb ac border-base">
<button class="dialog-operation-cancel row cc ac secondary" bindtap="onCancel">{{cancel}}</button> <button class="dialog-operation-cancel row cc ac fs30 c31" bindtap="onCancel">{{cancel}}</button>
<view class="dialog-operation-line row cc ac border-base"></view> <view class="dialog-operation-line row cc ac border-base"></view>
<button class="dialog-operation-confirm row cc ac" bindtap="onConfirm">{{confirm}}</button> <button class="dialog-operation-confirm row cc ac" bindtap="onConfirm">{{confirm}}</button>
</view> </view>
......
...@@ -24,9 +24,6 @@ function showToast (funcOption) { ...@@ -24,9 +24,6 @@ function showToast (funcOption) {
funcOption = Object.assign(App.ui.toast.data, funcOption) funcOption = Object.assign(App.ui.toast.data, funcOption)
funcOption.winToast = true funcOption.winToast = true
console.log('App.ui.toast', App.ui.toast)
console.log('funcOption', funcOption)
App.ui.toast.setData(funcOption) App.ui.toast.setData(funcOption)
// 设置 toast 关闭时间 // 设置 toast 关闭时间
......
Component({ Component({
externalClasses: ['external-input'],
properties: { properties: {
// 组件独立标识,此参数会在 event 中返回 // 组件独立标识,此参数会在 event 中返回
inputId: { inputId: {
...@@ -6,20 +7,19 @@ Component({ ...@@ -6,20 +7,19 @@ Component({
value: '' value: ''
}, },
// input 样式类名 placeholder: {
className: {
type: String, type: String,
value: '' value: ''
}, },
placeholder: { value: {
type: String, type: String,
value: '' value: ''
}, },
value: { textAlign: {
type: String, type: String,
value: '' value: 'left'
}, },
type: { type: {
...@@ -78,6 +78,7 @@ Component({ ...@@ -78,6 +78,7 @@ Component({
setInputShow: function() { setInputShow: function() {
this.setData({ this.setData({
value: this.data.value,
winText: false, winText: false,
winInput: true, winInput: true,
}) })
......
<view class="m-input"> <view class="m-input">
<view class="row ac" hidden="{{!winText}}" bindtap="setInputShow"> <view class="row ac" hidden="{{!winText}}" bindtap="setInputShow">
<view class="m-input-boundary row ac {{className}}"> <view class="m-input-boundary row ac external-input">
<text class="m-input-text-content fs30" hidden="{{value === '' ? true : false}}">{{value}}</text> <text class="m-input-text-content fs30" hidden="{{value === '' ? true : false}}">{{value}}</text>
<text class="m-input-text-placeholder fs30" hidden="{{value === '' ? false : true}}">{{placeholder}}</text> <text class="m-input-text-placeholder fs30" hidden="{{value === '' ? false : true}}">{{placeholder}}</text>
</view> </view>
</view> </view>
<view class="row ac" hidden="{{!winInput}}"> <view class="row ac" hidden="{{!winInput}}">
<view class="m-input-boundary row ac {{className}}"> <view class="m-input-boundary row ac external-input">
<input <input
class="m-input-input-content row ac fs30" class="m-input-input-content row ac fs30"
style="{{'text-align: ' + textAlign + ';'}}"
value="{{value}}" value="{{value}}"
type="{{type}}" type="{{type}}"
maxlength="{{maxlength}}" maxlength="{{maxlength}}"
placeholder="{{placeholder}}" placeholder="{{placeholder}}"
placeholder-style="{{'width: ' + inputWidth + 'px;'}}" placeholder-style="{{'text-align: ' + textAlign + ';'}}"
placeholder-class="m-input-input-placeholder" placeholder-class="m-input-input-placeholder"
focus="{{inputFocus}}" focus="{{inputFocus}}"
bindinput="onInput" bindinput="onInput"
......
...@@ -2,13 +2,7 @@ ...@@ -2,13 +2,7 @@
.m-input-boundary { .m-input-boundary {
position: relative; position: relative;
width: 100%;
height: 80rpx;
margin: 16rpx 0 0 0;
padding: 0 24rpx;
border-radius: 4px;
overflow-x: scroll; overflow-x: scroll;
border: 1px #DBDFE5 solid;
} }
/* 显示文本样式 */ /* 显示文本样式 */
...@@ -18,17 +12,16 @@ ...@@ -18,17 +12,16 @@
} }
.m-input-text-placeholder { .m-input-text-placeholder {
width: 100% !important;
white-space: nowrap; white-space: nowrap;
color: #C2C7CF; color: #C2C7CF;
} }
/* 输入控件样式 */ /* 输入控件样式 */
.m-input-input-content { .m-input-input-content {
width: 100%;
height: 100%; height: 100%;
} }
.m-input-input-placeholder { .m-input-input-placeholder {
width: 100% !important;
color: #C2C7CF; color: #C2C7CF;
} }
\ No newline at end of file
@import '../theme/layout.wxss';
@import '../theme/theme.wxss';
\ No newline at end of file
Component({ Component({
externalClasses: ['external-input'],
properties: { properties: {
inputId: { type: String, value: '' }, inputId: { type: String, value: '' },
className: { type: String, value: '' },
placeholder: { type: String, value: '' }, placeholder: { type: String, value: '' },
value: { type: String, value: '' }, value: { type: String, value: '' },
inputMax: { type: Number, value: 140 }, inputMax: { type: Number, value: 140 },
......
<view class="m_textarea_container"> <view class="m_textarea_container">
<view class="m_textarea_content {{className}}" hidden="{{!winText}}" bindtap="setInputShow"> <view class="m_textarea_content external-input" hidden="{{!winText}}" bindtap="setInputShow">
<view class="m_textarea_content_boundary"> <view class="m_textarea_content_boundary">
<text class="m_textarea_content_color" wx:if="{{value === '' ? false : true}}">{{value}}</text> <text class="m_textarea_content_color" wx:if="{{value === '' ? false : true}}">{{value}}</text>
<text class="m_textarea_placeholder_color" wx:if="{{value === '' ? true : false}}">{{placeholder}}</text> <text class="m_textarea_placeholder_color" wx:if="{{value === '' ? true : false}}">{{placeholder}}</text>
</view> </view>
</view> </view>
<view class="m_textarea_content {{className}}" hidden="{{!winInput}}"> <view class="m_textarea_content external-input" hidden="{{!winInput}}">
<view class="m_textarea_content_boundary"> <view class="m_textarea_content_boundary">
<textarea <textarea
class="m_textarea m_textarea_content_color" class="m_textarea m_textarea_content_color"
......
@import '../m-ui/m-main.wxss';
.swiper-point { .swiper-point {
z-index: 4; z-index: 4;
position: absolute; position: absolute;
......
...@@ -6,9 +6,9 @@ ...@@ -6,9 +6,9 @@
<view class="form-item column"> <view class="form-item column">
<text>俱乐部名称</text> <text>俱乐部名称</text>
<m-input <m-input
external-input="form-item-input"
inputId="clubName" inputId="clubName"
maxlength="{{12}}" maxlength="{{12}}"
className="form-item-input row ac"
placeholder="请输入俱乐部名称" placeholder="请输入俱乐部名称"
bindblur="onInputBlur"> bindblur="onInputBlur">
</m-input> </m-input>
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
<text>俱乐部简要说明</text> <text>俱乐部简要说明</text>
<m-textarea <m-textarea
inputId="clubDescribe" inputId="clubDescribe"
className="form-item-textarea" external-input="form-item-textarea"
placeholder="请输入俱乐部简要说明,如创建俱乐部的宗旨、意义及简要规划等" placeholder="请输入俱乐部简要说明,如创建俱乐部的宗旨、意义及简要规划等"
inputMax="{{200}}" inputMax="{{200}}"
bindblur="onInputBlur"> bindblur="onInputBlur">
...@@ -28,9 +28,9 @@ ...@@ -28,9 +28,9 @@
<view class="form-item column"> <view class="form-item column">
<text>姓名</text> <text>姓名</text>
<m-input <m-input
external-input="form-item-input"
inputId="userName" inputId="userName"
maxlength="{{12}}" maxlength="{{12}}"
className="form-item-input row ac"
placeholder="请输入姓名" placeholder="请输入姓名"
bindblur="onInputBlur"> bindblur="onInputBlur">
</m-input> </m-input>
...@@ -39,8 +39,8 @@ ...@@ -39,8 +39,8 @@
<view class="form-item column"> <view class="form-item column">
<text>手机号</text> <text>手机号</text>
<m-input <m-input
external-input="form-item-input"
inputId="userPhone" inputId="userPhone"
className="form-item-input row ac"
type="number" type="number"
maxlength="{{11}}" maxlength="{{11}}"
placeholder="请输入手机号" placeholder="请输入手机号"
......
...@@ -13,8 +13,8 @@ ...@@ -13,8 +13,8 @@
<view class="form-item column"> <view class="form-item column">
<text>姓名</text> <text>姓名</text>
<m-input <m-input
external-input="form-item-input"
inputId="name" inputId="name"
className="form-item-input row ac"
placeholder="请输入姓名" placeholder="请输入姓名"
bindblur="onInputBlur"> bindblur="onInputBlur">
</m-input> </m-input>
...@@ -23,8 +23,8 @@ ...@@ -23,8 +23,8 @@
<view class="form-item column"> <view class="form-item column">
<text>手机号</text> <text>手机号</text>
<m-input <m-input
external-input="form-item-input"
inputId="phone" inputId="phone"
className="form-item-input row ac"
type="number" type="number"
maxlength="{{11}}" maxlength="{{11}}"
placeholder="请输入手机号" placeholder="请输入手机号"
...@@ -35,8 +35,8 @@ ...@@ -35,8 +35,8 @@
<view class="form-item column"> <view class="form-item column">
<text>备注</text> <text>备注</text>
<m-input <m-input
external-input="form-item-input"
inputId="remark" inputId="remark"
className="form-item-input row ac"
placeholder="请输入备注信息" placeholder="请输入备注信息"
bindblur="onInputBlur"> bindblur="onInputBlur">
</m-input> </m-input>
...@@ -47,8 +47,8 @@ ...@@ -47,8 +47,8 @@
<view class="form-item column"> <view class="form-item column">
<text>{{item.label}}</text> <text>{{item.label}}</text>
<m-input <m-input
external-input="form-item-input"
inputId="other" inputId="other"
className="form-item-input row ac"
placeholder="{{'请输入' + item.label}}" placeholder="{{'请输入' + item.label}}"
data-item="{{item}}" data-item="{{item}}"
bindblur="onInputBlur"> bindblur="onInputBlur">
......
...@@ -222,6 +222,7 @@ Page({ ...@@ -222,6 +222,7 @@ Page({
'sideBarId': funcResponse[i].classifyId, // 商品所属标签 'sideBarId': funcResponse[i].classifyId, // 商品所属标签
} }
funcList.push(funcItem) funcList.push(funcItem)
if (funcList.length === 4) break
} }
this.setData({ this.setData({
shopRecommendA: funcList shopRecommendA: funcList
...@@ -251,6 +252,7 @@ Page({ ...@@ -251,6 +252,7 @@ Page({
'sideBarId': funcResponse[i].classifyId, // 商品所属标签 'sideBarId': funcResponse[i].classifyId, // 商品所属标签
} }
funcList.push(funcItem) funcList.push(funcItem)
if (funcList.length === 4) break
} }
this.setData({ this.setData({
shopRecommendB: funcList shopRecommendB: funcList
...@@ -280,6 +282,7 @@ Page({ ...@@ -280,6 +282,7 @@ Page({
'sideBarId': funcResponse[i].classifyId, // 商品所属标签 'sideBarId': funcResponse[i].classifyId, // 商品所属标签
} }
funcList.push(funcItem) funcList.push(funcItem)
if (funcList.length === 4) break
} }
this.setData({ this.setData({
shopRecommendC: funcList shopRecommendC: funcList
...@@ -309,6 +312,7 @@ Page({ ...@@ -309,6 +312,7 @@ Page({
'sideBarId': funcResponse[i].classifyId, // 商品所属标签 'sideBarId': funcResponse[i].classifyId, // 商品所属标签
} }
funcList.push(funcItem) funcList.push(funcItem)
if (funcList.length === 4) break
} }
this.setData({ this.setData({
shopRecommendD: funcList shopRecommendD: funcList
...@@ -342,6 +346,7 @@ Page({ ...@@ -342,6 +346,7 @@ Page({
'exchangeQuantity': funcData[i].sellNumber, 'exchangeQuantity': funcData[i].sellNumber,
} }
funcList.push(funcItem) funcList.push(funcItem)
if (funcList.length === 4) break
} }
this.setData({ this.setData({
integralMallGoods: funcList integralMallGoods: funcList
......
...@@ -149,6 +149,8 @@ Page({ ...@@ -149,6 +149,8 @@ Page({
* @returns * @returns
*/ */
querySideBar: function () { querySideBar: function () {
console.log('querySideBar', this.data.shopInfo.id)
console.log('querySideBar', this.data.shopInfo.shopType)
App.request({ App.request({
url: 'v1/commodity/getClassifys', url: 'v1/commodity/getClassifys',
params: { params: {
......
...@@ -211,7 +211,7 @@ Page({ ...@@ -211,7 +211,7 @@ Page({
if (response.data && response.data.code === 500) { if (response.data && response.data.code === 500) {
App.ui.showToast({ App.ui.showToast({
iconType: 'error', iconType: 'error',
title: response.data.msg, title: response.data.message,
}) })
return return
} }
...@@ -224,7 +224,7 @@ Page({ ...@@ -224,7 +224,7 @@ Page({
.catch((response) => { .catch((response) => {
App.ui.showToast({ App.ui.showToast({
iconType: 'error', iconType: 'error',
title: response.msg, title: response.message,
}) })
}) })
}, },
......
...@@ -141,8 +141,8 @@ ...@@ -141,8 +141,8 @@
<view class="contact_input column"> <view class="contact_input column">
<text class="contact_input_mark">姓名</text> <text class="contact_input_mark">姓名</text>
<m-input <m-input
external-input="input"
inputId="name" inputId="name"
className="input row ac"
maxlength="50" maxlength="50"
placeholder="请填写姓名" placeholder="请填写姓名"
bindblur="onInputBlur" bindblur="onInputBlur"
...@@ -152,8 +152,8 @@ ...@@ -152,8 +152,8 @@
<view class="contact_input column"> <view class="contact_input column">
<text>手机号</text> <text>手机号</text>
<m-input <m-input
external-input="input"
inputId="phone" inputId="phone"
className="input row ac"
maxlength="11" maxlength="11"
type="number" type="number"
placeholder="请填写手机号" placeholder="请填写手机号"
......
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
<view class="row ac"> <view class="row ac">
<text class="title">收货人</text> <text class="title">收货人</text>
<m-input <m-input
external-input="address_item_input"
inputId="name" inputId="name"
className="address_item_input row ac"
value="{{addressInfo.name}}" value="{{addressInfo.name}}"
placeholder="请输入" placeholder="请输入"
maxlength="20" maxlength="20"
...@@ -24,8 +24,8 @@ ...@@ -24,8 +24,8 @@
<view class="row ac"> <view class="row ac">
<text class="title">手机号</text> <text class="title">手机号</text>
<m-input <m-input
external-input="address_item_input"
inputId="phone" inputId="phone"
className="address_item_input row ac"
value="{{addressInfo.phone}}" value="{{addressInfo.phone}}"
placeholder="请输入" placeholder="请输入"
maxlength="11" maxlength="11"
...@@ -51,8 +51,8 @@ ...@@ -51,8 +51,8 @@
<view class="row ac"> <view class="row ac">
<text class="title">详细地址</text> <text class="title">详细地址</text>
<m-input <m-input
external-input="address_item_input"
inputId="address" inputId="address"
className="address_item_input"
value="{{addressInfo.address}}" value="{{addressInfo.address}}"
placeholder="如街道、门牌号、小区、楼栋号等" placeholder="如街道、门牌号、小区、楼栋号等"
maxlength="30" maxlength="30"
......
...@@ -77,7 +77,7 @@ Page({ ...@@ -77,7 +77,7 @@ Page({
if (response.data && response.data.code == 500) { if (response.data && response.data.code == 500) {
App.ui.showToast({ App.ui.showToast({
'iconType': 'error', 'iconType': 'error',
'title': response.data.msg, 'title': response.data.message,
}) })
} else { } else {
App.ui.showToast({ App.ui.showToast({
......
...@@ -264,7 +264,7 @@ Page({ ...@@ -264,7 +264,7 @@ Page({
if (response.data && response.data.code == 500) { if (response.data && response.data.code == 500) {
App.ui.showToast({ App.ui.showToast({
'iconType': 'error', 'iconType': 'error',
'title': response.data.msg, 'title': response.data.message,
}) })
} else { } else {
App.ui.showToast({ App.ui.showToast({
......
...@@ -172,7 +172,7 @@ Page({ ...@@ -172,7 +172,7 @@ Page({
.catch((response) => { .catch((response) => {
App.ui.showToast({ App.ui.showToast({
iconType: 'error', iconType: 'error',
title: response.msg, title: response.message,
}) })
}) })
}, },
......
...@@ -10,8 +10,9 @@ ...@@ -10,8 +10,9 @@
<view class="info_item row cb ac"> <view class="info_item row cb ac">
<text>姓名</text> <text>姓名</text>
<m-input <m-input
external-input="info_item_input"
textAlign="right"
inputId="name" inputId="name"
className="info_item_input row ac"
value="{{userInfo.name}}" value="{{userInfo.name}}"
placeholder="请填写姓名" placeholder="请填写姓名"
maxlength="10" maxlength="10"
...@@ -35,8 +36,9 @@ ...@@ -35,8 +36,9 @@
<view class="info_item row cb ac"> <view class="info_item row cb ac">
<text>地址</text> <text>地址</text>
<m-input <m-input
external-input="info_item_input"
textAlign="right"
inputId="address" inputId="address"
className="info_item_input row ac"
value="{{userInfo.address}}" value="{{userInfo.address}}"
placeholder="请填写地址" placeholder="请填写地址"
maxlength="30" maxlength="30"
......
...@@ -57,7 +57,6 @@ ...@@ -57,7 +57,6 @@
.info_item_input { .info_item_input {
height: 42rpx; height: 42rpx;
text-align: right; text-align: right;
font-size: 30rpx; font-size: 30rpx;
font-weight: 400; font-weight: 400;
......
...@@ -110,8 +110,8 @@ Page({ ...@@ -110,8 +110,8 @@ Page({
'commoditySlice3': [], 'commoditySlice3': [],
'commodityType': Number(funcResponse[i].goodType), 'commodityType': Number(funcResponse[i].goodType),
'wxRequest': funcResponse[i].wxRequest, 'wxRequest': funcResponse[i].wxRequest,
'total': funcResponse[i].smOrderDetails.length 'total': funcResponse[i].smOrderDetails.length,
'isRefund': Boolean(Number(funcResponse[i].enableRefund))
} }
// 添加订单商品列表 // 添加订单商品列表
...@@ -395,6 +395,45 @@ Page({ ...@@ -395,6 +395,45 @@ Page({
fail: () => {}, fail: () => {},
}) })
}, },
onOrderRefund: function (event) {
App.ui.showDialog({
type: 'confirm',
title: '是否确认申请退款?',
content: '申请后无法撤销',
cancel: '取消',
confirm: '确定',
success: () => {
App.ui.showToast({
'iconType': 'loading',
'title': '处理中',
})
this.setData({
isDoing: true
})
let funcItem = event.target.dataset.item
App.request({
url: 'v1/order/orderRefund/' + funcItem.id,
method: 'get',
params: {},
})
.then((response) => {
App.ui.showToast({
'iconType': 'success',
'title': '退款成功'
})
this.setData({
'isDoing': false,
'orderList': [],
'orderPages': 1,
})
this.queryOrder()
})
},
fail: () => {},
})
},
/** /**
* 检验数据是否都通过 * 检验数据是否都通过
* @function * @function
......
...@@ -63,6 +63,7 @@ ...@@ -63,6 +63,7 @@
<text class="message" wx:if="{{item.status === -1}}">已取消</text> <text class="message" wx:if="{{item.status === -1}}">已取消</text>
<text class="message" wx:if="{{item.status === 4}}">已过期</text> <text class="message" wx:if="{{item.status === 4}}">已过期</text>
<text class="message" wx:if="{{item.status === 6}}">已评价</text> <text class="message" wx:if="{{item.status === 6}}">已评价</text>
<text class="warning" wx:if="{{item.status === 7}}">退款审核中</text>
</view> </view>
</view> </view>
...@@ -95,6 +96,7 @@ ...@@ -95,6 +96,7 @@
<text class="amount">¥{{item.amount}}</text> <text class="amount">¥{{item.amount}}</text>
</view> </view>
<view class="row ac"> <view class="row ac">
<button wx:if="{{item.isRefund && item.status !== 7}}" class="delete row cc ac" data-item="{{item}}" catchtap="onOrderRefund">申请退款</button>
<button wx:if="{{item.status === 0}}" class="delete row cc ac" data-index="{{index}}" data-item="{{item}}" catchtap="onOrderCancel" disabled="{{isDoing}}">取消订单</button> <button wx:if="{{item.status === 0}}" class="delete row cc ac" data-index="{{index}}" data-item="{{item}}" catchtap="onOrderCancel" disabled="{{isDoing}}">取消订单</button>
<button disabled="{{isDoing}}" wx:if="{{item.status === -1 || item.status === 4 || item.status === 6}}" class="delete row cc ac" data-item="{{item}}" catchtap="onOrderRemove">删除订单</button> <button disabled="{{isDoing}}" wx:if="{{item.status === -1 || item.status === 4 || item.status === 6}}" class="delete row cc ac" data-item="{{item}}" catchtap="onOrderRemove">删除订单</button>
<button disabled="{{isDoing}}" wx:if="{{item.status === 0}}" class="again row cc ac" data-item="{{item}}" catchtap="onOrderPay">去支付</button> <button disabled="{{isDoing}}" wx:if="{{item.status === 0}}" class="again row cc ac" data-item="{{item}}" catchtap="onOrderPay">去支付</button>
......
...@@ -103,7 +103,7 @@ Page({ ...@@ -103,7 +103,7 @@ Page({
.catch((response) => { .catch((response) => {
App.ui.showToast({ App.ui.showToast({
'iconType': 'error', 'iconType': 'error',
'title': response.msg, 'title': response.message,
}) })
}) })
}, },
......
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
<view class="feedback_input_wrap" style="{{'margin-top: ' + feedbackCssMarginTop + 'px; opacity: ' + feedbackOpacity + ';'}}"> <view class="feedback_input_wrap" style="{{'margin-top: ' + feedbackCssMarginTop + 'px; opacity: ' + feedbackOpacity + ';'}}">
<m-textarea <m-textarea
inputId="feedback" inputId="feedback"
className="feedback_input" external-input="feedback_input"
placeholder="请留下您的宝贵意见" placeholder="请留下您的宝贵意见"
inputMax="{{200}}" inputMax="{{200}}"
focus="{{true}}" focus="{{true}}"
......
...@@ -13,7 +13,6 @@ Page({ ...@@ -13,7 +13,6 @@ Page({
couponDetail: null, couponDetail: null,
}, },
onLoad: function (options) { onLoad: function (options) {
console.log(this)
if (options.couponDetail) { if (options.couponDetail) {
let data = JSON.parse(options.couponDetail) let data = JSON.parse(options.couponDetail)
let tmpGoodsList = []; let tmpGoodsList = [];
...@@ -90,7 +89,7 @@ Page({ ...@@ -90,7 +89,7 @@ Page({
if (response.data && response.data.code * 1 == 500) { if (response.data && response.data.code * 1 == 500) {
App.ui.showToast({ App.ui.showToast({
iconType: 'error', iconType: 'error',
title: response.data.msg, title: response.data.message,
}) })
} else { } else {
App.ui.showToast({ App.ui.showToast({
...@@ -105,7 +104,7 @@ Page({ ...@@ -105,7 +104,7 @@ Page({
.catch((response) => { .catch((response) => {
App.ui.showToast({ App.ui.showToast({
iconType: 'error', iconType: 'error',
title: response.msg, title: response.message,
}) })
}) })
} }
......
...@@ -81,7 +81,7 @@ ...@@ -81,7 +81,7 @@
<view class="order-comment"> <view class="order-comment">
<m-textarea <m-textarea
inputId="evaluate" inputId="evaluate"
className="evaluate-content" external-input="evaluate-content"
placeholder="您的评价与建议,会让园区做的更好" placeholder="您的评价与建议,会让园区做的更好"
inputMax="{{200}}" inputMax="{{200}}"
bindblur="doInputContent"> bindblur="doInputContent">
......
...@@ -38,7 +38,15 @@ ...@@ -38,7 +38,15 @@
<text>订单已评价</text> <text>订单已评价</text>
</view> </view>
</view> </view>
<view class="state-content state-content-invalid column cc" wx:if="{{orderInfo.state === 7}}"> <view class="state-content state-content column cc" wx:if="{{orderInfo.state === 7}}">
<view class="state-content-title row">
<text>退款审核中</text>
</view>
<view class="state-content-tip row">
<text>退款申请正在审核中,请您耐心等待</text>
</view>
</view>
<view class="state-content state-content-invalid column cc" wx:if="{{orderInfo.state === 9}}">
<view class="state-content-title row"> <view class="state-content-title row">
<text>订单已完成</text> <text>订单已完成</text>
</view> </view>
......
...@@ -953,7 +953,7 @@ Page({ ...@@ -953,7 +953,7 @@ Page({
}, },
}) })
.then((response) => { .then((response) => {
if (/ 商品不存在/.test(response.data.msg)) { if (/ 商品不存在/.test(response.data.message)) {
wx.setStorageSync('shoppingCartBuffer', []) wx.setStorageSync('shoppingCartBuffer', [])
App.ui.showToast({ App.ui.showToast({
iconType: 'error', iconType: 'error',
...@@ -967,7 +967,7 @@ Page({ ...@@ -967,7 +967,7 @@ Page({
return return
} }
if (/价格不一致/.test(response.data.msg)) { if (/价格不一致/.test(response.data.message)) {
wx.setStorageSync('shoppingCartBuffer', []) wx.setStorageSync('shoppingCartBuffer', [])
App.ui.showToast({ App.ui.showToast({
iconType: 'error', iconType: 'error',
...@@ -981,10 +981,10 @@ Page({ ...@@ -981,10 +981,10 @@ Page({
return return
} }
if (/订单未支付/.test(response.data.msg)) { if (/订单未支付/.test(response.data.message)) {
App.ui.showToast({ App.ui.showToast({
iconType: 'error', iconType: 'error',
title: response.data.msg, title: response.data.message,
}) })
this.setData({ this.setData({
isPaySubmit: false, isPaySubmit: false,
...@@ -992,7 +992,7 @@ Page({ ...@@ -992,7 +992,7 @@ Page({
return return
} }
if (/库存不足/.test(response.data.msg)) { if (/库存不足/.test(response.data.message)) {
let funcList = [] let funcList = []
for (let i = 0, l = response.data.data.list.length; i < l; i++) { for (let i = 0, l = response.data.data.list.length; i < l; i++) {
let funcItem = { let funcItem = {
......
...@@ -250,8 +250,8 @@ ...@@ -250,8 +250,8 @@
<view class="contact-input column"> <view class="contact-input column">
<text class="contact-input-mark">姓名</text> <text class="contact-input-mark">姓名</text>
<m-input <m-input
external-input="input"
inputId="input" inputId="input"
className="input row ac"
maxlength="50" maxlength="50"
placeholder="请填写姓名" placeholder="请填写姓名"
data-type="name" data-type="name"
...@@ -263,8 +263,8 @@ ...@@ -263,8 +263,8 @@
<view class="contact-input column"> <view class="contact-input column">
<text>手机号</text> <text>手机号</text>
<m-input <m-input
external-input="input"
inputId="input" inputId="input"
className="input row ac"
maxlength="11" maxlength="11"
type="number" type="number"
placeholder="请填写手机号" placeholder="请填写手机号"
...@@ -277,8 +277,8 @@ ...@@ -277,8 +277,8 @@
<view class="contact-input column"> <view class="contact-input column">
<text>备注</text> <text>备注</text>
<m-input <m-input
external-input="input"
inputId="input" inputId="input"
className="input row ac"
maxlength="50" maxlength="50"
placeholder="请填写备注" placeholder="请填写备注"
data-type="remarks" data-type="remarks"
...@@ -306,8 +306,8 @@ ...@@ -306,8 +306,8 @@
<view class="contact-input column"> <view class="contact-input column">
<text class="contact-input-mark">姓名</text> <text class="contact-input-mark">姓名</text>
<m-input <m-input
external-input="input"
inputId="input" inputId="input"
className="input row ac"
maxlength="50" maxlength="50"
placeholder="请填写姓名" placeholder="请填写姓名"
data-type="name" data-type="name"
...@@ -319,8 +319,8 @@ ...@@ -319,8 +319,8 @@
<view class="contact-input column"> <view class="contact-input column">
<text>手机号</text> <text>手机号</text>
<m-input <m-input
external-input="input"
inputId="input" inputId="input"
className="input row ac"
maxlength="11" maxlength="11"
type="number" type="number"
placeholder="请填写手机号" placeholder="请填写手机号"
...@@ -333,8 +333,8 @@ ...@@ -333,8 +333,8 @@
<view class="contact-input column"> <view class="contact-input column">
<text>身份证号</text> <text>身份证号</text>
<m-input <m-input
external-input="input"
inputId="input" inputId="input"
className="input row ac"
placeholder="请填写身份证号" placeholder="请填写身份证号"
data-type="identity" data-type="identity"
data-index="{{index}}" data-index="{{index}}"
......
...@@ -63,7 +63,7 @@ let Output = { ...@@ -63,7 +63,7 @@ let Output = {
response: { response: {
code: funcResponse.data.code, code: funcResponse.data.code,
data: funcResponse.data.list, data: funcResponse.data.list,
message: funcResponse.data.msg message: funcResponse.data.message
} }
} }
} }
...@@ -73,7 +73,7 @@ let Output = { ...@@ -73,7 +73,7 @@ let Output = {
response: { response: {
code: funcResponse.data.code, code: funcResponse.data.code,
data: funcResponse.data.data ? funcResponse.data.data : {}, data: funcResponse.data.data ? funcResponse.data.data : {},
message: funcResponse.data.msg message: funcResponse.data.message
} }
} }
break break
...@@ -88,7 +88,7 @@ let Output = { ...@@ -88,7 +88,7 @@ let Output = {
response: { response: {
code: funcResponse.data.code, code: funcResponse.data.code,
data: '', data: '',
message: funcResponse.data.msg message: funcResponse.data.message
} }
} }
break break
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment