Commit 3de3fa98 authored by 李俊赕's avatar 李俊赕

增加global参数

parent 8a2015b3
......@@ -100,7 +100,18 @@
settleRecommend:'',
navHeight:0, //导航栏高度
rpxScreenHeight:0,// 照相视框高度
//拍照相关数据
photo:{
product:{
brandId:'', // 品牌id
brandName:'', // 品牌名称
classifyId:'', // 分类id
systemId:'', // 系统id
},
productList:[],
currentItem:null, // 选择的某一项
}
},
onLaunch: function() {
......
......@@ -8,7 +8,7 @@
{
"path": "pages/photo/product",
"style": {
"navigationBarTitleText": "扳手会工单规范",
"navigationBarTitleText": "拍照小工具",
"navigationBarBackgroundColor":"#FFFFFF",
"backgroundColor":"#F4F5F7"
}
......@@ -288,7 +288,7 @@
"query": "" //启动参数,在页面的onLoad函数里面得到
},{
"name": "拍照-规范", //模式名称
"path": "pages/photo/take", //启动页面,必选
"path": "pages/photo/product", //启动页面,必选
"query": "" //启动参数,在页面的onLoad函数里面得到
},{
"name": "基本信息", //模式名称
......
......@@ -97,9 +97,10 @@
},
handleData: function(res) {
const globalData = getApp().globalData
globalData.photo.productList = res.result
this.dataList = res.result
this.dataList.forEach(item => {
item.list.forEach(subItem => {
......@@ -139,7 +140,12 @@
//右侧点击
rightItemClick: function(item, ikey) {
console.log(item,'item')
const photo = getApp().globalData.photo
photo.currentItem = item
uni.navigateTo({
url:'/pages/photo/take'
})
// // for (let i = 0; i < this.rightList.length; i++) {
// // var subItem = this.rightList[i]
// // if(i == ikey){
......
......@@ -141,6 +141,12 @@
// 点击下一步
handleClick() {
// 点击下一步设置全局拍照品牌品类
const globalData = getApp().globalData
let keys = ['brandId','brandName','classifyId','systemId']
keys.map(key=>{
globalData.photo.product[key] = this[key] || this.param[key]
})
uni.navigateTo({
url: '/pages/photo/list' +
'?brandId=' + this.param.brandId +
......
......@@ -79,6 +79,8 @@
}
},
onLoad(e) {
const photo = getApp().globalData.photo
console.log(photo,'global-photo')
getApp().trackPage('拍照页')
// this.ctx = uni.createCameraContext();
this.waterInfo.date = this.getTime()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment