修改购物车,性别

msb_beta
ch 2 years ago
parent ed54f7000b
commit 70757df47a

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

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

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