作者 “关晓峰”

fix

<script>
export default {
onLaunch: function() {
uni.authorize({
scope: 'scope.userLocation',
success: function () {
console.log('用户同意了授权')
}
})
let token = uni.getStorageSync('reToken')
if(token == ''){
uni.authorize({
scope: 'scope.userLocation',
success: function () {
console.log('用户同意了授权')
}
})
uni.redirectTo({
url:'/pages/index/adIndex'
})
}else{
console.log(123);
uni.redirectTo({
url:'/pages/index/login'
})
}
},
// onLaunch: function(e) {
... ...
... ... @@ -63,14 +63,14 @@
uni.$u.http.post('/api/common/add_category_rec', {
ids: this.checkboxValue1.toString()
}).then(res => {
console.log(res);
console.log(this.flag);
if (this.flag == '买') {
uni.reLaunch({
url: '/pages/index/sell'
uni.switchTab({
url: '/pages/index/buy'
})
} else {
uni.reLaunch({
url: '/pages/index/buy'
uni.switchTab({
url: '/pages/index/sell'
})
}
}).catch(err => {
... ...
... ... @@ -113,6 +113,7 @@
console.log(res);
uni.hideLoading()
uni.setStorageSync('token', res.data.token || '')
uni.setStorageSync('reToken', res.data.token || '')
uni.navigateTo({
url: "/pages/index/index"
})
... ...
... ... @@ -3,7 +3,7 @@
<view class="top">
<view class="header">
<view class="logo"><image src="/static/about.png"></image></view>
<view class="title">工人乐</view>
<view class="title">设备乐</view>
<view class="tips">v3.9.4.0</view>
</view>
</view>
... ...
... ... @@ -19,7 +19,7 @@
<u--input v-model="model1.userInfo.brand_name" disabled disabledColor="#ffffff"
placeholder="请选择" border="none"></u--input>
<u-icon slot="right" name="arrow-right"></u-icon>
<view class="posBox" style="top:116rpx; left:32rpx">
<view class="posBox" style="top:12.5%; left:32rpx">
<image src="../../static/Group 193@2x.png" style="width: 40rpx;height: 24rpx;" mode=""></image>
</view>
</u-form-item>
... ... @@ -28,7 +28,7 @@
<u--input v-model="model1.userInfo.xh_name" disabled disabledColor="#ffffff" placeholder="请选择"
border="none"></u--input>
<u-icon slot="right" name="arrow-right"></u-icon>
<view class="posBox" style="top:200rpx; left:32rpx">
<view class="posBox" style="top:22%; left:32rpx">
<image src="../../static/Group 193@2x.png" style="width: 40rpx;height: 24rpx;" mode=""></image>
</view>
</u-form-item>
... ... @@ -36,16 +36,21 @@
<u--input v-model="model1.userInfo.region" disabled disabledColor="#ffffff" placeholder="请选择"
border="none"></u--input>
<u-icon slot="right" name="arrow-right"></u-icon>
<view class="posBox" style="top:288rpx; left:32rpx">
<view class="posBox" style="top:31.5%; left:32rpx">
<image src="../../static/Group 193@2x.png" style="width: 40rpx;height: 24rpx;" mode=""></image>
</view>
</u-form-item>
<u-form-item label="出厂年限" labelWidth="200rpx" prop="userInfo.year" borderBottom @click="showSex = true;" ref="item1">
<u--input v-model="model1.userInfo.year" placeholder="请输入" border="none"></u--input>
<!-- <u--input v-model="model1.userInfo.year" disabled disabledColor="#ffffff" placeholder="请选择"
<u-form-item label="出厂年限" labelWidth="200rpx" prop="userInfo.year" borderBottom @click="show = true;" ref="item1">
<!-- <u--input v-model="model1.userInfo.year" placeholder="请输入" border="none"></u--input> -->
<u--input v-model="model1.userInfo.year" disabled disabledColor="#ffffff" placeholder="请选择"
border="none"></u--input>
<u-icon slot="right" name="arrow-right"></u-icon> -->
<u-icon slot="right" name="arrow-right"></u-icon>
</u-form-item>
<u-datetime-picker
:show="show"
v-model="model1.userInfo.year"
mode="year-month"
></u-datetime-picker>
<u-form-item label="表显小时数" labelWidth="200rpx" prop="userInfo.hours" borderBottom ref="item1">
<u--input v-model="model1.userInfo.hours" border="none"></u--input>
</u-form-item>
... ... @@ -56,10 +61,6 @@
<u--input v-model="model1.userInfo.bright" border="none"></u--input>
</u-form-item>
</u--form>
<u-action-sheet :v-model="showSex" :actions="actions" title="请选择性别" description="如果选择保密会报错"
@close="showSex = false" @select="sexSelect">
</u-action-sheet>
<view class="" v-if="flag == 1" style="width: 60%;margin-top: 50rpx;display: flex;justify-content: center;margin-left: 20%;">
<u-button shape="circle" text="上传设备照片" style="color: white;" color="linear-gradient(to right, #46BAEC,#2F67D3)"
@click="goUpload('hire')" ></u-button>
... ... @@ -80,6 +81,7 @@ import loadingPage from '../../uni_modules/uview-ui/libs/config/props/loadingPag
flag: String,
model1: {
show:false,
showSex: false,
userInfo: {
name: '',
... ...
... ... @@ -46,14 +46,14 @@
<u--input v-model="model1.userInfo.region" disabled disabledColor="#ffffff" placeholder="请选择"
border="none"></u--input>
<u-icon slot="right" name="arrow-right"></u-icon>
<view class="posBox" style="top:290rpx; left:32rpx">
<view class="posBox" style=" left:32rpx" :style="active == 2 ? 'top:54.5%' : 'top:46.5%;'">
<image src="../../static/Group 193@2x.png" style="width: 40rpx;height: 24rpx;" mode=""></image>
</view>
</u-form-item>
<u-form-item v-if="nav == '发布求租'" label="租赁时间" labelWidth="200rpx" prop="userInfo.day" borderBottom
ref="item1">
<u--input v-model="model1.userInfo.day" border="none" @click="showTime = true"></u--input>
<view class="posBox" style="top:374rpx; left:32rpx">
<view class="posBox" style="top:60.5%; left:32rpx">
<image src="../../static/Group 193@2x.png" style="width: 40rpx;height: 24rpx;" mode=""></image>
</view>
</u-form-item>
... ...