msb_beta
ch 4 years ago
parent a11c1f159d
commit 2c76bbe08c

@ -2,7 +2,7 @@
* @Author: ch * @Author: ch
* @Date: 2019-04-01 01:47:12 * @Date: 2019-04-01 01:47:12
* @LastEditors: ch * @LastEditors: ch
* @LastEditTime: 2022-04-29 23:10:37 * @LastEditTime: 2022-04-30 17:47:26
* @Description: file content * @Description: file content
--> -->
<script> <script>
@ -11,7 +11,7 @@
// console.log('App Launch') // console.log('App Launch')
}, },
onShow: function() { onShow: function() {
// console.log('App Show') console.log('App Show')
}, },
onHide: function() { onHide: function() {
// console.log('App Hide') // console.log('App Hide')

@ -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.b44f75e9.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.e11a0d44.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

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

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

File diff suppressed because one or more lines are too long

@ -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-04-29 23:00:21 * @LastEditTime: 2022-04-30 18:08:28
* @Description: file content * @Description: file content
--> -->
<template> <template>
@ -46,6 +46,9 @@ export default {
return [this.sexData[0].findIndex(i => i.val === this.userInfo.gender)]; return [this.sexData[0].findIndex(i => i.val === this.userInfo.gender)];
} }
}, },
onShow(){
console.log('-----++');
},
methods:{ methods:{
/** /**
* 切换性别,发起性别修改请求 * 切换性别,发起性别修改请求
@ -83,13 +86,15 @@ export default {
*/ */
async updateAvatar(val){ async updateAvatar(val){
const file = val.file; const file = val.file;
const urlArr = file.url.split('/');
const fileName = file.name || urlArr[urlArr.length - 1];
const oss = await this.getOssCon(); const oss = await this.getOssCon();
uni.uploadFile({ uni.uploadFile({
name : 'file', name : 'file',
filePath : file.url, filePath : file.url,
url : oss.host, url : oss.host,
formData : { formData : {
name : file.name, name : fileName,
key : `${oss.dir}${'${filename}'}`, key : `${oss.dir}${'${filename}'}`,
policy : oss.policy, policy : oss.policy,
OSSAccessKeyId : oss.accessId, OSSAccessKeyId : oss.accessId,
@ -97,7 +102,8 @@ export default {
signature : oss.signature signature : oss.signature
}, },
success : async (res)=>{ success : async (res)=>{
const avatar = `${oss.host}/${oss.dir}${file.name}`; console.log(res)
const avatar = `${oss.host}/${oss.dir}${fileName}`;
const {error, result} = await ApiPutUser({avatar}); const {error, result} = await ApiPutUser({avatar});
if(error){ if(error){
ui.$u.totas(error.message); ui.$u.totas(error.message);

@ -143,14 +143,15 @@ export default {
return (this.mode === 'normal' ? this.settlementList : this.delList) || [] return (this.mode === 'normal' ? this.settlementList : this.delList) || []
}, },
totalPrice(){ totalPrice(){
const checkedList = this.list.filter(item => this.checkedIds.includes(item.id)); const checkedList = this.list.filter(item => this.checkedIds.includes(item.id)) || [];
let tempPrice = 0; let tempPrice = 0;
checkedList.forEach(item => { checkedList.forEach(item => {
// 商品单价, 为了方便计算先转换单位为分 (整数) // 商品单价, 为了方便计算先转换单位为分 (整数)
const unitPrice = item.productSku.sellPrice * 100 const unitPrice = item.productSku ? item.productSku.sellPrice * 100 : 0
tempPrice += unitPrice * item.number tempPrice += unitPrice * (item.number || 0)
}); });
return (tempPrice / 100).toFixed(2) // return (tempPrice / 100).toFixed(2)
return 0
} }
}, },

@ -2,7 +2,7 @@
* @Author: ch * @Author: ch
* @Date: 2022-03-23 16:37:30 * @Date: 2022-03-23 16:37:30
* @LastEditors: ch * @LastEditors: ch
* @LastEditTime: 2022-04-25 17:39:41 * @LastEditTime: 2022-04-30 18:09:50
* @Description: file content * @Description: file content
--> -->
<template> <template>
@ -11,8 +11,8 @@
v-for="item in sortData" :key="item.value" @click="change(item)"> v-for="item in sortData" :key="item.value" @click="change(item)">
<text class="sort--label">{{item.label}}</text> <text class="sort--label">{{item.label}}</text>
<view v-if="item.sort"> <view v-if="item.sort">
<view class="sort--icon sort--icon__up" :class="{'sort--icon__active' : item.sort === 'ASC' && item.value === active.value}"></view> <view class="sort--icon sort--icon__up" :class="{'sort--icon__active' : item.sort === 'asc' && item.value === active.value}"></view>
<view class="sort--icon sort--icon__down" :class="{'sort--icon__active' : item.sort === 'DESC' && item.value === active.value}"></view> <view class="sort--icon sort--icon__down" :class="{'sort--icon__active' : item.sort === 'desc' && item.value === active.value}"></view>
</view> </view>
</view> </view>
</view> </view>
@ -29,7 +29,7 @@ export default {
{ {
value : 'starting_price', value : 'starting_price',
label : '价格', label : '价格',
sort : 'ASC' sort : 'asc'
}, },
// { // {
// value : 'sales', // value : 'sales',
@ -49,7 +49,7 @@ export default {
methods:{ methods:{
change(item){ change(item){
if(item.sort){ if(item.sort){
item.sort === 'ASC' ? item.sort = 'DESC' : item.sort = 'ASC'; item.sort === 'asc' ? item.sort = 'desc' : item.sort = 'asc';
} }
console.log(item.value + item.sort , this.active.value + this.active.sort); console.log(item.value + item.sort , this.active.value + this.active.sort);
if(item.value + item.sort === this.active.value + this.active.sort){ if(item.value + item.sort === this.active.value + this.active.sort){

@ -2,7 +2,7 @@
* @Author: ch * @Author: ch
* @Date: 2022-03-20 14:14:53 * @Date: 2022-03-20 14:14:53
* @LastEditors: ch * @LastEditors: ch
* @LastEditTime: 2022-04-29 23:04:31 * @LastEditTime: 2022-04-30 18:46:07
* @Description: file content * @Description: file content
--> -->
<template> <template>
@ -23,8 +23,8 @@
<UiWhiteBox> <UiWhiteBox>
<ui-goods-info v-for="item in orderInfo.products" <UiGoodsInfo v-for="item in orderInfo.products"
:key="item.productId" :data="item" ></ui-goods-info> :key="item.productId" :data="item" />
</UiWhiteBox> </UiWhiteBox>
<UiWhiteBox> <UiWhiteBox>
@ -88,13 +88,15 @@ export default {
// 从地址列表页改变了收货地址 // 从地址列表页改变了收货地址
uni.$on('changeAddress',(item)=>{ uni.$on('changeAddress',(item)=>{
this.address = item; this.address = item;
this.getBeforeOrder();
}); });
}, },
onShow(){ onShow(){
// 默认选择设为默认的地址 // 默认选择设为默认的地址
if(!this.address.id){
this.address = this.$store.state.address.find(i => i.isDefault) || {}; this.address = this.$store.state.address.find(i => i.isDefault) || {};
}
this.getBeforeOrder(); this.getBeforeOrder();
}, },
methods:{ methods:{
/** /**

Loading…
Cancel
Save