This commit is contained in:
lnn19986213 2022-11-09 10:36:41 +08:00
parent b0e1082a89
commit 8cbea1c18b
7 changed files with 207 additions and 197 deletions

View File

@ -26,5 +26,5 @@ app.$mount()
import http from "@/request/index.js"
Vue.prototype.http=http
// Vue.prototype.socketUrl = "ws://61.130.44.231/webSocket"
Vue.prototype.socketUrl = "wss://yxx.ydool.net/webSocket"
Vue.prototype.socketUrl = "ws://61.130.44.231/webSocket"
// Vue.prototype.socketUrl = "wss://yxx.ydool.net/webSocket"

View File

@ -6,7 +6,7 @@
<view v-if="load == false">
<u-search height=42 margin="12px 0" searchIconColor="#251B1D" shape="square" :showAction="false"
v-model="artValue" placeholder="请输入名家名称" @search='search'></u-search>
<u-tabs :scrollable="false" @click="clickTabs" :list="list1" :activeStyle="{
<u-tabs @click="clickTabs" :list="list1" :activeStyle="{
color: '#251B1D',
fontWeight: 'bold',
transform: 'scale(1.05)'
@ -16,7 +16,7 @@
}" itemStyle="height: 50px;">
</u-tabs>
<view class="artworks">
<u-empty v-if="workList.length < 1" mode="data" icon="../../static/orderE.png" marginTop="120">
<u-empty v-if="workList.length < 1" mode="data" icon="../../static/orderE.png" text='暂无数据' marginTop="120">
</u-empty>
<view class="art_item" v-for="(v, i) in workList" :key="i">
<view class="art_item_top">

View File

@ -1,54 +1,60 @@
<template>
<view style="">
<u-gap height="60" bgColor="#FFF"></u-gap>
<u--form :model="userInfo" ref="loginForm">
<view class="content_main">
<view class="copyright_iocn">
<image style="width: 80rpx; height: 60rpx;" src="../../static/icon10.png" mode=""></image>
<image style="width: 156rpx; height: 50rpx;margin-left: 16rpx;" src="../../static/icon11.png"
mode="">
</image>
</view>
<view class="tab_op">
<view :class="tab == 0?'choosed':'unchoosed'" @click="pwdLog()">
密码登录
</view>
<view class="whiteBox"></view>
<view :class="tab == 1?'choosed':'unchoosed'" @click="codeLog()">
验证码登录
</view>
</view>
<u-form-item prop="number" ref="item1" class="data_itm" v-if="tab == 0">
<u--input placeholder="请输入手机号" border="bottom" clearable v-model="userInfo.number"></u--input>
</u-form-item>
<u-form-item prop="pasw" ref="item1" class="data_itm" v-if="tab == 0">
<u--input type="password" placeholder="请输入密码" border="bottom" clearable v-model="userInfo.pasw">
</u--input>
</u-form-item>
<u-form-item prop="phone" ref="item1" class="data_itm" v-if="tab == 1">
<u--input placeholder="请输入手机号" border="bottom" clearable v-model="userInfo.phone"></u--input>
</u-form-item>
<u-form-item prop="code" ref="item1" class="data_itm" v-if="tab == 1">
<u-input placeholder="请输入验证码" border="bottom" clearable v-model="userInfo.code">
<template slot="suffix">
<u-code ref="uCode" @change="codeChange" seconds="60" changeText="X秒重新获取"></u-code>
<u-button @click="getCode" :text="tips" :hairline="false" plain style="border: 0px; height: 21px;">
</u-button>
</template>
</u-input>
</u-form-item>
<u-button text="登录" size="large" throttleTime=1000 color="#99241B" style="margin-top: 84rpx; height: 40px;"
@click="login()">
</u-button>
<view class="other_op">
<!-- <text @click="goRegist">注册账号</text> -->
<text @click="goRemeber">忘记密码</text>
</view>
</view>
</u--form>
</view>
<view class="">
<view v-if="load">
<u-loading-page loading-text="登录中..." :loading="load"></u-loading-page>
</view>
<view v-else>
<u-gap height="60" bgColor="#FFF"></u-gap>
<u--form :model="userInfo" ref="loginForm">
<view class="content_main">
<view class="copyright_iocn">
<image style="width: 80rpx; height: 60rpx;" src="../../static/icon10.png" mode=""></image>
<image style="width: 156rpx; height: 50rpx;margin-left: 16rpx;" src="../../static/icon11.png"
mode="">
</image>
</view>
<view class="tab_op">
<view :class="tab == 0?'choosed':'unchoosed'" @click="pwdLog()">
密码登录
</view>
<view class="whiteBox"></view>
<view :class="tab == 1?'choosed':'unchoosed'" @click="codeLog()">
验证码登录
</view>
</view>
<u-form-item prop="number" ref="item1" class="data_itm" v-if="tab == 0">
<u--input placeholder="请输入手机号" border="bottom" clearable v-model="userInfo.number"></u--input>
</u-form-item>
<u-form-item prop="pasw" ref="item1" class="data_itm" v-if="tab == 0">
<u--input type="password" placeholder="请输入密码" border="bottom" clearable v-model="userInfo.pasw">
</u--input>
</u-form-item>
<u-form-item prop="phone" ref="item1" class="data_itm" v-if="tab == 1">
<u--input placeholder="请输入手机号" border="bottom" clearable v-model="userInfo.phone"></u--input>
</u-form-item>
<u-form-item prop="code" ref="item1" class="data_itm" v-if="tab == 1">
<u-input placeholder="请输入验证码" border="bottom" clearable v-model="userInfo.code">
<template slot="suffix">
<u-code ref="uCode" @change="codeChange" seconds="60" changeText="X秒重新获取"></u-code>
<u-button @click="getCode" :text="tips" :hairline="false" plain style="border: 0px; height: 21px;">
</u-button>
</template>
</u-input>
</u-form-item>
<u-button text="登录" size="large" throttleTime=1000 color="#99241B" style="margin-top: 84rpx; height: 40px;"
@click="login()">
</u-button>
<view class="other_op">
<!-- <text @click="goRegist">注册账号</text> -->
<text @click="goRemeber">忘记密码</text>
</view>
</view>
</u--form>
</view>
</view>
</template>
<script>
@ -92,6 +98,7 @@
}],
},
tab: 0,
load: false,
};
},
methods: {
@ -115,32 +122,40 @@
},
login() {
if (this.tab == 0) {
this.load = true
this.http.request('/auth/loginByPwd', {
phone: this.userInfo.number,
pwd: this.userInfo.pasw
}, "POST").then(res => {
uni.setStorageSync('token', res.data.tokenValue)
this.load = false
if (res.code == 200) {
uni.navigateTo({
url: '/pages/pageHome/pageHome'
})
}
}).catch(e => {
this.load = false
uni.showToast({
title: e.data.message,
icon: "none",
});
})
} else if (this.tab == 1) {
this.load = true
this.http.request('/auth/loginByPhone', {
phone: this.userInfo.phone,
code: this.userInfo.code
}, "POST").then(res => {
uni.setStorageSync('token', res.data.tokenValue)
this.load = false
if (res.code == 200) {
uni.navigateTo({
url: '/pages/pageHome/pageHome'
})
}
}).catch(e => {
this.load = false
uni.showToast({
title: e.data.message,
icon: "none",
@ -191,6 +206,9 @@
</script>
<style lang="scss">
/deep/ .u-form-item__body__right__message[data-v-5e7216f1]{
margin-left: 10px !important;
}
.content_main {
margin: 0rpx 76rpx;

View File

@ -114,6 +114,14 @@
<image src="../../static/rightArrow.png" mode=""></image>
</view>
</view>
<view class="content_bott_itm" @click="toAddress()">
<view class="content_bott_wods">
收货地址
</view>
<view class="content_bott_arrow">
<image src="../../static/rightArrow.png" mode=""></image>
</view>
</view>
<view class="content_bott_itm" @click="myNews()">
@ -301,6 +309,12 @@
url: "OrderActControl",
})
},
//
toAddress(){
uni.navigateTo({
url: "/pagesA/ReceivingAddress/ReceivingAddress",
})
},
//
toSz(){
uni.navigateTo({

View File

@ -1,105 +1,86 @@
<template>
<view style="width: calc( 100% - 64rpx); margin: 0 auto;">
<u--form :model="model1" ref="form1" labelWidth='auto' :labelStyle='{fontWeight:800}'>
<u-form-item prop="userInfo.name" ref="item1" label="收货姓名" class="data_itm" borderBottom>
<u--input style="padding: 32rpx;" placeholder="请输入收货人姓名" clearable v-model="model1.userInfo.name"
border="none"></u--input>
</u-form-item>
<u-form-item prop="userInfo.name" ref="item1" label="手机号码" class="data_itm" borderBottom>
<u--input style="padding: 32rpx;" placeholder="请输入手机号码" clearable v-model="model1.userInfo.name"
border="none"></u--input>
</u-form-item>
<u-form-item prop="userInfo.name" ref="item1" label="所在地区" class="data_itm" borderBottom @click="selectAdd">
<u--input style="padding: 32rpx;" placeholder="选择所在地区" readonly clearable v-model="model1.userInfo.AddressText"
suffixIcon="arrow-right" border="none">
</u--input>
</u-form-item>
<u-form-item prop="userInfo.name" ref="item1" label="详细地址" class="data_itm">
<u--input style="padding: 32rpx;" placeholder="街道、楼门排号等" clearable v-model="model1.userInfo.name"
border="none"></u--input>
</u-form-item>
<view class="save" style="padding: 4px 24rpx;">
<u-button text="保存" :customStyle="{'border-radius':'8rpx'}" size="large" throttleTime=1000
color="#99241B" @click="goAddEditPGE"></u-button>
</view>
</u--form>
<view style="position: relative; width: 100%; height: 50px;">
<uni-data-picker ref="picker" style="border: 0px; position: absolute; " :localdata="items" :map="{text:'name',value:'code'}"
popup-title="请选择所在地区" @change="onchange" @nodeclick="onnodeclick">
</uni-data-picker>
<view style="position: absolute; width: 100%; height: 100%; background-color: #FFFFFF;">
</view>
</view>
</view>
<view style="width: calc( 100% - 64rpx); margin: 0 auto;">
<u--form :model="model1" ref="form1" labelWidth='auto' :labelStyle='{fontWeight:800}'>
<u-form-item ref="item1" label="收货姓名" class="data_itm" borderBottom>
<u--input style="padding: 32rpx;" placeholder="请输入收货人姓名" clearable v-model="model1.userInfo.name"
border="none"></u--input>
</u-form-item>
<u-form-item ref="item1" label="手机号码" class="data_itm" borderBottom>
<u--input style="padding: 32rpx;" placeholder="请输入手机号码" clearable v-model="model1.userInfo.phoneNum"
border="none"></u--input>
</u-form-item>
<u-form-item ref="item1" label="所在地区" class="data_itm" borderBottom @click="selectAdd">
<u--input style="padding: 32rpx;" placeholder="选择所在地区" readonly clearable
v-model="model1.userInfo.AddressText" suffixIcon="arrow-right" border="none">
</u--input>
</u-form-item>
<u-form-item ref="item1" label="详细地址" class="data_itm">
<u--input style="padding: 32rpx;" placeholder="街道、楼门排号等" clearable v-model="model1.userInfo.AddressDetail"
border="none"></u--input>
</u-form-item>
<view class="save" style="padding: 4px 24rpx;">
<u-button text="保存" :customStyle="{'border-radius':'8rpx'}" size="large" throttleTime=1000
color="#99241B" @click="goAddEditPGE"></u-button>
</view>
</u--form>
<view style="position: relative; width: 100%; height: 50px;">
<uni-data-picker ref="picker" style="border: 0px; position: absolute; " :localdata="items" v-model="ttt"
:map="{text:'name',value:'code'}" popup-title="请选择所在地区" @change="onchange" @nodeclick="onnodeclick">
</uni-data-picker>
<view style="position: absolute; width: 100%; height: 100%; background-color: #FFFFFF;">
</view>
</view>
</view>
</template>
<script>
import cityData from "/src/pagesA/ReceivingAddress/ChinaCity.js"
export default {
data() {
return {
items: cityData.cityData ,
showAddr: false,
import cityData from "/src/pagesA/ReceivingAddress/ChinaCity.js"
export default {
data() {
return {
items: cityData.cityData,
showAddr: false,
ttt: "330212",
model1: {
userInfo: {
name: '',
phoneNum: '',
meeting: '',
meetingTime: '',
ServerName: '',
Address: '',
AddressText: '',
AddressDetail: '',
},
}
};
},
onLoad(opt) {
console.log(opt.num);
uni.setNavigationBarTitle({
title: opt.name
})
},
methods: {
onchange(e) {
const value = e.detail.value
this.model1.userInfo.AddressText = `${value[0].text}/${value[1].text}/${value[2].text}`
this.Address = value
console.log(this.Address,this.model1.userInfo.AddressText);
// var arr=[{text:'',value:''}]
// value.map((v)=>{ v[0]})
model1: {
userInfo: {
name: '',
sex: '',
birthday: "",
idCOde: '',
zuValue: '',
zhengzhiValue: '',
phoneNum: '',
meeting: '',
meetingTime: '',
ServerName: '',
Address: '',
AddressText:''
},
}
};
},
onLoad(opt) {
console.log(opt.num);
uni.setNavigationBarTitle({
title: opt.name
})
},
computed: {
},
methods: {
onchange(e) {
const value = e.detail.value
// console.log(value);
this.model1.userInfo.AddressText=`${value[0].text}/${value[1].text}/${value[2].text}`
this.Address = value
// var arr=[{text:'',value:''}]
// value.map((v)=>{ v[0]})
},
onnodeclick(node) {},
selectAdd() {
this.$refs.picker.show()
}
}
}
},
onnodeclick(node) {},
selectAdd() {
this.$refs.picker.show()
}
}
}
</script>
<style lang="scss">
page {
background-color: #FFFFFF;
}
page {
background-color: #FFFFFF;
}
</style>

View File

@ -1,56 +1,53 @@
<template>
<view style="width: calc( 100% - 64rpx); margin: 0 auto;">
<view style="width: calc( 100% - 64rpx); margin: 0 auto;">
<view class="address_main" style="margin: 24rpx 0rpx 32rpx; background-color: #FFFFFF; border-radius: 8rpx;">
<view class="address_itm" v-for="(item,index) in 3" :key="index"
style="padding: 32rpx 24rpx 28rpx; border-bottom: 1rpx solid #EFEFF1;">
<view class="address_itm_top"
style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 16rpx; font-weight: 600; font-size: 32rpx;">
<view class="address_main" style="margin: 24rpx 0rpx 32rpx; background-color: #FFFFFF; border-radius: 8rpx;">
<view class="address_itm" v-for="(item,index) in 3" :key="index"
style="padding: 32rpx 24rpx 28rpx; border-bottom: 1rpx solid #EFEFF1;">
<view class="address_itm_top"
style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 16rpx; font-weight: 600; font-size: 32rpx;">
<view class="address_itm_top_text">
<image style="width: 38rpx; height: 38rpx; vertical-align: bottom; margin-right: 16rpx;"
src="../../static/selectID/gouXuan.png" mode=""></image>
<text style="margin-right: 24rpx; ">王毅</text> <text> 16658525844</text>
</view>
<image style="width: 40rpx; height: 40rpx;" src="../../static/editAddress.png" mode=""
@click="goEditAddress(index)"></image>
</view>
<text style="color: #AFADB0;">宁波市高新区智慧园A区</text>
</view>
</view>
<u-button text="添加收货地址" :customStyle="{'border-radius':'8rpx'}" size="large" icon="plus-circle"
iconColor="#FFFFFF" throttleTime=1000 color="#99241B" @click="goAddEditPGE"></u-button>
</view>
<view class="address_itm_top_text">
<image style="width: 38rpx; height: 38rpx; vertical-align: bottom; margin-right: 16rpx;"
src="../../static/selectID/gouXuan.png" mode=""></image>
<text style="margin-right: 24rpx; ">王毅</text> <text> 16658525844</text>
</view>
<image style="width: 40rpx; height: 40rpx;" src="../../static/editAddress.png" mode=""
@click="goEditAddress(index)"></image>
</view>
<text style="color: #AFADB0;">宁波市高新区智慧园A区</text>
</view>
</view>
<u-button text="添加收货地址" :customStyle="{'border-radius':'8rpx'}" size="large" icon="plus-circle"
iconColor="#FFFFFF" throttleTime=1000 color="#99241B" @click="goAddEditPGE"></u-button>
</view>
</template>
<script>
export default {
data() {
return {
export default {
data() {
return {
};
},
methods:{
goEditAddress(num){
uni.navigateTo({
url: `/pages/ReceivingAddress/EditAddresspge?name=修改收货地址&num=${num}`
})
},
goAddEditPGE(){
uni.navigateTo({
url: '/pages/ReceivingAddress/EditAddresspge?name=新建地址 '
})
}
}
}
};
},
methods: {
goEditAddress(num) {
uni.navigateTo({
url: `/pagesA/ReceivingAddress/EditAddresspge?name=修改收货地址&num=${num}`
})
},
goAddEditPGE() {
uni.navigateTo({
url: '/pagesA/ReceivingAddress/EditAddresspge?name=新建地址 '
})
}
}
}
</script>
<style lang="scss">
page {
background-color: #F4F5F7;
}
page {
background-color: #F4F5F7;
}
</style>

View File

@ -23,10 +23,10 @@ export const request = (url,data,method,isback = false, isJson = false) => {
// const Authorization = uni.getStorageSync('Authorization');
if(token){
config.header.Authorization = "Bearer "+ token
// config.header['x-token']= token
config.header['x-token']= token
}else{
config.header.Authorization = ""
// config.header.token = ""
config.header.token = ""
}
} catch (e) {
// error