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": {
......
<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>
...@@ -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 {
......
...@@ -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