Commit a7da32cd by 胡悦

去掉console

1 parent 42788ad5
......@@ -20,7 +20,6 @@ const $Storage = new Storage()
App({
onLaunch: function (options) {
console.log(options)
/**挂载到wx对象 */
this.autoUpdate()
wx.$storage = $Storage /** 挂载全局缓存方法 */
......@@ -42,9 +41,7 @@ App({
}
wx.showMeasure = !!(options.query && options.query.scene)
wx.onMemoryWarning(function () {
console.log('onMemoryWarningReceive')
})
// this.getData()
},
login(returnResponse) {
let _this = this
......@@ -69,7 +66,6 @@ App({
_this.getScene(wx.$trackData.scene).then(res => {
wx.$trackData.merchant = res.merchantId
wx.$trackData.cardId = res.cardId
console.log('wx.$trackData.cardId', wx.$trackData.cardId)
wx.$storage.set('scene', {
merchant: res.merchantId,
cardId: res.cardId
......@@ -109,7 +105,6 @@ App({
})
},
getUserInfo(openId, returnResponse) {
console.log('openId', openId)
return new Promise((resolve) => {
ssoApi
.getUserInfo({
......@@ -146,23 +141,12 @@ App({
})
},
getData() {
wx.request({
url: 'https://config-center-backend.glsx.com.cn/glsxAdmin/config?moduleUrl=system-data',
success: (res) => {
console.log(res)
}
})
},
/**
* 下载小程序新版本并重启应用
*/
autoUpdate: function () {
const updateManager = wx.getUpdateManager()
updateManager.onCheckForUpdate(function (res) {
// 请求完新版本信息的回调
console.log(res.hasUpdate)
})
updateManager.onUpdateReady(function () {
wx.showModal({
......@@ -198,7 +182,6 @@ App({
},
globalData: {},
onPageNotFound(res) {
console.log(res, '不存在的页面')
setTimeout(() => {
wx.$router.go('/pages/tab/index/index', res.query)
}, 1000)
......
......@@ -116,7 +116,6 @@ Component({
},
/**授权手机号 */
getPhoneNumber({ detail }) {
console.log(detail)
this.triggerEvent('getphonenumber', detail)
}
},
......
......@@ -45,7 +45,6 @@ Component({
*/
methods: {
selectTab(e) {
console.log(e.currentTarget.dataset.index);
this.setData({
tabIndex: e.currentTarget.dataset.index,
});
......@@ -53,7 +52,6 @@ Component({
},
// 合作方式切换
applyChange(e) {
console.log(e.detail.value);
this.setData({
selectApply: e.detail.value,
});
......@@ -67,7 +65,6 @@ Component({
},
// 表单验证规则
initValidate() {
console.log(123123);
const rules = {
applyType: {
required: true,
......@@ -164,7 +161,6 @@ Component({
attached: function () {
if (util.getUserInfo() && util.getUserInfo().phone) {
this.setPhone(util.getUserInfo().phone)
console.log(this.data.applyForm)
}
}
},
......
......@@ -3,7 +3,7 @@
* @Author: huyue
* @Date: 2022-12-09 13:58:15
* @LastEditors: huyue
* @LastEditTime: 2022-12-13 10:36:15
* @LastEditTime: 2023-01-11 14:41:24
*/
// components/Login/Login.js
import { ssoApi } from "../../api/api";
......@@ -77,8 +77,6 @@ Component({
}
},
jump() {
// this.triggerEvent('toApplication')
console.log(333);
wx.$router.go("/packagesList/pages/activityApply/activityApply");
},
forward() {
......@@ -92,7 +90,6 @@ Component({
if (res.confirm) {
that.triggerEvent('videodown')
} else if (res.cancel) {
console.log('用户点击取消')
}
}
})
......
/*
* @Description:
* @Author: huyue
* @Date: 2022-12-09 14:13:50
* @LastEditors: huyue
* @LastEditTime: 2023-01-11 15:14:15
*/
// components/Tab/Tab.js
// behaviors: [LocationBehavior],
// import { imgUrlMixin } from '~/mixins/index'
......@@ -51,11 +58,6 @@ Component({
to: '',
// IMGURL:
},
// lifetimes:{
// attached: function() {
// console.log('unreadClueCount',this.data.unreadClueCount)
// }
// },
/**
* 组件的方法列表
......
/*
* @Description:
* @Author: huyue
* @Date: 2022-12-15 15:58:30
* @LastEditors: huyue
* @LastEditTime: 2023-01-11 14:41:27
*/
// components/customer/customer.js
import {
componentsMixin
......@@ -26,7 +33,6 @@ Component({
methods: {
// 关闭客服弹框
closeQR() {
console.log(333);
this.triggerEvent('closeQR')
}
}
......
......@@ -58,18 +58,12 @@ Component({
methods: {
getInfo() {
let { activeNavIdx, actNum } = this.data
console.log(actNum)
console.log(activeNavIdx)
const spcList = [99, 4] // 订阅模块需要特殊处理
console.log(productData1, 'productData')
const senceList = productData1[actNum].filter(item => item.name != '全部')
console.log(senceList)
for (let i = 0; i < senceList.length; i++) {
let item = senceList[i]
let proIdList = item?.productList.map(k => k.id)
if (proIdList.includes(activeNavIdx)) {
console.log(item, 'item----')
//console.log(item.productList.find(k => k.id == activeNavIdx))
let proInfo = item.productList.find(k => k.id == activeNavIdx)
this.setData({
proInfo,
......@@ -77,8 +71,6 @@ Component({
tabList: spcList.includes(actNum) ? proInfo.tabList : norTabList,
prodItemVideo: item.videoList.length ? spcList.includes(actNum) ?item.videoList[proInfo.currentIndex] : item.videoList[activeNavIdx] : item.noVideoPicture[0]
})
console.log(this.data.productImgs, proInfo)
// console.log(this.data.prodItemVideo, 'prodItemVideo--------')
break
}
}
......@@ -96,8 +88,6 @@ Component({
.selectAll('.img-item')
.boundingClientRect(react => {
react.forEach((item, index) => {
//44 tab的高度
// console.log('item',item)
s = item.top - 44 + scrollTop
imgTopArr.push(s)
})
......@@ -106,22 +96,15 @@ Component({
})
})
.exec()
// setTimeout(() => {
// console.log('imgTopArr',this.data.imgTopArr)
// },500)
},
// 1.3查看活动详情按钮
checkActive() {
// 跳转
// console.log('跳转')
let { activeUrl } = this.data
wx.$router.jumpH5(activeUrl);
},
onClickTab(event) {
// console.log('event: ', event);
let { index } = event.detail
// console.log('index: ', index);
this.setData({
tabAct: index
})
......@@ -160,12 +143,10 @@ Component({
wx.downloadFile({
url: 'https://scrm.glsx.com.cn/frontpdf/expand_agreement.pdf',
success: function (res) {
console.log(res)
const filePath = res.tempFilePath
wx.openDocument({
filePath: filePath,
success: function (res) {
console.log('打开文档成功')
}
})
}
......
......@@ -224,13 +224,10 @@ Component({
// 选择业务场景产品
selectScenePro(e) {
console.log(e.currentTarget.dataset, this.properties.selectApply);
var index = e.currentTarget.dataset.index;
var item = this.properties.selectApply == 0 ? this.data.productList[this.data.sceneName][index] : this.data.productSubscibList[this.data.sceneName][index];
item.isSelect = !item.isSelect;
if (this.properties.selectApply == 0) {
// let newProductList = `productListt.${this.data.sceneName}[0]`
// console.log(newProductList, item);
this.setData({
productList: this.data.productList,
});
......@@ -245,12 +242,10 @@ Component({
// 合作方式切换重置场景以及选择的产品
resetScene() {
if (!this.data.sceneName) return
console.log(this.properties.selectApply, this.data.sceneName, this.data.sceneNum);
if (this.properties.selectApply == 1) {
this.data.productList[this.data.sceneName].map((item) => {
if (item.isSelect) item.isSelect = false
})
console.log(this.data.productList[this.data.sceneName]);
this.setData({
productList: this.data.productList,
})
......@@ -258,7 +253,6 @@ Component({
this.data.productSubscibList[this.data.sceneName].map((item) => {
if (item.isSelect) item.isSelect = false
})
console.log(this.data.productSubscibList[this.data.sceneName]);
this.setData({
productSubscibList: this.data.productSubscibList,
})
......@@ -271,7 +265,6 @@ Component({
// 提交获取业务场景以及选择的产品
getSceneItems() {
console.log(111);
// 如果选择了业务场景
if (!this.data.sceneName) return
let selectFlag = 0;
......
/*
* @Description:
* @Author: huyue
* @Date: 2022-12-11 15:27:46
* @LastEditors: huyue
* @LastEditTime: 2023-01-11 15:14:25
*/
module.exports = Behavior({
methods: {
/** 跳转门店助手 */
toStoreMiniProgram () {
wx.$util.getMockConfig().then(({storeParams, storeappId}) => {
console.log(storeParams, storeappId)
wx.navigateToMiniProgram({
appId: storeappId,
path: 'packageStoreAssistant/packageAuth/pages/authentication/loading/loading',
extraData: storeParams,
envVersion: 'trial',
success(res) {
console.log(res, storeParams)
// 打开成功
}
})
......@@ -19,7 +24,6 @@ module.exports = Behavior({
/** 跳转生意助手 */
toBusinessMiniProgram (){
wx.$util.getMockConfig().then(({businessParams, businessappId}) => {
console.log(businessParams, businessappId)
wx.navigateToMiniProgram({
appId: businessappId,
path: 'login/loading/loading',
......
......@@ -10,9 +10,9 @@
"integrity": "sha512-hFJ48SCSvRgcwT/9TcxwNnNnWSpy2BpaBfwQwVdU6uwgFH+2OqGL435VQN7EDpIMH8YjHbiM84hueTyxAzIPqQ=="
},
"glsx-applet-component": {
"version": "1.0.40",
"resolved": "https://registry.npmjs.org/glsx-applet-component/-/glsx-applet-component-1.0.40.tgz",
"integrity": "sha512-ZqThscIToW/UfNWN1XYRa/+9C0P5J0UJYAuF0kiLjfyQx0ToaBEwfsXOO66EXZKxmDf9mOh+GoDEddLxcJ/6/w=="
"version": "1.0.41",
"resolved": "https://registry.npmjs.org/glsx-applet-component/-/glsx-applet-component-1.0.41.tgz",
"integrity": "sha512-qUUoezxDiffK8POsr6X+2JxIxDQyNawy8fwtC+0Qgf259FLkrqCRh35MHqG/AxO4z4CDjjBuf9qe/Qvi83BIwg=="
}
}
}
......@@ -5,7 +5,7 @@
"main": "app.js",
"dependencies": {
"@vant/weapp": "^1.10.9",
"glsx-applet-component": "^1.0.40"
"glsx-applet-component": "^1.0.41"
},
"devDependencies": {},
"scripts": {
......
......@@ -17,7 +17,6 @@ Page({
submitApply() {
wx.$util.showLoading("提交中...");
let validFlag = this.selectComponent("#applyForm").validateForm();
console.log(validFlag);
if (!validFlag) return
let params = JSON.parse(JSON.stringify(validFlag))
params.cardId = wx.$storage.get("scene").cardId;
......@@ -26,7 +25,6 @@ Page({
wx.$storage.get("scene").merchantId;
params.openId = wx.$storage.get("aicard_info").openId;
params.unionId = wx.$storage.get("aicard_info").unionId;
console.log(params);
entmicroApi.activityApply(params).then(({
data,
code,
......@@ -57,12 +55,10 @@ Page({
*/
onLoad(options) {
if (util.getUserInfo() && util.getUserInfo().phone) {
console.log(util.getUserInfo().phone)
let params = {
phone: util.getUserInfo().phone
}
entmicroApi.checkPhone(params).then(res => {
console.log(res);
this.setData({
isStaff: res.data
})
......
......@@ -13,15 +13,12 @@ Page({
},
toActivity(){
// wx.$util.getMockConfig().then(({businessParams, businessappId}) => {
// console.log(businessParams, businessappId)
const { activityInfo } = this.data
wx.navigateToMiniProgram({
appId: 'wxe10067a63c1856ac',
path: 'pages/crowdfunding/index/index?id=' + activityInfo.crowdFundActivityId + '&merchantId=' + activityInfo.merchantNo,
envVersion: 'trial',
success(res) {
console.log(res, storeParams)
// 打开成功
}
})
......@@ -31,7 +28,6 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad(options) {
console.log(options)
if (options && options.id) {
wx.$trackData = options
wx.$storage.set('scene', options)
......@@ -41,7 +37,6 @@ Page({
})
} else {
wx.$router.getData(res => {
console.log(res)
this.getActivityDetail(res.id)
this.setData({
hasPhoneNumber: res.hasPhoneNumber
......@@ -52,7 +47,6 @@ Page({
getActivityDetail(id) {
entmicroApi.getActivityDetail({id}).then(res => {
console.log(wx.$util.iosTimeFormat(res.beginTime), new Date(wx.$util.iosTimeFormat(res.beginTime)).format('yyyy年MM月dd日'))
res.beginTime = new Date(wx.$util.iosTimeFormat(res.beginTime)).format('yyyy年MM月dd日')
res.endTime = new Date(wx.$util.iosTimeFormat(res.endTime)).format('yyyy年MM月dd日')
wx.$Track.sendTrack({
......
......@@ -35,7 +35,6 @@ Page({
// }
// }
if (!this.data.isDisabled) {
console.log(this.data.checkArray)
let checkArray = []
this.data.measureList.forEach(item => {
item.product.forEach(i => {
......@@ -44,9 +43,7 @@ Page({
}
})
})
console.log(checkArray)
const params = Object.assign({checkArray}, this.data.formData)
console.log(params)
wx.$router.go("/packagesList/pages/measure/measureResult/measureResult", params);
}
},
......@@ -58,13 +55,11 @@ Page({
const name = `measureList[${index}].product[${productIndex}].isCheck`
const val = this.data.measureList[index].product[productIndex].isCheck
!val ? checkMap.set(value, !val) : checkMap.delete(value)
console.log(checkMap)
this.setData({
[name]: !val,
checkArray: [...checkMap.keys()]
})
this.validForm()
console.log(this.data.checkArray)
},
// 必填校验
......@@ -80,7 +75,6 @@ Page({
handleInput(e) {
let name = e.currentTarget.dataset.name
let val = this.validateNumber(e.detail.value)
console.log(val)
const form = `formData.${name}`
this.setData({
[form]: val
......@@ -90,7 +84,6 @@ Page({
// 输入正整数校验
validateNumber(val) {
console.log(val, val.replace(/\D/g, ''))
return val == 0 ? '' : val.replace(/\D/g, '')
},
......
......@@ -27,10 +27,8 @@ Page({
// 计算公式
formula(name, item, list) {
console.log(name, item)
const {storeNumber, carNumber, customNumber} = this.data.formData
const {rate, averagePrice, flowCost, serviceDividendRatio, typeIndex} = item
console.log(storeNumber, carNumber, customNumber)
let value = 0
switch(name) {
// 增值产量(总)
......@@ -149,7 +147,6 @@ Page({
} else {
const {countList} = this.data
const countData = {}
console.log(checkList)
checkList.forEach(i => {
countList.forEach(j => {
const value = this.formula(j, i, checkList)
......@@ -161,9 +158,7 @@ Page({
},
// 编辑
toEdit(e) {
console.log(e)
const {item, index} = e.currentTarget.dataset
console.log(item)
this.setData({
visible: true,
'dialogData.rate': (item.rate * 10000 / 100).toFixed(2),
......@@ -177,7 +172,6 @@ Page({
})
},
clickDialog(e) {
console.log(e.changedTouches[0].clientY);
if (e.changedTouches[0].clientY < 451) {
this.setData({
visible: false
......@@ -185,11 +179,7 @@ Page({
}
},
submit(e) {
console.log(e, this.data.dialogData)
const {rate, averagePrice, index} = this.data.dialogData
console.log(index)
// const reg = /^[1-9]\d*$/
// const reg1 = /^[1-9]{0,1}\d{1}(.\d{0,2})$/
if (!rate) {
wx.showToast({
title: '请输入转化率',
......@@ -211,10 +201,8 @@ Page({
[`checkList[${index}].averagePrice`]: averagePrice,
visible: false
})
console.log(this.data)
const checkList = this.getCalculate(this.data.checkList)
const countData = this.getCalculate(this.data.checkList, true)
console.log(checkList, countData)
this.setData({
checkList,
countData
......@@ -222,12 +210,10 @@ Page({
},
// 输入框输入
handleInput(e) {
console.log(e)
let value = e.detail.value
const name = e.target.dataset.name
const reg = /^[1-9]\d*$/
const reg1 = /^[1-9]{0,1}\d{1}(.\d{0,2})$/
console.log(value <100 && value > 0, (reg.test(value) || reg1.test(value)))
if (name == 'rate') {
if (value <= 0) {
value = null
......@@ -241,13 +227,11 @@ Page({
value = integer + '.' + decimal
}
} else {
console.log(value)
value = value.slice(0, value.length - 1)
}
} else {
value = this.validateNumber(value)
}
console.log(value)
const form = `dialogData.${name}`
this.setData({
[form]: value
......@@ -259,7 +243,6 @@ Page({
// 输入正整数校验
validateNumber(val) {
console.log(val, val.replace(/\D/g, ''))
return val == 0 ? '' : val.replace(/\D/g, '')
},
......@@ -268,19 +251,16 @@ Page({
*/
onLoad(options) {
wx.$router.getData(res => {
console.log(res)
const list = Util.deepClone(res)
this.setData({
formData: list
})
const checkList = this.getCalculate(list.checkArray)
const countData = this.getCalculate(list.checkArray, true)
console.log(checkList)
this.setData({
checkList,
countData,
})
console.log(countData)
})
},
......
......@@ -77,7 +77,6 @@ Page({
//接受跳转的路由参数(小程序页面跳转)
onRoute(options) {
console.log( options);
if (!options || utils.isEmptyObj(options)) return
let {
actNum = 0, activeNavIdx = 0, phone, hasPhoneNumber, name, proName
......@@ -105,8 +104,6 @@ Page({
onPageScroll: (function () {
let timer = null;
return function (e) {
// console.log(e)
// console.log("在滚动");
// 监听页面的滚动开始和结束
clearTimeout(timer);
timer = setTimeout(() => {
......@@ -147,7 +144,6 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad(options) {
console.log(options)
this.getActiveApiFn()
if (options && options.cardId) {
wx.$trackData = options
......@@ -164,7 +160,6 @@ Page({
getApp()
.login()
.then(({ data }) => {
console.log(data, '------')
this.setData({
isLoadding: false
})
......@@ -238,7 +233,6 @@ Page({
// merchantId 兼容旧链接
const merchant = wx.$storage.get('scene').merchant || wx.$storage.get('scene').merchantId
const shareType = 'SHARE_PRO'
console.log('cardId', cardId, 'merchant', merchant)
const {actNum, activeNavIdx, pageName, proName} = this.data
return {
title: `给你分享一个活动,戳我参与~`,
......@@ -248,7 +242,6 @@ Page({
// 更新手机号码
updatePhoneNumber(e) {
console.log(e.detail)
this.setData({
hasPhoneNumber: e.detail ? true : false
})
......@@ -259,7 +252,6 @@ Page({
let params = {
cardId: scene.cardId
}
console.log(params)
entmicroApi.getCardDetail(params).then(({ data, code, message }) => {
if (code == -1) {
wx.showToast({
......@@ -269,7 +261,6 @@ Page({
})
}
const cardInfo = data || this.data.defaultInfo
console.log(data, cardInfo)
this.setData(
{
cardInfo
......
......@@ -59,11 +59,9 @@ Page({
},
//接受跳转的路由参数(小程序页面跳转)
onRoute(options) {
console.log(options)
onRoute(options) {
if (!options || utils.isEmptyObj(options)) return
let { actNum = 0, activeNavIdx = 0, phone, hasPhoneNumber } = options
// wx.$Track.sendTrack()
this.setData({
actNum, //选中的场景下标
activeNavIdx, //选中的产品
......@@ -71,7 +69,6 @@ Page({
hasPhoneNumber:hasPhoneNumber
})
wx.$Track.sendTrack(this.data.trackList[this.data.actNum])
// console.log(this.data.senceData, 'senceData-----')
const senceList = productData[this.data.actNum].filter(item => item.name != '全部')
var proInfo = {}
for(let i = 0; i< senceList.length; i++) {
......@@ -86,8 +83,6 @@ Page({
proInfo
})
// console.log(this.data.proInfo, '---------proInfo')
// 设置转发标题
let userInfoObj = wx.$storage.get("userInfo")
// #服务商账号#取该分享者商户的联系人字段,无则取商户简称,无则取商户全称
......@@ -96,7 +91,6 @@ Page({
//分享数据
let item = proInfo
// console.log('title2',item.productName)
setTimeout(() => {
utils.setNavigationBarTitle(this.data.scenarList[actNum])
},100)
......@@ -104,8 +98,6 @@ Page({
onPageScroll: (function () {
let timer = null;
return function (e) {
// console.log(e)
// console.log("在滚动");
// 监听页面的滚动开始和结束
clearTimeout(timer);
timer = setTimeout(() => {
......@@ -129,7 +121,6 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad(options) {
console.log(options)
this.getActiveApiFn()
if (options && options.cardId) {
wx.$trackData = options
......@@ -195,7 +186,6 @@ Page({
const merchant = wx.$storage.get('scene').merchant || wx.$storage.get('scene').merchantId
const shareType = 'SHARE_SCEN'
const {actNum} = this.data
console.log('cardId', cardId, 'merchant', merchant)
return {
title: `给你分享一个合作场景介绍,戳我了解~`,
path: `packagesList/pages/scenarioDetail/scenarioDetail?cardId=${cardId}&merchant=${merchant}&shareType=${shareType}&actNum=${actNum}`
......
......@@ -35,14 +35,11 @@ Page({
* 生命周期函数--监听页面加载
*/
onLoad(options) {
console.log(options)
if (options && options.cardId) {
wx.$trackData = options
wx.$storage.set('scene', options)
console.log(productData[+options.scenIndex])
const spcList = [99]
const {videoIndex, scenIndex, name, leftMenuIndex, videoName } = options
console.logscenIndex
const res = {
index: videoIndex,
scenIndex: scenIndex,
......@@ -52,7 +49,6 @@ Page({
videoList: spcList.includes(+scenIndex) ? subscriptionSystemData[leftMenuIndex].videoList : productData[scenIndex][0].videoList,
videoUrl: spcList.includes(+scenIndex) ? subscriptionSystemData[leftMenuIndex].videoList[+videoIndex].videoUrl : productData[scenIndex][0].videoList[+videoIndex].videoUrl
}
console.log(res)
this.setData({
videoItem: res
})
......@@ -67,7 +63,6 @@ Page({
getApp()
.login()
.then(({ data }) => {
console.log(data)
if (data && data.phone) {
this.setData({
hasPhoneNumber: true,
......@@ -78,7 +73,6 @@ Page({
// wx.$Track.sendTrack(this.data.trackList[scenIndex][res.index])
} else {
wx.$router.getData(res => {
console.log(res)
this.setData({
videoItem: res,
isLoadding: false
......@@ -132,21 +126,17 @@ Page({
},
chooseVideo(e) {
console.log(e)
const {index, info: {name}} = e.detail
const {videoItem} = this.data
console.log(videoItem)
if (videoItem.name == '系统订阅') {
this.setData({
'videoItem.index': index
})
console.log(this.data.videoItem)
wx.$Track.sendTrack(this.data.systemTrackList[videoItem.leftMenuIndex][index])
} else if (videoItem.name == '增值转化') {
this.setData({
'videoItem.index': index
})
console.log(this.data.videoItem)
wx.$Track.sendTrack(this.data.trackList[videoItem.scenIndex][index])
}
setTimeout(() => {
......@@ -204,9 +194,7 @@ Page({
// merchantId 兼容旧链接
const merchant = wx.$storage.get('scene').merchant || wx.$storage.get('scene').merchantId
const shareType = 'SHARE_VIDEO'
console.log('cardId', cardId, 'merchant', merchant)
const {index, scenIndex, videoUrl, name, leftMenuIndex, videoName} = this.data.videoItem
console.log(this.data.videoItem)
return {
title: `您好,我向你分享了一个视频`,
path: `packagesList/pages/videoDetal/videoDetal?cardId=${cardId}&merchant=${merchant}&shareType=${shareType}&scenIndex=${scenIndex}&videoIndex=${index}&name=${name}&leftMenuIndex=${leftMenuIndex}&videoName=${videoName}`
......
......@@ -41,7 +41,6 @@ Component({
*/
methods: {
toActivity(e) {
console.log(this.data.current, e.target.dataset)
const {activityId} = e.target.dataset
wx.$router.go('/packagesList/pages/activityDetail/activityDetail',{hasPhoneNumber: this.properties.hasPhoneNumber})
}
......
......@@ -45,7 +45,6 @@ Component({
})
},
tapBanner(e) {
console.log(e)
let current = e.target.dataset.current
this.setData({
awardCurrent: current
......
......@@ -11,10 +11,7 @@ Component({
type: Object
},
productData: {
type: Object,
observer(n) {
console.log(n)
}
type: Object
},
hasPhoneNumber: {
type: Boolean,
......@@ -35,7 +32,6 @@ Component({
*/
methods: {
selectScenario(e) {
console.log(e)
const { index } = e.target.dataset
this.setData({
currentScen: index,
......@@ -47,11 +43,9 @@ Component({
wx.$router.go('/packagesList/pages/productDetail/productDetail')
},
videoClick(e) {
console.log(e)
const { index, info: {videoUrl} } = e.detail
const {currentScen, productData} = this.data
const videoList = productData[currentScen][0].videoList
console.log(videoList)
wx.$router.go('/packagesList/pages/videoDetal/videoDetal', {
index,
videoList,
......
......@@ -136,7 +136,6 @@ Page({
proClick(e) {
const { name } = e.target.dataset
let { detail } = e
console.log(detail)
let obj = {
name,
actNum: isNaN(detail.scenIndex) ? 99 : detail.scenIndex, //选中的场景 没有就是订阅系统的
......@@ -148,7 +147,6 @@ Page({
},
// 跳转视频详情
videoClick(e) {
console.log(e)
const { name } = e.target.dataset
const {
index,
......@@ -157,7 +155,6 @@ Page({
list
} = e.detail
const videoList = list
console.log(scenIndex)
const obj = {
index,
videoList,
......@@ -481,9 +478,7 @@ Page({
/** 系统订阅 */
sysMenuClick(e) {
console.log(e)
const {id} = e.detail
leftMenuIndex = id
console.log(1111, leftMenuIndex)
}
})
......@@ -153,9 +153,7 @@ class Router {
* 保留当前页面,跳转到应用内的某个页面。但是不能跳到 tabbar 页面。使用 $router.back() 可以返回到原页面。小程序中页面栈最多十层
*/
go(route, events) {
// console.log(route, events)
let { routerMapItem, query } = this.checkRouter(route, events)
// console.log(routerMapItem)
if (routerMapItem.isTab) {
wx.switchTab({
url: routerMapItem.url
......
......@@ -394,7 +394,6 @@ class Draw {
})
}
base64src(url).then(img => {
console.log('img', img)
createLocalImg(img, callBack)
})
}
......@@ -413,7 +412,6 @@ const createLocalImg = (url, callBack) => {
fail() {
wx.$util.showToast('图片生成失败,请稍后再试')
wx.hideLoading()
console.error(`图片转换本地失败,${url}`)
}
})
}
......
......@@ -244,7 +244,6 @@ class Draw {
padding,
fontSize
} = params
console.log(params)
let topX, topY, rightX, rightY, bottomX, bottomY, leftX, leftY, paddingX, paddingY
// if(padding && padding.length>1)
......@@ -433,7 +432,6 @@ const createLocalImg = (url, callBack) => {
icon: 'none'
})
wx.hideLoading()
console.error(`图片转换本地失败,${url}`)
}
})
}
......
......@@ -67,18 +67,10 @@ class TRACK {
}
/**设置埋点数据 */
setTrack(params, act_id = 1) {
console.log('---------------- 获取小程序启动时的参数 ----------------', wx.getLaunchOptionsSync())
let userInfo = wx.$storage.get('aicard_user_info')
console.log(this.getPageTitle(), userInfo)
// if (this.getPageTitle() == '广联数科智能名片') {
// console.log()
// this.sendTrack(trackData.HOME)
// }
}
/**发送埋点数据 */
sendTrack(p, info) {
console.log(info)
console.log(wx.$trackData);
const systemInfo = wx.$storage.get('aicard_system_info')
let params = {
method: 'entmicro.api.business.card.cardRecord',
......@@ -101,14 +93,12 @@ class TRACK {
}
params = Object.assign(params, userInfo, p)
console.log(params)
api.reportTrack(params).then(({
code,
data,
message
}) => {
if (code == 0) {
console.log('埋点设置成功')
}
})
}
......
......@@ -56,8 +56,6 @@ class Storage {
// 判断值是否是指定的对象值
let tmpKey = this.checkKeyType(key, 1)
let isObjectKey = STORAGE_OBJECTkEY[tmpKey]
// console.log(key)
// console.log(isObjectKey)
if (isObjectKey) {
return this.getObjectKeyValue(isObjectKey)
} else {
......@@ -112,7 +110,6 @@ class Storage {
wx.setStorageSync(tmpKey, tmpData)
resolve(sucMsg)
} catch (err) {
console.log(err)
reject(errMsg)
}
} else {
......@@ -123,7 +120,6 @@ class Storage {
resolve(sucMsg)
},
fail: err => {
console.log(err)
reject(errMsg)
}
})
......@@ -149,7 +145,6 @@ class Storage {
wx.clearStorageSync()
resolve(sucMsg)
} catch (err) {
console.log(err)
reject(errMsg)
}
} else {
......@@ -158,7 +153,6 @@ class Storage {
resolve(sucMsg)
},
fail: err => {
console.log(err)
reject(errMsg)
}
})
......@@ -170,7 +164,6 @@ class Storage {
wx.removeStorageSync(tmpKey)
resolve(sucMsg)
} catch (err) {
console.log(err)
reject(errMsg)
}
} else {
......@@ -180,7 +173,6 @@ class Storage {
resolve(sucMsg)
},
fail: err => {
console.log(err)
reject(errMsg)
}
})
......@@ -195,7 +187,6 @@ class Storage {
* @returns {String} 拼接后的值
*/
addEvnToKey = key => {
// return // console.log(this.environment)
return `${this.environment}_${key}`
}
}
......
// 实例化对象存储
import { Storage } from './storage'
const $Storage = new Storage()
// console.log($Storage)
/** */
export function getSessionId() {
return $Storage.get('sessionId')
......@@ -13,7 +12,6 @@ export function getUserInfo() {
return $Storage.get('userInfo')
}
export function setUserInfo(data) {
console.log(data)
$Storage.set('userInfo', data)
}
export function removeSystemStorage() {
......
......@@ -165,11 +165,11 @@ const trackData = {
},
SYSUSER: {
pageKey: 42,
pageName: "私域用户活跃代运营"
pageName: "客户活跃代运营"
},
SYSNUMBER: {
pageKey: 43,
pageName: "定保/续保数字化招揽"
pageName: "定保数字化招揽"
},
SYSCAR: {
pageKey: 44,
......
......@@ -129,7 +129,6 @@ const onReachBottom = (obj, callBack) => {
nothing
} = obj
if (!total && !pageNum) {
console.error('total&&pageNum为必传')
return
}
if (!pageSize) pageSize = 10
......@@ -451,14 +450,8 @@ const deepClone = (target) => {
const setNavigationBarTitle = (title) =>{
wx.getSystemInfo({
success: (res) => {
// console.log('++++++++++++++', res);
// console.log('title length',title.length)
let width = res.safeArea.width / res.fontSizeSetting;
// console.log('width: ', width);
let space = '';
// for (let i = 0; i <= width+4; i++) {
// space = space + ' ';
// }
width = width-(title.length)/2
......@@ -489,13 +482,10 @@ const setNavigationBarTitle = (title) =>{
};
// 解析参数成对象 "actNum=1&activeNavIdx=0&isShare=true"
const parseString = (str) => {
// console.log('str: ', str);
if (!str) return;
let obj = {};
let strArr = str.split("&");
// console.log('strArr: ', strArr);
strArr.forEach((item) => {
// console.log("item: ", item);
let keyArr = item.split("=");
obj[keyArr[0]] = keyArr[1];
});
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!