This commit is contained in:
unknown 2021-09-14 09:17:07 +08:00
parent 29c9752c66
commit 060e3e660a
10 changed files with 158 additions and 70 deletions

View File

@ -18,17 +18,17 @@
} }
} }
}, },
{ // {
"path": "pages/tabBar/category/category", // "path": "pages/tabBar/category/category",
"style": { // "style": {
"navigationBarTextStyle":"black", // "navigationBarTextStyle":"black",
"app-plus": { // "app-plus": {
"titleNView": false ,// // "titleNView": false ,//
"bounce":"none" // "bounce":"none"
} // }
} // }
}, // },
{ {
"path": "pages/tabBar/cart/cart", "path": "pages/tabBar/cart/cart",
"style": { "style": {
@ -259,24 +259,24 @@
"backgroundColorBottom":"#ffffff" "backgroundColorBottom":"#ffffff"
} }
} }
,{ // ,{
"path" : "pages/user/deposit/deposit", // "path" : "pages/user/deposit/deposit",
"style" : { // "style" : {
"navigationBarBackgroundColor":"#ffffff", // "navigationBarBackgroundColor":"#ffffff",
"navigationBarTitleText":"充值", // "navigationBarTitleText":"充值",
"backgroundColorTop":"#ffffff", // "backgroundColorTop":"#ffffff",
"backgroundColorBottom":"#ffffff" // "backgroundColorBottom":"#ffffff"
} // }
} // }
,{ // ,{
"path" : "pages/pay/payment/payment", // "path" : "pages/pay/payment/payment",
"style" : { // "style" : {
"navigationBarBackgroundColor":"#ffffff", // "navigationBarBackgroundColor":"#ffffff",
"navigationBarTitleText":"订单支付", // "navigationBarTitleText":"订单支付",
"backgroundColorTop":"#ffffff", // "backgroundColorTop":"#ffffff",
"backgroundColorBottom":"#ffffff" // "backgroundColorBottom":"#ffffff"
} // }
} // }
,{ ,{
"path" : "pages/pay/payment/uppayment", "path" : "pages/pay/payment/uppayment",
"style" : { "style" : {

View File

@ -33,7 +33,7 @@
<view class="product-list"> <view class="product-list">
<view class="product" v-for="(goods) in goodsList" :key="goods.id" @tap="toGoods(goods)"> <view class="product" v-for="(goods) in goodsList" :key="goods.id" @tap="toGoods(goods)">
<image mode="aspectFill" :src="goods.picurl"></image> <image mode="aspectFill" :src="goods.picurl"></image>
<view class="name">{{goods.title}}</view> <view v-html="brightenKeyword(goods.title,keyword)" class="name"></view>
<view class="info"> <view class="info">
<view class="price">{{goods.price}}</view> <view class="price">{{goods.price}}</view>
<!-- <view class="slogan">{{ goods.pay_num }}人已付款</view> --> <!-- <view class="slogan">{{ goods.pay_num }}人已付款</view> -->
@ -219,6 +219,15 @@
that.keywords = [] that.keywords = []
uni.setStorageSync('keywords',[]) uni.setStorageSync('keywords',[])
}, },
brightenKeyword(val, keyword) {
const Reg = new RegExp(keyword, 'i');
let res = '';
if (val) {
res = val.replace(Reg, `<span style="color: red;font-style:normal">${keyword}</span>`);
return res;
}
},
// //
toGoods(e){ toGoods(e){
uni.showToast({title: '商品'+e.goods_id,icon:"none"}); uni.showToast({title: '商品'+e.goods_id,icon:"none"});

View File

@ -150,6 +150,9 @@
</view> </view>
<!-- 属性-规格选择 --> <!-- 属性-规格选择 -->
<view class="info-box spec"> <view class="info-box spec">
<view class="row">
<view class="">{{good.username}}</view>
</view>
<view class="row" @tap="showService"> <view class="row" @tap="showService">
<view class="text">服务</view> <view class="text">服务</view>
<view class="content"> <view class="content">

View File

@ -7,9 +7,20 @@
</image> </image>
</view> </view>
</view> </view>
<!-- 登录方式 -->
<view style=" width: 80%; display: flex; justify-content: space-around; padding-bottom: 50upx; margin: auto;color: #b7cbcc;line-height: 70upx;">
<view v-for="(grid,loginIndex) in orderType" :key="loginIndex" @tap="showType(loginIndex)">
<view :class="[loginIndex==tabIndex?'on':'']">{{grid}}</view>
</view>
</view>
<!-- 账号密码输入框 --> <!-- 账号密码输入框 -->
<view class="form"> <view class="form">
<view class="username"> <!-- 手机登录 -->
<view v-if="tabIndex===0" class="username">
<input placeholder="请输入手机号" v-model="username" placeholder-style="color: rgba(255,255,255,0.8);" />
</view>
<!-- 账号登录 -->
<view v-else class="username">
<input placeholder="请输入账号" v-model="username" placeholder-style="color: rgba(255,255,255,0.8);" /> <input placeholder="请输入账号" v-model="username" placeholder-style="color: rgba(255,255,255,0.8);" />
</view> </view>
<view class="password"> <view class="password">
@ -49,7 +60,9 @@
qq: false, qq: false,
sinaweibo: false, sinaweibo: false,
xiaomi: false xiaomi: false
} },
tabIndex:0,
orderType: ['手机登录','账号登录'],
} }
}, },
onShow() { onShow() {
@ -65,6 +78,9 @@
}, },
methods: { methods: {
showType(loginIndex){
this.tabIndex = loginIndex;
},
oauthLogin(provider) { oauthLogin(provider) {
uni.showLoading(); uni.showLoading();
// //
@ -143,11 +159,23 @@
uni.showLoading({ uni.showLoading({
title: '提交中...' title: '提交中...'
}) })
that.$u.api.login({ let data = {};
if(that.tabIndex===0){
data={
code: loginRes.code, code: loginRes.code,
type:'mobphone',
username: that.username, username: that.username,
password: that.password password: that.password
}).then( }
}else{
data={
code: loginRes.code,
type:'username',
username: that.username,
password: that.password
}
}
that.$u.api.login(data).then(
res => { res => {
uni.hideLoading() uni.hideLoading()
if(res.code==0){ if(res.code==0){
@ -209,6 +237,11 @@
} }
} }
} }
.on{
color: #ffffff;
line-height: 70rpx;
border-bottom: solid 4upx #ffffff;
}
.oauth { .oauth {
@media all and (max-height:150vw) { @media all and (max-height:150vw) {

View File

@ -7,7 +7,7 @@
</view> </view>
<view class="form re"> <view class="form re">
<view class="username"> <view class="username">
<input placeholder="请输入用户账号" v-model="userName" @blur="nameSearch" @input="nameSearch" placeholder-style="color: rgba(255,255,255,0.8);"/> <input placeholder="请输入用户账号(登录账号)" v-model="userName" @blur="nameSearch" @input="nameSearch" placeholder-style="color: rgba(255,255,255,0.8);"/>
<text v-if="!unique" class="nameAlready">用户名已存在</text> <text v-if="!unique" class="nameAlready">用户名已存在</text>
</view> </view>
<view class="username"> <view class="username">
@ -18,7 +18,7 @@
<input placeholder="请输入验证码" v-model="code" placeholder-style="color: rgba(255,255,255,0.8);"/> <input placeholder="请输入验证码" v-model="code" placeholder-style="color: rgba(255,255,255,0.8);"/>
</view> </view>
<view class="password"> <view class="password">
<input placeholder="请输入密码" v-model="password" password=true placeholder-style="color: rgba(255,255,255,0.8);"/> <input placeholder="请输入密码(登录密码)" v-model="password" password=true placeholder-style="color: rgba(255,255,255,0.8);"/>
</view> </view>
<view class="btn" @tap="doReg">立即注册</view> <view class="btn" @tap="doReg">立即注册</view>
<view class="res"> <view class="res">

View File

@ -16,6 +16,10 @@
</view> </view>
<!-- 商品 --> <!-- 商品 -->
<view class="carrier" :class="[theIndex==index?'open':oldIndex==index?'close':'']" @touchstart="touchStart(index,$event)" @touchmove="touchMove(index,$event)" @touchend="touchEnd(index,$event)"> <view class="carrier" :class="[theIndex==index?'open':oldIndex==index?'close':'']" @touchstart="touchStart(index,$event)" @touchmove="touchMove(index,$event)" @touchend="touchEnd(index,$event)">
<view style=" width: 100%; padding: 20rpx 0 20rpx 150rpx;">
{{row.username}}
</view>
<view style=" display: flex;">
<!-- checkbox --> <!-- checkbox -->
<view class="checkbox-box" @tap="selected(index)"> <view class="checkbox-box" @tap="selected(index)">
<view class="checkbox"> <view class="checkbox">
@ -50,6 +54,7 @@
</view> </view>
</view> </view>
</view> </view>
</view>
<!-- 脚部菜单 --> <!-- 脚部菜单 -->
<view class="footer" :style="{bottom:footerbottom}"> <view class="footer" :style="{bottom:footerbottom}">
<view class="checkbox-box" @tap="allSelect"> <view class="checkbox-box" @tap="allSelect">
@ -425,7 +430,7 @@
} }
.row{ .row{
width: calc(92%); width: calc(92%);
height: calc(22vw + 40upx); height: calc(22vw + 110upx);
margin: 20upx auto; margin: 20upx auto;
border-radius: 15upx; border-radius: 15upx;
@ -453,6 +458,7 @@
z-index: 2; z-index: 2;
} }
.carrier{ .carrier{
flex-direction: column;
@keyframes showMenu { @keyframes showMenu {
0% {transform: translateX(0);}100% {transform: translateX(-30%);} 0% {transform: translateX(0);}100% {transform: translateX(-30%);}
} }

View File

@ -115,6 +115,7 @@
{text:'待发货',icon:"fahuo"}, {text:'待发货',icon:"fahuo"},
{text:'待收货',icon:"shouhuo"}, {text:'待收货',icon:"shouhuo"},
{text:'待开票',icon:"pingjia"}, {text:'待开票',icon:"pingjia"},
{text:'待收票',icon:"qr"},
{text:'全部',icon:"tuihuo"} {text:'全部',icon:"tuihuo"}
], ],
// //

View File

@ -49,6 +49,30 @@
<input placeholder="请输入" type="text" v-model="account" /> <input placeholder="请输入" type="text" v-model="account" />
</view> </view>
</view> </view>
<view class="row">
<view class="nominal">
联系人
</view>
<view class="input">
<input placeholder="请输入联系人" type="text" v-model="user" />
</view>
</view>
<view class="row">
<view class="nominal">
联系电话
</view>
<view class="input">
<input placeholder="请输入联系电话" type="text" v-model="invoice_tel" />
</view>
</view>
<view class="row">
<view class="nominal">
收票地址
</view>
<view class="input">
<input placeholder="请输入收票地址" type="text" v-model="invoice_addr" />
</view>
</view>
<!-- <view class="row"> <!-- <view class="row">
<view class="nominal"> <view class="nominal">
所在地区 所在地区
@ -101,6 +125,9 @@
often: false, often: false,
cityPickerValue: [0, 0, 1], cityPickerValue: [0, 0, 1],
themeColor: '#007AFF', themeColor: '#007AFF',
user:'',
invoice_tel:'',
invoice_addr:'',
// region:{label:"",value:[],cityCode:""} // region:{label:"",value:[],cityCode:""}
}; };
}, },
@ -146,7 +173,10 @@
"telphone": this.telphone, "telphone": this.telphone,
"bank": this.bank, "bank": this.bank,
"account": this.account, "account": this.account,
"often": this.often "often": this.often,
"user": this.user,
"invoice_tel": this.invoice_tel,
"invoice_addr": this.invoice_addr,
} }
if (this.editType == 'edit') { if (this.editType == 'edit') {
data.id = this.id data.id = this.id
@ -202,6 +232,9 @@
this.bank = e.data.bank; this.bank = e.data.bank;
this.account = e.data.account; this.account = e.data.account;
this.often = e.data.often; this.often = e.data.often;
this.user = e.data.user;
this.invoice_tel = e.data.invoice_tel;
this.invoice_addr = e.data.invoice_addr;
// this.cityPickerValue = e.data.address.region.value; // this.cityPickerValue = e.data.address.region.value;
// this.region = e.data.address.region; // this.region = e.data.address.region;
} }
@ -261,6 +294,7 @@
.content { .content {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
padding-bottom: 120upx;
view { view {
display: flex; display: flex;

View File

@ -111,16 +111,17 @@
}, 700) }, 700)
}, },
cancelOrder(){ cancelOrder(){
var that = this var that = this;
uni.showModal({ uni.showModal({
content: '确认取消订单吗?', content: '确认取消订单吗?',
success: function (res) { success: function (res) {
if (res.confirm) { if (res.confirm) {
that.$u.api.qxdd(this.row).then(res=>{ that.$u.api.qxdd(that.row.id).then(res=>{
uni.showToast({ uni.showToast({
title: '取消成功', title: '取消成功',
icon:'none' icon:'none'
}); });
uni.navigateBack();
}) })
} }
} }
@ -133,7 +134,7 @@
content: '确认收货吗?', content: '确认收货吗?',
success: function (res) { success: function (res) {
if (res.confirm) { if (res.confirm) {
that.$u.api.qrsh(this.row.id).then(res=>{ that.$u.api.qrsh(that.row.id).then(res=>{
uni.showToast({ uni.showToast({
title: '确认成功', title: '确认成功',
icon:'none' icon:'none'

View File

@ -39,6 +39,7 @@
</view> </view>
</view> </view>
<view>{{row.shop_db[0].username}}</view>
<view class="order-info" v-for="row in row.shop_db" v-bind:key="row.id" @click="orderDetail(row,index)"> <view class="order-info" v-for="row in row.shop_db" v-bind:key="row.id" @click="orderDetail(row,index)">
<view class="left"> <view class="left">
<image :src="row.picurl"></image> <image :src="row.picurl"></image>
@ -101,14 +102,14 @@
cancelled:'订单已取消' cancelled:'订单已取消'
}, },
// orderType: ['','','','','','退'], // orderType: ['','','','','','退'],
orderType: ['待付款','待发货','待收货', '待开票', '全部'], orderType: ['待付款','待发货','待收货', '待开票',' 待收票', '全部'],
orderQuery:['ispay', 'noshipping', 'noreceive', 'noinvoice', ''], orderQuery:['ispay', 'noshipping', 'noreceive', 'noinvoice','noreceive_invoice', ''],
// //
orderList:[ orderList:[
[],[],[],[],[] [],[],[],[],[]
], ],
list:[], list:[],
pagelist:[1,1,1,1,1], pagelist:[1,1,1,1,1,1],
tabbarIndex:0, tabbarIndex:0,
}; };
}, },