Commit 9cdf6526 by huahua

修改壁纸图片大小

parent 29f3deec
......@@ -7,7 +7,6 @@
num:0
},
onLaunch: function() {
// console.log('App Launch');
// 字体列表
homeservice.queryList({
s: 'Material.fontFamilyList'
......@@ -51,7 +50,6 @@
})
that.$base.typefacedata = that.globalData.typefacedata
if(that.globalData.num == that.globalData.typefacedata.length){
// console.log("加载字体耗时 "+ (new Date().getTime() - t1) +" 毫秒")
that.$base.typefacedata = that.globalData.typefacedata
}
that.globalData.num = 0
......@@ -63,7 +61,6 @@
});
},
onShow: function() {
console.log('App Show');
//调用监听网络状态的方法
wx.getNetworkType({
success: function(res) {
......@@ -78,7 +75,7 @@
})
},
onHide: function() {
console.log('App Hide');
//console.log('App Hide');
}
};
</script>
......
......@@ -73,10 +73,12 @@
},
methods: {
hide() {
//console.log("隐藏")
if (this.mode === 'insert' && this.position === 'middle') return;
this.$emit('hidePopup');
},
closeMask() {
//console.log("隐藏")
if (this.mode === 'insert') {
this.$emit('hidePopup');
}
......
{
"pages": [
/*{
"path": "pages/index/mall",
"style": {
"navigationBarTitleText": "色彩高尔夫",
// "navigationStyle":"custom",//禁用uni-app默认的头部导航
"enablePullDownRefresh": true
}
}, */
"pages": [{
"path": "pages/index/mall",
"style": {
"navigationBarTitleText": "",
// "navigationStyle":"custom",//禁用uni-app默认的头部导航
"enablePullDownRefresh": true,
"navigationStyle": "custom"
}
},
/*{
"path": "pages/index/machineDetail",
"style": {
......@@ -19,7 +19,7 @@
{
"path": "pages/index/machineDetail",
"style": {
"navigationBarTitleText": "高尔夫定制",
"navigationBarTitleText": "",
"navigationStyle": "custom" //禁用uni-app默认的头部导航
}
......@@ -27,7 +27,7 @@
{
"path": "pages/index/index",
"style": {
"navigationBarTitleText": "高尔夫定制",
"navigationBarTitleText": "",
"navigationStyle": "custom" //禁用uni-app默认的头部导航
}
......@@ -52,34 +52,35 @@
{
"root": "pages/mall",
"pages": [
{
"path": "lineUp",
"style": {
"navigationBarTitleText": "排队列表",
"enablePullDownRefresh": true,
"navigationStyle": "custom"
"navigationStyle": "custom"
}
}
]
},
{
"root": "pages/mine",
"pages": [
{
"pages": [{
"path": "self_help_payment_details",
"style": {
"navigationBarTitleText": "打印"
"navigationBarTitleText": "打印",
"navigationStyle": "custom"
}
},
{
"path": "self_help_payment_details_new",
"style": {
"navigationBarTitleText": "打印"
"navigationBarTitleText": "打印",
"navigationStyle": "custom"
}
},
{
"path": "order",
"style": {
......
<template>
<view v-if="showPopup" class="uni-popup" @touchmove.stop.prevent="clear">
<uni-transition :mode-class="['fade']" :styles="maskClass" :duration="duration" :show="showTrans" @click="onTap" />
<uni-transition :mode-class="ani" :styles="transClass" :duration="duration" :show="showTrans" @click="onTap">
<uni-transition :mode-class="ani" :styles="transClass" :duration="duration" :show="showTrans" @click="onTap" >
<view class="uni-popup__wrapper-box" @click.stop="clear">
<slot />
</view>
......@@ -45,7 +45,8 @@
maskClick: {
type: Boolean,
default: true
}
},
},
data() {
return {
......@@ -134,9 +135,9 @@
this.showTrans = true
}, 50);
})
this.$emit('change', {
/* this.$emit('change', {
show: true
})
}) */
},
close(type) {
this.showTrans = false
......
......@@ -2,10 +2,12 @@
<view :style="{ height: height + 'px', background:background}" style="position: fixed; z-index: 888;">
<view class="head" :style="{ height: height + 'px', background:background}">
<view class="back" @click="back" v-if="backShow" :style="{ top: top + 'px', color:color }">
<image src="../../../static/recommend/icon_back_black.png" mode="aspectFit"
style="width: 32upx; height: 32upx; margin-top: calc((32px - 39upx)/2);margin-left: auto; margin-right: auto;"></image>
<image src="../../../static/recommend/icon_back_black.png" mode="aspectFit"
style="width: 40upx; height: 40upx; margin-top: 17upx;margin-left: auto; margin-right: auto;">
</image>
</view>
<view class="title" v-if="titleShow" :style="{ top: top + 'px', color:color, 'font-size': size + 'rpx' }">{{title}}</view>
<view class="title" v-if="titleShow" :style="{ top: top + 'px', color:color, 'font-size': size + 'rpx' }">
{{title}}</view>
</view>
</view>
</template>
......@@ -17,11 +19,11 @@
type: String,
default: '自定义标题'
},
size:{
size: {
type: String,
default: '32'
},
color:{
color: {
type: String,
default: '#000'
},
......@@ -33,65 +35,77 @@
type: Boolean,
default: true
},
background:{
background: {
type: String,
default: "linear-gradient(to right, #43e97b 0%, #38f9d7 100%)"
},
isBack: {
type: Boolean,
default: false,
}
},
data() {
return {
height :0,
top:0,
height: 0,
top: 0,
}
},
mounted() {
},
created() {
//设备信息
let app = uni.getSystemInfoSync();
//胶囊信息
let menuButtonInfo = uni.getMenuButtonBoundingClientRect();
this.height = app.statusBarHeight + menuButtonInfo.height + (menuButtonInfo.top - app.statusBarHeight)*2
this.height = app.statusBarHeight + menuButtonInfo.height + (menuButtonInfo.top - app.statusBarHeight) * 2
this.top = menuButtonInfo.top;
},
methods: {
back(){
uni.navigateBack();
back() {
if (!this.isBack) {
uni.navigateBack();
} else {
uni.reLaunch({
url: '../index/mall'
})
}
}
},
onLoad(options) {
},
onShow() {
}
}
</script>
<style>
.head{
position: fixed;
width: 750rpx;
z-index: 888;
align-items: center;
}
.title{
position: fixed;
width: 750rpx;
text-align: center;
line-height: 32px;
height: 32px;
}
.back{
position: fixed;
width: 81rpx;
text-align: center;
line-height: 32px;
height: 32px;
font-size: 32rpx;
font-weight: 900;
z-index: 9;
align-items: center;
}
.head {
position: fixed;
width: 750rpx;
z-index: 888;
align-items: center;
}
.title {
position: fixed;
width: 750rpx;
text-align: center;
line-height: 32px;
height: 32px;
}
.back {
position: fixed;
width: 81rpx;
text-align: center;
line-height: 32px;
height: 32px;
font-size: 32rpx;
font-weight: 900;
z-index: 9;
align-items: center;
}
</style>
......@@ -143,7 +143,7 @@ const drag = {
wx.vibrateShort(); // 使手机振动15ms
}
}else if(item.top > -5 && item.top < 5) { //上边框
console.log('top')
//console.log('top')
if(item.top < 5 && item.top > 0){ //上边框偏下
if(Marginleft < item.height){ //上边框放大
item.initialScale = item.initialScale * (item.height + item.top) / item.height
......@@ -180,8 +180,8 @@ const drag = {
let newRightTopPoint = this.getRotatedPoint(item.rightTopPoint, item.centerPos, -item.angle)
let newWidth = newRightTopPoint.x - newLeftBottomPoint.x
let newHeight = newLeftBottomPoint.y - newRightTopPoint.y
// if (item.isScale) {开启等比例缩放
if (newWidth / newHeight > item.scaleone) {
//if(item.isScale) {开启等比例缩放
if (newWidth / newHeight > item.scaleone) {
newLeftBottomPoint.x = newLeftBottomPoint.x + Math.abs(newWidth - newHeight * item.scaleone)
newWidth = newHeight * item.scaleone
} else {
......@@ -202,7 +202,7 @@ const drag = {
newHeight = newLeftBottomPoint.y - newRightTopPoint.y
let scaleWidth = newWidth / item.width
let scaleHeight = newHeight / item.height
// }
//}
if (newHeight <= minwheight) {
newHeight = minwheight
newWidth = Math.floor(newHeight * item.scaleone)
......@@ -224,7 +224,7 @@ const drag = {
item.top = newRightTopPoint.y
item.width = newWidth
item.height = newHeight
// 修改初始化原始图片比率-坐标
//修改初始化原始图片比率-坐标
item.initialScale = item.initialScale * scaleWidth
item.initialscaling = item.initialscaling * scaleWidth
if(item.image_left < 0){
......
<template>
<view class="full-width full-height">
<!-- 自定义头部 -->
<myhead :worksid="worksid" :title="myheadtext" :color="'#fff'" :titleShow="true" :backShow="false"
<myhead :worksid="worksid" :title="myheadtext" :color="'#fff'" :titleShow="true" :backShow="true" :isBack ="true"
:background="'none'"></myhead>
<view style="position: relative;width: 100%; height: 100%; z-index: 2;">
......@@ -14,17 +14,21 @@
:src="item.content + '?x-oss-process=image/resize,lfit,w_750'" mode="aspectFill"></image>
</swiper-item>
</swiper>
<view style="position: fixed; bottom: 232upx; text-align: center;left: 0; right: 0;">
<view style="position: fixed; bottom: 60upx; text-align: center;left: 0; right: 0;">
<view class="dots">
<view v-for="(item, index) in Adlists" class="dot-wrapper" :key="index">
<view class="dot iconfont"
<image v-if="index == currentSwiper" src="../../static/icon_banner_dot.png"
style="width: 15upx; height: 15upx; margin-left: 10upx;"></image>
<image else src="../../static/icon_banner_select_dot.png"
style="width: 15upx; height: 15upx; margin-left: 10upx;"></image>
<!-- <view class="dot iconfont"
:class="[index == currentSwiper ? 'iconsanjiaoxing':'iconxingzhuang-sanjiaoxing' ]">
</view>
</view> -->
</view>
</view>
</view>
<view @click="Customize_now" hover-class="hover-class-bg" style="position: fixed; bottom: 100upx; left: 0; right: 0; margin: auto;
<view @click="Customize_now" hover-class="hover-class-bg" style="position: fixed; bottom: 130upx; left: 0; right: 0; margin: auto;
width: 300upx; height: 100upx;
background: linear-gradient(92deg, #F29F3D, #67C4CA);
box-shadow: 0px 19px 48px 1px rgba(20, 31, 62, 0.35);
......@@ -34,6 +38,7 @@
立即定制</view>
</view>
</view>
<!-- 错误提示信息 -->
<view v-if="statusloading == 2" style="min-height: 100%;background: #131319 !important;">
<view class="start" style="padding-bottom: 100upx; padding-top: 200upx;">
......@@ -165,18 +170,18 @@
uni.login({
provider: 'weixin',
success: (res) => {
console.log(res)
//appcode: that.$Env.getappcode()
//console.log(res)
userService.login({
s: 'Init.init',
code: res.code
}).then(r => {
that.getDetail();
if (type == 1) {
that.$refs['switchGoods'].open(that.machine_id);
that.$refs['switchGoods'].open(that.machine_id);
} else {
uni.navigateTo({
url: '../mall/lineUp?machine_id=' + that.machine_id + '&key=' + that.key
url: '../mall/lineUp?machine_id=' + that.machine_id +
'&key=' + that.key
})
}
}).catch(err => {
......@@ -228,7 +233,7 @@
Adlist() {
homeservice.queryList({
s: 'Ad.list',
ad_position_key: 'currency_banner',
ad_position_key: 'index_top',
machine_id: this.machine_id
}).then(result => {
this.Adlists = result
......@@ -241,31 +246,19 @@
});
});
},
//获取商品列表
getGooods() {
homeservice.queryList({
s: 'Product.getCommonGoods', //新接口
}).then(result => {
this.goods = result;
this.selectItem = this.goods[this.currentIndex];
//this.$refs['brandscenter'].open();
}).catch(err => {
uni.showToast({
title: err.msg,
icon: 'none'
});
});
},
},
//上拉刷新
onReachBottom() {},
onReachBottom() {
},
//下拉加载
onPullDownRefresh() {
this.getDetail() //获取数据
},
// 分享转发
//分享转发
onShareAppMessage(options) {
var that = this;
// 设置转发内容
......@@ -281,35 +274,19 @@
},
onLoad(options) {
// console.log(options)
//if(options.machine_id){
this.machine_id = this.$Env.getmachineId();
if (options.machine_id) {
this.machine_id = options.machine_id;
}
this.myheadtext = this.machine_id + "-定制";
this.$base.machine_id = this.machine_id
this.statusloading = 1;
//this.getDetail() //获取数据
this.Adlist() // 轮播图
this.getGooods()
// console.log("进来="+this.machine_id)
//}
/* if(options.worksid){ //控制导航返回
this.worksid = options.worksid
} */
// 自定义获取二维码的携带的链接信息
/* if (options.q) {
let qrUrl = decodeURIComponent(options.q)
this.machine_id = this.getQueryString(qrUrl, 'machine_id')
this.$base.promoter_id = this.getQueryString(qrUrl, 'promoter_id')
// console.log(this.machine_id)
// console.log(this.$base.promoter_id)
// wx.setNavigationBarTitle({title: '色彩站' + machine_id })
this.$base.machine_id = this.machine_id
this.getDetail() //获取数据
this.Adlist()// 轮播图
} */
},
onShow() {},
onHide() {}
};
</script>
......@@ -325,7 +302,7 @@
height: 100%;
background: #FFFFFF;
// 错误提示信息
//错误提示信息
.start {
.start_img {
width: 260upx;
......
......@@ -2,7 +2,7 @@
<view class="full-width full-height">
<!-- v-if="system_config.golf_diy.value == 0" -->
<!-- v-if="system_config.golf_diy.value == 0" -->
<view v-if="system_config.golf_diy.value == 0" @tap="doubleTap" @touchstart="touchStart" @touchend="touchEnd"
<view v-if="system_config.lite_diy.value == 0" @tap="doubleTap" @touchstart="touchStart" @touchend="touchEnd"
style="position: fixed; z-index: 99; right: 0; bottom: 524upx; display: flex;align-items: center;justify-content: center;
width: 100upx; height: 88upx; background: #43cf7c; border-radius: 44upx 0px 0px 44upx;">
<view style="font-size: 24upx; font-weight: 800; color: #FFFFFF;">
......@@ -10,30 +10,23 @@
<view>体验</view>
</view>
</view>
<!-- <view @click="Uploadpictures()"
style="position: fixed; z-index: 99; right: 0; bottom: 724upx; display: flex;align-items: center;justify-content: center;
width: 100upx; height: 88upx; background: #43cf7c; border-radius: 44upx 0px 0px 44upx;">
<view style="font-size: 24upx; font-weight: 800; color: #FFFFFF;">
<view>导入微信聊天图片</view>
</view>
</view> -->
<!-- 无设备 -->
<view style="display: flex; justify-content: center;" :style="{height: 'calc(100% - ' + titleHeight +'px)'}">
<view style="margin-top: 231upx;">
<image src="../../static/icon_diy.png" mode="" style="width: 513upx; height: 251upx;"></image>
<view class="start_title" style="margin-top: 60upx;">定制站必须扫码才能使用</view>
<view class="start_title" style="margin-top: 120upx;">定制站必须扫码才能使用</view>
</view>
</view>
<!-- 扫码定制 -->
<view @click="scanning" style="width: 460upx; position: fixed; bottom: 100upx; margin: auto;
height: 164upx; background: rgba(92, 230, 181, 0.4); left: 0; right: 0; z-index: 99; border-radius: 20upx;
<view @click="scanning" style="width: 460upx; position: fixed; bottom: 180upx; margin: auto;
height: 164upx; background: #FAD9B1 ; left: 0; right: 0; z-index: 99; border-radius: 20upx;
display: flex; align-items: center;">
<view style="background: #FFFFFF;width: 120upx;
height: 120upx;border-radius: 50%; margin: 22upx 30upx;text-align: center;">
<image style="height: 61upx; width: 61upx;margin:32upx auto;" src="../../static/icon_saoyisao.png"
mode=""></image>
<image style="height: 61upx; width: 61upx;margin:32upx auto;" src="../../static/icon_saoyisao.png" mode=""></image>
</view>
<view style="color: #FFFFFF; font-size: 36upx;">开始扫码定制</view>
<view style="color: #333333 ; font-weight: bold;font-size: 33upx;">开始扫码定制</view>
</view>
<!-- 登录弹框 -->
<Signin ref="Signin"></Signin>
......@@ -48,7 +41,9 @@
components: {
Signin
},
computed: {},
computed: {
},
data() {
return {
titleHeight: 0,
......@@ -61,7 +56,7 @@
};
},
methods: {
// Uploadpictures(){
// Uploadpictures(){
// var that = this
// wx.chooseMessageFile({
// count: 1,
......@@ -73,7 +68,6 @@
// res.tempFiles.forEach(item => {
// tempFilePaths.push(item.path)
// })
// var size = res.tempFiles[0].size;
// var path = res.tempFiles[0].path;
// var formatImage = path.split(".")[(path.split(".")).length - 1];
......@@ -88,7 +82,7 @@
// }
// that.uploadDIY(tempFilePaths, 0, 0, 0, tempFilePaths.length);
// }
// })
// })
// },
/* 函数描述:作为上传文件时递归上传的函数体体;
* 参数描述:
......@@ -100,10 +94,10 @@
* machine_id=user_id=
*/
// uploadDIY(tempFilePaths, successUp, failUp, i, length) {
// let machine_id = this.machine_id || 0
// let user_id = userService.getUserInfo().id || 0
// var _this = this
// wx.request({
// let machine_id = this.machine_id || 0
// let user_id = userService.getUserInfo().id || 0
// var _this = this
// wx.request({
// url: this.$Env.getDevBaseURL() + '/api/AliossSign/getSign?machine_id=' + machine_id + '&user_id=' + user_id,
// method: 'GET',
// data:'',
......@@ -154,7 +148,7 @@
// console.log('预期需要上传的数据总长度', res.totalBytesExpectedToSend)
// })
// }
// })
// })
// },
getQueryString(url, name) {
var reg = new RegExp('(^|&|/?)' + name + '=([^&|/?]*)(&|/?|$)', 'i')
......@@ -180,7 +174,8 @@
if (res.scanType == 'QR_CODE') {
if (that.getQueryString(res.result, 'machine_id')) {
uni.navigateTo({
url: '../mall/machineDetail?machine_id=' + that.getQueryString(res.result, 'machine_id')
url: '../index/machineDetail?machine_id=' + that.getQueryString(
res.result, 'machine_id')
});
} else {
uni.showToast({
......@@ -193,7 +188,8 @@
if (res.path) {
if (that.getQueryString(res.path, 'machine_id')) {
uni.navigateTo({
url: '../mall/machineDetail?machine_id=' + that.getQueryString(res.path, 'machine_id')
url: '../index/machineDetail?machine_id=' + that
.getQueryString(res.path, 'machine_id')
});
} else {
uni.showToast({
......@@ -225,6 +221,7 @@
this.touchEndTime = e.timeStamp;
},
doubleTap(e) {
//console.log("doubleTap=");
// 控制点击事件在350ms内触发,加这层判断是为了防止长按时会触发点击事件
if (this.touchEndTime - this.touchStartTime < 350) {
// 当前点击的时间
......@@ -237,18 +234,19 @@
if (!this.$AppContext.checkLogin()) {
this.tologo('navigateTo')
} else {
//console.log("进来=");
uni.navigateTo({
url: '../mall/machineDetail?machine_id=' + this.$Env.getmachineId() + '&worksid=0'
url: '../index/machineDetail?machine_id=' + this.$Env.getmachineId()
});
// uni.navigateTo({
//uni.navigateTo({
// url: '../index/index',
// })
//})
}
}
}
},
tologo(e) {
// 先登陆
//先登陆
let that = this;
uni.login({
provider: 'weixin',
......@@ -260,7 +258,8 @@
}).then(r => {
if (e == 'navigateTo') {
uni.navigateTo({
url: '../mall/machineDetail?machine_id=' + that.$Env.getmachineId() + '&worksid=0'
url: '../mall/machineDetail?machine_id=' + that.$Env
.getmachineId() + '&worksid=0'
});
}
}).catch(err => {
......@@ -353,7 +352,7 @@
@import "./css/main.css";
page {
background: #141319 !important;
background: #ffffff !important;
width: 100%;
margin: 0;
padding: 0;
......@@ -363,7 +362,7 @@
text-align: center;
font-size: 36upx;
font-weight: 400;
color: #FFFFFF;
color: #333333;
line-height: 20upx;
}
</style>
......@@ -10,15 +10,14 @@
</template>
<template slot="content">
<view style="width:100%; margin: auto; height:calc(100% - 40upx); overflow: hidden;">
<view style="float: left; width: calc(100% / 3); margin: 40upx 0 0;"
<view style="float: left; width: calc(100% / 3); margin: 10upx 0 10upx;"
v-for="(item, index) in datalist" :key="index" @click="Worksdetail(item)">
<view style="width: 148.5upx; height: 204.6upx;margin: auto; position: relative;">
<image style="width: 148.5upx; height: 148.5upx; margin: auto;"
<view style="width: 139upx; height: 255upx; margin: auto; position: relative;">
<image
style="width: 139upx; height: 255upx; margin: auto; border-radius: 14px; overflow: hidden;"
:src="(item.image ? item.image:item.url) + '?x-oss-process=image/resize,lfit,w_112'"
mode="aspectFit"></image>
<view v-if="Number(item.price) > 0" style="min-width: 39upx; position: absolute; top: 0; right: 0;
background: #EF5354; border-radius: 8upx 0upx 11upx 8upx; text-align: center; padding: 2upx 8upx;
font-size: 18upx; font-weight: bold; color: #FFFFFF;">{{item.price}}</view>
</view>
</view>
<view class="align-center"
......@@ -70,6 +69,8 @@
is_new: null, //最新
is_hot: null, //热门
machine_id: null, //设备id
material_category_id: "", //
material_series_id: "",
},
Material_categorydatalist: [], //作品、贴图列表
datalist: [], //作品、贴图列表
......@@ -80,7 +81,7 @@
/* 控制位置 */
tip: '',
scrollViewTop: 0, //滑动高度
e: 0, // 弹窗类型
e: 0, //弹窗类型
};
},
mounted() {
......@@ -124,13 +125,19 @@
}
},
//刷新中
interrupt(e) {
this.tip = '刷新中'
//模拟发送请求
setTimeout(e, 500);
this.tip = '刷新成功';
this.queryPage.page = 1
this.getShapeList()
//this.getShapeList()
if (this.type == 99) {
this.queryCollectionPage.page = 1;
this.getExcellentMaterial(this.item.queryPage)
} else {
this.getShapeList()
}
},
//释放刷新
......@@ -155,8 +162,10 @@
this.type = 0;
this.e = item.e;
this.scrollViewTop = 0;
/* let loadData = false;
if (this.queryPage.material_category_id != null && this.queryPage.material_category_id != "" ) {
//let loadData = true;
let loadData = false;
if (item.e == 23 || item.e == 2) {
if (this.queryPage.material_category_id == item.queryPage.material_category_id) {
if (this.queryPage.material_series_id != item.queryPage.material_series_id) {
loadData = true;
......@@ -164,38 +173,19 @@
} else {
loadData = true;
}
}else{
if(this.datalist.length <= 0 ){
loadData =true;
}
} */
let loadData = true;
/* if (item.e == 23 || item.e == 2) {
if (this.queryPage.material_category_id != null && this.queryPage.material_category_id != "" && this
.queryPage.material_category_id != "null") {
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;
}
if (this.datalist == null || this.datalist.length == 0) {
loadData = true;
}
} else if (item.e == 99) {
if (this.currentId != item.queryPage.currentId || this.currentId == -1) {
loadData = true;
}
if (this.datalist ==null || this.datalist.length <= 0) {
if (this.datalist == null || this.datalist.length == 0) {
loadData = true;
}
} */
/*if (this.datalist ==null || this.datalist.length <= 0) {
loadData = true;
} */
}
this.queryPage = {
s: item.queryPage.s,
......@@ -230,10 +220,10 @@
this.showState = true;
}
} else if (item.e == 99) { //点赞贴图
this.type = 99;
if (loadData) {
this.scrollViewTop = 0;
this.oldScrollViewTop = 0;
this.type = 99;
this.queryCollectionPage = {
page: 1,
limit: 25
......@@ -269,6 +259,46 @@
});
},
getExcellentMaterialMore(e) {
uni.showLoading({
title: '正在加载中...'
})
let url = ''
if (e.currentId == 0) url = '/douyin/Material/getMeMaterial'
else if (e.currentId == 1) url = '/douyin/Material/getMeCollection'
else if (e.currentId == 2) url = '/douyin/Material/getFollowMaterials'
this.$http.post(url, this.queryCollectionPage).then(result => {
this.showState = true
if (result.data == null || result.data == "") {
uni.showToast({
title: '没有更多数据了!',
icon: 'none'
});
} else {
this.Material_categorydatalist = this.Material_categorydatalist.concat(result.data.data);
this.datalist = this.datalist.concat(result.data.data);
this.queryCollectionPage.page += 1;
if (Math.ceil(result.total / result.per_page) <= this.queryCollectionPage.page) {
return setTimeout(() => {
uni.showToast({
title: '没有更多数据了!',
icon: 'none'
});
}, 500);
}
}
uni.hideLoading();
}).catch(err => {
this.showState = true
uni.showToast({
title: err.msg,
icon: 'none'
})
uni.hideLoading();
});
},
//获取条件
getExcellentMaterial(e) {
this.datalist = []
......@@ -284,7 +314,7 @@
this.showState = true
this.Material_categorydatalist = result.data.data
this.datalist = result.data.data;
this.queryPage.page += 1;
this.queryCollectionPage.page += 1;
uni.hideLoading();
this.tip = '';
}).catch(err => {
......
<template>
<view v-if="isShow" style=" position: absolute; top: 0; width: 100%; height: 100%; display: flex; flex-direction: column; " @click="closeView()">
<view v-if="isShow"
style=" position: absolute; top: 0; width: 100%; height: 100%; display: flex; flex-direction: column; "
@click="closeView()">
<view
style="position: absolute; top: 0; width: 100%; height: 100%; background: #999999; z-index: 999; opacity: 0.5; ">
</view>
<view
style=" position: absolute;
top: calc(50% - 400upx);
height: 800upx;
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% - 620upx);
height: 1250upx;
width: 100%;
margin:auto;
display: flex;
flex-direction: column;
justify-content: center;
z-index: 999;">
<swiper class="swiper-block" :indicator-dots="false" :autoplay="false" :interval="3000" :duration="1000"
<scroll-view scroll-y scroll-with-animation style="box-sizing: border-box;white-space: nowrap;
width: 700upx; margin:0 auto; overflow: hidden; height: 100%;">
<view v-for="(item,index) in goods" :key="index" @click="goodclick(item)">
<view style="float: left; margin: 10upx;
display: flex;align-items: center;
background: #fff;border-radius: 15upx; position: relative;
height: 300upx; width: 210upx;" hover-class="brandactive" :class="[brandtext == item.title ? 'brandactive':'' ]">
<image mode="widthFix" style="width:calc(100% - 60upx);margin: auto;"
:src="item.goods_pic + '?x-oss-process=image/resize,lfit,w_700'"></image>
<!-- front_image -->
<!-- :src="item.goods_pic + '?x-oss-process=image/resize,lfit,w_700'"></image> -->
<view style="text-align: center; font-size: 24upx; width: 100%;
color:#333; position: absolute; bottom: 20upx; ">
{{item !=null ? item.name : ''}}
</view>
</view>
</view>
</scroll-view>
<!-- <swiper class="swiper-block" :indicator-dots="false" :autoplay="false" :interval="3000" :duration="1000"
circular='false' previous-margin='80rpx' next-margin='80rpx' :current="currentIndex"
@change="swiperChangeGood">
<swiper-item class="swiper-item" v-for="(item,index) in goods" :key="index" >
<view @click="goodclick(item)" :class="['slide-image', currentIndex === index?'active':'']" mode="aspectFill"
style="justify-content: center; align-items: center; ">
<image :src="item.front_image + '?x-oss-process=image/resize,lfit,w_450'"
<image :src="item.front_image_old + '?x-oss-process=image/resize,lfit,w_450'"
style="width: 450upx; position: absolute;left: 50%;top:50%;transform: translate(-50%,-50%);"
mode="widthFix">
</image>
......@@ -31,7 +53,7 @@
{{item !=null ? item.name : ''}}
</view>
</swiper-item>
</swiper>
</swiper> -->
</view>
</view>
......@@ -52,14 +74,14 @@
s: 'Material.list',
},
goods: [], //商品列表
machine_id:null, //机器码
machine_id: null, //机器码
};
},
mounted() {},
methods: {
//关闭视图
//关闭视图
closeView() {
this.isShow = false;
},
......@@ -73,7 +95,7 @@
goodclick(e) {
this.isShow = false;
this.goodtext = e.name //选择商品名
this.$emit('selectGoodItem',{
this.$emit('selectGoodItem', {
id: e.id,
})
},
......@@ -81,7 +103,7 @@
//打开页面
open(machineId) {
this.machine_id = machineId;
this.getGooods();
this.getGooods();
},
//获取商品列表
......@@ -89,9 +111,19 @@
let that = this;
homeservice.queryList({
s: 'Product.getCommonGoods', //新接口
machine_id: this.machine_id, //机器码
}).then(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 => {
this.isShow = false;
uni.showToast({
......@@ -111,7 +143,7 @@
getGooods();
},
}
</script>
......
......@@ -15,8 +15,7 @@
<text style="font-size: 36upx; color: #FFFFFF;">字体</text>
</view>
</view>
</view>
</view>
<view style="width: 100%; background: #292933;">
......@@ -25,7 +24,7 @@
height: 98upx;">
<view style="width: 601upx; height: 57upx; background: rgb(255,255,255,0.1); margin: 21upx 41upx 21upx 21upx; border-radius: 10upx;">
<input :fixed="true" :auto-height="true" :show-confirm-bar="false" :cursor-spacing="73" :adjust-position="false"
type="text" maxlength="32" @input="textInput" :value="data.currentText" @focus="focusTextarea" @blur="blurTextarea"
type="text" maxlength="20" @input="textInput" :value="data.currentText" @focus="focusTextarea" @blur="blurTextarea"
placeholder="请输入文字内容..." style="font-size: 34upx; font-weight: 400; height: 57upx; line-height: 57upx; padding: 0upx 0 0upx 20upx; color: #FFFFFF;" />
</view>
<view style="width: 1px; height: 28upx; background: #FFFFFF;"></view>
......@@ -67,7 +66,6 @@
<image style="width: 69upx; height: 69upx; display: block;margin: auto;" :src="bg_text_color ? '../../static/icon/icon_qiehuan_one.png' : '../../static/icon/icon_qiehuan.png'"
mode="aspectFill"></image>
</view> -->
<!-- 颜色 开始-->
<!-- <scroll-view style="box-sizing: border-box; white-space: nowrap; margin: 10upx 0; " scroll-x scroll-with-animation >
<view style="text-align: center; display: inline-block; padding-left: 20upx;" v-for="(item,index) in colorList" :key="index" @click.stop="workcolor(item.color)">
......@@ -78,7 +76,7 @@
</view>
<view v-else style="width: 68upx; height: 68upx; border-radius: 50%;" :style="{background:item.color}"></view>
</view>
</scroll-view> -->
</scroll-view> -->
<!-- 颜色 结束-->
<!-- 颜色 开始-->
<scroll-view style="box-sizing: border-box; white-space: nowrap;
......
......@@ -36,7 +36,7 @@
margin: auto; z-index:2;" :src="designer.works_image + '?x-oss-process=image/resize,lfit,w_300'"mode="aspectFit"></image>
</view>
<view style="width: calc(100% - 360upx);">
<view style="width: calc(100% - 330upx);">
<view style="width: 90%;font-size: 28upx;">
<text style="font-size: 36upx;">{{designer.id || ''}}</text>
</view>
......@@ -61,18 +61,18 @@
<view v-if="sighstate">
<!-- background:rgba(0,0,0,0.6); -->
<view
style="position: fixed; z-index:999; width: 100%; height: 100%; top: 0; background:rgba(0,0,0,0.6);; justify-content: center;"
style="position: fixed; z-index:999; width: 100%; height: 100%; top: 0; background:rgba(0,0,0,0.6); justify-content: center;"
@click.stop="sighstate = false"></view>
<view style="position: fixed; z-index: 1000; top: 52%; left: 50%; right: 0; margin: auto; transform: translate(-50%, -50%);
width: 558upx; height: 600upx; background: #FFFFFF; border-radius: 10upx;
width: 558upx; height: 650upx; background: #FFFFFF; border-radius: 10upx;
display: flex; align-items: center; justify-content: center;">
<view style="position: absolute;
<view style="position: absolute;
top: 0; right: 0;" @click="sighstate = false">
<image src="../../static/icon_guanbi.png" mode=""
style="width: 26upx; height: 26upx; padding: 12upx 22upx;"></image>
</view>
style="width: 26upx; height: 26upx; padding: 20upx; "></image>
</view>
<view v-if=" designer.goods_name == '背包' " style="width: 558upx;">
<!-- <view v-if=" designer.goods_name == '背包' " style="width: 558upx;">
<view style="display: flex; align-items: center; justify-content: center;
width: 100%; height: 360upx; ">
<image :src="designer.works_image + '?x-oss-process=image/resize,lfit,w_80'"mode="aspectFit" style="width:80upx; margin-left: 100upx;"></image>
......@@ -80,12 +80,12 @@
</view>
<view style="text-align: center; font-size: 36upx; margin-top: 58upx;">作品排队中</view>
<view style="text-align: center; font-size: 36upx;">如需要打印可与客服确认</view>
</view>
</view> -->
<!-- goods_name=马卡龙 -->
<view v-if=" designer.goods_name == '马卡龙' " style="width: 558upx;">
<view v-if=" designer.goods_name == '马卡龙' " style="width: 558upx; margin-top: 60upx; ">
<view style="display: flex; align-items: center; justify-content: center;
width: 500upx; height: 350upx; position: relative; margin: auto;">
width: 500upx; height: 340upx; position: relative; margin: auto;">
<view style="width: 100%; height: 100%; display: flex; border: 1px solid #09BB07;">
<view style="width: calc(100% / 4); height: 100%;" v-for="item in 4" :key="a">
<view v-for="item in 3" :key="b"
......@@ -106,28 +106,44 @@
</view>
<view style="text-align: center; font-size: 36upx; margin-top: 58upx;">作品排队中</view>
<view style="text-align: center; font-size: 36upx;">如需要打印可与客服确认</view>
<view v-if="designer.user_id == userId " @click="toOrderDetail(designer)" style="width: 135upx; height: 55upx;background: #E7BC15;
border-radius: 40upx;
color: #FFFFFF;
margin:10upx auto;
text-align: center;
padding:auto;
padding-top: 15upx;">查看详情</view>
</view>
<view v-if=" designer.goods_name == '单肩袋' " style="width: 558upx;">
<!--<view v-if=" designer.goods_name == '单肩袋' " style="width: 558upx;">
<view style="display: flex; align-items: center; justify-content: center;
width: 100%; height: 360upx; ">
<image :src="designer.works_image + '?x-oss-process=image/resize,lfit,w_140'"mode="aspectFit" style="width:140upx; margin-left: 100upx;"></image>
<image :src="designer.back_image + '?x-oss-process=image/resize,lfit,w_290'"mode="aspectFit" style=" width: 300upx;margin-left: -220upx;"></image>
</view>
<view style="text-align: center; font-size: 36upx; margin-top: 58upx;">作品排队中</view>
<view style="text-align: center; font-size: 36upx;">如需要打印可与客服确认</view>
</view>
</view> -->
<view
v-if=" designer.goods_name != '背包' && designer.goods_name != '马卡龙' && designer.goods_name != '单肩袋' "
<view v-if=" designer.goods_name != '马卡龙' "
style="width: 558upx;">
<view style="display: flex; align-items: center; justify-content: center;
width: 100%; height: 360upx; ">
<image :src="designer.works_image + '?x-oss-process=image/resize,lfit,w_100'" mode="aspectFit" style="width:100upx; margin-left: 100upx;"></image>
<image :src="designer.back_image + '?x-oss-process=image/resize,lfit,w_290'" mode="aspectFit" style=" width: 300upx;margin-left: -200upx;"></image>
<image :src="designer.works_image + '?x-oss-process=image/resize,lfit,w_100'" mode="aspectFit" style="width:100upx; "></image>
<!-- <image :src="designer.back_image + '?x-oss-process=image/resize,lfit,w_290'" mode="aspectFit" style=" width: 300upx;margin-left: -200upx;"></image> -->
</view>
<view style="text-align: center; font-size: 36upx; margin-top: 58upx;">作品排队中</view>
<view style="text-align: center; font-size: 36upx;">如需要打印可与客服确认</view>
<view v-if="designer.user_id == userId " @click="toOrderDetail(designer)" style="width: 135upx; height: 55upx;background: #E7BC15;
border-radius: 40upx;
color: #FFFFFF;
margin:10upx auto;
text-align: center;
padding:auto;
padding-top: 15upx;">查看详情</view>
</view>
</view>
......@@ -173,6 +189,32 @@
};
},
methods: {
//订单详情
toOrderDetail(item) {
this.sighstate = false;
var url = this.$Env.getBaseURL();
var envVersionName = "trial";
if (url.indexOf("colorpark") != -1) {
envVersionName = "release";
}
wx.navigateToMiniProgram({
appId: this.$Env.getappId(),
path: '/pages/mine/self_help_payment_details?orderId=' + item.order_id +
'&type=null&machine_id=' + item.machine_id,
extraData: {
foo: 'bar'
},
envVersion: envVersionName,
success(res) {
// 打开成功
},
fail(res) {
console.log("打开小程序失败")
}
});
},
self_help_payment(designer) {
if (designer.user_id != this.userId) {
return;
......@@ -181,7 +223,7 @@
machine_id: this.queryPage.machine_id,
s: 'machine.newDetail',
}).then(res => {
if (designer.status.value == 1) {
/* if (designer.status.value == 1) {
if (designer.goods_name == "马卡龙") {
this.clearIntervalTime()
uni.navigateTo({
......@@ -195,12 +237,11 @@
'&type= 2' + '&machine_id=' + this.queryPage.machine_id
})
}
} else {
} else { */
if (this.sighstate == true) return;
this.designer = designer
this.sighstate = true
}
/* } */
}).catch(err => {
uni.showToast({
title: '设备休息中',
......@@ -242,12 +283,12 @@
item.lineup = obj < 10 ? "0" + obj : obj
})
this.LoupanList = result
// 分页对象处理
//分页对象处理
this.queryPage.total = result.total;
this.queryPage.per_page = result.per_page;
// 停止当前页面下拉刷新
//停止当前页面下拉刷新
if (this.dataLoadState.pullDownRefresh) uni.stopPullDownRefresh();
// 数据加载状态处理 false
//数据加载状态处理 false
this.dataLoadState.pullDownRefresh = false;
this.dataLoadState.reachBottom = false;
......@@ -343,8 +384,8 @@
url: '../index/machineDetail?machine_id=' + this.queryPage.machine_id
})
}
}
};
</script>
......
<template>
<view class="full-width full-height" :style="{overflow: isReady ? 'hidden' : 'scroll' }">
<view class="full-width full-height" :style="{overflow: isReady ? 'hidden' : 'scroll' }" style="overflow: hidden;background: #FFFFFF; ">
<myhead :title="ddddd" :color="'#131319'" :titleShow="true" :backShow="true"
:background="'#fff'"></myhead>
<!-- 打印机音乐 -->
<audio src="https://img.colorpark.cn/wechat/ring2.m4a" :action="ringaction" controls loop
style="opacity: 0; position: absolute;"></audio>
......@@ -16,7 +25,7 @@
https://img.colorpark.cn/wechat/track/fukuanquGolf.png
https://img.colorpark.cn/wechat/track/paiduiquGolf.png
https://img.colorpark.cn/wechat/track/shejiquGolf.png -->
<view style="height:100%;width: 100%; overflow: hidden;">
<view style="height:100%;width: 100%; overflow: hidden; margin-top: 280upx;">
<!-- goods.status.value 订单状态(0:等待生产,1:生产中,2: 生产完成,3:取消生产,4:出料中(弃用),5: 等待取料(弃用), 6:待入货(弃用),7:取货完成,8:已发货,9:订单完成) "-->
<view :animation="BoxTwoAnimation" style="width: 100%; height: 100%;"
v-if="(orderOrderStatusData.status == 0 || orderOrderStatusData.status == 1 || orderOrderStatusData.status == 10 || orderOrderStatusData.status == 2) && type != 1 && LoadState">
......@@ -415,8 +424,11 @@
<script>
import homeservice from '@/service/homeservice.js'
import myhead from '../index/head/head.vue'; // 页眉
export default {
components: {},
components: {myhead},
computed: {},
data() {
return {
......
......@@ -80,7 +80,6 @@ export function _query ({api, params, callBack, resultType = Enums.DataType.JSON
}
/**
* 修改
* @param {*}
......
static/icon_diy.png

46.7 KB | W: | H:

static/icon_diy.png

50.5 KB | W: | H:

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

735 Bytes | W: | H:

static/icon_saoyisao.png

756 Bytes | W: | H:

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