Commit 0dc42bb2 by 张立顺

bugfix

1 parent 0087f45d
......@@ -51,7 +51,8 @@
"usingComponents": {
"tab": "/components/Tab/Tab",
"navigation-bar": "/components/NavigationBar/NavigationBar",
"popup": "/components/Popup/Popup"
"popup": "/components/Popup/Popup",
"nothing-tips": "/components/Nothing-tips/nothingTips"
},
"style": "v2",
"resolveAlias": {
......
// components/Nothing-tips/nothingTips.js
Component({
/**
* 组件的属性列表
*/
properties: {
tips: String,
bg: String
},
/**
* 组件的初始数据
*/
data: {},
/**
* 组件的方法列表
*/
methods: {}
})
{
"component": true,
"usingComponents": {}
}
\ No newline at end of file
/* components/Nothing-tips/nothingTips.wxss */
.nothingCon {
width: 100vw;
height: 100vh;
background-color: #fff;
}
\ No newline at end of file
<!-- components/Nothing-tips/nothingTips.wxml -->
<view class="nothingCon">
<image wx:if="{{bg}}" src="{{bg}}" webp></image>
<view wx:if="{{tips}}" class="tips">{{tips}}</view>
<slot/>
</view>
// pages/mineDetail/customerManagement/customerManagement.js
import mineApi from '~/api/mineApi/index'
import USERAPI from '~/api/usersApi/index'
const listObj = Object.freeze([
{
key: 'merchantId',
......@@ -126,7 +128,8 @@ Component({
}
],
listObj,
isSuper: false
isSuper: false,
bgUrl: `${USERAPI}/output/empty.png`
},
attached() {
// this.initTime()
......
{
"navigationBarTitleText": "订单补录",
"navigationBarTitleText": "客户管理",
"component": true,
"usingComponents": {
"gl-cell": "../../../components/GlCell/GlCell"
......
......@@ -4,14 +4,17 @@ page {
}
.customerManagementCon {
width: 100%;
height: 100%;
// width: 100vw;
// height: 100vh;
}
.input {
text-align: left;
font-size: 28rpx;
caret-color: #3666FE;
width: 430rpx;
}
......
......@@ -2,6 +2,7 @@
<view class="customerManagementCon">
<!-- required hidden="{{hidden}}" -->
<scroll-view
wx:if="{{!customerList.length}}"
scroll-y
enable-back-to-top
refresher-enabled="{{true}}"
......@@ -68,5 +69,8 @@
</gl-cell> -->
</view>
</scroll-view>
<view wx:else>
<nothing-tips tips="这是一个" bg="{{}}" />
</view>
</view>
// pages/mineDetail/messageBox/messageBox.js
import mineApi from '~/api/mineApi/index'
import { handleCopy } from '~/utils/utils_wx'
Component({
/**
* 组件的属性列表
......@@ -55,11 +56,48 @@ Component({
copyLink(e) {
console.log(e)
let { url } = e.currentTarget.dataset
handleCopy(url)
// console.log(e.current.)
wx.$api.setCopyData(url, () => {
// wx.$spi.showToast('复制成功')
})
// wx.$api.setCopyData(url, () => {
// // wx.$spi.showToast('复制成功')
// })
},
// handleCopy(e) {
// var { idx } = e.currentTarget.dataset
// var currentItem = this.data.orderObj.activityList[idx]
// var qr = wxqrcode.createQrCodeImg(currentItem.activityUrl)
// const base64src = function (base64data) {
// return new Promise((resolve, reject) => {
// const [a, format, bodyData] = /data:image\/(\w+);base64,(.*)/.exec(base64data) || []
// if (!format) reject(new Error('ERROR_BASE64SRC_PARSE'))
// const filePath = `${wx.env.USER_DATA_PATH}/tmp_base64src.${format}`
// const buffer = wx.base64ToArrayBuffer(bodyData)
// wx.getFileSystemManager().writeFile({
// filePath,
// data: buffer,
// encoding: 'binary',
// success() {
// resolve(filePath)
// },
// fail() {
// reject(new Error('ERROR_BASE64SRC_WRITE'))
// }
// })
// })
// }
// base64src(qr).then(res => {
// wx.getImageInfo({
// src: res,
// success(obj) {
// wx.showShareImageMenu({
// path: obj.path
// })
// },
// fail() {
// }
// })
// })
// },
navbarReady(e) {
let { height, statusBarHeight } = e.detail
console.log(e)
......
......@@ -9,7 +9,7 @@ Page({
navStyle: 'background-color: rgba(0,0,0,0);',
loginType: 0,
agree: true,
tabIndx: 1,
tabIndx: 0,
tabList: ['我的客户', '我的门店', '我的员工'],
popupShow: false,
subIndex: -1,
......
import wxqrcode from '~/utils/lib/wxqrcode.js'
/**
* 微信校验通知类工具封装
*/
......@@ -114,6 +115,42 @@ const previewImage = params => {
wx.previewImage(params)
}
export function handleCopy(url) {
// var { idx } = e.currentTarget.dataset
// var currentItem = this.data.orderObj.activityList[idx]
var qr = wxqrcode.createQrCodeImg(url)
const base64src = function (base64data) {
return new Promise((resolve, reject) => {
const [a, format, bodyData] = /data:image\/(\w+);base64,(.*)/.exec(base64data) || []
if (!format) reject(new Error('ERROR_BASE64SRC_PARSE'))
const filePath = `${wx.env.USER_DATA_PATH}/tmp_base64src.${format}`
const buffer = wx.base64ToArrayBuffer(bodyData)
wx.getFileSystemManager().writeFile({
filePath,
data: buffer,
encoding: 'binary',
success() {
resolve(filePath)
},
fail() {
reject(new Error('ERROR_BASE64SRC_WRITE'))
}
})
})
}
base64src(qr).then(res => {
wx.getImageInfo({
src: res,
success(obj) {
wx.showShareImageMenu({
path: obj.path
})
},
fail() {}
})
})
}
const wxApi = {
previewImage,
getSystemInfo,
......
账号登录: 10988866666(超管)xiong110
\ No newline at end of file
账号登录: 10988866666(超管)xiong110
测试环境 bb123456 密码 bb123456
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!