修改购物车,性别

msb_beta
ch 3 years ago
parent ed54f7000b
commit 70757df47a

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-03-28 15:38:23
* @LastEditors: ch
* @LastEditTime: 2022-05-05 10:45:27
* @LastEditTime: 2022-05-17 17:42:23
* @Description: file content
-->
<template>
@ -43,7 +43,8 @@ export default {
return curSex ? curSex.label : '未知';
},
sexDefault (){
return [this.sexData[0].findIndex(i => i.val === this.userInfo.gender)];
let defaultVal = this.userInfo.gender || 1
return [this.sexData[0].findIndex(i => i.val === defaultVal)];
}
},
onShow(){
@ -52,8 +53,9 @@ export default {
/**
* 切换性别发起性别修改请求
*/
async sexChange(val){
const value = val.value[0].val;
async sexChange(target){
let value = target.value[0];
value = value ? value.val : this.sexData[0][0].val
const {error, result} = await ApiPutUser({gender:value});
if(error){
ui.$u.totas(error.message);

@ -53,7 +53,7 @@
</template>
<view v-if="item.status === 'notSku'">
<UiButton size="small" class="cart-item--reset-btn" type="line"></UiButton>
<UiButton size="small" class="cart-item--reset-btn" type="line"></UiButton>
</view>
</view>
</UiWhiteBox>
@ -273,6 +273,9 @@ export default {
* 选中商品
*/
handleCheckItem(cartId, status) {
if(status !== 'normal'){
return flase
}
const { checkedIds } = this
const index = checkedIds.findIndex(id => id === cartId)
index < 0 ? checkedIds.push(cartId) : checkedIds.splice(index, 1)

@ -2,7 +2,7 @@
* @Author: ch
* @Date: 2022-04-18 15:28:14
* @LastEditors: ch
* @LastEditTime: 2022-04-29 23:03:22
* @LastEditTime: 2022-05-17 17:55:56
* @Description: file content
-->
<template>
@ -15,7 +15,7 @@
<text class="company--name">{{orderInfo.companyName}}</text>
<view class="company--no">
<text>{{orderInfo.trackingNo}}</text>
<UiCopy :value="orderInfo.trackingNo"/>
<UiCopy class="company--copy" :value="orderInfo.trackingNo"/>
</view>
</UiWhiteBox>
<UiWhiteBox>
@ -74,6 +74,9 @@ page {
display: flex;
align-items: center;
justify-content: space-between;
&--copy{
margin-left: 20rpx;
}
}
.title{
height: 98rpx;

@ -1,2 +1,2 @@
<!DOCTYPE html><html lang=zh-CN><head><meta charset=utf-8><meta http-equiv=X-UA-Compatible content="IE=edge"><title>马士兵严选</title><script>var coverSupport = 'CSS' in window && typeof CSS.supports === 'function' && (CSS.supports('top: env(a)') || CSS.supports('top: constant(a)'))
document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel=stylesheet href=/static/index.a5c69d49.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/static/js/chunk-vendors.b5602bf5.js></script><script src=/static/js/index.d05c3e02.js></script></body></html>
document.write('<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0' + (coverSupport ? ', viewport-fit=cover' : '') + '" />')</script><link rel=stylesheet href=/static/index.a5c69d49.css></head><body><noscript><strong>Please enable JavaScript to continue.</strong></noscript><div id=app></div><script src=/static/js/chunk-vendors.b5602bf5.js></script><script src=/static/js/index.71207765.js></script></body></html>

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long
Loading…
Cancel
Save