From e214543b1c834fbdbab44be24d2f431437ad3770 Mon Sep 17 00:00:00 2001
From: xpz2018 <107107461@qq.com>
Date: Fri, 29 May 2020 20:24:37 +0800
Subject: [PATCH] =?UTF-8?q?=E8=A7=86=E9=A2=91=E6=92=AD=E6=94=BE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
assets/image/icon_empty.svg | 4 +
assets/image/list_empty.png | Bin 3743 -> 0 bytes
assets/image/video_pause.png | Bin 597 -> 0 bytes
assets/image/video_play.png | Bin 661 -> 0 bytes
colorui/main.wxss | 4 +-
components/backdrop/index.wxss | 2 +-
components/landscape/index.js | 62 ++++++++++++
components/landscape/index.json | 6 ++
components/landscape/index.wxml | 20 ++++
components/landscape/index.wxss | 32 ++++++
components/popup/index.wxss | 4 +-
components/swiper-video/index.js | 152 +++++++++++++++++++++++++++++
components/swiper-video/index.json | 6 ++
components/swiper-video/index.wxml | 18 ++++
components/swiper-video/index.wxss | 32 ++++++
pages/mall/index/index.wxml | 2 +-
pages/mall/order-detail/index.js | 20 ----
pages/mall/order-info/index.js | 125 +-----------------------
pages/mall/order-info/index.json | 3 +-
pages/mall/order-info/index.wxml | 17 +---
pages/mall/order-list/index.wxml | 2 +-
pages/mall/order-offer/index.js | 21 ----
pages/mall/search-list/index.wxml | 2 +-
pages/mall/shops/index.wxml | 16 ---
pages/message/index.wxml | 2 +-
25 files changed, 347 insertions(+), 205 deletions(-)
create mode 100644 assets/image/icon_empty.svg
delete mode 100644 assets/image/list_empty.png
delete mode 100644 assets/image/video_pause.png
delete mode 100644 assets/image/video_play.png
create mode 100644 components/landscape/index.js
create mode 100644 components/landscape/index.json
create mode 100644 components/landscape/index.wxml
create mode 100644 components/landscape/index.wxss
create mode 100644 components/swiper-video/index.js
create mode 100644 components/swiper-video/index.json
create mode 100644 components/swiper-video/index.wxml
create mode 100644 components/swiper-video/index.wxss
diff --git a/assets/image/icon_empty.svg b/assets/image/icon_empty.svg
new file mode 100644
index 0000000..8a74592
--- /dev/null
+++ b/assets/image/icon_empty.svg
@@ -0,0 +1,4 @@
+
+
\ No newline at end of file
diff --git a/assets/image/list_empty.png b/assets/image/list_empty.png
deleted file mode 100644
index fa2da4cedaf2209a3863196e0eed7049594bf9f5..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 3743
zcmcIn`9IWM8~)CML6|`Z$&AoQDrKpxV{AiVEZMhINEq?hGi3QHMluN5mncKFhpba3
z*(I`+-80!Aghc3__m}rScz-zOd_MPm?sM+XeXi@A>%^Ph(C6V2@Y8
zjI7nA!%X~vfX0BlQslC~r$qVE0IY1JG+A1!8)fiz
zZvV`si6H3^5{ypt4-|1Z3&msb@8nFJIoi&~!+8(`bkw
zeHU!6mhLlr0fdK#ho%#X@7~L+!Xc`hj4;X{UQr0}(7|6N(v-
zlbHE~8YHhY{z-hqq|@oVcJb14CLk9tzSz0=9aS&&}Ia%1(`8MGp>{5
zdUJ{`~ctT5qj@%o}7w)iSA
z6M&z{Kga;5v>53H%U*dCFCoq^P1SE+WG8mJ!g>;l8fW1kYjU*Oz_s*`sCOb!k!md&
z!f8|@2ZRm-Rj&$R3bu-?~>wKU~`?s%Og?6{Mo1Y3I5H3*uJ2Y}1II!g#mOTR?~%rl4S6RrYN~Xnk45=8w8#klK-TDn|rmzPE?zr`F`Y
zTvYeHitfCz;viLg(BKi%F2Mu#xNV{_>bR@$O@!7cmtpt)8zcZCgvw^qHBN+C(vx
z94)*PjO=wgCf;3BSp(Rz!HZMwg~9jgk(-{Q0XLs_>PeGFYymQtm%1Gx_~ajlGlJg}
z6B2@e4KsZ6`v8Z3C0vV3B*`QD0H%=xrFo(!GhX0fd12xFFWo0Xv=fz`rEpWi$v7~O
zfA9{PaSXrR!*r+l%qk%Rfo*c?dlm2NuqMRa;`M%S2VF_y$&@=aj%jv@5oPWZ3qsA$GqM)g_-63zc`6=a*b84DRoF#4ADd!2ffdGMLEwkwocb
zA;~t8YK)i(p7NUBeLL|sn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<|@omYvDxt#vrl^77^rB|Ejl@MZr<`@RpS^4Tr95oW!Q_QqT0tf|FY&
z3A^j@7JZy}`gcj=k5ik)K6u6~cq|&4_IAeQb;kPPCfhkzEakj#n`h_5i_xk(B`@Eu
zz2>m-zjWm1fRdF9UrchIXjitqdGBf!qZQS5cX-QwT~@U7V>|UY<^LbSzVFZf{AYX+
XXXLYF{%sv#Y%zGc`njxgN@xNAzJN3p
diff --git a/assets/image/video_play.png b/assets/image/video_play.png
deleted file mode 100644
index 66ff395035be83f3a6aec10cf46fc58aeb29b116..0000000000000000000000000000000000000000
GIT binary patch
literal 0
HcmV?d00001
literal 661
zcmeAS@N?(olHy`uVBq!ia0vp^1|ZDA3?vioaBc-sEa{HEjtmSN`?>!lvI6;x#X;^)
z4C~IxyaaOm0(?STeKHIGQxBLmY^emAELjrd7tG+Qpz&RzpX2uBcS(=`hWnQAXVqKo
zJT|xKRQL8Api>Tbx;Tb-9G@F@b6c|l&k`oR9U*tL{{LTG?r^({WsA9f)da=KDIO_r
zaw4beA3AVkQn}>r4U6=8(?erbw!PkG*l1eI6Z9p^+C*M1##n9lo+9q9wu161V=w&$
zh0#wR{#(wwrAA18jkI9RifEnv8QVmj~Y|
k*#EWq^Z5CbbMMc~FYPnszt?^*7#QIUp00i_>zopr06_vp6951J
diff --git a/colorui/main.wxss b/colorui/main.wxss
index 990c256..ad86e6f 100644
--- a/colorui/main.wxss
+++ b/colorui/main.wxss
@@ -2470,8 +2470,8 @@ scroll-view.cu-steps .cu-item {
}
.img-empty {
- width: 280rpx;
- height: 280rpx;
+ width: 120rpx;
+ height: 120rpx;
}
.text-empty {
diff --git a/components/backdrop/index.wxss b/components/backdrop/index.wxss
index be44d1b..47dcfed 100644
--- a/components/backdrop/index.wxss
+++ b/components/backdrop/index.wxss
@@ -1,5 +1,5 @@
.wux-backdrop {
- background: rgba(0,0,0,.4)
+ background: rgba(0,0,0,1)
}
.wux-backdrop,
.wux-backdrop--transparent {
diff --git a/components/landscape/index.js b/components/landscape/index.js
new file mode 100644
index 0000000..3fe6a79
--- /dev/null
+++ b/components/landscape/index.js
@@ -0,0 +1,62 @@
+import baseComponent from '../helpers/baseComponent'
+import classNames from '../helpers/classNames'
+
+baseComponent({
+ properties: {
+ prefixCls: {
+ type: String,
+ value: 'wux-landscape',
+ },
+ visible: {
+ type: Boolean,
+ value: false,
+ },
+ mask: {
+ type: Boolean,
+ value: true,
+ observer(newVal) {
+ this.setData({ showMask: newVal })
+ },
+ },
+ maskClosable: {
+ type: Boolean,
+ value: false,
+ },
+ closable: {
+ type: Boolean,
+ value: true,
+ },
+ },
+ data: {
+ showMask: true,
+ },
+ computed: {
+ classes: ['prefixCls, showMask', function(prefixCls, showMask) {
+ const wrap = classNames(prefixCls, {
+ [`${prefixCls}--has-mask`]: showMask,
+ })
+ const popup = `${prefixCls}__popup`
+ const popupBody = `${prefixCls}__popup-body`
+ const popupClose = `${prefixCls}__popup-close`
+ const inner = `${prefixCls}__inner`
+ const close = `${prefixCls}__close`
+ const x = `${prefixCls}__close-x`
+
+ return {
+ wrap,
+ popup,
+ popupBody,
+ popupClose,
+ inner,
+ close,
+ x,
+ }
+ }],
+ },
+ methods: {
+ onClose() {
+ this.triggerEvent('close', { visible: !this.data.visible })
+ },
+ },
+ attached() {},
+})
diff --git a/components/landscape/index.json b/components/landscape/index.json
new file mode 100644
index 0000000..8d120df
--- /dev/null
+++ b/components/landscape/index.json
@@ -0,0 +1,6 @@
+{
+ "component": true,
+ "usingComponents": {
+ "wux-popup": "../popup/index"
+ }
+}
\ No newline at end of file
diff --git a/components/landscape/index.wxml b/components/landscape/index.wxml
new file mode 100644
index 0000000..0b8769a
--- /dev/null
+++ b/components/landscape/index.wxml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
+
diff --git a/components/landscape/index.wxss b/components/landscape/index.wxss
new file mode 100644
index 0000000..7f6ae9a
--- /dev/null
+++ b/components/landscape/index.wxss
@@ -0,0 +1,32 @@
+.wux-landscape__popup {
+ background-color: transparent!important
+}
+.wux-landscape__popup-body {
+ padding: 0!important
+}
+.wux-landscape__inner {
+ padding: 30rpx;
+ font-size: 30rpx;
+ line-height: 1.5;
+ color: #666
+}
+.wux-landscape__inner > image {
+ width: 100%;
+ max-width: 100%
+}
+.wux-landscape__close {
+ position: relative;
+ display: inline-block;
+ margin-top: 10rpx
+}
+.wux-landscape__close-x {
+ display: inline-block;
+ width: 48rpx;
+ height: 48rpx;
+ background-repeat: no-repeat;
+ background-size: cover;
+ background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg width='30' height='30' viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23888' fill-rule='evenodd'%3E%3Cpath d='M1.414 0l28.284 28.284-1.414 1.414L0 1.414z'/%3E%3Cpath d='M28.284 0L0 28.284l1.414 1.414L29.698 1.414z'/%3E%3C/g%3E%3C/svg%3E")
+}
+.wux-landscape--has-mask .wux-landscape__close-x {
+ background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg width='30' height='30' viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23fff' fill-rule='evenodd'%3E%3Cpath d='M1.414 0l28.284 28.284-1.414 1.414L0 1.414z'/%3E%3Cpath d='M28.284 0L0 28.284l1.414 1.414L29.698 1.414z'/%3E%3C/g%3E%3C/svg%3E")
+}
\ No newline at end of file
diff --git a/components/popup/index.wxss b/components/popup/index.wxss
index eaba04a..1b1a5b3 100644
--- a/components/popup/index.wxss
+++ b/components/popup/index.wxss
@@ -1,8 +1,8 @@
.wux-popup {
position: fixed;
z-index: 1000;
- width: 80%;
- max-width: 600rpx
+ /* width: 80%; */
+ /* max-width: 600rpx */
}
.wux-popup-position.wux-popup-position--center .wux-popup {
top: 50%;
diff --git a/components/swiper-video/index.js b/components/swiper-video/index.js
new file mode 100644
index 0000000..ee671b8
--- /dev/null
+++ b/components/swiper-video/index.js
@@ -0,0 +1,152 @@
+const float = require('../../utils/floatObj');
+
+Component({
+ options: {
+ addGlobalClass: true
+ },
+ properties: {
+ // 数据源
+ imgList: {
+ type: Array,
+ value: [],
+ observer: "dataChange"
+ }
+ },
+ data: {
+ videoContext: null,
+ imageHeight: 0,
+ visible: false,
+ videoUrl: null
+ },
+ methods: {
+ /**
+ * 初始化函数
+ */
+ init() {
+ this.setData({
+ imageHeight: float.accDiv(float.accMul(750, 9), 16),
+ })
+ this.data.videoContext = wx.createVideoContext('video', this)
+ },
+ isVideoUrl: function (url) {
+ if (url && url.indexOf('.mp4') >= 0) {
+ return true
+ }
+ return false
+ },
+ dataChange(newVal, oldVal) {
+ var vindex = -1
+ var vurl = null
+ var imgList = []
+ for (let index = 0; index < newVal.length; index++) {
+ const element = newVal[index]
+ if (this.isVideoUrl(element)) {
+ vindex = index
+ vurl = element
+ break
+ }
+ }
+
+ if (vindex >= 1) {
+ newVal.splice(vindex, 1)
+ imgList = newVal
+ imgList.unshift(vurl)
+ this.data.videoContext = wx.createVideoContext('video', this)
+ } else if (vindex == 0) {
+ imgList = newVal
+ this.data.videoContext = wx.createVideoContext('video', this)
+ } else {
+ imgList = newVal
+ }
+ this.setData({
+ videoUrl: vurl,
+ imgList: imgList
+ })
+ },
+ // bindchange: function (event) {
+ // if (this.data.videoContext && this.data.status == 1) {
+ // this.data.videoContext.pause()
+ // }
+ // },
+ // videoTouch: function () {
+
+ // if (this.data.timeout) {
+ // return
+ // }
+ // if (!this.data.controls && this.data.status == 1) {
+ // this.setData({
+ // controls: true
+ // })
+ // this.data.timeout = setTimeout(() => {
+ // this.setData({
+ // controls: false
+ // })
+ // this.data.timeout = null
+ // }, 1000)
+ // }
+ // },
+ videoTap: function () {
+ this.setData({
+ visible: true,
+ })
+ if (this.data.videoContext) {
+ this.data.videoContext.play()
+ }
+ },
+ onClose: function() {
+ this.setData({
+ visible: false,
+ })
+ if (this.data.videoContext) {
+ this.data.videoContext.pause()
+ }
+ },
+ // bindplay: function () {
+ // this.setData({
+ // status: 1
+ // })
+ // this.data.timeout = setTimeout(() => {
+ // this.setData({
+ // controls: false
+ // })
+ // this.data.timeout = null
+ // }, 1500)
+ // },
+ // bindpause: function () {
+ // this.setData({
+ // status: 0,
+ // controls: true
+ // })
+ // if (this.data.timeout) {
+ // clearTimeout(this.data.timeout)
+ // this.data.timeout = null
+ // }
+ // },
+ bindended: function () {
+ this.data.videoContext.exitFullScreen()
+ this.setData({
+ visible: false
+ })
+ },
+ // 图片查看
+ viewImage: function (e) {
+ if (e.currentTarget.dataset.url.indexOf('.mp4') >= 0) {
+ return
+ }
+ var imgList = []
+ for (let index = 0; index < this.data.imgList.length; index++) {
+ if (this.data.imgList[index].indexOf('.mp4') >= 0) {
+ continue
+ }
+ imgList.push(this.data.imgList[index])
+ }
+ wx.previewImage({
+ urls: imgList,
+ current: e.currentTarget.dataset.url
+ });
+ },
+ },
+ ready() {
+ this.init();
+ }
+})
\ No newline at end of file
diff --git a/components/swiper-video/index.json b/components/swiper-video/index.json
new file mode 100644
index 0000000..8764966
--- /dev/null
+++ b/components/swiper-video/index.json
@@ -0,0 +1,6 @@
+{
+ "component": true,
+ "usingComponents": {
+ "wux-landscape": "../landscape/index"
+ }
+}
\ No newline at end of file
diff --git a/components/swiper-video/index.wxml b/components/swiper-video/index.wxml
new file mode 100644
index 0000000..b8861d5
--- /dev/null
+++ b/components/swiper-video/index.wxml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/components/swiper-video/index.wxss b/components/swiper-video/index.wxss
new file mode 100644
index 0000000..22c413f
--- /dev/null
+++ b/components/swiper-video/index.wxss
@@ -0,0 +1,32 @@
+.swiper-cnt {
+ display: flex;
+ flex-direction: column;
+ width: 100%;
+ position: relative;
+}
+
+.video-cnt {
+ position: absolute;
+ top: 0;
+ left: 0;
+ z-index: -1 !important;
+ width: 100%;
+ height: 100%;
+}
+
+.play-btn {
+ position: absolute;
+ top: 150rpx;
+ left: 342rpx;
+ z-index: 100;
+}
+
+.play-controls{
+ width: 100%;
+ height: 80rpx;
+ padding: 15rpx 20rpx;
+ position: absolute;
+ display: flex;
+ bottom: 0px;
+ z-index: 100;
+}
\ No newline at end of file
diff --git a/pages/mall/index/index.wxml b/pages/mall/index/index.wxml
index 68d5baf..a49b724 100644
--- a/pages/mall/index/index.wxml
+++ b/pages/mall/index/index.wxml
@@ -11,7 +11,7 @@
加载中...
-
+
暂无数据
diff --git a/pages/mall/order-detail/index.js b/pages/mall/order-detail/index.js
index f0dbd09..0ef6b76 100644
--- a/pages/mall/order-detail/index.js
+++ b/pages/mall/order-detail/index.js
@@ -55,26 +55,6 @@ Page({
})
},
- showDialog: function (e) {
- var that = this
- $wuxDialog().open({
- resetOnClose: true,
- title: '温馨提示',
- content: '跳过确认事宜之后,没有确认的事项将不在记录,同时意味着您已经装货入仓了,确定跳过?',
- buttons: [{
- text: '取消',
- }, {
- text: '确定',
- type: 'primary',
- onTap(e) {
- that.setData({
- step: steps.length + 1
- })
- }
- }]
- })
- },
-
offerProject: function (e) {
if (!this.data.addressInfo) {
util.showToast('请选择收货地址')
diff --git a/pages/mall/order-info/index.js b/pages/mall/order-info/index.js
index f30eeb5..6cd13bf 100644
--- a/pages/mall/order-info/index.js
+++ b/pages/mall/order-info/index.js
@@ -14,7 +14,6 @@ Page({
backStr: '返回',
orderInfo: null,
matchTag: null,
- imageHeight: 0,
sukList: [],
imgList: [],
form: {
@@ -24,9 +23,7 @@ Page({
unitPrice: 0
},
amount: null,
- isIPhoneX: false,
- status: 0,
- controls: true
+ isIPhoneX: false
},
/**
* 生命周期函数--监听页面加载
@@ -39,8 +36,7 @@ Page({
}
this.setData({
token: app.globalData.token,
- isIPhoneX: app.globalData.isIPhoneX,
- imageHeight: float.accDiv(float.accMul(750, 9), 16),
+ isIPhoneX: app.globalData.isIPhoneX
})
event.on('EventMessage', this, this.onEvent)
if (options.id) {
@@ -52,35 +48,13 @@ Page({
request.get('/bxe-mall/product/' + options.id).then(result => {
//成功回调
wx.hideLoading()
- var vindex = -1
- var vurl = null
- var imgList = []
- for (let index = 0; index < result.data.imgList.length; index++) {
- const element = result.data.imgList[index]
- if(this.isVideoUrl(element)){
- vindex = index
- vurl = element
- break
- }
- }
- if(vindex >= 1){
- result.data.imgList.splice(vindex, 1)
- imgList = result.data.imgList
- imgList.unshift(vurl)
- this.videoContext = wx.createVideoContext('video')
- } else if(vindex == 0){
- imgList = result.data.imgList
- this.videoContext = wx.createVideoContext('video')
- } else {
- imgList = result.data.imgList
- }
if(Number(result.data.minBuyNum) > 1){
this.data.form.number = parseInt(result.data.minBuyNum)
}
this.setData({
['form.productId']: options.id,
orderInfo: result.data,
- imgList: imgList
+ imgList: result.data.imgList
})
}).catch(err => {
//异常回调
@@ -89,16 +63,6 @@ Page({
})
}
},
- swapArray: function (arr, index1, index2) {
- arr[index1] = arr.splice(index2, 1, arr[index1])[0]
- return arr
- },
- isVideoUrl: function (url) {
- if (url && url.indexOf('.mp4') >= 0) {
- return true
- }
- return false
- },
// 事件处理
onEvent: function (message) {
console.log('mall>>order>>onEvent', message)
@@ -110,89 +74,6 @@ Page({
wx.navigateBack()
}
},
- bindchange: function (event) {
- if (this.videoContext && this.data.status == 1) {
- this.videoContext.pause()
- }
- },
- videoTouch: function () {
- console.log('videoTouch>>>')
- if (this.timeout) {
- return
- }
- if (!this.data.controls && this.data.status == 1) {
- this.setData({
- controls: true
- })
- this.timeout = setTimeout(() => {
- this.setData({
- controls: false
- })
- this.timeout = null
- }, 1000)
- }
- },
- videoTap: function () {
- if (this.videoContext) {
- console.log('videoTap>>>')
- if (this.data.status == 0) {
- this.videoContext.play()
- } else if (this.data.status == 1) {
- this.videoContext.pause()
- }
- }
- },
- bindplay: function () {
- this.setData({
- status: 1
- })
- this.timeout = setTimeout(() => {
- this.setData({
- controls: false
- })
- this.timeout = null
- }, 1500)
- },
- bindpause: function () {
- this.setData({
- status: 0,
- controls: true
- })
- if (this.timeout) {
- clearTimeout(this.timeout)
- this.timeout = null
- }
- },
- bindended: function () {
- this.setData({
- status: 0
- })
- },
- // phone: function (e) {
- // var mobile = e.currentTarget.dataset.index
- // if (util.checkPhone(mobile)) {
- // wx.makePhoneCall({
- // phoneNumber: mobile
- // })
- // }
- // },
- // 图片查看
- viewImage: function (e) {
- if (e.currentTarget.dataset.url.indexOf('.mp4') >= 0) {
- return
- }
- var imgList = []
- for (let index = 0; index < this.data.orderInfo.imgList.length; index++) {
- if (this.data.orderInfo.imgList[index].indexOf('.mp4') >= 0) {
- continue
- }
- imgList.push(this.data.orderInfo.imgList[index])
- }
- wx.previewImage({
- urls: imgList,
- current: e.currentTarget.dataset.url
- });
- },
// 根据
checkDisableTag: function (sukId, match, element) {
match[sukId] = element.id
diff --git a/pages/mall/order-info/index.json b/pages/mall/order-info/index.json
index 8162bd9..be72d57 100644
--- a/pages/mall/order-info/index.json
+++ b/pages/mall/order-info/index.json
@@ -1,6 +1,7 @@
{
"usingComponents": {
"wux-button": "/components/button/index",
- "wux-input-number": "/components/input-number/index"
+ "wux-input-number": "/components/input-number/index",
+ "swiper-video": "/components/swiper-video/index"
}
}
\ No newline at end of file
diff --git a/pages/mall/order-info/index.wxml b/pages/mall/order-info/index.wxml
index 2e80e18..06b7633 100644
--- a/pages/mall/order-info/index.wxml
+++ b/pages/mall/order-info/index.wxml
@@ -6,22 +6,7 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
¥{{form.unitPrice || orderInfo.price}}
diff --git a/pages/mall/order-list/index.wxml b/pages/mall/order-list/index.wxml
index 936d4ce..b5e9dd4 100644
--- a/pages/mall/order-list/index.wxml
+++ b/pages/mall/order-list/index.wxml
@@ -22,7 +22,7 @@
加载中...
-
+
暂无消息
diff --git a/pages/mall/order-offer/index.js b/pages/mall/order-offer/index.js
index 7b35f64..66130e8 100644
--- a/pages/mall/order-offer/index.js
+++ b/pages/mall/order-offer/index.js
@@ -40,32 +40,11 @@ Page({
}
})
},
-
checkMode: function (e) {
this.setData({
['form.payType']: Number(e.currentTarget.dataset.index)
})
},
-
- showDialog: function (e) {
- var that = this
- $wuxDialog().open({
- resetOnClose: true,
- title: '温馨提示',
- content: '跳过确认事宜之后,没有确认的事项将不在记录,同时意味着您已经装货入仓了,确定跳过?',
- buttons: [{
- text: '取消',
- }, {
- text: '确定',
- type: 'primary',
- onTap(e) {
- that.setData({
- step: steps.length + 1
- })
- }
- }]
- })
- },
// 创建订单
offerProject: function (e) {
if (!this.data.addressInfo) {
diff --git a/pages/mall/search-list/index.wxml b/pages/mall/search-list/index.wxml
index 45619c8..c3066c5 100644
--- a/pages/mall/search-list/index.wxml
+++ b/pages/mall/search-list/index.wxml
@@ -32,7 +32,7 @@
加载中...
-
+
暂无数据
diff --git a/pages/mall/shops/index.wxml b/pages/mall/shops/index.wxml
index cbba76a..511c081 100644
--- a/pages/mall/shops/index.wxml
+++ b/pages/mall/shops/index.wxml
@@ -97,11 +97,6 @@
-
-
- 暂无数据
-
-
@@ -113,17 +108,6 @@
-
-
- 团购
- 专区
-
- 大厂品牌 质量保证
-
-
-
diff --git a/pages/message/index.wxml b/pages/message/index.wxml
index b7dcaec..c30f034 100644
--- a/pages/message/index.wxml
+++ b/pages/message/index.wxml
@@ -10,7 +10,7 @@
加载中...
-
+
暂无消息