Commit 9cdf6526 by huahua

修改壁纸图片大小

parent 29f3deec
...@@ -7,7 +7,6 @@ ...@@ -7,7 +7,6 @@
num:0 num:0
}, },
onLaunch: function() { onLaunch: function() {
// console.log('App Launch');
// 字体列表 // 字体列表
homeservice.queryList({ homeservice.queryList({
s: 'Material.fontFamilyList' s: 'Material.fontFamilyList'
...@@ -51,7 +50,6 @@ ...@@ -51,7 +50,6 @@
}) })
that.$base.typefacedata = that.globalData.typefacedata that.$base.typefacedata = that.globalData.typefacedata
if(that.globalData.num == that.globalData.typefacedata.length){ if(that.globalData.num == that.globalData.typefacedata.length){
// console.log("加载字体耗时 "+ (new Date().getTime() - t1) +" 毫秒")
that.$base.typefacedata = that.globalData.typefacedata that.$base.typefacedata = that.globalData.typefacedata
} }
that.globalData.num = 0 that.globalData.num = 0
...@@ -63,7 +61,6 @@ ...@@ -63,7 +61,6 @@
}); });
}, },
onShow: function() { onShow: function() {
console.log('App Show');
//调用监听网络状态的方法 //调用监听网络状态的方法
wx.getNetworkType({ wx.getNetworkType({
success: function(res) { success: function(res) {
...@@ -78,7 +75,7 @@ ...@@ -78,7 +75,7 @@
}) })
}, },
onHide: function() { onHide: function() {
console.log('App Hide'); //console.log('App Hide');
} }
}; };
</script> </script>
......
...@@ -73,10 +73,12 @@ ...@@ -73,10 +73,12 @@
}, },
methods: { methods: {
hide() { hide() {
//console.log("隐藏")
if (this.mode === 'insert' && this.position === 'middle') return; if (this.mode === 'insert' && this.position === 'middle') return;
this.$emit('hidePopup'); this.$emit('hidePopup');
}, },
closeMask() { closeMask() {
//console.log("隐藏")
if (this.mode === 'insert') { if (this.mode === 'insert') {
this.$emit('hidePopup'); this.$emit('hidePopup');
} }
......
{ {
"pages": [ "pages": [{
/*{ "path": "pages/index/mall",
"path": "pages/index/mall", "style": {
"style": { "navigationBarTitleText": "",
"navigationBarTitleText": "色彩高尔夫", // "navigationStyle":"custom",//禁用uni-app默认的头部导航
// "navigationStyle":"custom",//禁用uni-app默认的头部导航 "enablePullDownRefresh": true,
"enablePullDownRefresh": true "navigationStyle": "custom"
} }
}, */ },
/*{ /*{
"path": "pages/index/machineDetail", "path": "pages/index/machineDetail",
"style": { "style": {
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
{ {
"path": "pages/index/machineDetail", "path": "pages/index/machineDetail",
"style": { "style": {
"navigationBarTitleText": "高尔夫定制", "navigationBarTitleText": "",
"navigationStyle": "custom" //禁用uni-app默认的头部导航 "navigationStyle": "custom" //禁用uni-app默认的头部导航
} }
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
{ {
"path": "pages/index/index", "path": "pages/index/index",
"style": { "style": {
"navigationBarTitleText": "高尔夫定制", "navigationBarTitleText": "",
"navigationStyle": "custom" //禁用uni-app默认的头部导航 "navigationStyle": "custom" //禁用uni-app默认的头部导航
} }
...@@ -52,34 +52,35 @@ ...@@ -52,34 +52,35 @@
{ {
"root": "pages/mall", "root": "pages/mall",
"pages": [ "pages": [
{ {
"path": "lineUp", "path": "lineUp",
"style": { "style": {
"navigationBarTitleText": "排队列表", "navigationBarTitleText": "排队列表",
"enablePullDownRefresh": true, "enablePullDownRefresh": true,
"navigationStyle": "custom" "navigationStyle": "custom"
} }
} }
] ]
}, },
{ {
"root": "pages/mine", "root": "pages/mine",
"pages": [ "pages": [{
{
"path": "self_help_payment_details", "path": "self_help_payment_details",
"style": { "style": {
"navigationBarTitleText": "打印" "navigationBarTitleText": "打印",
"navigationStyle": "custom"
} }
}, },
{ {
"path": "self_help_payment_details_new", "path": "self_help_payment_details_new",
"style": { "style": {
"navigationBarTitleText": "打印" "navigationBarTitleText": "打印",
"navigationStyle": "custom"
} }
}, },
{ {
"path": "order", "path": "order",
"style": { "style": {
......
...@@ -2,17 +2,27 @@ ...@@ -2,17 +2,27 @@
<uni-popup ref="Signincenter" type="bottom"> <uni-popup ref="Signincenter" type="bottom">
<view class='dialog-container'> <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
<view style="width: 100%; height: 440upx; background: #eeeeee; overflow: hidden; position: relative; z-index: 999; "> style="position: fixed; top: 0; left: 0; width: 100%; height: 100%; opacity: 0.5; z-index: 998; background: #131319;">
<view @click="cose()" style="position: absolute; top: 0; right: 0;"> </view>
<image style="height: 30upx; width: 30upx; margin: 20upx;" src="../../static/icon_guanbi.png" mode=""></image> <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>
</view> </view>
<image src="../../static/logo.jpg" mode="aspectFill" style="width: 109upx; height: 98upx; display: block; margin: 36upx auto 25upx;"></image> <image src="../../static/logo.jpg" mode="aspectFill"
<view style="text-align: center; font-size: 32upx; font-weight: 500; color: #131319;"> 欢迎来到{{startText}}小程序 </view> style="width: 109upx; height: 98upx; display: block; margin: 36upx auto 25upx;"></image>
<view style="margin-top: 10upx; text-align: center; font-size: 24upx; font-weight: 500; color: #888888;"> 为了更好的服务,需要得到您的授权 </view> <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 class="buttonGetUserInfo cssbut" hover-class="hover-class-bg" v-if="canIUseGetUserProfile"
<button v-else open-type="getUserInfo" @getuserinfo="getUserInfo" lang="zh_CN" class="buttonGetUserInfo cssbut" hover-class="hover-class-bg"> 获取头像昵称 </button> @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>
</view> </view>
</uni-popup> </uni-popup>
...@@ -26,7 +36,7 @@ ...@@ -26,7 +36,7 @@
uniPopup uniPopup
}, },
computed: { computed: {
startText(){ startText() {
return this.$Env.getmalltext() return this.$Env.getmalltext()
}, },
}, },
...@@ -36,87 +46,106 @@ ...@@ -36,87 +46,106 @@
}; };
}, },
methods: { methods: {
cose(){ cose() {
this.$refs['Signincenter'].close() this.$refs['Signincenter'].close()
// this.$emit('ok', true); // this.$emit('ok', true);
}, },
init(){ init() {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs['Signincenter'].open() this.$refs['Signincenter'].open()
}) })
if (wx.getUserProfile) { if (wx.getUserProfile) {
this.canIUseGetUserProfile = true this.canIUseGetUserProfile = true
} }
}, },
getUserProfile(e) { getUserProfile(e) {
uni.getSetting({ uni.getSetting({
success(res){ success(res) {
console.log('获取用户信息是否用户同意') console.log('获取用户信息是否用户同意')
console.log(res.authSetting) console.log(res.authSetting)
} }
}) })
let that = this; let that = this;
// 推荐使用wx.getUserProfile获取用户信息,开发者每次通过该接口获取用户个人信息均需用户确认 // 推荐使用wx.getUserProfile获取用户信息,开发者每次通过该接口获取用户个人信息均需用户确认
// 开发者妥善保管用户快速填写的头像昵称,避免重复弹窗 // 开发者妥善保管用户快速填写的头像昵称,避免重复弹窗
wx.getUserProfile({ wx.getUserProfile({
lang:'zh_CN', lang: 'zh_CN',
desc: '用于完善会员资料', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写 desc: '用于完善会员资料', // 声明获取用户个人信息后的用途,后续会展示在弹窗中,请谨慎填写
success: (Userres) => { success: (Userres) => {
console.log('getUserInfo 获取头像昵称') //console.log('getUserInfo 获取头像昵称')
console.log(Userres) //console.log(Userres)
that.$base.Userres = Userres that.$base.Userres = Userres
uni.showLoading({title: '正在登录中...',mask: true}); uni.showLoading({
uni.login({ title: '正在登录中...',
provider: 'weixin', mask: true
success: (weixinres) => { });
console.log('uni.login') uni.login({
console.log(weixinres) provider: 'weixin',
if (weixinres.code) { success: (weixinres) => {
that.loginInfo = Userres.userInfo; console.log('uni.login')
that.loginInfo.encryptedData = Userres.encryptedData; console.log(weixinres)
that.loginInfo.iv = Userres.iv; if (weixinres.code) {
that.loginInfo.code = weixinres.code; that.loginInfo = Userres.userInfo;
userService.setWxInfo(that.loginInfo); that.loginInfo.encryptedData = Userres.encryptedData;
userService.cacheWxInfo(that.loginInfo); that.loginInfo.iv = Userres.iv;
userService.login({ that.loginInfo.code = weixinres.code;
s: 'Init.init', userService.setWxInfo(that.loginInfo);
code: that.loginInfo.code, userService.cacheWxInfo(that.loginInfo);
nickname: that.loginInfo.nickName || '微信用户', userService.login({
gender:that.loginInfo.gender, s: 'Init.init',
portrait: that.loginInfo.avatarUrl, code: that.loginInfo.code,
encryptedData:that.loginInfo.encryptedData, nickname: that.loginInfo.nickName || '微信用户',
iv:that.loginInfo.iv, gender: that.loginInfo.gender,
promoter_id:that.$base.promoter_id ,// 推广的员的编号 portrait: that.loginInfo.avatarUrl,
machine_id:that.$base.machine_id,//用户进入设备id encryptedData: that.loginInfo.encryptedData,
appcode: that.$Env.getappcode() iv: that.loginInfo.iv,
}).then(result => { 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.$refs['Signincenter'].close()
}).catch(err => {
uni.hideLoading();
if (err) {
uni.showToast({
title: err.msg,
icon: 'none'
});
}
})
} else {
uni.hideLoading(); uni.hideLoading();
uni.showToast({title: '登录成功',icon: 'none'}); //console.log('登录失败!' + res.errMsg)
// that.$emit('ok', true); uni.showToast({
that.$refs['Signincenter'].close() title: '登录失败!',
}).catch(err => { icon: 'none'
uni.hideLoading(); });
uni.showToast({title: err.msg,icon: 'none'}); }
}) },
} else { fail: (err) => {
uni.hideLoading(); uni.hideLoading();
console.log('登录失败!' + res.errMsg) //console.error('uni.login授权登录失败:' + JSON.stringify(err));
uni.showToast({title: '登录失败!',icon: 'none'}); uni.showToast({
} title: '授权登录失败',
}, icon: 'none'
fail: (err) => { });
uni.hideLoading(); }
console.error('uni.login授权登录失败:' + JSON.stringify(err)); })
uni.showToast({title: '授权登录失败',icon: 'none'}); },
} fail(err) {
}) uni.hideLoading();
}, console.log("wx.getUserProfile获取用户信息失败", err)
fail(err) { uni.showToast({
uni.hideLoading(); title: '获取用户信息失败',
console.log("wx.getUserProfile获取用户信息失败", err) icon: 'none'
uni.showToast({title: '获取用户信息失败',icon: 'none'}); });
} }
}) })
}, },
getUserInfo(e) { getUserInfo(e) {
let that = this; let that = this;
...@@ -126,7 +155,10 @@ ...@@ -126,7 +155,10 @@
console.log('getUserInfo 获取头像昵称') console.log('getUserInfo 获取头像昵称')
console.log(Userres) console.log(Userres)
that.$base.Userres = Userres that.$base.Userres = Userres
uni.showLoading({title: '正在登录中...',mask: true}); uni.showLoading({
title: '正在登录中...',
mask: true
});
uni.login({ uni.login({
provider: 'weixin', provider: 'weixin',
success: (weixinres) => { success: (weixinres) => {
...@@ -143,42 +175,57 @@ ...@@ -143,42 +175,57 @@
s: 'Init.init', s: 'Init.init',
code: that.loginInfo.code, code: that.loginInfo.code,
nickname: that.loginInfo.nickName, nickname: that.loginInfo.nickName,
gender:that.loginInfo.gender, gender: that.loginInfo.gender,
portrait: that.loginInfo.avatarUrl, portrait: that.loginInfo.avatarUrl,
encryptedData:that.loginInfo.encryptedData, encryptedData: that.loginInfo.encryptedData,
iv:that.loginInfo.iv, iv: that.loginInfo.iv,
promoter_id:that.$base.promoter_id ,// 推广的员的编号 promoter_id: that.$base.promoter_id, // 推广的员的编号
machine_id:that.$base.machine_id,//用户进入设备id machine_id: that.$base.machine_id, //用户进入设备id
appcode: that.$Env.getappcode() appcode: that.$Env.getappcode()
}).then(result => { }).then(result => {
uni.hideLoading(); uni.hideLoading();
uni.showToast({title: '登录成功',icon: 'none'}); uni.showToast({
title: '登录成功',
icon: 'none'
});
// that.$emit('ok', true); // that.$emit('ok', true);
that.$refs['Signincenter'].close() that.$refs['Signincenter'].close()
}).catch(err => { }).catch(err => {
uni.hideLoading(); uni.hideLoading();
uni.showToast({title: err.msg,icon: 'none'}); uni.showToast({
title: err.msg,
icon: 'none'
});
}) })
} else { } else {
uni.hideLoading(); uni.hideLoading();
console.error('uni.login授权登录失败:' + JSON.stringify(err)); console.error('uni.login授权登录失败:' + JSON.stringify(err));
uni.showToast({title: '授权登录失败',icon: 'none'}); uni.showToast({
title: '授权登录失败',
icon: 'none'
});
} }
}, },
fail: (err) => { fail: (err) => {
uni.hideLoading(); uni.hideLoading();
console.error('授权登录失败:' + JSON.stringify(err)); console.error('授权登录失败:' + JSON.stringify(err));
uni.showToast({title: '授权登录失败',icon: 'none'}); uni.showToast({
title: '授权登录失败',
icon: 'none'
});
} }
}) })
}, },
fail(err) { fail(err) {
uni.hideLoading(); uni.hideLoading();
console.log("wx.getUserProfile获取用户信息失败", err) console.log("wx.getUserProfile获取用户信息失败", err)
uni.showToast({title: '获取用户信息失败',icon: 'none'}); uni.showToast({
title: '获取用户信息失败',
icon: 'none'
});
} }
}) })
}, },
// 打开权限设置页提示框 // 打开权限设置页提示框
showSettingToast(e) { showSettingToast(e) {
...@@ -214,6 +261,7 @@ ...@@ -214,6 +261,7 @@
<style lang="scss"> <style lang="scss">
@import "./css/main.css"; @import "./css/main.css";
/* 去除button默认样式 */ /* 去除button默认样式 */
.cssbut { .cssbut {
background-color: transparent !important; background-color: transparent !important;
...@@ -222,25 +270,28 @@ ...@@ -222,25 +270,28 @@
line-height: inherit !important; line-height: inherit !important;
border-radius: 0 !important; border-radius: 0 !important;
} }
.cssbut::after { .cssbut::after {
border: none !important; border: none !important;
} }
/* 弹框 */ /* 弹框 */
.dialog-container { .dialog-container {
width: 100%; width: 100%;
height: 100%; height: 100%;
} }
.buttonGetUserInfo{
.buttonGetUserInfo {
text-align: center !important; text-align: center !important;
margin: 49upx auto 0 !important; margin: 49upx auto 0 !important;
line-height: 70upx !important; line-height: 70upx !important;
width: 400upx !important; width: 400upx !important;
height: 70upx !important; height: 70upx !important;
background: #F56364 !important; background: #F56364 !important;
border-radius: 35upx !important; border-radius: 35upx !important;
border: 0 !important; border: 0 !important;
font-size: 36upx !important; font-size: 36upx !important;
font-weight: 400 !important; font-weight: 400 !important;
color: #FFFFFF !important; color: #FFFFFF !important;
} }
</style> </style>
<template> <template>
<view v-if="showPopup" class="uni-popup" @touchmove.stop.prevent="clear"> <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="['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"> <view class="uni-popup__wrapper-box" @click.stop="clear">
<slot /> <slot />
</view> </view>
...@@ -45,7 +45,8 @@ ...@@ -45,7 +45,8 @@
maskClick: { maskClick: {
type: Boolean, type: Boolean,
default: true default: true
} },
}, },
data() { data() {
return { return {
...@@ -134,9 +135,9 @@ ...@@ -134,9 +135,9 @@
this.showTrans = true this.showTrans = true
}, 50); }, 50);
}) })
this.$emit('change', { /* this.$emit('change', {
show: true show: true
}) }) */
}, },
close(type) { close(type) {
this.showTrans = false this.showTrans = false
......
...@@ -2,10 +2,12 @@ ...@@ -2,10 +2,12 @@
<view :style="{ height: height + 'px', background:background}" style="position: fixed; z-index: 888;"> <view :style="{ height: height + 'px', background:background}" style="position: fixed; z-index: 888;">
<view class="head" :style="{ height: height + 'px', background:background}"> <view class="head" :style="{ height: height + 'px', background:background}">
<view class="back" @click="back" v-if="backShow" :style="{ top: top + 'px', color:color }"> <view class="back" @click="back" v-if="backShow" :style="{ top: top + 'px', color:color }">
<image src="../../../static/recommend/icon_back_black.png" mode="aspectFit" <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>
<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>
</view> </view>
</template> </template>
...@@ -17,11 +19,11 @@ ...@@ -17,11 +19,11 @@
type: String, type: String,
default: '自定义标题' default: '自定义标题'
}, },
size:{ size: {
type: String, type: String,
default: '32' default: '32'
}, },
color:{ color: {
type: String, type: String,
default: '#000' default: '#000'
}, },
...@@ -33,65 +35,77 @@ ...@@ -33,65 +35,77 @@
type: Boolean, type: Boolean,
default: true default: true
}, },
background:{ background: {
type: String, type: String,
default: "linear-gradient(to right, #43e97b 0%, #38f9d7 100%)" default: "linear-gradient(to right, #43e97b 0%, #38f9d7 100%)"
},
isBack: {
type: Boolean,
default: false,
} }
}, },
data() { data() {
return { return {
height :0, height: 0,
top:0, top: 0,
} }
}, },
mounted() { mounted() {
}, },
created() { created() {
//设备信息 //设备信息
let app = uni.getSystemInfoSync(); let app = uni.getSystemInfoSync();
//胶囊信息 //胶囊信息
let menuButtonInfo = uni.getMenuButtonBoundingClientRect(); 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; this.top = menuButtonInfo.top;
}, },
methods: { methods: {
back(){ back() {
uni.navigateBack(); if (!this.isBack) {
uni.navigateBack();
} else {
uni.reLaunch({
url: '../index/mall'
})
}
} }
}, },
onLoad(options) { onLoad(options) {
}, },
onShow() { onShow() {
} }
} }
</script> </script>
<style> <style>
.head{ .head {
position: fixed; position: fixed;
width: 750rpx; width: 750rpx;
z-index: 888; z-index: 888;
align-items: center; align-items: center;
} }
.title{
position: fixed; .title {
width: 750rpx; position: fixed;
text-align: center; width: 750rpx;
line-height: 32px; text-align: center;
height: 32px; line-height: 32px;
} height: 32px;
.back{ }
position: fixed;
width: 81rpx; .back {
text-align: center; position: fixed;
line-height: 32px; width: 81rpx;
height: 32px; text-align: center;
font-size: 32rpx; line-height: 32px;
font-weight: 900; height: 32px;
z-index: 9; font-size: 32rpx;
align-items: center; font-weight: 900;
} z-index: 9;
align-items: center;
}
</style> </style>
<template> <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> --> <!-- <myhead :worksid="works_id" :title="titlename" :color="'#fff'" :titleShow="true" :backShow="true" :background="'none'"></myhead> -->
...@@ -32,9 +32,14 @@ ...@@ -32,9 +32,14 @@
<view :style="{width: data.bgWidth +'px',height: data.bgHeight +'px' }" style="position: relative; "> <view :style="{width: data.bgWidth +'px',height: data.bgHeight +'px' }" style="position: relative; ">
<!-- background: #ffaa00; --> <!-- 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" <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> style="position: absolute; z-index: 0; top: 0; bottom: 0; margin: auto;"></image>
<!-- background: #007AFF; --> <!-- background: #007AFF; -->
<!-- 底色 --> <!-- 底色 -->
<!--<view :style="{width: data.editorWidth * 1.1 +'px',height: data.editorHeight * 1.1 +'px', <!--<view :style="{width: data.editorWidth * 1.1 +'px',height: data.editorHeight * 1.1 +'px',
...@@ -47,9 +52,13 @@ ...@@ -47,9 +52,13 @@
style="position: absolute; top: 0; bottom: 0; left: 0; right: 0;margin: auto;z-index: 1;"> style="position: absolute; top: 0; bottom: 0; left: 0; right: 0;margin: auto;z-index: 1;">
</view> </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" <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> style="position: absolute; z-index: 2; top: 0; bottom: 0; margin: auto;"></image>
<!-- 辅助线 --> <!-- 辅助线 -->
<view v-if="guide_left" <view v-if="guide_left"
...@@ -227,10 +236,14 @@ ...@@ -227,10 +236,14 @@
</block> </block>
</view> </view>
</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:-1000px;left:-1000px;'>
<!-- <view class='item-box' style='top:100px;left:100px;background: #007AFF;'> -->
<view class='item-box-in' <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;"> style="text-align: center;">
<view id="item-text" class="item-text" :style="{'font-weight': data.itemList[data.cidx].font_style , <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, 'font-size': data.itemList[data.cidx].font_size+ 'px',color:data.itemList[data.cidx].font_color,
...@@ -243,11 +256,11 @@ ...@@ -243,11 +256,11 @@
<view class="operation" v-if="!active && !guide_left"> <view class="operation" v-if="!active && !guide_left">
<view class="operation_top"> <view class="operation_top">
<image @click.stop='prev' src="../../static/icon_back_enabled.png" mode="aspectFill" <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>
<view class="operation_bottom"> <view class="operation_bottom">
<image @click.stop='next' src="../../static/icon_nextstep.png" mode="aspectFill" <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>
</view> </view>
<!-- 切换商品 --> <!-- 切换商品 -->
...@@ -356,7 +369,6 @@ ...@@ -356,7 +369,6 @@
<view class="tool_li_text">清空底色</view> <view class="tool_li_text">清空底色</view>
</view> </view>
<image v-if="isShowGif && !guide_left" src="../../static/img/icon_finger_stretch.gif" style="width: 450upx; height: 450upx; left:calc(50% - 225upx); position: fixed; <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); top: calc(50% - 225upx);
z-index: 1000; z-index: 1000;
...@@ -410,7 +422,7 @@ ...@@ -410,7 +422,7 @@
<!-- 单指可拖拽 --> <!-- 单指可拖拽 -->
<!-- && data.itemList.length > 0 --> <!-- && data.itemList.length > 0 -->
<view v-if="!guide_left " <view v-if="!guide_left "
style="position: fixed; font-size: 22upx; color: #999999; bottom: 340upx;left: 50%;transform: translate(-50%, 0%);z-index: 999; "> style="position: fixed; font-size: 22upx; color: #999999; bottom: 280upx;left: 50%;transform: translate(-50%, 0%);z-index: 999; ">
<view>单指拖拽,双指伸缩</view> <view>单指拖拽,双指伸缩</view>
<!-- <view>双指可缩放</view> <!-- <view>双指可缩放</view>
<view>双击可裁剪</view> --> <view>双击可裁剪</view> -->
...@@ -725,7 +737,7 @@ ...@@ -725,7 +737,7 @@
works_id: null, //作品id works_id: null, //作品id
machine_id: null, //设备id machine_id: null, //设备id
key: null, //1直营配送站 2 万能通用版 3色彩自助站 key: null, //1直营配送站 2 万能通用版 3色彩自助站
design_color: '#131319', design_color: '#fff',
mix_scale: 1, //图片比率 mix_scale: 1, //图片比率
design_width: 240, design_width: 240,
design_height: 340, design_height: 340,
...@@ -807,7 +819,6 @@ ...@@ -807,7 +819,6 @@
material_series_list: [], //系列分类 material_series_list: [], //系列分类
material_series_currentId: 0, material_series_currentId: 0,
isShowGif: false, //是否显示 isShowGif: false, //是否显示
}; };
}, },
...@@ -821,11 +832,11 @@ ...@@ -821,11 +832,11 @@
methods: { methods: {
//点击显示动画 //点击显示动画
oclikGifImage() { oclikGifImage() {
this.isShowGif = false; this.isShowGif = false;
}, },
//涂鸦 //涂鸦
ontuya() { ontuya() {
this.$nextTick(() => { this.$nextTick(() => {
...@@ -2712,7 +2723,11 @@ ...@@ -2712,7 +2723,11 @@
cancel(type) { //关闭弹框 cancel(type) { //关闭弹框
this.isShowGif = false; this.isShowGif = false;
this.$refs['show' + type].close() try {
this.$refs['show' + type].close()
} catch (e) {
}
this.addtext = false this.addtext = false
if (wx.pageScrollTo) { if (wx.pageScrollTo) {
wx.pageScrollTo({ wx.pageScrollTo({
...@@ -2743,8 +2758,21 @@ ...@@ -2743,8 +2758,21 @@
} }
}, },
//关闭所有弹窗回调事件
change(e) { 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) { //打开弹框 togglePopup(type, open) { //打开弹框
...@@ -2794,6 +2822,7 @@ ...@@ -2794,6 +2822,7 @@
var query = wx.createSelectorQuery(); var query = wx.createSelectorQuery();
query.select('#item-text').boundingClientRect(); query.select('#item-text').boundingClientRect();
query.exec(function(res) { query.exec(function(res) {
//console.log(res)
var width = res[0].width; var width = res[0].width;
var rate = item.width / width; var rate = item.width / width;
var tmpSize = item.font_size * rate; var tmpSize = item.font_size * rate;
...@@ -3488,7 +3517,7 @@ ...@@ -3488,7 +3517,7 @@
var currentItem = items[index]; var currentItem = items[index];
if (currentItem != null) { if (currentItem != null) {
// 判断删除的是否是模板组件 // 判断删除的是否是模板组件
if (currentItem.hasOwnProperty("works_id") && currentItem.works_id) { if (currentItem.works_id) {
this.data.works_idlenght-- this.data.works_idlenght--
} }
let zIndex = items[index].index; let zIndex = items[index].index;
...@@ -3563,8 +3592,17 @@ ...@@ -3563,8 +3592,17 @@
}, },
async text_awaitone(e) { 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]; var item = items[index];
item.content = e.detail.value; item.content = e.detail.value;
var that = this; var that = this;
//赋值 //赋值
this.data.currentText = e.detail.value this.data.currentText = e.detail.value
...@@ -3575,9 +3613,13 @@ ...@@ -3575,9 +3613,13 @@
var query = wx.createSelectorQuery(); var query = wx.createSelectorQuery();
query.select('#item-text').boundingClientRect(); query.select('#item-text').boundingClientRect();
query.exec(function(res) { query.exec(function(res) {
/* console.log(res) */
var width = res[0].width; var width = res[0].width;
var rate = item.width / width; var rate = item.width / width;
var tmpSize = item.font_size * rate; 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) { if (tmpSize > maxFontSize) {
item.font_size = maxFontSize; item.font_size = maxFontSize;
item.height = maxFontSize * heightRate; item.height = maxFontSize * heightRate;
...@@ -3595,6 +3637,8 @@ ...@@ -3595,6 +3637,8 @@
}) })
}, },
async text_await(e) { async text_await(e) {
// 获取当前选中的部件 // 获取当前选中的部件
var item = items[index]; var item = items[index];
if (e.detail.value != item.content) { if (e.detail.value != item.content) {
...@@ -3609,18 +3653,40 @@ ...@@ -3609,18 +3653,40 @@
var query = wx.createSelectorQuery(); var query = wx.createSelectorQuery();
query.select('#item-text').boundingClientRect(); query.select('#item-text').boundingClientRect();
query.exec(function(res) { query.exec(function(res) {
console.log(res)
var width = res[0].width; var width = res[0].width;
var rate = item.width / 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; var tmpSize = item.font_size * rate;
/* console.log("输入tmpSize大小=" + tmpSize) */
if (tmpSize > maxFontSize) { if (tmpSize > maxFontSize) {
item.font_size = maxFontSize; item.font_size = maxFontSize;
item.height = maxFontSize * heightRate; item.height = maxFontSize * heightRate;
item.top = item.y - (item.height / 2); 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 { } else {
item.font_size = item.font_size * rate; item.font_size = item.font_size * rate;
item.height = item.height * rate; item.height = item.height * rate;
item.top = item.y - (item.height / 2); item.top = item.y - (item.height / 2);
} }
// that.setData({itemList:items}); // that.setData({itemList:items});
that.setData({ that.setData({
data: that.data data: that.data
...@@ -3708,12 +3774,8 @@ ...@@ -3708,12 +3774,8 @@
s: 'Product.detail', s: 'Product.detail',
id: this.data.goods_id id: this.data.goods_id
}).then(result => { }).then(result => {
this.titlename = result.alias_name //修改头部名称 this.titlename = result.name //修改头部名称
/*homeservice.newqueryList({
s:'Product.getDat'
}).then(result => { */
//this.data.goods_id = result.id // 商品id
//this.queryPage.goods_category_id = result.goods_category_id //星形接口列表增加,产品分类参数
//读取背景图 //读取背景图
uni.getImageInfo({ uni.getImageInfo({
src: result.front_image_old, src: result.front_image_old,
...@@ -3734,10 +3796,10 @@ ...@@ -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 = result.front_image // 背景图
this.data.bgImage_old = result.front_image_old // 旧背景图 this.data.bgImage_old = result.front_image_old // 旧背景图
//this.data.bgImage_old = result.front_image;
this.data.bgImage_thumbnail = result.thumbnail // 介绍图片(主图遮罩) this.data.bgImage_thumbnail = result.thumbnail // 介绍图片(主图遮罩)
this.design_color = result.design_color // 背景颜色 this.design_color = result.design_color // 背景颜色
this.mix_scale = result.mix_scale //上传图片比率 this.mix_scale = result.mix_scale //上传图片比率
...@@ -3869,10 +3931,10 @@ ...@@ -3869,10 +3931,10 @@
} }
}, },
tap: function(e) { tap: function(e) {
if (items == null || items.length == 0) { if (items == null || items.length == 0) {
that.active = false; that.active = false;
that.guide_left = false that.guide_left = false
} else { } else {
that.isShowGif = false; that.isShowGif = false;
var curTime = e.timeStamp var curTime = e.timeStamp
var lastTime = e.currentTarget.dataset var lastTime = e.currentTarget.dataset
...@@ -3889,7 +3951,7 @@ ...@@ -3889,7 +3951,7 @@
} }
} }
that.lastTapTime = curTime that.lastTapTime = curTime
} }
}, },
touchStart: function(e) { touchStart: function(e) {
that.isRotate = e.touches.length > 1; that.isRotate = e.touches.length > 1;
...@@ -3929,7 +3991,7 @@ ...@@ -3929,7 +3991,7 @@
touchCancel: function(e) { touchCancel: function(e) {
that.isShowGif = false; that.isShowGif = false;
that.$refs['textsettingsshare'].close() that.$refs['textsettingsshare'].close()
if (items.length > 0) { if (items.length > 0) {
let item = items[index]; let item = items[index];
...@@ -4048,10 +4110,14 @@ ...@@ -4048,10 +4110,14 @@
page { page {
width: 100%; width: 100%;
height: 100%; height: 100%;
background: #FFFFFF
} }
.page { .page {
background: #FFFFFF !important; background: #FFFFFF;
width: 100%;
height: 100%;
} }
/* 图片 */ /* 图片 */
......
...@@ -143,7 +143,7 @@ const drag = { ...@@ -143,7 +143,7 @@ const drag = {
wx.vibrateShort(); // 使手机振动15ms wx.vibrateShort(); // 使手机振动15ms
} }
}else if(item.top > -5 && item.top < 5) { //上边框 }else if(item.top > -5 && item.top < 5) { //上边框
console.log('top') //console.log('top')
if(item.top < 5 && item.top > 0){ //上边框偏下 if(item.top < 5 && item.top > 0){ //上边框偏下
if(Marginleft < item.height){ //上边框放大 if(Marginleft < item.height){ //上边框放大
item.initialScale = item.initialScale * (item.height + item.top) / item.height item.initialScale = item.initialScale * (item.height + item.top) / item.height
...@@ -180,8 +180,8 @@ const drag = { ...@@ -180,8 +180,8 @@ const drag = {
let newRightTopPoint = this.getRotatedPoint(item.rightTopPoint, item.centerPos, -item.angle) let newRightTopPoint = this.getRotatedPoint(item.rightTopPoint, item.centerPos, -item.angle)
let newWidth = newRightTopPoint.x - newLeftBottomPoint.x let newWidth = newRightTopPoint.x - newLeftBottomPoint.x
let newHeight = newLeftBottomPoint.y - newRightTopPoint.y let newHeight = newLeftBottomPoint.y - newRightTopPoint.y
// if (item.isScale) {开启等比例缩放 //if(item.isScale) {开启等比例缩放
if (newWidth / newHeight > item.scaleone) { if (newWidth / newHeight > item.scaleone) {
newLeftBottomPoint.x = newLeftBottomPoint.x + Math.abs(newWidth - newHeight * item.scaleone) newLeftBottomPoint.x = newLeftBottomPoint.x + Math.abs(newWidth - newHeight * item.scaleone)
newWidth = newHeight * item.scaleone newWidth = newHeight * item.scaleone
} else { } else {
...@@ -202,7 +202,7 @@ const drag = { ...@@ -202,7 +202,7 @@ const drag = {
newHeight = newLeftBottomPoint.y - newRightTopPoint.y newHeight = newLeftBottomPoint.y - newRightTopPoint.y
let scaleWidth = newWidth / item.width let scaleWidth = newWidth / item.width
let scaleHeight = newHeight / item.height let scaleHeight = newHeight / item.height
// } //}
if (newHeight <= minwheight) { if (newHeight <= minwheight) {
newHeight = minwheight newHeight = minwheight
newWidth = Math.floor(newHeight * item.scaleone) newWidth = Math.floor(newHeight * item.scaleone)
...@@ -224,7 +224,7 @@ const drag = { ...@@ -224,7 +224,7 @@ const drag = {
item.top = newRightTopPoint.y item.top = newRightTopPoint.y
item.width = newWidth item.width = newWidth
item.height = newHeight item.height = newHeight
// 修改初始化原始图片比率-坐标 //修改初始化原始图片比率-坐标
item.initialScale = item.initialScale * scaleWidth item.initialScale = item.initialScale * scaleWidth
item.initialscaling = item.initialscaling * scaleWidth item.initialscaling = item.initialscaling * scaleWidth
if(item.image_left < 0){ if(item.image_left < 0){
......
<template> <template>
<view class="full-width full-height"> <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> :background="'none'"></myhead>
<view style="position: relative;width: 100%; height: 100%; z-index: 2;"> <view style="position: relative;width: 100%; height: 100%; z-index: 2;">
...@@ -14,17 +14,21 @@ ...@@ -14,17 +14,21 @@
:src="item.content + '?x-oss-process=image/resize,lfit,w_750'" mode="aspectFill"></image> :src="item.content + '?x-oss-process=image/resize,lfit,w_750'" mode="aspectFill"></image>
</swiper-item> </swiper-item>
</swiper> </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 class="dots">
<view v-for="(item, index) in Adlists" class="dot-wrapper" :key="index"> <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' ]"> :class="[index == currentSwiper ? 'iconsanjiaoxing':'iconxingzhuang-sanjiaoxing' ]">
</view> </view> -->
</view> </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; width: 300upx; height: 100upx;
background: linear-gradient(92deg, #F29F3D, #67C4CA); background: linear-gradient(92deg, #F29F3D, #67C4CA);
box-shadow: 0px 19px 48px 1px rgba(20, 31, 62, 0.35); box-shadow: 0px 19px 48px 1px rgba(20, 31, 62, 0.35);
...@@ -34,6 +38,7 @@ ...@@ -34,6 +38,7 @@
立即定制</view> 立即定制</view>
</view> </view>
</view> </view>
<!-- 错误提示信息 --> <!-- 错误提示信息 -->
<view v-if="statusloading == 2" style="min-height: 100%;background: #131319 !important;"> <view v-if="statusloading == 2" style="min-height: 100%;background: #131319 !important;">
<view class="start" style="padding-bottom: 100upx; padding-top: 200upx;"> <view class="start" style="padding-bottom: 100upx; padding-top: 200upx;">
...@@ -165,18 +170,18 @@ ...@@ -165,18 +170,18 @@
uni.login({ uni.login({
provider: 'weixin', provider: 'weixin',
success: (res) => { success: (res) => {
console.log(res) //console.log(res)
//appcode: that.$Env.getappcode()
userService.login({ userService.login({
s: 'Init.init', s: 'Init.init',
code: res.code code: res.code
}).then(r => { }).then(r => {
that.getDetail(); that.getDetail();
if (type == 1) { if (type == 1) {
that.$refs['switchGoods'].open(that.machine_id); that.$refs['switchGoods'].open(that.machine_id);
} else { } else {
uni.navigateTo({ 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 => { }).catch(err => {
...@@ -228,7 +233,7 @@ ...@@ -228,7 +233,7 @@
Adlist() { Adlist() {
homeservice.queryList({ homeservice.queryList({
s: 'Ad.list', s: 'Ad.list',
ad_position_key: 'currency_banner', ad_position_key: 'index_top',
machine_id: this.machine_id machine_id: this.machine_id
}).then(result => { }).then(result => {
this.Adlists = result this.Adlists = result
...@@ -241,31 +246,19 @@ ...@@ -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() { onPullDownRefresh() {
this.getDetail() //获取数据 this.getDetail() //获取数据
}, },
// 分享转发
//分享转发
onShareAppMessage(options) { onShareAppMessage(options) {
var that = this; var that = this;
// 设置转发内容 // 设置转发内容
...@@ -281,35 +274,19 @@ ...@@ -281,35 +274,19 @@
}, },
onLoad(options) { onLoad(options) {
// console.log(options) if (options.machine_id) {
//if(options.machine_id){ this.machine_id = options.machine_id;
this.machine_id = this.$Env.getmachineId(); }
this.myheadtext = this.machine_id + "-定制"; this.myheadtext = this.machine_id + "-定制";
this.$base.machine_id = this.machine_id this.$base.machine_id = this.machine_id
this.statusloading = 1; this.statusloading = 1;
//this.getDetail() //获取数据
this.Adlist() // 轮播图 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() {}, onShow() {},
onHide() {} onHide() {}
}; };
</script> </script>
...@@ -325,7 +302,7 @@ ...@@ -325,7 +302,7 @@
height: 100%; height: 100%;
background: #FFFFFF; background: #FFFFFF;
// 错误提示信息 //错误提示信息
.start { .start {
.start_img { .start_img {
width: 260upx; width: 260upx;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<view class="full-width full-height"> <view class="full-width full-height">
<!-- v-if="system_config.golf_diy.value == 0" --> <!-- v-if="system_config.golf_diy.value == 0" -->
<!-- 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; 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;"> width: 100upx; height: 88upx; background: #43cf7c; border-radius: 44upx 0px 0px 44upx;">
<view style="font-size: 24upx; font-weight: 800; color: #FFFFFF;"> <view style="font-size: 24upx; font-weight: 800; color: #FFFFFF;">
...@@ -10,30 +10,23 @@ ...@@ -10,30 +10,23 @@
<view>体验</view> <view>体验</view>
</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="display: flex; justify-content: center;" :style="{height: 'calc(100% - ' + titleHeight +'px)'}">
<view style="margin-top: 231upx;"> <view style="margin-top: 231upx;">
<image src="../../static/icon_diy.png" mode="" style="width: 513upx; height: 251upx;"></image> <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> </view>
<!-- 扫码定制 --> <!-- 扫码定制 -->
<view @click="scanning" style="width: 460upx; position: fixed; bottom: 100upx; margin: auto; <view @click="scanning" style="width: 460upx; position: fixed; bottom: 180upx; margin: auto;
height: 164upx; background: rgba(92, 230, 181, 0.4); left: 0; right: 0; z-index: 99; border-radius: 20upx; height: 164upx; background: #FAD9B1 ; left: 0; right: 0; z-index: 99; border-radius: 20upx;
display: flex; align-items: center;"> display: flex; align-items: center;">
<view style="background: #FFFFFF;width: 120upx; <view style="background: #FFFFFF;width: 120upx;
height: 120upx;border-radius: 50%; margin: 22upx 30upx;text-align: center;"> 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" <image style="height: 61upx; width: 61upx;margin:32upx auto;" src="../../static/icon_saoyisao.png" mode=""></image>
mode=""></image>
</view> </view>
<view style="color: #FFFFFF; font-size: 36upx;">开始扫码定制</view> <view style="color: #333333 ; font-weight: bold;font-size: 33upx;">开始扫码定制</view>
</view> </view>
<!-- 登录弹框 --> <!-- 登录弹框 -->
<Signin ref="Signin"></Signin> <Signin ref="Signin"></Signin>
...@@ -48,7 +41,9 @@ ...@@ -48,7 +41,9 @@
components: { components: {
Signin Signin
}, },
computed: {}, computed: {
},
data() { data() {
return { return {
titleHeight: 0, titleHeight: 0,
...@@ -61,7 +56,7 @@ ...@@ -61,7 +56,7 @@
}; };
}, },
methods: { methods: {
// Uploadpictures(){ // Uploadpictures(){
// var that = this // var that = this
// wx.chooseMessageFile({ // wx.chooseMessageFile({
// count: 1, // count: 1,
...@@ -73,7 +68,6 @@ ...@@ -73,7 +68,6 @@
// res.tempFiles.forEach(item => { // res.tempFiles.forEach(item => {
// tempFilePaths.push(item.path) // tempFilePaths.push(item.path)
// }) // })
// var size = res.tempFiles[0].size; // var size = res.tempFiles[0].size;
// var path = res.tempFiles[0].path; // var path = res.tempFiles[0].path;
// var formatImage = path.split(".")[(path.split(".")).length - 1]; // var formatImage = path.split(".")[(path.split(".")).length - 1];
...@@ -88,7 +82,7 @@ ...@@ -88,7 +82,7 @@
// } // }
// that.uploadDIY(tempFilePaths, 0, 0, 0, tempFilePaths.length); // that.uploadDIY(tempFilePaths, 0, 0, 0, tempFilePaths.length);
// } // }
// }) // })
// }, // },
/* 函数描述:作为上传文件时递归上传的函数体体; /* 函数描述:作为上传文件时递归上传的函数体体;
* 参数描述: * 参数描述:
...@@ -100,10 +94,10 @@ ...@@ -100,10 +94,10 @@
* machine_id=user_id= * machine_id=user_id=
*/ */
// uploadDIY(tempFilePaths, successUp, failUp, i, length) { // uploadDIY(tempFilePaths, successUp, failUp, i, length) {
// let machine_id = this.machine_id || 0 // let machine_id = this.machine_id || 0
// let user_id = userService.getUserInfo().id || 0 // let user_id = userService.getUserInfo().id || 0
// var _this = this // var _this = this
// wx.request({ // wx.request({
// url: this.$Env.getDevBaseURL() + '/api/AliossSign/getSign?machine_id=' + machine_id + '&user_id=' + user_id, // url: this.$Env.getDevBaseURL() + '/api/AliossSign/getSign?machine_id=' + machine_id + '&user_id=' + user_id,
// method: 'GET', // method: 'GET',
// data:'', // data:'',
...@@ -154,7 +148,7 @@ ...@@ -154,7 +148,7 @@
// console.log('预期需要上传的数据总长度', res.totalBytesExpectedToSend) // console.log('预期需要上传的数据总长度', res.totalBytesExpectedToSend)
// }) // })
// } // }
// }) // })
// }, // },
getQueryString(url, name) { getQueryString(url, name) {
var reg = new RegExp('(^|&|/?)' + name + '=([^&|/?]*)(&|/?|$)', 'i') var reg = new RegExp('(^|&|/?)' + name + '=([^&|/?]*)(&|/?|$)', 'i')
...@@ -180,7 +174,8 @@ ...@@ -180,7 +174,8 @@
if (res.scanType == 'QR_CODE') { if (res.scanType == 'QR_CODE') {
if (that.getQueryString(res.result, 'machine_id')) { if (that.getQueryString(res.result, 'machine_id')) {
uni.navigateTo({ 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 { } else {
uni.showToast({ uni.showToast({
...@@ -193,7 +188,8 @@ ...@@ -193,7 +188,8 @@
if (res.path) { if (res.path) {
if (that.getQueryString(res.path, 'machine_id')) { if (that.getQueryString(res.path, 'machine_id')) {
uni.navigateTo({ 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 { } else {
uni.showToast({ uni.showToast({
...@@ -225,6 +221,7 @@ ...@@ -225,6 +221,7 @@
this.touchEndTime = e.timeStamp; this.touchEndTime = e.timeStamp;
}, },
doubleTap(e) { doubleTap(e) {
//console.log("doubleTap=");
// 控制点击事件在350ms内触发,加这层判断是为了防止长按时会触发点击事件 // 控制点击事件在350ms内触发,加这层判断是为了防止长按时会触发点击事件
if (this.touchEndTime - this.touchStartTime < 350) { if (this.touchEndTime - this.touchStartTime < 350) {
// 当前点击的时间 // 当前点击的时间
...@@ -237,18 +234,19 @@ ...@@ -237,18 +234,19 @@
if (!this.$AppContext.checkLogin()) { if (!this.$AppContext.checkLogin()) {
this.tologo('navigateTo') this.tologo('navigateTo')
} else { } else {
//console.log("进来=");
uni.navigateTo({ 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', // url: '../index/index',
// }) //})
} }
} }
} }
}, },
tologo(e) { tologo(e) {
// 先登陆 //先登陆
let that = this; let that = this;
uni.login({ uni.login({
provider: 'weixin', provider: 'weixin',
...@@ -260,7 +258,8 @@ ...@@ -260,7 +258,8 @@
}).then(r => { }).then(r => {
if (e == 'navigateTo') { if (e == 'navigateTo') {
uni.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 => { }).catch(err => {
...@@ -353,7 +352,7 @@ ...@@ -353,7 +352,7 @@
@import "./css/main.css"; @import "./css/main.css";
page { page {
background: #141319 !important; background: #ffffff !important;
width: 100%; width: 100%;
margin: 0; margin: 0;
padding: 0; padding: 0;
...@@ -363,7 +362,7 @@ ...@@ -363,7 +362,7 @@
text-align: center; text-align: center;
font-size: 36upx; font-size: 36upx;
font-weight: 400; font-weight: 400;
color: #FFFFFF; color: #333333;
line-height: 20upx; line-height: 20upx;
} }
</style> </style>
...@@ -10,15 +10,14 @@ ...@@ -10,15 +10,14 @@
</template> </template>
<template slot="content"> <template slot="content">
<view style="width:100%; margin: auto; height:calc(100% - 40upx); overflow: hidden;"> <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)"> v-for="(item, index) in datalist" :key="index" @click="Worksdetail(item)">
<view style="width: 148.5upx; height: 204.6upx;margin: auto; position: relative;"> <view style="width: 139upx; height: 255upx; margin: auto; position: relative;">
<image style="width: 148.5upx; height: 148.5upx; margin: auto;" <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'" :src="(item.image ? item.image:item.url) + '?x-oss-process=image/resize,lfit,w_112'"
mode="aspectFit"></image> 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> </view>
<view class="align-center" <view class="align-center"
...@@ -70,6 +69,8 @@ ...@@ -70,6 +69,8 @@
is_new: null, //最新 is_new: null, //最新
is_hot: null, //热门 is_hot: null, //热门
machine_id: null, //设备id machine_id: null, //设备id
material_category_id: "", //
material_series_id: "",
}, },
Material_categorydatalist: [], //作品、贴图列表 Material_categorydatalist: [], //作品、贴图列表
datalist: [], //作品、贴图列表 datalist: [], //作品、贴图列表
...@@ -80,7 +81,7 @@ ...@@ -80,7 +81,7 @@
/* 控制位置 */ /* 控制位置 */
tip: '', tip: '',
scrollViewTop: 0, //滑动高度 scrollViewTop: 0, //滑动高度
e: 0, // 弹窗类型 e: 0, //弹窗类型
}; };
}, },
mounted() { mounted() {
...@@ -124,13 +125,19 @@ ...@@ -124,13 +125,19 @@
} }
}, },
//刷新中
interrupt(e) { interrupt(e) {
this.tip = '刷新中' this.tip = '刷新中'
//模拟发送请求
setTimeout(e, 500); setTimeout(e, 500);
this.tip = '刷新成功'; this.tip = '刷新成功';
this.queryPage.page = 1 this.queryPage.page = 1
this.getShapeList() //this.getShapeList()
if (this.type == 99) {
this.queryCollectionPage.page = 1;
this.getExcellentMaterial(this.item.queryPage)
} else {
this.getShapeList()
}
}, },
//释放刷新 //释放刷新
...@@ -155,8 +162,10 @@ ...@@ -155,8 +162,10 @@
this.type = 0; this.type = 0;
this.e = item.e; this.e = item.e;
this.scrollViewTop = 0; this.scrollViewTop = 0;
/* let loadData = false; //let loadData = true;
if (this.queryPage.material_category_id != null && this.queryPage.material_category_id != "" ) {
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_category_id == item.queryPage.material_category_id) {
if (this.queryPage.material_series_id != item.queryPage.material_series_id) { if (this.queryPage.material_series_id != item.queryPage.material_series_id) {
loadData = true; loadData = true;
...@@ -164,38 +173,19 @@ ...@@ -164,38 +173,19 @@
} else { } else {
loadData = true; loadData = true;
} }
}else{
if(this.datalist.length <= 0 ){ if (this.datalist == null || this.datalist.length == 0) {
loadData =true; 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") {
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 ==null || this.datalist.length <= 0) {
loadData = true;
}
} }
} else if (item.e == 99) { } else if (item.e == 99) {
if (this.currentId != item.queryPage.currentId || this.currentId == -1) { if (this.currentId != item.queryPage.currentId || this.currentId == -1) {
loadData = true; loadData = true;
} }
if (this.datalist ==null || this.datalist.length <= 0) { if (this.datalist == null || this.datalist.length == 0) {
loadData = true; loadData = true;
} }
} */ }
/*if (this.datalist ==null || this.datalist.length <= 0) {
loadData = true;
} */
this.queryPage = { this.queryPage = {
s: item.queryPage.s, s: item.queryPage.s,
...@@ -230,10 +220,10 @@ ...@@ -230,10 +220,10 @@
this.showState = true; this.showState = true;
} }
} else if (item.e == 99) { //点赞贴图 } else if (item.e == 99) { //点赞贴图
this.type = 99;
if (loadData) { if (loadData) {
this.scrollViewTop = 0; this.scrollViewTop = 0;
this.oldScrollViewTop = 0; this.oldScrollViewTop = 0;
this.type = 99;
this.queryCollectionPage = { this.queryCollectionPage = {
page: 1, page: 1,
limit: 25 limit: 25
...@@ -269,6 +259,46 @@ ...@@ -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) { getExcellentMaterial(e) {
this.datalist = [] this.datalist = []
...@@ -284,7 +314,7 @@ ...@@ -284,7 +314,7 @@
this.showState = true this.showState = true
this.Material_categorydatalist = result.data.data this.Material_categorydatalist = result.data.data
this.datalist = result.data.data; this.datalist = result.data.data;
this.queryPage.page += 1; this.queryCollectionPage.page += 1;
uni.hideLoading(); uni.hideLoading();
this.tip = ''; this.tip = '';
}).catch(err => { }).catch(err => {
......
<template> <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 <view
style=" position: absolute; style="position: absolute; top: 0; width: 100%; height: 100%; background: #999999; z-index: 999; opacity: 0.5; ">
top: calc(50% - 400upx); </view>
height: 800upx;
<view style=" position: absolute;
top: calc(50% - 620upx);
height: 1250upx;
width: 100%; width: 100%;
margin:auto; margin:auto;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
justify-content: center; justify-content: center;
z-index: 999;"> 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" circular='false' previous-margin='80rpx' next-margin='80rpx' :current="currentIndex"
@change="swiperChangeGood"> @change="swiperChangeGood">
<swiper-item class="swiper-item" v-for="(item,index) in goods" :key="index" > <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" <view @click="goodclick(item)" :class="['slide-image', currentIndex === index?'active':'']" mode="aspectFill"
style="justify-content: center; align-items: center; "> 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%);" style="width: 450upx; position: absolute;left: 50%;top:50%;transform: translate(-50%,-50%);"
mode="widthFix"> mode="widthFix">
</image> </image>
...@@ -31,7 +53,7 @@ ...@@ -31,7 +53,7 @@
{{item !=null ? item.name : ''}} {{item !=null ? item.name : ''}}
</view> </view>
</swiper-item> </swiper-item>
</swiper> </swiper> -->
</view> </view>
</view> </view>
...@@ -52,14 +74,14 @@ ...@@ -52,14 +74,14 @@
s: 'Material.list', s: 'Material.list',
}, },
goods: [], //商品列表 goods: [], //商品列表
machine_id:null, //机器码 machine_id: null, //机器码
}; };
}, },
mounted() {}, mounted() {},
methods: { methods: {
//关闭视图 //关闭视图
closeView() { closeView() {
this.isShow = false; this.isShow = false;
}, },
...@@ -73,7 +95,7 @@ ...@@ -73,7 +95,7 @@
goodclick(e) { goodclick(e) {
this.isShow = false; this.isShow = false;
this.goodtext = e.name //选择商品名 this.goodtext = e.name //选择商品名
this.$emit('selectGoodItem',{ this.$emit('selectGoodItem', {
id: e.id, id: e.id,
}) })
}, },
...@@ -81,7 +103,7 @@ ...@@ -81,7 +103,7 @@
//打开页面 //打开页面
open(machineId) { open(machineId) {
this.machine_id = machineId; this.machine_id = machineId;
this.getGooods(); this.getGooods();
}, },
//获取商品列表 //获取商品列表
...@@ -89,9 +111,19 @@ ...@@ -89,9 +111,19 @@
let that = this; let that = this;
homeservice.queryList({ homeservice.queryList({
s: 'Product.getCommonGoods', //新接口 s: 'Product.getCommonGoods', //新接口
machine_id: this.machine_id, //机器码
}).then(result => { }).then(result => {
this.goods = result; this.goods = result;
this.isShow = true; if (this.goods == null || this.goods == "") {
this.isShow = false;
uni.showToast({
title: "设备号不存在,或者没配置商品",
icon: 'none'
});
} else {
this.isShow = true;
}
}).catch(err => { }).catch(err => {
this.isShow = false; this.isShow = false;
uni.showToast({ uni.showToast({
...@@ -111,7 +143,7 @@ ...@@ -111,7 +143,7 @@
getGooods(); getGooods();
}, },
} }
</script> </script>
......
...@@ -15,8 +15,7 @@ ...@@ -15,8 +15,7 @@
<text style="font-size: 36upx; color: #FFFFFF;">字体</text> <text style="font-size: 36upx; color: #FFFFFF;">字体</text>
</view> </view>
</view> </view>
</view> </view>
<view style="width: 100%; background: #292933;"> <view style="width: 100%; background: #292933;">
...@@ -25,7 +24,7 @@ ...@@ -25,7 +24,7 @@
height: 98upx;"> height: 98upx;">
<view style="width: 601upx; height: 57upx; background: rgb(255,255,255,0.1); margin: 21upx 41upx 21upx 21upx; border-radius: 10upx;"> <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" <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;" /> placeholder="请输入文字内容..." style="font-size: 34upx; font-weight: 400; height: 57upx; line-height: 57upx; padding: 0upx 0 0upx 20upx; color: #FFFFFF;" />
</view> </view>
<view style="width: 1px; height: 28upx; background: #FFFFFF;"></view> <view style="width: 1px; height: 28upx; background: #FFFFFF;"></view>
...@@ -67,7 +66,6 @@ ...@@ -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'" <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> mode="aspectFill"></image>
</view> --> </view> -->
<!-- 颜色 开始--> <!-- 颜色 开始-->
<!-- <scroll-view style="box-sizing: border-box; white-space: nowrap; margin: 10upx 0; " scroll-x scroll-with-animation > <!-- <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)"> <view style="text-align: center; display: inline-block; padding-left: 20upx;" v-for="(item,index) in colorList" :key="index" @click.stop="workcolor(item.color)">
...@@ -78,7 +76,7 @@ ...@@ -78,7 +76,7 @@
</view> </view>
<view v-else style="width: 68upx; height: 68upx; border-radius: 50%;" :style="{background:item.color}"></view> <view v-else style="width: 68upx; height: 68upx; border-radius: 50%;" :style="{background:item.color}"></view>
</view> </view>
</scroll-view> --> </scroll-view> -->
<!-- 颜色 结束--> <!-- 颜色 结束-->
<!-- 颜色 开始--> <!-- 颜色 开始-->
<scroll-view style="box-sizing: border-box; white-space: nowrap; <scroll-view style="box-sizing: border-box; white-space: nowrap;
......
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
margin: auto; z-index:2;" :src="designer.works_image + '?x-oss-process=image/resize,lfit,w_300'"mode="aspectFit"></image> margin: auto; z-index:2;" :src="designer.works_image + '?x-oss-process=image/resize,lfit,w_300'"mode="aspectFit"></image>
</view> </view>
<view style="width: calc(100% - 360upx);"> <view style="width: calc(100% - 330upx);">
<view style="width: 90%;font-size: 28upx;"> <view style="width: 90%;font-size: 28upx;">
<text style="font-size: 36upx;">{{designer.id || ''}}</text> <text style="font-size: 36upx;">{{designer.id || ''}}</text>
</view> </view>
...@@ -61,18 +61,18 @@ ...@@ -61,18 +61,18 @@
<view v-if="sighstate"> <view v-if="sighstate">
<!-- background:rgba(0,0,0,0.6); --> <!-- background:rgba(0,0,0,0.6); -->
<view <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> @click.stop="sighstate = false"></view>
<view style="position: fixed; z-index: 1000; top: 52%; left: 50%; right: 0; margin: auto; transform: translate(-50%, -50%); <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;"> display: flex; align-items: center; justify-content: center;">
<view style="position: absolute; <view style="position: absolute;
top: 0; right: 0;" @click="sighstate = false"> top: 0; right: 0;" @click="sighstate = false">
<image src="../../static/icon_guanbi.png" mode="" <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>
<view v-if=" designer.goods_name == '背包' " style="width: 558upx;"> <!-- <view v-if=" designer.goods_name == '背包' " style="width: 558upx;">
<view style="display: flex; align-items: center; justify-content: center; <view style="display: flex; align-items: center; justify-content: center;
width: 100%; height: 360upx; "> width: 100%; height: 360upx; ">
<image :src="designer.works_image + '?x-oss-process=image/resize,lfit,w_80'"mode="aspectFit" style="width:80upx; margin-left: 100upx;"></image> <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 @@ ...@@ -80,12 +80,12 @@
</view> </view>
<view style="text-align: center; font-size: 36upx; margin-top: 58upx;">作品排队中</view> <view style="text-align: center; font-size: 36upx; margin-top: 58upx;">作品排队中</view>
<view style="text-align: center; font-size: 36upx;">如需要打印可与客服确认</view> <view style="text-align: center; font-size: 36upx;">如需要打印可与客服确认</view>
</view> </view> -->
<!-- goods_name=马卡龙 --> <!-- 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; <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: 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 style="width: calc(100% / 4); height: 100%;" v-for="item in 4" :key="a">
<view v-for="item in 3" :key="b" <view v-for="item in 3" :key="b"
...@@ -106,28 +106,44 @@ ...@@ -106,28 +106,44 @@
</view> </view>
<view style="text-align: center; font-size: 36upx; margin-top: 58upx;">作品排队中</view> <view style="text-align: center; font-size: 36upx; margin-top: 58upx;">作品排队中</view>
<view style="text-align: center; font-size: 36upx;">如需要打印可与客服确认</view> <view style="text-align: center; font-size: 36upx;">如需要打印可与客服确认</view>
<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>
<view v-if=" designer.goods_name == '单肩袋' " style="width: 558upx;"> <!--<view v-if=" designer.goods_name == '单肩袋' " style="width: 558upx;">
<view style="display: flex; align-items: center; justify-content: center; <view style="display: flex; align-items: center; justify-content: center;
width: 100%; height: 360upx; "> width: 100%; height: 360upx; ">
<image :src="designer.works_image + '?x-oss-process=image/resize,lfit,w_140'"mode="aspectFit" style="width:140upx; margin-left: 100upx;"></image> <image :src="designer.works_image + '?x-oss-process=image/resize,lfit,w_140'"mode="aspectFit" style="width:140upx; margin-left: 100upx;"></image>
<image :src="designer.back_image + '?x-oss-process=image/resize,lfit,w_290'"mode="aspectFit" style=" width: 300upx;margin-left: -220upx;"></image>
</view> </view>
<view style="text-align: center; font-size: 36upx; margin-top: 58upx;">作品排队中</view> <view style="text-align: center; font-size: 36upx; margin-top: 58upx;">作品排队中</view>
<view style="text-align: center; font-size: 36upx;">如需要打印可与客服确认</view> <view style="text-align: center; font-size: 36upx;">如需要打印可与客服确认</view>
</view> </view> -->
<view <view v-if=" designer.goods_name != '马卡龙' "
v-if=" designer.goods_name != '背包' && designer.goods_name != '马卡龙' && designer.goods_name != '单肩袋' "
style="width: 558upx;"> style="width: 558upx;">
<view style="display: flex; align-items: center; justify-content: center; <view style="display: flex; align-items: center; justify-content: center;
width: 100%; height: 360upx; "> width: 100%; height: 360upx; ">
<image :src="designer.works_image + '?x-oss-process=image/resize,lfit,w_100'" mode="aspectFit" style="width:100upx; margin-left: 100upx;"></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> <!-- <image :src="designer.back_image + '?x-oss-process=image/resize,lfit,w_290'" mode="aspectFit" style=" width: 300upx;margin-left: -200upx;"></image> -->
</view> </view>
<view style="text-align: center; font-size: 36upx; margin-top: 58upx;">作品排队中</view> <view style="text-align: center; font-size: 36upx; margin-top: 58upx;">作品排队中</view>
<view style="text-align: center; font-size: 36upx;">如需要打印可与客服确认</view> <view style="text-align: center; font-size: 36upx;">如需要打印可与客服确认</view>
<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>
</view> </view>
...@@ -173,6 +189,32 @@ ...@@ -173,6 +189,32 @@
}; };
}, },
methods: { 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) { self_help_payment(designer) {
if (designer.user_id != this.userId) { if (designer.user_id != this.userId) {
return; return;
...@@ -181,7 +223,7 @@ ...@@ -181,7 +223,7 @@
machine_id: this.queryPage.machine_id, machine_id: this.queryPage.machine_id,
s: 'machine.newDetail', s: 'machine.newDetail',
}).then(res => { }).then(res => {
if (designer.status.value == 1) { /* if (designer.status.value == 1) {
if (designer.goods_name == "马卡龙") { if (designer.goods_name == "马卡龙") {
this.clearIntervalTime() this.clearIntervalTime()
uni.navigateTo({ uni.navigateTo({
...@@ -195,12 +237,11 @@ ...@@ -195,12 +237,11 @@
'&type= 2' + '&machine_id=' + this.queryPage.machine_id '&type= 2' + '&machine_id=' + this.queryPage.machine_id
}) })
} }
} else { } else { */
if (this.sighstate == true) return; if (this.sighstate == true) return;
this.designer = designer this.designer = designer
this.sighstate = true this.sighstate = true
/* } */
}
}).catch(err => { }).catch(err => {
uni.showToast({ uni.showToast({
title: '设备休息中', title: '设备休息中',
...@@ -242,12 +283,12 @@ ...@@ -242,12 +283,12 @@
item.lineup = obj < 10 ? "0" + obj : obj item.lineup = obj < 10 ? "0" + obj : obj
}) })
this.LoupanList = result this.LoupanList = result
// 分页对象处理 //分页对象处理
this.queryPage.total = result.total; this.queryPage.total = result.total;
this.queryPage.per_page = result.per_page; this.queryPage.per_page = result.per_page;
// 停止当前页面下拉刷新 //停止当前页面下拉刷新
if (this.dataLoadState.pullDownRefresh) uni.stopPullDownRefresh(); if (this.dataLoadState.pullDownRefresh) uni.stopPullDownRefresh();
// 数据加载状态处理 false //数据加载状态处理 false
this.dataLoadState.pullDownRefresh = false; this.dataLoadState.pullDownRefresh = false;
this.dataLoadState.reachBottom = false; this.dataLoadState.reachBottom = false;
...@@ -343,8 +384,8 @@ ...@@ -343,8 +384,8 @@
url: '../index/machineDetail?machine_id=' + this.queryPage.machine_id url: '../index/machineDetail?machine_id=' + this.queryPage.machine_id
}) })
} }
} }
}; };
</script> </script>
......
<template> <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 <audio src="https://img.colorpark.cn/wechat/ring2.m4a" :action="ringaction" controls loop
style="opacity: 0; position: absolute;"></audio> style="opacity: 0; position: absolute;"></audio>
...@@ -16,7 +25,7 @@ ...@@ -16,7 +25,7 @@
https://img.colorpark.cn/wechat/track/fukuanquGolf.png https://img.colorpark.cn/wechat/track/fukuanquGolf.png
https://img.colorpark.cn/wechat/track/paiduiquGolf.png https://img.colorpark.cn/wechat/track/paiduiquGolf.png
https://img.colorpark.cn/wechat/track/shejiquGolf.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:订单完成) "--> <!-- 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) && type != 1 && LoadState"> v-if="(orderOrderStatusData.status == 0 || orderOrderStatusData.status == 1 || orderOrderStatusData.status == 10 || orderOrderStatusData.status == 2) && type != 1 && LoadState">
...@@ -415,8 +424,11 @@ ...@@ -415,8 +424,11 @@
<script> <script>
import homeservice from '@/service/homeservice.js' import homeservice from '@/service/homeservice.js'
import myhead from '../index/head/head.vue'; // 页眉
export default { export default {
components: {}, components: {myhead},
computed: {}, computed: {},
data() { data() {
return { return {
......
<template> <template>
<view class="full-width full-height" :style="{overflow: isReady ? 'hidden' : 'scroll' }"> <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/stitch.m4a -->
<!-- https://img.colorpark.cn/wechat/ring.m4a --> <!-- https://img.colorpark.cn/wechat/ring.m4a -->
<!-- https://img.colorpark.cn/wechat/ring2.m4a --> <!-- https://img.colorpark.cn/wechat/ring2.m4a -->
<audio src="https://img.colorpark.cn/wechat/ring2.m4a" <audio src="https://img.colorpark.cn/wechat/ring2.m4a" :action="ringaction" controls loop
:action="ringaction" controls loop style="opacity: 0; position: absolute;"></audio> style="opacity: 0; position: absolute;"></audio>
<!-- 继续定制 --> <!-- 继续定制 -->
<view @click="tomall" style="position: fixed; right: 0; bottom: 100upx; display: flex; <view @click="tomall" style="position: fixed; right: 0; bottom: 100upx; display: flex;
align-items: center;justify-content: center; width: 100upx; height: 88upx; align-items: center;justify-content: center; width: 100upx; height: 88upx;
background: #43cf7c; border-radius: 44upx 0px 0px 44upx; z-index: 999;"> background: #43cf7c; border-radius: 44upx 0px 0px 44upx; z-index: 999;">
<view style="font-size: 24upx; font-weight: 800; color: #FFFFFF;"> <view style="font-size: 24upx; font-weight: 800; color: #FFFFFF;">
<view>继续</view><view>定制</view> <view>继续</view>
<view>定制</view>
</view> </view>
</view> </view>
<view style="height:100%;width: 100%; overflow: hidden;"> <view style="height:100%;width: 100%; overflow: hidden;">
<!-- goods.status.value 订单状态(0:等待生产,1:生产中,2: 生产完成,3:取消生产,4:出料中(弃用),5: 等待取料(弃用), 6:待入货(弃用),7:取货完成,8:已发货,9:订单完成) "--> <!-- goods.status.value 订单状态(0:等待生产,1:生产中,2: 生产完成,3:取消生产,4:出料中(弃用),5: 等待取料(弃用), 6:待入货(弃用),7:取货完成,8:已发货,9:订单完成) "-->
<view :animation="BoxTwoAnimation" <view :animation="BoxTwoAnimation" style="width: 100%; height: 100%;"
style="width: 100%; height: 100%;"
v-if="(orderOrderStatusData.status == 0 || orderOrderStatusData.status == 1 || orderOrderStatusData.status == 10 || orderOrderStatusData.status == 2) < 2 && type != 1 && LoadState"> 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;"> <view v-if="orderOrderStatusData.status == 0"
<image src="https://img.colorpark.cn/wechat/track/fukuanqu_2.png" mode="widthFix" style="width: 100%;"></image> style="position: absolute; top: 0; right: 200%; width: 100%; height: 100%;overflow: hidden;">
</view> <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; width: 100%; height: 100%; overflow: hidden; right: 100%;"> </view>
<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> <view v-if="orderOrderStatusData.status == 0"
</view> style="position: absolute; width: 100%; height: 100%; overflow: hidden; right: 100%;">
<view style="position: relative; width: 100%; height: 100%;overflow: hidden;"> <view style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;overflow: hidden;">
<view class='crate-wrapper'> <image src="https://img.colorpark.cn/wechat/track/paiduiqu_2.png" mode="widthFix"
<view style="display: flex;position: relative;"> style="width: 100%;"></image>
<view style="position: relative;transition: all 3s; z-index: 2;" </view>
:style="{width: data.editorWidth +'px',height: data.editorHeight +'px', <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',
transform: 'translateX(' + data.activebrushX + 'px)'}"> transform: 'translateX(' + data.activebrushX + 'px)'}">
<image :src="goods.goods.surface_pic + '?x-oss-process=image/resize,lfit,w_1000'" mode="" <image :src="goods.goods.surface_pic + '?x-oss-process=image/resize,lfit,w_1000'"
style="position: absolute; width: 98%; height: 98%; left: 0; top: 0; right: 0; margin: auto; bottom: 0; z-index: 1;"></image> mode=""
<!-- <view style="position: absolute; width: 98%; height: 98%; left: 0; top: 0; right: 0; margin: auto; bottom: 0; background: #fff; z-index: 1;"></view> --> style="position: absolute; width: 98%; height: 98%; left: 0; top: 0; right: 0; margin: auto; bottom: 0; z-index: 1;">
<image :src="goods.works_image" mode="" </image>
style="position: absolute; width: 100%; height: 100%; left: 0; top: 0; right: 0; margin: auto; bottom: 0; z-index: 2;"></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.goods.front_image" mode="" <image :src="goods.works_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; bottom: 0; z-index: 2;">
</view> </image>
<image v-for="(item,index) in rankinglist" :key="index" v-if="index < 3" <image :src="goods.goods.front_image" mode=""
style="transition: all 1s;" style="position: absolute; width: 100%; height: 100%; left: 0; top: 0; right: 0; margin: auto;z-index: 3; overflow: hidden;">
:style="{height: data.editorHeight +'px',width:item.w +'px', </image>
transform: 'translateX(' + item.x + 'px)'}" </view>
src="../../static/img/d.png" mode=""></image> <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',
<!-- <view :style="{width: data.render_cove_width +'px',height: data.render_cove_height +'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;"> 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'}" <view :style="{width: leftx +'px',height: data.render_cove_height +'px'}"
style="position: absolute; left: 0; top: 0;background: #fff;"> style="position: absolute; left: 0; top: 0;background: #fff;">
</view> </view>
</view> --> </view> -->
</view>
</view> </view>
</view> </view>
</view> </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"
</view> style="position: absolute; top: 0; right: 100%; width: 100%; height: 100%;overflow: hidden;">
<!-- 生产中打印 1--> <image src="https://img.colorpark.cn/wechat/track/fukuanqu_2.png" mode="widthFix"
<view style="width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; overflow: hidden;"> style="width: 100%;"></image>
<!-- 背景图 --> </view>
<view style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;overflow: hidden;"> <!-- 生产中打印 1-->
<view style="position: relative; width: 100%;"> <view
<image src="https://img.colorpark.cn/wechat/track/dayinqu_2.png" mode="widthFix" style="width: 100%;"></image> style="width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; overflow: hidden;">
</view> <!-- 背景图 -->
<view style="position: relative; width: 100%; margin-top: -13px;"> <view style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;overflow: hidden;">
<image src="https://img.colorpark.cn/wechat/track/shuxiang_2.png" mode="widthFix" style="width: 100%;"></image> <view style="position: relative; width: 100%;">
</view> <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>
</view> </view>
<view style="position: relative;width: 100%; height: 100%;overflow: hidden;" :animation="printingEnd"> </view>
<view class='crate-wrapper'> <view style="position: relative;width: 100%; height: 100%;overflow: hidden;"
<view class="brush" :animation="printingEnd">
:style="{width: data.editorWidth +'px',height: data.editorHeight +'px', <view class='crate-wrapper'>
transform: 'translateX(' + data.printingStartX + 'px)'}"> <view class="brush" :style="{width: data.editorWidth +'px',height: data.editorHeight +'px',
<view :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;"> 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 v-if="initstate" :src="goods.works_image +'?x-oss-process=image/resize,lfit,w_300' "
<image :src="goods.goods.surface_pic + '?x-oss-process=image/resize,lfit,w_1000'" mode="" :style="{'z-index': data.render_cove_width ? 2:0, width: data.render_cove_width +'px'} "
style="position: absolute; width: 98%; height: 98%; left: 0; top: 0; right: 0; margin: auto; bottom: 0; z-index: 1;"></image> style="position: absolute;
<!-- 作品图 --> left: 50%; top: 50%;
<image v-if="initstate" :src="goods.works_image" mode="" transform:translate(-50%,-50%);" mode="widthFix"
: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>
<!-- 刷子 --> <!-- 刷子 -->
<view :style="{width: data.render_cove_width +'px',height: data.render_cove_height +'px'}" <view
style="position: absolute; left: 0; top: 0; right: 0; margin: auto; bottom: 0;z-index: 3;"> :style="{width: data.render_cove_width +'px',height: data.render_cove_height +'px'}"
<view :style="{width: leftx +'px',height: data.render_cove_height +'px',background: goods.goods.design_color}" 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}"
style="position: absolute; left: 0; top: 0;"> style="position: absolute; left: 0; top: 0;">
</view>
</view> </view>
<!-- 手机壳 -->
<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>
</view> </view>
<!-- 刷子范围 --> <!-- left: 50%; top: 50%;
<view :style="{width: data.render_cove_width +'px',height: data.render_cove_height +'px'}" transform:translate(-50%,-50%); -->
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}" <image :src="goods.goods.front_image" style="position: absolute; width: 99%;
:style="{left: leftx +'px',opacity: printer ? 1 : 0}" 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'}"
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;"> 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=""
</view> style="width:40px; height:100px;"></image>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<!-- 取货状态 10,2--> </view>
<view style="position: relative; width: 100%; height: 100%; overflow: hidden;"> <!-- 取货状态 10,2-->
<!-- 底图 --> <view style="position: relative; width: 100%; height: 100%; overflow: hidden;">
<view style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;overflow: hidden;"> <!-- 底图 -->
<view style="position: relative; width: 100%;"> <view style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;overflow: hidden;">
<image src="https://img.colorpark.cn/wechat/track/shuxiang_2.png" mode="widthFix" style="width: 100%;"></image> <view style="position: relative; width: 100%;">
</view> <image src="https://img.colorpark.cn/wechat/track/shuxiang_2.png" mode="widthFix"
<view style="position: relative; width: 100%; margin-top: -13px;"> style="width: 100%;"></image>
<image src="https://img.colorpark.cn/wechat/track/shuxiang_2.png" mode="widthFix" style="width: 100%;"></image>
</view>
</view> </view>
<view class='crate-wrapper'> <view style="position: relative; width: 100%; margin-top: -13px;">
<view class="twobrush" :animation="PickUpStart" <image src="https://img.colorpark.cn/wechat/track/shuxiang_2.png" mode="widthFix"
:style="{width: data.editorWidth +'px',height: data.editorHeight +'px', style="width: 100%;"></image>
</view>
</view>
<view class='crate-wrapper'>
<view class="twobrush" :animation="PickUpStart" :style="{width: data.editorWidth +'px',height: data.editorHeight +'px',
transform: 'translateY(' + -(data.editorHeight + (data.windowHeight - data.editorHeight)/2) + 'px)'}"> transform: 'translateY(' + -(data.editorHeight + (data.windowHeight - data.editorHeight)/2) + 'px)'}">
<!-- 底图 --> <view :style="{width: data.editorWidth +'px',height: data.editorHeight +'px'}"
<image :src="goods.goods.surface_pic + '?x-oss-process=image/resize,lfit,w_1000'" mode="" style="position: relative;overflow: hidden; background: #FFFFFF;">
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="" <image v-if="initstate" :src="goods.works_image +'?x-oss-process=image/resize,lfit,w_300' "
style="position: absolute; width: 100%; :style="{'z-index': data.render_cove_width ? 2:0, width: data.render_cove_width +'px'} "
height: 100%; left: 0; top: 0; right: 0; margin: auto; bottom: 0; z-index: 2;"></image> style="position: absolute;
<image :src="goods.goods.front_image" mode="" left: 50%; top: 50%;
style="position: absolute; width: 100%; height: 100%; left: 0; top: 0; transform:translate(-50%,-50%);" mode="widthFix">
right: 0; margin: auto;z-index: 4; overflow: hidden;"></image> </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> </view>
<!-- 底图 -->
<!-- <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%; 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> </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"> v-if="(orderOrderStatusData.status == 3 || orderOrderStatusData.status == -3) && type != 1">
<view style="padding-bottom: 32px"> <view style="padding-bottom: 32px">
<view style="width: 220upx; margin:90upx auto 40upx;"> <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%;"
</view> src="../../static/icon_close.png" mode="aspectFill"></image>
<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;"
: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>
</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>
</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>
</view>
<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>
<view style="font-size: 24upx; font-weight: 400; color: #FFFFFF;margin-top: 15upx;">
<text> 下单时间: </text>
<text style="color: #888888;"> {{goods.create_time}} </text>
</view>
</view>
</view>
</view> </view>
</view> <view style="font-size: 36upx; font-weight: 400; color: #FFFFFF; text-align: center;">
<!-- 设备故障状态 --> 暂时缺货、订单已取消
<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>
<view class="start_text">{{msg || ''}}</view>
<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>
{{phone || '18938664545'}}
</view>
</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> <view style="margin-top: 378upx; display: flex;align-items: center; justify-content: center;">
</view> <view style="width: 187upx; position: relative; border-radius: 10upx;"
<!-- 取货完成状态 --> @click="previewImg(goods,0)">
<view v-if="orderOrderStatusData.status == 7 && type != 1"> <view
<view style="padding-bottom: 32px"> style="width: 128upx; height: 236upx;margin:auto; display: block; position: relative; overflow: hidden;">
<view style="width: 220upx; margin:90upx auto 40upx;"> <view
<image style="width: 220upx; height: 220upx; border-radius: 50%;" src="../../static/mine/Pick-up.png" mode="aspectFill"></image> style="width: 95%; height: 95%; background: #FFFFFF; position: absolute; top: 0; left: 0; right: 0; bottom: 0; margin: auto; z-index: 0;">
</view>
<view style="font-size: 36upx; font-weight: 400; color: #FFFFFF; text-align: center;">
打印完成
</view>
<view style="height: 378upx; text-align: center;">
<text v-if="type == 2" style="font-size: 36upx; line-height: 378upx;font-weight: bold;">
{{goods.order_queue.id || ''}}
</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;"
: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>
</view> </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>
</view> </view>
<view style="margin-left: 19upx; margin-top: 5upx; "> </view>
<view style="font-size: 24upx; font-weight: 400; color: #FFFFFF;"> <view style="margin-left: 19upx; margin-top: 5upx; ">
<text> 订单编号: </text> <view style="font-size: 24upx; font-weight: 400; color: #FFFFFF;">
<text style="color: #888888;"> {{goods.id}} </text> <text> 订单编号: </text>
<text @click="tosetClipboardData(goods.id)" style="margin-left: 5upx;font-size: 22upx;">复制</text> <text style="color: #888888;"> {{goods.id}} </text>
</view> <text @click="tosetClipboardData(goods.id)"
<view style="font-size: 24upx; font-weight: 400; color: #FFFFFF; margin-top: 15upx;"> style="margin-left: 5upx;font-size: 22upx;">复制</text>
<text> 产品尺寸: </text> </view>
<text style="color: #888888;" v-if="type == 2"> {{goods.goods.name || ''}} </text> <view style="font-size: 24upx; font-weight: 400; color: #FFFFFF; margin-top: 15upx;">
<text style="color: #888888;"v-if="type != 2"> <text> 产品尺寸: </text>
{{goods.order_goods.goods_name || ''}} <text style="color: #888888;" v-if="type == 2"> {{goods.goods.name || ''}} </text>
<text v-if="goods.used_applets != '4'">{{goods.order_goods.goods_specs || ''}} </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>
</view> </text>
<view v-if="type != 2" style="font-size: 24upx; font-weight: 400; color: #FFFFFF;margin-top: 15upx;"> </view>
<text> 支付金额: </text> <view v-if="type != 2"
<text style="color: #888888;">{{goods.real_amount}} </text> style="font-size: 24upx; font-weight: 400; color: #FFFFFF;margin-top: 15upx;">
</view> <text> 支付金额: </text>
<view style="font-size: 24upx; font-weight: 400; color: #FFFFFF;margin-top: 15upx;"> <text style="color: #888888;">{{goods.real_amount}} </text>
<text> 下单时间: </text> </view>
<text style="color: #888888;"> {{goods.create_time}} </text> <view style="font-size: 24upx; font-weight: 400; color: #FFFFFF;margin-top: 15upx;">
</view> <text> 下单时间: </text>
<text style="color: #888888;"> {{goods.create_time}} </text>
</view> </view>
</view> </view>
</view> </view>
</view> </view>
<!-- -----------快递发货----------- --> </view>
<!-- 生产中 --> <!-- 设备故障状态 -->
<view style="position: relative;" v-if="goods.status.value <= 8 && type == 1"> <view
<view style="width: 300upx; min-height: 300upx; margin:90upx auto 66upx; position: relative; style="width: 100%; height: 100%; position: absolute; top: 0; z-index: 2;background: #131319 !important;"
border-radius: 10upx;" :style="{background: goods.goods.design_color }" @click="previewImg(goods,0)"> v-if="orderOrderStatusData.status == -2 && type != 1">
<!-- 手机壳 --> <view class="start" style="padding-bottom: 100upx; padding-top: 200upx;">
<view style="width: 206upx; height: 224upx;padding: 38upx 0; margin:auto; display: block; position: relative; overflow: hidden;"> <image src="../../static/icon_guaqi.png" mode="aspectFill" class="start_img"></image>
<image style="width: 206upx; height: 224upx; margin:auto; display: block;position: relative; z-index: 10;" <view class="start_text">{{msg || ''}}</view>
:src="goods.goods.front_image" mode="aspectFit"></image> <view>
<image style="width: 206upx; height: 224upx; position: absolute; top: 0; left: 0; right: 0; bottom: 0; margin: auto; z-index:8;" <view class="start_text">联系客服</view>
:src="goods.works_image + '?x-oss-process=image/resize,lfit,w_300'" mode="widthFix"></image> <view class="start_text" style="display: flex; justify-content: center; align-items: center;">
</view> <image src="../../static/phone.png" mode=""
</view> style="width: 32upx; height: 32upx; margin-right: 5upx;"></image>
<view style="font-size: 36upx; font-weight: 400; color: #FFFFFF; text-align: center;"> {{phone || '18938664545'}}
<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> -->
<text v-if="goods.status.value < 8 && goods.status.value >= 0">生产中</text>
<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;">
<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> -->
<text v-if="goods.status.value < 8 && goods.status.value >= 0">色彩正在加急冲印,请留意最新的状态通知</text>
</text>
<text v-if="goods.status.value == 8">色彩正在配送路上,请留意最新的配送状态</text>
<view v-if="goods.status.value == 8">{{goods.order_express.express_name || ''}}</view>
<view v-if="goods.status.value == 8">快递单号: {{goods.order_express.express_no || ''}}</view>
</view>
<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>
</view>
<view style="font-size: 24upx; font-weight: 400; color: #FFFFFF; margin-top: 10upx;">
<text > 产品尺寸: </text>
<text style="color: #888888;">
{{goods.order_goods.goods_name || ''}}
<text v-if="goods.used_applets != '4'">{{goods.order_goods.goods_specs || ''}} </text>
</text>
</view>
<view style="font-size: 24upx; font-weight: 400; color: #FFFFFF;margin-top: 10upx;">
<text> 支付金额: </text> <text style="color: #888888;">{{goods.real_amount || ''}} </text>
</view>
<view style="font-size: 24upx; font-weight: 400; color: #FFFFFF;margin-top: 10upx;">
<text> 下单时间: </text> <text style="color: #888888;"> {{goods.create_time || ''}} </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>
</view> </view>
</view> </view>
</view> </view>
<!-- 收货成功 --> <image src="../../static/logo.jpg" mode="aspectFill"
<view v-if="goods.status.value == 9 && type == 1"> 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;"> <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>
<view style="font-size: 36upx; font-weight: 400; color: #FFFFFF; text-align: center;"> <view style="font-size: 36upx; font-weight: 400; color: #FFFFFF; text-align: center;">
收货成功 打印完成
</view> </view>
<view style="margin-top: 104upx; margin-left: 25%; width: 50%;"> <view style="height: 378upx; text-align: center;">
<view style="font-size: 24upx; font-weight: 400; color: #FFFFFF;margin-top: 10upx;"> <text v-if="type == 2" style="font-size: 36upx; line-height: 378upx;font-weight: bold;">
<text> 快递公司: </text> <text style="color: #888888;"> {{goods.order_express.express_name || ''}} </text> {{goods.order_queue.id || ''}}
</view> </text>
<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>
</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>
</view>
</view> </view>
<view style="margin-top: 104upx; display: flex; align-items: center; justify-content: center;"> <view style="display: flex;align-items: center; justify-content: center;">
<view style="width: 187upx; position: relative; border-radius: 10upx;" <view style="width: 187upx; position: relative; border-radius: 10upx;"
:style="{background: goods.goods.design_color }" @click="previewImg(goods,0)"> @click="previewImg(goods,0)">
<!-- 手机壳 --> <view
<view style="width: 128upx; height: 141upx;padding: 38upx 0; margin:auto; display: block; position: relative; overflow: hidden;"> style="width: 128upx; height: 236upx;margin:auto; display: block; position: relative; overflow: hidden;">
<image style="width: 128upx; height: 141upx; margin:auto; display: block;position: relative; z-index: 10;" <view
:src="goods.goods.front_image" mode="aspectFit"></image> style="width: 95%; height: 95%; background: #FFFFFF; position: absolute; top: 0; left: 0; right: 0; bottom: 0; margin: auto; z-index: 0;">
<image style="width: 128upx; height: 141upx; position: absolute; top: 0; left: 0; right: 0; bottom: 0; margin: auto; z-index:8;" </view>
:src="goods.works_image + '?x-oss-process=image/resize,lfit,w_300'" mode="widthFix"></image> <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>
</view> </view>
</view> </view>
<view style="margin-left: 19upx; margin-top: 5upx;"> <view style="margin-left: 19upx; margin-top: 5upx; ">
<view style="font-size: 24upx; font-weight: 400; color: #FFFFFF;"> <view style="font-size: 24upx; font-weight: 400; color: #FFFFFF;">
<text> 订单编号: </text> <text> 订单编号: </text>
<text style="color: #888888;"> {{goods.id || ''}} </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>
<view style="font-size: 24upx; font-weight: 400; color: #FFFFFF; margin-top: 15upx;"> <view style="font-size: 24upx; font-weight: 400; color: #FFFFFF; margin-top: 15upx;">
<text> 产品尺寸: </text> <text> 产品尺寸: </text>
<text style="color: #888888;"> <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 || ''}} {{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> </text>
</view> </view>
<view 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> 支付金额: </text>
<text style="color: #888888;">{{goods.real_amount || ''}} </text> <text style="color: #888888;">{{goods.real_amount}} </text>
</view> </view>
<view style="font-size: 24upx; font-weight: 400; color: #FFFFFF;margin-top: 15upx;"> <view style="font-size: 24upx; font-weight: 400; color: #FFFFFF;margin-top: 15upx;">
<text> 下单时间: </text> <text> 下单时间: </text>
<text style="color: #888888;"> {{goods.create_time || ''}} </text> <text style="color: #888888;"> {{goods.create_time}} </text>
</view> </view>
</view> </view>
</view> </view>
</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;"
: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;"
:src="goods.works_image + '?x-oss-process=image/resize,lfit,w_300'" mode="widthFix"></image>
</view>
</view>
<view style="font-size: 36upx; font-weight: 400; color: #FFFFFF; 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> -->
<text v-if="goods.status.value < 8 && goods.status.value >= 0">生产中</text>
<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;">
<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> -->
<text v-if="goods.status.value < 8 && goods.status.value >= 0">色彩正在加急冲印,请留意最新的状态通知</text>
</text>
<text v-if="goods.status.value == 8">色彩正在配送路上,请留意最新的配送状态</text>
<view v-if="goods.status.value == 8">{{goods.order_express.express_name || ''}}</view>
<view v-if="goods.status.value == 8">快递单号: {{goods.order_express.express_no || ''}}</view>
</view>
<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>
</view>
<view style="font-size: 24upx; font-weight: 400; color: #FFFFFF; margin-top: 10upx;">
<text> 产品尺寸: </text>
<text style="color: #888888;">
{{goods.order_goods.goods_name || ''}}
<text v-if="goods.used_applets != '4'">{{goods.order_goods.goods_specs || ''}} </text>
</text>
</view>
<view style="font-size: 24upx; font-weight: 400; color: #FFFFFF;margin-top: 10upx;">
<text> 支付金额: </text> <text style="color: #888888;">{{goods.real_amount || ''}} </text>
</view>
<view style="font-size: 24upx; font-weight: 400; color: #FFFFFF;margin-top: 10upx;">
<text> 下单时间: </text> <text style="color: #888888;"> {{goods.create_time || ''}} </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>
</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>
</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>
</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>
</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>
</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;"
: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>
</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>
</view>
<view style="font-size: 24upx; font-weight: 400; color: #FFFFFF; margin-top: 15upx;">
<text> 产品尺寸: </text>
<text style="color: #888888;">
{{goods.order_goods.goods_name || ''}}
<text v-if="goods.used_applets != '4'">{{goods.order_goods.goods_specs || ''}} </text>
</text>
</view>
<view style="font-size: 24upx; font-weight: 400; color: #FFFFFF;margin-top: 15upx;">
<text> 支付金额: </text>
<text style="color: #888888;">{{goods.real_amount || ''}} </text>
</view>
<view style="font-size: 24upx; font-weight: 400; color: #FFFFFF;margin-top: 15upx;">
<text> 下单时间: </text>
<text style="color: #888888;"> {{goods.create_time || ''}} </text>
</view>
</view>
</view>
</view>
</view> </view>
<view v-if="rankinglist.length > 0 && type != 2" style="position: fixed; bottom: 30upx; <view v-if="rankinglist.length > 0 && type != 2" style="position: fixed; bottom: 30upx;
margin: auto; left: 0; right: 0; margin: auto; left: 0; right: 0;
...@@ -377,9 +466,14 @@ ...@@ -377,9 +466,14 @@
<script> <script>
import homeservice from '@/service/homeservice.js' 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 { export default {
components: {firework}, components: {
firework,
myhead
},
computed: {}, computed: {},
data() { data() {
return { return {
...@@ -388,173 +482,187 @@ ...@@ -388,173 +482,187 @@
s: 'Order.detail', s: 'Order.detail',
id: null id: null
}, },
machine_id:null,//设备id machine_id: null, //设备id
type:null ,//1:配送版,2:单机版,3:自助版 type: null, //1:配送版,2:单机版,3:自助版
lineUpState: false,//排队状态----横向进入滑动动画 lineUpState: false, //排队状态----横向进入滑动动画
leaveUpState: false,//排队状态----横向离开滑动动画 leaveUpState: false, //排队状态----横向离开滑动动画
printingStart: false,//打印状态----横向进来滑动动画 Printing start printingStart: false, //打印状态----横向进来滑动动画 Printing start
printingEnd:{}, ///打印状态----纵向离开动画 Printing end printingEnd: {}, ///打印状态----纵向离开动画 Printing end
initstate: false,//打印状态----显示刷子 initstate: false, //打印状态----显示刷子
PickUpStart:{}, //取货状态-----手机壳从上面动画出来 PickUpStart: {}, //取货状态-----手机壳从上面动画出来
PickUpTopBottom:null, //定时器----取货上下浮动 PickUpTopBottom: null, //定时器----取货上下浮动
statetime:null,//定时器----打印机动画 statetime: null, //定时器----打印机动画
orderOrderStatusTime:null,//定时器---查询订单状态 orderOrderStatusTime: null, //定时器---查询订单状态
OrderOrderRankingTime:null,//定时器---排队定时器 OrderOrderRankingTime: null, //定时器---排队定时器
leftx:0,//x轴-----刷子打印 leftx: 0, //x轴-----刷子打印
topy:-20,//y-----刷子打印 topy: -20, //y-----刷子打印
animMaind:{}, //动画----刷子上下动画 animMaind: {}, //动画----刷子上下动画
animMaind_time:800, //动画时间----刷子上下动画时间 animMaind_time: 800, //动画时间----刷子上下动画时间
isReady: false,//礼花开关 isReady: false, //礼花开关
BoxTwoAnimation:{}, //排队-打印-取货流程图架构 BoxTwoAnimation: {}, //排队-打印-取货流程图架构
oldRankinglist:[],//上次排队队列 oldRankinglist: [], //上次排队队列
rankinglist:[],//排队队列 rankinglist: [], //排队队列
teststate:false,//开启测试模式 false true teststate: false, //开启测试模式 false true
orderOrderStatusData:null,//订单状态 orderOrderStatusData: null, //订单状态
ringaction: { //打印机音乐状态 ringaction: { //打印机音乐状态
method: 'pause' //method: 'pause'method: 'play' method: 'pause' //method: 'pause'method: 'play'
}, },
stitchaction: { //履带音乐状态 stitchaction: { //履带音乐状态
method: 'pause' //method: 'pause'method: 'play' method: 'pause' //method: 'pause'method: 'play'
}, },
printer:false,//打印机状态 printer: false, //打印机状态
data: { data: {
windowWidth: 0, // 屏幕宽度 windowWidth: 0, // 屏幕宽度
windowHeight: 0, // 屏幕高度 windowHeight: 0, // 屏幕高度
pixelRate: 0, // 屏幕宽度比率 pixelRate: 0, // 屏幕宽度比率
editorWidth: 0, // 设计宽度 editorWidth: 0, // 设计宽度
editorHeight: 0, // 设计高度 editorHeight: 0, // 设计高度
render_cove_width:null, render_cove_width: null,
render_cove_height:null, render_cove_height: null,
activebrushX:-500,//排队盒子动画坐标 activebrushX: -500, //排队盒子动画坐标
printingStartX:-500,//生产中盒子动画坐标 printingStartX: -500, //生产中盒子动画坐标
}, },
tomallstate:true,//防止返回触动页面销毁事件 tomallstate: true, //防止返回触动页面销毁事件
LoadState:false,//加载完成 LoadState: false, //加载完成
orderCurrentOrder:null, orderCurrentOrder: null,
orderCurrentOrderTime:null, orderCurrentOrderTime: null,
background_surface_image:null,//定制壳手机壳底色 background_surface_image: null, //定制壳手机壳底色
headTitle: "", //头部标题文字
}; };
}, },
onReady() { onReady() {
}, },
methods: { methods: {
tomall(){ tomall() {
this.tomallstate = false this.tomallstate = false
wx.navigateBack({delta: 3})
uni.reLaunch({
url: '/pages/index/machineDetail?machine_id=' + this.machine_id
});
/* wx.navigateBack({
delta: 3
}) */
}, },
init() { init() {
this.printer = true this.printer = true
this.isReady = false this.isReady = false
this.leftx = this.data.render_cove_width this.leftx = this.data.render_cove_width
// this.topy = -20 // this.topy = -20
setTimeout(function(){ setTimeout(function() {
this.updata() this.updata()
}.bind(this),2000) }.bind(this), 2000)
}, },
updata(){ updata() {
setTimeout(function(){ setTimeout(function() {
this.ringaction.method = 'play' //开启音乐 this.ringaction.method = 'play' //开启音乐
console.log('5开启音乐') console.log('5开启音乐')
}.bind(this),this.animMaind_time) }.bind(this), this.animMaind_time)
// 无限循环动画 // 无限循环动画
var animation = wx.createAnimation({ var animation = wx.createAnimation({
duration: this.animMaind_time,// 动画执行时间 duration: this.animMaind_time, // 动画执行时间
timingFunction: 'linear',// 动画执行效果 timingFunction: 'linear', // 动画执行效果
}) })
var state = true // 控制上下滑动setTimeout setInterval var state = true // 控制上下滑动setTimeout setInterval
this.statetime = setInterval(function(){ this.statetime = setInterval(function() {
if(state == true){ if (state == true) {
animation.translate(0,(this.data.render_cove_height)).step();//向下移动 animation.translate(0, (this.data.render_cove_height)).step(); //向下移动
}else{ } else {
animation.translate(0,0).step();//向上移动 animation.translate(0, 0).step(); //向上移动
} }
state = !state state = !state
// 减慢打印时间 // 减慢打印时间
if(this.leftx <= 10){ if (this.leftx <= 10) {
if(this.orderOrderStatusData.status == 10 || this.orderOrderStatusData.status == 2){ if (this.orderOrderStatusData.status == 10 || this.orderOrderStatusData.status == 2) {
this.leftx -= 2 this.leftx -= 2
}else{ } else {
this.leftx -= 0.1 this.leftx -= 0.1
} }
}else{ } else {
this.leftx -= 1 this.leftx -= 1
} }
this.setData({ this.setData({
animMaind: animation.export(), animMaind: animation.export(),
leftx:this.leftx leftx: this.leftx
}) })
// 打印完成----清除定时器 // 打印完成----清除定时器
if(this.leftx <= 0){ if (this.leftx <= 0) {
this.ringaction.method = 'pause' //暂停音乐 this.ringaction.method = 'pause' //暂停音乐
console.log('5暂停音乐') console.log('5暂停音乐')
clearInterval(this.statetime) clearInterval(this.statetime)
this.statetime = null this.statetime = null
this.isReady = true; this.isReady = true;
this.printer = false this.printer = false
uni.showToast({title: '打印完成,即将出货',icon: 'none',duration: 2000}); uni.showToast({
setTimeout(function(){ title: '打印完成,即将出货',
icon: 'none',
duration: 2000
});
setTimeout(function() {
this.boxinit({ this.boxinit({
duration:3000,// 动画执行时间 duration: 3000, // 动画执行时间
axisX:0,// x轴移动 axisX: 0, // x轴移动
axisY:this.data.windowHeight,// y轴移动 axisY: this.data.windowHeight, // y轴移动
settimeout:3500,// 定时器时间 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({ var animation = wx.createAnimation({
duration: data.duration,// 动画执行时间 duration: data.duration, // 动画执行时间
timingFunction: 'linear',// 动画执行效果 timingFunction: 'linear', // 动画执行效果
}) })
animation.translate(data.axisX, data.axisY).step(); animation.translate(data.axisX, data.axisY).step();
this.setData({ this.setData({
printingEnd: animation.export(), printingEnd: animation.export(),
}) })
setTimeout(function(){ setTimeout(function() {
this.Box_Two_Animation({ this.Box_Two_Animation({
duration:2000,// 动画执行时间 duration: 2000, // 动画执行时间
axisX:0,// x轴移动 axisX: 0, // x轴移动
axisY:-this.data.windowHeight,// y轴移动 axisY: -this.data.windowHeight, // y轴移动
settimeout:2500,// 定时器时间 settimeout: 2500, // 定时器时间
settimeoutState:true,//开启下一步 settimeoutState: true, //开启下一步
}) })
}.bind(this),data.settimeout) }.bind(this), data.settimeout)
}, },
// 取货页面----底部向上滑动动画 // 取货页面----底部向上滑动动画
Box_Two_Animation(data){ Box_Two_Animation(data) {
var animation = wx.createAnimation({ var animation = wx.createAnimation({
duration: data.duration,// 动画执行时间 duration: data.duration, // 动画执行时间
timingFunction: 'linear',// 动画执行效果 timingFunction: 'linear', // 动画执行效果
}) })
animation.translate(data.axisX, data.axisY).step(); animation.translate(data.axisX, data.axisY).step();
this.setData({ this.setData({
BoxTwoAnimation: animation.export(), BoxTwoAnimation: animation.export(),
}) })
if(!data.settimeoutState) return; if (!data.settimeoutState) return;
wx.setNavigationBarTitle({title: '取货区' }) this.headTitle = "取货区";
setTimeout(function(){ //wx.setNavigationBarTitle({title: '取货区' })
let boxinitY = (this.data.windowHeight - ((this.data.windowHeight - this.data.editorHeight)/2)) - ( this.data.editorHeight / 3 * 1) setTimeout(function() {
let boxinitY = (this.data.windowHeight - ((this.data.windowHeight - this.data.editorHeight) /
2)) - (this.data.editorHeight / 3 * 1)
this.Two_Brush_Animation({ this.Two_Brush_Animation({
duration:5000,// 动画执行时间 duration: 5000, // 动画执行时间
axisX:0,// x轴移动 axisX: 0, // x轴移动
axisY:boxinitY,// y轴移动 axisY: boxinitY, // y轴移动
settimeout:5000,// 定时器时间 settimeout: 5000, // 定时器时间
}) })
}.bind(this),data.settimeout) }.bind(this), data.settimeout)
}, },
// 取货手机壳动画 // 取货手机壳动画
Two_Brush_Animation(data){ Two_Brush_Animation(data) {
let animation = wx.createAnimation({ let animation = wx.createAnimation({
duration: data.duration,// 动画执行时间 duration: data.duration, // 动画执行时间
timingFunction: 'linear',// 动画执行效果 timingFunction: 'linear', // 动画执行效果
}) })
animation.translate(data.axisX, data.axisY).step(); animation.translate(data.axisX, data.axisY).step();
this.setData({ this.setData({
...@@ -563,56 +671,68 @@ ...@@ -563,56 +671,68 @@
// 上下浮动 // 上下浮动
clearInterval(this.PickUpTopBottom) clearInterval(this.PickUpTopBottom)
this.PickUpTopBottom = null this.PickUpTopBottom = null
setTimeout(function(){ setTimeout(function() {
uni.showToast({title: '已出货,请在出货口取货吧',icon: 'none',duration: 2000}); uni.showToast({
title: '已出货,请在出货口取货吧',
icon: 'none',
duration: 2000
});
var state = true var state = true
let animation = wx.createAnimation({ let animation = wx.createAnimation({
duration: 2000,// 动画执行时间 duration: 2000, // 动画执行时间
timingFunction: 'linear',// 动画执行效果 timingFunction: 'linear', // 动画执行效果
}) })
this.PickUpTopBottom = setInterval(function(){ this.PickUpTopBottom = setInterval(function() {
if(state == true){ if (state == true) {
animation.translate(data.axisX,(data.axisY + 40)).step(); animation.translate(data.axisX, (data.axisY + 40)).step();
}else{ } else {
animation.translate(data.axisX,data.axisY).step(); animation.translate(data.axisX, data.axisY).step();
} }
state = !state state = !state
this.setData({ this.setData({
PickUpStart: animation.export(), PickUpStart: animation.export(),
}) })
}.bind(this),2000) }.bind(this), 2000)
}.bind(this),data.settimeout) }.bind(this), data.settimeout)
}, },
loadData() { loadData() {
uni.showLoading({title: '正在加载中...'}) uni.showLoading({
title: '正在加载中...'
})
homeservice.WorksList(this.queryPage).then(result => { homeservice.WorksList(this.queryPage).then(result => {
this.goods = result this.goods = result
/* if(this.$base.mobilePhoneCaseSize){ /* if(this.$base.mobilePhoneCaseSize){
this.data = this.$base.mobilePhoneCaseSize this.data = this.$base.mobilePhoneCaseSize
}else{ */ }else{ */
this.background_surface_image = result.goods.surface_pic this.background_surface_image = result.goods.surface_pic
result.goods.design_width = 200 / this.data.pixelRate result.goods.design_width = 200 / this.data.pixelRate
result.goods.design_height = 370 / this.data.pixelRate result.goods.design_height = 370 / this.data.pixelRate
this.data.editorWidth = result.goods.design_width * 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.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_width = result.goods.render_cove_width * (result.goods.design_width /
this.data.render_cove_height = result.goods.render_cove_height * (result.goods.design_height / result.goods.render_height) * this.data.pixelRate + 30 // 设计高度 result.goods.render_width) * 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_cove_height = result.goods.render_cove_height * (result.goods.design_height /
this.data.render_top = result.goods.render_top * (result.goods.design_height / result.goods.render_height) * this.data.pixelRate // 设计高度 result.goods.render_height) * this.data.pixelRate + 30 // 设计高度
this.data.activebrushX = -((this.data.windowWidth - this.data.editorWidth)/2 + this.data.editorWidth + 50) this.data.render_left = result.goods.render_left * (result.goods.design_width / result.goods
this.data.printingStartX = -((this.data.windowWidth - this.data.editorWidth)/2 + this.data.editorWidth + 50) .render_width) * this.data.pixelRate // 设计高度
//this.$base.mobilePhoneCaseSize = this.data 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 this.leftx = this.data.render_cove_width
// status.value 订单状态 0:等待生产,1:生产中,2: 生产完成,3:取消生产,4:出料中(弃用),5: 等待取料(弃用), 6:待入货(弃用),7:取货完成,8:已发货,9:订单完成 --> // status.value 订单状态 0:等待生产,1:生产中,2: 生产完成,3:取消生产,4:出料中(弃用),5: 等待取料(弃用), 6:待入货(弃用),7:取货完成,8:已发货,9:订单完成 -->
// type.value 1直营配送站 2 万能通用版 3色彩自助站 // type.value 1直营配送站 2 万能通用版 3色彩自助站
if(this.teststate){ if (this.teststate) {
result.status.value = 1 //1:生产中 result.status.value = 1 //1:生产中
result.type.value = 2 //2单机版 result.type.value = 2 //2单机版
} }
this.type = result.type.value this.type = result.type.value
// 单机版查询当前设备打印订单 // 单机版查询当前设备打印订单
if(this.type == 2){ if (this.type == 2) {
this.anb() //查询排队列表 this.anb() //查询排队列表
// clearInterval(this.orderCurrentOrderTime) // clearInterval(this.orderCurrentOrderTime)
// this.orderCurrentOrderTime = setInterval(function(){ // this.orderCurrentOrderTime = setInterval(function(){
...@@ -624,66 +744,76 @@ ...@@ -624,66 +744,76 @@
// // this.anbtwo() //记录排队人数 // // this.anbtwo() //记录排队人数
// }.bind(this),10000) // }.bind(this),10000)
this.leaveto(3) this.leaveto(3)
}else{ } else {
this.OrderOrderStatusInit() this.OrderOrderStatusInit()
} }
uni.hideLoading(); uni.hideLoading();
uni.stopPullDownRefresh(); uni.stopPullDownRefresh();
}).catch(err => { }).catch(err => {
uni.hideLoading(); uni.hideLoading();
uni.showToast({title: err.msg || err.data,icon: 'none'}); uni.showToast({
title: err.msg || err.data,
icon: 'none'
});
}); });
}, },
anb(){ anb() {
homeservice.WorksList({ homeservice.WorksList({
s:'Order.orderStatus', s: 'Order.orderStatus',
order_id:this.queryPage.id order_id: this.queryPage.id
}).then(result => { }).then(result => {
this.orderOrderStatusData = result this.orderOrderStatusData = result
this.orderOrderStatusData.status = 0 this.orderOrderStatusData.status = 0
// wx.setNavigationBarTitle({title: '排队区' }) // wx.setNavigationBarTitle({title: '排队区' })
// this.anbone() // this.anbone()
}).catch(err => { }).catch(err => {
uni.showToast({title: err.msg || err.data,icon: 'none'}); uni.showToast({
title: err.msg || err.data,
icon: 'none'
});
}); });
}, },
anbone(){ anbone() {
homeservice.WorksList({ homeservice.WorksList({
s:'Order.orderRanking', s: 'Order.orderRanking',
order_id:this.queryPage.id, order_id: this.queryPage.id,
machine_id:this.machine_id machine_id: this.machine_id
}).then(result => { }).then(result => {
this.oldRankinglist = []// 第一次进来记录排队人数 this.oldRankinglist = [] // 第一次进来记录排队人数
for(var i =0;i<result.ranking;i++){ for (var i = 0; i < result.ranking; i++) {
this.oldRankinglist.push({ this.oldRankinglist.push({
w:30,x:0 w: 30,
x: 0
}) })
} }
this.rankinglist = this.oldRankinglist this.rankinglist = this.oldRankinglist
this.Box_Two_Animation({ this.Box_Two_Animation({
duration:0,// 动画执行时间 duration: 0, // 动画执行时间
axisX:this.data.windowWidth + this.data.windowWidth,// x轴移动 axisX: this.data.windowWidth + this.data.windowWidth, // x轴移动
axisY:0,// y轴移动 axisY: 0, // y轴移动
settimeout:0,// 定时器时间 settimeout: 0, // 定时器时间
settimeoutState:false,//开启下一步 settimeoutState: false, //开启下一步
}) })
this.LoadState = true this.LoadState = true
setTimeout(function(){ setTimeout(function() {
this.Box_Two_Animation({ this.Box_Two_Animation({
duration:3000,// 动画执行时间 duration: 3000, // 动画执行时间
axisX:this.data.windowWidth,// x轴移动 axisX: this.data.windowWidth, // x轴移动
axisY:0,// y轴移动 axisY: 0, // y轴移动
settimeout:0,// 定时器时间 settimeout: 0, // 定时器时间
settimeoutState:false,//开启下一步 settimeoutState: false, //开启下一步
}) })
}.bind(this),1000) }.bind(this), 1000)
//排队状态----盒子横向进入滑动动画时间3s //排队状态----盒子横向进入滑动动画时间3s
setTimeout(function(){ setTimeout(function() {
this.lineUpState = true this.lineUpState = true
this.data.activebrushX = 0 this.data.activebrushX = 0
}.bind(this),4500) }.bind(this), 4500)
}).catch(err => { }).catch(err => {
uni.showToast({title: err.msg || err.data,icon: 'none'}); uni.showToast({
title: err.msg || err.data,
icon: 'none'
});
}); });
}, },
// anbtwo(){ // anbtwo(){
...@@ -703,14 +833,14 @@ ...@@ -703,14 +833,14 @@
// uni.showToast({title: err.msg || err.data,icon: 'none'}); // uni.showToast({title: err.msg || err.data,icon: 'none'});
// }); // });
// }, // },
OrdercurrentOrder(){ OrdercurrentOrder() {
console.log('单机版查询设备打印订单') console.log('单机版查询设备打印订单')
homeservice.WorksList({ homeservice.WorksList({
s:'Order.currentOrder', s: 'Order.currentOrder',
machine_id:this.machine_id machine_id: this.machine_id
}).then(result => { }).then(result => {
this.orderCurrentOrder = result.order_id this.orderCurrentOrder = result.order_id
if(this.teststate){ if (this.teststate) {
this.orderCurrentOrder = this.queryPage.id // 测试 this.orderCurrentOrder = this.queryPage.id // 测试
} }
// if(this.orderCurrentOrder == this.queryPage.id){ // if(this.orderCurrentOrder == this.queryPage.id){
...@@ -723,23 +853,27 @@ ...@@ -723,23 +853,27 @@
// this.leaveto(3) // this.leaveto(3)
}).catch(err => { }).catch(err => {
uni.hideLoading(); 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({ homeservice.WorksList({
s:'Order.orderStatus', s: 'Order.orderStatus',
order_id:this.queryPage.id order_id: this.queryPage.id
}).then(result => { }).then(result => {
//result.status -1:订单不存在 0:待打印 1:打印中 10:打印完成 2:生产完成 3:取消生产 //result.status -1:订单不存在 0:待打印 1:打印中 10:打印完成 2:生产完成 3:取消生产
if(this.teststate || e == 2){ if (this.teststate || e == 2) {
result.status = 0 // 测试 result.status = 0 // 测试
} }
this.orderOrderStatusData = result this.orderOrderStatusData = result
if(result.status == 0){ //0:待打印排队中 if (result.status == 0) { //0:待打印排队中
wx.setNavigationBarTitle({title: '排队区' }) this.headTitle = "排队区";
//wx.setNavigationBarTitle({title: '排队区' })
this.OrderOrderRankingInit(4) this.OrderOrderRankingInit(4)
if(this.teststate){ if (this.teststate) {
// setTimeout(function(){ // setTimeout(function(){
// this.OrderOrderRankingInit(1) // this.OrderOrderRankingInit(1)
// }.bind(this),5000) // }.bind(this),5000)
...@@ -747,89 +881,103 @@ ...@@ -747,89 +881,103 @@
// this.OrderOrderRankingInit(-1) // this.OrderOrderRankingInit(-1)
// }.bind(this),10000) // }.bind(this),10000)
} }
if(this.type != 2){ if (this.type != 2) {
if(!this.teststate && e != 2){// 排队定时器 测试需要关闭 if (!this.teststate && e != 2) { // 排队定时器 测试需要关闭
clearInterval(this.OrderOrderRankingTime) clearInterval(this.OrderOrderRankingTime)
this.OrderOrderRankingTime = setInterval(function(){ this.OrderOrderRankingTime = setInterval(function() {
this.OrderOrderRankingInit() this.OrderOrderRankingInit()
}.bind(this),10000) }.bind(this), 10000)
} }
} }
}else if(result.status == 1){// 1:打印中 } else if (result.status == 1) { // 1:打印中
wx.setNavigationBarTitle({title: '打印区' }) this.headTitle = "打印区";
//wx.setNavigationBarTitle({title: '打印区' })
// 打开排队页面 // 打开排队页面
this.Box_Two_Animation({ this.Box_Two_Animation({
duration:0,// 动画执行时间 duration: 0, // 动画执行时间
axisX:this.data.windowWidth,// x轴移动 axisX: this.data.windowWidth, // x轴移动
axisY:0,// y轴移动 axisY: 0, // y轴移动
settimeout:0,// 定时器时间 settimeout: 0, // 定时器时间
settimeoutState:false,//开启下一步 settimeoutState: false, //开启下一步
}) })
this.LoadState = true this.LoadState = true
setTimeout(function(){ setTimeout(function() {
this.Box_Two_Animation({ this.Box_Two_Animation({
duration:3000,// 动画执行时间 duration: 3000, // 动画执行时间
axisX:0,// x轴移动 axisX: 0, // x轴移动
axisY:0,// y轴移动 axisY: 0, // y轴移动
settimeout:0,// 定时器时间 settimeout: 0, // 定时器时间
settimeoutState:false,//开启下一步 settimeoutState: false, //开启下一步
}) })
}.bind(this),1000) }.bind(this), 1000)
// 打印状态滑动进来 // 打印状态滑动进来
setTimeout(function(){ setTimeout(function() {
this.printingStart = true //打印状态----横向进来滑动动画 3s this.printingStart = true //打印状态----横向进来滑动动画 3s
this.data.printingStartX = 0 this.data.printingStartX = 0
}.bind(this),4500) }.bind(this), 4500)
setTimeout(function(){ setTimeout(function() {
this.initstate = true //打印状态----显示刷子 this.initstate = true //打印状态----显示刷子
this.init() this.init()
}.bind(this),7500) }.bind(this), 7500)
if(!this.teststate){ if (!this.teststate) {
// 定时器查询订单状态 // 定时器查询订单状态
clearInterval(this.orderOrderStatusTime) clearInterval(this.orderOrderStatusTime)
this.orderOrderStatusTime = setInterval(function(){ this.orderOrderStatusTime = setInterval(function() {
this.orderOrderStatusGet() this.orderOrderStatusGet()
}.bind(this),10000) }.bind(this), 10000)
}else{ } else {
// 定时器查询订单状态 // 定时器查询订单状态
clearInterval(this.orderOrderStatusTime) clearInterval(this.orderOrderStatusTime)
this.orderOrderStatusTime = setInterval(function(){ this.orderOrderStatusTime = setInterval(function() {
this.orderOrderStatusGet() 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 this.LoadState = true
wx.setNavigationBarTitle({title: '取货区' }) this.headTitle = "取货区";
//wx.setNavigationBarTitle({title: '取货区' })
this.Box_Two_Animation({ this.Box_Two_Animation({
duration:2000,// 动画执行时间 duration: 2000, // 动画执行时间
axisX:0,// x轴移动 axisX: 0, // x轴移动
axisY:-this.data.windowHeight,// y轴移动 axisY: -this.data.windowHeight, // y轴移动
settimeout:2500,// 定时器时间 settimeout: 2500, // 定时器时间
settimeoutState:true,//开启下一步 settimeoutState: true, //开启下一步
}) })
}else if(result.status == 3 || result.status == -3){ } else if (result.status == 3 || result.status == -3) {
wx.setNavigationBarTitle({title: '取消生产' }) this.headTitle = "取消生产";
}else if(result.status == -2){ /* wx.setNavigationBarTitle({
wx.setNavigationBarTitle({title: '设备故障' }) title: '取消生产'
}else if(result.status == 7){ }) */
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 => { }).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:取消生产 // -1:订单不存在 0:待打印 1:打印中 10:打印完成 2:生产完成 3:取消生产
// 打印状态滑动进来 // 打印状态滑动进来
orderOrderStatusGet(){ orderOrderStatusGet() {
homeservice.WorksList({ homeservice.WorksList({
s:'Order.orderStatus', s: 'Order.orderStatus',
order_id:this.queryPage.id order_id: this.queryPage.id
}).then(result => { }).then(result => {
if(this.teststate){ if (this.teststate) {
result.status = 2 result.status = 2
} }
this.orderOrderStatusData = result this.orderOrderStatusData = result
if(result.status == 10 || result.status == 2){ if (result.status == 10 || result.status == 2) {
clearInterval(this.statetime) clearInterval(this.statetime)
this.statetime = null this.statetime = null
clearInterval(this.orderOrderStatusTime) clearInterval(this.orderOrderStatusTime)
...@@ -840,26 +988,35 @@ ...@@ -840,26 +988,35 @@
animMaind_time: animMaind_time || 200, animMaind_time: animMaind_time || 200,
}) })
this.updata() this.updata()
}else if(result.status == 3 || result.status == -3){ } else if (result.status == 3 || result.status == -3) {
this.ringaction.method = 'pause' //暂停音乐 this.ringaction.method = 'pause' //暂停音乐
console.log('5暂停音乐') //console.log('5暂停音乐')
wx.setNavigationBarTitle({title: '取消生产' }) this.headTitle = "取消生产";
/* wx.setNavigationBarTitle({
title: '取消生产'
}) */
clearInterval(this.statetime) clearInterval(this.statetime)
this.statetime = null this.statetime = null
clearInterval(this.orderOrderStatusTime) clearInterval(this.orderOrderStatusTime)
this.orderOrderStatusTime = null this.orderOrderStatusTime = null
}else if(result.status == -2){ } else if (result.status == -2) {
this.ringaction.method = 'pause' //暂停音乐 this.ringaction.method = 'pause' //暂停音乐
console.log('5暂停音乐') //console.log('5暂停音乐')
wx.setNavigationBarTitle({title: '设备故障' }) this.headTitle = "设备故障";
/* wx.setNavigationBarTitle({
title: '设备故障'
}) */
clearInterval(this.statetime) clearInterval(this.statetime)
this.statetime = null this.statetime = null
clearInterval(this.orderOrderStatusTime) clearInterval(this.orderOrderStatusTime)
this.orderOrderStatusTime = null this.orderOrderStatusTime = null
}else if(result.status == 7){ } else if (result.status == 7) {
this.ringaction.method = 'pause' //暂停音乐 this.ringaction.method = 'pause' //暂停音乐
console.log('5暂停音乐') this.headTitle = "取货完成";
wx.setNavigationBarTitle({title: '取货完成' }) //console.log('5暂停音乐')
/* wx.setNavigationBarTitle({
title: '取货完成'
}) */
clearInterval(this.statetime) clearInterval(this.statetime)
this.statetime = null this.statetime = null
clearInterval(this.orderOrderStatusTime) clearInterval(this.orderOrderStatusTime)
...@@ -867,166 +1024,183 @@ ...@@ -867,166 +1024,183 @@
} }
}).catch(err => { }).catch(err => {
console.log(err) console.log(err)
uni.showToast({title: err.msg || err.data,icon: 'none'}); uni.showToast({
title: err.msg || err.data,
icon: 'none'
});
}); });
}, },
// 查询排队 // 查询排队
// 如果订单不存单,或者订单已经打印完成,那么返回的排名是-1 // 如果订单不存单,或者订单已经打印完成,那么返回的排名是-1
// 如果订单当前正在打印。返回的排名是0 // 如果订单当前正在打印。返回的排名是0
// 如果前面有一个订单就返回1,前面有两个订单就返回2 // 如果前面有一个订单就返回1,前面有两个订单就返回2
OrderOrderRankingInit(state){ OrderOrderRankingInit(state) {
homeservice.WorksList({ homeservice.WorksList({
s:'Order.orderRanking', s: 'Order.orderRanking',
order_id:this.queryPage.id, order_id: this.queryPage.id,
machine_id:this.machine_id machine_id: this.machine_id
}).then(result => { }).then(result => {
if(this.teststate){ if (this.teststate) {
result.ranking = state //例子 result.ranking = state //例子
} }
if(result.ranking >= 0){ if (result.ranking >= 0) {
if(this.oldRankinglist.length > 0){ if (this.oldRankinglist.length > 0) {
if(this.rankinglist.length > result.ranking){ if (this.rankinglist.length > result.ranking) {
// 排队消失列表效果 // 排队消失列表效果
this.rankinglist[(this.rankinglist.length - 1)].x = 200 this.rankinglist[(this.rankinglist.length - 1)].x = 200
setTimeout(function(){ setTimeout(function() {
this.rankinglist[(this.rankinglist.length - 1)].w = 0 this.rankinglist[(this.rankinglist.length - 1)].w = 0
}.bind(this),1000) }.bind(this), 1000)
setTimeout(function(){ setTimeout(function() {
this.rankinglist.pop() this.rankinglist.pop()
if(this.rankinglist.length == 0){ if (this.rankinglist.length == 0) {
this.leaveto(0) this.leaveto(0)
} }
}.bind(this),2500) }.bind(this), 2500)
} }
}else{ } else {
this.oldRankinglist = []// 第一次进来记录排队人数 this.oldRankinglist = [] // 第一次进来记录排队人数
for(var i =0;i<result.ranking;i++){ for (var i = 0; i < result.ranking; i++) {
this.oldRankinglist.push({ this.oldRankinglist.push({
w:30,x:0 w: 30,
x: 0
}) })
} }
this.rankinglist = this.oldRankinglist this.rankinglist = this.oldRankinglist
// 当排队人数等于0就开始打印 // 当排队人数等于0就开始打印
if(this.rankinglist.length == 0){ if (this.rankinglist.length == 0) {
this.leaveto(1) this.leaveto(1)
}else{ } else {
// 快速切换--排队状态设计区底图 // 快速切换--排队状态设计区底图
this.Box_Two_Animation({ this.Box_Two_Animation({
duration:0,// 动画执行时间 duration: 0, // 动画执行时间
axisX:this.data.windowWidth + this.data.windowWidth,// x轴移动 axisX: this.data.windowWidth + this.data.windowWidth, // x轴移动
axisY:0,// y轴移动 axisY: 0, // y轴移动
settimeout:0,// 定时器时间 settimeout: 0, // 定时器时间
settimeoutState:false,//开启下一步 settimeoutState: false, //开启下一步
}) })
this.LoadState = true this.LoadState = true
setTimeout(function(){ setTimeout(function() {
this.Box_Two_Animation({ this.Box_Two_Animation({
duration:3000,// 动画执行时间 duration: 3000, // 动画执行时间
axisX:this.data.windowWidth,// x轴移动 axisX: this.data.windowWidth, // x轴移动
axisY:0,// y轴移动 axisY: 0, // y轴移动
settimeout:0,// 定时器时间 settimeout: 0, // 定时器时间
settimeoutState:false,//开启下一步 settimeoutState: false, //开启下一步
}) })
}.bind(this),1000) }.bind(this), 1000)
//排队状态----盒子横向进入滑动动画时间3s //排队状态----盒子横向进入滑动动画时间3s
setTimeout(function(){ setTimeout(function() {
this.lineUpState = true this.lineUpState = true
this.data.activebrushX = 0 this.data.activebrushX = 0
}.bind(this),4500) }.bind(this), 4500)
} }
} }
}else{ } else {
this.leaveto(1) this.leaveto(1)
} }
}).catch(err => { }).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) clearInterval(this.OrderOrderRankingTime)
this.OrderOrderRankingTime = null this.OrderOrderRankingTime = null
let time = 3500 //时间 let time = 3500 //时间
if(e == 1){ //无排队切换打印 if (e == 1) { //无排队切换打印
// 快速切换--设计区底图 // 快速切换--设计区底图
this.Box_Two_Animation({ this.Box_Two_Animation({
duration:0,// 动画执行时间 duration: 0, // 动画执行时间
axisX:this.data.windowWidth,// x轴移动 axisX: this.data.windowWidth, // x轴移动
axisY:0,// y轴移动 axisY: 0, // y轴移动
settimeout:0,// 定时器时间 settimeout: 0, // 定时器时间
settimeoutState:false,//开启下一步 settimeoutState: false, //开启下一步
}) })
this.LoadState = true this.LoadState = true
setTimeout(function(){ setTimeout(function() {
this.Box_Two_Animation({ this.Box_Two_Animation({
duration:3000,// 动画执行时间 duration: 3000, // 动画执行时间
axisX:0,// x轴移动 axisX: 0, // x轴移动
axisY:0,// y轴移动 axisY: 0, // y轴移动
settimeout:0,// 定时器时间 settimeout: 0, // 定时器时间
settimeoutState:false,//开启下一步 settimeoutState: false, //开启下一步
}) })
}.bind(this),1000) }.bind(this), 1000)
time = 4500 //无时间 time = 4500 //无时间
wx.setNavigationBarTitle({title: '打印区' }) this.headTitle = "打印区";
}else if(e == 0){ //有排队切换打印 /* wx.setNavigationBarTitle({
title: '打印区'
}) */
} else if (e == 0) { //有排队切换打印
this.LoadState = true this.LoadState = true
this.leaveUpState = true //排队状态----横向离开滑动动画 时间3s this.leaveUpState = true //排队状态----横向离开滑动动画 时间3s
this.data.activebrushX = (this.data.windowWidth - this.data.editorWidth)/2 + this.data.editorWidth + 50 //排队状态----横向离开滑动动画 3s this.data.activebrushX = (this.data.windowWidth - this.data.editorWidth) / 2 + this.data.editorWidth +
setTimeout(function(){ // 排队页面滑出---打印页面进入 50 //排队状态----横向离开滑动动画 3s
setTimeout(function() { // 排队页面滑出---打印页面进入
this.Box_Two_Animation({ this.Box_Two_Animation({
duration:3000,// 动画执行时间 duration: 3000, // 动画执行时间
axisX:0,// x轴移动 axisX: 0, // x轴移动
axisY:0,// y轴移动 axisY: 0, // y轴移动
settimeout:0,// 定时器时间 settimeout: 0, // 定时器时间
settimeoutState:false,//开启下一步 settimeoutState: false, //开启下一步
}) })
}.bind(this),time) }.bind(this), time)
wx.setNavigationBarTitle({title: '打印区' }) this.headTitle = "打印区";
}else if(e == 3){ /* wx.setNavigationBarTitle({
title: '打印区'
}) */
} else if (e == 3) {
// 快速切换--设计区底图 // 快速切换--设计区底图
this.Box_Two_Animation({ this.Box_Two_Animation({
duration:0,// 动画执行时间 duration: 0, // 动画执行时间
axisX:this.data.windowWidth,// x轴移动 axisX: this.data.windowWidth, // x轴移动
axisY:0,// y轴移动 axisY: 0, // y轴移动
settimeout:0,// 定时器时间 settimeout: 0, // 定时器时间
settimeoutState:false,//开启下一步 settimeoutState: false, //开启下一步
}) })
this.LoadState = true this.LoadState = true
setTimeout(function(){ setTimeout(function() {
this.Box_Two_Animation({ this.Box_Two_Animation({
duration:3000,// 动画执行时间 duration: 3000, // 动画执行时间
axisX:0,// x轴移动 axisX: 0, // x轴移动
axisY:0,// y轴移动 axisY: 0, // y轴移动
settimeout:0,// 定时器时间 settimeout: 0, // 定时器时间
settimeoutState:false,//开启下一步 settimeoutState: false, //开启下一步
}) })
}.bind(this),1000) }.bind(this), 1000)
time = 500 //无时间 time = 500 //无时间
wx.setNavigationBarTitle({title: '打印区' }) this.headTitle = "打印区";
/* wx.setNavigationBarTitle({
title: '打印区'
}) */
} }
setTimeout(function(){ setTimeout(function() {
this.printingStart = true //打印状态----横向进来滑动动画 this.printingStart = true //打印状态----横向进来滑动动画
this.data.printingStartX = 0 this.data.printingStartX = 0
}.bind(this),(time + 3500)) }.bind(this), (time + 3500))
// 刷子开始打印手机壳 // 刷子开始打印手机壳
setTimeout(function(){ setTimeout(function() {
this.initstate = true this.initstate = true
this.init() this.init()
}.bind(this),(time + 6500)) }.bind(this), (time + 6500))
// 开启定时器查询打印状态 // 开启定时器查询打印状态
if(this.teststate){ if (this.teststate) {
clearInterval(this.orderOrderStatusTime) clearInterval(this.orderOrderStatusTime)
this.orderOrderStatusTime = setInterval(function(){ this.orderOrderStatusTime = setInterval(function() {
this.orderOrderStatusGet() this.orderOrderStatusGet()
}.bind(this),15000) }.bind(this), 15000)
}else{ } else {
clearInterval(this.orderOrderStatusTime) clearInterval(this.orderOrderStatusTime)
this.orderOrderStatusTime = setInterval(function(){ this.orderOrderStatusTime = setInterval(function() {
this.orderOrderStatusGet() this.orderOrderStatusGet()
}.bind(this),10000) }.bind(this), 10000)
} }
}, },
clearIntervalTime(){// 清除定时器 clearIntervalTime() { // 清除定时器
clearInterval(this.statetime) clearInterval(this.statetime)
this.statetime = null this.statetime = null
clearInterval(this.orderOrderStatusTime) clearInterval(this.orderOrderStatusTime)
...@@ -1054,24 +1228,24 @@ ...@@ -1054,24 +1228,24 @@
}) })
}); });
}, },
tosetClipboardData(id){ // 复制成功 tosetClipboardData(id) { // 复制成功
uni.setClipboardData({ uni.setClipboardData({
data: id, data: id,
success: function () { success: function() {
uni.showToast({ uni.showToast({
title: '复制成功', title: '复制成功',
icon:'none', icon: 'none',
duration: 2000 duration: 2000
}); });
} }
}); });
}, },
callPhone (phone) { //拨打电话 callPhone(phone) { //拨打电话
uni.makePhoneCall({ uni.makePhoneCall({
phoneNumber: '18938664545' phoneNumber: '18938664545'
}) })
}, },
previewImg(goods, index) {//预览图片 previewImg(goods, index) { //预览图片
let img = goods.works_image let img = goods.works_image
uni.previewImage({ uni.previewImage({
current: index, current: index,
...@@ -1093,32 +1267,36 @@ ...@@ -1093,32 +1267,36 @@
this.data = this.$base.mobilePhoneCaseSize this.data = this.$base.mobilePhoneCaseSize
this.leftx = this.data.render_cove_width this.leftx = this.data.render_cove_width
}else{ */ }else{ */
var that = this; var that = this;
wx.getSystemInfo({//获取屏幕宽高 wx.getSystemInfo({ //获取屏幕宽高
success: function(res) { success: function(res) {
let pixelRate = res.windowWidth / 750; let pixelRate = res.windowWidth / 750;
that.data.windowWidth = res.windowWidth // 屏幕宽度 that.data.windowWidth = res.windowWidth // 屏幕宽度
that.data.windowHeight = res.windowHeight // 屏幕高度 that.data.windowHeight = res.windowHeight // 屏幕高度
that.data.pixelRate = pixelRate // 屏幕宽度比率 that.data.pixelRate = pixelRate // 屏幕宽度比率
} }
}) })
/* } */ /* } */
this.loadData(); this.loadData();
}, },
onshow(){ onshow() {
this.data.activebrushX = '-500'//排队盒子动画坐标 this.data.activebrushX = '-500' //排队盒子动画坐标
this.printingStart = false this.printingStart = false
this.data.printingStartX = '-500'//生产中盒子动画坐标 this.data.printingStartX = '-500' //生产中盒子动画坐标
}, },
onUnload() { onUnload() {
this.clearIntervalTime() this.clearIntervalTime()
let pages = getCurrentPages(); let pages = getCurrentPages();
// console.log(pages) // console.log(pages)
if(this.tomallstate){ if (this.tomallstate) {
if(pages[pages.length - 2].route == "pages/mine/order"){ if (pages[pages.length - 2].route == "pages/mine/order") {
wx.navigateBack({delta: 3}) wx.navigateBack({
}else if(pages[pages.length - 2].route == "pages/index/index"){ delta: 3
wx.navigateBack({delta: 2}) })
} else if (pages[pages.length - 2].route == "pages/index/index") {
wx.navigateBack({
delta: 2
})
} }
} }
} }
...@@ -1180,11 +1358,12 @@ ...@@ -1180,11 +1358,12 @@
} }
} }
.steps .li.active .steps_img{ .steps .li.active .steps_img {
background: #864BC3; background: #864BC3;
border: 1upx solid #864BC3; border: 1upx solid #864BC3;
} }
.steps .li.red .steps_img{
.steps .li.red .steps_img {
background: #864BC3; background: #864BC3;
border: 1upx solid #864BC3; border: 1upx solid #864BC3;
} }
...@@ -1201,22 +1380,27 @@ ...@@ -1201,22 +1380,27 @@
z-index: 1; z-index: 1;
/*放置在数字后面*/ /*放置在数字后面*/
} }
.steps .li.red ~ .li.red:after {
background-color: #864BC3; .steps .li.red~.li.red:after {
background-color: #864BC3;
} }
.steps .li.red ~ .li.active:after {
background-color: #864BC3; .steps .li.red~.li.active:after {
background-color: #864BC3;
} }
.steps .li.red ~ .li.wait:after {
background-color: #864BC3; .steps .li.red~.li.wait:after {
background-color: #864BC3;
} }
.steps .li.active ~ .li.wait:after {
background-color: #864BC3; .steps .li.active~.li.wait:after {
background-color: #864BC3;
} }
.steps .li.wait ~ .li.wait:after {
background-color: #B6B6B6; .steps .li.wait~.li.wait:after {
background-color: #B6B6B6;
} }
// 3D动画 // 3D动画
.crate-wrapper { .crate-wrapper {
height: 100%; height: 100%;
...@@ -1224,27 +1408,28 @@ ...@@ -1224,27 +1408,28 @@
align-items: center; align-items: center;
justify-content: center; justify-content: center;
} }
.brush{ .brush {
position: relative; position: relative;
transition: all 3s; transition: all 3s;
transform: translateX(-400px); transform: translateX(-400px);
} }
.twobrush{ .twobrush {
position: relative; position: relative;
transition: all 3s; transition: all 3s;
} }
.item-text{ .item-text {
transition: all 2s; transition: all 2s;
transform: translateX(400px); transform: translateX(400px);
} }
.printer{
.printer {
transform: translateX(0px); transform: translateX(0px);
} }
// 错误提示信息 // 错误提示信息
.start { .start {
.start_img { .start_img {
...@@ -1253,11 +1438,13 @@ ...@@ -1253,11 +1438,13 @@
display: block; display: block;
margin: 0upx auto 102upx; margin: 0upx auto 102upx;
} }
.start_title { .start_title {
font-size: 30upx; font-size: 30upx;
text-align: center; text-align: center;
color: #FFFFFF; color: #FFFFFF;
} }
.start_text { .start_text {
width: 70%; width: 70%;
text-align: center; text-align: center;
......
...@@ -80,7 +80,6 @@ export function _query ({api, params, callBack, resultType = Enums.DataType.JSON ...@@ -80,7 +80,6 @@ export function _query ({api, params, callBack, resultType = Enums.DataType.JSON
} }
/** /**
* 修改 * 修改
* @param {*} * @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] ...@@ -18,10 +18,17 @@ const baseURL = baseApi[accountInfo.miniProgram.envVersion]
const Env = { const Env = {
getDevBaseURL: () => baseURL, getDevBaseURL: () => baseURL,
getBaseURL: () => baseURL, getBaseURL: () => baseURL,
getmachineId: () => '100055', //线上100086 //测试 422001' //100086 getmachineId: () => '100055', //线上100086 //测试 422001' //100086 //100055
getappcode: () => 'lite', getappcode: () => 'lite',
getmalltext: () => "色彩公园Lite", getmalltext: () => "色彩公园Lite",
getAppID: () => "wx1c777ee874c39b0b", getAppID: () => "wx1c777ee874c39b0b",
getcompany: () => "深圳市瑞丰彩科技有限公司" getcompany: () => "深圳市瑞丰彩科技有限公司",
// 跳转--色彩小程序
getappId: () => "wx55b5b6d95c648041",
//getenvVersion: () => "trial",
getenvVersion: () => "release",
} }
export default Env export default Env
\ No newline at end of file
...@@ -7,13 +7,13 @@ const request = new Fly ...@@ -7,13 +7,13 @@ const request = new Fly
* 请求拦截 * 请求拦截
*/ */
request.interceptors.request.use((config, promise) => { request.interceptors.request.use((config, promise) => {
// 超时设置 //超时设置
if (config._timeout) config.timeout = 60000; if (config._timeout) config.timeout = 60000;
// 从环境变量中取 BASE_UR //从环境变量中取 BASE_UR
console.log(process) console.log(process)
if (process.env.NODE_ENV === 'development') config.baseURL = Env.getDevBaseURL() if (process.env.NODE_ENV === 'development') config.baseURL = Env.getDevBaseURL()
else config.baseURL = Env.getBaseURL() else config.baseURL = Env.getBaseURL()
// JSON格式化,未指定时,默认true //JSON格式化,未指定时,默认true
config.parseJson = $n._isNotNull(config.parseJson) ? config.parseJson : true config.parseJson = $n._isNotNull(config.parseJson) ? config.parseJson : true
// 如指定_token == true,则在headers中跟上相关token信息 // 如指定_token == true,则在headers中跟上相关token信息
if (config._token) config.headers['token'] = store.getters.appUser.token; if (config._token) config.headers['token'] = store.getters.appUser.token;
...@@ -27,7 +27,7 @@ request.interceptors.request.use((config, promise) => { ...@@ -27,7 +27,7 @@ request.interceptors.request.use((config, promise) => {
request.interceptors.response.use( request.interceptors.response.use(
(response, promise) => { (response, promise) => {
let data = response.data || {status: false, errorMsg: '服务器未响应结果'} let data = response.data || {status: false, errorMsg: '服务器未响应结果'}
console.warn('####### API Response: ', data) //console.warn('####### API Response: ', data)
if (data.code == 401 || data.code == 403) { if (data.code == 401 || data.code == 403) {
uni.showModal({ uni.showModal({
title: '', title: '',
...@@ -42,7 +42,7 @@ request.interceptors.response.use( ...@@ -42,7 +42,7 @@ request.interceptors.response.use(
(error, promise) => { (error, promise) => {
let msg = $n._caseValue(error.code, 0, '网络连接异常', 1, '网络连接超时', 401, '请求服务未授权', error.msg) let msg = $n._caseValue(error.code, 0, '网络连接异常', 1, '网络连接超时', 401, '请求服务未授权', error.msg)
console.error('####### API Response error: ', error) console.error('####### API Response error: ', error)
if (error.status == 401) { if (error.status == 401 ) {
uni.showModal({ uni.showModal({
title: '', title: '',
content: '登录超时,请重新登录!', content: '登录超时,请重新登录!',
...@@ -51,7 +51,17 @@ request.interceptors.response.use( ...@@ -51,7 +51,17 @@ request.interceptors.response.use(
uni.navigateTo({ url: '/pages/login/login' }) uni.navigateTo({ url: '/pages/login/login' })
} }
}) })
}else if(error.status == 500){
uni.showModal({
title: '',
content: '服务器异常,状态=500' ,
showCancel: false,
})
} else return promise.reject(msg) } else return promise.reject(msg)
} },
) )
export default request export default request
\ No newline at end of file
...@@ -7,7 +7,7 @@ import Env from './Env' ...@@ -7,7 +7,7 @@ import Env from './Env'
const wechat = { const wechat = {
oauth2: ({appid, redirectUri, responseType = 'code', scope = 'snsapi_base', state = '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' 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 window.location.href = oauth2URL
}, },
hashSHA1: (str) => { hashSHA1: (str) => {
...@@ -29,12 +29,12 @@ const wechat = { ...@@ -29,12 +29,12 @@ const wechat = {
let signature = this.hashSHA1(signatureStr) let signature = this.hashSHA1(signatureStr)
jweixin.ready(res => { jweixin.ready(res => {
wechatService.setWxConfigInitStatus(true) wechatService.setWxConfigInitStatus(true)
console.warn('#### wx.ready ####', res) //console.warn('#### wx.ready ####', res)
alert('wx.ready: ' + JSON.stringify(res)) //alert('wx.ready: ' + JSON.stringify(res))
}) })
jweixin.error(res => { jweixin.error(res => {
console.warn('#### wx.error ####', res) //console.warn('#### wx.error ####', res)
alert('wx.error: ' + JSON.stringify(res)) //alert('wx.error: ' + JSON.stringify(res))
}) })
let configData = { let configData = {
// debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。 // debug: false, // 开启调试模式,调用的所有api的返回值会在客户端alert出来,若要查看传入的参数,可以在pc端打开,参数信息会通过log打出,仅在pc端时才会打印。
......
...@@ -172,7 +172,6 @@ class WxTouchEvent { ...@@ -172,7 +172,6 @@ class WxTouchEvent {
this.touchCancel.dispatch(evt); this.touchCancel.dispatch(evt);
} }
_cancelLongTap() { _cancelLongTap() {
clearTimeout(this.longTapTimeout); 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