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 fa2da4c..0000000
Binary files a/assets/image/list_empty.png and /dev/null differ
diff --git a/assets/image/video_pause.png b/assets/image/video_pause.png
deleted file mode 100644
index da5cb2c..0000000
Binary files a/assets/image/video_pause.png and /dev/null differ
diff --git a/assets/image/video_play.png b/assets/image/video_play.png
deleted file mode 100644
index 66ff395..0000000
Binary files a/assets/image/video_play.png and /dev/null differ
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 @@
加载中...
-
+
暂无消息