diff --git a/components/uploadImages/uploadImg.js b/components/uploadImages/uploadImg.js deleted file mode 100644 index d972710..0000000 --- a/components/uploadImages/uploadImg.js +++ /dev/null @@ -1,143 +0,0 @@ -// uploadImages/uploadImg.js -const WXAPI = require('../../utils/config.js') -Component({ - /** - * 组件的属性列表 - */ - properties: { - count: { //最多选择图片的张数,默认9张 - type: Number, - value: 9 - }, - uploadUrl: { //图片上传的服务器路径 - type: String, - value: '' - }, - showUrl: { //图片的拼接路径 - type: String, - value: '' - }, - albumType: { //album 从相册选图,camera 使用相机,默认二者都有 - type: String, - value: '' - }, - detailPics: { - type: Array, - value: [] - } - }, - - /** - * 组件的初始数据 - */ - data: { - detailPics: [], //上传的结果图片集合 - }, - onShow() { - console.log(1) - }, - /** - * 组件的方法列表 - */ - methods: { - /** - * 上传详细图片 - */ - uploadDetailImage: function (e) { //这里是选取图片的方法 - var that = this; - var pics = []; - var detailPics = that.data.detailPics; - if (detailPics.length >= that.data.count) { - wx.showToast({ - title: '最多选择' + that.data.count + '张!', - }) - return; - } - wx.chooseMedia({ - count: that.data.count, // 最多可以选择的图片张数,默认9 - sizeType: ['original', 'compressed'], // original 原图,compressed 压缩图,默认二者都有 - sourceType: that.data.albumType == '0' ? ['camera'] : ['album', 'camera'], // album 从相册选图,camera 使用相机,默认二者都有 - success: function (res) { - var imgs = res.tempFiles; - var ticket = wx.getStorageSync('ticket'); - var urlArr = [] - for (var i = 0; i < imgs.length; i++) { - pics.push(imgs[i]) - var url = imgs[i].tempFilePath - //取得文件的后缀 - var extensiton = url.substr(url.lastIndexOf('.') + 1).toLowerCase(); - // 根据时间戳生成唯一的主文件名称 - var mainname = '' + Date.now() + Math.ceil(Math.random() * 9999); - var uploadUrl = WXAPI.API_BASE_URL + 'Common/UploadUserFile?ticket=' + ticket + '&name=' + mainname + '.' + extensiton; - urlArr.push(uploadUrl) - } - that.uploadImg({ - url: urlArr, //这里是你图片上传的接口 - path: pics, //这里是选取的图片的地址数组 - }); - }, - }) - }, - //多张图片上传 - uploadImg: function (data) { - // console.log(this.globalData.openId) - wx.showLoading({ - title: '上传中...', - mask: true, - }) - var that = this, - i = data.i ? data.i : 0, - success = data.success ? data.success : 0, - fail = data.fail ? data.fail : 0; - wx.uploadFile({ - url: data.url[i], - header: { 'content-type': 'multipart/form-data' }, - filePath: data.path[i].tempFilePath, - name: 'image', - formData: { "openid": '1' }, - success: (resp) => { - wx.hideLoading(); - success++; - var info = JSON.parse(resp.data);//返回的结果,可能不同项目结果不一样 - // console.log(info) - var picName = that.data.showUrl + info.data.url; - var detailPics = that.data.detailPics; - detailPics.push(picName) - that.setData({ - detailPics: detailPics - }) - }, - fail: (res) => { - fail++; - console.log('fail:' + i + "fail:" + fail); - }, - complete: () => { - i++; - if (i == data.path.length) { //当图片传完时,停止调用 - console.log('执行完毕'); - // console.log('成功:' + success + " 失败:" + fail); - var eventDetail = { - picsList: that.data.detailPics - } // detail对象,提供给事件监听函数 - var eventOption = {} // 触发事件的选项 - that.triggerEvent('event', eventDetail, eventOption) - } else { //若图片还没有传完,则继续调用函数 - data.i = i; - data.success = success; - data.fail = fail; - that.uploadImg(data); - } - } - }); - }, - //预览图片 - imagePreview: function (e) { - console.log(e.target.dataset) - var current = e.target.dataset.src; - wx.previewImage({ - current: current, // 当前显示图片的http链接 - urls: this.data.detailPics // 需要预览的图片http链接列表 - }) - }, - } -}) diff --git a/components/uploadImages/uploadImg.json b/components/uploadImages/uploadImg.json deleted file mode 100644 index e8cfaaf..0000000 --- a/components/uploadImages/uploadImg.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "component": true, - "usingComponents": {} -} \ No newline at end of file diff --git a/components/uploadImages/uploadImg.wxml b/components/uploadImages/uploadImg.wxml deleted file mode 100644 index f253009..0000000 --- a/components/uploadImages/uploadImg.wxml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/components/uploadImages/uploadImg.wxss b/components/uploadImages/uploadImg.wxss deleted file mode 100644 index 37aa7e0..0000000 --- a/components/uploadImages/uploadImg.wxss +++ /dev/null @@ -1,76 +0,0 @@ -/* uploadImages/uploadImg.wxss */ -page { - background-color: #f1f0f5; -} - -.content { - width: 100%; - background-color: #fff; -} - -.img-box { - width: 100%; - margin-left: 35rpx; - margin-right: 35rpx; -} - -.img-list { - display: flex; - display: -webkit-flex; - flex-direction: row; - justify-content: flex-start; - align-items: center; - /* flex-wrap: wrap; */ -} - -.img-item { - width: 150rpx; - text-align: left; - margin-right: 20rpx; - margin-bottom: 10rpx; -} - -.img-item image { - width: 150rpx; - height: 150rpx; -} - -.chooseImg { - background-color: #fff; -} - -.weui-uploader__input-box { - float: left; - position: relative; - margin-right: 9px; - margin-bottom: 9px; - width: 150rpx; - height: 150rpx; - /* border: 1px solid #d9d9d9; */ -} - -/* .weui-uploader__input-box:after, .weui-uploader__input-box:before { - content: " "; - position: absolute; - top: 50%; - left: 50%; - -webkit-transform: translate(-50%, -50%); - transform: translate(-50%, -50%); - background-color: #d9d9d9; -} */ - -.weui-uploader__input-box:before { - width: 2px; - height: 35px; -} - -.weui-uploader__input-box:after { - width: 35px; - height: 2px; -} - -.tips { - color: #666; - font-size: 25rpx; - padding-bottom: 20rpx; -} diff --git a/images/icon_add.png b/images/icon_add.png deleted file mode 100644 index 2987081..0000000 Binary files a/images/icon_add.png and /dev/null differ diff --git a/images/lb.png b/images/lb.png deleted file mode 100644 index c6f9857..0000000 Binary files a/images/lb.png and /dev/null differ diff --git a/images/member/component_lv_0.jpg b/images/member/component_lv_0.jpg new file mode 100644 index 0000000..2409c6e Binary files /dev/null and b/images/member/component_lv_0.jpg differ diff --git a/images/member/component_lv_0.png b/images/member/component_lv_0.png deleted file mode 100644 index bbd2d9b..0000000 Binary files a/images/member/component_lv_0.png and /dev/null differ diff --git a/images/member/component_lv_1.jpg b/images/member/component_lv_1.jpg new file mode 100644 index 0000000..4be1f3b Binary files /dev/null and b/images/member/component_lv_1.jpg differ diff --git a/images/member/component_lv_1.png b/images/member/component_lv_1.png deleted file mode 100644 index f4a16de..0000000 Binary files a/images/member/component_lv_1.png and /dev/null differ diff --git a/images/member/component_lv_2.jpg b/images/member/component_lv_2.jpg new file mode 100644 index 0000000..1ffec6a Binary files /dev/null and b/images/member/component_lv_2.jpg differ diff --git a/images/member/component_lv_2.png b/images/member/component_lv_2.png deleted file mode 100644 index f4bb7a9..0000000 Binary files a/images/member/component_lv_2.png and /dev/null differ diff --git a/images/member/component_lv_3.jpg b/images/member/component_lv_3.jpg new file mode 100644 index 0000000..c592123 Binary files /dev/null and b/images/member/component_lv_3.jpg differ diff --git a/images/member/component_lv_3.png b/images/member/component_lv_3.png deleted file mode 100644 index e9d03e4..0000000 Binary files a/images/member/component_lv_3.png and /dev/null differ diff --git a/images/member/component_lv_4.jpg b/images/member/component_lv_4.jpg new file mode 100644 index 0000000..e4e106b Binary files /dev/null and b/images/member/component_lv_4.jpg differ diff --git a/images/member/component_lv_4.png b/images/member/component_lv_4.png deleted file mode 100644 index ae29830..0000000 Binary files a/images/member/component_lv_4.png and /dev/null differ diff --git a/images/member/component_lv_5.jpg b/images/member/component_lv_5.jpg new file mode 100644 index 0000000..d11f81f Binary files /dev/null and b/images/member/component_lv_5.jpg differ diff --git a/images/member/component_lv_5.png b/images/member/component_lv_5.png deleted file mode 100644 index faa2a28..0000000 Binary files a/images/member/component_lv_5.png and /dev/null differ diff --git a/images/member/component_lv_6.jpg b/images/member/component_lv_6.jpg new file mode 100644 index 0000000..abb2387 Binary files /dev/null and b/images/member/component_lv_6.jpg differ diff --git a/images/member/component_lv_6.png b/images/member/component_lv_6.png deleted file mode 100644 index 62cbef7..0000000 Binary files a/images/member/component_lv_6.png and /dev/null differ diff --git a/images/wxzf.png b/images/wxzf.png deleted file mode 100644 index 515473a..0000000 Binary files a/images/wxzf.png and /dev/null differ diff --git a/pages/member/member.wxml b/pages/member/member.wxml index 0cf8977..b835317 100644 --- a/pages/member/member.wxml +++ b/pages/member/member.wxml @@ -2,6 +2,6 @@ 当前积分0,充值会员即可拥有积分特权 - +