Commit 9cdf6526 by huahua

修改壁纸图片大小

parent 29f3deec
......@@ -7,7 +7,6 @@
num:0
},
onLaunch: function() {
// console.log('App Launch');
// 字体列表
homeservice.queryList({
s: 'Material.fontFamilyList'
......@@ -51,7 +50,6 @@
})
that.$base.typefacedata = that.globalData.typefacedata
if(that.globalData.num == that.globalData.typefacedata.length){
// console.log("加载字体耗时 "+ (new Date().getTime() - t1) +" 毫秒")
that.$base.typefacedata = that.globalData.typefacedata
}
that.globalData.num = 0
......@@ -63,7 +61,6 @@
});
},
onShow: function() {
console.log('App Show');
//调用监听网络状态的方法
wx.getNetworkType({
success: function(res) {
......@@ -78,7 +75,7 @@
})
},
onHide: function() {
console.log('App Hide');
//console.log('App Hide');
}
};
</script>
......
......@@ -73,10 +73,12 @@
},
methods: {
hide() {
//console.log("隐藏")
if (this.mode === 'insert' && this.position === 'middle') return;
this.$emit('hidePopup');
},
closeMask() {
//console.log("隐藏")
if (this.mode === 'insert') {
this.$emit('hidePopup');
}
......
{
"pages": [
/*{
"pages": [{
"path": "pages/index/mall",
"style": {
"navigationBarTitleText": "色彩高尔夫",
"navigationBarTitleText": "",
// "navigationStyle":"custom",//禁用uni-app默认的头部导航
"enablePullDownRefresh": true
"enablePullDownRefresh": true,
"navigationStyle": "custom"
}
}, */
},
/*{
"path": "pages/index/machineDetail",
"style": {
......@@ -19,7 +19,7 @@
{
"path": "pages/index/machineDetail",
"style": {
"navigationBarTitleText": "高尔夫定制",
"navigationBarTitleText": "",
"navigationStyle": "custom" //禁用uni-app默认的头部导航
}
......@@ -27,7 +27,7 @@
{
"path": "pages/index/index",
"style": {
"navigationBarTitleText": "高尔夫定制",
"navigationBarTitleText": "",
"navigationStyle": "custom" //禁用uni-app默认的头部导航
}
......@@ -65,18 +65,19 @@
},
{
"root": "pages/mine",
"pages": [
{
"pages": [{
"path": "self_help_payment_details",
"style": {
"navigationBarTitleText": "打印"
"navigationBarTitleText": "打印",
"navigationStyle": "custom"
}
},
{
"path": "self_help_payment_details_new",
"style": {
"navigationBarTitleText": "打印"
"navigationBarTitleText": "打印",
"navigationStyle": "custom"
}
},
......
......@@ -2,17 +2,27 @@
<uni-popup ref="Signincenter" type="bottom">
<view class='dialog-container'>
<!-- 遮罩 -->
<view style="position: fixed; top: 0; left: 0; width: 100%; height: 100%; opacity: 0.5; z-index: 998; background: #131319;"></view>
<view style="width: 100%; height: 440upx; background: #eeeeee; overflow: hidden; position: relative; z-index: 999; ">
<view
style="position: fixed; top: 0; left: 0; width: 100%; height: 100%; opacity: 0.5; z-index: 998; background: #131319;">
</view>
<view
style="width: 100%; height: 440upx; background: #eeeeee; overflow: hidden; position: relative; z-index: 999; ">
<view @click="cose()" style="position: absolute; top: 0; right: 0;">
<image style="height: 30upx; width: 30upx; margin: 20upx;" src="../../static/icon_guanbi.png" mode=""></image>
<image style="height: 30upx; width: 30upx; margin: 20upx;" src="../../static/icon_guanbi.png"
mode=""></image>
</view>
<image src="../../static/logo.jpg" mode="aspectFill" style="width: 109upx; height: 98upx; display: block; margin: 36upx auto 25upx;"></image>
<view style="text-align: center; font-size: 32upx; font-weight: 500; color: #131319;"> 欢迎来到{{startText}}小程序 </view>
<view style="margin-top: 10upx; text-align: center; font-size: 24upx; font-weight: 500; color: #888888;"> 为了更好的服务,需要得到您的授权 </view>
<image src="../../static/logo.jpg" mode="aspectFill"
style="width: 109upx; height: 98upx; display: block; margin: 36upx auto 25upx;"></image>
<view style="text-align: center; font-size: 32upx; font-weight: 500; color: #131319;">
欢迎来到{{startText}}小程序 </view>
<view
style="margin-top: 10upx; text-align: center; font-size: 24upx; font-weight: 500; color: #888888;">
为了更好的服务,需要得到您的授权 </view>
<!-- 小程序登录、用户信息相关接口调整 -->
<button class="buttonGetUserInfo cssbut" hover-class="hover-class-bg" v-if="canIUseGetUserProfile" @tap="getUserProfile"> 获取头像昵称 </button>
<button v-else open-type="getUserInfo" @getuserinfo="getUserInfo" lang="zh_CN" class="buttonGetUserInfo cssbut" hover-class="hover-class-bg"> 获取头像昵称 </button>
<button class="buttonGetUserInfo cssbut" hover-class="hover-class-bg" v-if="canIUseGetUserProfile"
@tap="getUserProfile"> 获取头像昵称 </button>
<button v-else open-type="getUserInfo" @getuserinfo="getUserInfo" lang="zh_CN"
class="buttonGetUserInfo cssbut" hover-class="hover-class-bg"> 获取头像昵称 </button>
</view>
</view>
</uni-popup>
......@@ -26,7 +36,7 @@
uniPopup
},
computed: {
startText(){
startText() {
return this.$Env.getmalltext()
},
},
......@@ -36,11 +46,11 @@
};
},
methods: {
cose(){
cose() {
this.$refs['Signincenter'].close()
// this.$emit('ok', true);
},
init(){
init() {
this.$nextTick(() => {
this.$refs['Signincenter'].open()
})
......@@ -50,7 +60,7 @@
},
getUserProfile(e) {
uni.getSetting({
success(res){
success(res) {
console.log('获取用户信息是否用户同意')
console.log(res.authSetting)
}
......@@ -59,13 +69,16 @@
// 推荐使用wx.getUserProfile获取用户信息,开发者每次通过该接口获取用户个人信息均需用户确认
// 开发者妥善保管用户快速填写的头像昵称,避免重复弹窗
wx.getUserProfile({
lang:'zh_CN',
lang: 'zh_CN',
desc: '用于完善会员资料', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写
success: (Userres) => {
console.log('getUserInfo 获取头像昵称')
console.log(Userres)
//console.log('getUserInfo 获取头像昵称')
//console.log(Userres)
that.$base.Userres = Userres
uni.showLoading({title: '正在登录中...',mask: true});
uni.showLoading({
title: '正在登录中...',
mask: true
});
uni.login({
provider: 'weixin',
success: (weixinres) => {
......@@ -82,39 +95,55 @@
s: 'Init.init',
code: that.loginInfo.code,
nickname: that.loginInfo.nickName || '微信用户',
gender:that.loginInfo.gender,
gender: that.loginInfo.gender,
portrait: that.loginInfo.avatarUrl,
encryptedData:that.loginInfo.encryptedData,
iv:that.loginInfo.iv,
promoter_id:that.$base.promoter_id ,// 推广的员的编号
machine_id:that.$base.machine_id,//用户进入设备id
encryptedData: that.loginInfo.encryptedData,
iv: that.loginInfo.iv,
promoter_id: that.$base.promoter_id, // 推广的员的编号
machine_id: that.$base.machine_id, //用户进入设备id
appcode: that.$Env.getappcode()
}).then(result => {
uni.hideLoading();
uni.showToast({title: '登录成功',icon: 'none'});
// that.$emit('ok', true);
uni.showToast({
title: '登录成功',
icon: 'none'
});
that.$refs['Signincenter'].close()
}).catch(err => {
uni.hideLoading();
uni.showToast({title: err.msg,icon: 'none'});
if (err) {
uni.showToast({
title: err.msg,
icon: 'none'
});
}
})
} else {
uni.hideLoading();
console.log('登录失败!' + res.errMsg)
uni.showToast({title: '登录失败!',icon: 'none'});
//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'});
//console.error('uni.login授权登录失败:' + JSON.stringify(err));
uni.showToast({
title: '授权登录失败',
icon: 'none'
});
}
})
},
fail(err) {
uni.hideLoading();
console.log("wx.getUserProfile获取用户信息失败", err)
uni.showToast({title: '获取用户信息失败',icon: 'none'});
uni.showToast({
title: '获取用户信息失败',
icon: 'none'
});
}
})
},
......@@ -126,7 +155,10 @@
console.log('getUserInfo 获取头像昵称')
console.log(Userres)
that.$base.Userres = Userres
uni.showLoading({title: '正在登录中...',mask: true});
uni.showLoading({
title: '正在登录中...',
mask: true
});
uni.login({
provider: 'weixin',
success: (weixinres) => {
......@@ -143,39 +175,54 @@
s: 'Init.init',
code: that.loginInfo.code,
nickname: that.loginInfo.nickName,
gender:that.loginInfo.gender,
gender: that.loginInfo.gender,
portrait: that.loginInfo.avatarUrl,
encryptedData:that.loginInfo.encryptedData,
iv:that.loginInfo.iv,
promoter_id:that.$base.promoter_id ,// 推广的员的编号
machine_id:that.$base.machine_id,//用户进入设备id
encryptedData: that.loginInfo.encryptedData,
iv: that.loginInfo.iv,
promoter_id: that.$base.promoter_id, // 推广的员的编号
machine_id: that.$base.machine_id, //用户进入设备id
appcode: that.$Env.getappcode()
}).then(result => {
uni.hideLoading();
uni.showToast({title: '登录成功',icon: 'none'});
uni.showToast({
title: '登录成功',
icon: 'none'
});
// that.$emit('ok', true);
that.$refs['Signincenter'].close()
}).catch(err => {
uni.hideLoading();
uni.showToast({title: err.msg,icon: 'none'});
uni.showToast({
title: err.msg,
icon: 'none'
});
})
} else {
uni.hideLoading();
console.error('uni.login授权登录失败:' + JSON.stringify(err));
uni.showToast({title: '授权登录失败',icon: 'none'});
uni.showToast({
title: '授权登录失败',
icon: 'none'
});
}
},
fail: (err) => {
uni.hideLoading();
console.error('授权登录失败:' + JSON.stringify(err));
uni.showToast({title: '授权登录失败',icon: 'none'});
uni.showToast({
title: '授权登录失败',
icon: 'none'
});
}
})
},
fail(err) {
uni.hideLoading();
console.log("wx.getUserProfile获取用户信息失败", err)
uni.showToast({title: '获取用户信息失败',icon: 'none'});
uni.showToast({
title: '获取用户信息失败',
icon: 'none'
});
}
})
......@@ -214,6 +261,7 @@
<style lang="scss">
@import "./css/main.css";
/* 去除button默认样式 */
.cssbut {
background-color: transparent !important;
......@@ -222,15 +270,18 @@
line-height: inherit !important;
border-radius: 0 !important;
}
.cssbut::after {
border: none !important;
}
/* 弹框 */
.dialog-container {
width: 100%;
height: 100%;
}
.buttonGetUserInfo{
.buttonGetUserInfo {
text-align: center !important;
margin: 49upx auto 0 !important;
line-height: 70upx !important;
......
<template>
<view v-if="showPopup" class="uni-popup" @touchmove.stop.prevent="clear">
<uni-transition :mode-class="['fade']" :styles="maskClass" :duration="duration" :show="showTrans" @click="onTap" />
<uni-transition :mode-class="ani" :styles="transClass" :duration="duration" :show="showTrans" @click="onTap">
<uni-transition :mode-class="ani" :styles="transClass" :duration="duration" :show="showTrans" @click="onTap" >
<view class="uni-popup__wrapper-box" @click.stop="clear">
<slot />
</view>
......@@ -45,7 +45,8 @@
maskClick: {
type: Boolean,
default: true
}
},
},
data() {
return {
......@@ -134,9 +135,9 @@
this.showTrans = true
}, 50);
})
this.$emit('change', {
/* this.$emit('change', {
show: true
})
}) */
},
close(type) {
this.showTrans = false
......
......@@ -3,9 +3,11 @@
<view class="head" :style="{ height: height + 'px', background:background}">
<view class="back" @click="back" v-if="backShow" :style="{ top: top + 'px', color:color }">
<image src="../../../static/recommend/icon_back_black.png" mode="aspectFit"
style="width: 32upx; height: 32upx; margin-top: calc((32px - 39upx)/2);margin-left: auto; margin-right: auto;"></image>
style="width: 40upx; height: 40upx; margin-top: 17upx;margin-left: auto; margin-right: auto;">
</image>
</view>
<view class="title" v-if="titleShow" :style="{ top: top + 'px', color:color, 'font-size': size + 'rpx' }">{{title}}</view>
<view class="title" v-if="titleShow" :style="{ top: top + 'px', color:color, 'font-size': size + 'rpx' }">
{{title}}</view>
</view>
</view>
</template>
......@@ -17,11 +19,11 @@
type: String,
default: '自定义标题'
},
size:{
size: {
type: String,
default: '32'
},
color:{
color: {
type: String,
default: '#000'
},
......@@ -33,15 +35,19 @@
type: Boolean,
default: true
},
background:{
background: {
type: String,
default: "linear-gradient(to right, #43e97b 0%, #38f9d7 100%)"
},
isBack: {
type: Boolean,
default: false,
}
},
data() {
return {
height :0,
top:0,
height: 0,
top: 0,
}
},
mounted() {
......@@ -52,12 +58,18 @@
let app = uni.getSystemInfoSync();
//胶囊信息
let menuButtonInfo = uni.getMenuButtonBoundingClientRect();
this.height = app.statusBarHeight + menuButtonInfo.height + (menuButtonInfo.top - app.statusBarHeight)*2
this.height = app.statusBarHeight + menuButtonInfo.height + (menuButtonInfo.top - app.statusBarHeight) * 2
this.top = menuButtonInfo.top;
},
methods: {
back(){
back() {
if (!this.isBack) {
uni.navigateBack();
} else {
uni.reLaunch({
url: '../index/mall'
})
}
}
},
onLoad(options) {
......@@ -70,20 +82,22 @@
</script>
<style>
.head{
.head {
position: fixed;
width: 750rpx;
z-index: 888;
align-items: center;
}
.title{
}
.title {
position: fixed;
width: 750rpx;
text-align: center;
line-height: 32px;
height: 32px;
}
.back{
}
.back {
position: fixed;
width: 81rpx;
text-align: center;
......@@ -93,5 +107,5 @@
font-weight: 900;
z-index: 9;
align-items: center;
}
}
</style>
<template>
<view class="full-width content-color full-height" style="overflow: hidden;background: #FFFFFF; ">
<view class="full-width full-height" style="background: #FFFFFF; ">
<!-- 自定义头部 -->
<!-- <myhead :worksid="works_id" :title="titlename" :color="'#fff'" :titleShow="true" :backShow="true" :background="'none'"></myhead> -->
......@@ -32,8 +32,13 @@
<view :style="{width: data.bgWidth +'px',height: data.bgHeight +'px' }" style="position: relative; ">
<!-- background: #ffaa00; -->
<!-- 底图 -->
<!-- <image :src="data.bgImage_old" mode="widthFix"
:style="{width: data.bgWidth +'px',height: data.bgWidth +'px' }"
style="position: absolute; z-index: 0; top: 0; bottom: 0; margin: auto;"></image> -->
<image :src="data.bgImage_old" mode="widthFix"
:style="{width: data.bgWidth +'px',height: data.bgWidth +'px'}"
:style="{width: (data.bgWidth - 30) +'px',height: data.bgWidth +'px' ,left: '15px'}"
style="position: absolute; z-index: 0; top: 0; bottom: 0; margin: auto;"></image>
<!-- background: #007AFF; -->
<!-- 底色 -->
......@@ -47,9 +52,13 @@
style="position: absolute; top: 0; bottom: 0; left: 0; right: 0;margin: auto;z-index: 1;">
</view>
<!-- <image :src="data.bgImage" mode="widthFix"
:style="{width: data.bgWidth +'px',height: data.bgWidth +'px'}"
style="position: absolute; z-index: 2; top: 0; bottom: 0; margin: auto;"></image> -->
<!-- 遮罩图 -->
<image :src="data.bgImage" mode="widthFix"
:style="{width: data.bgWidth +'px',height: data.bgWidth +'px'}"
:style="{width: (data.bgWidth - 30 ) +'px',height: data.bgWidth +'px',left: '15px'}"
style="position: absolute; z-index: 2; top: 0; bottom: 0; margin: auto;"></image>
<!-- 辅助线 -->
<view v-if="guide_left"
......@@ -227,10 +236,14 @@
</block>
</view>
</view>
<!-- 计算字体 -->
<!-- , maxWidth: data.editorWidth + 'px' -->
<!-- data.itemList[data.cidx].width -->
<!-- 计算字体大小 -->
<view class='item-box' style='top:-1000px;left:-1000px;'>
<!-- <view class='item-box' style='top:100px;left:100px;background: #007AFF;'> -->
<view class='item-box-in'
:style="{width: data.itemList[data.cidx].width + 'px' ,height: data.itemList[data.cidx].height +'px'}"
:style="{width:data.editorWidth + 'px' ,height: data.itemList[data.cidx].height +'px'}"
style="text-align: center;">
<view id="item-text" class="item-text" :style="{'font-weight': data.itemList[data.cidx].font_style ,
'font-size': data.itemList[data.cidx].font_size+ 'px',color:data.itemList[data.cidx].font_color,
......@@ -243,11 +256,11 @@
<view class="operation" v-if="!active && !guide_left">
<view class="operation_top">
<image @click.stop='prev' src="../../static/icon_back_enabled.png" mode="aspectFill"
style="width: 89upx; height: 88upx;"></image>
style="width: 96upx; height: 96upx;"></image>
</view>
<view class="operation_bottom">
<image @click.stop='next' src="../../static/icon_nextstep.png" mode="aspectFill"
style="width: 89upx; height: 88upx;"></image>
style="width: 96upx; height: 96upx;"></image>
</view>
</view>
<!-- 切换商品 -->
......@@ -356,7 +369,6 @@
<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;
......@@ -410,7 +422,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; ">
style="position: fixed; font-size: 22upx; color: #999999; bottom: 280upx;left: 50%;transform: translate(-50%, 0%);z-index: 999; ">
<view>单指拖拽,双指伸缩</view>
<!-- <view>双指可缩放</view>
<view>双击可裁剪</view> -->
......@@ -725,7 +737,7 @@
works_id: null, //作品id
machine_id: null, //设备id
key: null, //1直营配送站 2 万能通用版 3色彩自助站
design_color: '#131319',
design_color: '#fff',
mix_scale: 1, //图片比率
design_width: 240,
design_height: 340,
......@@ -807,7 +819,6 @@
material_series_list: [], //系列分类
material_series_currentId: 0,
isShowGif: false, //是否显示
};
},
......@@ -821,11 +832,11 @@
methods: {
//点击显示动画
oclikGifImage() {
this.isShowGif = false;
},
//涂鸦
ontuya() {
this.$nextTick(() => {
......@@ -2712,7 +2723,11 @@
cancel(type) { //关闭弹框
this.isShowGif = false;
try {
this.$refs['show' + type].close()
} catch (e) {
}
this.addtext = false
if (wx.pageScrollTo) {
wx.pageScrollTo({
......@@ -2743,8 +2758,21 @@
}
},
//关闭所有弹窗回调事件
change(e) {
if (items != null && items.length >= 1) {
var index = items.length - 1;
var item = items[index];
if (item != undefined && item.type == 1) {
if (items[index].content == "" || items[index].content == null) {
items.splice(index, 1); // 删除指定的部件
this.setData({
'data': this.data
});
this.active = false;
}
}
}
},
togglePopup(type, open) { //打开弹框
......@@ -2794,6 +2822,7 @@
var query = wx.createSelectorQuery();
query.select('#item-text').boundingClientRect();
query.exec(function(res) {
//console.log(res)
var width = res[0].width;
var rate = item.width / width;
var tmpSize = item.font_size * rate;
......@@ -3488,7 +3517,7 @@
var currentItem = items[index];
if (currentItem != null) {
// 判断删除的是否是模板组件
if (currentItem.hasOwnProperty("works_id") && currentItem.works_id) {
if (currentItem.works_id) {
this.data.works_idlenght--
}
let zIndex = items[index].index;
......@@ -3563,8 +3592,17 @@
},
async text_awaitone(e) {
// 获取当前选中的部件
if (e.detail.value == '' || e.detail.value == null) {
var item = items[index];
if (item != null) {
this.deleteItem();
}
return;
}
var item = items[index];
item.content = e.detail.value;
var that = this;
//赋值
this.data.currentText = e.detail.value
......@@ -3575,9 +3613,13 @@
var query = wx.createSelectorQuery();
query.select('#item-text').boundingClientRect();
query.exec(function(res) {
/* console.log(res) */
var width = res[0].width;
var rate = item.width / width;
var tmpSize = item.font_size * rate;
/* console.log("tmpSizewidth=" + width + "item.width=" + item.width + "diyWidth=" + that.data
.editorWidth) */
//console.log("输入tmpSize大小=" + tmpSize)
if (tmpSize > maxFontSize) {
item.font_size = maxFontSize;
item.height = maxFontSize * heightRate;
......@@ -3595,6 +3637,8 @@
})
},
async text_await(e) {
// 获取当前选中的部件
var item = items[index];
if (e.detail.value != item.content) {
......@@ -3609,18 +3653,40 @@
var query = wx.createSelectorQuery();
query.select('#item-text').boundingClientRect();
query.exec(function(res) {
console.log(res)
var width = res[0].width;
var rate = item.width / width;
/* console.log(res)
console.log("输入tmpSizewidth=" + width + "item.width=" + item.width + "diyWidth=" + that
.data.editorWidth)*/
var tmpSize = item.font_size * rate;
/* console.log("输入tmpSize大小=" + tmpSize) */
if (tmpSize > maxFontSize) {
item.font_size = maxFontSize;
item.height = maxFontSize * heightRate;
item.top = item.y - (item.height / 2);
/* } else if (tmpSize < 11) { //判断字体小于10等于10
let differWid = 0;
if (width > item.width) {
differWid = width - item.width;
var fontSize = 10 - differWid / 10;
item.font_size = fontSize;
item.height = fontSize * heightRate;
item.top = item.y - (item.height / 2);
} else {
item.font_size = 9;
item.height = 9 * heightRate;
item.top = item.y - (item.height / 2);
} */
} else {
item.font_size = item.font_size * rate;
item.height = item.height * rate;
item.top = item.y - (item.height / 2);
}
// that.setData({itemList:items});
that.setData({
data: that.data
......@@ -3708,12 +3774,8 @@
s: 'Product.detail',
id: this.data.goods_id
}).then(result => {
this.titlename = result.alias_name //修改头部名称
/*homeservice.newqueryList({
s:'Product.getDat'
}).then(result => { */
//this.data.goods_id = result.id // 商品id
//this.queryPage.goods_category_id = result.goods_category_id //星形接口列表增加,产品分类参数
this.titlename = result.name //修改头部名称
//读取背景图
uni.getImageInfo({
src: result.front_image_old,
......@@ -3734,10 +3796,10 @@
}
})
console.log("this.data.bgHeight=" + this.data.bgHeight);
//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_old = result.front_image;
this.data.bgImage_thumbnail = result.thumbnail // 介绍图片(主图遮罩)
this.design_color = result.design_color // 背景颜色
this.mix_scale = result.mix_scale //上传图片比率
......@@ -4048,10 +4110,14 @@
page {
width: 100%;
height: 100%;
background: #FFFFFF
}
.page {
background: #FFFFFF !important;
background: #FFFFFF;
width: 100%;
height: 100%;
}
/* 图片 */
......
......@@ -143,7 +143,7 @@ const drag = {
wx.vibrateShort(); // 使手机振动15ms
}
}else if(item.top > -5 && item.top < 5) { //上边框
console.log('top')
//console.log('top')
if(item.top < 5 && item.top > 0){ //上边框偏下
if(Marginleft < item.height){ //上边框放大
item.initialScale = item.initialScale * (item.height + item.top) / item.height
......@@ -180,7 +180,7 @@ const drag = {
let newRightTopPoint = this.getRotatedPoint(item.rightTopPoint, item.centerPos, -item.angle)
let newWidth = newRightTopPoint.x - newLeftBottomPoint.x
let newHeight = newLeftBottomPoint.y - newRightTopPoint.y
// if (item.isScale) {开启等比例缩放
//if(item.isScale) {开启等比例缩放
if (newWidth / newHeight > item.scaleone) {
newLeftBottomPoint.x = newLeftBottomPoint.x + Math.abs(newWidth - newHeight * item.scaleone)
newWidth = newHeight * item.scaleone
......@@ -202,7 +202,7 @@ const drag = {
newHeight = newLeftBottomPoint.y - newRightTopPoint.y
let scaleWidth = newWidth / item.width
let scaleHeight = newHeight / item.height
// }
//}
if (newHeight <= minwheight) {
newHeight = minwheight
newWidth = Math.floor(newHeight * item.scaleone)
......@@ -224,7 +224,7 @@ const drag = {
item.top = newRightTopPoint.y
item.width = newWidth
item.height = newHeight
// 修改初始化原始图片比率-坐标
//修改初始化原始图片比率-坐标
item.initialScale = item.initialScale * scaleWidth
item.initialscaling = item.initialscaling * scaleWidth
if(item.image_left < 0){
......
<template>
<view class="full-width full-height">
<!-- 自定义头部 -->
<myhead :worksid="worksid" :title="myheadtext" :color="'#fff'" :titleShow="true" :backShow="false"
<myhead :worksid="worksid" :title="myheadtext" :color="'#fff'" :titleShow="true" :backShow="true" :isBack ="true"
:background="'none'"></myhead>
<view style="position: relative;width: 100%; height: 100%; z-index: 2;">
......@@ -14,17 +14,21 @@
:src="item.content + '?x-oss-process=image/resize,lfit,w_750'" mode="aspectFill"></image>
</swiper-item>
</swiper>
<view style="position: fixed; bottom: 232upx; text-align: center;left: 0; right: 0;">
<view style="position: fixed; bottom: 60upx; text-align: center;left: 0; right: 0;">
<view class="dots">
<view v-for="(item, index) in Adlists" class="dot-wrapper" :key="index">
<view class="dot iconfont"
<image v-if="index == currentSwiper" src="../../static/icon_banner_dot.png"
style="width: 15upx; height: 15upx; margin-left: 10upx;"></image>
<image else src="../../static/icon_banner_select_dot.png"
style="width: 15upx; height: 15upx; margin-left: 10upx;"></image>
<!-- <view class="dot iconfont"
:class="[index == currentSwiper ? 'iconsanjiaoxing':'iconxingzhuang-sanjiaoxing' ]">
</view>
</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: 130upx; 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);
......@@ -34,6 +38,7 @@
立即定制</view>
</view>
</view>
<!-- 错误提示信息 -->
<view v-if="statusloading == 2" style="min-height: 100%;background: #131319 !important;">
<view class="start" style="padding-bottom: 100upx; padding-top: 200upx;">
......@@ -165,8 +170,7 @@
uni.login({
provider: 'weixin',
success: (res) => {
console.log(res)
//appcode: that.$Env.getappcode()
//console.log(res)
userService.login({
s: 'Init.init',
code: res.code
......@@ -176,7 +180,8 @@
that.$refs['switchGoods'].open(that.machine_id);
} else {
uni.navigateTo({
url: '../mall/lineUp?machine_id=' + that.machine_id + '&key=' + that.key
url: '../mall/lineUp?machine_id=' + that.machine_id +
'&key=' + that.key
})
}
}).catch(err => {
......@@ -228,7 +233,7 @@
Adlist() {
homeservice.queryList({
s: 'Ad.list',
ad_position_key: 'currency_banner',
ad_position_key: 'index_top',
machine_id: this.machine_id
}).then(result => {
this.Adlists = result
......@@ -241,31 +246,19 @@
});
});
},
//获取商品列表
getGooods() {
homeservice.queryList({
s: 'Product.getCommonGoods', //新接口
}).then(result => {
this.goods = result;
this.selectItem = this.goods[this.currentIndex];
//this.$refs['brandscenter'].open();
}).catch(err => {
uni.showToast({
title: err.msg,
icon: 'none'
});
});
},
},
//上拉刷新
onReachBottom() {},
onReachBottom() {
},
//下拉加载
onPullDownRefresh() {
this.getDetail() //获取数据
},
// 分享转发
//分享转发
onShareAppMessage(options) {
var that = this;
// 设置转发内容
......@@ -281,35 +274,19 @@
},
onLoad(options) {
// console.log(options)
//if(options.machine_id){
this.machine_id = this.$Env.getmachineId();
if (options.machine_id) {
this.machine_id = options.machine_id;
}
this.myheadtext = this.machine_id + "-定制";
this.$base.machine_id = this.machine_id
this.statusloading = 1;
//this.getDetail() //获取数据
this.Adlist() // 轮播图
this.getGooods()
// console.log("进来="+this.machine_id)
//}
/* if(options.worksid){ //控制导航返回
this.worksid = options.worksid
} */
// 自定义获取二维码的携带的链接信息
/* if (options.q) {
let qrUrl = decodeURIComponent(options.q)
this.machine_id = this.getQueryString(qrUrl, 'machine_id')
this.$base.promoter_id = this.getQueryString(qrUrl, 'promoter_id')
// console.log(this.machine_id)
// console.log(this.$base.promoter_id)
// wx.setNavigationBarTitle({title: '色彩站' + machine_id })
this.$base.machine_id = this.machine_id
this.getDetail() //获取数据
this.Adlist()// 轮播图
} */
},
onShow() {},
onHide() {}
};
</script>
......@@ -325,7 +302,7 @@
height: 100%;
background: #FFFFFF;
// 错误提示信息
//错误提示信息
.start {
.start_img {
width: 260upx;
......
......@@ -2,7 +2,7 @@
<view class="full-width full-height">
<!-- v-if="system_config.golf_diy.value == 0" -->
<!-- v-if="system_config.golf_diy.value == 0" -->
<view v-if="system_config.golf_diy.value == 0" @tap="doubleTap" @touchstart="touchStart" @touchend="touchEnd"
<view v-if="system_config.lite_diy.value == 0" @tap="doubleTap" @touchstart="touchStart" @touchend="touchEnd"
style="position: fixed; z-index: 99; right: 0; bottom: 524upx; display: flex;align-items: center;justify-content: center;
width: 100upx; height: 88upx; background: #43cf7c; border-radius: 44upx 0px 0px 44upx;">
<view style="font-size: 24upx; font-weight: 800; color: #FFFFFF;">
......@@ -10,30 +10,23 @@
<view>体验</view>
</view>
</view>
<!-- <view @click="Uploadpictures()"
style="position: fixed; z-index: 99; right: 0; bottom: 724upx; display: flex;align-items: center;justify-content: center;
width: 100upx; height: 88upx; background: #43cf7c; border-radius: 44upx 0px 0px 44upx;">
<view style="font-size: 24upx; font-weight: 800; color: #FFFFFF;">
<view>导入微信聊天图片</view>
</view>
</view> -->
<!-- 无设备 -->
<view style="display: flex; justify-content: center;" :style="{height: 'calc(100% - ' + titleHeight +'px)'}">
<view style="margin-top: 231upx;">
<image src="../../static/icon_diy.png" mode="" style="width: 513upx; height: 251upx;"></image>
<view class="start_title" style="margin-top: 60upx;">定制站必须扫码才能使用</view>
<view class="start_title" style="margin-top: 120upx;">定制站必须扫码才能使用</view>
</view>
</view>
<!-- 扫码定制 -->
<view @click="scanning" style="width: 460upx; position: fixed; bottom: 100upx; margin: auto;
height: 164upx; background: rgba(92, 230, 181, 0.4); left: 0; right: 0; z-index: 99; border-radius: 20upx;
<view @click="scanning" style="width: 460upx; position: fixed; bottom: 180upx; margin: auto;
height: 164upx; background: #FAD9B1 ; left: 0; right: 0; z-index: 99; border-radius: 20upx;
display: flex; align-items: center;">
<view style="background: #FFFFFF;width: 120upx;
height: 120upx;border-radius: 50%; margin: 22upx 30upx;text-align: center;">
<image style="height: 61upx; width: 61upx;margin:32upx auto;" src="../../static/icon_saoyisao.png"
mode=""></image>
<image style="height: 61upx; width: 61upx;margin:32upx auto;" src="../../static/icon_saoyisao.png" mode=""></image>
</view>
<view style="color: #FFFFFF; font-size: 36upx;">开始扫码定制</view>
<view style="color: #333333 ; font-weight: bold;font-size: 33upx;">开始扫码定制</view>
</view>
<!-- 登录弹框 -->
<Signin ref="Signin"></Signin>
......@@ -48,7 +41,9 @@
components: {
Signin
},
computed: {},
computed: {
},
data() {
return {
titleHeight: 0,
......@@ -73,7 +68,6 @@
// res.tempFiles.forEach(item => {
// tempFilePaths.push(item.path)
// })
// var size = res.tempFiles[0].size;
// var path = res.tempFiles[0].path;
// var formatImage = path.split(".")[(path.split(".")).length - 1];
......@@ -180,7 +174,8 @@
if (res.scanType == 'QR_CODE') {
if (that.getQueryString(res.result, 'machine_id')) {
uni.navigateTo({
url: '../mall/machineDetail?machine_id=' + that.getQueryString(res.result, 'machine_id')
url: '../index/machineDetail?machine_id=' + that.getQueryString(
res.result, 'machine_id')
});
} else {
uni.showToast({
......@@ -193,7 +188,8 @@
if (res.path) {
if (that.getQueryString(res.path, 'machine_id')) {
uni.navigateTo({
url: '../mall/machineDetail?machine_id=' + that.getQueryString(res.path, 'machine_id')
url: '../index/machineDetail?machine_id=' + that
.getQueryString(res.path, 'machine_id')
});
} else {
uni.showToast({
......@@ -225,6 +221,7 @@
this.touchEndTime = e.timeStamp;
},
doubleTap(e) {
//console.log("doubleTap=");
// 控制点击事件在350ms内触发,加这层判断是为了防止长按时会触发点击事件
if (this.touchEndTime - this.touchStartTime < 350) {
// 当前点击的时间
......@@ -237,18 +234,19 @@
if (!this.$AppContext.checkLogin()) {
this.tologo('navigateTo')
} else {
//console.log("进来=");
uni.navigateTo({
url: '../mall/machineDetail?machine_id=' + this.$Env.getmachineId() + '&worksid=0'
url: '../index/machineDetail?machine_id=' + this.$Env.getmachineId()
});
// uni.navigateTo({
//uni.navigateTo({
// url: '../index/index',
// })
//})
}
}
}
},
tologo(e) {
// 先登陆
//先登陆
let that = this;
uni.login({
provider: 'weixin',
......@@ -260,7 +258,8 @@
}).then(r => {
if (e == 'navigateTo') {
uni.navigateTo({
url: '../mall/machineDetail?machine_id=' + that.$Env.getmachineId() + '&worksid=0'
url: '../mall/machineDetail?machine_id=' + that.$Env
.getmachineId() + '&worksid=0'
});
}
}).catch(err => {
......@@ -353,7 +352,7 @@
@import "./css/main.css";
page {
background: #141319 !important;
background: #ffffff !important;
width: 100%;
margin: 0;
padding: 0;
......@@ -363,7 +362,7 @@
text-align: center;
font-size: 36upx;
font-weight: 400;
color: #FFFFFF;
color: #333333;
line-height: 20upx;
}
</style>
......@@ -10,15 +10,14 @@
</template>
<template slot="content">
<view style="width:100%; margin: auto; height:calc(100% - 40upx); overflow: hidden;">
<view style="float: left; width: calc(100% / 3); margin: 40upx 0 0;"
<view style="float: left; width: calc(100% / 3); margin: 10upx 0 10upx;"
v-for="(item, index) in datalist" :key="index" @click="Worksdetail(item)">
<view style="width: 148.5upx; height: 204.6upx;margin: auto; position: relative;">
<image style="width: 148.5upx; height: 148.5upx; margin: auto;"
<view style="width: 139upx; height: 255upx; margin: auto; position: relative;">
<image
style="width: 139upx; height: 255upx; margin: auto; border-radius: 14px; overflow: hidden;"
:src="(item.image ? item.image:item.url) + '?x-oss-process=image/resize,lfit,w_112'"
mode="aspectFit"></image>
<view v-if="Number(item.price) > 0" style="min-width: 39upx; position: absolute; top: 0; right: 0;
background: #EF5354; border-radius: 8upx 0upx 11upx 8upx; text-align: center; padding: 2upx 8upx;
font-size: 18upx; font-weight: bold; color: #FFFFFF;">{{item.price}}</view>
</view>
</view>
<view class="align-center"
......@@ -70,6 +69,8 @@
is_new: null, //最新
is_hot: null, //热门
machine_id: null, //设备id
material_category_id: "", //
material_series_id: "",
},
Material_categorydatalist: [], //作品、贴图列表
datalist: [], //作品、贴图列表
......@@ -80,7 +81,7 @@
/* 控制位置 */
tip: '',
scrollViewTop: 0, //滑动高度
e: 0, // 弹窗类型
e: 0, //弹窗类型
};
},
mounted() {
......@@ -124,13 +125,19 @@
}
},
//刷新中
interrupt(e) {
this.tip = '刷新中'
//模拟发送请求
setTimeout(e, 500);
this.tip = '刷新成功';
this.queryPage.page = 1
//this.getShapeList()
if (this.type == 99) {
this.queryCollectionPage.page = 1;
this.getExcellentMaterial(this.item.queryPage)
} else {
this.getShapeList()
}
},
//释放刷新
......@@ -155,24 +162,10 @@
this.type = 0;
this.e = item.e;
this.scrollViewTop = 0;
/* let loadData = false;
if (this.queryPage.material_category_id != null && this.queryPage.material_category_id != "" ) {
if (this.queryPage.material_category_id == item.queryPage.material_category_id) {
if (this.queryPage.material_series_id != item.queryPage.material_series_id) {
loadData = true;
}
} else {
loadData = true;
}
}else{
if(this.datalist.length <= 0 ){
loadData =true;
}
} */
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") {
//let loadData = true;
let loadData = false;
if (item.e == 23 || item.e == 2) {
if (this.queryPage.material_category_id == item.queryPage.material_category_id) {
if (this.queryPage.material_series_id != item.queryPage.material_series_id) {
loadData = true;
......@@ -180,22 +173,19 @@
} else {
loadData = true;
}
} else {
if (this.datalist ==null || this.datalist.length <= 0) {
if (this.datalist == null || this.datalist.length == 0) {
loadData = true;
}
}
} else if (item.e == 99) {
if (this.currentId != item.queryPage.currentId || this.currentId == -1) {
loadData = true;
}
if (this.datalist ==null || this.datalist.length <= 0) {
if (this.datalist == null || this.datalist.length == 0) {
loadData = true;
}
} */
/*if (this.datalist ==null || this.datalist.length <= 0) {
loadData = true;
} */
}
this.queryPage = {
s: item.queryPage.s,
......@@ -230,10 +220,10 @@
this.showState = true;
}
} else if (item.e == 99) { //点赞贴图
this.type = 99;
if (loadData) {
this.scrollViewTop = 0;
this.oldScrollViewTop = 0;
this.type = 99;
this.queryCollectionPage = {
page: 1,
limit: 25
......@@ -269,6 +259,46 @@
});
},
getExcellentMaterialMore(e) {
uni.showLoading({
title: '正在加载中...'
})
let url = ''
if (e.currentId == 0) url = '/douyin/Material/getMeMaterial'
else if (e.currentId == 1) url = '/douyin/Material/getMeCollection'
else if (e.currentId == 2) url = '/douyin/Material/getFollowMaterials'
this.$http.post(url, this.queryCollectionPage).then(result => {
this.showState = true
if (result.data == null || result.data == "") {
uni.showToast({
title: '没有更多数据了!',
icon: 'none'
});
} else {
this.Material_categorydatalist = this.Material_categorydatalist.concat(result.data.data);
this.datalist = this.datalist.concat(result.data.data);
this.queryCollectionPage.page += 1;
if (Math.ceil(result.total / result.per_page) <= this.queryCollectionPage.page) {
return setTimeout(() => {
uni.showToast({
title: '没有更多数据了!',
icon: 'none'
});
}, 500);
}
}
uni.hideLoading();
}).catch(err => {
this.showState = true
uni.showToast({
title: err.msg,
icon: 'none'
})
uni.hideLoading();
});
},
//获取条件
getExcellentMaterial(e) {
this.datalist = []
......@@ -284,7 +314,7 @@
this.showState = true
this.Material_categorydatalist = result.data.data
this.datalist = result.data.data;
this.queryPage.page += 1;
this.queryCollectionPage.page += 1;
uni.hideLoading();
this.tip = '';
}).catch(err => {
......
<template>
<view v-if="isShow" style=" position: absolute; top: 0; width: 100%; height: 100%; display: flex; flex-direction: column; " @click="closeView()">
<view v-if="isShow"
style=" position: absolute; top: 0; width: 100%; height: 100%; display: flex; flex-direction: column; "
@click="closeView()">
<view
style="position: absolute; top: 0; width: 100%; height: 100%; background: #999999; z-index: 999; opacity: 0.5; ">
</view>
<view
style=" position: absolute;
top: calc(50% - 400upx);
height: 800upx;
<view style=" position: absolute;
top: calc(50% - 620upx);
height: 1250upx;
width: 100%;
margin:auto;
display: flex;
flex-direction: column;
justify-content: center;
z-index: 999;">
<swiper class="swiper-block" :indicator-dots="false" :autoplay="false" :interval="3000" :duration="1000"
<scroll-view scroll-y scroll-with-animation style="box-sizing: border-box;white-space: nowrap;
width: 700upx; margin:0 auto; overflow: hidden; height: 100%;">
<view v-for="(item,index) in goods" :key="index" @click="goodclick(item)">
<view style="float: left; margin: 10upx;
display: flex;align-items: center;
background: #fff;border-radius: 15upx; position: relative;
height: 300upx; width: 210upx;" hover-class="brandactive" :class="[brandtext == item.title ? 'brandactive':'' ]">
<image mode="widthFix" style="width:calc(100% - 60upx);margin: auto;"
:src="item.goods_pic + '?x-oss-process=image/resize,lfit,w_700'"></image>
<!-- front_image -->
<!-- :src="item.goods_pic + '?x-oss-process=image/resize,lfit,w_700'"></image> -->
<view style="text-align: center; font-size: 24upx; width: 100%;
color:#333; position: absolute; bottom: 20upx; ">
{{item !=null ? item.name : ''}}
</view>
</view>
</view>
</scroll-view>
<!-- <swiper class="swiper-block" :indicator-dots="false" :autoplay="false" :interval="3000" :duration="1000"
circular='false' previous-margin='80rpx' next-margin='80rpx' :current="currentIndex"
@change="swiperChangeGood">
<swiper-item class="swiper-item" v-for="(item,index) in goods" :key="index" >
<view @click="goodclick(item)" :class="['slide-image', currentIndex === index?'active':'']" mode="aspectFill"
style="justify-content: center; align-items: center; ">
<image :src="item.front_image + '?x-oss-process=image/resize,lfit,w_450'"
<image :src="item.front_image_old + '?x-oss-process=image/resize,lfit,w_450'"
style="width: 450upx; position: absolute;left: 50%;top:50%;transform: translate(-50%,-50%);"
mode="widthFix">
</image>
......@@ -31,7 +53,7 @@
{{item !=null ? item.name : ''}}
</view>
</swiper-item>
</swiper>
</swiper> -->
</view>
</view>
......@@ -52,7 +74,7 @@
s: 'Material.list',
},
goods: [], //商品列表
machine_id:null, //机器码
machine_id: null, //机器码
};
},
mounted() {},
......@@ -73,7 +95,7 @@
goodclick(e) {
this.isShow = false;
this.goodtext = e.name //选择商品名
this.$emit('selectGoodItem',{
this.$emit('selectGoodItem', {
id: e.id,
})
},
......@@ -89,9 +111,19 @@
let that = this;
homeservice.queryList({
s: 'Product.getCommonGoods', //新接口
machine_id: this.machine_id, //机器码
}).then(result => {
this.goods = result;
if (this.goods == null || this.goods == "") {
this.isShow = false;
uni.showToast({
title: "设备号不存在,或者没配置商品",
icon: 'none'
});
} else {
this.isShow = true;
}
}).catch(err => {
this.isShow = false;
uni.showToast({
......
......@@ -17,7 +17,6 @@
</view>
</view>
<view style="width: 100%; background: #292933;">
<!-- 字体 -->
......@@ -25,7 +24,7 @@
height: 98upx;">
<view style="width: 601upx; height: 57upx; background: rgb(255,255,255,0.1); margin: 21upx 41upx 21upx 21upx; border-radius: 10upx;">
<input :fixed="true" :auto-height="true" :show-confirm-bar="false" :cursor-spacing="73" :adjust-position="false"
type="text" maxlength="32" @input="textInput" :value="data.currentText" @focus="focusTextarea" @blur="blurTextarea"
type="text" maxlength="20" @input="textInput" :value="data.currentText" @focus="focusTextarea" @blur="blurTextarea"
placeholder="请输入文字内容..." style="font-size: 34upx; font-weight: 400; height: 57upx; line-height: 57upx; padding: 0upx 0 0upx 20upx; color: #FFFFFF;" />
</view>
<view style="width: 1px; height: 28upx; background: #FFFFFF;"></view>
......@@ -67,7 +66,6 @@
<image style="width: 69upx; height: 69upx; display: block;margin: auto;" :src="bg_text_color ? '../../static/icon/icon_qiehuan_one.png' : '../../static/icon/icon_qiehuan.png'"
mode="aspectFill"></image>
</view> -->
<!-- 颜色 开始-->
<!-- <scroll-view style="box-sizing: border-box; white-space: nowrap; margin: 10upx 0; " scroll-x scroll-with-animation >
<view style="text-align: center; display: inline-block; padding-left: 20upx;" v-for="(item,index) in colorList" :key="index" @click.stop="workcolor(item.color)">
......
......@@ -36,7 +36,7 @@
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);">
<view style="width: calc(100% - 330upx);">
<view style="width: 90%;font-size: 28upx;">
<text style="font-size: 36upx;">{{designer.id || ''}}</text>
</view>
......@@ -61,18 +61,18 @@
<view v-if="sighstate">
<!-- background:rgba(0,0,0,0.6); -->
<view
style="position: fixed; z-index:999; width: 100%; height: 100%; top: 0; background:rgba(0,0,0,0.6);; justify-content: center;"
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: 52%; left: 50%; right: 0; margin: auto; transform: translate(-50%, -50%);
width: 558upx; height: 600upx; background: #FFFFFF; border-radius: 10upx;
width: 558upx; height: 650upx; background: #FFFFFF; border-radius: 10upx;
display: flex; align-items: center; justify-content: center;">
<view style="position: absolute;
top: 0; right: 0;" @click="sighstate = false">
<image src="../../static/icon_guanbi.png" mode=""
style="width: 26upx; height: 26upx; padding: 12upx 22upx;"></image>
style="width: 26upx; height: 26upx; padding: 20upx; "></image>
</view>
<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;
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>
......@@ -80,12 +80,12 @@
</view>
<view style="text-align: center; font-size: 36upx; margin-top: 58upx;">作品排队中</view>
<view style="text-align: center; font-size: 36upx;">如需要打印可与客服确认</view>
</view>
</view> -->
<!-- goods_name=马卡龙 -->
<view v-if=" designer.goods_name == '马卡龙' " style="width: 558upx;">
<view v-if=" designer.goods_name == '马卡龙' " style="width: 558upx; margin-top: 60upx; ">
<view style="display: flex; align-items: center; justify-content: center;
width: 500upx; height: 350upx; position: relative; margin: auto;">
width: 500upx; height: 340upx; position: relative; margin: auto;">
<view style="width: 100%; height: 100%; display: flex; border: 1px solid #09BB07;">
<view style="width: calc(100% / 4); height: 100%;" v-for="item in 4" :key="a">
<view v-for="item in 3" :key="b"
......@@ -106,28 +106,44 @@
</view>
<view style="text-align: center; font-size: 36upx; margin-top: 58upx;">作品排队中</view>
<view style="text-align: center; font-size: 36upx;">如需要打印可与客服确认</view>
<view v-if="designer.user_id == userId " @click="toOrderDetail(designer)" style="width: 135upx; height: 55upx;background: #E7BC15;
border-radius: 40upx;
color: #FFFFFF;
margin:10upx auto;
text-align: center;
padding:auto;
padding-top: 15upx;">查看详情</view>
</view>
<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;
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>
</view>
<view style="text-align: center; font-size: 36upx; margin-top: 58upx;">作品排队中</view>
<view style="text-align: center; font-size: 36upx;">如需要打印可与客服确认</view>
</view>
</view> -->
<view
v-if=" designer.goods_name != '背包' && designer.goods_name != '马卡龙' && designer.goods_name != '单肩袋' "
<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_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; "></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>
<view v-if="designer.user_id == userId " @click="toOrderDetail(designer)" style="width: 135upx; height: 55upx;background: #E7BC15;
border-radius: 40upx;
color: #FFFFFF;
margin:10upx auto;
text-align: center;
padding:auto;
padding-top: 15upx;">查看详情</view>
</view>
</view>
......@@ -173,6 +189,32 @@
};
},
methods: {
//订单详情
toOrderDetail(item) {
this.sighstate = false;
var url = this.$Env.getBaseURL();
var envVersionName = "trial";
if (url.indexOf("colorpark") != -1) {
envVersionName = "release";
}
wx.navigateToMiniProgram({
appId: this.$Env.getappId(),
path: '/pages/mine/self_help_payment_details?orderId=' + item.order_id +
'&type=null&machine_id=' + item.machine_id,
extraData: {
foo: 'bar'
},
envVersion: envVersionName,
success(res) {
// 打开成功
},
fail(res) {
console.log("打开小程序失败")
}
});
},
self_help_payment(designer) {
if (designer.user_id != this.userId) {
return;
......@@ -181,7 +223,7 @@
machine_id: this.queryPage.machine_id,
s: 'machine.newDetail',
}).then(res => {
if (designer.status.value == 1) {
/* if (designer.status.value == 1) {
if (designer.goods_name == "马卡龙") {
this.clearIntervalTime()
uni.navigateTo({
......@@ -195,12 +237,11 @@
'&type= 2' + '&machine_id=' + this.queryPage.machine_id
})
}
} else {
} else { */
if (this.sighstate == true) return;
this.designer = designer
this.sighstate = true
}
/* } */
}).catch(err => {
uni.showToast({
title: '设备休息中',
......@@ -242,12 +283,12 @@
item.lineup = obj < 10 ? "0" + obj : obj
})
this.LoupanList = result
// 分页对象处理
//分页对象处理
this.queryPage.total = result.total;
this.queryPage.per_page = result.per_page;
// 停止当前页面下拉刷新
//停止当前页面下拉刷新
if (this.dataLoadState.pullDownRefresh) uni.stopPullDownRefresh();
// 数据加载状态处理 false
//数据加载状态处理 false
this.dataLoadState.pullDownRefresh = false;
this.dataLoadState.reachBottom = false;
......@@ -343,8 +384,8 @@
url: '../index/machineDetail?machine_id=' + this.queryPage.machine_id
})
}
}
};
</script>
......
<template>
<view class="full-width full-height" :style="{overflow: isReady ? 'hidden' : 'scroll' }">
<view class="full-width full-height" :style="{overflow: isReady ? 'hidden' : 'scroll' }" style="overflow: hidden;background: #FFFFFF; ">
<myhead :title="ddddd" :color="'#131319'" :titleShow="true" :backShow="true"
:background="'#fff'"></myhead>
<!-- 打印机音乐 -->
<audio src="https://img.colorpark.cn/wechat/ring2.m4a" :action="ringaction" controls loop
style="opacity: 0; position: absolute;"></audio>
......@@ -16,7 +25,7 @@
https://img.colorpark.cn/wechat/track/fukuanquGolf.png
https://img.colorpark.cn/wechat/track/paiduiquGolf.png
https://img.colorpark.cn/wechat/track/shejiquGolf.png -->
<view style="height:100%;width: 100%; overflow: hidden;">
<view style="height:100%;width: 100%; overflow: hidden; margin-top: 280upx;">
<!-- goods.status.value 订单状态(0:等待生产,1:生产中,2: 生产完成,3:取消生产,4:出料中(弃用),5: 等待取料(弃用), 6:待入货(弃用),7:取货完成,8:已发货,9:订单完成) "-->
<view :animation="BoxTwoAnimation" style="width: 100%; height: 100%;"
v-if="(orderOrderStatusData.status == 0 || orderOrderStatusData.status == 1 || orderOrderStatusData.status == 10 || orderOrderStatusData.status == 2) && type != 1 && LoadState">
......@@ -415,8 +424,11 @@
<script>
import homeservice from '@/service/homeservice.js'
import myhead from '../index/head/head.vue'; // 页眉
export default {
components: {},
components: {myhead},
computed: {},
data() {
return {
......
<template>
<view class="full-width full-height" :style="{overflow: isReady ? 'hidden' : 'scroll' }">
<myhead :title="headTitle" :color="'#131319'" :titleShow="true" :backShow="true" :background="'#fff'"></myhead>
<!-- 音乐 -->
<!-- https://img.colorpark.cn/wechat/stitch.m4a -->
<!-- https://img.colorpark.cn/wechat/ring.m4a -->
<!-- https://img.colorpark.cn/wechat/ring2.m4a -->
<audio src="https://img.colorpark.cn/wechat/ring2.m4a"
:action="ringaction" controls loop style="opacity: 0; position: absolute;"></audio>
<audio src="https://img.colorpark.cn/wechat/ring2.m4a" :action="ringaction" controls loop
style="opacity: 0; position: absolute;"></audio>
<!-- 继续定制 -->
<view @click="tomall" style="position: fixed; right: 0; bottom: 100upx; display: flex;
align-items: center;justify-content: center; width: 100upx; height: 88upx;
background: #43cf7c; border-radius: 44upx 0px 0px 44upx; z-index: 999;">
<view style="font-size: 24upx; font-weight: 800; color: #FFFFFF;">
<view>继续</view><view>定制</view>
<view>继续</view>
<view>定制</view>
</view>
</view>
<view style="height:100%;width: 100%; overflow: hidden;">
<!-- goods.status.value 订单状态(0:等待生产,1:生产中,2: 生产完成,3:取消生产,4:出料中(弃用),5: 等待取料(弃用), 6:待入货(弃用),7:取货完成,8:已发货,9:订单完成) "-->
<view :animation="BoxTwoAnimation"
style="width: 100%; height: 100%;"
<view :animation="BoxTwoAnimation" style="width: 100%; height: 100%;"
v-if="(orderOrderStatusData.status == 0 || orderOrderStatusData.status == 1 || orderOrderStatusData.status == 10 || orderOrderStatusData.status == 2) < 2 && type != 1 && LoadState">
<!-- 排队中-付款区底图 -->
<view v-if="orderOrderStatusData.status == 0" style="position: absolute; top: 0; right: 200%; width: 100%; height: 100%;overflow: hidden;">
<image src="https://img.colorpark.cn/wechat/track/fukuanqu_2.png" mode="widthFix" style="width: 100%;"></image>
<view v-if="orderOrderStatusData.status == 0"
style="position: absolute; top: 0; right: 200%; width: 100%; height: 100%;overflow: hidden;">
<image src="https://img.colorpark.cn/wechat/track/fukuanqu_2.png" mode="widthFix"
style="width: 100%;"></image>
</view>
<!-- 排队中 -->
<view v-if="orderOrderStatusData.status == 0" style="position: absolute; width: 100%; height: 100%; overflow: hidden; right: 100%;">
<view v-if="orderOrderStatusData.status == 0"
style="position: absolute; width: 100%; height: 100%; overflow: hidden; right: 100%;">
<view style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;overflow: hidden;">
<image src="https://img.colorpark.cn/wechat/track/paiduiqu_2.png" mode="widthFix" style="width: 100%;"></image>
<image src="https://img.colorpark.cn/wechat/track/paiduiqu_2.png" mode="widthFix"
style="width: 100%;"></image>
</view>
<view style="position: relative; width: 100%; height: 100%;overflow: hidden;">
<view class='crate-wrapper'>
<view style="display: flex;position: relative;">
<view style="position: relative;transition: all 3s; z-index: 2;"
:style="{width: data.editorWidth +'px',height: data.editorHeight +'px',
<view style="position: relative;transition: all 3s; z-index: 2;" :style="{width: data.editorWidth +'px',height: data.editorHeight +'px',
transform: 'translateX(' + data.activebrushX + 'px)'}">
<image :src="goods.goods.surface_pic + '?x-oss-process=image/resize,lfit,w_1000'" mode=""
style="position: absolute; width: 98%; height: 98%; left: 0; top: 0; right: 0; margin: auto; bottom: 0; z-index: 1;"></image>
<image :src="goods.goods.surface_pic + '?x-oss-process=image/resize,lfit,w_1000'"
mode=""
style="position: absolute; width: 98%; height: 98%; left: 0; top: 0; right: 0; margin: auto; bottom: 0; z-index: 1;">
</image>
<!-- <view style="position: absolute; width: 98%; height: 98%; left: 0; top: 0; right: 0; margin: auto; bottom: 0; background: #fff; z-index: 1;"></view> -->
<image :src="goods.works_image" mode=""
style="position: absolute; width: 100%; height: 100%; left: 0; top: 0; right: 0; margin: auto; bottom: 0; z-index: 2;"></image>
style="position: absolute; width: 100%; height: 100%; left: 0; top: 0; right: 0; margin: auto; bottom: 0; z-index: 2;">
</image>
<image :src="goods.goods.front_image" mode=""
style="position: absolute; width: 100%; height: 100%; left: 0; top: 0; right: 0; margin: auto;z-index: 3; overflow: hidden;"></image>
style="position: absolute; width: 100%; height: 100%; left: 0; top: 0; right: 0; margin: auto;z-index: 3; overflow: hidden;">
</image>
</view>
<image v-for="(item,index) in rankinglist" :key="index" v-if="index < 3"
style="transition: all 1s;"
:style="{height: data.editorHeight +'px',width:item.w +'px',
transform: 'translateX(' + item.x + 'px)'}"
src="../../static/img/d.png" mode=""></image>
style="transition: all 1s;" :style="{height: data.editorHeight +'px',width:item.w +'px',
transform: 'translateX(' + item.x + 'px)'}" src="../../static/img/d.png" mode=""></image>
<!-- 刷子 -->
<!-- <view :style="{width: data.render_cove_width +'px',height: data.render_cove_height +'px'}"
style="position: absolute; left: 0; top: 0; right: 0; margin: auto; bottom: 0;z-index: 3;">
......@@ -60,55 +68,67 @@
</view>
</view>
<!-- 打印中-付款区底图 -->
<view v-if="orderOrderStatusData.status == 1" style="position: absolute; top: 0; right: 100%; width: 100%; height: 100%;overflow: hidden;">
<image src="https://img.colorpark.cn/wechat/track/fukuanqu_2.png" mode="widthFix" style="width: 100%;"></image>
<view v-if="orderOrderStatusData.status == 1"
style="position: absolute; top: 0; right: 100%; width: 100%; height: 100%;overflow: hidden;">
<image src="https://img.colorpark.cn/wechat/track/fukuanqu_2.png" mode="widthFix"
style="width: 100%;"></image>
</view>
<!-- 生产中打印 1-->
<view style="width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; overflow: hidden;">
<view
style="width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; overflow: hidden;">
<!-- 背景图 -->
<view style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;overflow: hidden;">
<view style="position: relative; width: 100%;">
<image src="https://img.colorpark.cn/wechat/track/dayinqu_2.png" mode="widthFix" style="width: 100%;"></image>
<image src="https://img.colorpark.cn/wechat/track/dayinqu_2.png" mode="widthFix"
style="width: 100%;"></image>
</view>
<view style="position: relative; width: 100%; margin-top: -13px;">
<image src="https://img.colorpark.cn/wechat/track/shuxiang_2.png" mode="widthFix" style="width: 100%;"></image>
<image src="https://img.colorpark.cn/wechat/track/shuxiang_2.png" mode="widthFix"
style="width: 100%;"></image>
</view>
</view>
<view style="position: relative;width: 100%; height: 100%;overflow: hidden;" :animation="printingEnd">
<view style="position: relative;width: 100%; height: 100%;overflow: hidden;"
:animation="printingEnd">
<view class='crate-wrapper'>
<view class="brush"
:style="{width: data.editorWidth +'px',height: data.editorHeight +'px',
transform: 'translateX(' + data.printingStartX + 'px)'}">
<view class="brush" :style="{width: data.editorWidth +'px',height: data.editorHeight +'px',
transform: 'translateX(' + data.printingStartX + 'px)'}" style="background: #FFFFFF;">
<view :style="{width: data.editorWidth +'px',height: data.editorHeight +'px'}"
style="position: relative;overflow: hidden;">
<!-- 底图 -->
<!-- <view style="position: absolute; width: 98%; height: 98%; left: 0; top: 0; right: 0;
margin: auto; bottom: 0; background: #fff; z-index: 1;"></view> -->
<image :src="goods.goods.surface_pic + '?x-oss-process=image/resize,lfit,w_1000'" mode=""
style="position: absolute; width: 98%; height: 98%; left: 0; top: 0; right: 0; margin: auto; bottom: 0; z-index: 1;"></image>
<!-- 作品图 -->
<image v-if="initstate" :src="goods.works_image" mode=""
:style="{'z-index': data.render_cove_width ? 2:0}"
style="position: absolute; width: 100%; height: 100%; left: 0; top: 0; right: 0; margin: auto; bottom: 0;"></image>
<image v-if="initstate" :src="goods.works_image +'?x-oss-process=image/resize,lfit,w_300' "
:style="{'z-index': data.render_cove_width ? 2:0, width: data.render_cove_width +'px'} "
style="position: absolute;
left: 50%; top: 50%;
transform:translate(-50%,-50%);" mode="widthFix"
>
</image>
<!-- 刷子 -->
<view :style="{width: data.render_cove_width +'px',height: data.render_cove_height +'px'}"
<view
:style="{width: data.render_cove_width +'px',height: data.render_cove_height +'px'}"
style="position: absolute; left: 0; top: 0; right: 0; margin: auto; bottom: 0;z-index: 3;">
<view :style="{width: leftx +'px',height: data.render_cove_height +'px',background: goods.goods.design_color}"
<view
:style="{width: leftx +'px',height: data.render_cove_height +'px',background: goods.goods.design_color}"
style="position: absolute; left: 0; top: 0;">
</view>
</view>
<!-- left: 50%; top: 50%;
transform:translate(-50%,-50%); -->
<!-- 手机壳 -->
<image :src="goods.goods.front_image" mode=""
style="position: absolute; width: 100%; height: 100%; left: 0; top: 0;
right: 0; margin: auto;z-index: 4; overflow: hidden;"></image>
<image :src="goods.goods.front_image" style="position: absolute; width: 99%;
left: 50%; top: 50%;
transform:translate(-50%,-50%);
z-index: 4; overflow: hidden;" mode="widthFix"></image>
</view>
<!-- 刷子范围 -->
<view :style="{width: data.render_cove_width +'px',height: data.render_cove_height +'px'}"
<view
:style="{width: data.render_cove_width +'px',height: data.render_cove_height +'px'}"
style="position: absolute; left: 0; top: 0; right: 0; margin: auto; bottom: 0;z-index: 5;">
<view class="item-text" :animation="animMaind" :class="{printer:printer}"
:style="{left: leftx +'px',opacity: printer ? 1 : 0}"
style="width:40px; height:100px; position:absolute; top: -50px;">
<image src="../../static/img/shua.png" mode="" style="width:40px; height:100px;"></image>
<image src="../../static/img/shua.png" mode=""
style="width:40px; height:100px;"></image>
</view>
</view>
</view>
......@@ -120,65 +140,104 @@
<!-- 底图 -->
<view style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;overflow: hidden;">
<view style="position: relative; width: 100%;">
<image src="https://img.colorpark.cn/wechat/track/shuxiang_2.png" mode="widthFix" style="width: 100%;"></image>
<image src="https://img.colorpark.cn/wechat/track/shuxiang_2.png" mode="widthFix"
style="width: 100%;"></image>
</view>
<view style="position: relative; width: 100%; margin-top: -13px;">
<image src="https://img.colorpark.cn/wechat/track/shuxiang_2.png" mode="widthFix" style="width: 100%;"></image>
<image src="https://img.colorpark.cn/wechat/track/shuxiang_2.png" mode="widthFix"
style="width: 100%;"></image>
</view>
</view>
<view class='crate-wrapper'>
<view class="twobrush" :animation="PickUpStart"
:style="{width: data.editorWidth +'px',height: data.editorHeight +'px',
<view class="twobrush" :animation="PickUpStart" :style="{width: data.editorWidth +'px',height: data.editorHeight +'px',
transform: 'translateY(' + -(data.editorHeight + (data.windowHeight - data.editorHeight)/2) + 'px)'}">
<view :style="{width: data.editorWidth +'px',height: data.editorHeight +'px'}"
style="position: relative;overflow: hidden; background: #FFFFFF;">
<!-- 作品图 -->
<image v-if="initstate" :src="goods.works_image +'?x-oss-process=image/resize,lfit,w_300' "
:style="{'z-index': data.render_cove_width ? 2:0, width: data.render_cove_width +'px'} "
style="position: absolute;
left: 50%; top: 50%;
transform:translate(-50%,-50%);" mode="widthFix">
</image>
<!-- left: 50%; top: 50%;
transform:translate(-50%,-50%); -->
<!-- 手机壳 -->
<image :src="goods.goods.front_image" style="position: absolute; width: 99%;
left: 50%; top: 50%;
transform:translate(-50%,-50%);
z-index: 4; overflow: hidden;" mode="widthFix"></image>
</view>
<!-- 底图 -->
<image :src="goods.goods.surface_pic + '?x-oss-process=image/resize,lfit,w_1000'" mode=""
style="position: absolute; width: 98%; height: 98%; left: 0; top: 0; right: 0; margin: auto; bottom: 0; z-index: 1;"></image>
<!-- <image :src="goods.goods.surface_pic + '?x-oss-process=image/resize,lfit,w_1000'" :style="{width: data.render_cove_width +'px'} " mode=""
style="position: absolute; width: 98%; height: 98%; right: 0; margin: auto; bottom: 0; z-index: 1;
position: absolute;
left: 50%; top: 50%;
transform:translate(-50%,-50%);">
</image> -->
<!-- <view style="position: absolute; width: 98%; height: 98%; left: 0; top: 0; right: 0; margin: auto; bottom: 0; background: #fff; z-index: 1;"></view> -->
<image :src="goods.works_image" mode=""
style="position: absolute; width: 100%;
height: 100%; left: 0; top: 0; right: 0; margin: auto; bottom: 0; z-index: 2;"></image>
<image :src="goods.goods.front_image" mode=""
style="position: absolute; width: 100%; height: 100%; left: 0; top: 0;
right: 0; margin: auto;z-index: 4; overflow: hidden;"></image>
<!-- <image :src="goods.works_image" mode="" style="position: absolute; width: 100%;
height: 100%; bottom: 0; z-index: 2;position: absolute;
left: 50%; top: 50%;
transform:translate(-50%,-50%);" :style="{width: data.render_cove_width +'px'} " ></image>
<image :src="goods.goods.front_image" mode="" style="position: absolute; width: 99%;
left: 50%; top: 50%;
transform:translate(-50%,-50%);
z-index: 4; overflow: hidden;" mode="widthFix"></image> -->
</view>
</view>
</view>
</view>
<!-- 暂时缺货、订单已取消 -->
<view style="width: 100%; height: 100%; position: absolute; top: 0; z-index: 2;background: #131319 !important;"
<view
style="width: 100%; height: 100%; position: absolute; top: 0; z-index: 2;background: #131319 !important;"
v-if="(orderOrderStatusData.status == 3 || orderOrderStatusData.status == -3) && type != 1">
<view style="padding-bottom: 32px">
<view style="width: 220upx; margin:90upx auto 40upx;">
<image style="width: 220upx; height: 220upx; border-radius: 50%;" src="../../static/icon_close.png" mode="aspectFill"></image>
<image style="width: 220upx; height: 220upx; border-radius: 50%;"
src="../../static/icon_close.png" mode="aspectFill"></image>
</view>
<view style="font-size: 36upx; font-weight: 400; color: #FFFFFF; text-align: center;">
暂时缺货、订单已取消
</view>
<view style="margin-top: 378upx; display: flex;align-items: center; justify-content: center;">
<view style="width: 187upx; position: relative; border-radius: 10upx;" @click="previewImg(goods,0)">
<view style="width: 128upx; height: 236upx;margin:auto; display: block; position: relative; overflow: hidden;">
<view style="width: 95%; height: 95%; background: #FFFFFF; position: absolute; top: 0; left: 0; right: 0; bottom: 0; margin: auto; z-index: 0;"></view>
<image style="width: 100%; height: 100%; position: absolute; top: 0; left: 0; right: 0; bottom: 0; margin: auto; z-index: 10;"
<view style="width: 187upx; position: relative; border-radius: 10upx;"
@click="previewImg(goods,0)">
<view
style="width: 128upx; height: 236upx;margin:auto; display: block; position: relative; overflow: hidden;">
<view
style="width: 95%; height: 95%; background: #FFFFFF; position: absolute; top: 0; left: 0; right: 0; bottom: 0; margin: auto; z-index: 0;">
</view>
<image
style="width: 100%; height: 100%; position: absolute; top: 0; left: 0; right: 0; bottom: 0; margin: auto; z-index: 10;"
:src="goods.goods.front_image" mode="aspectFit"></image>
<image style="width: 100%; height: 100%; position: absolute; top: 0; left: 0; right: 0; bottom: 0; margin: auto; z-index:8;"
:src="goods.works_image + '?x-oss-process=image/resize,lfit,w_300'" mode="aspectFit"></image>
<image
style="width: 100%; height: 100%; position: absolute; top: 0; left: 0; right: 0; bottom: 0; margin: auto; z-index:8;"
:src="goods.works_image + '?x-oss-process=image/resize,lfit,w_300'"
mode="aspectFit"></image>
</view>
</view>
<view style="margin-left: 19upx; margin-top: 5upx; ">
<view style="font-size: 24upx; font-weight: 400; color: #FFFFFF;">
<text> 订单编号: </text>
<text style="color: #888888;"> {{goods.id}} </text>
<text @click="tosetClipboardData(goods.id)" style="margin-left: 5upx;font-size: 22upx;">复制</text>
<text @click="tosetClipboardData(goods.id)"
style="margin-left: 5upx;font-size: 22upx;">复制</text>
</view>
<view style="font-size: 24upx; font-weight: 400; color: #FFFFFF; margin-top: 15upx;">
<text> 产品尺寸: </text>
<text style="color: #888888;" v-if="type == 2"> {{goods.goods.name || ''}} </text>
<text style="color: #888888;" v-if="type != 2">
{{goods.order_goods.goods_name || ''}}
<text v-if="goods.used_applets != '4'">{{goods.order_goods.goods_specs || ''}} </text>
<text v-if="goods.used_applets != '4'">{{goods.order_goods.goods_specs || ''}}
</text>
</text>
</view>
<view v-if="type != 2" style="font-size: 24upx; font-weight: 400; color: #FFFFFF;margin-top: 15upx;">
<view v-if="type != 2"
style="font-size: 24upx; font-weight: 400; color: #FFFFFF;margin-top: 15upx;">
<text> 支付金额: </text>
<text style="color: #888888;">{{goods.real_amount}} </text>
</view>
......@@ -191,7 +250,8 @@
</view>
</view>
<!-- 设备故障状态 -->
<view style="width: 100%; height: 100%; position: absolute; top: 0; z-index: 2;background: #131319 !important;"
<view
style="width: 100%; height: 100%; position: absolute; top: 0; z-index: 2;background: #131319 !important;"
v-if="orderOrderStatusData.status == -2 && type != 1">
<view class="start" style="padding-bottom: 100upx; padding-top: 200upx;">
<image src="../../static/icon_guaqi.png" mode="aspectFill" class="start_img"></image>
......@@ -199,18 +259,22 @@
<view>
<view class="start_text">联系客服</view>
<view class="start_text" style="display: flex; justify-content: center; align-items: center;">
<image src="../../static/phone.png" mode="" style="width: 32upx; height: 32upx; margin-right: 5upx;"></image>
<image src="../../static/phone.png" mode=""
style="width: 32upx; height: 32upx; margin-right: 5upx;"></image>
{{phone || '18938664545'}}
</view>
</view>
</view>
<image src="../../static/logo.jpg" mode="aspectFill" style="width: 664upx; height: 757upx; opacity: 0.03; position: absolute; left: 0; bottom: 0; z-index: -1;"></image>
<image src="../../static/logo.jpg" mode="aspectFill"
style="width: 664upx; height: 757upx; opacity: 0.03; position: absolute; left: 0; bottom: 0; z-index: -1;">
</image>
</view>
<!-- 取货完成状态 -->
<view v-if="orderOrderStatusData.status == 7 && type != 1">
<view style="padding-bottom: 32px">
<view style="width: 220upx; margin:90upx auto 40upx;">
<image style="width: 220upx; height: 220upx; border-radius: 50%;" src="../../static/mine/Pick-up.png" mode="aspectFill"></image>
<image style="width: 220upx; height: 220upx; border-radius: 50%;"
src="../../static/mine/Pick-up.png" mode="aspectFill"></image>
</view>
<view style="font-size: 36upx; font-weight: 400; color: #FFFFFF; text-align: center;">
打印完成
......@@ -221,30 +285,40 @@
</text>
</view>
<view style="display: flex;align-items: center; justify-content: center;">
<view style="width: 187upx; position: relative; border-radius: 10upx;" @click="previewImg(goods,0)">
<view style="width: 128upx; height: 236upx;margin:auto; display: block; position: relative; overflow: hidden;">
<view style="width: 95%; height: 95%; background: #FFFFFF; position: absolute; top: 0; left: 0; right: 0; bottom: 0; margin: auto; z-index: 0;"></view>
<image style="width: 100%; height: 100%; position: absolute; top: 0; left: 0; right: 0; bottom: 0; margin: auto; z-index: 10;"
<view style="width: 187upx; position: relative; border-radius: 10upx;"
@click="previewImg(goods,0)">
<view
style="width: 128upx; height: 236upx;margin:auto; display: block; position: relative; overflow: hidden;">
<view
style="width: 95%; height: 95%; background: #FFFFFF; position: absolute; top: 0; left: 0; right: 0; bottom: 0; margin: auto; z-index: 0;">
</view>
<image
style="width: 100%; height: 100%; position: absolute; top: 0; left: 0; right: 0; bottom: 0; margin: auto; z-index: 10;"
:src="goods.goods.front_image" mode="aspectFit"></image>
<image style="width: 100%; height: 100%; position: absolute; top: 0; left: 0; right: 0; bottom: 0; margin: auto; z-index:8;"
:src="goods.works_image + '?x-oss-process=image/resize,lfit,w_300'" mode="aspectFit"></image>
<image
style="width: 100%; height: 100%; position: absolute; top: 0; left: 0; right: 0; bottom: 0; margin: auto; z-index:8;"
:src="goods.works_image + '?x-oss-process=image/resize,lfit,w_300'"
mode="aspectFit"></image>
</view>
</view>
<view style="margin-left: 19upx; margin-top: 5upx; ">
<view style="font-size: 24upx; font-weight: 400; color: #FFFFFF;">
<text> 订单编号: </text>
<text style="color: #888888;"> {{goods.id}} </text>
<text @click="tosetClipboardData(goods.id)" style="margin-left: 5upx;font-size: 22upx;">复制</text>
<text @click="tosetClipboardData(goods.id)"
style="margin-left: 5upx;font-size: 22upx;">复制</text>
</view>
<view style="font-size: 24upx; font-weight: 400; color: #FFFFFF; margin-top: 15upx;">
<text> 产品尺寸: </text>
<text style="color: #888888;" v-if="type == 2"> {{goods.goods.name || ''}} </text>
<text style="color: #888888;"v-if="type != 2">
<text style="color: #888888;" v-if="type != 2">
{{goods.order_goods.goods_name || ''}}
<text v-if="goods.used_applets != '4'">{{goods.order_goods.goods_specs || ''}} </text>
<text v-if="goods.used_applets != '4'">{{goods.order_goods.goods_specs || ''}}
</text>
</text>
</view>
<view v-if="type != 2" style="font-size: 24upx; font-weight: 400; color: #FFFFFF;margin-top: 15upx;">
<view v-if="type != 2"
style="font-size: 24upx; font-weight: 400; color: #FFFFFF;margin-top: 15upx;">
<text> 支付金额: </text>
<text style="color: #888888;">{{goods.real_amount}} </text>
</view>
......@@ -256,16 +330,19 @@
</view>
</view>
</view>
<!-- -----------快递发货----------- -->
<!-- -----------快递发货----------- -->
<!-- 生产中 -->
<view style="position: relative;" v-if="goods.status.value <= 8 && type == 1">
<view style="width: 300upx; min-height: 300upx; margin:90upx auto 66upx; position: relative;
border-radius: 10upx;" :style="{background: goods.goods.design_color }" @click="previewImg(goods,0)">
<!-- 手机壳 -->
<view style="width: 206upx; height: 224upx;padding: 38upx 0; margin:auto; display: block; position: relative; overflow: hidden;">
<image style="width: 206upx; height: 224upx; margin:auto; display: block;position: relative; z-index: 10;"
<view
style="width: 206upx; height: 224upx;padding: 38upx 0; margin:auto; display: block; position: relative; overflow: hidden;">
<image
style="width: 206upx; height: 224upx; margin:auto; display: block;position: relative; z-index: 10;"
:src="goods.goods.front_image" mode="aspectFit"></image>
<image style="width: 206upx; height: 224upx; position: absolute; top: 0; left: 0; right: 0; bottom: 0; margin: auto; z-index:8;"
<image
style="width: 206upx; height: 224upx; position: absolute; top: 0; left: 0; right: 0; bottom: 0; margin: auto; z-index:8;"
:src="goods.works_image + '?x-oss-process=image/resize,lfit,w_300'" mode="widthFix"></image>
</view>
</view>
......@@ -277,7 +354,8 @@
<text v-if="goods.status.value == 8">已发货</text>
</text>
</view>
<view style="font-size: 24upx; font-weight: 400; color: #CCCCCC; margin-top: 20upx; text-align: center;">
<view
style="font-size: 24upx; font-weight: 400; color: #CCCCCC; margin-top: 20upx; text-align: center;">
<text v-if="goods.is_pay.value == 0">作品支付失败</text>
<text v-if="goods.is_pay.value == 1">
<!-- <text v-if="goods.status.value == 0">作品正在等待生产</text> -->
......@@ -290,10 +368,11 @@
<view style="margin-top: 104upx; margin-left: 20%; width: 60%;">
<view style=" font-size: 24upx; font-weight: 400; color: #FFFFFF;">
<text> 订单编号: </text> <text style="color: #888888;"> {{goods.id || ''}} </text>
<text @click="tosetClipboardData(goods.id)" style="margin-left: 5upx;font-size: 22upx;">复制</text>
<text @click="tosetClipboardData(goods.id)"
style="margin-left: 5upx;font-size: 22upx;">复制</text>
</view>
<view style="font-size: 24upx; font-weight: 400; color: #FFFFFF; margin-top: 10upx;">
<text > 产品尺寸: </text>
<text> 产品尺寸: </text>
<text style="color: #888888;">
{{goods.order_goods.goods_name || ''}}
<text v-if="goods.used_applets != '4'">{{goods.order_goods.goods_specs || ''}} </text>
......@@ -307,46 +386,56 @@
</view>
<view style="font-size: 24upx; font-weight: 400; color: #FFFFFF;margin-top: 10upx;">
<text> 收件信息: </text>
<text style="color: #888888;">{{goods.order_express.receivor || ''}} {{goods.order_express.phone || ''}} {{goods.order_express.address || ''}}</text>
<text style="color: #888888;">{{goods.order_express.receivor || ''}}
{{goods.order_express.phone || ''}} {{goods.order_express.address || ''}}</text>
</view>
</view>
</view>
<!-- 收货成功 -->
<view v-if="goods.status.value == 9 && type == 1">
<view style="width: 220upx; margin:90upx auto 40upx;">
<image style="width: 220upx; height: 220upx; border-radius: 50%;" src="../../static/mine/Pick-up.png" mode="aspectFill"></image>
<image style="width: 220upx; height: 220upx; border-radius: 50%;"
src="../../static/mine/Pick-up.png" mode="aspectFill"></image>
</view>
<view style="font-size: 36upx; font-weight: 400; color: #FFFFFF; text-align: center;">
收货成功
</view>
<view style="margin-top: 104upx; margin-left: 25%; width: 50%;">
<view style="font-size: 24upx; font-weight: 400; color: #FFFFFF;margin-top: 10upx;">
<text> 快递公司: </text> <text style="color: #888888;"> {{goods.order_express.express_name || ''}} </text>
<text> 快递公司: </text> <text style="color: #888888;"> {{goods.order_express.express_name || ''}}
</text>
</view>
<view style="font-size: 24upx; font-weight: 400; color: #FFFFFF;margin-top: 10upx;">
<text> 快递单号: </text> <text style="color: #888888;"> {{goods.order_express.express_no || ''}} </text>
<text> 快递单号: </text> <text style="color: #888888;"> {{goods.order_express.express_no || ''}}
</text>
</view>
<view style="font-size: 24upx; font-weight: 400; color: #FFFFFF;margin-top: 10upx;">
<text> 收件信息: </text>
<text style="color: #888888;">{{goods.order_express.receivor || ''}} {{goods.order_express.phone || ''}} {{goods.order_express.address || ''}}</text>
<text style="color: #888888;">{{goods.order_express.receivor || ''}}
{{goods.order_express.phone || ''}} {{goods.order_express.address || ''}}</text>
</view>
</view>
<view style="margin-top: 104upx; display: flex; align-items: center; justify-content: center;">
<view style="width: 187upx; position: relative; border-radius: 10upx;"
:style="{background: goods.goods.design_color }" @click="previewImg(goods,0)">
<!-- 手机壳 -->
<view style="width: 128upx; height: 141upx;padding: 38upx 0; margin:auto; display: block; position: relative; overflow: hidden;">
<image style="width: 128upx; height: 141upx; margin:auto; display: block;position: relative; z-index: 10;"
<view
style="width: 128upx; height: 141upx;padding: 38upx 0; margin:auto; display: block; position: relative; overflow: hidden;">
<image
style="width: 128upx; height: 141upx; margin:auto; display: block;position: relative; z-index: 10;"
:src="goods.goods.front_image" mode="aspectFit"></image>
<image style="width: 128upx; height: 141upx; position: absolute; top: 0; left: 0; right: 0; bottom: 0; margin: auto; z-index:8;"
:src="goods.works_image + '?x-oss-process=image/resize,lfit,w_300'" mode="widthFix"></image>
<image
style="width: 128upx; height: 141upx; position: absolute; top: 0; left: 0; right: 0; bottom: 0; margin: auto; z-index:8;"
:src="goods.works_image + '?x-oss-process=image/resize,lfit,w_300'" mode="widthFix">
</image>
</view>
</view>
<view style="margin-left: 19upx; margin-top: 5upx;">
<view style="font-size: 24upx; font-weight: 400; color: #FFFFFF;">
<text> 订单编号: </text>
<text style="color: #888888;"> {{goods.id || ''}} </text>
<text @click="tosetClipboardData(goods.id)" style="margin-left: 5upx;font-size: 22upx;">复制</text>
<text @click="tosetClipboardData(goods.id)"
style="margin-left: 5upx;font-size: 22upx;">复制</text>
</view>
<view style="font-size: 24upx; font-weight: 400; color: #FFFFFF; margin-top: 15upx;">
<text> 产品尺寸: </text>
......@@ -377,9 +466,14 @@
<script>
import homeservice from '@/service/homeservice.js'
import firework from '@/components/ay-firework/firework.vue';//礼花
import firework from '@/components/ay-firework/firework.vue'; //礼花
import myhead from '../index/head/head.vue'; // 页眉
export default {
components: {firework},
components: {
firework,
myhead
},
computed: {},
data() {
return {
......@@ -388,37 +482,37 @@
s: 'Order.detail',
id: null
},
machine_id:null,//设备id
type:null ,//1:配送版,2:单机版,3:自助版
machine_id: null, //设备id
type: null, //1:配送版,2:单机版,3:自助版
lineUpState: false,//排队状态----横向进入滑动动画
leaveUpState: false,//排队状态----横向离开滑动动画
lineUpState: false, //排队状态----横向进入滑动动画
leaveUpState: false, //排队状态----横向离开滑动动画
printingStart: false,//打印状态----横向进来滑动动画 Printing start
printingEnd:{}, ///打印状态----纵向离开动画 Printing end
initstate: false,//打印状态----显示刷子
PickUpStart:{}, //取货状态-----手机壳从上面动画出来
PickUpTopBottom:null, //定时器----取货上下浮动
statetime:null,//定时器----打印机动画
orderOrderStatusTime:null,//定时器---查询订单状态
OrderOrderRankingTime:null,//定时器---排队定时器
leftx:0,//x轴-----刷子打印
topy:-20,//y-----刷子打印
animMaind:{}, //动画----刷子上下动画
animMaind_time:800, //动画时间----刷子上下动画时间
isReady: false,//礼花开关
BoxTwoAnimation:{}, //排队-打印-取货流程图架构
oldRankinglist:[],//上次排队队列
rankinglist:[],//排队队列
teststate:false,//开启测试模式 false true
orderOrderStatusData:null,//订单状态
printingStart: false, //打印状态----横向进来滑动动画 Printing start
printingEnd: {}, ///打印状态----纵向离开动画 Printing end
initstate: false, //打印状态----显示刷子
PickUpStart: {}, //取货状态-----手机壳从上面动画出来
PickUpTopBottom: null, //定时器----取货上下浮动
statetime: null, //定时器----打印机动画
orderOrderStatusTime: null, //定时器---查询订单状态
OrderOrderRankingTime: null, //定时器---排队定时器
leftx: 0, //x轴-----刷子打印
topy: -20, //y-----刷子打印
animMaind: {}, //动画----刷子上下动画
animMaind_time: 800, //动画时间----刷子上下动画时间
isReady: false, //礼花开关
BoxTwoAnimation: {}, //排队-打印-取货流程图架构
oldRankinglist: [], //上次排队队列
rankinglist: [], //排队队列
teststate: false, //开启测试模式 false true
orderOrderStatusData: null, //订单状态
ringaction: { //打印机音乐状态
method: 'pause' //method: 'pause'method: 'play'
},
stitchaction: { //履带音乐状态
method: 'pause' //method: 'pause'method: 'play'
},
printer:false,//打印机状态
printer: false, //打印机状态
data: {
windowWidth: 0, // 屏幕宽度
......@@ -426,135 +520,149 @@
pixelRate: 0, // 屏幕宽度比率
editorWidth: 0, // 设计宽度
editorHeight: 0, // 设计高度
render_cove_width:null,
render_cove_height:null,
activebrushX:-500,//排队盒子动画坐标
printingStartX:-500,//生产中盒子动画坐标
render_cove_width: null,
render_cove_height: null,
activebrushX: -500, //排队盒子动画坐标
printingStartX: -500, //生产中盒子动画坐标
},
tomallstate:true,//防止返回触动页面销毁事件
LoadState:false,//加载完成
orderCurrentOrder:null,
orderCurrentOrderTime:null,
background_surface_image:null,//定制壳手机壳底色
tomallstate: true, //防止返回触动页面销毁事件
LoadState: false, //加载完成
orderCurrentOrder: null,
orderCurrentOrderTime: null,
background_surface_image: null, //定制壳手机壳底色
headTitle: "", //头部标题文字
};
},
onReady() {
},
methods: {
tomall(){
tomall() {
this.tomallstate = false
wx.navigateBack({delta: 3})
uni.reLaunch({
url: '/pages/index/machineDetail?machine_id=' + this.machine_id
});
/* wx.navigateBack({
delta: 3
}) */
},
init() {
this.printer = true
this.isReady = false
this.leftx = this.data.render_cove_width
// this.topy = -20
setTimeout(function(){
setTimeout(function() {
this.updata()
}.bind(this),2000)
}.bind(this), 2000)
},
updata(){
setTimeout(function(){
updata() {
setTimeout(function() {
this.ringaction.method = 'play' //开启音乐
console.log('5开启音乐')
}.bind(this),this.animMaind_time)
}.bind(this), this.animMaind_time)
// 无限循环动画
var animation = wx.createAnimation({
duration: this.animMaind_time,// 动画执行时间
timingFunction: 'linear',// 动画执行效果
duration: this.animMaind_time, // 动画执行时间
timingFunction: 'linear', // 动画执行效果
})
var state = true // 控制上下滑动setTimeout setInterval
this.statetime = setInterval(function(){
if(state == true){
animation.translate(0,(this.data.render_cove_height)).step();//向下移动
}else{
animation.translate(0,0).step();//向上移动
this.statetime = setInterval(function() {
if (state == true) {
animation.translate(0, (this.data.render_cove_height)).step(); //向下移动
} else {
animation.translate(0, 0).step(); //向上移动
}
state = !state
// 减慢打印时间
if(this.leftx <= 10){
if(this.orderOrderStatusData.status == 10 || this.orderOrderStatusData.status == 2){
if (this.leftx <= 10) {
if (this.orderOrderStatusData.status == 10 || this.orderOrderStatusData.status == 2) {
this.leftx -= 2
}else{
} else {
this.leftx -= 0.1
}
}else{
} else {
this.leftx -= 1
}
this.setData({
animMaind: animation.export(),
leftx:this.leftx
leftx: this.leftx
})
// 打印完成----清除定时器
if(this.leftx <= 0){
if (this.leftx <= 0) {
this.ringaction.method = 'pause' //暂停音乐
console.log('5暂停音乐')
clearInterval(this.statetime)
this.statetime = null
this.isReady = true;
this.printer = false
uni.showToast({title: '打印完成,即将出货',icon: 'none',duration: 2000});
setTimeout(function(){
uni.showToast({
title: '打印完成,即将出货',
icon: 'none',
duration: 2000
});
setTimeout(function() {
this.boxinit({
duration:3000,// 动画执行时间
axisX:0,// x轴移动
axisY:this.data.windowHeight,// y轴移动
settimeout:3500,// 定时器时间
duration: 3000, // 动画执行时间
axisX: 0, // x轴移动
axisY: this.data.windowHeight, // y轴移动
settimeout: 3500, // 定时器时间
}) // 触发打印完成--手机壳下移消失
}.bind(this),2000)
}.bind(this), 2000)
}
}.bind(this),this.animMaind_time)
}.bind(this), this.animMaind_time)
},
// 打印完成--手机壳下移消失
boxinit(data){
boxinit(data) {
var animation = wx.createAnimation({
duration: data.duration,// 动画执行时间
timingFunction: 'linear',// 动画执行效果
duration: data.duration, // 动画执行时间
timingFunction: 'linear', // 动画执行效果
})
animation.translate(data.axisX, data.axisY).step();
this.setData({
printingEnd: animation.export(),
})
setTimeout(function(){
setTimeout(function() {
this.Box_Two_Animation({
duration:2000,// 动画执行时间
axisX:0,// x轴移动
axisY:-this.data.windowHeight,// y轴移动
settimeout:2500,// 定时器时间
settimeoutState:true,//开启下一步
duration: 2000, // 动画执行时间
axisX: 0, // x轴移动
axisY: -this.data.windowHeight, // y轴移动
settimeout: 2500, // 定时器时间
settimeoutState: true, //开启下一步
})
}.bind(this),data.settimeout)
}.bind(this), data.settimeout)
},
// 取货页面----底部向上滑动动画
Box_Two_Animation(data){
Box_Two_Animation(data) {
var animation = wx.createAnimation({
duration: data.duration,// 动画执行时间
timingFunction: 'linear',// 动画执行效果
duration: data.duration, // 动画执行时间
timingFunction: 'linear', // 动画执行效果
})
animation.translate(data.axisX, data.axisY).step();
this.setData({
BoxTwoAnimation: animation.export(),
})
if(!data.settimeoutState) return;
wx.setNavigationBarTitle({title: '取货区' })
setTimeout(function(){
let boxinitY = (this.data.windowHeight - ((this.data.windowHeight - this.data.editorHeight)/2)) - ( this.data.editorHeight / 3 * 1)
if (!data.settimeoutState) return;
this.headTitle = "取货区";
//wx.setNavigationBarTitle({title: '取货区' })
setTimeout(function() {
let boxinitY = (this.data.windowHeight - ((this.data.windowHeight - this.data.editorHeight) /
2)) - (this.data.editorHeight / 3 * 1)
this.Two_Brush_Animation({
duration:5000,// 动画执行时间
axisX:0,// x轴移动
axisY:boxinitY,// y轴移动
settimeout:5000,// 定时器时间
duration: 5000, // 动画执行时间
axisX: 0, // x轴移动
axisY: boxinitY, // y轴移动
settimeout: 5000, // 定时器时间
})
}.bind(this),data.settimeout)
}.bind(this), data.settimeout)
},
// 取货手机壳动画
Two_Brush_Animation(data){
Two_Brush_Animation(data) {
let animation = wx.createAnimation({
duration: data.duration,// 动画执行时间
timingFunction: 'linear',// 动画执行效果
duration: data.duration, // 动画执行时间
timingFunction: 'linear', // 动画执行效果
})
animation.translate(data.axisX, data.axisY).step();
this.setData({
......@@ -563,28 +671,34 @@
// 上下浮动
clearInterval(this.PickUpTopBottom)
this.PickUpTopBottom = null
setTimeout(function(){
uni.showToast({title: '已出货,请在出货口取货吧',icon: 'none',duration: 2000});
setTimeout(function() {
uni.showToast({
title: '已出货,请在出货口取货吧',
icon: 'none',
duration: 2000
});
var state = true
let animation = wx.createAnimation({
duration: 2000,// 动画执行时间
timingFunction: 'linear',// 动画执行效果
duration: 2000, // 动画执行时间
timingFunction: 'linear', // 动画执行效果
})
this.PickUpTopBottom = setInterval(function(){
if(state == true){
animation.translate(data.axisX,(data.axisY + 40)).step();
}else{
animation.translate(data.axisX,data.axisY).step();
this.PickUpTopBottom = setInterval(function() {
if (state == true) {
animation.translate(data.axisX, (data.axisY + 40)).step();
} else {
animation.translate(data.axisX, data.axisY).step();
}
state = !state
this.setData({
PickUpStart: animation.export(),
})
}.bind(this),2000)
}.bind(this),data.settimeout)
}.bind(this), 2000)
}.bind(this), data.settimeout)
},
loadData() {
uni.showLoading({title: '正在加载中...'})
uni.showLoading({
title: '正在加载中...'
})
homeservice.WorksList(this.queryPage).then(result => {
this.goods = result
/* if(this.$base.mobilePhoneCaseSize){
......@@ -595,24 +709,30 @@
result.goods.design_height = 370 / this.data.pixelRate
this.data.editorWidth = result.goods.design_width * this.data.pixelRate // 设计宽度
this.data.editorHeight = result.goods.design_height * this.data.pixelRate // 设计高度
this.data.render_cove_width = result.goods.render_cove_width * (result.goods.design_width / result.goods.render_width) * this.data.pixelRate + 30 // 设计高度
this.data.render_cove_height = result.goods.render_cove_height * (result.goods.design_height / result.goods.render_height) * this.data.pixelRate + 30 // 设计高度
this.data.render_left = result.goods.render_left * (result.goods.design_width / result.goods.render_width) * this.data.pixelRate // 设计高度
this.data.render_top = result.goods.render_top * (result.goods.design_height / result.goods.render_height) * this.data.pixelRate // 设计高度
this.data.activebrushX = -((this.data.windowWidth - this.data.editorWidth)/2 + this.data.editorWidth + 50)
this.data.printingStartX = -((this.data.windowWidth - this.data.editorWidth)/2 + this.data.editorWidth + 50)
this.data.render_cove_width = result.goods.render_cove_width * (result.goods.design_width /
result.goods.render_width) * this.data.pixelRate + 30 // 设计高度
this.data.render_cove_height = result.goods.render_cove_height * (result.goods.design_height /
result.goods.render_height) * this.data.pixelRate + 30 // 设计高度
this.data.render_left = result.goods.render_left * (result.goods.design_width / result.goods
.render_width) * this.data.pixelRate // 设计高度
this.data.render_top = result.goods.render_top * (result.goods.design_height / result.goods
.render_height) * this.data.pixelRate // 设计高度
this.data.activebrushX = -((this.data.windowWidth - this.data.editorWidth) / 2 + this.data
.editorWidth + 50)
this.data.printingStartX = -((this.data.windowWidth - this.data.editorWidth) / 2 + this.data
.editorWidth + 50)
//this.$base.mobilePhoneCaseSize = this.data
/* } */
this.leftx = this.data.render_cove_width
// status.value 订单状态 0:等待生产,1:生产中,2: 生产完成,3:取消生产,4:出料中(弃用),5: 等待取料(弃用), 6:待入货(弃用),7:取货完成,8:已发货,9:订单完成 -->
// type.value 1直营配送站 2 万能通用版 3色彩自助站
if(this.teststate){
if (this.teststate) {
result.status.value = 1 //1:生产中
result.type.value = 2 //2单机版
}
this.type = result.type.value
// 单机版查询当前设备打印订单
if(this.type == 2){
if (this.type == 2) {
this.anb() //查询排队列表
// clearInterval(this.orderCurrentOrderTime)
// this.orderCurrentOrderTime = setInterval(function(){
......@@ -624,66 +744,76 @@
// // this.anbtwo() //记录排队人数
// }.bind(this),10000)
this.leaveto(3)
}else{
} else {
this.OrderOrderStatusInit()
}
uni.hideLoading();
uni.stopPullDownRefresh();
}).catch(err => {
uni.hideLoading();
uni.showToast({title: err.msg || err.data,icon: 'none'});
uni.showToast({
title: err.msg || err.data,
icon: 'none'
});
});
},
anb(){
anb() {
homeservice.WorksList({
s:'Order.orderStatus',
order_id:this.queryPage.id
s: 'Order.orderStatus',
order_id: this.queryPage.id
}).then(result => {
this.orderOrderStatusData = result
this.orderOrderStatusData.status = 0
// wx.setNavigationBarTitle({title: '排队区' })
// this.anbone()
}).catch(err => {
uni.showToast({title: err.msg || err.data,icon: 'none'});
uni.showToast({
title: err.msg || err.data,
icon: 'none'
});
});
},
anbone(){
anbone() {
homeservice.WorksList({
s:'Order.orderRanking',
order_id:this.queryPage.id,
machine_id:this.machine_id
s: 'Order.orderRanking',
order_id: this.queryPage.id,
machine_id: this.machine_id
}).then(result => {
this.oldRankinglist = []// 第一次进来记录排队人数
for(var i =0;i<result.ranking;i++){
this.oldRankinglist = [] // 第一次进来记录排队人数
for (var i = 0; i < result.ranking; i++) {
this.oldRankinglist.push({
w:30,x:0
w: 30,
x: 0
})
}
this.rankinglist = this.oldRankinglist
this.Box_Two_Animation({
duration:0,// 动画执行时间
axisX:this.data.windowWidth + this.data.windowWidth,// x轴移动
axisY:0,// y轴移动
settimeout:0,// 定时器时间
settimeoutState:false,//开启下一步
duration: 0, // 动画执行时间
axisX: this.data.windowWidth + this.data.windowWidth, // x轴移动
axisY: 0, // y轴移动
settimeout: 0, // 定时器时间
settimeoutState: false, //开启下一步
})
this.LoadState = true
setTimeout(function(){
setTimeout(function() {
this.Box_Two_Animation({
duration:3000,// 动画执行时间
axisX:this.data.windowWidth,// x轴移动
axisY:0,// y轴移动
settimeout:0,// 定时器时间
settimeoutState:false,//开启下一步
duration: 3000, // 动画执行时间
axisX: this.data.windowWidth, // x轴移动
axisY: 0, // y轴移动
settimeout: 0, // 定时器时间
settimeoutState: false, //开启下一步
})
}.bind(this),1000)
}.bind(this), 1000)
//排队状态----盒子横向进入滑动动画时间3s
setTimeout(function(){
setTimeout(function() {
this.lineUpState = true
this.data.activebrushX = 0
}.bind(this),4500)
}.bind(this), 4500)
}).catch(err => {
uni.showToast({title: err.msg || err.data,icon: 'none'});
uni.showToast({
title: err.msg || err.data,
icon: 'none'
});
});
},
// anbtwo(){
......@@ -703,14 +833,14 @@
// uni.showToast({title: err.msg || err.data,icon: 'none'});
// });
// },
OrdercurrentOrder(){
OrdercurrentOrder() {
console.log('单机版查询设备打印订单')
homeservice.WorksList({
s:'Order.currentOrder',
machine_id:this.machine_id
s: 'Order.currentOrder',
machine_id: this.machine_id
}).then(result => {
this.orderCurrentOrder = result.order_id
if(this.teststate){
if (this.teststate) {
this.orderCurrentOrder = this.queryPage.id // 测试
}
// if(this.orderCurrentOrder == this.queryPage.id){
......@@ -723,23 +853,27 @@
// this.leaveto(3)
}).catch(err => {
uni.hideLoading();
uni.showToast({title: err.msg || err.data,icon: 'none'});
uni.showToast({
title: err.msg || err.data,
icon: 'none'
});
});
},
OrderOrderStatusInit(e){
OrderOrderStatusInit(e) {
homeservice.WorksList({
s:'Order.orderStatus',
order_id:this.queryPage.id
s: 'Order.orderStatus',
order_id: this.queryPage.id
}).then(result => {
//result.status -1:订单不存在 0:待打印 1:打印中 10:打印完成 2:生产完成 3:取消生产
if(this.teststate || e == 2){
if (this.teststate || e == 2) {
result.status = 0 // 测试
}
this.orderOrderStatusData = result
if(result.status == 0){ //0:待打印排队中
wx.setNavigationBarTitle({title: '排队区' })
if (result.status == 0) { //0:待打印排队中
this.headTitle = "排队区";
//wx.setNavigationBarTitle({title: '排队区' })
this.OrderOrderRankingInit(4)
if(this.teststate){
if (this.teststate) {
// setTimeout(function(){
// this.OrderOrderRankingInit(1)
// }.bind(this),5000)
......@@ -747,89 +881,103 @@
// this.OrderOrderRankingInit(-1)
// }.bind(this),10000)
}
if(this.type != 2){
if(!this.teststate && e != 2){// 排队定时器 测试需要关闭
if (this.type != 2) {
if (!this.teststate && e != 2) { // 排队定时器 测试需要关闭
clearInterval(this.OrderOrderRankingTime)
this.OrderOrderRankingTime = setInterval(function(){
this.OrderOrderRankingTime = setInterval(function() {
this.OrderOrderRankingInit()
}.bind(this),10000)
}.bind(this), 10000)
}
}
}else if(result.status == 1){// 1:打印中
wx.setNavigationBarTitle({title: '打印区' })
} else if (result.status == 1) { // 1:打印中
this.headTitle = "打印区";
//wx.setNavigationBarTitle({title: '打印区' })
// 打开排队页面
this.Box_Two_Animation({
duration:0,// 动画执行时间
axisX:this.data.windowWidth,// x轴移动
axisY:0,// y轴移动
settimeout:0,// 定时器时间
settimeoutState:false,//开启下一步
duration: 0, // 动画执行时间
axisX: this.data.windowWidth, // x轴移动
axisY: 0, // y轴移动
settimeout: 0, // 定时器时间
settimeoutState: false, //开启下一步
})
this.LoadState = true
setTimeout(function(){
setTimeout(function() {
this.Box_Two_Animation({
duration:3000,// 动画执行时间
axisX:0,// x轴移动
axisY:0,// y轴移动
settimeout:0,// 定时器时间
settimeoutState:false,//开启下一步
duration: 3000, // 动画执行时间
axisX: 0, // x轴移动
axisY: 0, // y轴移动
settimeout: 0, // 定时器时间
settimeoutState: false, //开启下一步
})
}.bind(this),1000)
}.bind(this), 1000)
// 打印状态滑动进来
setTimeout(function(){
setTimeout(function() {
this.printingStart = true //打印状态----横向进来滑动动画 3s
this.data.printingStartX = 0
}.bind(this),4500)
setTimeout(function(){
}.bind(this), 4500)
setTimeout(function() {
this.initstate = true //打印状态----显示刷子
this.init()
}.bind(this),7500)
if(!this.teststate){
}.bind(this), 7500)
if (!this.teststate) {
// 定时器查询订单状态
clearInterval(this.orderOrderStatusTime)
this.orderOrderStatusTime = setInterval(function(){
this.orderOrderStatusTime = setInterval(function() {
this.orderOrderStatusGet()
}.bind(this),10000)
}else{
}.bind(this), 10000)
} else {
// 定时器查询订单状态
clearInterval(this.orderOrderStatusTime)
this.orderOrderStatusTime = setInterval(function(){
this.orderOrderStatusTime = setInterval(function() {
this.orderOrderStatusGet()
}.bind(this),30000)
}.bind(this), 30000)
}
}else if(result.status == 2 || result.status == 10){ //2:生产完成 10:打印完成
} else if (result.status == 2 || result.status == 10) { //2:生产完成 10:打印完成
this.LoadState = true
wx.setNavigationBarTitle({title: '取货区' })
this.headTitle = "取货区";
//wx.setNavigationBarTitle({title: '取货区' })
this.Box_Two_Animation({
duration:2000,// 动画执行时间
axisX:0,// x轴移动
axisY:-this.data.windowHeight,// y轴移动
settimeout:2500,// 定时器时间
settimeoutState:true,//开启下一步
duration: 2000, // 动画执行时间
axisX: 0, // x轴移动
axisY: -this.data.windowHeight, // y轴移动
settimeout: 2500, // 定时器时间
settimeoutState: true, //开启下一步
})
}else if(result.status == 3 || result.status == -3){
wx.setNavigationBarTitle({title: '取消生产' })
}else if(result.status == -2){
wx.setNavigationBarTitle({title: '设备故障' })
}else if(result.status == 7){
wx.setNavigationBarTitle({title: '取货完成' })
} else if (result.status == 3 || result.status == -3) {
this.headTitle = "取消生产";
/* wx.setNavigationBarTitle({
title: '取消生产'
}) */
} else if (result.status == -2) {
this.headTitle = "设备故障";
/* wx.setNavigationBarTitle({
title: '设备故障'
}) */
} else if (result.status == 7) {
this.headTitle = "取货完成";
/* wx.setNavigationBarTitle({
title: '取货完成'
}) */
}
}).catch(err => {
uni.showToast({title: err.msg || err.data,icon: 'none'});
uni.showToast({
title: err.msg || err.data,
icon: 'none'
});
});
},
// -1:订单不存在 0:待打印 1:打印中 10:打印完成 2:生产完成 3:取消生产
// 打印状态滑动进来
orderOrderStatusGet(){
orderOrderStatusGet() {
homeservice.WorksList({
s:'Order.orderStatus',
order_id:this.queryPage.id
s: 'Order.orderStatus',
order_id: this.queryPage.id
}).then(result => {
if(this.teststate){
if (this.teststate) {
result.status = 2
}
this.orderOrderStatusData = result
if(result.status == 10 || result.status == 2){
if (result.status == 10 || result.status == 2) {
clearInterval(this.statetime)
this.statetime = null
clearInterval(this.orderOrderStatusTime)
......@@ -840,26 +988,35 @@
animMaind_time: animMaind_time || 200,
})
this.updata()
}else if(result.status == 3 || result.status == -3){
} else if (result.status == 3 || result.status == -3) {
this.ringaction.method = 'pause' //暂停音乐
console.log('5暂停音乐')
wx.setNavigationBarTitle({title: '取消生产' })
//console.log('5暂停音乐')
this.headTitle = "取消生产";
/* wx.setNavigationBarTitle({
title: '取消生产'
}) */
clearInterval(this.statetime)
this.statetime = null
clearInterval(this.orderOrderStatusTime)
this.orderOrderStatusTime = null
}else if(result.status == -2){
} else if (result.status == -2) {
this.ringaction.method = 'pause' //暂停音乐
console.log('5暂停音乐')
wx.setNavigationBarTitle({title: '设备故障' })
//console.log('5暂停音乐')
this.headTitle = "设备故障";
/* wx.setNavigationBarTitle({
title: '设备故障'
}) */
clearInterval(this.statetime)
this.statetime = null
clearInterval(this.orderOrderStatusTime)
this.orderOrderStatusTime = null
}else if(result.status == 7){
} else if (result.status == 7) {
this.ringaction.method = 'pause' //暂停音乐
console.log('5暂停音乐')
wx.setNavigationBarTitle({title: '取货完成' })
this.headTitle = "取货完成";
//console.log('5暂停音乐')
/* wx.setNavigationBarTitle({
title: '取货完成'
}) */
clearInterval(this.statetime)
this.statetime = null
clearInterval(this.orderOrderStatusTime)
......@@ -867,166 +1024,183 @@
}
}).catch(err => {
console.log(err)
uni.showToast({title: err.msg || err.data,icon: 'none'});
uni.showToast({
title: err.msg || err.data,
icon: 'none'
});
});
},
// 查询排队
// 如果订单不存单,或者订单已经打印完成,那么返回的排名是-1
// 如果订单当前正在打印。返回的排名是0
// 如果前面有一个订单就返回1,前面有两个订单就返回2
OrderOrderRankingInit(state){
OrderOrderRankingInit(state) {
homeservice.WorksList({
s:'Order.orderRanking',
order_id:this.queryPage.id,
machine_id:this.machine_id
s: 'Order.orderRanking',
order_id: this.queryPage.id,
machine_id: this.machine_id
}).then(result => {
if(this.teststate){
if (this.teststate) {
result.ranking = state //例子
}
if(result.ranking >= 0){
if(this.oldRankinglist.length > 0){
if(this.rankinglist.length > result.ranking){
if (result.ranking >= 0) {
if (this.oldRankinglist.length > 0) {
if (this.rankinglist.length > result.ranking) {
// 排队消失列表效果
this.rankinglist[(this.rankinglist.length - 1)].x = 200
setTimeout(function(){
setTimeout(function() {
this.rankinglist[(this.rankinglist.length - 1)].w = 0
}.bind(this),1000)
setTimeout(function(){
}.bind(this), 1000)
setTimeout(function() {
this.rankinglist.pop()
if(this.rankinglist.length == 0){
if (this.rankinglist.length == 0) {
this.leaveto(0)
}
}.bind(this),2500)
}.bind(this), 2500)
}
}else{
this.oldRankinglist = []// 第一次进来记录排队人数
for(var i =0;i<result.ranking;i++){
} else {
this.oldRankinglist = [] // 第一次进来记录排队人数
for (var i = 0; i < result.ranking; i++) {
this.oldRankinglist.push({
w:30,x:0
w: 30,
x: 0
})
}
this.rankinglist = this.oldRankinglist
// 当排队人数等于0就开始打印
if(this.rankinglist.length == 0){
if (this.rankinglist.length == 0) {
this.leaveto(1)
}else{
} else {
// 快速切换--排队状态设计区底图
this.Box_Two_Animation({
duration:0,// 动画执行时间
axisX:this.data.windowWidth + this.data.windowWidth,// x轴移动
axisY:0,// y轴移动
settimeout:0,// 定时器时间
settimeoutState:false,//开启下一步
duration: 0, // 动画执行时间
axisX: this.data.windowWidth + this.data.windowWidth, // x轴移动
axisY: 0, // y轴移动
settimeout: 0, // 定时器时间
settimeoutState: false, //开启下一步
})
this.LoadState = true
setTimeout(function(){
setTimeout(function() {
this.Box_Two_Animation({
duration:3000,// 动画执行时间
axisX:this.data.windowWidth,// x轴移动
axisY:0,// y轴移动
settimeout:0,// 定时器时间
settimeoutState:false,//开启下一步
duration: 3000, // 动画执行时间
axisX: this.data.windowWidth, // x轴移动
axisY: 0, // y轴移动
settimeout: 0, // 定时器时间
settimeoutState: false, //开启下一步
})
}.bind(this),1000)
}.bind(this), 1000)
//排队状态----盒子横向进入滑动动画时间3s
setTimeout(function(){
setTimeout(function() {
this.lineUpState = true
this.data.activebrushX = 0
}.bind(this),4500)
}.bind(this), 4500)
}
}
}else{
} else {
this.leaveto(1)
}
}).catch(err => {
uni.showToast({title: err.msg || err.data,icon: 'none'});
uni.showToast({
title: err.msg || err.data,
icon: 'none'
});
});
},
leaveto(e){ //e== 1无排队切换打印 0有排队切换打印
leaveto(e) { //e== 1无排队切换打印 0有排队切换打印
clearInterval(this.OrderOrderRankingTime)
this.OrderOrderRankingTime = null
let time = 3500 //时间
if(e == 1){ //无排队切换打印
if (e == 1) { //无排队切换打印
// 快速切换--设计区底图
this.Box_Two_Animation({
duration:0,// 动画执行时间
axisX:this.data.windowWidth,// x轴移动
axisY:0,// y轴移动
settimeout:0,// 定时器时间
settimeoutState:false,//开启下一步
duration: 0, // 动画执行时间
axisX: this.data.windowWidth, // x轴移动
axisY: 0, // y轴移动
settimeout: 0, // 定时器时间
settimeoutState: false, //开启下一步
})
this.LoadState = true
setTimeout(function(){
setTimeout(function() {
this.Box_Two_Animation({
duration:3000,// 动画执行时间
axisX:0,// x轴移动
axisY:0,// y轴移动
settimeout:0,// 定时器时间
settimeoutState:false,//开启下一步
duration: 3000, // 动画执行时间
axisX: 0, // x轴移动
axisY: 0, // y轴移动
settimeout: 0, // 定时器时间
settimeoutState: false, //开启下一步
})
}.bind(this),1000)
}.bind(this), 1000)
time = 4500 //无时间
wx.setNavigationBarTitle({title: '打印区' })
}else if(e == 0){ //有排队切换打印
this.headTitle = "打印区";
/* wx.setNavigationBarTitle({
title: '打印区'
}) */
} else if (e == 0) { //有排队切换打印
this.LoadState = true
this.leaveUpState = true //排队状态----横向离开滑动动画 时间3s
this.data.activebrushX = (this.data.windowWidth - this.data.editorWidth)/2 + this.data.editorWidth + 50 //排队状态----横向离开滑动动画 3s
setTimeout(function(){ // 排队页面滑出---打印页面进入
this.data.activebrushX = (this.data.windowWidth - this.data.editorWidth) / 2 + this.data.editorWidth +
50 //排队状态----横向离开滑动动画 3s
setTimeout(function() { // 排队页面滑出---打印页面进入
this.Box_Two_Animation({
duration:3000,// 动画执行时间
axisX:0,// x轴移动
axisY:0,// y轴移动
settimeout:0,// 定时器时间
settimeoutState:false,//开启下一步
duration: 3000, // 动画执行时间
axisX: 0, // x轴移动
axisY: 0, // y轴移动
settimeout: 0, // 定时器时间
settimeoutState: false, //开启下一步
})
}.bind(this),time)
wx.setNavigationBarTitle({title: '打印区' })
}else if(e == 3){
}.bind(this), time)
this.headTitle = "打印区";
/* wx.setNavigationBarTitle({
title: '打印区'
}) */
} else if (e == 3) {
// 快速切换--设计区底图
this.Box_Two_Animation({
duration:0,// 动画执行时间
axisX:this.data.windowWidth,// x轴移动
axisY:0,// y轴移动
settimeout:0,// 定时器时间
settimeoutState:false,//开启下一步
duration: 0, // 动画执行时间
axisX: this.data.windowWidth, // x轴移动
axisY: 0, // y轴移动
settimeout: 0, // 定时器时间
settimeoutState: false, //开启下一步
})
this.LoadState = true
setTimeout(function(){
setTimeout(function() {
this.Box_Two_Animation({
duration:3000,// 动画执行时间
axisX:0,// x轴移动
axisY:0,// y轴移动
settimeout:0,// 定时器时间
settimeoutState:false,//开启下一步
duration: 3000, // 动画执行时间
axisX: 0, // x轴移动
axisY: 0, // y轴移动
settimeout: 0, // 定时器时间
settimeoutState: false, //开启下一步
})
}.bind(this),1000)
}.bind(this), 1000)
time = 500 //无时间
wx.setNavigationBarTitle({title: '打印区' })
this.headTitle = "打印区";
/* wx.setNavigationBarTitle({
title: '打印区'
}) */
}
setTimeout(function(){
setTimeout(function() {
this.printingStart = true //打印状态----横向进来滑动动画
this.data.printingStartX = 0
}.bind(this),(time + 3500))
}.bind(this), (time + 3500))
// 刷子开始打印手机壳
setTimeout(function(){
setTimeout(function() {
this.initstate = true
this.init()
}.bind(this),(time + 6500))
}.bind(this), (time + 6500))
// 开启定时器查询打印状态
if(this.teststate){
if (this.teststate) {
clearInterval(this.orderOrderStatusTime)
this.orderOrderStatusTime = setInterval(function(){
this.orderOrderStatusTime = setInterval(function() {
this.orderOrderStatusGet()
}.bind(this),15000)
}else{
}.bind(this), 15000)
} else {
clearInterval(this.orderOrderStatusTime)
this.orderOrderStatusTime = setInterval(function(){
this.orderOrderStatusTime = setInterval(function() {
this.orderOrderStatusGet()
}.bind(this),10000)
}.bind(this), 10000)
}
},
clearIntervalTime(){// 清除定时器
clearIntervalTime() { // 清除定时器
clearInterval(this.statetime)
this.statetime = null
clearInterval(this.orderOrderStatusTime)
......@@ -1054,24 +1228,24 @@
})
});
},
tosetClipboardData(id){ // 复制成功
tosetClipboardData(id) { // 复制成功
uni.setClipboardData({
data: id,
success: function () {
success: function() {
uni.showToast({
title: '复制成功',
icon:'none',
icon: 'none',
duration: 2000
});
}
});
},
callPhone (phone) { //拨打电话
callPhone(phone) { //拨打电话
uni.makePhoneCall({
phoneNumber: '18938664545'
})
},
previewImg(goods, index) {//预览图片
previewImg(goods, index) { //预览图片
let img = goods.works_image
uni.previewImage({
current: index,
......@@ -1094,7 +1268,7 @@
this.leftx = this.data.render_cove_width
}else{ */
var that = this;
wx.getSystemInfo({//获取屏幕宽高
wx.getSystemInfo({ //获取屏幕宽高
success: function(res) {
let pixelRate = res.windowWidth / 750;
that.data.windowWidth = res.windowWidth // 屏幕宽度
......@@ -1105,20 +1279,24 @@
/* } */
this.loadData();
},
onshow(){
this.data.activebrushX = '-500'//排队盒子动画坐标
onshow() {
this.data.activebrushX = '-500' //排队盒子动画坐标
this.printingStart = false
this.data.printingStartX = '-500'//生产中盒子动画坐标
this.data.printingStartX = '-500' //生产中盒子动画坐标
},
onUnload() {
this.clearIntervalTime()
let pages = getCurrentPages();
// console.log(pages)
if(this.tomallstate){
if(pages[pages.length - 2].route == "pages/mine/order"){
wx.navigateBack({delta: 3})
}else if(pages[pages.length - 2].route == "pages/index/index"){
wx.navigateBack({delta: 2})
if (this.tomallstate) {
if (pages[pages.length - 2].route == "pages/mine/order") {
wx.navigateBack({
delta: 3
})
} else if (pages[pages.length - 2].route == "pages/index/index") {
wx.navigateBack({
delta: 2
})
}
}
}
......@@ -1180,11 +1358,12 @@
}
}
.steps .li.active .steps_img{
.steps .li.active .steps_img {
background: #864BC3;
border: 1upx solid #864BC3;
}
.steps .li.red .steps_img{
.steps .li.red .steps_img {
background: #864BC3;
border: 1upx solid #864BC3;
}
......@@ -1201,19 +1380,24 @@
z-index: 1;
/*放置在数字后面*/
}
.steps .li.red ~ .li.red:after {
.steps .li.red~.li.red:after {
background-color: #864BC3;
}
.steps .li.red ~ .li.active:after {
.steps .li.red~.li.active:after {
background-color: #864BC3;
}
.steps .li.red ~ .li.wait:after {
.steps .li.red~.li.wait:after {
background-color: #864BC3;
}
.steps .li.active ~ .li.wait:after {
.steps .li.active~.li.wait:after {
background-color: #864BC3;
}
.steps .li.wait ~ .li.wait:after {
.steps .li.wait~.li.wait:after {
background-color: #B6B6B6;
}
......@@ -1225,23 +1409,24 @@
justify-content: center;
}
.brush{
.brush {
position: relative;
transition: all 3s;
transform: translateX(-400px);
}
.twobrush{
.twobrush {
position: relative;
transition: all 3s;
}
.item-text{
.item-text {
transition: all 2s;
transform: translateX(400px);
}
.printer{
.printer {
transform: translateX(0px);
}
......@@ -1253,11 +1438,13 @@
display: block;
margin: 0upx auto 102upx;
}
.start_title {
font-size: 30upx;
text-align: center;
color: #FFFFFF;
}
.start_text {
width: 70%;
text-align: center;
......
......@@ -80,7 +80,6 @@ export function _query ({api, params, callBack, resultType = Enums.DataType.JSON
}
/**
* 修改
* @param {*}
......
static/icon_diy.png

46.7 KB | W: | H:

static/icon_diy.png

50.5 KB | W: | H:

static/icon_diy.png
static/icon_diy.png
static/icon_diy.png
static/icon_diy.png
  • 2-up
  • Swipe
  • Onion skin
static/icon_saoyisao.png

735 Bytes | W: | H:

static/icon_saoyisao.png

756 Bytes | W: | H:

static/icon_saoyisao.png
static/icon_saoyisao.png
static/icon_saoyisao.png
static/icon_saoyisao.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -18,10 +18,17 @@ const baseURL = baseApi[accountInfo.miniProgram.envVersion]
const Env = {
getDevBaseURL: () => baseURL,
getBaseURL: () => baseURL,
getmachineId: () => '100055', //线上100086 //测试 422001' //100086
getmachineId: () => '100055', //线上100086 //测试 422001' //100086 //100055
getappcode: () => 'lite',
getmalltext: () => "色彩公园Lite",
getAppID: () => "wx1c777ee874c39b0b",
getcompany: () => "深圳市瑞丰彩科技有限公司"
getcompany: () => "深圳市瑞丰彩科技有限公司",
// 跳转--色彩小程序
getappId: () => "wx55b5b6d95c648041",
//getenvVersion: () => "trial",
getenvVersion: () => "release",
}
export default Env
\ No newline at end of file
......@@ -7,13 +7,13 @@ const request = new Fly
* 请求拦截
*/
request.interceptors.request.use((config, promise) => {
// 超时设置
//超时设置
if (config._timeout) config.timeout = 60000;
// 从环境变量中取 BASE_UR
//从环境变量中取 BASE_UR
console.log(process)
if (process.env.NODE_ENV === 'development') config.baseURL = Env.getDevBaseURL()
else config.baseURL = Env.getBaseURL()
// JSON格式化,未指定时,默认true
//JSON格式化,未指定时,默认true
config.parseJson = $n._isNotNull(config.parseJson) ? config.parseJson : true
// 如指定_token == true,则在headers中跟上相关token信息
if (config._token) config.headers['token'] = store.getters.appUser.token;
......@@ -27,7 +27,7 @@ request.interceptors.request.use((config, promise) => {
request.interceptors.response.use(
(response, promise) => {
let data = response.data || {status: false, errorMsg: '服务器未响应结果'}
console.warn('####### API Response: ', data)
//console.warn('####### API Response: ', data)
if (data.code == 401 || data.code == 403) {
uni.showModal({
title: '',
......@@ -42,7 +42,7 @@ request.interceptors.response.use(
(error, promise) => {
let msg = $n._caseValue(error.code, 0, '网络连接异常', 1, '网络连接超时', 401, '请求服务未授权', error.msg)
console.error('####### API Response error: ', error)
if (error.status == 401) {
if (error.status == 401 ) {
uni.showModal({
title: '',
content: '登录超时,请重新登录!',
......@@ -51,7 +51,17 @@ request.interceptors.response.use(
uni.navigateTo({ url: '/pages/login/login' })
}
})
}else if(error.status == 500){
uni.showModal({
title: '',
content: '服务器异常,状态=500' ,
showCancel: false,
})
} else return promise.reject(msg)
}
},
)
export default request
\ No newline at end of file
......@@ -7,7 +7,7 @@ import Env from './Env'
const wechat = {
oauth2: ({appid, redirectUri, responseType = 'code', scope = 'snsapi_base', state = 'WECHAT'} = {}) => {
let oauth2URL = 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=' + appid + '&redirect_uri=' + redirectUri + '&response_type=' + responseType + '&scope=' + scope + '&state=' + state + '#wechat_redirect'
console.warn('### oauth2URL ###', oauth2URL)
//console.warn('### oauth2URL ###', oauth2URL)
window.location.href = oauth2URL
},
hashSHA1: (str) => {
......@@ -29,12 +29,12 @@ const wechat = {
let signature = this.hashSHA1(signatureStr)
jweixin.ready(res => {
wechatService.setWxConfigInitStatus(true)
console.warn('#### wx.ready ####', res)
alert('wx.ready: ' + JSON.stringify(res))
//console.warn('#### wx.ready ####', res)
//alert('wx.ready: ' + JSON.stringify(res))
})
jweixin.error(res => {
console.warn('#### wx.error ####', res)
alert('wx.error: ' + JSON.stringify(res))
//console.warn('#### wx.error ####', res)
//alert('wx.error: ' + JSON.stringify(res))
})
let configData = {
// debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
......
......@@ -172,7 +172,6 @@ class WxTouchEvent {
this.touchCancel.dispatch(evt);
}
_cancelLongTap() {
clearTimeout(this.longTapTimeout);
}
......
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