Commit dffdd6f2 by huahua

修改头获取

parent 0cebc7b6
{
"name" : "mobile-phone-shell-applet",
"name" : "壳小站打印机",
"appid" : "__UNI__AB0E0FC",
"description" : "",
"versionName" : "1.0.0",
"versionCode" : "100",
"transformPx" : false,
"networkTimeout":{
"uploadFile":60000,
"request":60000
},
"networkTimeout" : {
"uploadFile" : 60000,
"request" : 60000
},
"app-plus" : {
/* 5+App特有相关 */
"usingComponents" : true,
......@@ -83,7 +83,7 @@
/* 快应用特有相关 */
"mp-weixin" : {
/* 小程序特有相关 */
"appid" : "wxdca8810ccd426633",
"appid" : "wx3d8b992243f6e678",
"setting" : {
"urlCheck" : true,
"postcss" : true,
......@@ -98,9 +98,9 @@
"desc" : "获取当前位置"
}
},
"requiredPrivateInfos": ["getLocation","chooseAddress"]
"requiredPrivateInfos" : [ "getLocation", "chooseAddress" ]
},
//"requiredPrivateInfos": ["getLocation","chooseAddress"],
//"requiredPrivateInfos": ["getLocation","chooseAddress"],
// "navigateToMiniProgramAppIdList":[ "wx55b5b6d95c648041"]
"h5" : {
"devServer" : {
......
{
"pages": [{
"pages": [
{
"path": "pages/index/mall",
"style": {
"navigationBarTitleText": "色彩公园手机壳",
......@@ -15,6 +16,12 @@
}
},
{
"path": "pages/index/nick-name",
"style": {
"navigationBarTitleText": ""
}
},
{
"path": "pages/index/start-up",
"style": {
"navigationBarTitleText": "打印",
......@@ -119,6 +126,7 @@
"navigationBarTitleText": "商品尺码"
}
}
]
}
]
......
<template>
<view class="full-width">
<!-- 登录弹框 -->
<Signin ref="Signin"></Signin>
<!-- 自定义头部 -->
<view class='flex commonHead' :style="{height: titleHeight +'px'}">
<view class='commonHead-wrap flex'>
<view class='commonHead_left' @click="tomine()">
<view class='commonHead_left_back'>
<view class="commonHead_left_back_img">
<image :src="portraitUrl" style="width: 50upx; height: 50upx; border-radius: 30upx; margin-top: 10upx; background: #FFFFFF; "
mode="aspectFill"></image>
<image :src="portraitUrl" style="width: 50upx; height: 50upx; border-radius: 30upx; margin-top: 10upx; background: #FFFFFF;" mode="aspectFill"></image>
</view>
</view>
</view>
......@@ -44,41 +47,8 @@
<!-- 有设备 -->
<view v-if="LoupanList.length > 0">
<view style="margin-top: 29upx;">
<view style="width: 690upx; margin:30upx auto 30upx; display: flex;">
<view>
<view style="position: relative; width: 320upx; height: 160upx;" @click="order()">
<image src="../../static/main/dingdan@3x.png" mode=""
style="width: 320upx; height: 160upx; position: absolute;z-index: -1;"></image>
<view
style="margin-left:26upx; padding-top: 27upx; font-size: 36upx; color: #FFFFFF;font-weight: bold;">
订单</view>
<view style="margin-top: 15upx;margin-left:26upx;font-size: 24upx;
font-weight: 400; color: #FFFFFF;">我的定制</view>
</view>
<view style="margin-top: 16upx; position: relative;width: 320upx; height: 160upx;"
@click="coupons()">
<image src="../../static/main/huayihua@3x.png" mode=""
style="width: 320upx; height: 160upx; position: absolute;z-index: -1;"></image>
<view
style="margin-left:26upx; padding-top: 27upx; font-size: 36upx; color: #FFFFFF;font-weight: bold;">
滑一滑</view>
</view>
</view>
<view style="margin-left: 15upx;width: 350upx; height: 340upx;" @click="tomine()">
<image src="../../static/main/wo@3x.png" mode=""
style="width: 350upx; height: 340upx; position: absolute;z-index: -1;"></image>
<view
style="margin-left:30upx; padding-top: 39upx; font-size: 36upx; color: #FFFFFF;font-weight: bold;">
个人中心</view>
<view style="margin-top: 15upx;margin-left:30upx;font-size: 24upx;
font-weight: 400; color: #FFFFFF;">更多作品更多精彩</view>
</view>
</view>
<!-- v-if="system_config.phone_diy.value == 0" -->
<view v-if="system_config.phone_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: linear-gradient(92deg, #178CE6, #984ACE); border-radius: 44upx 0px 0px 44upx;">
@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: linear-gradient(92deg, #178CE6, #984ACE); border-radius: 44upx 0px 0px 44upx;">
<view style="font-size: 24upx; font-weight: 800; color: #FFFFFF;">
<view>定制</view>
<view>体验</view>
......@@ -106,7 +76,6 @@
</view>
<view style="margin: 28upx 0 10upx;">
<!-- 设备状态 0:离线 1:正常 2:生产中 3:故障 4:调试 5:升级中 -->
<!-- 正常、打印中:正在定制,其他的都是:休息中 -->
<text v-if="item.status.value == 0" class="statuslist"
style="background:#F2A03E;">正在休息</text>
<text v-if="item.status.value == 1" class="statuslist"
......@@ -225,19 +194,23 @@
})
}
},
swiperChange(e) {
this.currentSwiper = e.detail.current
},
experience() {
uni.navigateTo({
url: '../mall/experience'
})
},
tomyorder() { //订单列表
uni.navigateTo({
url: '../mine/myorder'
})
},
toLocation(item) {
uni.showLoading({
title: '导航加载中...'
......@@ -258,6 +231,7 @@
}
});
},
getQueryString(url, name) {
var reg = new RegExp('(^|&|/?)' + name + '=([^&|/?]*)(&|/?|$)', 'i')
var r = url.substr(1).match(reg)
......@@ -289,7 +263,6 @@
},
order() {
var url = this.$Env.getBaseURL();
var envVersionName = "trial";
if (url.indexOf("colorpark") != -1) {
......@@ -308,14 +281,13 @@
}
})
},
/* path: '/pages/login/coupons', */
coupons() {
var url = this.$Env.getBaseURL();
var envVersionName = "trial";
if (url.indexOf("colorpark") != -1) {
envVersionName = "release";
}
//console.log("envVersionName="+envVersionName);
wx.navigateToMiniProgram({
appId: Env.getappId(),
path: '/pages/index/recommend?selectTitleType=2',
......@@ -328,6 +300,7 @@
}
})
},
tomine() {
wx.navigateToMiniProgram({
appId: this.$Env.getappId(),
......@@ -342,13 +315,16 @@
}
})
},
// 防止重复点击
//防止重复点击
touchStart(e) {
this.touchStartTime = e.timeStamp;
},
touchEnd(e) {
this.touchEndTime = e.timeStamp;
},
doubleTap(e) {
// 控制点击事件在350ms内触发,加这层判断是为了防止长按时会触发点击事件
if (this.touchEndTime - this.touchStartTime < 350) {
......@@ -359,29 +335,31 @@
this.lastTapTime = currentTime;
// 如果两次点击时间在300毫秒内,则认为是双击事件
if (currentTime - lastTapTime > 300) {
// console.log('防止重复点击')
if (!this.$AppContext.checkLogin()) {
//console.log('防止重复点击')
// uni.navigateTo({
// url: './nick-name?machine_id=' + this.$Env.getmachineId() + '&worksid=0'
// });
if(!this.$AppContext.checkLogin()) {
this.tologo('navigateTo')
} else {
// this.showOrHide()
// uni.navigateTo({url: '/pages/index/index?goods_id=21'})
uni.navigateTo({
uni.navigateTo({
url: './start-up?machine_id=' + this.$Env.getmachineId() + '&worksid=0'
});
}
});
}
}
}
},
// 加载数据
//加载数据
loadGoodsList() {
uni.showLoading({
title: '正在加载中...'
})
homeservice.queryList({
s: 'Machine.shopList',
longitude: this.$base.longitude || 0,
/*longitude: this.$base.longitude || 0,
latitude: this.$base.latitude || 0,
distance: 5,
distance: 5, */
}).then(result => {
this.long = true
result.data.forEach(item => {
......@@ -393,12 +371,9 @@
}).catch(err => {
uni.hideLoading();
uni.stopPullDownRefresh();
// uni.showToast({
// title: err.msg,
// icon: 'none'
// });
});
},
Account_newOrder() {
homeservice.queryList({
s: 'Account.newOrder'
......@@ -411,33 +386,19 @@
uni.stopPullDownRefresh();
}).catch(err => {
uni.stopPullDownRefresh();
// uni.showToast({
// title: err.msg,
// icon: 'none'
// });
});
},
getSetting() {
this.loadGoodsList()
// const that = this
// uni.getSetting({
// success(res) {
// if (res.authSetting['scope.userLocation']) { //同意
// that.getLocation()
// } else { //拒绝
// that.getAuthorize()
// }
// }
// })
},
// 获取用户的地理位置,
//获取用户的地理位置,
getAuthorize() {
//uni.hideLoading();
// uni.showToast({title: '操作太频繁了,歇一歇',icon:'none',duration: 2000});
this.loadGoodsList()
},
// 用户授权
//用户授权
getAuthorize() {
const that = this
uni.authorize({
......@@ -467,15 +428,15 @@
}
})
},
// 设备详情
//设备详情
goMachineDetail(item) {
uni.navigateTo({
//url: './start-up?machine_id=' + item.id + '&worksid=0'
url: './start-up?machine_id=' + item.id + '&worksid=0'
});
},
tologo(e) {
// 先登陆
let that = this;
uni.login({
provider: 'weixin',
......@@ -487,31 +448,24 @@
that.Account_newOrder();
if (e == 'navigateTo') {
uni.navigateTo({
url: './start-up?machine_id=' + that.$Env.getmachineId() +
'&worksid=0'
url: './start-up?machine_id=' + that.$Env.getmachineId() +'&worksid=0'
});
}
}).catch(err => {
that.$refs.Signin.init()
// uni.showToast({title: err.msg,icon: 'none'})
//console.log(that.$refs.Signin)
//that.$refs.Signin.getUserProfile()
//getUserProfile
//that.$refs.Signin.init()
});
},
fail: (res) => {
// uni.showToast({
// title: res.msg,
// icon: 'none'
// })
}
});
},
phone_mall() {
// homeservice.queryList({s: 'Ad.list',ad_position_key: 'phone_mall'}).then(result => {
// this.Adlists = result
// uni.stopPullDownRefresh();
// }).catch(err => {
// uni.stopPullDownRefresh();
// uni.showToast({title: err.msg,icon: 'none'});
// });
},
systemConfig() {
var _this = this
......@@ -588,7 +542,6 @@
if (appUser != null) {
this.portraitUrl = appUser.portrait
}
},
onShow() {
let sys = this.$base.appInformation ? this.$base.appInformation : wx.getSystemInfoSync(); // 自定义页头适配
......
<template>
<view class="containar">
<view class="avatarUrl">
<button type="balanced" open-type="chooseAvatar" @chooseavatar="onChooseavatar">
<image :src="avatarUrl" class="refreshIcon"></image>
</button>
</view>
<view class="nickname">
<text>昵称:</text>
<input type="nickname" class="weui-input" :value="nickName" @blur="bindblur" placeholder="请输入昵称"
@input="bindinput" />
</view>
<view class="btn">
<view class="btn-sub" @click="onSubmit">保存</view>
</view>
</view>
</template>
<script>
import Env from '@/util/Env.js';
export default {
data() {
return {
avatarUrl: 'https://mmbiz.qpic.cn/mmbiz/icTdbqWNOwNRna42FI242Lcia07jQodd2FJGIYQfG0LAJGFxM4FbnQP6yfMxBgJ0F3YRqJCJ1aPAK2dQagdusBZg/0',
nickName: ''
};
},
onLoad(option) {
},
methods: {
bindblur(e) {
console.log('nickName', e)
this.nickName = e.detail.value;
},
bindinput(e) {
console.log('nickName', e)
this.nickName = e.detail.value;
},
onChooseavatar(e) {
this.avatarUrl = e.detail.avatarUrl;
},
onSubmit() {
if (this.nickName === '') {
uni.showToast({
icon: 'none',
title: '请输入昵称'
})
return false;
}
uni.showLoading({
title: '头像上传中...'
});
// uni.request({
// url: Env.getDevBaseURL() + '/api/AliossSign/getSign',
// method: 'GET',
// data: '',
// header: {
// 'content-type': 'application/x-www-form-urlencoded',
// 'Accept': 'application/json'
// },
// success: function(res) {
// },
// });
}
},
};
</script>
<style lang="scss">
.containar {
.avatarUrl {
padding: 80upx 0 40upx;
background: #fff;
button {
background: #fff;
line-height: 80upx;
height: auto;
width: auto;
padding: 20upx 30upx;
margin: 0;
display: flex;
justify-content: center;
align-items: center;
.refreshIcon {
width: 160upx;
height: 160upx;
border-radius: 50%;
}
.jt {
width: 14upx;
height: 28upx;
}
}
}
//botton 去除边框
button::after {
border: none;
}
.nickname {
background: #fff;
padding: 20upx 30upx 80upx;
display: flex;
align-items: center;
justify-content: center;
.weui-input {
padding-left: 60upx;
}
}
.btn {
width: 100%;
.btn-sub {
width: 670upx;
margin: 80upx auto 0;
height: 90upx;
background: #DF8585;
border-radius: 45upx;
line-height: 90upx;
text-align: center;
font-size: 36upx;
color: #fff;
}
}
}
</style>
\ No newline at end of file
......@@ -9,15 +9,6 @@
</view>
</view>
<view @tap="toProxyApplet" v-if="list.is_open_manage == 1"
style="position: fixed; z-index: 99; right: 0; bottom: 400upx; display: flex;align-items: center;justify-content: center;
width: 100upx; height: 88upx; background: linear-gradient(92deg, #178CE6, #984ACE); border-radius: 44upx 0px 0px 44upx;">
<view style="font-size: 24upx; font-weight: 800; color: #FFFFFF;">
<view>运营</view>
<view>中心</view>
</view>
</view>
<!-- 自定义头部 -->
<myhead :worksid="worksid" :title="myheadtext" :color="'#864BC3'" :titleShow="true" :backShow="true"
:background="'none'"></myhead>
......@@ -46,13 +37,6 @@
width: 420upx; height: 105upx; line-height: 105upx; border-radius: 53upx; font-size: 39upx;">
立即定制
</view>
<!-- <view @click="toProxyApplet()" v-if="list.is_open_manage == 1" style="position: fixed; bottom: 35upx;
text-align: center;left: 0; right: 0;font-size: 34upx;
margin: auto;
color: #fff;
line-height:64upx;
background: linear-gradient(to left, #834DC4, #1983D7);
width: 240upx; height: 60upx; border-radius: 30upx;">运营中心</view> -->
</view>
<!-- 错误提示信息 -->
<view v-if="statusloading == 2" style="min-height: 100%;background: #131319 !important;">
......@@ -335,7 +319,14 @@
userService.login({
s: 'Init.init',
code: res.code
}).then(r => {
}).then(result => {
uni.setStorageSync('token', result.token)
/* uni.setStorage({
})
*/
that.getSetting();
}).catch(err => {
that.$refs.Signin.init();
......@@ -478,7 +469,11 @@
this.isNowCustomized = false;
}.bind(this), 3000)
let that = this;
if (!this.$AppContext.checkLogin()) {
this.tologo()
console.log(this.$AppContext.checkLogin());
/* if (!this.$AppContext.checkLogin()) {
this.tologo()
} else {
if (this.list != null) {
......@@ -508,7 +503,7 @@
} else {
}
}
} */
},
changeChannel() {
......
......@@ -16,16 +16,16 @@
<text style="margin-left: 13upx;">微信一键登录</text>
</button> -->
<!-- 小程序登录、用户信息相关接口调整 -->
<button class="buttonGetUserInfo" hover-class="hover-class-bg" v-if="canIUseGetUserProfile"
<button class="buttonGetUserInfo" hover-class="hover-class-bg"
@tap="getUserProfile">
<image src="../../static/icon_wechat.png" mode="aspectFill" class="icon_wechat"></image>
<text style="margin-left: 13upx;">获取头像昵称</text>
<!-- <image src="../../static/icon_wechat.png" mode="aspectFill" class="icon_wechat"></image> -->
<text style="margin-left: 13upx;">登录</text>
</button>
<button v-else open-type="getUserInfo" @getuserinfo="getUserInfo" lang="zh_CN"
<!-- <button v-else open-type="getUserInfo" @getuserinfo="getUserInfo" lang="zh_CN"
class="buttonGetUserInfo" hover-class="hover-class-bg">
<image src="../../static/icon_wechat.png" mode="aspectFill" class="icon_wechat"></image>
<text style="margin-left: 13upx;">获取头像昵称</text>
</button>
</button> -->
</view>
<image src="../../static/logo.jpg" mode="aspectFill" class="logoimage"></image>
</view>
......@@ -93,15 +93,9 @@
userService.login({
s: 'Init.init',
code: that.loginInfo.code,
nickname: that.loginInfo.nickName || '微信用户',
gender:that.loginInfo.gender,
portrait: that.loginInfo.avatarUrl,
encryptedData:that.loginInfo.encryptedData,
iv:that.loginInfo.iv,
promoter_id:that.$base.promoter_id ,// 推广的员的编号
machine_id:that.$base.machine_id,//用户进入设备id
}).then(result => {
uni.hideLoading();
uni.setStorageSync('token', result.token)
uni.showToast({title: '登录成功',icon: 'none'});
if (that.code) {
uni.redirectTo({
......@@ -242,8 +236,8 @@
}
},
onShow() {
console.log('wx.getUserProfile')
console.log(wx.getUserProfile)
//console.log('wx.getUserProfile')
//console.log(wx.getUserProfile)
if (wx.getUserProfile) {
console.log('wx.getUserProfile可以使用')
this.canIUseGetUserProfile = true
......
......@@ -21,12 +21,12 @@
<view v-if="designer.user_id != userId" class="border-image-pesudo-no">
<view class="border-image-pesudo-in-no">
<!-- <view style="margin:20upx 30upx;width: 141upx; height:132upx; background-size:contain;
background-repeat:no-repeat; background-position: center; position: relative;"
:style="{'background-image':' url(' + designer.front_image + ')'}"> -->
<!-- <view style="margin:20upx 30upx;width: 141upx; height:132upx; background-size:contain;
background-repeat:no-repeat; background-position: center; position: relative;"
:style="{'background-image':' url(' + designer.front_image + ')'}"> -->
<!-- <image :src="designer.works_image + '?x-oss-process=image/resize,lfit,w_81'" mode="aspectFit" @click="previewImg(designer,0)"
style="width: 71upx; height:68upx; position: absolute;
left:0; right:0; top:0; bottom:0; margin:auto;"> -->
style="width: 71upx; height:68upx; position: absolute;
left:0; right:0; top:0; bottom:0; margin:auto;">-->
<image style="width: 100%;height: 100%;" src="../../static/img/icon_line_up_back.png"
mode="aspectFit"></image>
<image
......@@ -42,34 +42,32 @@
<view v-if="designer.user_id == userId" class="border-image-pesudo">
<view class="border-image-pesudo-in">
<!-- <view style="margin:20upx 30upx;width: 141upx; height:132upx; background-size:contain;
background-repeat:no-repeat; background-position: center; position: relative;"
:style="{'background-image':' url(' + designer.front_image + ')'}"> -->
<!-- <view style="margin:20upx 30upx;width: 141upx; height:132upx; background-size:contain;
background-repeat:no-repeat; background-position: center; position: relative;"
:style="{'background-image':' url(' + designer.front_image + ')'}"> -->
<!-- <image :src="designer.works_image + '?x-oss-process=image/resize,lfit,w_81'" mode="aspectFit" @click="previewImg(designer,0)"
style="width: 71upx; height:68upx; position: absolute;
left:0; right:0; top:0; bottom:0; margin:auto;"> -->
style="width: 71upx; height:68upx; position: absolute;
left:0; right:0; top:0; bottom:0; margin:auto;">-->
<image style="width: 100%;height: 100%;" src="../../static/img/icon_line_up_back.png"
mode="aspectFit"></image>
mode="aspectFit"></image>
<image
style="width: 141upx; height: 132upx; margin:auto; display: block;position: absolute; z-index: 10;"
:src="designer.front_image" mode="aspectFit"></image>
style="width: 141upx; height: 132upx; margin:auto; display: block;position: absolute; z-index: 10;"
:src="designer.front_image" mode="aspectFit"></image>
<image
style="width: 141upx; height: 132upx; position: absolute; top: 0; left: 0; right: 0; bottom: 0; margin: auto; z-index:8;"
:src="designer.works_image + '?x-oss-process=image/resize,lfit,w_300'"
mode="aspectFit">
style="width: 141upx; height: 132upx; position: absolute; top: 0; left: 0; right: 0; bottom: 0; margin: auto; z-index:8;"
: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: 90%;font-size: 28upx;">
<text style="font-size: 40upx;font-weight: bold;">{{designer.id || ''}}</text>
</view>
<view style="font-size: 24upx; color: #FFFFFF; margin-top: 30upx;">
{{designer.goods_name || ''}}
{{designer.goods_name || ''}}
</view>
<!-- <view style="font-size: 24upx; color: #FFFFFF; margin-top: 10upx;">{{designer.goods_specs || ''}}</view> -->
</view>
<view style="margin-right: 20upx; margin-left: auto; padding-top:75upx">
<view v-if="designer.status.value == 1"
......@@ -96,59 +94,13 @@
</view>
</view> -->
</view>
</view>
</view>
<!-- 提示 -->
<view v-if="sighstate">
<view
style="position: fixed; z-index:999; width: 100%; height: 100%; background:rgba(0,0,0,0.6); top: 0;"
@click.stop="sighstate = false"></view>
<view style="position: fixed; z-index: 1000; top: 0; left: 0; bottom: 0; right: 0; margin: auto;
width: 558upx; height: 600upx; background: #FFFFFF; border-radius: 10upx;
display: flex; align-items: center; justify-content: center;">
<view style="position: absolute;
top: 0; right: 0;" @click.stop="sighstate = false">
<image src="../../static/icon_guanbi.png" mode=""
style="width: 26upx; height: 26upx; padding: 12upx 22upx;"></image>
</view>
<view style="width: 558upx;">
<view style="display: flex; align-items: center; justify-content: center;
width: 100%; height: 360upx; ">
<!-- <view
style="width: 100%; height: 100%; display: flex; align-items: center; justify-content: center;flex-direction: column;"> -->
<!-- <image src="../../static/icon_paidui.png" mode="aspectFill"
style="width: 154upx; height: 154upx; margin: auto;"></image> -->
<image :src="designer.works_image + '?x-oss-process=image/resize,lfit,w_150'"
mode="aspectFit" style="width:150upx; "></image>
<image :src="designer.back_image + '?x-oss-process=image/resize,lfit,w_150'"
mode="aspectFit" style=" width: 150upx; margin-left: -150upx; "></image>
<!-- </view> -->
</view>
<view style="text-align: center; font-size: 36upx; margin-top: 5upx;">作品排队中</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 style="width: 100%;" >
<view style="width: 136upx; height: 60upx;background: #E7BC15;border-radius: 30upx; color: #FFFFFF; text-align: center; ">查看详情</view>
</view> -->
</view>
</view>
</view>
</view>
</view>
<!-- 提示完 -->
</view>
</view>
</view>
</template>
......@@ -173,7 +125,6 @@
machine_id: null,
page: 1,
per_page: 15,
// total: 0
},
stateindex: false,
key: null, //1直营配送站 2 万能通用版 3色彩自助站
......@@ -186,38 +137,8 @@
};
},
methods: {
//调转订单详情
toOrderDetail(item) {
this.sighstate = false;
var url = this.$Env.getBaseURL();
var envVersionName = "trial";
if (url.indexOf("colorpark") != -1) {
envVersionName = "release";
}
//console.log("envVersionName="+envVersionName)
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;
}
......@@ -225,7 +146,6 @@
machine_id: this.queryPage.machine_id,
s: 'machine.detail'
}).then(res => {
if (this.key == 2) {
this.designer = designer
if (designer.status.value == 1) {
this.clearIntervalTime()
......@@ -239,7 +159,6 @@
if (this.sighstate == true) return;
this.sighstate = true
}
}
}).catch(err => {
uni.showToast({
title: '设备休息中',
......@@ -259,7 +178,6 @@
});
},
loadGoodsList(direction) {
// uni.showLoading({ title: '加载中...' });
if (this.dataLoadState.pullDownRefresh || this.dataLoadState.reachBottom) return;
this.dataLoadState.pullDownRefresh = direction === Enums.DATA_DIRECTION.UP;
this.dataLoadState.reachBottom = direction === Enums.DATA_DIRECTION.DOWN;
......@@ -274,31 +192,14 @@
}
}
homeservice.queryList(this.queryPage).then(result => {
/*result.forEach((item, index) => {
// console.log(index)
let obj = index + 1
item.lineup = obj < 10 ? "0" + obj : obj
// console.log(item.lineup)
}) */
this.stateindex = true
// (index + 1).padStart(2,'0')
// 触底更新时,当前列表+查询结果集
// let newList = this.LoupanList.concat(result)
// this.LoupanList = newList
/* let LoupanNewList = [];
result.forEach((item, index) => {
if (this.userId == item.user_id) {
LoupanNewList.push(item)
}
}) */
//this.LoupanList = LoupanNewList
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;
// uni.hideLoading();
......
......@@ -19,7 +19,6 @@
mode="aspectFit" @click="previewImg(designer,0)"
style="width: 141upx; height:132upx; position: absolute;
left:0; right:0; top:0; bottom:0; margin:auto;"> -->
</view>
<view style="width: calc(100% - 141upx);">
<view style="width: 90%;font-size: 28upx;">
......
{
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
"projectname": "wechat_phone",
"projectname": "kxz-app-phone",
"setting": {
"compileHotReLoad": true,
"urlCheck": false
......
const accountInfo = wx.getAccountInfoSync();
if(!accountInfo.miniProgram.envVersion){
// console.error("获取运行环境失败!");
//console.error("获取运行环境失败!");
}
const baseApi = {
//开发版
develop: "https://tprint.refinecolor.com",
develop: "https://kxz.refinecolor.com",
//develop: "https://tprint.colorpark.cn",
//体验版
trial: "https://tprint.refinecolor.com",
//trial: "https://tprint.colorpark.cn",
trial: "https://kxz.refinecolor.com",
//正式版
release: "https://tprint.colorpark.cn",
release: "https://kxz.colorpark.cn",
};
const baseURL = baseApi[accountInfo.miniProgram.envVersion]
const Env = {
getDevBaseURL: () => baseURL, //开发版
getBaseURL: () => baseURL, //上线版
getmachineId: () => '100022', //'100022',//'100022' /* '100022', *///体验机器编码
getmalltext: () => "色彩公园手机壳",
getmalltext: () => "壳小站打印机",
getAppID: () => "wxdca8810ccd426633",
getcompany: () => "深圳市瑞丰彩科技有限公司",
//跳转-色彩公园小程序
getcompany: () => "广州壳小站科技有限公司",
getappId: () => "wx55b5b6d95c648041",
//getenvVersion: () => "trial",
getenvVersion: () => "release",
......
......@@ -15,7 +15,9 @@ request.interceptors.request.use((config, promise) => {
// 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;
if (config._token) config.headers['token'] = uni.getStorageSync('token');
//uni.getStorageSync('token');
console.warn('####### API Request: ', config)
return config
})
......
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