Commit 29f3deec by huahua

修改

parent ad6e9815
...@@ -20,8 +20,8 @@ ...@@ -20,8 +20,8 @@
<!-- 取消选中 --> <!-- 取消选中 -->
<view class="full-width full-height" style="position: absolute; top: 0; left: 0;" @click.stop="itemCancel"> <view class="full-width full-height" style="position: absolute; top: 0; left: 0;" @click.stop="itemCancel">
</view> </view>
<view class="container" @click='itemCancel' @touchmove.stop="touchMove" @touchend.stop="touchEnd" <view class="container" @click='itemCancel' @touchmove.stop="touchMove" @touchend.stop="touchEnd">
style="justify-content:center;"> <!-- style="justify-content:center;" -->
<!-- :style="{height: data.windowHeight + 'px'}" --> <!-- :style="{height: data.windowHeight + 'px'}" -->
<!-- style="background: #aa0000; height: 1000upx; " --> <!-- style="background: #aa0000; height: 1000upx; " -->
<!-- :style="{height: data.windowHeight +'400px'}" --> <!-- :style="{height: data.windowHeight +'400px'}" -->
...@@ -257,7 +257,6 @@ ...@@ -257,7 +257,6 @@
style="width: 84upx; height: 98upx;"></image> style="width: 84upx; height: 98upx;"></image>
</view> --> </view> -->
<!-- 拖拽删除图库 --> <!-- 拖拽删除图库 -->
<view v-if="delete_wrap_state" class="delete-wrap" :class="{'delete-wrap-active':deleteWrap}" <view v-if="delete_wrap_state" class="delete-wrap" :class="{'delete-wrap-active':deleteWrap}"
:animation="animationData"> :animation="animationData">
...@@ -287,7 +286,7 @@ ...@@ -287,7 +286,7 @@
</view> </view>
<!-- <view @click.stop='addItem' style="width: 466upx; height: 82upx; background: #F56364; border-radius: 10upx; font-size: 36upx; <!-- <view @click.stop='addItem' style="width: 466upx; height: 82upx; background: #F56364; border-radius: 10upx; font-size: 36upx;
font-weight: 400; color: #FFFFFF; text-align: center; line-height: 82upx; margin: 46upx auto 46upx; ">好的</view> --> font-weight: 400; color: #FFFFFF; text-align: center; line-height: 82upx; margin: 46upx auto 46upx; ">好的</view> -->
<view @click="selectPicturePop()" style="width: 466upx; height: 82upx; background: #854AC2; border-radius: 10upx; font-size: 36upx; font-weight: 400; <view @click="selectPicturePop()" style="width: 466upx; height: 82upx; background: #F29F3D; border-radius: 10upx; font-size: 36upx; font-weight: 400;
color: #FFFFFF; text-align: center; line-height: 82upx; margin: 46upx auto 46upx; "> color: #FFFFFF; text-align: center; line-height: 82upx; margin: 46upx auto 46upx; ">
好的</view> 好的</view>
</view> </view>
...@@ -306,11 +305,11 @@ ...@@ -306,11 +305,11 @@
<view class="tool_li"> <view class="tool_li">
<view class="tool_li" @click="showPopup(99)"> <view class="tool_li" @click="showPopup(99)">
<image class="tool_li_img" src="../../static/icon_diy_shoucang.png" mode=""></image> <image class="tool_li_img" src="../../static/icon_diy_shoucang.png" mode=""></image>
<view class="tool_li_text">收藏</view> <view class="tool_li_text">我的收藏</view>
</view> </view>
<view class="tool_li" @click="showPopup(23)"> <view class="tool_li" @click="showPopup(23)">
<image class="tool_li_img" src="../../static/icon_diy_wallpaper.png" mode=""></image> <image class="tool_li_img" src="../../static/icon_diy_wallpaper.png" mode=""></image>
<view class="tool_li_text">壁纸</view> <view class="tool_li_text">全幅壁纸</view>
</view> </view>
<view class="tool_li" @click="showPopup(2)"> <view class="tool_li" @click="showPopup(2)">
<image class="tool_li_img" src="../../static/icon/icon_stickers.png" mode=""></image> <image class="tool_li_img" src="../../static/icon/icon_stickers.png" mode=""></image>
...@@ -328,17 +327,17 @@ ...@@ -328,17 +327,17 @@
<view class="tool_li" @click="showone = !showone"> <view class="tool_li" @click="showone = !showone">
<image @click="cancel('share')" class="tool_li_img" <image @click="cancel('share')" class="tool_li_img"
src="../../static/icon_make_diy_back_color.png" mode=""></image> src="../../static/icon_make_diy_back_color.png" mode=""></image>
<view @click="cancel()" class="tool_li_text"></view> <view @click="cancel()" class="tool_li_text">上传相</view>
</view> </view>
<view class="tool_li" @click="showPopup(3)"> <view class="tool_li" @click="showPopup(3)">
<image class="tool_li_img" src="../../static/icon_diy_typeface.png" <image class="tool_li_img" src="../../static/icon_diy_typeface.png"
style="width: 45upx; height: 40upx;" mode=""></image> style="width: 45upx; height: 40upx;" mode=""></image>
<view @click="cancel()" class="tool_li_text">文字</view> <view @click="cancel()" class="tool_li_text">添加文字</view>
</view> </view>
<view class="tool_li" @click="ontuya()" v-if="machine_id"> <view class="tool_li" @click="ontuya()" v-if="machine_id">
<image class="tool_li_img" style="width: 62upx; height: 55upx;" src="../../static/icon_tuya.png" <image class="tool_li_img" style="width: 62upx; height: 55upx;" src="../../static/icon_tuya.png"
mode=""></image> mode=""></image>
<view class="tool_li_text">涂鸦</view> <view class="tool_li_text">添加涂鸦</view>
</view> </view>
<view class="tool_li" @click="wallpaperOnclick()" v-if="machine_id"> <view class="tool_li" @click="wallpaperOnclick()" v-if="machine_id">
<image class="tool_li_img" style="width: 71upx; height: 59upx;" <image class="tool_li_img" style="width: 71upx; height: 59upx;"
...@@ -356,6 +355,15 @@ ...@@ -356,6 +355,15 @@
src="../../static/diy_icon_replace_default.png" mode=""></image> src="../../static/diy_icon_replace_default.png" mode=""></image>
<view class="tool_li_text">清空底色</view> <view class="tool_li_text">清空底色</view>
</view> </view>
<image v-if="isShowGif && !guide_left" src="../../static/img/icon_finger_stretch.gif" style="width: 450upx; height: 450upx; left:calc(50% - 225upx); position: fixed;
top: calc(50% - 225upx);
z-index: 1000;
display: flex;
align-items: center;" @click="oclikGifImage()" @touchstart="oclikGifImage()">
</image>
<!-- <view style="height: 200upx;"></view> <!-- <view style="height: 200upx;"></view>
<view class="tool_li" v-if="background_color" @click.stop="background_color = null"> <view class="tool_li" v-if="background_color" @click.stop="background_color = null">
<image class="tool_li_img" style="width: 50upx; height: 50upx;" <image class="tool_li_img" style="width: 50upx; height: 50upx;"
...@@ -403,7 +411,7 @@ ...@@ -403,7 +411,7 @@
<!-- && data.itemList.length > 0 --> <!-- && data.itemList.length > 0 -->
<view v-if="!guide_left " <view v-if="!guide_left "
style="position: fixed; font-size: 22upx; color: #999999; bottom: 340upx;left: 50%;transform: translate(-50%, 0%);z-index: 999; "> style="position: fixed; font-size: 22upx; color: #999999; bottom: 340upx;left: 50%;transform: translate(-50%, 0%);z-index: 999; ">
<view>可用单指拖动,双指缩放</view> <view>单指拖拽,双指伸缩</view>
<!-- <view>双指可缩放</view> <!-- <view>双指可缩放</view>
<view>双击可裁剪</view> --> <view>双击可裁剪</view> -->
</view> </view>
...@@ -798,20 +806,26 @@ ...@@ -798,20 +806,26 @@
support_pay: null, //单机版是否支付 0不需要支付 1需要支付 support_pay: null, //单机版是否支付 0不需要支付 1需要支付
material_series_list: [], //系列分类 material_series_list: [], //系列分类
material_series_currentId: 0, material_series_currentId: 0,
isShowGif: false, //是否显示
}; };
}, },
created() { //设备信息 created() { //设备信息
let app = uni.getSystemInfoSync(); //设备信息 let app = uni.getSystemInfoSync(); //设备信息
let menuButtonInfo = uni.getMenuButtonBoundingClientRect(); //胶囊信息 let menuButtonInfo = uni.getMenuButtonBoundingClientRect(); //胶囊信息
this.textHeight = app.statusBarHeight + menuButtonInfo.height + (menuButtonInfo.top - app.statusBarHeight) * 2 this.textHeight = app.statusBarHeight + menuButtonInfo.height + (menuButtonInfo.top - app.statusBarHeight) * 2
// this.textTop = menuButtonInfo.top; // this.textTop = menuButtonInfo.top;
}, },
methods: { methods: {
//点击显示动画
oclikGifImage() {
this.isShowGif = false;
},
//涂鸦 //涂鸦
ontuya() { ontuya() {
this.$nextTick(() => { this.$nextTick(() => {
...@@ -894,6 +908,7 @@ ...@@ -894,6 +908,7 @@
//壁纸推荐 //壁纸推荐
wallpaperOnclick() { wallpaperOnclick() {
this.isShowGif = false;
var that = this var that = this
homeservice.queryList({ homeservice.queryList({
s: 'Material.randomMaterial', s: 'Material.randomMaterial',
...@@ -1404,6 +1419,7 @@ ...@@ -1404,6 +1419,7 @@
// height = _this.editor_top * 2 // height = _this.editor_top * 2
// } // }
// } // }
_this.isShowGif = true;
let index = items.length; let index = items.length;
items.push({ items.push({
support_zoom: 1, // 0是不支持缩放,为1时支持缩放 support_zoom: 1, // 0是不支持缩放,为1时支持缩放
...@@ -1503,6 +1519,7 @@ ...@@ -1503,6 +1519,7 @@
}, },
/* 生成作品 */ /* 生成作品 */
createWorks(e) { createWorks(e) {
this.isShowGif = false;
var that = this var that = this
if (this.$base.isclick == true) { if (this.$base.isclick == true) {
this.$base.isclick = false; this.$base.isclick = false;
...@@ -2287,9 +2304,9 @@ ...@@ -2287,9 +2304,9 @@
this.queryPage.shape_category_id = item.id this.queryPage.shape_category_id = item.id
this.currentId = index; this.currentId = index;
this.currentIndex = Math.max(0, index - 1); this.currentIndex = Math.max(0, index - 1);
/* this.$nextTick(() => { /*this.$nextTick(() => {
this.$refs['shapeScrollView'].open(this.queryPage) this.$refs['shapeScrollView'].open(this.queryPage)
}) */ })*/
} else if (this.e_active == 23) { //壁纸 } else if (this.e_active == 23) { //壁纸
this.currentId_wallpaper = index; this.currentId_wallpaper = index;
this.currentIndex_wallpaper = Math.max(0, index - 1); this.currentIndex_wallpaper = Math.max(0, index - 1);
...@@ -2397,7 +2414,6 @@ ...@@ -2397,7 +2414,6 @@
}, },
//打开弹框 1模板 2贴图 3字体 4编辑 22添加相框 23壁纸 //打开弹框 1模板 2贴图 3字体 4编辑 22添加相框 23壁纸
showPopup(e) { showPopup(e) {
this.isShowGif = false; this.isShowGif = false;
...@@ -2541,7 +2557,6 @@ ...@@ -2541,7 +2557,6 @@
} }
}) })
}) })
} }
}, },
...@@ -2696,6 +2711,7 @@ ...@@ -2696,6 +2711,7 @@
}, */ }, */
cancel(type) { //关闭弹框 cancel(type) { //关闭弹框
this.isShowGif = false;
this.$refs['show' + type].close() this.$refs['show' + type].close()
this.addtext = false this.addtext = false
if (wx.pageScrollTo) { if (wx.pageScrollTo) {
...@@ -3056,6 +3072,7 @@ ...@@ -3056,6 +3072,7 @@
}, },
/* 部件点击事件 */ /* 部件点击事件 */
itemClick(e) { itemClick(e) {
this.isShowGif = false;
// 循环数据找到点击点 // 循环数据找到点击点
for (let i = 0; i < items.length; i++) { for (let i = 0; i < items.length; i++) {
//关闭点击属性 //关闭点击属性
...@@ -3083,6 +3100,7 @@ ...@@ -3083,6 +3100,7 @@
}, },
/** 点击画布区域取消聚焦 */ /** 点击画布区域取消聚焦 */
itemCancel(e) { itemCancel(e) {
this.isShowGif = false;
if (items.length > 0) { if (items.length > 0) {
for (let i = 0; i < items.length; i++) { for (let i = 0; i < items.length; i++) {
items[i].active = false; items[i].active = false;
...@@ -3452,6 +3470,7 @@ ...@@ -3452,6 +3470,7 @@
removedeleteItem(item, ix) { removedeleteItem(item, ix) {
//this.active = false; //this.active = false;
//this.guide_left = false //this.guide_left = false
if (!this.active) {
index = items.length - 1 index = items.length - 1
items.splice(index, 1); // 删除指定的部件 items.splice(index, 1); // 删除指定的部件
this.setData({ this.setData({
...@@ -3459,11 +3478,15 @@ ...@@ -3459,11 +3478,15 @@
}); });
this.saveSnapshot(); this.saveSnapshot();
this.active = false; this.active = false;
} else {
this.deleteItem(item, ix);
}
}, },
/* 删除部件 */ /* 删除部件 */
deleteItem: function(item, ix) { deleteItem: function(item, ix) {
// 当前选中的部件 // 当前选中的部件
var currentItem = items[index]; var currentItem = items[index];
if (currentItem != null) {
// 判断删除的是否是模板组件 // 判断删除的是否是模板组件
if (currentItem.hasOwnProperty("works_id") && currentItem.works_id) { if (currentItem.hasOwnProperty("works_id") && currentItem.works_id) {
this.data.works_idlenght-- this.data.works_idlenght--
...@@ -3486,6 +3509,7 @@ ...@@ -3486,6 +3509,7 @@
this.setData({ this.setData({
'data': this.data 'data': this.data
}); });
}
this.saveSnapshot(); this.saveSnapshot();
this.active = false this.active = false
}, },
...@@ -3686,7 +3710,7 @@ ...@@ -3686,7 +3710,7 @@
}).then(result => { }).then(result => {
this.titlename = result.alias_name //修改头部名称 this.titlename = result.alias_name //修改头部名称
/*homeservice.newqueryList({ /*homeservice.newqueryList({
s: 'Product.getDat' s:'Product.getDat'
}).then(result => { */ }).then(result => { */
//this.data.goods_id = result.id // 商品id //this.data.goods_id = result.id // 商品id
//this.queryPage.goods_category_id = result.goods_category_id //星形接口列表增加,产品分类参数 //this.queryPage.goods_category_id = result.goods_category_id //星形接口列表增加,产品分类参数
...@@ -3709,6 +3733,9 @@ ...@@ -3709,6 +3733,9 @@
this.front_image_long = true this.front_image_long = true
} }
}) })
console.log("this.data.bgHeight=" + this.data.bgHeight);
this.data.bgImage = result.front_image // 背景图 this.data.bgImage = result.front_image // 背景图
this.data.bgImage_old = result.front_image_old // 旧背景图 this.data.bgImage_old = result.front_image_old // 旧背景图
this.data.bgImage_thumbnail = result.thumbnail // 介绍图片(主图遮罩) this.data.bgImage_thumbnail = result.thumbnail // 介绍图片(主图遮罩)
...@@ -3832,21 +3859,21 @@ ...@@ -3832,21 +3859,21 @@
}) })
} }
}).exec(); }).exec();
//that.deleteTop = 480;
this.infoListTouchEvent = infoListTouchEvent; this.infoListTouchEvent = infoListTouchEvent;
this.infoListTouchEvent.bind({ this.infoListTouchEvent.bind({
doubleTap: function(e) { doubleTap: function(e) {
this.isShowGif = false;
if (items[index].type == 0) { if (items[index].type == 0) {
that.state = true that.state = true
that.$refs.index.init(); that.$refs.index.init();
} }
}, },
tap: function(e) { tap: function(e) {
//console.log("items="+items.length)
if (items == null || items.length == 0) { if (items == null || items.length == 0) {
that.active = false; that.active = false;
that.guide_left = false that.guide_left = false
} } else {
that.isShowGif = false;
var curTime = e.timeStamp var curTime = e.timeStamp
var lastTime = e.currentTarget.dataset var lastTime = e.currentTarget.dataset
.time // 通过e.currentTarget.dataset.time 访问到绑定到该组件的自定义数据 .time // 通过e.currentTarget.dataset.time 访问到绑定到该组件的自定义数据
...@@ -3862,6 +3889,7 @@ ...@@ -3862,6 +3889,7 @@
} }
} }
that.lastTapTime = curTime that.lastTapTime = curTime
}
}, },
touchStart: function(e) { touchStart: function(e) {
that.isRotate = e.touches.length > 1; that.isRotate = e.touches.length > 1;
...@@ -3900,6 +3928,26 @@ ...@@ -3900,6 +3928,26 @@
}, },
touchCancel: function(e) { touchCancel: function(e) {
that.isShowGif = false;
that.$refs['textsettingsshare'].close()
if (items.length > 0) {
let item = items[index];
item.active = false
item.activeguide = false //辅助线
item.activescale = false // 旋转状态
item.activeedge = false // 边状态
that.data.itemList = items
that.data.listActive = false
that.active = false
that.guide_left = false;
that.deleteWrap = false
that.animation.bottom(-100).step()
that.setData({
animationData: that.animation.export()
})
}
}.bind(this), }.bind(this),
rotate: function(e) { //双指缩放 rotate: function(e) { //双指缩放
let item = items[index]; let item = items[index];
...@@ -3941,7 +3989,7 @@ ...@@ -3941,7 +3989,7 @@
that.data.windowWidth = res.windowWidth // 屏幕宽度 that.data.windowWidth = res.windowWidth // 屏幕宽度
that.data.windowHeight = res.windowHeight // 屏幕高度 that.data.windowHeight = res.windowHeight // 屏幕高度
that.data.bgWidth = res.windowWidth // 画布宽度 that.data.bgWidth = res.windowWidth // 画布宽度
that.data.bgHeight = res.windowHeight * (861 / 1196) // 画布高度 高度比率 * (861 / 1196) that.data.bgHeight = res.windowHeight // (861 / 1196) // 画布高度 高度比率 * (861 / 1196)
that.data.pixelRate = pixelRate // 屏幕宽度比率 that.data.pixelRate = pixelRate // 屏幕宽度比率
//if(options.machine_id != undefined) { // 判断是从设备进来 //if(options.machine_id != undefined) { // 判断是从设备进来
that.machine_id = options.machine_id || null // 设备id that.machine_id = options.machine_id || null // 设备id
......
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
:background="'none'"></myhead> :background="'none'"></myhead>
<view style="position: relative;width: 100%; height: 100%; z-index: 2;"> <view style="position: relative;width: 100%; height: 100%; z-index: 2;">
<!-- 轮播图 --> <!-- 轮播图 -->
<view v-if="statusloading == 1" class='swiper-box' style="width: 100%; height: 100%;"> <view v-if="statusloading == 1" class='swiper-box' style="width: 100%; height: 100%;">
<swiper :autoplay="true" :interval="3000" :duration="1000" @change="swiperChange" <swiper :autoplay="true" :interval="3000" :duration="1000" @change="swiperChange"
...@@ -25,13 +24,13 @@ ...@@ -25,13 +24,13 @@
</view> </view>
</view> </view>
<view @click="Customize_now" hover-class="hover-class-bg" style="position: fixed; bottom: 100upx; left: 0; right: 0; margin: auto; <view @click="Customize_now" hover-class="hover-class-bg" style="position: fixed; bottom: 100upx; left: 0; right: 0; margin: auto;
width: 300upx; height: 100upx; width: 300upx; height: 100upx;
background: linear-gradient(92deg, #F29F3D, #67C4CA); background: linear-gradient(92deg, #F29F3D, #67C4CA);
box-shadow: 0px 19px 48px 1px rgba(20, 31, 62, 0.35); box-shadow: 0px 19px 48px 1px rgba(20, 31, 62, 0.35);
border-radius: 40px;"> border-radius: 40px;">
<view style=" text-align: center; line-height: 100upx; font-size: 36upx; font-weight: 500; color: #FFFFFF;"> <view
style=" text-align: center; line-height: 100upx; font-size: 36upx; font-weight: 500; color: #FFFFFF;">
立即定制</view> 立即定制</view>
</view> </view>
</view> </view>
...@@ -68,7 +67,6 @@ ...@@ -68,7 +67,6 @@
<switchGoods ref="switchGoods" @selectGoodItem="selectGoodItem"></switchGoods> <switchGoods ref="switchGoods" @selectGoodItem="selectGoodItem"></switchGoods>
<!--//商品弹框 --> <!--//商品弹框 -->
</view> </view>
</template> </template>
...@@ -104,7 +102,7 @@ ...@@ -104,7 +102,7 @@
goods: [], //商品列表 goods: [], //商品列表
currentIndex: 0, currentIndex: 0,
selectItem: null, //选择对象 selectItem: null, //选择对象
name: "",
}; };
}, },
...@@ -113,17 +111,18 @@ ...@@ -113,17 +111,18 @@
//去排队列表 //去排队列表
toLineList() { toLineList() {
if (!this.$AppContext.checkLogin()) { if (!this.$AppContext.checkLogin()) {
this.tologo() this.tologo(2)
} else { } else {
uni.navigateTo({ uni.navigateTo({
url: '../mall/lineUp?machine_id='+this.machine_id+'&key=' + this.key url: '../mall/lineUp?machine_id=' + this.machine_id + '&key=' + this.key
}) })
} }
}, },
//选择商品进来 //选择商品进来
selectGoodItem(item) { selectGoodItem(item) {
uni.navigateTo({ uni.navigateTo({
url: '../index/index?machine_id='+this.machine_id+"&good_id=" +item.id, url: '../index/index?machine_id=' + this.machine_id + "&good_id=" + item.id,
}) })
}, },
...@@ -131,7 +130,7 @@ ...@@ -131,7 +130,7 @@
Customize_now() { Customize_now() {
let that = this; let that = this;
if (!this.$AppContext.checkLogin()) { if (!this.$AppContext.checkLogin()) {
this.tologo() this.tologo(1)
} else { } else {
this.$refs['switchGoods'].open(this.machine_id); this.$refs['switchGoods'].open(this.machine_id);
} }
...@@ -160,18 +159,26 @@ ...@@ -160,18 +159,26 @@
}, },
//授权登录 //授权登录
tologo() { tologo(type) {
// 先登陆 // 先登陆
let that = this; let that = this;
uni.login({ uni.login({
provider: 'weixin', provider: 'weixin',
success: (res) => { success: (res) => {
console.log(res)
//appcode: that.$Env.getappcode()
userService.login({ userService.login({
s: 'Init.init', s: 'Init.init',
code: res.code, code: res.code
appcode: that.$Env.getappcode()
}).then(r => { }).then(r => {
that.getDetail(); that.getDetail();
if (type == 1) {
that.$refs['switchGoods'].open(that.machine_id);
} else {
uni.navigateTo({
url: '../mall/lineUp?machine_id=' + that.machine_id + '&key=' + that.key
})
}
}).catch(err => { }).catch(err => {
that.$refs.Signin.init(); that.$refs.Signin.init();
}); });
......
...@@ -93,7 +93,7 @@ ...@@ -93,7 +93,7 @@
//作品详情 //作品详情
Worksdetail(item) { Worksdetail(item) {
console.log(item) //console.log(item)
this.$emit('Worksdetail', item) this.$emit('Worksdetail', item)
}, },
...@@ -122,25 +122,6 @@ ...@@ -122,25 +122,6 @@
uni.hideLoading(); uni.hideLoading();
}); });
} }
/* uni.showLoading({
title: '正在加载中...',mask: true
})
homeservice.WorksList(this.queryPage).then(result => {
this.Material_categorydatalist = this.Material_categorydatalist.concat(result.data)
this.datalist = this.datalist.concat(result.data)
this.queryPage.page += 1;
if (Math.ceil(result.total / result.per_page) <= this.queryPage.page) {
return setTimeout(() => {
uni.showToast({title: '没有更多数据了!',icon: 'none'});
}, 500);
}
uni.hideLoading();
}).catch(err => {
uni.showToast({title: err.msg,icon: 'none'})
uni.hideLoading();
}); */
}, },
interrupt(e) { interrupt(e) {
...@@ -188,9 +169,8 @@ ...@@ -188,9 +169,8 @@
loadData =true; loadData =true;
} }
} */ } */
let loadData = true;
let loadData = false; /* if (item.e == 23 || item.e == 2) {
if (item.e == 23 || item.e == 2) {
if (this.queryPage.material_category_id != null && this.queryPage.material_category_id != "" && this if (this.queryPage.material_category_id != null && this.queryPage.material_category_id != "" && this
.queryPage.material_category_id != "null") { .queryPage.material_category_id != "null") {
if (this.queryPage.material_category_id == item.queryPage.material_category_id) { if (this.queryPage.material_category_id == item.queryPage.material_category_id) {
...@@ -212,11 +192,10 @@ ...@@ -212,11 +192,10 @@
if (this.datalist ==null || this.datalist.length <= 0) { if (this.datalist ==null || this.datalist.length <= 0) {
loadData = true; loadData = true;
} }
} } */
/*if (this.datalist ==null || this.datalist.length <= 0) {
if (this.datalist ==null || this.datalist.length <= 0) {
loadData = true; loadData = true;
} } */
this.queryPage = { this.queryPage = {
s: item.queryPage.s, s: item.queryPage.s,
...@@ -230,7 +209,7 @@ ...@@ -230,7 +209,7 @@
material_series_id: item.queryPage.material_series_id, //贴图壁纸选择值二级分类 material_series_id: item.queryPage.material_series_id, //贴图壁纸选择值二级分类
is_new: item.queryPage.is_new, //最新 is_new: item.queryPage.is_new, //最新
is_hot: item.queryPage.is_hot, //热门 is_hot: item.queryPage.is_hot, //热门
goods_id: item.queryPage.goods_id, //商品id goods_id: "", //商品id
is_under: item.queryPage.is_under, //贴图是否为背景图 is_under: item.queryPage.is_under, //贴图是否为背景图
partner_id: item.queryPage.partner_id //代理 partner_id: item.queryPage.partner_id //代理
} }
......
...@@ -10,11 +10,6 @@ ...@@ -10,11 +10,6 @@
你的第一份爱的定制在这里开始 你的第一份爱的定制在这里开始
</view> </view>
<view class="footer_but"> <view class="footer_but">
<!-- <button open-type="getUserInfo" @getuserinfo="getUserInfo" lang="zh_CN">
<image src="../../static/icon_wechat.png" mode="aspectFill"
style="width: 34upx; height: 30upx;"></image>
<text style="margin-left: 13upx;">微信一键登录</text>
</button> -->
<!-- 小程序登录、用户信息相关接口调整 --> <!-- 小程序登录、用户信息相关接口调整 -->
<button class="buttonGetUserInfo" hover-class="hover-class-bg" v-if="canIUseGetUserProfile" <button class="buttonGetUserInfo" hover-class="hover-class-bg" v-if="canIUseGetUserProfile"
@tap="getUserProfile"> @tap="getUserProfile">
...@@ -61,27 +56,21 @@ ...@@ -61,27 +56,21 @@
getUserProfile(e) { getUserProfile(e) {
uni.getSetting({ uni.getSetting({
success(res){ success(res){
console.log('获取用户信息是否用户同意')
console.log(res.authSetting)
console.log(res.authSetting['scope.userInfo'])
} }
}) })
let that = this; let that = this;
// 推荐使用wx.getUserProfile获取用户信息,开发者每次通过该接口获取用户个人信息均需用户确认 //推荐使用wx.getUserProfile获取用户信息,开发者每次通过该接口获取用户个人信息均需用户确认
// 开发者妥善保管用户快速填写的头像昵称,避免重复弹窗 //开发者妥善保管用户快速填写的头像昵称,避免重复弹窗
wx.getUserProfile({ wx.getUserProfile({
lang:'zh_CN', lang:'zh_CN',
desc: '用于完善会员资料', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写 desc: '用于完善会员资料', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写
success: (Userres) => { success: (Userres) => {
console.log('getUserInfo 获取头像昵称')
console.log(Userres)
that.$base.Userres = Userres that.$base.Userres = Userres
uni.showLoading({title: '正在登录中...',mask: true}); uni.showLoading({title: '正在登录中...',mask: true});
uni.login({ uni.login({
provider: 'weixin', provider: 'weixin',
success: (weixinres) => { success: (weixinres) => {
console.log('uni.login')
console.log(weixinres)
if (weixinres.code) { if (weixinres.code) {
that.loginInfo = Userres.userInfo; that.loginInfo = Userres.userInfo;
that.loginInfo.encryptedData = Userres.encryptedData; that.loginInfo.encryptedData = Userres.encryptedData;
...@@ -105,7 +94,7 @@ ...@@ -105,7 +94,7 @@
uni.showToast({title: '登录成功',icon: 'none'}); uni.showToast({title: '登录成功',icon: 'none'});
if (that.code) { if (that.code) {
uni.redirectTo({ uni.redirectTo({
url: '../index/mall' url: '../index/machineDetail'
}) })
} else { } else {
uni.navigateBack(); uni.navigateBack();
...@@ -116,13 +105,11 @@ ...@@ -116,13 +105,11 @@
}) })
} else { } else {
uni.hideLoading(); uni.hideLoading();
console.log('登录失败!' + res.errMsg)
uni.showToast({title: '登录失败!',icon: 'none'}); uni.showToast({title: '登录失败!',icon: 'none'});
} }
}, },
fail: (err) => { fail: (err) => {
uni.hideLoading(); uni.hideLoading();
console.error('uni.login授权登录失败:' + JSON.stringify(err));
uni.showToast({title: '授权登录失败',icon: 'none'}); uni.showToast({title: '授权登录失败',icon: 'none'});
} }
}) })
...@@ -138,9 +125,9 @@ ...@@ -138,9 +125,9 @@
let that = this; let that = this;
uni.getSetting({ uni.getSetting({
success(res){ success(res){
console.log('获取用户信息是否用户同意') //console.log('获取用户信息是否用户同意')
console.log(res.authSetting) //console.log(res.authSetting)
console.log(res.authSetting['scope.userInfo']) //console.log(res.authSetting['scope.userInfo'])
} }
}) })
uni.getUserInfo({ uni.getUserInfo({
...@@ -152,8 +139,6 @@ ...@@ -152,8 +139,6 @@
uni.login({ uni.login({
provider: 'weixin', provider: 'weixin',
success: (weixinres) => { success: (weixinres) => {
console.log('uni.login')
console.log(weixinres)
if (weixinres.code) { if (weixinres.code) {
that.loginInfo = Userres.userInfo; that.loginInfo = Userres.userInfo;
that.loginInfo.encryptedData = Userres.encryptedData; that.loginInfo.encryptedData = Userres.encryptedData;
...@@ -177,7 +162,7 @@ ...@@ -177,7 +162,7 @@
uni.showToast({title: '登录成功',icon: 'none'}); uni.showToast({title: '登录成功',icon: 'none'});
if (that.code) { if (that.code) {
uni.redirectTo({ uni.redirectTo({
url: '../index/mall' url: '../index/machineDetail'
}) })
} else { } else {
uni.navigateBack(); uni.navigateBack();
...@@ -189,25 +174,23 @@ ...@@ -189,25 +174,23 @@
}) })
} else { } else {
uni.hideLoading(); uni.hideLoading();
console.error('uni.login授权登录失败:' + JSON.stringify(err));
uni.showToast({title: '授权登录失败',icon: 'none'}); uni.showToast({title: '授权登录失败',icon: 'none'});
} }
}, },
fail: (err) => { fail: (err) => {
uni.hideLoading(); uni.hideLoading();
console.error('授权登录失败:' + JSON.stringify(err));
uni.showToast({title: '授权登录失败',icon: 'none'}); uni.showToast({title: '授权登录失败',icon: 'none'});
} }
}) })
}, },
fail(err) { fail(err) {
uni.hideLoading(); uni.hideLoading();
console.log("wx.getUserProfile获取用户信息失败", err)
uni.showToast({title: '获取用户信息失败',icon: 'none'}); uni.showToast({title: '获取用户信息失败',icon: 'none'});
} }
}) })
}, },
// 打开权限设置页提示框
//打开权限设置页提示框
showSettingToast(e) { showSettingToast(e) {
const that = this const that = this
wx.showModal({ wx.showModal({
...@@ -218,7 +201,7 @@ ...@@ -218,7 +201,7 @@
content: e, content: e,
success: function(res) { success: function(res) {
if (res.confirm) { if (res.confirm) {
// /打开授权设置 ///打开授权设置
uni.openSetting({ uni.openSetting({
success(res) { success(res) {
if (res.authSetting['scope.userInfo']) { if (res.authSetting['scope.userInfo']) {
......
<template> <template>
<view class="colletion full-width"> <view class="colletion full-width">
<myhead :worksid="works_id" :title="'排队列表'" :color="'#131319'" :titleShow="true" :backShow="true" <myhead :worksid="works_id" :title="'排队列表'" :color="'#131319'" :titleShow="true" :backShow="true":background="'#fff'"></myhead>
:background="'#fff'"></myhead>
<!-- <view class="uni-tab-bar full-width">
<view class="content full-width" scroll-y>
<view v-if="LoupanList.length == 0 && stateindex == true">
<view class="noData">
<image src="../../static/icon_default_no.png" mode="aspectFill" class="noData_img"></image>
<view class="noData_title">
啊嘞,当前还没有打印任务呢<br>
<view class="noData_text">去定制一个作品吧</view>
</view>
<view class="noData_but" @click="tomain()">去定制</view>
</view>
</view>-->
<!-- position: absolute; -->
<view class="uni-tab-bar full-width"> <view class="uni-tab-bar full-width">
<!-- style="margin-top: 150upx;" -->
<view class="content full-width" scroll-y :style="{ marginTop : headheight + 'px'}"> <view class="content full-width" scroll-y :style="{ marginTop : headheight + 'px'}">
<!-- :style="{ top: headheight + 'px'}" -->
<view v-if="LoupanList.length == 0 && stateindex == true "> <view v-if="LoupanList.length == 0 && stateindex == true ">
<view class="noData"> <view class="noData">
<image src="../../static/icon_default_no.png" mode="aspectFill" class="noData_img"></image> <image src="../../static/icon_default_no.png" mode="aspectFill" class="noData_img"></image>
...@@ -36,40 +19,21 @@ ...@@ -36,40 +19,21 @@
margin: 20upx auto; border-radius: 10upx; " @click="self_help_payment(designer)" margin: 20upx auto; border-radius: 10upx; " @click="self_help_payment(designer)"
:style="{background: designer.status.value == 1 ? '#ffffff' :'#EEEEEE;'}"> :style="{background: designer.status.value == 1 ? '#ffffff' :'#EEEEEE;'}">
<view style=" display: flex; align-items: center;"> <view style=" display: flex; align-items: center;">
<view v-if="designer.user_id != userId" <view v-if="designer.user_id != userId"
style="margin:20upx 20upx;width: 140upx; height: 140upx; position: relative; overflow: hidden; opacity: 0.4; "> style="margin:20upx 20upx;width: 140upx; height: 140upx; position: relative; overflow: hidden; opacity: 0.3; ">
<!-- <image style="width: 140upx; height: 140upx;position: absolute; top: 0; left: 0; right: 0; bottom: 0;margin:auto; z-index: 1;"/> -->
<view style="width: 100%; height: 100%;border-radius: 20upx; background: #FFFFFF;"> <view style="width: 100%; height: 100%;border-radius: 20upx; background: #FFFFFF;">
<!-- src="../../static/img/icon_line_up_back.png"
mode="aspectFit" -->
<!-- </imag :src="designer.front_image_old" mode="aspectFit"> -->
</view> </view>
<image style="width: 70upx; height: 70upx; position: absolute; top: 0; left: 0; right: 0; bottom: 0; <image style="width: 70upx; height: 70upx; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
margin: auto; z-index:2;" :src="designer.works_image + '?x-oss-process=image/resize,lfit,w_300'" margin: auto; z-index:2;" :src="designer.works_image + '?x-oss-process=image/resize,lfit,w_300'"mode="aspectFit"></image>
mode="aspectFit"></image>
<!-- <image style="width: 140upx; height: 140upx;position: absolute; top: 0; left: 0; right: 0; bottom: 0;
margin:auto; z-index: 3;" :src="designer.front_image" mode="aspectFit"></image> -->
</view> </view>
<view v-if="designer.user_id == userId" <view v-if="designer.user_id == userId"
style="margin:20upx 20upx;width: 140upx; height: 140upx; position: relative; overflow: hidden; "> style="margin:20upx 20upx;width: 140upx; height: 140upx; position: relative; overflow: hidden; ">
<view style="width: 100%; height: 100%;border-radius: 20upx; background: #FFFFFF;"></view>
<!-- <image style="width: 140upx; height: 140upx;position: absolute; top: 0; left: 0; right: 0; bottom: 0;margin:auto; z-index: 1;"/> -->
<view style="width: 100%; height: 100%;border-radius: 20upx; background: #FFFFFF;">
</view>
<!-- :src="designer.front_image_old" mode="aspectFit"></image> --> <!-- :src="designer.front_image_old" mode="aspectFit"></image> -->
<image style="width: 70upx; height: 70upx; position: absolute; top: 0; left: 0; right: 0; bottom: 0; <image style="width: 70upx; height: 70upx; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
margin: auto; z-index:2;" :src="designer.works_image + '?x-oss-process=image/resize,lfit,w_300'" margin: auto; z-index:2;" :src="designer.works_image + '?x-oss-process=image/resize,lfit,w_300'"mode="aspectFit"></image>
mode="aspectFit"></image>
<!-- <image style="width: 140upx; height: 140upx;position: absolute; top: 0; left: 0; right: 0; bottom: 0;
margin:auto; z-index: 3;" :src="designer.front_image" mode="aspectFit"></image> -->
</view> </view>
<view style="width: calc(100% - 360upx);"> <view style="width: calc(100% - 360upx);">
...@@ -79,14 +43,9 @@ ...@@ -79,14 +43,9 @@
<view style="font-size: 24upx; color: #333333; margin-top: 30upx;"> <view style="font-size: 24upx; color: #333333; margin-top: 30upx;">
{{designer.goods_specs || ''}} {{designer.goods_specs || ''}}
</view> </view>
<!-- <view style="width: 90%;font-size: 32upx;">
{{designer.goods_specs || ''}}
</view> </view>
<view style="font-size: 24upx; color:#666666; margin-top: 30upx;">{{designer.create_time || ''}}</view> -->
</view> <view v-if="designer.status.value == 1" style="width: 136upx; height: 60upx;background: #F29F3D;opacity: 0.86;border-radius: 30px; margin-top: 70upx;">
<view v-if="designer.status.value == 1" style="width: 136upx; height: 60upx;background: #F29F3D;
opacity: 0.86;
border-radius: 30px; margin-top: 70upx;">
<view style="text-align: center; font-size: 26upx; color: #FFFFFF; line-height: 60upx;"> 打印中 <view style="text-align: center; font-size: 26upx; color: #FFFFFF; line-height: 60upx;"> 打印中
</view> </view>
</view> </view>
...@@ -97,12 +56,14 @@ border-radius: 30px; margin-top: 70upx;"> ...@@ -97,12 +56,14 @@ border-radius: 30px; margin-top: 70upx;">
</view> </view>
</view> </view>
</view> </view>
<!-- 提示 --> <!-- 提示 -->
<view v-if="sighstate"> <view v-if="sighstate">
<!-- background:rgba(0,0,0,0.6); -->
<view <view
style="position: fixed; z-index:999; width: 100%; height: 100%; background:rgba(0,0,0,0.6); top: 0;" style="position: fixed; z-index:999; width: 100%; height: 100%; top: 0; background:rgba(0,0,0,0.6);; justify-content: center;"
@click.stop="sighstate = false"></view> @click.stop="sighstate = false"></view>
<view style="position: fixed; z-index: 1000; top: 300upx; left: 0; right: 0; margin: auto; <view style="position: fixed; z-index: 1000; top: 52%; left: 50%; right: 0; margin: auto; transform: translate(-50%, -50%);
width: 558upx; height: 600upx; background: #FFFFFF; border-radius: 10upx; width: 558upx; height: 600upx; background: #FFFFFF; border-radius: 10upx;
display: flex; align-items: center; justify-content: center;"> display: flex; align-items: center; justify-content: center;">
<view style="position: absolute; <view style="position: absolute;
...@@ -114,10 +75,8 @@ border-radius: 30px; margin-top: 70upx;"> ...@@ -114,10 +75,8 @@ border-radius: 30px; margin-top: 70upx;">
<view v-if=" designer.goods_name == '背包' " style="width: 558upx;"> <view v-if=" designer.goods_name == '背包' " style="width: 558upx;">
<view style="display: flex; align-items: center; justify-content: center; <view style="display: flex; align-items: center; justify-content: center;
width: 100%; height: 360upx; "> width: 100%; height: 360upx; ">
<image :src="designer.works_image + '?x-oss-process=image/resize,lfit,w_80'" <image :src="designer.works_image + '?x-oss-process=image/resize,lfit,w_80'"mode="aspectFit" style="width:80upx; margin-left: 100upx;"></image>
mode="aspectFit" style="width:80upx; margin-left: 100upx;"></image> <image :src="designer.back_image + '?x-oss-process=image/resize,lfit,w_300'"mode="aspectFit" style=" width: 300upx;margin-left: -200upx;"></image>
<image :src="designer.back_image + '?x-oss-process=image/resize,lfit,w_300'"
mode="aspectFit" style=" width: 300upx;margin-left: -200upx;"></image>
</view> </view>
<view style="text-align: center; font-size: 36upx; margin-top: 58upx;">作品排队中</view> <view style="text-align: center; font-size: 36upx; margin-top: 58upx;">作品排队中</view>
<view style="text-align: center; font-size: 36upx;">如需要打印可与客服确认</view> <view style="text-align: center; font-size: 36upx;">如需要打印可与客服确认</view>
...@@ -152,10 +111,8 @@ border-radius: 30px; margin-top: 70upx;"> ...@@ -152,10 +111,8 @@ border-radius: 30px; margin-top: 70upx;">
<view v-if=" designer.goods_name == '单肩袋' " style="width: 558upx;"> <view v-if=" designer.goods_name == '单肩袋' " style="width: 558upx;">
<view style="display: flex; align-items: center; justify-content: center; <view style="display: flex; align-items: center; justify-content: center;
width: 100%; height: 360upx; "> width: 100%; height: 360upx; ">
<image :src="designer.works_image + '?x-oss-process=image/resize,lfit,w_140'" <image :src="designer.works_image + '?x-oss-process=image/resize,lfit,w_140'"mode="aspectFit" style="width:140upx; margin-left: 100upx;"></image>
mode="aspectFit" style="width:140upx; margin-left: 100upx;"></image> <image :src="designer.back_image + '?x-oss-process=image/resize,lfit,w_290'"mode="aspectFit" style=" width: 300upx;margin-left: -220upx;"></image>
<image :src="designer.back_image + '?x-oss-process=image/resize,lfit,w_290'"
mode="aspectFit" style=" width: 300upx;margin-left: -220upx;"></image>
</view> </view>
<view style="text-align: center; font-size: 36upx; margin-top: 58upx;">作品排队中</view> <view style="text-align: center; font-size: 36upx; margin-top: 58upx;">作品排队中</view>
<view style="text-align: center; font-size: 36upx;">如需要打印可与客服确认</view> <view style="text-align: center; font-size: 36upx;">如需要打印可与客服确认</view>
...@@ -166,10 +123,8 @@ border-radius: 30px; margin-top: 70upx;"> ...@@ -166,10 +123,8 @@ border-radius: 30px; margin-top: 70upx;">
style="width: 558upx;"> style="width: 558upx;">
<view style="display: flex; align-items: center; justify-content: center; <view style="display: flex; align-items: center; justify-content: center;
width: 100%; height: 360upx; "> width: 100%; height: 360upx; ">
<image :src="designer.works_image + '?x-oss-process=image/resize,lfit,w_100'" <image :src="designer.works_image + '?x-oss-process=image/resize,lfit,w_100'" mode="aspectFit" style="width:100upx; margin-left: 100upx;"></image>
mode="aspectFit" style="width:100upx; margin-left: 100upx;"></image> <image :src="designer.back_image + '?x-oss-process=image/resize,lfit,w_290'" mode="aspectFit" style=" width: 300upx;margin-left: -200upx;"></image>
<image :src="designer.back_image + '?x-oss-process=image/resize,lfit,w_290'"
mode="aspectFit" style=" width: 300upx;margin-left: -200upx;"></image>
</view> </view>
<view style="text-align: center; font-size: 36upx; margin-top: 58upx;">作品排队中</view> <view style="text-align: center; font-size: 36upx; margin-top: 58upx;">作品排队中</view>
<view style="text-align: center; font-size: 36upx;">如需要打印可与客服确认</view> <view style="text-align: center; font-size: 36upx;">如需要打印可与客服确认</view>
...@@ -268,7 +223,6 @@ border-radius: 30px; margin-top: 70upx;"> ...@@ -268,7 +223,6 @@ border-radius: 30px; margin-top: 70upx;">
}, },
loadGoodsList(direction) { loadGoodsList(direction) {
// uni.showLoading({ title: '加载中...' });
if (this.dataLoadState.pullDownRefresh || this.dataLoadState.reachBottom) return; if (this.dataLoadState.pullDownRefresh || this.dataLoadState.reachBottom) return;
this.dataLoadState.pullDownRefresh = direction === Enums.DATA_DIRECTION.UP; this.dataLoadState.pullDownRefresh = direction === Enums.DATA_DIRECTION.UP;
this.dataLoadState.reachBottom = direction === Enums.DATA_DIRECTION.DOWN; this.dataLoadState.reachBottom = direction === Enums.DATA_DIRECTION.DOWN;
...@@ -287,11 +241,7 @@ border-radius: 30px; margin-top: 70upx;"> ...@@ -287,11 +241,7 @@ border-radius: 30px; margin-top: 70upx;">
let obj = index + 1 let obj = index + 1
item.lineup = obj < 10 ? "0" + obj : obj item.lineup = obj < 10 ? "0" + obj : obj
}) })
this.LoupanList = result this.LoupanList = result
/* result.forEach((item, index) => {
this.LoupanList.push(item)
}) */
// 分页对象处理 // 分页对象处理
this.queryPage.total = result.total; this.queryPage.total = result.total;
this.queryPage.per_page = result.per_page; this.queryPage.per_page = result.per_page;
...@@ -324,7 +274,7 @@ border-radius: 30px; margin-top: 70upx;"> ...@@ -324,7 +274,7 @@ border-radius: 30px; margin-top: 70upx;">
} }
}, },
// 下拉加载 //下拉加载
onPullDownRefresh() { onPullDownRefresh() {
this.dataLoadState.pullDownRefresh = false; this.dataLoadState.pullDownRefresh = false;
this.dataLoadState.reachBottom = false; this.dataLoadState.reachBottom = false;
...@@ -335,9 +285,8 @@ border-radius: 30px; margin-top: 70upx;"> ...@@ -335,9 +285,8 @@ border-radius: 30px; margin-top: 70upx;">
this.loadGoodsList(Enums.DATA_DIRECTION.UP); this.loadGoodsList(Enums.DATA_DIRECTION.UP);
}, },
// 上拉加载 //上拉加载
onReachBottom() { onReachBottom() {
//console.log('上拉加载')
setTimeout(() => { setTimeout(() => {
uni.showToast({ uni.showToast({
title: '啊嘞,没有更多数据了!', title: '啊嘞,没有更多数据了!',
...@@ -352,9 +301,9 @@ border-radius: 30px; margin-top: 70upx;"> ...@@ -352,9 +301,9 @@ border-radius: 30px; margin-top: 70upx;">
this.LoupanList = [] this.LoupanList = []
this.queryPage.page = 1; this.queryPage.page = 1;
this.queryPage.total = 0; this.queryPage.total = 0;
var appUser = userService.getCacheAppUser(); var appUser = userService.getCacheUserInfo();
if (appUser != null) { if (appUser != null) {
this.userId = appUser.userInfo.id this.userId = appUser.id
} }
this.loadGoodsList(Enums.DATA_DIRECTION.UP); this.loadGoodsList(Enums.DATA_DIRECTION.UP);
this.statetime = setInterval(function() { this.statetime = setInterval(function() {
...@@ -366,7 +315,9 @@ border-radius: 30px; margin-top: 70upx;"> ...@@ -366,7 +315,9 @@ border-radius: 30px; margin-top: 70upx;">
}.bind(this), this.animMaind_time) }.bind(this), this.animMaind_time)
}, },
onShow() {}, onShow() {
},
created() { created() {
//设备信息 //设备信息
...@@ -381,15 +332,15 @@ border-radius: 30px; margin-top: 70upx;"> ...@@ -381,15 +332,15 @@ border-radius: 30px; margin-top: 70upx;">
let pages = getCurrentPages(); let pages = getCurrentPages();
if (pages[pages.length - 2].route == "pages/mine/order") { if (pages[pages.length - 2].route == "pages/mine/order") {
uni.reLaunch({ uni.reLaunch({
url: '../index/machineDetail?machine_id=' + this.queryPage.machine_id + '&worksid=1' url: '../index/machineDetail?machine_id=' + this.queryPage.machine_id
}) })
} else if (pages[pages.length - 2].route == "pages/mine/orderNew") { } else if (pages[pages.length - 2].route == "pages/mine/orderNew") {
uni.reLaunch({ uni.reLaunch({
url: '../index/machineDetail?machine_id=' + this.queryPage.machine_id + '&worksid=1' url: '../index/machineDetail?machine_id=' + this.queryPage.machine_id
}) })
} else if (pages[pages.length - 2].route == "pages/index/index") { } else if (pages[pages.length - 2].route == "pages/index/index") {
uni.reLaunch({ uni.reLaunch({
url: '../index/machineDetail?machine_id=' + this.queryPage.machine_id + '&worksid=1' url: '../index/machineDetail?machine_id=' + this.queryPage.machine_id
}) })
} }
......
...@@ -162,8 +162,8 @@ const $AppContext = { ...@@ -162,8 +162,8 @@ const $AppContext = {
from: this.$AppContext.getCurrentPage().route, from: this.$AppContext.getCurrentPage().route,
userCallBack userCallBack
} }
console.log('### navigateTo: ' + this.$AppContext.$Navigate.from) //console.log('### navigateTo: ' + this.$AppContext.$Navigate.from)
console.warn($nothing._copy(this.$AppContext.$Navigate)) //console.warn($nothing._copy(this.$AppContext.$Navigate))
this.$AppContext.$router.push({ this.$AppContext.$router.push({
path, path,
isTab, isTab,
...@@ -218,8 +218,8 @@ const $AppContext = { ...@@ -218,8 +218,8 @@ const $AppContext = {
from: this.$AppContext.getPreviousPage().route, from: this.$AppContext.getPreviousPage().route,
userCallBack userCallBack
} }
console.log('### replaceTo: ' + this.$AppContext.$Navigate.from) //console.log('### replaceTo: ' + this.$AppContext.$Navigate.from)
console.warn($nothing._copy(this.$AppContext.$Navigate)) //console.warn($nothing._copy(this.$AppContext.$Navigate))
this.$AppContext.$router.replace({ this.$AppContext.$router.replace({
path path
}, onComplete, onAbort, onSuccess) }, onComplete, onAbort, onSuccess)
......
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