Commit 29f3deec by huahua

修改

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