Commit ad6e9815 by huahua

修改

parent a1dc8ef5
......@@ -6,6 +6,7 @@ import nothing from './util/nothing'
import AppContext from './util/AppContext'
import Env from './util/Env'
import base from './util/base.js'
import http from './util/http.js';
import './css/uni.css'
import './css/main.css'
......@@ -17,6 +18,7 @@ Vue.prototype.$nothing = nothing
Vue.prototype.$AppContext = AppContext
Vue.prototype.$Env = Env
Vue.prototype.$base = base
Vue.prototype.$http = http
App.mpType = 'app'
......
{
"pages": [
/* {
/*{
"path": "pages/index/mall",
"style": {
"navigationBarTitleText": "色彩高尔夫",
......@@ -8,7 +8,7 @@
"enablePullDownRefresh": true
}
}, */
/* {
/*{
"path": "pages/index/machineDetail",
"style": {
"navigationBarTitleText": "色彩高尔夫",
......@@ -16,7 +16,6 @@
"enablePullDownRefresh": true
}
} */
{
"path": "pages/index/machineDetail",
"style": {
......@@ -25,7 +24,6 @@
}
},
{
"path": "pages/index/index",
"style": {
......@@ -39,8 +37,8 @@
"globalStyle": {
"navigationBarTextStyle": "#ffffff",
"navigationBarTitleText": "定制",
"navigationBarBackgroundColor": "#141319",
"backgroundColor": "#141319"
"navigationBarBackgroundColor": "#ffffff",
"backgroundColor": "#ffffff"
},
"subPackages": [{
"root": "pages/login",
......@@ -54,31 +52,34 @@
{
"root": "pages/mall",
"pages": [
/* {
"path": "machineDetail",
"style": {
"navigationBarTitleText": "色彩站详情",
"navigationStyle": "custom",
"enablePullDownRefresh": true
}
}, */
{
"path": "lineUp",
"style": {
"navigationBarTitleText": "排队列表",
"enablePullDownRefresh": true
"enablePullDownRefresh": true,
"navigationStyle": "custom"
}
}
]
},
{
"root": "pages/mine",
"pages": [{
"pages": [
{
"path": "self_help_payment_details",
"style": {
"navigationBarTitleText": "打印"
}
},
{
"path": "self_help_payment_details_new",
"style": {
"navigationBarTitleText": "打印"
}
},
{
"path": "order",
"style": {
......
......@@ -22,7 +22,7 @@
}
.noData_title {
color: #FFFFFF;
color: #333333;
text-align: center;
font-size: 36upx;
}
......@@ -39,8 +39,8 @@
height: 70upx;
line-height: 70upx;
text-align: center;
color: #F56364;
color: #F29F3D ;
margin:140upx auto 0;
border: 1upx solid #F56364;
border: 1upx solid #F29F3D;
border-radius: 35upx;
}
\ No newline at end of file
......@@ -2,8 +2,8 @@
<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.png" mode="aspectFit"
style="width: 23upx; height: 39upx; 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: 32upx; height: 32upx; margin-top: calc((32px - 39upx)/2);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>
......
......@@ -6,7 +6,7 @@ const drag = {
var minwwidth = 50
var minwheight = 50
var shock = true
console.log("type="+item.type)
if(item.type == 0 || item.type == 2){
minwwidth = 50
minwheight = 50
......@@ -104,7 +104,6 @@ const drag = {
item.height = newHeight
if(item.left != 0 && item.top != 0){
// console.log('top-left' + '-------' + item.top)
// 修改初始化原始图片比率-坐标
item.initialScale = item.initialScale * scaleWidth
item.initialscaling = item.initialscaling * scaleWidth
......@@ -715,6 +714,11 @@ const drag = {
* @description: 初始化targetObj的位置
*/
initPos(item) {
if(item == null){
//this.bg_initPos(item)
return
}
// 记录初始盒子位置右下
item.rightBottomPoint = {
x: item.width + item.left,
......
......@@ -4,6 +4,8 @@
<myhead :worksid="worksid" :title="myheadtext" :color="'#fff'" :titleShow="true" :backShow="false"
:background="'none'"></myhead>
<view style="position: relative;width: 100%; height: 100%; z-index: 2;">
<!-- 轮播图 -->
<view v-if="statusloading == 1" class='swiper-box' style="width: 100%; height: 100%;">
<swiper :autoplay="true" :interval="3000" :duration="1000" @change="swiperChange"
......@@ -11,8 +13,6 @@
<swiper-item v-for="(item, index) in Adlists" :key="index" class="swiper-item full-width">
<image style="width: 100%; height: 100%; margin: auto; display: block;"
:src="item.content + '?x-oss-process=image/resize,lfit,w_750'" mode="aspectFill"></image>
<!-- <fr-image :src="item.content + '?x-oss-process=image/resize,lfit,w_750'"
mode="aspectFill" loading-ing-img="two-balls"/> -->
</swiper-item>
</swiper>
<view style="position: fixed; bottom: 232upx; text-align: center;left: 0; right: 0;">
......@@ -24,20 +24,15 @@
</view>
</view>
</view>
<!-- <view @click="Customize_now"
style="position: fixed; bottom: 112upx; left: 0; right: 0;
width: 200upx; height: 200upx; border-radius: 50%; margin: auto;">
<image src="../../static/golf.png" mode=""
style="width: 200upx; height: 200upx; border-radius: 50%;
position: absolute; top: 0; right: 0; left: 0; bottom: 0; z-index: -1;"></image>
<view style="color: #43cf7c; text-align: center; line-height: 200upx;font-size: 30upx; font-weight: bold;">开始定制</view>
</view> -->
<view @click="Customize_now" hover-class="hover-class-bg" style="position: fixed; bottom: 160upx; left: 0; right: 0; margin: auto;
width: 300upx; height: 100upx; background: linear-gradient(92deg, #5CE6B5, #0CA457);
box-shadow: 0upx 19upx 48upx 1upx rgba(20, 31, 62, 0.86); border-radius: 50upx;">
<view
style=" text-align: center; line-height: 100upx; font-size: 36upx; font-weight: 500; color: #FFFFFF;">
开始定制</view>
<view @click="Customize_now" hover-class="hover-class-bg" style="position: fixed; bottom: 100upx; 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);
border-radius: 40px;">
<view style=" text-align: center; line-height: 100upx; font-size: 36upx; font-weight: 500; color: #FFFFFF;">
立即定制</view>
</view>
</view>
<!-- 错误提示信息 -->
......@@ -65,26 +60,17 @@
</view>
<!-- 登录弹框 -->
<Signin ref="Signin"></Signin>
<!-- 排队信息 -->
<!-- <view v-if="statusloading == 1" @tap="game"
style="position: fixed; z-index: 99; right: 0; bottom: 524upx; display: flex;align-items: center;justify-content: center;
width: 100upx; height: 88upx; background: #43cf7c; border-radius: 44upx 0px 0px 44upx;">
<view style="font-size: 24upx; font-weight: 800; color: #FFFFFF;">
<view>排队</view>
<view>信息</view>
</view>
</view> -->
<view v-if="statusloading == 1" @tap="toLineList"
style="position: fixed; z-index: 99; right: 0; bottom: 318upx; width: 109upx; height: 123upx;">
style="position: fixed; z-index: 99; right: 0; bottom: 200upx; width: 109upx; height: 123upx;">
<image src="../../static/liebiao.png" mode="" style="width: 243upx; height: 123upx;"></image>
</view>
<switchGoods ref="switchGoods" @selectGoodItem="selectGoodItem"></switchGoods> <!-- //商品弹框 -->
<switchGoods ref="switchGoods" @selectGoodItem="selectGoodItem"></switchGoods>
<!--//商品弹框 -->
</view>
</template>
<script>
......@@ -93,15 +79,13 @@
import FrImage from '@/components/fr-image/fr-image.vue'
import Signin from '../index/Signin.vue';
import myhead from './head/head.vue';
/*import uniPopup from './/common/uni-popup/uni-popup.vue' */
import switchGoods from '../index/switchGoods.vue'; // 手机壳
import switchGoods from '../index/switchGoods.vue'; //选择商品
export default {
components: {
myhead,
Signin,
FrImage,
switchGoods,
},
computed: {},
......@@ -117,44 +101,43 @@
worksid: 1,
statusloading: null, //加载状态
phone: '18938664545',
goods: [], //商品列表
currentIndex: 0,
selectItem: null, //选择对象
};
},
methods: {
//去排队列表
toLineList() {
if (!this.$AppContext.checkLogin()) {
this.tologo()
} else {
uni.navigateTo({
url: '../mall/lineUp?machine_id=' + this.machine_id + '&key=' + this.key
url: '../mall/lineUp?machine_id='+this.machine_id+'&key=' + this.key
})
}
},
//选择商品进来
selectGoodItem(item) {
uni.navigateTo({
url: '../index/index?machine_id=' + this.machine_id + " &good_id=" + item.id,
url: '../index/index?machine_id='+this.machine_id+"&good_id=" +item.id,
})
},
// 立即定制
//立即定制
Customize_now() {
let that = this;
if (!this.$AppContext.checkLogin()) {
this.tologo()
} else {
this.$nextTick(() => {
this.$refs['switchGoods'].open({
});
})
this.$refs['switchGoods'].open(this.machine_id);
}
},
// 打电话
//打电话
tomakePhoneCall() {
uni.showLoading({
title: '跳转中...',
......@@ -175,6 +158,8 @@
}
});
},
//授权登录
tologo() {
// 先登陆
let that = this;
......@@ -199,9 +184,13 @@
}
});
},
//轮播图轮动
swiperChange(e) {
this.currentSwiper = e.detail.current
},
//获取商品明细
getDetail() {
uni.showLoading({
title: '正在加载中...',
......@@ -209,7 +198,6 @@
})
homeservice.WorksList({
machine_id: this.machine_id,
// s: 'machine.detail'
s: 'machine.newDetail'
}).then(res => {
this.statusloading = 1;
......@@ -228,7 +216,9 @@
uni.hideLoading();
});
},
Adlist() { // 轮播图
//获取轮播图
Adlist() {
homeservice.queryList({
s: 'Ad.list',
ad_position_key: 'currency_banner',
......@@ -244,14 +234,23 @@
});
});
},
getQueryString(url, name) {
var reg = new RegExp('(^|&|/?)' + name + '=([^&|/?]*)(&|/?|$)', 'i')
var r = url.substr(1).match(reg)
if (r != null) {
return r[2]
}
return null;
}
//获取商品列表
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() {},
......@@ -273,14 +272,7 @@
};
return shareObj;
},
/* onShareTimeline() {
return {
title: this.$Env.getmalltext(),
path: '/pages/mall/machineDetail?machine_id=' + this.machine_id,
imageUrl:'',
query: 'kjbfrom=pyq'
}
}, */
onLoad(options) {
// console.log(options)
//if(options.machine_id){
......@@ -290,6 +282,7 @@
this.statusloading = 1;
//this.getDetail() //获取数据
this.Adlist() // 轮播图
this.getGooods()
// console.log("进来="+this.machine_id)
//}
/* if(options.worksid){ //控制导航返回
......@@ -315,6 +308,10 @@
<style lang="scss">
@import "../index/css/main.css";
/* height: calc(100% - 400upx);
width: 100%;
position: absolute;
top: 200upx; */
page {
width: 100%;
......@@ -347,4 +344,37 @@
}
}
}
.swiper-block {
height: calc(100% - 100upx);
width: 100%;
/* height: calc(100% - 300upx);
width: 100%;
position: absolute;
top: 150upx; */
}
.swiper-item {
display: flex;
flex-direction: column;
justify-content: center;
align-items: flex-start;
overflow: unset;
}
.slide-image {
height: calc(100% - 250upx);
width: 520upx;
border-radius: 20upx;
z-index: 1;
margin: 0upx 40upx;
background: #FFFFFF;
}
.active {
transform: scale(1.14);
transition: all 0.2s ease-in 0s;
z-index: 20;
}
</style>
<template>
<view>
<!-- 品牌 -->
<uni-popup ref="brandscenter" type="center" @change="change" :style="{height: (MobilePhoneHeight * 0.8) +'px'}">
<view style="width: 690upx; margin:auto; display: flex; flex-direction: column;">
<view :style="{height: (MobilePhoneHeight * 0.8) +'px'}"
style="width:100%; background: #FFFFFF; border-radius: 30upx; position: relative;">
<view @click="cancelBrand()" style="position: absolute; top: 0upx; right: 0upx;">
<image src="../../../static/icon_guanbi.png" mode=""
style="height: 23upx; width: 23upx; padding: 21upx 33upx;"></image>
<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;
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"
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'"
style="width: 450upx; position: absolute;left: 50%;top:50%;transform: translate(-50%,-50%);"
mode="widthFix">
</image>
</view>
<!-- <view style="margin:122upx auto 94upx;font-size: 36upx;text-align: center;">
请选择手机品牌
</view> -->
<view style="margin:62upx auto 50upx;font-size: 36upx; text-align: center;">
请选择商品
<view
style="width: 100%;font-size: 28upx;color: #333333;text-align: center; position: absolute; bottom: 100upx; z-index: 999; ">
{{item !=null ? item.name : ''}}
</view>
<scroll-view scroll-y scroll-with-animation
:style="{height: (MobilePhoneHeight * 0.8) - 200*pixelRate +'px'}" style="box-sizing: border-box;white-space: nowrap;
width: 510upx; margin:0 auto; overflow: hidden; margin-bottom: 50upx;">
<view v-for="(item,index) in goods" :key="index" @click="goodclick(item)">
<view style="float: left; margin: 10upx;
display: flex;align-items: center;
background: #EEEEEE;border-radius: 10upx;
height: 150upx; width: 150upx;" hover-class="brandactive" :class="[goodtext == item.name ? 'brandactive':'' ]">
<view style="width: 100%;">
<image :src="item.front_image"
style="width: 50%; height: 70upx; margin: auto; display: block;"></image>
<view style="text-align: center; font-size: 24upx; margin-top: 10upx; width: 95%; margin: auto;
overflow: hidden; text-overflow: ellipsis; white-space: nowrap;word-break:break-all;">
{{item.name || ''}}
</view>
</view>
</view>
</view>
</scroll-view>
<!-- 无数据 -->
<view v-if="catrgoryList.length < 0" style="text-align: center; color: #BEBEBE;">该设备没有库存</view>
</view>
</view>
</uni-popup>
</swiper-item>
</swiper>
</view>
</view>
</template>
<script>
import homeservice from '@/service/homeservice.js';
import uniPopup from '../index/common/uni-popup/uni-popup.vue';
import mpvuePicker from '@/components/mpvue-picker/mpvuePicker.vue';
var _self;
var canvaPie = null;
export default {
props: {
// windowHeight: {
// type: Number,
// default: 1
// },
// pixelRate: {
// type: Number,
// default: 1
// },
},
components: {
uniPopup,
mpvuePicker
},
data() {
return {
isShow: false, //是否显示
goodtext: '', //选择商品名称
goods: [],
currentId: 0,
/* 控制被选中 */
currentIndex: 0,
/* 控制位置 */
......@@ -76,40 +51,49 @@
queryPage: {
s: 'Material.list',
},
goods: [], //商品列表
machine_id:null, //机器码
};
},
mounted() {},
methods: {
//关闭视图
closeView() {
this.isShow = false;
},
//商品列表滚
swiperChangeGood(event) {
this.currentIndex = event.detail.current
},
//商品点击事件
goodclick(e) {
this.isShow = false;
this.goodtext = e.name //选择商品名
this.$refs['brandscenter'].close();
this.$emit('selectGoodItem', {
this.$emit('selectGoodItem',{
id: e.id,
name: e.name, //手机壳信息
})
},
//打开页面
open() {
this.getGooods();
//this.$refs['brandscenter'].open();
open(machineId) {
this.machine_id = machineId;
this.getGooods();
},
//获取商品列表
getGooods() {
let that = this;
homeservice.queryList({
s: 'Product.getCommonGoods', //新接口
}).then(result => {
this.goods = result;
this.$refs['brandscenter'].open();
this.isShow = true;
}).catch(err => {
this.isShow = false;
uni.showToast({
title: err.msg,
icon: 'none'
......@@ -117,17 +101,56 @@
});
},
change(e) {},
change(e) {
},
},
onShow(options) {},
onShow(options) {
getGooods();
},
}
</script>
<style lang="scss">
.classification {
.swiper-block {
height: 100%;
width: 100%;
/* height: calc(100% - 300upx);
width: 100%;
position: absolute;
top: 150upx; */
}
.swiper-item {
display: flex;
flex-direction: column;
justify-content: center;
align-items: flex-start;
overflow: unset;
}
.slide-image {
height: calc(100% - 100upx);
width: 520upx;
border-radius: 20upx;
z-index: 1;
margin: 0upx 40upx;
background: url("../../static/item_good_frame.png")
}
.active {
transform: scale(1.14);
transition: all 0.2s ease-in 0s;
z-index: 20;
}
/* .classification {
width: 300upx;
height: 80upx;
line-height: 80upx;
......@@ -141,153 +164,7 @@
background: #864BC3 !important;
color: #FFFFFF !important;
}
}
} */
// 分类
.scroll-container {
box-sizing: border-box;
white-space: nowrap;
width: 540upx;
margin: auto;
.scroll-item {
width: 152upx;
height: 248upx;
background: #F5F5F5;
border-radius: 20upx;
text-align: center;
display: inline-block;
margin: 0 10upx;
border: 4upx solid #F5F5F5;
&.active {
background: #FFFFFF !important;
border: 4upx solid #864BC3;
}
// &.active::before {
// content: '...';
// position: absolute;
// left: calc(50% - 10px);
// top: 100%;
// width: 20px;
// margin-left: 0px;
// margin-top: -5px;
// border-top: 4px dotted #595959;
// }
}
}
.experiencebutton {
width: 230upx;
height: 70upx;
line-height: 70upx;
text-align: center;
color: #FFFFFF;
margin: 40upx auto 0;
border-radius: 35upx;
background: linear-gradient(to right, #834DC4, #1983D7);
font-size: 26upx;
}
.canbutton {
color: #FFFFFF;
font-size: 26upx;
width: 218upx;
height: 58upx;
line-height: 58upx;
border: 1px transparent solid;
border-radius: 30px;
position: relative;
margin: auto;
background: #292933;
text-align: center;
}
.canbutton:after {
content: '';
position: absolute;
top: -3px;
bottom: -3px;
left: -3px;
right: -3px;
background: linear-gradient(to right, #834DC4, #1983D7);
border-radius: 30px;
content: '';
z-index: -1;
}
// 品牌
.brandactive {
background: #E4D0F6 !important;
}
.backgroundColoractive {
border: 2upx #834DC4 solid !important;
}
.tooltiptext {
visibility: hidden;
min-width: 120upx;
background-color: black;
color: #fff;
text-align: center;
border-radius: 6upx;
padding: 5upx 0;
font-size: 20upx;
/* 定位 */
position: fixed;
z-index: 1;
}
.tooltiptextactive {
visibility: visible;
}
// 型号
.model {
padding: 0upx 20upx;
height: 60upx;
line-height: 60upx;
background: #141319;
text-align: center;
color: #FFFFFF;
border-radius: 30upx;
margin-right: 20upx;
font-size: 28upx;
}
.modelactive {
color: #553177 !important;
}
.determineBut {
background: linear-gradient(92deg, #178CE6, #984ACE);
color: #FFFFFF;
position: fixed;
bottom: 110upx;
text-align: center;
left: 0;
right: 0;
width: 251upx;
height: 77upx;
line-height: 77upx;
border-radius: 38upx;
font-size: 31upx;
margin: auto;
}
.determineButtn {
width: 251upx;
margin: 34upx auto 0;
height: 77upx;
line-height: 77upx;
text-align: center;
background: linear-gradient(92deg, #178CE6, #984ACE);
opacity: 0.86;
border-radius: 38upx;
font-size: 31upx;
font-weight: 500;
color: #FFFFFF;
}
</style>
<template>
<view :style="{ height: height + 'px', background:background}" style="position: fixed; z-index: 999;">
<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 v-if="worksid > 0" src="../../../static/recommend/house.png" mode="aspectFit"
style="width: 39upx; height: 39upx; margin-top: calc((32px - 39upx)/2);margin-left: auto; margin-right: auto;"></image>
<image v-else src="../../../static/recommend/icon_back.png" mode="aspectFit" style="width: 23upx; height: 39upx; 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: 32upx; height: 32upx; margin-top: calc((32px - 39upx)/2);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>
......@@ -14,10 +13,6 @@
<script>
export default {
props: {
worksid:{
type: Number,
default: null
},
title: {
type: String,
default: '自定义标题'
......@@ -53,7 +48,6 @@
},
created() {
// console.log('设备信息')
//设备信息
let app = uni.getSystemInfoSync();
//胶囊信息
......@@ -63,11 +57,7 @@
},
methods: {
back(){
if(this.worksid > 0){
uni.redirectTo({ url: '../index/mall' })
}else{
uni.navigateBack();
}
uni.navigateBack();
}
},
onLoad(options) {
......
static/icon_make_diy_back_color.png

1.14 KB | W: | H:

static/icon_make_diy_back_color.png

2.47 KB | W: | H:

static/icon_make_diy_back_color.png
static/icon_make_diy_back_color.png
static/icon_make_diy_back_color.png
static/icon_make_diy_back_color.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -5,7 +5,7 @@ if(!accountInfo.miniProgram.envVersion){
const baseApi = {
// 开发版
develop: "https://tprint.refinecolor.com",
//develop: "https://tprint.colorpark.cn",
//develop: "https://tprint.colorpark.cn",
// 体验版
trial: "https://tprint.refinecolor.com",
// trial: "https://tprint.colorpark.cn",
......@@ -13,12 +13,12 @@ const baseApi = {
release: "https://tprint.colorpark.cn",
};
const baseURL = baseApi[accountInfo.miniProgram.envVersion]
console.log(accountInfo.miniProgram.envVersion)
// console.log(baseURL)
//console.log(accountInfo.miniProgram.envVersion)
//console.log(baseURL)
const Env = {
getDevBaseURL: () => baseURL,
getBaseURL: () => baseURL,
getmachineId: () => '100054', //线上100086 //测试 422001' //100086
getmachineId: () => '100055', //线上100086 //测试 422001' //100086
getappcode: () => 'lite',
getmalltext: () => "色彩公园Lite",
getAppID: () => "wx1c777ee874c39b0b",
......
// const baseUrl = 'https://ws.refinecolor.com';
const baseUrl = 'https://tprint.refinecolor.com';
import Env from '@/util/Env.js'
import store from '../store'
const baseUrl = Env.getBaseURL();
const http = ({ url = '', param = {}, ...other } = {}) => {
wx.showLoading({
title: '啊嘞,色彩正在绘制'
});
// wx.showLoading({
// title: '啊嘞,色彩正在绘制'
// });
let timeStart = Date.now();
return new Promise((resolve, reject) => {
wx.request({
url: getUrl(url),
......@@ -20,7 +19,6 @@ const http = ({ url = '', param = {}, ...other } = {}) => {
complete(res) {
wx.hideLoading();
console.log(`耗时${Date.now()} - timeStart`);
if(res.statusCode >= 200 && res.statusCode < 300){
resolve(res.data);
}else{
......@@ -75,4 +73,14 @@ module.exports = {
post,
put,
del
}
\ No newline at end of file
}
// http.get('https://ccdcapi.alipay.com/validateAndCacheCardInfo.json',{
// _input_charset:'utf-8',
// cardNo:'6227003320240034988',
// cardBinCheck:true
// }).then(result => {
// console.log(result.bank)
// }).catch(err => {
// uni.showToast({ title: err.msg, icon: 'none' });
// })
\ No newline at end of file
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