Commit 8109e487 by huahua

提交

parent 1ef1fc22
......@@ -4,8 +4,13 @@
"style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": true,
"navigationStyle": "custom"
"navigationStyle": "custom" //禁用uni-app默认的头部导航
}
/* "style": {
"navigationBarTitleText": "",
"enablePullDownRefresh": true,
"navigationStyle": "custom"
} */
},
{
"path": "pages/index/machineDetail",
......
......@@ -38,7 +38,7 @@
style="border-left: 1px dashed #43cf7c;position: absolute; height: 100%; z-index: 999;"
:style="{left: ((data.bgWidth / 2) - 0.5) +'px'}"></view>
<view v-if="guide_top"
style="width: 100%; border-top: 1px dashed #43cf7c;position: absolute; z-index: 999;"
style="width: 100%; border-top: 1px dashed #47e5e5;position: absolute; z-index: 999;"
:style="{top: (editory + (data.editorHeight * location_scale - 0.5)) +'px'}"></view>
<!-- 主干 -->
<view :class="['item-list', { 'list-active': data.listActive == true }]"
......@@ -260,7 +260,7 @@
style="text-align: center; font-size: 28upx; font-weight: 500; color: #333333; line-height: 45upx; margin-top: 62upx;">
请选择手机拍摄或尺寸较大的图片<br>以体验最佳冲印效果
</view>
<view @click="selectPicturePop()" style="width: 466upx; height: 82upx; background: #F29F3D; border-radius: 10upx; font-size: 36upx; font-weight: 400;
<view @click="selectPicturePop()" style="width: 466upx; height: 82upx; background: #47e5e5; border-radius: 10upx; font-size: 36upx; font-weight: 400;
color: #FFFFFF; text-align: center; line-height: 82upx; margin: 46upx auto 46upx; ">好的</view>
</view>
</view>
......@@ -274,6 +274,11 @@
</view>
</view>
<!-- 1、增加在线定制站、正在休息-》体验中;
2、关闭官方图库,要同时关掉:贴图素材、智能推荐;
3、关闭上传相片,要同时关掉:上传相片、添加文字、添加涂鸦
4、排队列表,没有打印中状态的,全都是排队中 -->
<!-- 菜单栏目 -->
<view v-if="!active && !guide_left" class="toolRight">
<view class="tool_li">
......@@ -283,12 +288,12 @@
<view class="tool_li_text">历史作品</view>
</view>
<view class="tool_li" @click="showPopup(23)">
<view class="tool_li" @click="showPopup(23)" v-if="is_public == 1">
<image class="tool_li_img" src="../../static/icon_diy_wallpaper.png" mode=""></image>
<view class="tool_li_text">全幅壁纸</view>
</view>
<view class="tool_li" @click="showPopup(2)">
<view class="tool_li" @click="showPopup(2)" v-if="is_public == 1">
<image class="tool_li_img" src="../../static/icon/icon_stickers.png" mode=""></image>
<view class="tool_li_text">贴图素材</view>
</view>
......@@ -298,32 +303,31 @@
<view class="tool_li_text">背景底色</view>
</view>
<view class="tool_li" @click="showone = !showone">
<view class="tool_li" @click="showone = !showone" v-if="diy_upload_menu == 1">
<image @click="cancel('share')" class="tool_li_img"
src="../../static/icon_make_diy_back_color.png" mode=""></image>
<view @click="cancel()" class="tool_li_text">上传相片</view>
</view>
<view class="tool_li" @click="showPopup(3)">
<view class="tool_li" @click="showPopup(3)" v-if="diy_upload_menu == 1">
<image class="tool_li_img" src="../../static/icon_diy_typeface.png"
style="width: 45upx; height: 40upx;" mode=""></image>
<view @click="cancel()" class="tool_li_text">添加文字</view>
</view>
<view class="tool_li" @click="ontuya()" v-if="machine_id">
<view class="tool_li" @click="ontuya()"v-if="diy_upload_menu == 1" >
<image class="tool_li_img" style="width: 62upx; height: 55upx;" src="../../static/icon_tuya.png"
mode=""></image>
<view class="tool_li_text">添加涂鸦</view>
</view>
<view class="tool_li" @click="wallpaperOnclick()" v-if="machine_id">
<view class="tool_li" @click="wallpaperOnclick()" v-if="is_pubilc == 1">
<image class="tool_li_img" style="width: 71upx; height: 59upx;"
src="../../static/randomwallpaper.png" mode=""></image>
<view class="tool_li_text">智能推荐</view>
</view>
<!-- AI图像 -->
<view class="tool_li" @click.stop='showAiChange()'>
<image class="tool_li_img" style="width: 51upx; height: 38upx;"
src="../../static/icon_diy_ai.png" mode=""></image>
......@@ -336,7 +340,6 @@
<view class="tool_li_text">AI画图</view>
</view>
<view class="tool_li" @click.stop="removedeleteItem" v-if="data.itemList.length > 0">
<image class="tool_li_img" style="width: 50upx; height: 50upx;"
src="../../static/diy_icon_middle_default.png" mode=""></image>
......@@ -666,7 +669,6 @@
</view>
</uni-popup>
<switchGoods ref="switchGoods" @selectGoodItem="selectGoodItem"></switchGoods>
<!--商品弹框 -->
......@@ -877,6 +879,8 @@
activeRadio: '现代风', //存的是单选按钮选中的value值
radioGroup: ['现代风', '卡通风', '铅笔画风'],
upLoadImageUrl: "", //上传图片地址
diy_upload_menu:0,
is_public:0
};
},
......@@ -2060,13 +2064,25 @@
machine_id: this.machine_id
}).then(res => {
that.machine_item = res
console.log(res)
//判断配送版
if (res.delivery == 1 && res.machine_category_id == "64") {
//this.key = 1;
this.isComeDelivery = true;
} //key:null,//1直营配送站 2 万能通用版 3色彩自助站
this.support_pay = res.support_pay //单机版是否支付
this.machine_item = res
//that.diy_upload_menu = that.machine_item.diy_upload_menu
//that.support_pay = res.support_pay //单机版是否支付
//that.is_public = res.is_public
this.diy_upload_menu = res.diy_upload_menu;
this.is_public = res.is_public;
this.support_pay = res.support_pay
// 先登陆
uni.login({
provider: 'weixin',
......@@ -4352,6 +4368,24 @@
that.goodslist() // 获取产品详情数据
}
})
homeservice.WorksList({
s: 'machine.detail',
machine_id: this.machine_id
}).then(res => {
this.machine_item = res
this.diy_upload_menu = res.diy_upload_menu;
this.is_public = res.is_public;
this.support_pay = res.support_pay
console.log(this.diy_upload_menu);
console.log(this.is_public);
}).catch(err => {
uni.showToast({
title: err.msg,
icon: 'none'
});
});
},
onShow() {
......@@ -4786,28 +4820,25 @@
.tool_add {
width: 207upx;
background: #F29F3D;
background: #47e5e5;
line-height: 98upx;
text-align: center;
color: #FFFFFF;
box-shadow: 0upx 0upx 16upx 0upx rgba(0, 0, 0, 0.08);
border-radius: 49upx 50upx 0upx 49upx;
font-size: 36upx;
font-weight: 500;
color: #FFFFFF;
margin-left: auto;
/* box-shadow: 0 0 16upx 0 rgba(0, 0, 0, 0.08);
border-radius: 60upx 0 0 5upx; */
}
.grey {
background: #8F8F94 !important;
}
}
// 底部工具栏
//底部工具栏
.tool {
position: fixed;
bottom: 0;
......@@ -4838,7 +4869,7 @@
.tool_add {
width: 210upx;
background: #F56364;
background: #47e5e5;
line-height: 160upx;
text-align: center;
color: #FFFFFF;
......
......@@ -16,7 +16,7 @@
</swiper>
<view style="position: fixed; bottom: 60upx; text-align: center;left: 0; right: 0;">
<view class="dots">
<view v-for="(item, index) in Adlists" class="dot-wrapper" :key="index">
<view v-for="(item, index) in Adlists" class="dot-wrapper" :key="index" >
<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"
......@@ -27,17 +27,13 @@
<view @click="Customize_now" hover-class="hover-class-bg" style="position: fixed; bottom: 130upx; left: 0; right: 0; margin: auto;
width: 300upx; height: 100upx;
background: linear-gradient(92deg, #F29F3D, #F29F3D);
background: linear-gradient(92deg, #47e5e5, #47e5e5);
box-shadow: 0px 19px 48px 1px rgba(20, 31, 62, 0.35);
border-radius: 40px;">
<view
style=" text-align: center; line-height: 100upx; font-size: 36upx; font-weight: 500; color: #FFFFFF;">
立即定制</view>
</view>
<!-- <view @click="toProxyApplet()" v-if="list.is_open_manage == 1"
style="position: fixed; bottom: 35upx; text-align: center;left: 0; right: 0;font-size: 32upx; margin: auto; color: #fff;">
运营中心</view> -->
</view>
<!-- 错误提示信息 -->
......@@ -73,14 +69,13 @@
<view @click="toProxyApplet()" v-if="list.is_open_manage == 1"
style="position: fixed; z-index: 99; right: 0; bottom: 280upx; display: flex;align-items: center;justify-content: center;
width: 100upx; height: 88upx; background: #F29F3D; border-radius: 44upx 0px 0px 44upx;">
width: 100upx; height: 88upx; background: #47e5e5; border-radius: 44upx 0px 0px 44upx;">
<view style="font-size: 24upx; font-weight: 800; color: #FFFFFF;">
<view>运营</view>
<view>中心</view>
</view>
</view>
<switchGoods ref="switchGoods" @selectGoodItem="selectGoodItem"></switchGoods>
<!--//商品弹框 -->
</view>
......@@ -278,7 +273,7 @@
if (res) {
this.list = res;
this.toFirstCheck();
this.myheadtext = this.machine_id + '-' + res.code //头部标题栏
this.myheadtext = this.machine_id//头部标题栏
}
uni.stopPullDownRefresh();
uni.hideLoading();
......
<template>
<view class="full-width full-height">
<!-- <view v-if="system_config.lite_diy.value == 0" @tap="doubleTap" @touchstart="touchStart" @touchend="touchEnd"
style="position: fixed; z-index: 99; right: 0; bottom: 524upx; display: flex;align-items: center;justify-content: center;
width: 100upx; height: 88upx; background: #43cf7c; border-radius: 44upx 0px 0px 44upx;">
<view style="font-size: 24upx; font-weight: 800; color: #FFFFFF;">
<view>定制</view>
<view>体验</view>
<view class="full-width">
<!-- 登录弹框 -->
<Signin ref="Signin"></Signin>
<!-- 自定义头部 -->
<view class='flex commonHead' style="height: 100upx;" :style="{height: titleHeight +'px'}">
<view class='commonHead-wrap flex'>
<view class='commonHead_left' @click="tomine()">
<view class='commonHead_left_back'>
<view class="commonHead_left_back_img">
<image src="../../static/icon_mall_zuoshang.png" style="width: 50upx;
height: 50upx;
margin-top: 10upx; " mode="aspectFill"></image>
</view>
</view>
</view>
<view class='commonHead_right flex'>
<view class='commonHead_right_text line1'>色彩小商品</view>
</view>
</view>
</view>
</view> -->
<!-- 无设备 -->
<view v-if="long && LoupanList.length == 0">
<view style="display: flex; justify-content: center;" :style="{height: 'calc(100% - ' + titleHeight +'px)'}">
<view v-if="long && LoupanList.length == 0" >
<view style="display: flex; justify-content: center; height: 100%;">
<view style="margin-top: 231upx;">
<image src="../../static/icon_diy.png" mode="" style="width: 513upx; height: 251upx;"></image>
<view class="start_title" style="margin-top: 120upx;">定制站必须扫码才能使用</view>
<image src="../../static/icon_diy.png" mode="" style="width: 500upx; height: 245upx;"></image>
<view class="start_title" style="margin-top: 60upx; color: #FFFFFF; width: 100%; text-align: center;">定制站必须扫码才能使用</view>
</view>
</view>
<!-- 扫码定制 -->
<view @click="scanning" style="width: 460upx; position: fixed; bottom: 180upx; margin: auto;
height: 164upx; background: #FAD9B1 ; left: 0; right: 0; z-index: 99; border-radius: 20upx;
display: flex; align-items: center;">
<view style="background: #FFFFFF;width: 120upx;
<view @click="scan1" style="width: 460upx; position: fixed; bottom: 100upx; margin: auto;
height: 164upx; background: #47E5E5; left: 0; right: 0; z-index: 99; border-radius: 20upx; display: flex; align-items: center;">
<view style="width: 120upx;
height: 120upx;border-radius: 50%; margin: 22upx 30upx;text-align: center;">
<image style="height: 61upx; width: 61upx;margin:32upx auto;" src="../../static/icon_saoyisao.png" mode=""></image>
<image style="height: 61upx; width: 61upx;margin:32upx auto;" src="../../static/icon_saoyisao.png"
mode=""></image>
</view>
<view style="color: #333333 ; font-weight: bold;font-size: 33upx;">开始扫码定制</view>
<view style="color: #000; font-size: 36upx;">开始扫码定制</view>
</view>
</view>
<!-- 有设备 -->
<view v-if= "long && LoupanList.length > 0" >
<view style="margin-top: 50upx;">
<view style="width: 690upx; margin:30upx auto 30upx; display: flex; ">
<view v-if="LoupanList.length > 0">
<view style="margin-top: 25upx;">
<view style="width: 690upx; margin:0upx auto 30upx; display: flex;">
<view>
<view style="position: relative; width: 320upx; height: 160upx;" @click="order()">
<image src="../../static/mine/dingdan@3x.png"
<image src="../../static/mine/dingdan@3x.png" mode=""
style="width: 320upx; height: 160upx; position: absolute;z-index: -1;"></image>
<view
style="margin-left:26upx; padding-top: 27upx; font-size: 36upx; color: #fff;font-weight: bold;">
style="margin-left:26upx; padding-top: 27upx; font-size: 36upx; color: #FFFFFF;font-weight: bold;">
订单</view>
<view style="margin-top: 15upx;margin-left:26upx;font-size: 24upx;
font-weight: 400; color: #fff;">我的定制</view>
font-weight: 400; color: #FFFFFF;">我的定制</view>
</view>
<view style="margin-top: 16upx; position: relative;width: 320upx; height: 160upx;"
@click="coupons()">
<image src="../../static/mine/huayihua@3x.png" mode=""
style="width: 320upx; height: 160upx; position: absolute;z-index: -1;"></image>
<view
style="margin-left:26upx; padding-top: 27upx; font-size: 36upx; color: #fff;font-weight: bold;">
style="margin-left:26upx; padding-top: 27upx; font-size: 36upx; color: #FFFFFF;font-weight: bold;">
滑一滑</view>
</view>
</view>
......@@ -59,45 +67,40 @@
<image src="../../static/mine/wo@3x.png" mode=""
style="width: 350upx; height: 340upx; position: absolute;z-index: -1;"></image>
<view
style="margin-left:30upx; padding-top: 39upx; font-size: 36upx; color: #fff;font-weight: bold;">个人中心</view>
style="margin-left:30upx; padding-top: 39upx; font-size: 36upx; color: #FFFFFF;font-weight: bold;">个人中心</view>
<view style="margin-top: 15upx;margin-left:30upx;font-size: 24upx;
font-weight: 400; color: #fff;">更多作品更多精彩</view>
font-weight: 400; color: #FFFFFF;">更多作品更多精彩</view>
</view>
</view>
<!-- 附近定制站 -->
<view style="font-size: 36upx; margin-top: 40upx; margin-left: 40upx; font-weight: bold; color: #000;">附近定制站</view>
<view style="width: 690upx; margin: 30upx auto 0; background: #EEE; border-radius: 10upx;">
<view style="font-size: 36upx; margin-top: 40upx; margin-left: 40upx; font-weight: bold; color: #FFFFFF;">在线定制站</view>
<view style="width: 690upx; margin: 30upx auto 0; background: #131319; border-radius: 10upx;">
<view v-for="(item, index) in LoupanList" :key="index" @click="goMachineDetail(item)">
<view v-if="index != 0" style="width: 689upx; height: 1upx; background: #CCCCCC; opacity: 0.1;">
</view>
<view style="height: 160upx; display: flex; align-items: center; padding: 29upx 20upx 30upx 19upx;">
<image
style="width: 160upx; height: 164upx; margin: 0upx 21upx 0upx 0upx; border-radius: 10upx;"
mode="aspectFill" :src="item.image + '?x-oss-process=image/resize,lfit,w_375'"></image>
style="width: 150upx; height: 143upx; margin: 0upx 21upx 0upx 0upx; border-radius: 10upx;"
mode="aspectFill" :src="item.image + '?x-oss-process=image/resize,lfit,w_164'"></image>
<view style="width: calc(100% - 281upx);">
<view style="margin: -10upx 0 10upx; font-size: 32upx; font-weight: 500; color: #000;
<view style="font-size: 36upx; font-weight: 500; color: #FFFFFF; opacity: 0.4;">
{{item.id}}
</view>
<view style="margin: 5upx 0 7upx; font-size: 32upx; font-weight: 500; color: #FFFFFF;
width: 80%; white-space: nowrap; text-overflow: ellipsis; overflow: hidden; word-break: break-all;"
:style="{opacity:item.status.value == 1 || item.status.value == 2 ? '1' : '1'}">
:style="{opacity:item.status.value == 1 || item.status.value == 2 ? '0.4' : '0.4'}">
{{item.short_name || ''}}
</view>
<view style="font-size: 24upx; font-weight: 500; color: #666; opacity: 0.4;">
<view style="font-size: 24upx; font-weight: 500; color: #FFFFFF; opacity: 0.4;">
营业时间:{{item.start_time || ''}}-{{item.end_time || ''}}
</view>
</view>
<view @click="goMachineDetail(item)" v-if="item.distance"
style="width: 170upx;">
<text v-if="item.status.value == 0" class="statuslist"
style="background:#F2A03E;">正在休息</text>
<text v-if="item.status.value == 1" class="statuslist"
style="background:#5CE6B5;">正在定制</text>
<text v-if="item.status.value == 2" class="statuslist"
style="background:#5CE6B5;">正在定制</text>
<text v-if="item.status.value == 3" class="statuslist"
style="background:#F2A03E;">正在休息</text>
<text v-if="item.status.value == 4" class="statuslist"
style="background:#F2A03E;">正在休息</text>
<text v-if="item.status.value == 5" class="statuslist"
style="background:#F2A03E;">正在休息</text>
<view style="width: 170upx;">
<text class="statuslist"
style="background:#5FE4B6;">体验中</text>
</view>
</view>
</view>
......@@ -105,44 +108,194 @@
</view>
</view>
<!-- 登录弹框 -->
<Signin ref="Signin"></Signin>
</view>
</template>
<script>
import Env from '@/util/Env.js';
import userService from '@/service/UserService';
import Signin from './Signin.vue';
import homeservice from '@/service/homeservice.js';
import Signin from './Signin.vue';
import FrImage from '@/components/fr-image/fr-image.vue';
var pixelRationum = null;
export default {
components: {
Signin
},
computed: {
Signin,
FrImage
},
computed: {},
data() {
return {
titleHeight: 0,
titleHeight: null,
long: false,
LoupanList: [],
newOrderlist: null,
isShow: true, //是否已经弹出
animMaind: {}, //旋转动画
animMain: {}, //旋转动画
animAdd: {}, //item位移,透明度
animDelLots: {}, //item位移,透明度
animstart: false,
bganimstart: false,
touchStartTime: null,
touchEndTime: null,
lastTapTime: null,
currentSwiper: 0,
imgheights: [],
imageLoadstate: false,
system_config: null,
LoupanList:[],
long:false
portraitUrl: null //头像地址
};
},
methods: {
//设备详情
goMachineDetail(item) {
scan1() {
let that = this;
uni.scanCode({
success: function(res) {
console.log(res)
if (res.scanType == 'QR_CODE') {
if (that.getQueryString(res.result, 'machine_id') && that.getQueryString(res.result, 'machine_id') != "") {
uni.navigateTo({
url: '../index/machineDetail?machine_id=' + item.id
url: '../index/machineDetail?machine_id=' + that.getQueryString(res.result, 'machine_id')
});
} else {
uni.showToast({
title: '扫码未能识别色彩站,请检查二维码',
icon: 'none',
duration: 2000
});
}
} else {
if (res.path) {
if (that.getQueryString(res.path, 'machine_id') && that.getQueryString(res
.path, 'machine_id') != "") {
uni.navigateTo({
url: '../index/machineDetail?machine_id=' + that
.getQueryString(res.path, 'machine_id')
});
} else {
uni.showToast({
title: '扫码未能识别色彩站,请检查二维码',
icon: 'none',
duration: 2000
});
}
} else {
uni.showToast({
title: '扫码未能识别色彩站,请检查二维码',
icon: 'none',
duration: 2000
});
}
}
},
fail: function(err) {
//console.log(err)
},
});
},
//调转色彩公园优惠券
toCoupon(item) {
},
imageLoad(e) {
//获取图片真实宽度
var imgwidth = e.detail.width,
imgheight = e.detail.height,
//宽高比
ratio = imgwidth / imgheight;
//计算的高度值
var viewHeight = 750 / ratio;
var imgheight = viewHeight
var imgheights = this.imgheights
//把每一张图片的高度记录到数组里
imgheights[e.target.dataset['index']] = imgheight; // 改了这里 赋值给当前 index
this.imgheights = imgheights
this.setData({
imgheights: imgheights
})
this.imageLoadstate = true
},
//轮播图
toJump(item) {
if (item.appid && item.go_url) {
var url = this.$Env.getBaseURL();
var envVersionName = "trial";
if (url.indexOf("colorpark") != -1) {
envVersionName = "release";
}
wx.navigateToMiniProgram({
appId: item.appid,
path: item.go_url || '/pages/index/mall',
extraData: {
foo: 'bar'
},
envVersion: envVersionName,
success(res) {
// 打开成功
}
})
} else if (item.go_url) {
uni.navigateTo({
url: './start-up?machine_id=' + item.go_url.split('=')[1]
})
}
},
swiperChange(e) {
this.currentSwiper = e.detail.current
},
experience() {
uni.navigateTo({
url: '../mall/experience'
})
},
tomyorder() { //订单列表
uni.navigateTo({
url: '../mine/myorder'
})
},
toLocation(item) {
uni.navigateTo({
url: '../mall/start-up?machine_id=' + item.id
});
},
getQueryString(url, name) {
var reg = new RegExp('(^|&|/?)' + name + '=([^&|/?]*)(&|/?|$)', 'i')
var r = url.substr(1).match(reg)
if (r != null) {
return r[2]
}
return null;
},
setData(obj) {
let that = this;
let keys = [];
let val, data;
Object.keys(obj).forEach(function(key) {
keys = key.split('.');
val = obj[key];
data = that.$data;
keys.forEach(function(key2, index) {
if (index + 1 == keys.length) {
that.$set(data, key2, val);
} else {
if (!data[key2]) {
that.$set(data, key2, {});
}
}
data = data[key2];
})
});
},
......@@ -160,7 +313,7 @@
},
envVersion: envVersionName,
success(res) {
//打开成功
// 打开成功
}
})
},
......@@ -180,7 +333,7 @@
},
envVersion: envVersionName,
success(res) {
// 打开成功
}
})
},
......@@ -198,72 +351,6 @@
}
})
},
getQueryString(url, name) {
var reg = new RegExp('(^|&|/?)' + name + '=([^&|/?]*)(&|/?|$)', 'i')
var r = url.substr(1).match(reg)
if (r != null) {
return r[2]
}
return null;
},
scanning() {
if (!this.$AppContext.checkLogin()) {
this.tologo('navigateTo')
} else {
let that = this;
/*允许从相机和相册扫码
QR_CODE 普通二维码
WX_CODE 小程序二维码
生成二维码链接
*/
uni.scanCode({
success: function(res) {
console.log(res)
if (res.scanType == 'QR_CODE') {
if (that.getQueryString(res.result, 'machine_id')) {
uni.navigateTo({
url: '../index/machineDetail?machine_id=' + that.getQueryString(
res.result, 'machine_id')
});
} else {
uni.showToast({
title: '扫码未能识别色彩站,请检查二维码',
icon: 'none',
duration: 2000
});
}
} else {
if (res.path) {
if (that.getQueryString(res.path, 'machine_id')) {
uni.navigateTo({
url: '../index/machineDetail?machine_id=' + that
.getQueryString(res.path, 'machine_id')
});
} else {
uni.showToast({
title: '扫码未能识别色彩站,请检查二维码',
icon: 'none',
duration: 2000
});
}
} else {
uni.showToast({
title: '扫码未能识别色彩站,请检查二维码',
icon: 'none',
duration: 2000
});
}
}
},
fail: function(err) {
console.log(err)
},
});
}
},
// 防止重复点击
touchStart(e) {
this.touchStartTime = e.timeStamp;
......@@ -281,45 +368,19 @@
this.lastTapTime = currentTime;
// 如果两次点击时间在300毫秒内,则认为是双击事件
if (currentTime - lastTapTime > 300) {
// console.log('防止重复点击')
if (!this.$AppContext.checkLogin()) {
this.tologo('navigateTo')
} else {
//this.showOrHide()
//uni.navigateTo({url: '/pages/index/index?goods_id=21'})
uni.navigateTo({
url: '../index/machineDetail?machine_id=' + this.$Env.getmachineId()
url: '../index/machineDetail?machine_id=' + this.$Env.getmachineId() + '&worksid=0'
});
}
}
}
},
tologo(e) {
//先登陆
let that = this;
uni.login({
provider: 'weixin',
success: (res) => {
userService.login({
s: 'Init.init',
code: res.code,
appcode: that.$Env.getappcode()
}).then(r => {
if (e == 'navigateTo') {
uni.navigateTo({
url: '../mall/machineDetail?machine_id=' + that.$Env
.getmachineId() + '&worksid=0'
});
}
}).catch(err => {
that.$refs.Signin.init()
});
},
fail: (res) => {
uni.showToast({
title: res.msg,
icon: 'none'
})
}
});
},
//加载数据
loadGoodsList() {
......@@ -345,6 +406,84 @@
});
},
getSetting() {
this.loadGoodsList()
},
// 获取用户的地理位置,
getAuthorize() {
this.loadGoodsList()
},
// 用户授权
getAuthorize() {
const that = this
uni.authorize({
scope: 'scope.userLocation',
success(res) {
that.getLocation()
},
// 授权失败
fail(err) {
uni.showModal({
title: '提示',
content: '请授权位置获取附近的商家!',
showCancel: false,
confirmText: '确认授权',
success() {
uni.openSetting({
success(res) {
//console.log(res)
that.getAuthorize()
},
fail(err) {
//console.log(err)
}
})
}
})
}
})
},
// 设备详情
goMachineDetail(item) {
uni.navigateTo({
url: '../index/machineDetail?machine_id=' + item.id + '&worksid=0'
});
},
tologo(e) {
// 先登陆
let that = this;
uni.login({
provider: 'weixin',
success: (res) => {
userService.login({
s: 'Init.init',
code: res.code
}).then(r => {
if (e == 'navigateTo') {
uni.navigateTo({
url: '../index/machineDetail?machine_id=' + that.$Env.getmachineId() + '&worksid=0'
/* url: './start-up?machine_id=' + that.$Env.getmachineId() +
'&worksid=0' */
});
}
}).catch(err => {
that.$refs.Signin.init()
//uni.showToast({title: err.msg,icon: 'none'})
});
},
fail: (res) => {
// uni.showToast({
// title: res.msg,
// icon: 'none'
// })
}
});
},
systemConfig() {
var _this = this
wx.request({
......@@ -372,46 +511,55 @@
})
}
},
// 下拉加载
//下拉加载
onPullDownRefresh() {
uni.showLoading({
title: '正在刷新中...',
mask: true
})
this.systemConfig()
this.loadGoodsList();
},
// 上拉加载
//上拉加载
onReachBottom() {},
// 滑动
//滑动
onPageScroll(t) {},
// 分享好友
//分享好友
onShareAppMessage() {
return {
title: this.$Env.getmalltext(),
title: '',
imageUrl: '',
path: '',
success: (res) => {},
}
},
//分享朋友圈
// 分享朋友圈
onShareTimeline() {
return {
title: this.$Env.getmalltext(),
title: '',
imageUrl: '',
path: '',
query: 'kjbfrom=pyq'
}
},
onLoad(options) {
this.getSetting() // 获取附近店铺
let app = uni.getSystemInfoSync();
//胶囊信息
let menuButtonInfo = uni.getMenuButtonBoundingClientRect();
this.titleHeight = app.statusBarHeight + menuButtonInfo.height + (menuButtonInfo.top - app.statusBarHeight) * 2
if (options.q) { // 分销系统 获取二维码的携带的链接信息
let qrUrl = decodeURIComponent(options.q)
let promoter_id = qrUrl.replace(/[^0-9]/ig, "")
this.$base.promoter_id = promoter_id
}
this.loadGoodsList();
var appUser = userService.getCacheUserInfo();
if (appUser != null) {
this.portraitUrl = appUser.portrait
}
},
onShow() {
this.systemConfig()
let app = uni.getSystemInfoSync();
//胶囊信息
let menuButtonInfo = uni.getMenuButtonBoundingClientRect();
this.titleHeight = app.statusBarHeight + menuButtonInfo.height + (menuButtonInfo.top - app.statusBarHeight) * 2
//this.phone_mall()
}
};
</script>
......@@ -419,21 +567,48 @@
<style lang="scss">
@import "./css/main.css";
ec-canvas {
width: 100%;
height: 100%;
}
page {
background: #ffffff !important;
background: #282932 !important;
width: 100%;
margin: 0;
padding: 0;
}
.start_title {
text-align: center;
font-size: 36upx;
font-weight: 400;
color: #333333;
line-height: 20upx;
.qiun-columns {
display: flex;
flex-direction: column !important;
}
.qiun-charts {
width: 750upx;
height: 500upx;
background-color: #FFFFFF;
}
.charts {
width: 750upx;
height: 500upx;
background-color: #FFFFFF;
}
.imgSrcstate {
position: absolute;
width: 100%;
right: -900px;
top: -600px;
display: none;
}
.imgSrcdisplay {
z-index: 0 !important;
}
.statuslist {
font-size: 23upx;
padding: 8upx 20upx 8upx 20upx;
......@@ -442,5 +617,74 @@
color: #FFFFFF;
}
.start {
.start_img {
width: 513upx;
height: 251upx;
display: block;
margin: 0upx auto 102upx;
}
.start_title {
font-size: 30upx;
text-align: center;
color: #FFFFFF;
}
.start_text {
width: 70%;
text-align: center;
font-size: 28upx;
font-family: Source Han Sans CN;
font-weight: 400;
color: #888888;
margin: 22upx auto 0;
line-height: 28upx;
}
}
//悬浮按钮
.buttom {
position: fixed;
bottom: 30upx;
margin: auto;
left: 0;
right: 0;
z-index: 99;
width: 120upx;
height: 120upx;
border-radius: 50%;
font-size: 36upx;
text-align: center;
line-height: 120upx;
font-weight: 800;
color: #FFFFFF;
background: linear-gradient(to right, #834DC4, #1983D7);
}
.canbutton {
color: #23b7cb;
font-size: 15px;
padding: 5px 15px;
border: 1px transparent solid;
border-radius: 30px;
position: relative;
width: 140upx;
margin: 40upx auto 0;
background: #282932;
text-align: center;
}
.canbutton:after {
content: '';
position: absolute;
top: -3px;
bottom: -3px;
left: -3px;
right: -3px;
background: linear-gradient(to right, #834DC4, #1983D7);
border-radius: 30px;
content: '';
z-index: -1;
}
</style>
\ No newline at end of file
......@@ -3,7 +3,7 @@
style=" position: absolute; top: 0; width: 100%; height: 100%; display: flex; flex-direction: column; "
@click="closeView()">
<view style="position: absolute; top: 0; width: 100%; height: 100%; background: #999999; z-index: 999; opacity: 0.5; "></view>
<view style="position: absolute; top: 0; width: 100%; height: 100%; background: #999999; z-index: 999; opacity: 0.5;"></view>
<view style=" position: absolute;
top: calc(50% - 420upx);
......@@ -15,23 +15,6 @@
justify-content: center;
z-index: 999;">
<!-- <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>
<view style="text-align: center; font-size: 24upx; width: 100%;
color:#333; position: absolute; bottom: 20upx; ">
{{item !=null ? item.name : ''}}
</view>
</view>
</view>
</scroll-view> -->
<swiper class="swiper-block" :indicator-dots="false" :autoplay="false" :interval="3000" :duration="1000"
circular='false' previous-margin='80rpx' next-margin='80rpx' :current="currentIndex"
@change="swiperChangeGood">
......@@ -43,10 +26,13 @@
mode="widthFix">
</image>
</view>
<view
style="width: 100%;font-size: 28upx;color: #333333;text-align: center; position: absolute; bottom: 100upx; z-index: 999; ">
<view style="width: 100%;font-size: 28upx;color: #333333;text-align: center; position: absolute; bottom: 100upx; z-index: 999;">
{{item !=null ? item.name : ''}}
</view>
<!-- <view @click="cutom"
style="width: 100%;font-size: 32upx;color: #5CE6B5;text-align: center; position: absolute; bottom: 35upx; z-index: 999;">
自定义尺寸
</view> -->
</swiper-item>
</swiper>
</view>
......@@ -162,7 +148,7 @@
}
.slide-image {
height: calc(100% - 100upx);
height: calc(100% - 90upx);
width: 520upx;
border-radius: 20upx;
z-index: 1;
......
<template>
<view class="colletion full-width">
<myhead :worksid="works_id" :title="'排队列表'" :color="'#131319'" :titleShow="true" :backShow="true":background="'#fff'"></myhead>
<view class="uni-tab-bar full-width">
<view class="content full-width" scroll-y :style="{ marginTop : headheight + 'px'}">
<view v-if="LoupanList.length == 0 && stateindex == true ">
......@@ -18,7 +16,6 @@
<view v-else v-for="(designer, index) in LoupanList" :key="index" style=" width: 690upx;
margin: 20upx auto; border-radius: 10upx; " @click="self_help_payment(designer)"
:style="{background: designer.status.value == 1 ? '#ffffff' :'#EEEEEE;'}">
<view style=" display: flex; align-items: center;">
<view v-if="designer.user_id != userId"
style="margin:20upx 20upx;width: 140upx; height: 140upx; position: relative; overflow: hidden; opacity: 0.3; ">
......@@ -27,15 +24,12 @@
<image style="width: 70upx; height: 70upx; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
margin: auto; z-index:2;" :src="designer.works_image + '?x-oss-process=image/resize,lfit,w_300'"mode="aspectFit"></image>
</view>
<view v-if="designer.user_id == userId"
style="margin:20upx 20upx;width: 140upx; height: 140upx; position: relative; overflow: hidden; ">
<view style="width: 100%; height: 100%;border-radius: 20upx; background: #FFFFFF;"></view>
<!-- :src="designer.front_image_old" mode="aspectFit"></image> -->
<image style="width: 70upx; height: 70upx; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
margin: auto; z-index:2;" :src="designer.works_image + '?x-oss-process=image/resize,lfit,w_300'"mode="aspectFit"></image>
</view>
<view style="width: calc(100% - 330upx);">
<view style="width: 90%;font-size: 28upx;">
<text style="font-size: 36upx;">{{designer.id || ''}}</text>
......@@ -44,21 +38,18 @@
{{designer.goods_specs || ''}}
</view>
</view>
<view v-if="designer.status.value == 1" style="width: 136upx; height: 60upx;background: #F29F3D;opacity: 0.86;border-radius: 30px; margin-top: 40upx;">
<view v-if="designer.status.value == 1" style="width: 136upx; height: 60upx;background: #47e5e5;opacity: 0.86;border-radius: 30px; margin-top: 40upx;">
<view style="text-align: center; font-size: 26upx; color: #FFFFFF; line-height: 60upx;"> 打印中
</view>
</view>
<view v-else style="width: 136upx; height: 60upx;border-radius: 30upx;margin-top: 40upx;">
<view style="text-align: center; font-size: 26upx; color: #F6BE36; line-height: 60upx;"> 排队中
<view style="text-align: center; font-size: 26upx; color: #47e5e5; line-height: 60upx;"> 排队中
</view>
</view>
</view>
</view>
</view>
<view v-if="sighstate">
<view style="position: fixed; z-index:999; width: 100%; height: 100%; background:rgba(0,0,0,0.6); top: 0;"
@click.stop="sighstate = false"></view>
......@@ -67,7 +58,7 @@
display: flex; align-items: center; justify-content: center;">
<view style="position: absolute;
top: 0; right: 0;" @click="sighstate = false">
<image src="../../static/icon_guanbi.png" mode=""
<image src="../../static/icon_guanbi.png"
style="width: 26upx; height: 26upx; padding: 12upx 22upx;"></image>
</view>
<view style="width: 558upx;">
......@@ -75,25 +66,20 @@
width: 500upx;
height: 350upx;
position: relative; margin: auto;">
<view style="width: 400upx; height: 300upx; display: flex; border: 1px solid #F6BE36;
<view style="width: 400upx; height: 300upx; display: flex; border: 1px solid #47e5e5;
box-shadow: 0 0 20px #ccc; border-radius: 10upx;">
<view style="width: calc(100% / 4); height: 100%;" v-for="item in 4" :key="a">
<!-- <image style="width: 100%; height: 100%;position: absolute;
top: 0; left: 0; right: 0; bottom: 0;
margin:auto; z-index: 1;" :src="designer.front_image_old" mode="aspectFit"></image> -->
<image style="width: 36%; height: 36%; position: absolute;
top: 0; left: 0; right: 0; bottom: 0;
margin: auto; z-index:1;" :src="designer.works_image + '?x-oss-process=image/resize,lfit,w_300'"
mode="aspectFit"></image>
<!-- <image style="width: 100%; height: 100%;position: absolute;
top: 0; left: 0; right: 0; bottom: 0;
margin:auto; z-index: 2;" :src="designer.front_image" mode="aspectFit"></image> -->
</view>
</view>
</view>
<view style="text-align: center; font-size: 36upx; margin-top: 58upx;">作品排队中</view>
<view v-if="designer.status.value == 1" style="text-align: center; font-size: 36upx; margin-top: 58upx;">作品排队中</view>
<view v-if="designer.status.value != 1" style="text-align: center; font-size: 36upx; margin-top: 58upx;">作品排队中</view>
<view style="text-align: center; font-size: 36upx;">如需要打印可与客服确认</view>
<view v-if="designer.user_id == userId " @click="toOrderDetail(designer)" style="width: 135upx; height: 50upx;background: #F6BE36;
<view v-if="designer.user_id == userId " @click="toOrderDetail(designer)" style="width: 135upx; height: 50upx;background: #47e5e5;
border-radius: 40upx;
color: #FFFFFF;
margin:10upx auto;
......@@ -104,71 +90,6 @@
</view>
</view>
<!-- 提示 -->
<!-- <view v-if="sighstate">
<view style="position: fixed; z-index:999; width: 100%; height: 100%; top: 0; background:rgba(0,0,0,0.6); justify-content: center;"
@click.stop="sighstate = false"></view>
<view style="position: fixed; z-index: 1000; top: 52%; left: 50%; right: 0; margin: auto; transform: translate(-50%, -50%);
width: 558upx; height: 650upx; background: #FFFFFF; border-radius: 10upx;
display: flex; align-items: center; justify-content: center;">
<view style="position: absolute;
top: 0; right: 0;" @click="sighstate = false">
<image src="../../static/icon_guanbi.png" mode=""
style="width: 26upx; height: 26upx; padding: 20upx; "></image>
</view>
<view v-if=" designer.goods_name == '马卡龙' " style="width: 558upx; margin-top: 60upx; ">
<view style="display: flex; align-items: center; justify-content: center;
width: 500upx; height: 340upx; position: relative; margin: auto;">
<view style="width: 100%; height: 100%; display: flex; border: 1px solid #09BB07;">
<view style="width: calc(100% / 4); height: 100%;" v-for="item in 4" :key="a">
<view v-for="item in 3" :key="b"
style="width: 100%; height: calc(100% / 3); position: relative; overflow: hidden;">
<image style="width: 100%; height: 100%;position: absolute;
top: 0; left: 0; right: 0; bottom: 0;
margin:auto; z-index: 1;" :src="designer.front_image_old" mode="aspectFit"></image>
<image style="width: 36%; height: 36%; position: absolute;
top: 0; left: 0; right: 0; bottom: 0;
margin: auto; z-index:1;" :src="designer.works_image + '?x-oss-process=image/resize,lfit,w_300'"
mode="aspectFit"></image>
<image style="width: 100%; height: 100%;position: absolute;
top: 0; left: 0; right: 0; bottom: 0;
margin:auto; z-index: 2;" :src="designer.front_image" mode="aspectFit"></image>
</view>
</view>
</view>
</view>
<view style="text-align: center; font-size: 36upx; margin-top: 58upx;">作品排队中</view>
<view style="text-align: center; font-size: 36upx;">如需要打印可与客服确认</view>
<view v-if="designer.user_id == userId " @click="toOrderDetail(designer)" style="width: 135upx; height: 55upx;background: #E7BC15;
border-radius: 40upx;
color: #FFFFFF;
margin:10upx auto;
text-align: center;
padding:auto;
padding-top: 15upx;">查看详情</view>
</view>
<view v-if=" designer.goods_name != '马卡龙' "
style="width: 558upx;">
<view style="display: flex; align-items: center; justify-content: center;
width: 100%; height: 360upx; ">
<image :src="designer.works_image + '?x-oss-process=image/resize,lfit,w_100'" mode="aspectFit" style="width:100upx; "></image>
</view>
<view style="text-align: center; font-size: 36upx; margin-top: 58upx;">作品排队中</view>
<view style="text-align: center; font-size: 36upx;">如需要打印可与客服确认</view>
<view v-if="designer.user_id == userId " @click="toOrderDetail(designer)" style="width: 135upx; height: 55upx;background: #E7BC15;
border-radius: 40upx;
color: #FFFFFF;
margin:10upx auto;
text-align: center;
padding:auto;
padding-top: 15upx;">查看详情</view>
</view>
</view>
</view> -->
</view>
</view>
</template>
......@@ -244,25 +165,9 @@
machine_id: this.queryPage.machine_id,
s: 'machine.newDetail',
}).then(res => {
/* if (designer.status.value == 1) {
if (designer.goods_name == "马卡龙") {
this.clearIntervalTime()
uni.navigateTo({
url: '../mine/self_help_payment_details?orderId=' + designer.order_id +
'&type=' + this.key + '&machine_id=' + this.queryPage.machine_id
})
} else {
uni.navigateTo({
url: '../mine/self_help_payment_details_new?orderId=' + designer
.order_id +
'&type= 2' + '&machine_id=' + this.queryPage.machine_id
})
}
} else { */
if (this.sighstate == true) return;
this.designer = designer
this.sighstate = true
/* } */
}).catch(err => {
uni.showToast({
title: '设备休息中',
......@@ -312,7 +217,6 @@
//数据加载状态处理 false
this.dataLoadState.pullDownRefresh = false;
this.dataLoadState.reachBottom = false;
this.stateindex = true
// uni.hideLoading();
}).catch(err => {
......
static/icon_diy.png

50.5 KB | W: | H:

static/icon_diy.png

40.2 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

756 Bytes | W: | H:

static/icon_saoyisao.png

198 Bytes | W: | H:

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

37.3 KB | W: | H:

static/liebiao.png

18.2 KB | W: | H:

static/liebiao.png
static/liebiao.png
static/liebiao.png
static/liebiao.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -18,7 +18,7 @@ const Env = {
getBaseURL: () => baseURL,
getmachineId: () => '100055', //线上111001
getappcode: () => 'lite',
getmalltext: () => "色彩公园Lite",
getmalltext: () => "色彩小商品",
getAppID: () => "wx1c777ee874c39b0b",
getcompany: () => "深圳市瑞丰彩科技有限公司",
//跳转--色彩小程序
......
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