Commit bf162f7c by 杨北旺

优化版本代码提交

1 parent cd738ee6
Showing 68 changed files with 263 additions and 465 deletions
## 正式版appid wx2c28337db96364d2
## 体验版appid wx24ebae5768e74138
#### computed和watch方法使用
先导入并混合
```
// 注意: computed 函数中不能访问 this ,只有 data 对象可供访问
```
```js
// 导入方法
import { behavior as computedBehavior } from '~/utils/lib/miniprogram-computed'
// 混入
behaviors: [computedBehavior],
// 使用
computed: {
test(data) {
return data.bgUrl + data.test
}
},
// 默认已深度监听
watch: {
'test, pages': function (a, b) {
console.log(a)
// this.setData({
// sum: a + b,
// })
}
},
```
...@@ -22,7 +22,6 @@ class ActivityApi { ...@@ -22,7 +22,6 @@ class ActivityApi {
...data ...data
}) })
} }
// 获取被分享者打开分享内容数据 // 获取被分享者打开分享内容数据
getTaskShareDetail(data) { getTaskShareDetail(data) {
return api.post({ return api.post({
......
// app.js // app.js
import * as Sentry from './utils/lib/sentry-miniapp' // import * as Sentry from './utils/lib/sentry-miniapp'
// 有问题 前后顺序不能随意调整 // // 有问题 前后顺序不能随意调整
// accountInfo.miniProgram.envVersion == 'release' && // // accountInfo.miniProgram.envVersion == 'release' &&
Sentry.init({ // Sentry.init({
// dsn: 'http://ebcf31c417cc4ce185782f046e4a87a2@sentry.glsx.com.cn/5' // // dsn: 'http://ebcf31c417cc4ce185782f046e4a87a2@sentry.glsx.com.cn/5'
dsn: 'https://b7bca79e25374f8ca80b3f4063755858@sentry.glsx.com.cn/29' // dsn: 'https://b7bca79e25374f8ca80b3f4063755858@sentry.glsx.com.cn/29'
}) // })
// console.log(test)
import util from './utils/util' import util from './utils/util'
import wxApi from './utils/utils_wx' import wxApi from './utils/utils_wx'
// import '~/router/routerBefore' // import '~/router/routerBefore'
......
...@@ -13,9 +13,7 @@ ...@@ -13,9 +13,7 @@
"pages/authentication/customerService/customerService", "pages/authentication/customerService/customerService",
"pages/checkProduct/checkProduct" "pages/checkProduct/checkProduct"
], ],
"requiredPrivateInfos": [ "requiredPrivateInfos": ["getLocation"],
"getLocation"
],
"lazyCodeLoading": "requiredComponents", "lazyCodeLoading": "requiredComponents",
"window": { "window": {
"backgroundTextStyle": "light", "backgroundTextStyle": "light",
...@@ -51,37 +49,21 @@ ...@@ -51,37 +49,21 @@
"subpackages": [ "subpackages": [
{ {
"root": "packageActivity", "root": "packageActivity",
"pages": [ "pages": ["pages/visitor/visitor", "pages/order/order", "pages/taskDetail/taskDetail", "pages/warReport/warReport", "pages/applyActivity/applyActivity", "pages/applySuccess/applySuccess", "pages/shareTaskDetail/shareTaskDetail"]
"pages/visitor/visitor",
"pages/order/order",
"pages/taskDetail/taskDetail",
"pages/warReport/warReport",
"pages/applyActivity/applyActivity",
"pages/applySuccess/applySuccess",
"pages/shareTaskDetail/shareTaskDetail"
]
}, },
{ {
"root": "packageMine", "root": "packageMine",
"pages": [ "pages": ["pages/editBasicInfo/index", "pages/settingName/index", "pages/withdrawal/index", "pages/withdrawalSuccess/index", "pages/withdrawalNote/index"]
"pages/editBasicInfo/index",
"pages/settingName/index",
"pages/withdrawal/index",
"pages/withdrawalSuccess/index",
"pages/withdrawalNote/index"
]
} }
], ],
"usingComponents": { "usingComponents": {
"navigation-bar": "/components/NavigationBar/NavigationBar", "navigation-bar": "/components/NavigationBar/NavigationBar",
"authorize":"/components/Authorize/Authorize", "authorize": "/components/Authorize/Authorize",
"popup": "/components/Popup/Popup", "popup": "/components/Popup/Popup",
"van-picker": "@vant/weapp/picker/index", "van-picker": "@vant/weapp/picker/index",
"van-popup": "@vant/weapp/popup/index", "van-popup": "@vant/weapp/popup/index",
"install-popup": "/components/installPopup/installPopup",
"van-loading": "@vant/weapp/loading/index", "van-loading": "@vant/weapp/loading/index",
"mp-html": "/components/mp-html", "glsx-image": "/components/image/index"
"share-popup": "/components/sharePopup/sharePopup"
}, },
"resolveAlias": { "resolveAlias": {
"~/*": "/*" "~/*": "/*"
...@@ -93,4 +75,4 @@ ...@@ -93,4 +75,4 @@
} }
}, },
"plugins": {} "plugins": {}
}
\ No newline at end of file \ No newline at end of file
}
@import "/common.wxss"; @import "/common.wxss";
@import "/sprite.wxss"; /* @import "/sprite.wxss"; */
page { page {
background-color: #F7F7F7; background-color: #F7F7F7;
...@@ -11,14 +11,14 @@ page { ...@@ -11,14 +11,14 @@ page {
--margin: 32rpx; --margin: 32rpx;
} }
image { image,glsx-image {
width: 100%; width: 100%;
height: 100%; height: 100%;
vertical-align: top; vertical-align: top;
} }
.icon-mine-arrow { /* .icon-mine-arrow {
width: 16rpx !important; width: 16rpx !important;
height: 28rpx !important; height: 28rpx !important;
transform: translateY(7rpx); transform: translateY(7rpx);
}
\ No newline at end of file \ No newline at end of file
} */
\ No newline at end of file \ No newline at end of file
...@@ -8,51 +8,50 @@ ...@@ -8,51 +8,50 @@
background-color: #fff; background-color: #fff;
} }
.flex-center { /* .flex-center {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: start; justify-content: start;
} } */
.y-center { /* .y-center {
top: 50%; top: 50%;
transform: translateY(-50%); transform: translateY(-50%);
} } */
/*
.x-center { .x-center {
left: 50%; left: 50%;
transform: translateX(-50%); transform: translateX(-50%);
} } */
.box-center { /* .box-center {
position: absolute; position: absolute;
top: 50%; top: 50%;
left: 50%; left: 50%;
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
} } */
.text-hide { /* .text-hide {
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
} } */
.text-two-line { /* .text-two-line {
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
-webkit-line-clamp: 2; -webkit-line-clamp: 2;
display: -webkit-box; display: -webkit-box;
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
} } */
.text-center { /* .text-center {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
} } */
.isFullSucreen { /* .isFullSucreen {
/* padding-bottom: 34px !important; */
padding-bottom: constant(safe-area-inset-bottom) !important; padding-bottom: constant(safe-area-inset-bottom) !important;
padding-bottom: env(safe-area-inset-bottom) !important; padding-bottom: env(safe-area-inset-bottom) !important;
} }
...@@ -60,9 +59,9 @@ ...@@ -60,9 +59,9 @@
.isFullSucreen-bottom { .isFullSucreen-bottom {
bottom: constant(safe-area-inset-bottom) !important; bottom: constant(safe-area-inset-bottom) !important;
bottom: env(safe-area-inset-bottom) !important; bottom: env(safe-area-inset-bottom) !important;
} } */
/*
.default-btn { .default-btn {
width: 686rpx; width: 686rpx;
height: 88rpx; height: 88rpx;
...@@ -73,17 +72,17 @@ ...@@ -73,17 +72,17 @@
align-items: center; align-items: center;
justify-content: center; justify-content: center;
font-size: var(--margin); font-size: var(--margin);
} } */
.list-nothing { /* .list-nothing {
width: 100%; width: 100%;
padding: 8rpx 0 30rpx; padding: 8rpx 0 30rpx;
text-align: center; text-align: center;
font-size: 28rpx; font-size: 28rpx;
color: #C1C2C3; color: #C1C2C3;
} } */
.list-loading{ /* .list-loading{
width: 100%; width: 100%;
padding: 8rpx 0 30rpx; padding: 8rpx 0 30rpx;
text-align: center; text-align: center;
...@@ -93,12 +92,12 @@ ...@@ -93,12 +92,12 @@
.list-loading::after{ .list-loading::after{
content: '正在加载中' content: '正在加载中'
} } */
.list-nothing .icon { /* .list-nothing .icon {
width: 320rpx; width: 320rpx;
height: 320rpx; height: 320rpx;
} } */
.list-not { .list-not {
display: flex; display: flex;
...@@ -113,7 +112,7 @@ ...@@ -113,7 +112,7 @@
align-items: center; align-items: center;
} }
.store-btn-disabled{ /* .store-btn-disabled{
background-image:none; background-image:none;
background: #CCCED1 !important; background: #CCCED1 !important;
color: #fff !important; color: #fff !important;
...@@ -121,7 +120,7 @@ ...@@ -121,7 +120,7 @@
.store-btn-disabled::after{ .store-btn-disabled::after{
border: none; border: none;
} } */
.flex_cc { .flex_cc {
display: flex; display: flex;
...@@ -133,7 +132,7 @@ ...@@ -133,7 +132,7 @@
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
} }
@keyframes show-box { /* @keyframes show-box {
0% { 0% {
opacity: 0; opacity: 0;
transform: scale(2.5); transform: scale(2.5);
...@@ -153,4 +152,4 @@ ...@@ -153,4 +152,4 @@
100% { 100% {
opacity: 1; opacity: 1;
} }
}
\ No newline at end of file \ No newline at end of file
} */
\ No newline at end of file \ No newline at end of file
...@@ -116,7 +116,6 @@ Component({ ...@@ -116,7 +116,6 @@ Component({
}, },
/**授权手机号 */ /**授权手机号 */
getPhoneNumber({ detail }) { getPhoneNumber({ detail }) {
console.log(detail)
this.triggerEvent('getphonenumber', detail) this.triggerEvent('getphonenumber', detail)
} }
}, },
......
...@@ -68,10 +68,10 @@ Component({ ...@@ -68,10 +68,10 @@ Component({
navHeight, navHeight,
statusBarHeight statusBarHeight
}) })
if (currentPages.length == 1 && !thisPage.rootName) // if (currentPages.length == 1 && !thisPage.rootName)
thisPage.setData({ // thisPage.setData({
showHomeBtn: true // showHomeBtn: true
}) // })
} }
}, },
lifetimes: { lifetimes: {
......
...@@ -20,7 +20,6 @@ Component({ ...@@ -20,7 +20,6 @@ Component({
}, 0.2 * 1000) }, 0.2 * 1000)
} else { } else {
let hideTab = wx.$hideTab let hideTab = wx.$hideTab
console.log(hideTab)
this.setData({ this.setData({
showPopup: true, showPopup: true,
close: false, close: false,
......
// components/image/index.js
import { IMG_URL, IMG_VERSION } from '~/utils/constantData'
Component({
externalClasses: ['custom-class', 'class'],
/**
* 组件的属性列表
*/
properties: {
src: {
type: String,
value: '',
observer: function (url, o) {
if (url) {
let isWebp = url.includes('webp')
this.setData({
isWebp,
imagePath: `${IMG_URL}${url}?v=` + IMG_VERSION()
})
}
}
},
mode: {
type: String,
value: 'scaleToFill'
},
webp: {
type: Boolean,
value: false
}
},
/**
* 组件的初始数据
*/
data: {
imagePath: '',
isWebp: false
},
// 组件生命周期
lifetimes: {
// 在组件实例进入页面节点树时执行
// attached: function () {
// let src = this.data.src
// let prefix = IMG_URL
// this.setData({
// imagePath: `${prefix}${src}?v=` + IMG_VERSION()
// })
// },
// 在组件实例被从页面节点树移除时执行
detached: function () {}
},
/**
* 组件的方法列表
*/
methods: {}
})
/* components/image/index.wxss */
\ No newline at end of file \ No newline at end of file
<!-- components/image/index.wxml -->
<image
src="{{imagePath}}"
mode="{{mode}}"
webp="{{webp||isWebp}}"
lazy-load
class="custom-class class" />
...@@ -17,7 +17,12 @@ Component({ ...@@ -17,7 +17,12 @@ Component({
navHeight: thisPage.data.navHeight navHeight: thisPage.data.navHeight
}) })
if (val.showSharePopup) { if (val.showSharePopup) {
wx.$api.showLoading() wx.setPageStyle({
style: {
overflow: 'hidden'
}
})
wx.$api.showLoading('处理中')
val.boxImageHeight = 66 val.boxImageHeight = 66
// 计算弹窗图片区域最大高度 // 计算弹窗图片区域最大高度
wx.$util.getViewInfo('.layout', res => { wx.$util.getViewInfo('.layout', res => {
...@@ -32,6 +37,9 @@ Component({ ...@@ -32,6 +37,9 @@ Component({
}) })
val.postersImageHeight = (e.height / e.width ) * 247 val.postersImageHeight = (e.height / e.width ) * 247
_this.init(val) _this.init(val)
},
fail() {
wx.$api.showToast('生成失败')
} }
}) })
}) })
......
{ {
"component": true, "component": true,
"usingComponents": { "usingComponents": {}
"authorize":"/components/Authorize/Authorize"
}
} }
\ No newline at end of file \ No newline at end of file
...@@ -12,12 +12,12 @@ page { ...@@ -12,12 +12,12 @@ page {
// left: 50%; // left: 50%;
// transform: translateX(-50%); // transform: translateX(-50%);
width: 100%; width: 100%;
padding: 0 10rpx; padding: 0 10rpx;
box-sizing: border-box; box-sizing: border-box;
} }
.wrapper { .wrapper {
width:100%; width: 100%;
background: #FFFFFF; background: #FFFFFF;
box-shadow: 0 12rpx 24rpx 0 rgba(106, 126, 204, 0.12); box-shadow: 0 12rpx 24rpx 0 rgba(106, 126, 204, 0.12);
border-radius: 24rpx; border-radius: 24rpx;
...@@ -65,12 +65,14 @@ page { ...@@ -65,12 +65,14 @@ page {
box-sizing: border-box; box-sizing: border-box;
padding-left: 32rpx; padding-left: 32rpx;
} }
.widget { .widget {
box-sizing: border-box; box-sizing: border-box;
display: flex; display: flex;
padding: 0 10rpx; padding: 0 10rpx;
.element { .element {
width: 25%; width: 25%;
height: 180rpx; height: 180rpx;
margin-right: 4rpx; margin-right: 4rpx;
background: #F7F8FA; background: #F7F8FA;
...@@ -80,6 +82,7 @@ page { ...@@ -80,6 +82,7 @@ page {
align-items: center; align-items: center;
position: relative; position: relative;
border: 2rpx solid #F7F8FA; border: 2rpx solid #F7F8FA;
.icon { .icon {
width: 56rpx; width: 56rpx;
height: 56rpx; height: 56rpx;
...@@ -95,23 +98,24 @@ page { ...@@ -95,23 +98,24 @@ page {
.tip { .tip {
font-size: 18rpx; font-size: 18rpx;
color: #323436; color: #323436;
line-height: 24rpx; line-height: 24rpx;
font-weight: 500; font-weight: 500;
} }
.active_color { .active_color {
color: #4466F0; color: #4466F0;
} }
} }
:last-child{
margin: 0; :last-child {
} margin: 0;
}
.active { .active {
background-image: linear-gradient(145deg, #E6E6FF 0%, #FFFFFF 73%); background-image: linear-gradient(145deg, #E6E6FF 0%, #FFFFFF 73%);
border: 2rpx solid #4466F0; border: 2rpx solid #4466F0;
.triangle-down { .triangle-down {
width: 18rpx; width: 18rpx;
height: 18rpx; height: 18rpx;
...@@ -124,6 +128,7 @@ page { ...@@ -124,6 +128,7 @@ page {
border-left: 2rpx solid #4466F0; border-left: 2rpx solid #4466F0;
transform: rotate(225deg) translateX(-50%); transform: rotate(225deg) translateX(-50%);
} }
// .triangle-down_temp { // .triangle-down_temp {
// width: 0; // width: 0;
// height: 0; // height: 0;
...@@ -202,14 +207,15 @@ page { ...@@ -202,14 +207,15 @@ page {
margin: 64rpx 0 64rpx 40rpx; margin: 64rpx 0 64rpx 40rpx;
} }
.emptyData{ .emptyData {
width: 100%; width: 100%;
text-align: center;
margin-top: 60rpx;
.tip{
margin-top: 16rpx;
font-size: 28rpx;
color: #7A8299;
text-align: center; text-align: center;
} margin-top: 60rpx;
.tip {
margin-top: 16rpx;
font-size: 28rpx;
color: #7A8299;
text-align: center;
}
} }
\ No newline at end of file \ No newline at end of file
...@@ -22,7 +22,6 @@ Page({ ...@@ -22,7 +22,6 @@ Page({
installItem: {}, installItem: {},
activityTypList: index_const.data.activityTypList activityTypList: index_const.data.activityTypList
}, },
/** /**
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
...@@ -36,7 +35,7 @@ Page({ ...@@ -36,7 +35,7 @@ Page({
}).then(res => { }).then(res => {
res.orderList && res.orderList.forEach(val => { res.orderList && res.orderList.forEach(val => {
// afterSaleStatus售后状态 6已退款 // afterSaleStatus售后状态 6已退款
val.time = val.createdDate ? new Date(val.createdDate).format('yyyy-MM-dd hh:mm:ss') : '' val.time = val.createdDate ? new Date(val.createdDate).format('yyyy.MM.dd hh:mm') : ''
val.orderStatus = val.afterSaleStatus == 6 ? val.afterSaleStatus : val.orderStatus val.orderStatus = val.afterSaleStatus == 6 ? val.afterSaleStatus : val.orderStatus
val.orderPrice = centsToyuan(val.orderPrice) val.orderPrice = centsToyuan(val.orderPrice)
}) })
......
{ {
"usingComponents": {}, "usingComponents": {
"install-popup":"../../../components/installPopup/installPopup"
},
"navigationBarTitleText": "我的订单" "navigationBarTitleText": "我的订单"
} }
\ No newline at end of file \ No newline at end of file
...@@ -171,7 +171,7 @@ ...@@ -171,7 +171,7 @@
box-shadow: 0 10rpx 20rpx 0 rgba(129,146,214,0.24), inset 0 -2rpx 6rpx 0 rgba(255,255,255,0.40); box-shadow: 0 10rpx 20rpx 0 rgba(129,146,214,0.24), inset 0 -2rpx 6rpx 0 rgba(255,255,255,0.40);
} }
} }
.no-data{ .no-data{
display: flex; display: flex;
flex-flow: column; flex-flow: column;
......
{ {
"usingComponents": {} "usingComponents": {
"mp-html":"../../../components/mp-html/index"
}
} }
\ No newline at end of file \ No newline at end of file
...@@ -52,7 +52,7 @@ Page({ ...@@ -52,7 +52,7 @@ Page({
// 获取任务详情 // 获取任务详情
getActiveTaskDetail(missionId) { getActiveTaskDetail(missionId) {
ActivityApi.getActiveTaskDetail({missionId: missionId}).then(res => { ActivityApi.getActiveTaskDetail({missionId: Number(missionId)}).then(res => {
res.imgUrlList = [] res.imgUrlList = []
// missonType 任务类型1注册 2分享 3浏览 4访客 5下单 // missonType 任务类型1注册 2分享 3浏览 4访客 5下单
// if (res.missonType != 2) { // 非分享任务 显示活动专属链接 // if (res.missonType != 2) { // 非分享任务 显示活动专属链接
...@@ -60,12 +60,10 @@ Page({ ...@@ -60,12 +60,10 @@ Page({
// } // }
let typeArr = [] let typeArr = []
res.platformMerchantMissionMaterialResponseList && res.platformMerchantMissionMaterialResponseList.forEach(val => { res.platformMerchantMissionMaterialResponseList && res.platformMerchantMissionMaterialResponseList.forEach(val => {
console.log(val)
typeArr.push(val.materialType) typeArr.push(val.materialType)
// materialType 素材类型1文案 2图片 3视频 4专属链接 // materialType 素材类型1文案 2图片 3视频 4专属链接
if (val.materialType == 1) { // 文案 if (val.materialType == 1) { // 文案
res.textContent = val.materialContent res.textContent = val.materialContent
console.log(showEmoji(val.materialContent))
res.filterTextContent = `<view>${showEmoji(val.materialContent)}</view>` res.filterTextContent = `<view>${showEmoji(val.materialContent)}</view>`
} }
if (val.materialType == 2 || val.materialType == 3) { // 图片视频 if (val.materialType == 2 || val.materialType == 3) { // 图片视频
...@@ -136,9 +134,9 @@ Page({ ...@@ -136,9 +134,9 @@ Page({
Promise.all([this.copyText(), this.saveWith(), this.reportShareData()]).then(() => { Promise.all([this.copyText(), this.saveWith(), this.reportShareData()]).then(() => {
this.setData({ this.setData({
isloading: false isloading: false
}) })
wx.showToast({ wx.showToast({
title: materialTypeArr.indexOf('2') > -1 || materialTypeArr.indexOf('3') > -1 ? '图片及视频已保存到手机相册,文案已黏贴到剪切板' : '文案已黏贴到剪切板', title: materialTypeArr.indexOf('2') == -1 || materialTypeArr.indexOf('3') == -1 ? '图片及视频已保存到手机相册,文案已黏贴到剪切板' : '文案已黏贴到剪切板',
icon: 'none' icon: 'none'
}) })
}).catch((err) => { }).catch((err) => {
...@@ -164,8 +162,8 @@ Page({ ...@@ -164,8 +162,8 @@ Page({
}) })
}) })
} }
}, },
// 复制文案及专属链接 // 复制文案及专属链接
copyText() { copyText() {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
...@@ -204,7 +202,7 @@ Page({ ...@@ -204,7 +202,7 @@ Page({
const USERINFO = wx.$storage.get('userInfo') const USERINFO = wx.$storage.get('userInfo')
let { detailInfo } = this.data let { detailInfo } = this.data
// 非分享任务无须上报埋点 // 非分享任务无须上报埋点
if (detailInfo.materialType != 2) return resolve() if (detailInfo.missonType != 2) return resolve()
let data = { let data = {
action_type: 4, // 事件类型固定为4-分享 action_type: 4, // 事件类型固定为4-分享
item_type: 3, // 商品类型,固定为3-众筹活动 item_type: 3, // 商品类型,固定为3-众筹活动
...@@ -228,8 +226,8 @@ Page({ ...@@ -228,8 +226,8 @@ Page({
} }
}) })
}) })
}, },
// 一键保存 // 一键保存
saveWith() { saveWith() {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
......
{ {
"usingComponents": {}, "usingComponents": {
"mp-html":"../../../components/mp-html/index"
},
"navigationBarTitleText": "任务详情" "navigationBarTitleText": "任务详情"
} }
\ No newline at end of file \ No newline at end of file
...@@ -76,4 +76,4 @@ ...@@ -76,4 +76,4 @@
<view class="canvas-box"> <view class="canvas-box">
<canvas style="width: 352rpx;height: 352rpx;" canvas-id="mycanvas" /> <canvas style="width: 352rpx;height: 352rpx;" canvas-id="mycanvas" />
</view> </view>
</view> </view>
\ No newline at end of file \ No newline at end of file
...@@ -5,21 +5,21 @@ Page({ ...@@ -5,21 +5,21 @@ Page({
list_fill: [ list_fill: [
{ {
label: '姓名', label: '姓名',
value: '百晓生', value: '',
}, },
{ {
label: '部门', label: '部门',
value: '市场部', value: '',
}, },
], ],
list_disable: [ list_disable: [
{ {
label: '门店', label: '门店',
value: '广联数科4s店', value: '',
}, },
{ {
label: '电话', label: '电话',
value: '18269555555', value: '',
}, },
], ],
showModal: false, showModal: false,
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
<view class="label">{{item.label}}</view> <view class="label">{{item.label}}</view>
<view class="value flex_sc"> <view class="value flex_sc">
<text>{{strSubstr.getString(item.value,12)}}</text> <text>{{strSubstr.getString(item.value,12)}}</text>
<image class="icon" src="{{IMGURL}}right_arrow_icon.png" /> <glsx-image class="icon" src="right_arrow_icon.png" />
</view> </view>
</view> </view>
</block> </block>
......
import { IMG_URL } from '~/utils/constantData'
import MineApi from '~/api/mineApi/index' import MineApi from '~/api/mineApi/index'
import Dialog from '@vant/weapp/dialog/dialog'; import Dialog from '@vant/weapp/dialog/dialog';
Page({ Page({
data: { data: {
IMGURL: IMG_URL,
withdrawalScore: 0, withdrawalScore: 0,
sumbitScore: '' sumbitScore: ''
}, },
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
<view class="label">提现人</view> <view class="label">提现人</view>
<view class="tip flex_sc"> <view class="tip flex_sc">
<image wx:if="{{user.headImgUrl}}" mode="aspectFill" class="icon" src="{{user.headImgUrl}}" /> <image wx:if="{{user.headImgUrl}}" mode="aspectFill" class="icon" src="{{user.headImgUrl}}" />
<image wx:else mode="aspectFill" class="icon" src="{{IMGURL}}default_avatar.png" /> <glsx-image wx:else mode="aspectFill" class="icon" src="default_avatar.png" />
<text>{{strSubstr.getString(user.nickName)}}</text> <text>{{strSubstr.getString(user.nickName)}}</text>
</view> </view>
</view> </view>
......
import { IMG_URL } from '~/utils/constantData'
import MineApi from '~/api/mineApi/index' import MineApi from '~/api/mineApi/index'
Page({ Page({
data: { data: {
IMGURL:IMG_URL,
STATUSICON:['wait','comlpete','fail'], STATUSICON:['wait','comlpete','fail'],
listData:[], listData:[],
isNoResult:false isNoResult:false
......
...@@ -7,11 +7,11 @@ ...@@ -7,11 +7,11 @@
<view wx:if="{{!isNoResult}}" class="list"> <view wx:if="{{!isNoResult}}" class="list">
<block wx:for="{{listData}}" wx:key="index"> <block wx:for="{{listData}}" wx:key="index">
<view class="element"> <view class="element">
<image webp mode="widthFix" class="bgicon" src="{{IMGURL}}status_{{STATUSICON[item.iconType]}}.png" /> <glsx-image webp mode="widthFix" class="bgicon" src="status_{{STATUSICON[item.iconType]}}.png" />
<view class="posi_wrap"> <view class="posi_wrap">
<view class="avatar_info flex_sc"> <view class="avatar_info flex_sc">
<image wx:if="{{item.wechatAvatarUrl}}" mode="aspectFill" class="icon" src="{{item.wechatAvatarUrl}}" /> <image wx:if="{{item.wechatAvatarUrl}}" mode="aspectFill" class="icon" src="{{item.wechatAvatarUrl}}" />
<image wx:else mode="aspectFill" class="icon" src="{{IMGURL}}default_avatar.png" /> <glsx-image wx:else mode="aspectFill" class="icon" src="default_avatar.png" />
<view class="nameText">{{item.wechatNickName || ''}}</view> <view class="nameText">{{item.wechatNickName || ''}}</view>
</view> </view>
<view class="countText">-{{item.withdrawalScore}}</view> <view class="countText">-{{item.withdrawalScore}}</view>
......
...@@ -85,7 +85,6 @@ Page({ ...@@ -85,7 +85,6 @@ Page({
wx.$api.showToast('请选择账号') wx.$api.showToast('请选择账号')
return return
} }
console.log(sessionId,id,'sssss')
// wx.$api.showLoading() // wx.$api.showLoading()
selectAccountLogin({ selectAccountLogin({
id, id,
......
{ {
"usingComponents": { "usingComponents": {},
"navigation-bar": "/components/NavigationBar/NavigationBar"
},
"navigationBarTitleText": "选择账号" "navigationBarTitleText": "选择账号"
} }
\ No newline at end of file \ No newline at end of file
...@@ -31,7 +31,6 @@ const selectAccountLogin = ({ ...@@ -31,7 +31,6 @@ const selectAccountLogin = ({
message message
}) => { }) => {
if (code == '0') { if (code == '0') {
console.log('选择账号登录')
setLoginInfo(data.loginUserInfoList[0], data.sessionId) setLoginInfo(data.loginUserInfoList[0], data.sessionId)
} else wx.$api.showToast(message || '系统异常') } else wx.$api.showToast(message || '系统异常')
}) })
...@@ -49,7 +48,6 @@ const loginSuccess = () => { ...@@ -49,7 +48,6 @@ const loginSuccess = () => {
targetPath targetPath
} }
} = wx.$router.getPageInstance() } = wx.$router.getPageInstance()
console.log(targetPath)
if (targetPath) { if (targetPath) {
const { const {
......
...@@ -77,7 +77,6 @@ Page({ ...@@ -77,7 +77,6 @@ Page({
let path = '/pages/tab/index/index', let path = '/pages/tab/index/index',
obj = {} obj = {}
if (targetPath) obj.targetPath = targetPath if (targetPath) obj.targetPath = targetPath
console.log(obj,'objobj')
if (sessionId) { if (sessionId) {
USERAPI.checkSession().then(({ USERAPI.checkSession().then(({
code code
...@@ -87,7 +86,6 @@ Page({ ...@@ -87,7 +86,6 @@ Page({
path = setRouteData(targetPath).url path = setRouteData(targetPath).url
obj = setRouteData(targetPath).obj obj = setRouteData(targetPath).obj
} }
console.log(path,'pathpath')
wx.$router.reLaunch(path, obj) wx.$router.reLaunch(path, obj)
} }
else wx.$router.reLaunch('/pages/authentication/login/login', obj) else wx.$router.reLaunch('/pages/authentication/login/login', obj)
...@@ -133,7 +131,6 @@ Page({ ...@@ -133,7 +131,6 @@ Page({
// 判断是否是从其他小程序跳转过来 // 判断是否是从其他小程序跳转过来
drectLogin(){ drectLogin(){
const params = wx.getEnterOptionsSync() const params = wx.getEnterOptionsSync()
console.log(params);
if(params.referrerInfo.extraData&&params.referrerInfo.extraData.inType=='direct'){ if(params.referrerInfo.extraData&&params.referrerInfo.extraData.inType=='direct'){
const {phone,smscode} = params.referrerInfo.extraData const {phone,smscode} = params.referrerInfo.extraData
this.freeHandleLogin(phone,smscode) this.freeHandleLogin(phone,smscode)
......
...@@ -59,7 +59,6 @@ Page({ ...@@ -59,7 +59,6 @@ Page({
} catch ({ } catch ({
errMsg errMsg
}) { }) {
console.log(errMsg)
this.reLogin(errMsg) this.reLogin(errMsg)
} }
}, },
...@@ -133,7 +132,6 @@ Page({ ...@@ -133,7 +132,6 @@ Page({
sessionId sessionId
}) { }) {
/**多个账号 */ /**多个账号 */
console.log(loginUserInfoList,'loginUserInfoList')
if (loginUserInfoList.length > 1) wx.$router.reLaunch('/pages/authentication/accountItems/accountItems', { if (loginUserInfoList.length > 1) wx.$router.reLaunch('/pages/authentication/accountItems/accountItems', {
sessionId, sessionId,
...@@ -156,7 +154,6 @@ Page({ ...@@ -156,7 +154,6 @@ Page({
input(e){ input(e){
const {value} = e.detail const {value} = e.detail
const {name} = e.target.dataset const {name} = e.target.dataset
console.log(e,this.data.formData,'88')
this.setData({ this.setData({
[`formData.${name}`] : value [`formData.${name}`] : value
}) })
......
...@@ -2,13 +2,13 @@ ...@@ -2,13 +2,13 @@
<navigation-bar bindnavbarReady="navbarReady" navStyle="{{navStyle}}" page-title="门店助手"> <navigation-bar bindnavbarReady="navbarReady" navStyle="{{navStyle}}" page-title="门店助手">
<text class="bar-text">门店助手</text> <text class="bar-text">门店助手</text>
</navigation-bar> </navigation-bar>
<image webp class="login-bg" src="{{IMGURL}}login.png"></image> <glsx-image class="login-bg" src="login.png"></glsx-image>
<view class="container" style="padding-top: {{headerHeight}}px;"> <view class="container" style="padding-top: {{headerHeight}}px;">
<view class="salutation-wrap" wx:if="{{loginMethod==0}}"> <view class="salutation-wrap" wx:if="{{loginMethod==0}}">
<view class="salutation">您好</view> <view class="salutation">您好</view>
<view class="welcome">欢迎登录门店助手</view> <view class="welcome">欢迎登录门店助手</view>
<view class="logo"> <view class="logo">
<image webp class="logo-img" src="{{IMGURL}}login-logo.png"></image> <glsx-image webp class="logo-img" src="login-logo.png"></glsx-image>
</view> </view>
</view> </view>
<view class="footer"> <view class="footer">
......
...@@ -120,7 +120,6 @@ Page({ ...@@ -120,7 +120,6 @@ Page({
} }
wx.showLoading() wx.showLoading()
USERAPI.register(regParmas).then((res) => { USERAPI.register(regParmas).then((res) => {
console.log(res,'errId')
if (res.code == '0'){ if (res.code == '0'){
this.toLogin(detail) this.toLogin(detail)
}else if(res.errId == '200122'){ }else if(res.errId == '200122'){
...@@ -166,7 +165,6 @@ Page({ ...@@ -166,7 +165,6 @@ Page({
sessionId sessionId
}) { }) {
/**多个账号 */ /**多个账号 */
console.log(loginUserInfoList,'loginUserInfoList')
if (loginUserInfoList.length > 1) wx.$router.reLaunch('/pages/authentication/accountItems/accountItems', { if (loginUserInfoList.length > 1) wx.$router.reLaunch('/pages/authentication/accountItems/accountItems', {
sessionId, sessionId,
...@@ -185,7 +183,6 @@ Page({ ...@@ -185,7 +183,6 @@ Page({
wx.$storage.rm('userInfo') wx.$storage.rm('userInfo')
wx.$storage.rm('sessionId') wx.$storage.rm('sessionId')
let data = JSON.parse(decodeURIComponent(options.data)) let data = JSON.parse(decodeURIComponent(options.data))
console.log(data)
let {staffName, fileUrl, merchantId, type} = data let {staffName, fileUrl, merchantId, type} = data
// staffName = 'fishing' // staffName = 'fishing'
let linkParams = { let linkParams = {
......
...@@ -2,13 +2,13 @@ ...@@ -2,13 +2,13 @@
<navigation-bar bindnavbarReady="navbarReady" navStyle="{{navStyle}}" page-title="门店助手"> <navigation-bar bindnavbarReady="navbarReady" navStyle="{{navStyle}}" page-title="门店助手">
<text class="bar-text">门店助手</text> <text class="bar-text">门店助手</text>
</navigation-bar> </navigation-bar>
<image webp class="login-bg" src="{{IMGURL}}login.png"></image> <glsx-image webp class="login-bg" src="login.png"></glsx-image>
<view class="container" style="padding-top: {{headerHeight}}px;"> <view class="container" style="padding-top: {{headerHeight}}px;">
<view class="salutation-wrap"> <view class="salutation-wrap">
<view class="salutation">您好</view> <view class="salutation">您好</view>
<view class="welcome">欢迎注册门店助手</view> <view class="welcome">欢迎注册门店助手</view>
<view class="logo"> <view class="logo">
<image webp class="logo-img" src="{{IMGURL}}login-logo.png"></image> <glsx-image webp class="logo-img" src="login-logo.png"></glsx-image>
</view> </view>
</view> </view>
<view class="footer" style="background-image: url('{{IMGURL}}register.png');"> <view class="footer" style="background-image: url('{{IMGURL}}register.png');">
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<text class="label">部门</text> <text class="label">部门</text>
<text wx:if="{{department.id}}" class="depart-name">{{department.name}}</text> <text wx:if="{{department.id}}" class="depart-name">{{department.name}}</text>
<text wx:else style="color:#999999;" class="depart-name">请选择部门</text> <text wx:else style="color:#999999;" class="depart-name">请选择部门</text>
<image class="right-arrow" src="{{IMGURL}}right_arrow_grey_icon.png"></image> <glsx-image class="right-arrow" src="right_arrow_grey_icon.png"></glsx-image>
</view> </view>
</view> </view>
<view class="register"> <view class="register">
......
...@@ -26,7 +26,6 @@ Page({ ...@@ -26,7 +26,6 @@ Page({
}else{ }else{
this.goLogin() this.goLogin()
} }
console.log(this.data.interval,888)
},1000) },1000)
}, },
goLogin(){ goLogin(){
......
<!--pages/login/registerSuccess/registerSuccess.wxml--> <!--pages/login/registerSuccess/registerSuccess.wxml-->
<view class="container"> <view class="container">
<image style="width: 400rpx;height: 400rpx;" src="{{IMGURL}}register_success.png"></image> <glsx-image style="width: 400rpx;height: 400rpx;" src="register_success.png"></glsx-image>
<view class="title">{{type==1? '注册成功' : '已注册'}}</view> <view class="title">{{type==1? '注册成功' : '已注册'}}</view>
<view class="content">{{type==1? '您的信息已注册成功,请前往登录':'您的信息已注册过账号,可直接前往登录'}}</view> <view class="content">{{type==1? '您的信息已注册成功,请前往登录':'您的信息已注册过账号,可直接前往登录'}}</view>
<view class="back" bindtap="goLogin">返回登录</view> <view class="back" bindtap="goLogin">返回登录</view>
......
...@@ -105,7 +105,6 @@ Page({ ...@@ -105,7 +105,6 @@ Page({
this.setData({ this.setData({
imgH: (imgH/imgW)*450 imgH: (imgH/imgW)*450
}) })
console.log( actNum,activeNavIdx,senceData)
// let textList = [ // let textList = [
// { // {
// x: imgW/4+22, // x: imgW/4+22,
...@@ -285,7 +284,6 @@ Page({ ...@@ -285,7 +284,6 @@ Page({
* 生命周期函数--监听页面加载 * 生命周期函数--监听页面加载
*/ */
onLoad(options) { onLoad(options) {
console.log(options)
wx.nextTick(()=>{ wx.nextTick(()=>{
let { actNum, activeNavIdx, scene } = this.options let { actNum, activeNavIdx, scene } = this.options
// let name = wx.$storage.get('staff_name') || (wx.$storage.get('userInfo') ? wx.$storage.get('userInfo').name : '') // let name = wx.$storage.get('staff_name') || (wx.$storage.get('userInfo') ? wx.$storage.get('userInfo').name : '')
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
<view class="prod-card"> <view class="prod-card">
<view class="card-img"> <view class="card-img">
<!-- <text class="img-desc">轻改类</text> --> <!-- <text class="img-desc">轻改类</text> -->
<image src="{{IMGURL}}prod/{{senceData[actNum].productList[activeNavIdx].img}}.png?v={{img_version}}"></image> <glsx-image src="prod/{{senceData[actNum].productList[activeNavIdx].img}}.png"></glsx-image>
</view> </view>
<view class="prod-info"> <view class="prod-info">
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
</view> </view>
<view class="share-btn" wx:if="{{!isShare}}" bindtap="toSharePage"> <view class="share-btn" wx:if="{{!isShare}}" bindtap="toSharePage">
<image class="icon" src="{{IMGURL}}share.png"></image> <glsx-image class="icon" src="share.png"></glsx-image>
<text>去分享</text> <text>去分享</text>
</view> </view>
</view> </view>
...@@ -42,12 +42,12 @@ ...@@ -42,12 +42,12 @@
<view class="project-img"> <view class="project-img">
<block wx:for="{{tab}}" wx:key="index"> <block wx:for="{{tab}}" wx:key="index">
<view id="to-{{index}}" class="img-item img-item{{actNum+1}}{{index+1}}"> <view id="to-{{index}}" class="img-item img-item{{actNum+1}}{{index+1}}">
<image lazy-load="{{true}}" webp class="img-item{{actNum+1}}{{index+1}}" src="{{IMGURL}}scene/scene{{actNum+1}}{{index+1}}.png?v={{img_version}}" /> <glsx-image webp class="img-item{{actNum+1}}{{index+1}}" src="scene/scene{{actNum+1}}{{index+1}}.png" />
<view class="video-bg" wx:if="{{index==5 && senceData[actNum].videoList.length}}"> <view class="video-bg" wx:if="{{index==5 && senceData[actNum].videoList.length}}">
<view class="video-list"> <view class="video-list">
<block wx:for="{{senceData[actNum].videoList}}" wx:key="i"> <block wx:for="{{senceData[actNum].videoList}}" wx:key="i">
<view class="video-item"> <view class="video-item">
<image class="download" mode="widthFix" src="{{IMGURL}}download.png" bindtap="downVideo" data-url="{{videoBaseUrl}}video/{{item.videoUrl}}.mp4?v={{img_version}}"></image> <glsx-image class="download" mode="widthFix" src="download.png" bindtap="downVideo" data-url="{{videoBaseUrl}}video/{{item.videoUrl}}.mp4"></glsx-image>
<video poster="{{videoBaseUrl}}video/{{item.posterUrl}}.png?v={{img_version}}" title="{{item.name}}" src="{{videoBaseUrl}}video/{{item.videoUrl}}.mp4?v={{img_version}}"></video> <video poster="{{videoBaseUrl}}video/{{item.posterUrl}}.png?v={{img_version}}" title="{{item.name}}" src="{{videoBaseUrl}}video/{{item.videoUrl}}.mp4?v={{img_version}}"></video>
<view class="video-text">{{item.name}}</view> <view class="video-text">{{item.name}}</view>
</view> </view>
......
// pages/tab/index/components/shareModel/shareModel.js
import { IMG_URL } from "~/utils/constantData.js";
const IMGURL = IMG_URL
import Draw from "~/utils/Draw.js";
import {imgUrlMixin} from '~/mixins/index'
Component({
behaviors: [imgUrlMixin],
/**
* 组件的属性列表
*/
properties: {
actNum: Number, //场景选择
isShow: Boolean,
// //分享方法
// onShareAppMessage:Function,
// onShareTimeline:Function,
},
/**
* 组件的初始数据
*/
data: {
btnList: [
{
src: `${IMGURL}wechat.png`,
name: "微信转发",
},
// {
// src: `${IMGURL}index/moments.png`,
// name: "朋友圈分享",
// },
{
src: `${IMGURL}down.png`,
name: "下载为海报",
},
],
// 4种场景下图片所有的高 (单位 rpx)
imgHeightArr: [
[1110, 1290, 596, 744, 490, 1532],
[2168, 1290, 596, 830, 490, 752],
[1110, 1290, 596, 984, 490],
[678, 1266, 1398, 830, 490, 1666],
],
posterUrl: "", //海报url
// imgList
// imgList:[
// {
// src:`${IMGURL}index/scene${actNum}1.png`,
// },
// ]
},
observers: {
actNum: function (actNum) {
let imgList = [
`${IMGURL}index/scene${actNum + 1}1.png`,
`${IMGURL}index/scene${actNum + 1}2.png`,
`${IMGURL}index/scene${actNum + 1}3.png`,
`${IMGURL}index/scene${actNum + 1}4.png`,
`${IMGURL}index/scene${actNum + 1}5.png`,
];
if (actNum != 2) {
imgList.push(`${IMGURL}index/scene${actNum + 1}6.png`);
}
this.setData({
imgList,
});
},
},
/**
* 组件的方法列表
*/
methods: {
// 分享按钮
handleClick(e) {
let { index } = e.currentTarget.dataset;
switch (index) {
case 0:
this.wechatFn();
break;
case 1:
this.download();
break;
}
},
// 微信转发
wechatFn() {
// this.data.onShareAppMessage()
this.modelClose();
},
// 下载海报
async download() {
let { actNum, imgHeightArr } = this.data;
//所有的长度
let imgAllHeight = imgHeightArr[actNum].reduce((total, current) => {
return total + current;
});
// 缺少视频的长度(前4张)+二维码的长度 (单位rpx)
let erCodeHeight =
imgHeightArr[actNum].slice(0, 4).reduce((total, current) => {
return total + current;
}) +
98 * 2;
// console.log("imgAllHeight: ", imgAllHeight);
let drawFun = new Draw({
width: 750,
height: imgAllHeight,
});
let imgList = [
{
x: 0,
y: 0,
width: 750,
height: imgAllHeight,
url: `${IMGURL}scene/longpic${
actNum + 1
}.png`,
},
{
x: 245*2,
y: erCodeHeight-11,
width: 120*2,
height: 120*2,
url: `https://img02.glsx.com.cn/weapp/resource/saas/business-assistant/index/discovery_prod1.png`, //二维码
},
];
let posterUrl = await drawFun.begin({
imageList: imgList,
});
this.setData({
posterUrl: posterUrl.path,
});
console.log('posterUrl.path',posterUrl.path,wx.pro)
if(this.data.posterUrl){
wx.downloadFile({
url: this.data.posterUrl, //仅为示例,并非真实的资源
success (res) {
console.log('res: ', res);
}
})
}
this.modelClose();
},
//模态框关闭
modelClose() {
this.triggerEvent("modelclose", false);
},
// 图片加载事件
onloadFn(event) {
// console.log('event.detail',event.detail)
this.setData({
imgHeight: (event.detail.height * 0.2).toFixed(0),
});
},
},
});
/* pages/tab/index/components/shareModel/shareModel.wxss */
.share-wrap {
position: fixed;
top: 0;
left: 0;
bottom: 0;
right: 0;
background: rgba(0, 0, 0, 0.5);
z-index: 1;
.img-wrap {
position: absolute;
top: 20%;
left: 50%;
transform: translateX(-50%);
width: 225px;
height: 311px;
// background-color: red;
overflow: auto;
.img {
width: 100%;
// height: auto;
height: 60%;
background-color: #fff;
}
}
.btns {
position: absolute;
left: 0;
bottom: 0;
width: 100%;
height: 154px;
background: #ffffff;
border-radius: 8px 8px 0 0;
.top {
display: flex;
justify-content: space-around;
.btn {
padding-top: 16px;
}
.img {
display: block;
margin: 0 auto 8px;
width: 40px;
height: 40px;
}
.name {
font-size: 12px;
color: #323436;
text-align: center;
line-height: 32rpx;
}
.btn-wechat{
width: auto;
margin: 0;
padding: 0;
background-color: #fff;
&::after{
border:none;
}
}
}
.btom {
margin: 18px auto 0;
width: 343px;
height: 44px;
line-height: 44px;
border: 1px solid #eeeeee;
border-radius: 4px;
text-align: center;
}
}
}
<!-- pages/tab/index/components/shareModel/shareModel.wxml -->
<view class="share-wrap" wx:if="{{isShow}}">
<view class="img-wrap">
<image class="img" style="height:{{imgHeight}}px" src="{{IMGURL}}scene/longpic{{actNum+1}}.png" bindload="onloadFn" />
<!-- <block wx:for="{{imgList}}" wx:key="*this">
<image class="img" src="{{item}}"/>
</block> -->
</view>
<button></button>
<view class="btns">
<view class="top">
<view class="btn" wx:for="{{btnList}}" wx:key="name" bindtap="handleClick" data-index="{{index}}">
<block wx:if="{{index == 0}}">
<button open-type="share" class="btn-wechat">
<image class="img" src="{{item.src}}" />
<view class="name">{{item.name}}</view>
</button>
</block>
<block wx:else>
<image class="img" src="{{item.src}}" />
<view class="name">{{item.name}}</view>
</block>
</view>
</view>
<view class="btom" bindtap="modelClose">取消</view>
</view>
</view>
\ No newline at end of file \ No newline at end of file
...@@ -128,7 +128,6 @@ Page({ ...@@ -128,7 +128,6 @@ Page({
extInfo: { url: "https://work.weixin.qq.com/kfid/kfcf7b721472201345e" }, extInfo: { url: "https://work.weixin.qq.com/kfid/kfcf7b721472201345e" },
corpId: "ww047bdc0f1e76cc13", corpId: "ww047bdc0f1e76cc13",
complete: (r) => { complete: (r) => {
console.log(r);
}, },
}); });
}, },
...@@ -175,7 +174,6 @@ Page({ ...@@ -175,7 +174,6 @@ Page({
let sales = e ? +e.detail.value.sales : this.data.formData.sales; let sales = e ? +e.detail.value.sales : this.data.formData.sales;
let flow = e ? +e.detail.value.flow : this.data.formData.flow; let flow = e ? +e.detail.value.flow : this.data.formData.flow;
const reg = /^[1-9]\d*$/; const reg = /^[1-9]\d*$/;
console.log('flow', sales, flow)
if (!reg.test(sales)) { if (!reg.test(sales)) {
wx.showToast({ wx.showToast({
title: "门店月平均新车销量应为正整数", title: "门店月平均新车销量应为正整数",
......
...@@ -171,5 +171,9 @@ page{ ...@@ -171,5 +171,9 @@ page{
color: #7A8299; color: #7A8299;
text-align: center; text-align: center;
} }
.icon{
width: 400rpx;
height: 400rpx;
}
} }
<view class="container"> <view class="container">
<image webp wx:if="{{sceneCodeList.length>0 && showPage}}" style="height: {{headerHeight+45}}px;" src="{{IMGURL}}discovery_center_bg.png" class="bg-img"></image> <glsx-image webp wx:if="{{sceneCodeList.length>0 && showPage}}" style="height: {{headerHeight+45}}px;" src="discovery_center_bg.png" class="bg-img"></glsx-image>
<navigation-bar bindnavbarReady="navbarReady" navStyle="{{navStyle}}" page-title="发现"> <navigation-bar bindnavbarReady="navbarReady" navStyle="{{navStyle}}" page-title="发现">
<text class="bar-text">发现</text> <text class="bar-text">发现</text>
</navigation-bar> </navigation-bar>
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<swiper bindchange="changeSwiper" current="{{currentId}}" class="scene-wrap" previousMargin="40rpx" nextMargin="40rpx"> <swiper bindchange="changeSwiper" current="{{currentId}}" class="scene-wrap" previousMargin="40rpx" nextMargin="40rpx">
<block wx:for="{{senceData}}" wx:key="index"> <block wx:for="{{senceData}}" wx:key="index">
<swiper-item item-id="{{index}}" wx:if="{{item.show}}"> <swiper-item item-id="{{index}}" wx:if="{{item.show}}">
<image mode="widthFix" webp class="scene-img" src="{{IMGURL}}{{item.img}}?v={{img_version}}"></image> <glsx-image mode="widthFix" webp class="scene-img" src="{{item.img}}"></glsx-image>
</swiper-item> </swiper-item>
</block> </block>
</swiper> </swiper>
...@@ -19,11 +19,14 @@ ...@@ -19,11 +19,14 @@
</view> </view>
<!-- 申请活动 --> <!-- 申请活动 -->
<image class="applyAct" src="{{IMGURL}}application_activity.png" bindtap="applyActivity" /> <!-- <view class="applyAct"> -->
<glsx-image custom-class="applyAct" src="application_activity.png" bindtap="applyActivity" />
<!-- </view> -->
<!-- 测算按钮 --> <!-- 测算按钮 -->
<view class="calculate" bindtap="showCalculate"> <view class="calculate" bindtap="showCalculate">
<image class="icon-calculate" webp src="{{IMGURL}}calc.png"></image> <glsx-image custom-class="icon-calculate" webp src="calc.png"></glsx-image>
</view> </view>
<!-- 测算弹窗 --> <!-- 测算弹窗 -->
<view class="dialog-wrapper" bindtap="clickDialog" hidden="{{!visible}}"> <view class="dialog-wrapper" bindtap="clickDialog" hidden="{{!visible}}">
...@@ -56,7 +59,7 @@ ...@@ -56,7 +59,7 @@
</block> </block>
<block wx:if="{{sceneCodeList.length<=0 && showPage}}"> <block wx:if="{{sceneCodeList.length<=0 && showPage}}">
<view class="emptyData" style="margin-top: {{headerHeight+32}}px;"> <view class="emptyData" style="margin-top: {{headerHeight+32}}px;">
<image webp src="{{IMGURL}}toLink.png" style="height: 400rpx;width: 400rpx;"></image> <glsx-image webp src="toLink.png" custom-class="icon"></glsx-image>
<view class="tip"> <view class="tip">
<view>您的门店尚未开通业务场景,</view> <view>您的门店尚未开通业务场景,</view>
<view>请联系在线客服进行咨询,谢谢。</view> <view>请联系在线客服进行咨询,谢谢。</view>
...@@ -66,6 +69,6 @@ ...@@ -66,6 +69,6 @@
</view> </view>
<!-- 在线客服 --> <!-- 在线客服 -->
<image mode="aspectFit" wx:if="{{showPage}}" class="chat" src="{{IMGURL}}kefu.png" bindtap="goConsult" /> <glsx-image mode="aspectFit" wx:if="{{showPage}}" custom-class="chat" src="kefu.png" bindtap="goConsult" />
...@@ -186,7 +186,6 @@ Component({ ...@@ -186,7 +186,6 @@ Component({
goToDetail(e) { goToDetail(e) {
let { item } = e.currentTarget.dataset let { item } = e.currentTarget.dataset
let h5Url = this.filterJumpUrl(item) let h5Url = this.filterJumpUrl(item)
console.log(h5Url)
wx.$router.jumpH5(h5Url) wx.$router.jumpH5(h5Url)
}, },
// 活动战报 // 活动战报
......
...@@ -23,7 +23,6 @@ Component({ ...@@ -23,7 +23,6 @@ Component({
isShow: { isShow: {
type: Boolean, type: Boolean,
observer(val) { observer(val) {
console.log(val)
} }
} }
}, },
...@@ -58,7 +57,7 @@ Component({ ...@@ -58,7 +57,7 @@ Component({
val.isloading = true val.isloading = true
ActivityApi.getActivityEndInstallOrderList({activityId: val.id}).then(res => { ActivityApi.getActivityEndInstallOrderList({activityId: val.id}).then(res => {
res.orderList && res.orderList.forEach(it => { res.orderList && res.orderList.forEach(it => {
it.time = new Date(it.createdDate).format('yyyy-MM-dd hh:mm:ss') it.time = it.createdDate ? new Date(it.createdDate).format('yyyy-MM-dd hh:mm') : ''
}) })
val.isloading = false val.isloading = false
val.isCollapse = false val.isCollapse = false
...@@ -106,7 +105,6 @@ Component({ ...@@ -106,7 +105,6 @@ Component({
goToDetail(e) { goToDetail(e) {
let { item } = e.currentTarget.dataset let { item } = e.currentTarget.dataset
let h5Url = this.filterJumpUrl(item) let h5Url = this.filterJumpUrl(item)
console.log(h5Url)
wx.$router.jumpH5(h5Url) wx.$router.jumpH5(h5Url)
}, },
// 活动战报 // 活动战报
......
...@@ -135,7 +135,7 @@ Page({ ...@@ -135,7 +135,7 @@ Page({
ActivityApi.getActivityEndInstallOrderList({activityId: val.id}, {isShowLoading: true}).then(res => { ActivityApi.getActivityEndInstallOrderList({activityId: val.id}, {isShowLoading: true}).then(res => {
val.isCollapse = false val.isCollapse = false
res.orderList && res.orderList.forEach(it => { res.orderList && res.orderList.forEach(it => {
it.time = new Date(it.createdDate).format('yyyy-MM-dd hh:mm:ss') it.time = it.createdDate ? new Date(it.createdDate).format('yyyy-MM-dd hh:mm') : ''
}) })
val.orderList = res.orderList val.orderList = res.orderList
val.orderTotal = res.orderTotal val.orderTotal = res.orderTotal
......
{ {
"usingComponents": { "usingComponents": {
"active-box": "./components/activeBox/activeBox", "active-box": "./components/activeBox/activeBox",
"activity-diagnosis": "./components/activityDiagnosis/activityDiagnosis" "activity-diagnosis": "./components/activityDiagnosis/activityDiagnosis",
"install-popup":"../../../components/installPopup/installPopup",
"share-popup":"../../../components/sharePopup/sharePopup"
}, },
"navigationStyle": "custom", "navigationStyle": "custom",
"onReachBottomDistance": 100 "onReachBottomDistance": 100
......
import { IMG_URL } from '~/utils/constantData'
Component({ Component({
options: { options: {
addGlobalClass: true addGlobalClass: true
...@@ -12,7 +11,6 @@ Component({ ...@@ -12,7 +11,6 @@ Component({
* 组件的初始数据 * 组件的初始数据
*/ */
data: { data: {
IMGURL: IMG_URL,
withdrawalScore:0, withdrawalScore:0,
}, },
......
<view style="{{boxStyle}}" class="integral_widget"> <view style="{{boxStyle}}" class="integral_widget">
<view class="wrapper"> <view class="wrapper">
<image webp mode="widthFix" class="bg_icon" src="{{IMGURL}}intergral_bg_icon.png" /> <glsx-image webp mode="widthFix" class="bg_icon" src="intergral_bg_icon.png" />
<view bind:tap="toTiXian" class="btn_wrap"></view> <view bind:tap="toTiXian" class="btn_wrap"></view>
<view class="tip">我的积分</view> <view class="tip">我的积分</view>
<view class="money">{{withdrawalScore}}</view> <view class="money">{{withdrawalScore}}</view>
......
import { IMG_URL } from '~/utils/constantData'
import MineApi from '~/api/mineApi/index' import MineApi from '~/api/mineApi/index'
Component({ Component({
options: { options: {
...@@ -12,7 +11,6 @@ Component({ ...@@ -12,7 +11,6 @@ Component({
* 组件的初始数据 * 组件的初始数据
*/ */
data: { data: {
IMGURL: IMG_URL,
listData: [] listData: []
}, },
......
<view class="list_widget"> <view class="list_widget">
<view class="image_wrap"> <view class="image_wrap">
<image webp mode="widthFix" class="banner_icon" src="{{IMGURL}}list_bg_icon.png" /> <glsx-image webp mode="widthFix" class="banner_icon" src="list_bg_icon.png" />
<view class="box flex_cc left_box"> <view class="box flex_cc left_box">
<image class="icon" src="{{IMGURL}}num_icon_1.png" /> <glsx-image class="icon" src="num_icon_1.png" />
<view class="text_wrap"> <view class="text_wrap">
<view class="price">{{score.totalReWardScore || 0}}</view> <view class="price">{{score.totalReWardScore || 0}}</view>
<view class="tip">累计收益积分</view> <view class="tip">累计收益积分</view>
</view> </view>
</view> </view>
<view class="box flex_cc right_box"> <view class="box flex_cc right_box">
<image class="icon" src="{{IMGURL}}num_icon_2.png" /> <glsx-image class="icon" src="num_icon_2.png" />
<view class="text_wrap"> <view class="text_wrap">
<view class="price">{{score.totalWithdrawalScore || 0}}</view> <view class="price">{{score.totalWithdrawalScore || 0}}</view>
<view class="tip">累计提现积分</view> <view class="tip">累计提现积分</view>
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
</view> </view>
</view> </view>
<view class="title_wrap flex_cc"> <view class="title_wrap flex_cc">
<image mode="widthFix" class="icon" src="{{IMGURL}}title_icon.png" /> <glsx-image mode="widthFix" class="icon" src="title_icon.png" />
</view> </view>
<view class="list_data_widget"> <view class="list_data_widget">
<block wx:for="{{listData}}" wx:key="index"> <block wx:for="{{listData}}" wx:key="index">
......
import { IMG_URL } from '~/utils/constantData'
import MineApi from '~/api/mineApi/index' import MineApi from '~/api/mineApi/index'
Component({ Component({
options: { options: {
...@@ -10,9 +9,7 @@ Component({ ...@@ -10,9 +9,7 @@ Component({
}, },
data: { data: {},
IMGURL: IMG_URL,
},
methods: { methods: {
toEditPage() { toEditPage() {
......
...@@ -10,21 +10,21 @@ ...@@ -10,21 +10,21 @@
<view style="{{boxStyle}}" class="userInfo_widget"> <view style="{{boxStyle}}" class="userInfo_widget">
<view class="wrap flex_sc"> <view class="wrap flex_sc">
<image wx:if="{{user.headImgUrl}}" mode="aspectFill" class="header_icon" src="{{user.headImgUrl}}" /> <image wx:if="{{user.headImgUrl}}" mode="aspectFill" class="header_icon" src="{{user.headImgUrl}}" />
<image wx:else mode="aspectFill" class="header_icon" src="{{IMGURL}}default_avatar.png" /> <glsx-image wx:else mode="aspectFill" class="header_icon" src="default_avatar.png" />
<view class="info_text"> <view class="info_text">
<view class="label flex_sc"> <view class="label flex_sc">
<text>{{strSubstr.getString(user.nickName)}}</text> <text>{{strSubstr.getString(user.nickName)}}</text>
<image bind:tap="toEditPage" mode="aspectFill" class="edit_icon" src="{{IMGURL}}center_edit_icon.png" /> <glsx-image bind:tap="toEditPage" mode="aspectFill" class="edit_icon" src="center_edit_icon.png" />
</view> </view>
<view class="contact_widget flex_sc"> <view class="contact_widget flex_sc">
<view class="text">{{user.phone}}</view> <view class="text">{{user.phone}}</view>
<view bind:tap="toShowBind" class="wecat_wrap flex_cc"> <view bind:tap="toShowBind" class="wecat_wrap flex_cc">
<block wx:if="{{user.bindStatus}}"> <block wx:if="{{user.bindStatus}}">
<image class="icon" src="{{IMGURL}}wechat_active_icon.png" /> <glsx-image class="icon" src="wechat_active_icon.png" />
<text>{{strSubstr.getString(user.brandName)}}</text> <text>{{strSubstr.getString(user.brandName)}}</text>
</block> </block>
<block wx:else> <block wx:else>
<image class="icon" src="{{IMGURL}}wechat_icon.png" /> <glsx-image class="icon" src="wechat_icon.png" />
<text>未绑定</text> <text>未绑定</text>
</block> </block>
</view> </view>
...@@ -35,13 +35,13 @@ ...@@ -35,13 +35,13 @@
<view class="store_widget {{user.seriseName?'flex_cc':'flex_sc marleft158'}}"> <view class="store_widget {{user.seriseName?'flex_cc':'flex_sc marleft158'}}">
<block wx:if="{{user.seriseName}}"> <block wx:if="{{user.seriseName}}">
<view class="flex_sc label"> <view class="flex_sc label">
<image class="icon" src="{{IMGURL}}merchant_icon.png" /> <glsx-image class="icon" src="merchant_icon.png" />
<view class="tip">{{user.seriseName}}</view> <view class="tip">{{user.seriseName}}</view>
</view> </view>
<view class="line"></view> <view class="line"></view>
</block> </block>
<view class="flex_sc label"> <view class="flex_sc label">
<image class="icon" src="{{IMGURL}}shop_icon.png" /> <glsx-image class="icon" src="shop_icon.png" />
<view class="tip">{{strSubstr.getString(user.merchantName,user.seriseName?10:20)}}</view> <view class="tip">{{strSubstr.getString(user.merchantName,user.seriseName?10:20)}}</view>
</view> </view>
</view> </view>
......
...@@ -44,7 +44,6 @@ Page({ ...@@ -44,7 +44,6 @@ Page({
}) })
}, },
async toBindWechat(e) { async toBindWechat(e) {
console.log(e);
if (e.detail.errMsg === "getPhoneNumber:ok") { if (e.detail.errMsg === "getPhoneNumber:ok") {
wx.$api.showLoading() wx.$api.showLoading()
const { encryptedData, iv, code } = e.detail const { encryptedData, iv, code } = e.detail
......
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
"usingComponents": { "usingComponents": {
"user-info-widget":"./components/userInfo/userInfo", "user-info-widget":"./components/userInfo/userInfo",
"count-info-widget":"./components/countInfo/countInfo", "count-info-widget":"./components/countInfo/countInfo",
"list-info-widget":"./components/listInfo/listInfo", "list-info-widget":"./components/listInfo/listInfo"
"van-popup": "@vant/weapp/popup/index"
} }
} }
\ No newline at end of file \ No newline at end of file
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
</navigation-bar> </navigation-bar>
<!-- 顶部背景图 --> <!-- 顶部背景图 -->
<view class="topBg"> <view class="topBg">
<image webp mode="widthFix" src="{{IMGURL}}mine_center_bg.png" /> <glsx-image webp mode="widthFix" src="mine_center_bg.png" />
</view> </view>
<!-- 个人基础信息 --> <!-- 个人基础信息 -->
<user-info-widget style="z-index:99" bind:showModal="toShowBindModal" user="{{user}}" boxStyle="{{user_box_style}}"></user-info-widget> <user-info-widget style="z-index:99" bind:showModal="toShowBindModal" user="{{user}}" boxStyle="{{user_box_style}}"></user-info-widget>
......
...@@ -25,7 +25,6 @@ class Router { ...@@ -25,7 +25,6 @@ class Router {
try { try {
typeof fn === 'function' && fn(e, this[_query], this[_routerList]) typeof fn === 'function' && fn(e, this[_query], this[_routerList])
} catch (err) { } catch (err) {
console.log(err)
} }
}) })
this[_query] = {} this[_query] = {}
......
...@@ -66,7 +66,6 @@ class Draw { ...@@ -66,7 +66,6 @@ class Draw {
resolve(imageParams) resolve(imageParams)
} }
image.onerror = err => { image.onerror = err => {
console.log(image.src)
wx.hideLoading() wx.hideLoading()
wx.showToast({ wx.showToast({
title: '图片加载失败', title: '图片加载失败',
...@@ -277,7 +276,6 @@ class Draw { ...@@ -277,7 +276,6 @@ class Draw {
height: endY height: endY
} }
] ]
console.log(this.toRpx(y) , paddingY)
this[_ctx_].beginPath() this[_ctx_].beginPath()
this[_ctx_].globalAlpha = typeof opacity === 'number' ? opacity : 1 this[_ctx_].globalAlpha = typeof opacity === 'number' ? opacity : 1
this[_ctx_].lineWidth = width || this.toRpx(1) this[_ctx_].lineWidth = width || this.toRpx(1)
......
...@@ -112,7 +112,6 @@ class Storage { ...@@ -112,7 +112,6 @@ class Storage {
wx.setStorageSync(tmpKey, tmpData) wx.setStorageSync(tmpKey, tmpData)
resolve(sucMsg) resolve(sucMsg)
} catch (err) { } catch (err) {
console.log(err)
reject(errMsg) reject(errMsg)
} }
} else { } else {
...@@ -123,7 +122,6 @@ class Storage { ...@@ -123,7 +122,6 @@ class Storage {
resolve(sucMsg) resolve(sucMsg)
}, },
fail: err => { fail: err => {
console.log(err)
reject(errMsg) reject(errMsg)
} }
}) })
...@@ -149,7 +147,6 @@ class Storage { ...@@ -149,7 +147,6 @@ class Storage {
wx.clearStorageSync() wx.clearStorageSync()
resolve(sucMsg) resolve(sucMsg)
} catch (err) { } catch (err) {
console.log(err)
reject(errMsg) reject(errMsg)
} }
} else { } else {
...@@ -158,7 +155,6 @@ class Storage { ...@@ -158,7 +155,6 @@ class Storage {
resolve(sucMsg) resolve(sucMsg)
}, },
fail: err => { fail: err => {
console.log(err)
reject(errMsg) reject(errMsg)
} }
}) })
...@@ -170,7 +166,6 @@ class Storage { ...@@ -170,7 +166,6 @@ class Storage {
wx.removeStorageSync(tmpKey) wx.removeStorageSync(tmpKey)
resolve(sucMsg) resolve(sucMsg)
} catch (err) { } catch (err) {
console.log(err)
reject(errMsg) reject(errMsg)
} }
} else { } else {
...@@ -180,7 +175,6 @@ class Storage { ...@@ -180,7 +175,6 @@ class Storage {
resolve(sucMsg) resolve(sucMsg)
}, },
fail: err => { fail: err => {
console.log(err)
reject(errMsg) reject(errMsg)
} }
}) })
......
...@@ -17,7 +17,6 @@ const emoji = [ ...@@ -17,7 +17,6 @@ const emoji = [
['让我看看', '666', '红包', '蜡烛', '烟花', '福', '庆祝', '爆竹'] ['让我看看', '666', '红包', '蜡烛', '烟花', '福', '庆祝', '爆竹']
] ]
const emojiReg = /([^\u0020-\u007E\u00A0-\u00BE\u2E80-\uA4CF\uF900-\uFAFF\uFE30-\uFE4F\uFF00-\uFFEF\u0080-\u009F\u2000-\u201f\u2026\u2022\u20ac])/g const emojiReg = /([^\u0020-\u007E\u00A0-\u00BE\u2E80-\uA4CF\uF900-\uFAFF\uFE30-\uFE4F\uFF00-\uFFEF\u0080-\u009F\u2000-\u201f\u2026\u2022\u20ac])/g
/**过滤表情 */ /**过滤表情 */
export function haveEmoji(value) { export function haveEmoji(value) {
let val = false let val = false
...@@ -31,13 +30,11 @@ export function haveEmoji(value) { ...@@ -31,13 +30,11 @@ export function haveEmoji(value) {
} }
return val return val
} }
/**替换表情 */ /**替换表情 */
export function replaceEmoji(value) { export function replaceEmoji(value) {
let val = value.replace(emojiReg, '') let val = value.replace(emojiReg, '')
return val.trimStart().trimEnd() return val.trimStart().trimEnd()
} }
// 表情回显 文本内容 // 表情回显 文本内容
export function showEmoji(value) { export function showEmoji(value) {
if (!value) return if (!value) return
......
var _=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports);var S=_((le,M)=>{"use strict";M.exports=N;function y(t){return t instanceof Buffer?Buffer.from(t):new t.constructor(t.buffer.slice(),t.byteOffset,t.length)}function N(t){if(t=t||{},t.circles)return Q(t);return t.proto?s:a;function e(f,i){for(var r=Object.keys(f),n=new Array(r.length),u=0;u<r.length;u++){var o=r[u],p=f[o];typeof p!="object"||p===null?n[o]=p:p instanceof Date?n[o]=new Date(p):ArrayBuffer.isView(p)?n[o]=y(p):n[o]=i(p)}return n}function a(f){if(typeof f!="object"||f===null)return f;if(f instanceof Date)return new Date(f);if(Array.isArray(f))return e(f,a);if(f instanceof Map)return new Map(e(Array.from(f),a));if(f instanceof Set)return new Set(e(Array.from(f),a));var i={};for(var r in f)if(Object.hasOwnProperty.call(f,r)!==!1){var n=f[r];typeof n!="object"||n===null?i[r]=n:n instanceof Date?i[r]=new Date(n):n instanceof Map?i[r]=new Map(e(Array.from(n),a)):n instanceof Set?i[r]=new Set(e(Array.from(n),a)):ArrayBuffer.isView(n)?i[r]=y(n):i[r]=a(n)}return i}function s(f){if(typeof f!="object"||f===null)return f;if(f instanceof Date)return new Date(f);if(Array.isArray(f))return e(f,s);if(f instanceof Map)return new Map(e(Array.from(f),s));if(f instanceof Set)return new Set(e(Array.from(f),s));var i={};for(var r in f){var n=f[r];typeof n!="object"||n===null?i[r]=n:n instanceof Date?i[r]=new Date(n):n instanceof Map?i[r]=new Map(e(Array.from(n),s)):n instanceof Set?i[r]=new Set(e(Array.from(n),s)):ArrayBuffer.isView(n)?i[r]=y(n):i[r]=s(n)}return i}}function Q(t){var e=[],a=[];return t.proto?i:f;function s(r,n){for(var u=Object.keys(r),o=new Array(u.length),p=0;p<u.length;p++){var c=u[p],l=r[c];if(typeof l!="object"||l===null)o[c]=l;else if(l instanceof Date)o[c]=new Date(l);else if(ArrayBuffer.isView(l))o[c]=y(l);else{var h=e.indexOf(l);h!==-1?o[c]=a[h]:o[c]=n(l)}}return o}function f(r){if(typeof r!="object"||r===null)return r;if(r instanceof Date)return new Date(r);if(Array.isArray(r))return s(r,f);if(r instanceof Map)return new Map(s(Array.from(r),f));if(r instanceof Set)return new Set(s(Array.from(r),f));var n={};e.push(r),a.push(n);for(var u in r)if(Object.hasOwnProperty.call(r,u)!==!1){var o=r[u];if(typeof o!="object"||o===null)n[u]=o;else if(o instanceof Date)n[u]=new Date(o);else if(o instanceof Map)n[u]=new Map(s(Array.from(o),f));else if(o instanceof Set)n[u]=new Set(s(Array.from(o),f));else if(ArrayBuffer.isView(o))n[u]=y(o);else{var p=e.indexOf(o);p!==-1?n[u]=a[p]:n[u]=f(o)}}return e.pop(),a.pop(),n}function i(r){if(typeof r!="object"||r===null)return r;if(r instanceof Date)return new Date(r);if(Array.isArray(r))return s(r,i);if(r instanceof Map)return new Map(s(Array.from(r),i));if(r instanceof Set)return new Set(s(Array.from(r),i));var n={};e.push(r),a.push(n);for(var u in r){var o=r[u];if(typeof o!="object"||o===null)n[u]=o;else if(o instanceof Date)n[u]=new Date(o);else if(o instanceof Map)n[u]=new Map(s(Array.from(o),i));else if(o instanceof Set)n[u]=new Set(s(Array.from(o),i));else if(ArrayBuffer.isView(o))n[u]=y(o);else{var p=e.indexOf(o);p!==-1?n[u]=a[p]:n[u]=i(o)}}return e.pop(),a.pop(),n}}});var V=_((ce,I)=>{"use strict";var C=Array.isArray,W=Object.keys,Z=Object.prototype.hasOwnProperty;I.exports=function t(e,a){if(e===a)return!0;if(e&&a&&typeof e=="object"&&typeof a=="object"){var s=C(e),f=C(a),i,r,n;if(s&&f){if(r=e.length,r!=a.length)return!1;for(i=r;i--!=0;)if(!t(e[i],a[i]))return!1;return!0}if(s!=f)return!1;var u=e instanceof Date,o=a instanceof Date;if(u!=o)return!1;if(u&&o)return e.getTime()==a.getTime();var p=e instanceof RegExp,c=a instanceof RegExp;if(p!=c)return!1;if(p&&c)return e.toString()==a.toString();var l=W(e);if(r=l.length,r!==W(a).length)return!1;for(i=r;i--!=0;)if(!Z.call(a,l[i]))return!1;for(i=r;i--!=0;)if(n=l[i],!t(e[n],a[n]))return!1;return!0}return e!==e&&a!==a}});var q=_(A=>{"use strict";Object.defineProperty(A,"__esModule",{value:!0}),A.parseMultiDataPaths=ee,A.getDataOnPath=void 0;var E=/^\s/,b=function(t,e){throw new Error('Parsing data path "'+t+'" failed at char "'+t[e]+'" (index '+e+")")},L=function(t,e){for(var a=e.index;e.index<e.length;){var s=t[e.index];if(/^[0-9]/.test(s)){e.index++;continue}break}return a===e.index&&b(t,e.index),parseInt(t.slice(a,e.index),10)},R=function(t,e){var a=e.index,s=t[a];if(/^[_a-zA-Z$]/.test(s))for(e.index++;e.index<e.length;){var f=t[e.index];if(/^[_a-zA-Z0-9$]/.test(f)){e.index++;continue}break}else b(t,e.index);return t.slice(a,e.index)},B=function(t,e){for(var a=[R(t,e)],s={deepCmp:!1};e.index<e.length;){var f=t[e.index];if(f==="[")e.index++,a.push(L(t,e)),t[e.index]!=="]"&&b(t,e.index),e.index++;else if(f==="."){if(e.index++,t[e.index]==="*"){if(e.index++,t[e.index]==="*"){e.index++,s.deepCmp=!0;break}b(t,e.index)}a.push(R(t,e))}else break}return{path:a,options:s}},X=function(t,e){for(;E.test(t[e.index]);)e.index++;for(var a=[B(t,e)],s=!1;e.index<e.length;){var f=t[e.index];E.test(f)?e.index++:f===","?(s=!0,e.index++):s?(s=!1,a.push(B(t,e))):b(t,e.index)}return a},k=function(t,e){e.index<e.length&&b(t,e.index)};function ee(t){var e={length:t.length,index:0},a=X(t,e);return k(t,e),a}var te=function(t,e){var a=t;return e.forEach(function(s){a=typeof a!="object"||a===null?void 0:a[s]}),a};A.getDataOnPath=te});var H=_(m=>{"use strict";Object.defineProperty(m,"__esModule",{value:!0}),m.create=re,m.unwrap=ne;var z=function(t,e,a){if(typeof t!="object"||t===null)return t;var s={get:function(f,i){if(i==="__rawObject__")return t;var r=a.concat(i),n=t[i];return e.push({path:r,value:n}),z(n,e,r)}};return new Proxy(t,s)};function re(t,e){return z(t,e,[])}function ne(t){return typeof t!="object"||t===null||typeof t.__rawObject__!="object"?t:t.__rawObject__}});var K=_(x=>{"use strict";Object.defineProperty(x,"__esModule",{value:!0}),x.behavior=void 0;var $,ae=G(S()),ie=G(V()),w=U(q()),j=U(H());function F(t,e,a){return e in t?Object.defineProperty(t,e,{value:a,enumerable:!0,configurable:!0,writable:!0}):t[e]=a,t}function G(t){return t&&t.__esModule?t:{default:t}}function U(t){if(t&&t.__esModule)return t;var e={};if(t!=null){for(var a in t)if(Object.prototype.hasOwnProperty.call(t,a)){var s=Object.defineProperty&&Object.getOwnPropertyDescriptor?Object.getOwnPropertyDescriptor(t,a):{};s.get||s.set?Object.defineProperty(e,a,s):e[a]=t[a]}}return e.default=t,e}var T=ae.default({proto:!0}),fe=0,oe=Behavior({lifetimes:{attached:function(){this.setData({_computedWatchInit:"attached"})},created:function(){this.setData({_computedWatchInit:"created"})}},definitionFilter:function(t){var e=t.computed,a=t.watch,s=[],f=fe++;s.push({fields:"_computedWatchInit",observer:function(){var i=this.data._computedWatchInit;if(i==="created"){var r={computedUpdaters:[],computedRelatedPathValues:{},watchCurVal:{}};this._computedWatchInfo||(this._computedWatchInfo={}),this._computedWatchInfo[f]=r,a&&Object.keys(a).forEach(function(u){var o=w.parseMultiDataPaths(u).map(function(p){var c=p.path,l=p.options,h=w.getDataOnPath(this.data,c);return l.deepCmp?T(h):h}.bind(this));r.watchCurVal[u]=o}.bind(this))}else if(i==="attached"){var n=this._computedWatchInfo[f];e&&Object.keys(e).forEach(function(u){var o=e[u],p=[],c=o(j.create(this.data,p)),l=p.map(function(d){var v=d.path;return{path:v,value:w.getDataOnPath(this.data,v)}}.bind(this));this.setData(F({},u,j.unwrap(c))),n.computedRelatedPathValues[u]=l;var h=function(){for(var d=n.computedRelatedPathValues[u],v=!1,D=0;D<d.length;D++){var P=d[D],Y=P.path;if(P.value!==w.getDataOnPath(this.data,Y)){v=!0;break}}if(!v)return!1;var g=[],J=o(j.create(this.data,g));return this.setData(F({},u,j.unwrap(J))),n.computedRelatedPathValues[u]=g,!0}.bind(this);n.computedUpdaters.push(h)}.bind(this))}}}),e&&s.push({fields:"**",observer:function(){if(this._computedWatchInfo){var i,r=this._computedWatchInfo[f];if(r)do i=r.computedUpdaters.some(function(n){return n.call(this)}.bind(this));while(i)}}}),a&&Object.keys(a).forEach(function(i){var r=w.parseMultiDataPaths(i);s.push({fields:i,observer:function(){if(this._computedWatchInfo){var n=this._computedWatchInfo[f];if(n){var u=n.watchCurVal[i],o=r.map(function(h){var d=h.path,v=h.options;return{val:w.getDataOnPath(this.data,d),options:v}}.bind(this)),p=o.map(function(h){var d=h.val;return h.options.deepCmp?T(d):d});n.watchCurVal[i]=p;for(var c=!1,l=0;l<p.length;l++)if(r[l].options.deepCmp?!ie.default(u[l],p[l]):u[l]!==p[l]){c=!0;break}c&&a[i].apply(this,o.map(function(h){return h.val}))}}}})}),typeof t.observers!="object"&&(t.observers={}),Array.isArray(t.observers)?($=t.observers).push.apply($,s):s.forEach(function(i){var r=t.observers[i.fields];r?t.observers[i.fields]=function(){i.observer.call(this),r.call(this)}:t.observers[i.fields]=i.observer})}});x.behavior=oe});"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),Object.defineProperty(exports,"behavior",{enumerable:!0,get:function(){return O.behavior}}),exports.ComponentWithComputed=se,exports.BehaviorWithComputed=ue;var O=K();function se(t){return Array.isArray(t.behaviors)||(t.behaviors=[]),t.behaviors.unshift(O.behavior),Component(t)}function ue(t){return Array.isArray(t.behaviors)||(t.behaviors=[]),t.behaviors.unshift(O.behavior),Behavior(t)}
...@@ -1588,7 +1588,6 @@ var createImgTag = function(width, height, getPixel, alt) { ...@@ -1588,7 +1588,6 @@ var createImgTag = function(width, height, getPixel, alt) {
// returns qrcode function. // returns qrcode function.
var createQrCodeImg = function(text, options) { var createQrCodeImg = function(text, options) {
console.log(text, '1212121')
options = options || {}; options = options || {};
var typeNumber = options.typeNumber || 4; var typeNumber = options.typeNumber || 4;
var errorCorrectLevel = options.errorCorrectLevel || 'M'; var errorCorrectLevel = options.errorCorrectLevel || 'M';
......
...@@ -12,7 +12,6 @@ ...@@ -12,7 +12,6 @@
// import USERAPI from '~/api/usersApi/index' // import USERAPI from '~/api/usersApi/index'
class Share { class Share {
constructor() { constructor() {
console.log('---------------- 分享初始化 ----------------')
this.initPageProxy() this.initPageProxy()
} }
/**全局注册事件 */ /**全局注册事件 */
...@@ -51,7 +50,6 @@ pageLeaveProxy(page) { ...@@ -51,7 +50,6 @@ pageLeaveProxy(page) {
if (!noPageAuth) path = `/pages/authentication/loading/loading?url=${encodeURIComponent(path)}` if (!noPageAuth) path = `/pages/authentication/loading/loading?url=${encodeURIComponent(path)}`
if (shareFun) shareFun() if (shareFun) shareFun()
if (shareTrackData) that.reportShareData(shareTrackData) if (shareTrackData) that.reportShareData(shareTrackData)
console.log('::', path)
return { return {
path, path,
title: shareTitle, title: shareTitle,
...@@ -71,7 +69,6 @@ pageLeaveProxy(page) { ...@@ -71,7 +69,6 @@ pageLeaveProxy(page) {
if (shareFun) shareFun() if (shareFun) shareFun()
// if (shareTrackData) that.reportShareData(shareTrackData) // if (shareTrackData) that.reportShareData(shareTrackData)
// shareQuery = that.setCommonShareQuery(shareQuery) // shareQuery = that.setCommonShareQuery(shareQuery)
console.log(shareQuery)
return { return {
query: shareQuery, query: shareQuery,
title: shareTitle, title: shareTitle,
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!