fixbug: 修复部分bug

This commit is contained in:
2025-08-17 07:30:48 +08:00
parent 19fe51883f
commit 5398b4234d
9 changed files with 95 additions and 237 deletions
+2 -2
View File
@@ -2,8 +2,8 @@
"name" : "信任桥", "name" : "信任桥",
"appid" : "__UNI__4910728", "appid" : "__UNI__4910728",
"description" : "信任桥优品是一款集线上商城、线下联盟商家的DAO聚合商城;通过“有趣”“有利”“有希望”的卖货玩法,吸引消费者、推广者、商家、投资人参与生态,共同打造共创共享的全球产业生态。", "description" : "信任桥优品是一款集线上商城、线下联盟商家的DAO聚合商城;通过“有趣”“有利”“有希望”的卖货玩法,吸引消费者、推广者、商家、投资人参与生态,共同打造共创共享的全球产业生态。",
"versionName" : "1.0.0", "versionName" : "1.0.2",
"versionCode" : 125, "versionCode" : 127,
"transformPx" : false, "transformPx" : false,
/* 5+App特有相关 */ /* 5+App特有相关 */
"app-plus" : { "app-plus" : {
+24 -23
View File
@@ -15,13 +15,13 @@
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{ // {
"path": "pages/index/index", // "path": "pages/index/index",
"style": { // "style": {
"navigationBarTitleText": "%index.title%", // "navigationBarTitleText": "%index.title%",
"navigationStyle": "custom" // "navigationStyle": "custom"
} // }
}, // },
{ {
"path": "pages/sort/sort", "path": "pages/sort/sort",
@@ -35,22 +35,13 @@
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{ // {
"path": "pages/LuckyWheel/LuckyWheel", // "path": "pages/LuckyWheel/LuckyWheel",
"style": { // "style": {
"navigationBarTitleText": "" // "navigationBarTitleText": ""
} // }
}, // },
{
"path": "pages/merchant_settlement/merchant_settlement",
"style": {
"navigationBarTitleText": "%mine.merchant.settlement.title%",
"navigationBarBackgroundColor": "#FFFFFF",
"navigationBarTextStyle": "black",
"enablePullDownRefresh": false,
"navigationStyle": "default" // 默认样式,会显示返回图标
}
},
{ {
"path": "pages/supply_chain/supply_chain", "path": "pages/supply_chain/supply_chain",
"style": { "style": {
@@ -257,6 +248,16 @@
"navigationStyle": "custom" "navigationStyle": "custom"
} }
}, },
{
"path": "merchant_settlement/merchant_settlement",
"style": {
"navigationBarTitleText": "%mine.merchant.settlement.title%",
"navigationBarBackgroundColor": "#FFFFFF",
"navigationBarTextStyle": "black",
"enablePullDownRefresh": false,
"navigationStyle": "default" // 默认样式,会显示返回图标
}
},
{ {
"path": "dongjian/index", "path": "dongjian/index",
"style": { "style": {
+1 -1
View File
@@ -88,7 +88,7 @@
radius='15'></up-image> radius='15'></up-image>
<view class="product_f_item"> <view class="product_f_item">
<view class="product_f_item_name">{{ item.title }}</view> <view class="product_f_item_name">{{ item.title }}</view>
<view class="product_f_item_price product_f_item_price_hx">优选价{{ item.adPrice }}元</view> <view class="product_f_item_price product_f_item_price_hx">优选价{{ item.price }}元</view>
</view> </view>
</view> </view>
</view> </view>
-151
View File
@@ -1,151 +0,0 @@
<template>
<view class="container">
<view class="title">{{$t('index.demo')}}</view>
<view class="description">{{$t('index.demo-description')}}</view>
<view class="detail-link">{{$t('index.detail')}}: <text
class="link">https://uniapp.dcloud.net.cn/collocation/i18n</text></view>
<view class="locale-setting">{{$t('index.language-info')}}</view>
<view class="list-item">
<text class="k">{{$t('index.system-language')}}:</text>
<text class="v">{{systemLocale}}</text>
</view>
<view class="list-item">
<text class="k">{{$t('index.application-language')}}:</text>
<text class="v">{{applicationLocale}}</text>
</view>
<view class="locale-setting">{{$t('index.language')}}</view>
<view class="locale-list">
<view class="locale-item" v-for="(item, index) in locales" :key="index" @click="onLocaleChange(item)">
<text class="text">{{item.text}}</text>
<text class="icon-check" v-if="item.code == applicationLocale"></text>
</view>
</view>
</view>
</template>
<script>
export default {
data() {
return {
systemLocale: '',
applicationLocale: ''
}
},
computed:{
locales() {
return [{
text: this.$t('locale.auto'),
code: 'auto'
}, {
text: this.$t('locale.en'),
code: 'en'
},
{
text: this.$t('locale.zh-hans'),
code: 'zh-Hans'
},
{
text: this.$t('locale.zh-hant'),
code: 'zh-Hant'
},
{
text: this.$t('locale.ja'),
code: 'ja'
}
]
}
},
onLoad() {
let systemInfo = uni.getSystemInfoSync();
this.systemLocale = systemInfo.language;
this.applicationLocale = uni.getLocale();
this.isAndroid = systemInfo.platform.toLowerCase() === 'android';
uni.onLocaleChange((e) => {
this.applicationLocale = e.locale;
})
},
methods: {
onLocaleChange(e) {
if (this.isAndroid) {
uni.showModal({
content: this.$t('index.language-change-confirm'),
success: (res) => {
if (res.confirm) {
uni.setLocale(e.code);
}
}
})
} else {
uni.setLocale(e.code);
this.$i18n.locale = e.code;
}
}
}
}
</script>
<style>
.title {
font-size: 16px;
font-weight: bold;
margin-bottom: 15px;
}
.description {
font-size: 14px;
opacity: 0.6;
margin-bottom: 15px;
}
.detail-link {
font-size: 14px;
word-break: break-all;
}
.link {
color: #007AFF;
margin-left: 10px;
}
.locale-setting {
font-size: 16px;
font-weight: bold;
margin-top: 25px;
margin-bottom: 5px;
padding-bottom: 5px;
border-bottom: 1px solid #f0f0f0;
}
.list-item {
font-size: 14px;
padding: 10px 0;
}
.list-item .v {
margin-left: 5px;
}
.locale-item {
display: flex;
flex-direction: row;
padding: 10px 0;
}
.locale-item .text {
flex: 1;
}
.icon-check {
margin-right: 5px;
border: 2px solid #007aff;
border-left: 0;
border-top: 0;
height: 12px;
width: 6px;
transform-origin: center;
/* #ifndef APP-NVUE */
transition: all 0.3s;
/* #endif */
transform: rotate(45deg);
}
</style>
+1 -1
View File
@@ -121,7 +121,7 @@
<view class="content_"> <view class="content_">
<view class="content_1">企业入驻</view> <view class="content_1">企业入驻</view>
<view class="content_2">请联系负责人</view> <view class="content_2">请联系负责人</view>
<view class="content_3">{{CUSTOMER_SERVICE_PHONE_NUMBER}}</view> <view class="content_3">{{ CUSTOMER_SERVICE_PHONE_NUMBER }}</view>
</view> </view>
<view class="but_"> <view class="but_">
<view class="but_copy" @click="copyMobile(CUSTOMER_SERVICE_PHONE_NUMBER)">复制号码</view> <view class="but_copy" @click="copyMobile(CUSTOMER_SERVICE_PHONE_NUMBER)">复制号码</view>
@@ -82,7 +82,7 @@ export default {
} }
const ids = option.ids; const ids = option.ids;
if (ids && ids !== 0) { if (ids && ids !== 0) {
this.leftPath = "/pages/order_package/order_submit/order_submit?ids=" + ids + "&addressShow = true"; this.leftPath = "/pages/order_package/order_submit/order_submit?ids=" + ids + "&addressShow=true";
} }
}, },
methods: { methods: {
@@ -246,6 +246,8 @@ export default {
message: params.id && params.id !== 0 ? '修改成功' : "添加成功", message: params.id && params.id !== 0 ? '修改成功' : "添加成功",
}); });
const leftPath = this.leftPath; const leftPath = this.leftPath;
console.log("参数--111-", leftPath)
setTimeout(() => { setTimeout(() => {
uni.navigateTo({ uni.navigateTo({
url: leftPath, url: leftPath,
@@ -180,7 +180,7 @@
import Address from '@/components/address.vue'; import Address from '@/components/address.vue';
import { getGoodsDetail } from '@/api/product.js'; import { getGoodsDetail } from '@/api/product.js';
import { PAYMENT_WAY, PAYMENT_WAY_, PRODUCT_DELIVERY_TIME, getValue, WAY_LIST } from '@/utils/enumUtils.js'; import { PAYMENT_WAY, PAYMENT_WAY_, PRODUCT_DELIVERY_TIME, getValue, WAY_LIST } from '@/utils/enumUtils.js';
import { getSettleList, settle,settlementOrder, updateGoodsNum } from '@/api/cart.js'; import { getSettleList, settle, settlementOrder, updateGoodsNum } from '@/api/cart.js';
import { getSupportPay } from '@/api/order.js'; import { getSupportPay } from '@/api/order.js';
import { feedback } from '@/api/payment.js'; import { feedback } from '@/api/payment.js';
import { assembleAddress } from '@/utils/index.js' import { assembleAddress } from '@/utils/index.js'
@@ -216,14 +216,14 @@ export default {
selectAddress: {},// 收件地址选择 selectAddress: {},// 收件地址选择
wayOption: [], wayOption: [],
isShowBalance: false, isShowBalance: false,
ji:0, ji: 0,
sed:null, sed: null,
curPay:null curPay: null
}; };
}, },
onLoad(option) { onLoad(option) {
// const ids = option.ids; // const ids = option.ids;
if(option.sed){ if (option.sed) {
this.ji = 1; this.ji = 1;
this.sed = JSON.parse(option.sed) this.sed = JSON.parse(option.sed)
this.getOrderTwo(); this.getOrderTwo();
@@ -232,9 +232,11 @@ export default {
this.ids = option.ids; this.ids = option.ids;
this.getOrder(); this.getOrder();
} }
const addressShow = option.addressShow; console.log("参数---", option)
if (addressShow && addressShow !== "null") {
this.addressShow = addressShow; const addressShowPop = option.addressShow;
if (addressShowPop && addressShowPop !== "null") {
this.addressShow = addressShowPop;
} }
// 支付弹框 // 支付弹框
const payOpen = option.payOpen; const payOpen = option.payOpen;
@@ -266,12 +268,12 @@ export default {
async getWayOption() { async getWayOption() {
let parmas = { let parmas = {
} }
if(this.ji){ if (this.ji) {
parmas['types'] = '4'; parmas['types'] = '4';
}else{ } else {
parmas['types'] = '2,3'; parmas['types'] = '2,3';
} }
console.log('this.ji',parmas) console.log('this.ji', parmas)
const result = await getSupportPay(parmas); const result = await getSupportPay(parmas);
if (result && result.bizcode === 100) { if (result && result.bizcode === 100) {
const data = result.data || []; const data = result.data || [];
@@ -285,7 +287,7 @@ export default {
this.isShowBalance = balanceFlag; this.isShowBalance = balanceFlag;
} }
this.wayOption = data; this.wayOption = data;
console.log('getWayOption',this.wayOption) console.log('getWayOption', this.wayOption)
} }
}, },
async getOrder() { async getOrder() {
@@ -330,42 +332,42 @@ export default {
const data = resp.data; const data = resp.data;
this.ji = data.type == 3 ? 1 : 0; this.ji = data.type == 3 ? 1 : 0;
this.orderInfo = { this.orderInfo = {
address:null, address: null,
amount:this.sed.goodsNum * this.sed.specsId.price, amount: this.sed.goodsNum * this.sed.specsId.price,
shops:[{ shops: [{
addrTimes:[ addrTimes: [
{ {
address:null, address: null,
deliveryTime:data.deliveryTime, deliveryTime: data.deliveryTime,
postagesId:data.postagesId, postagesId: data.postagesId,
postagesType:1, postagesType: 1,
goods:[ goods: [
{ {
adress:null, adress: null,
addressId:null, addressId: null,
areaName:null, areaName: null,
cityName:null, cityName: null,
goodsId:this.sed.id, goodsId: this.sed.id,
id:this.sed.specsId.id, id: this.sed.specsId.id,
img:data.goodsGraph, img: data.goodsGraph,
name:null, name: null,
num:this.sed.goodsNum, num: this.sed.goodsNum,
phone:null, phone: null,
provinceName:null, provinceName: null,
specs:this.sed.specsId.combNames, specs: this.sed.specsId.combNames,
title:data.name, title: data.name,
totalPrice:this.sed.goodsNum * this.sed.specsId.price, totalPrice: this.sed.goodsNum * this.sed.specsId.price,
unitPrice:this.sed.specsId.price unitPrice: this.sed.specsId.price
} }
] ]
} }
],id:data.shop.id,logo:data.shop.logo,name:data.shop.name ], id: data.shop.id, logo: data.shop.logo, name: data.shop.name
}] }]
}; };
this.orderInfo.paymentMethod = null; this.orderInfo.paymentMethod = null;
} }
// const params = { // const params = {
// cartIds: ids, // cartIds: ids,
@@ -453,8 +455,8 @@ export default {
* 去支付 * 去支付
*/ */
async goPay() { async goPay() {
console.log('getWayOption',this.wayOption,this.orderInfo) console.log('getWayOption', this.wayOption, this.orderInfo)
const orderInfo = this.orderInfo; const orderInfo = this.orderInfo;
if (!orderInfo.address || Object.keys(orderInfo.address).length === 0) { if (!orderInfo.address || Object.keys(orderInfo.address).length === 0) {
@@ -473,10 +475,10 @@ export default {
}); });
return; return;
} }
let arr = this.wayOption.filter(i=>i.type == orderInfo.paymentMethod); let arr = this.wayOption.filter(i => i.type == orderInfo.paymentMethod);
if(arr.length){ if (arr.length) {
if(arr[0].type == 'balance' || arr[0].type == 'redpacket'){ if (arr[0].type == 'balance' || arr[0].type == 'redpacket') {
if(arr[0].balance < orderInfo.amount){ if (arr[0].balance < orderInfo.amount) {
this.$refs.uToastRef.show({ this.$refs.uToastRef.show({
type: 'error', type: 'error',
message: "余额不足", message: "余额不足",
@@ -484,14 +486,14 @@ export default {
return; return;
} }
} }
}else{ } else {
this.$refs.uToastRef.show({ this.$refs.uToastRef.show({
type: 'error', type: 'error',
message: "请先选择支付方式", message: "请先选择支付方式",
}); });
return; return;
} }
const params = { const params = {
addrId: orderInfo.address.id,// 收货地址ID addrId: orderInfo.address.id,// 收货地址ID
//结算的购物车ID,多个以逗号分割,ALL表示全选 //结算的购物车ID,多个以逗号分割,ALL表示全选
@@ -499,19 +501,19 @@ export default {
remark: JSON.stringify(this.getRemark()),//备注信息'[{"sid":"店铺ID","rmk":"备注内容"},{"sid":"店铺ID","rmk":"备注内容"}]' remark: JSON.stringify(this.getRemark()),//备注信息'[{"sid":"店铺ID","rmk":"备注内容"},{"sid":"店铺ID","rmk":"备注内容"}]'
} }
let resp = null; let resp = null;
if(this.sed){ if (this.sed) {
params['goodsId'] = this.sed.id; params['goodsId'] = this.sed.id;
params['specsId'] = this.sed.specsId.id; params['specsId'] = this.sed.specsId.id;
params['goodsNum'] = this.orderInfo.shops[0].addrTimes[0].goods[0].num; params['goodsNum'] = this.orderInfo.shops[0].addrTimes[0].goods[0].num;
resp = await settlementOrder(params); resp = await settlementOrder(params);
}else{ } else {
params['cartIds'] = this.ids; params['cartIds'] = this.ids;
resp = await settle(params); resp = await settle(params);
} }
console.log('getWayOption',resp) console.log('getWayOption', resp)
// 提交订单成功,就唤起支付 // 提交订单成功,就唤起支付
if (resp && resp.bizcode === 100) { if (resp && resp.bizcode === 100) {
const item = resp.data; const item = resp.data;
+8 -4
View File
@@ -27,7 +27,8 @@
</view> </view>
<view class="table-list" v-for="(item, index) in tableList" :key="index"> <view class="table-list" v-for="(item, index) in tableList" :key="index">
<view class="list-box flex-c" v-for="(key, indexT) in 3" :key="indexT" <view class="list-box flex-c" v-for="(key, indexT) in 3" :key="indexT"
:style="{ 'border-bottom-right-radius': index == tableList.length - 1 && indexT == 2 ? '16rpx' : 0 }" :class="{ :style="{ 'border-bottom-right-radius': index == tableList.length - 1 && indexT == 2 ? '16rpx' : 0 }"
:class="{
'border-lr': indexT != 1, 'border-lr': indexT != 1,
'border-left-1': index == tableList.length - 1 && indexT == 0 'border-left-1': index == tableList.length - 1 && indexT == 0
}"> }">
@@ -63,6 +64,7 @@ import Header from '@/components/common/header.vue';
import TopSafe from '@/components/common/top-safe.nvue' import TopSafe from '@/components/common/top-safe.nvue'
import DownPopup from '@/components/common/down-popup.vue'; import DownPopup from '@/components/common/down-popup.vue';
import { quickens } from '@/api/contract.js' import { quickens } from '@/api/contract.js'
import Decimal from 'decimal.js';
import func from '@/utils/func.js'; import func from '@/utils/func.js';
@@ -104,8 +106,9 @@ export default {
this.topList[2].value = res.data.quickenBalance; this.topList[2].value = res.data.quickenBalance;
this.tableList = res.data.quickenDetail; this.tableList = res.data.quickenDetail;
this.tableList.forEach(item => { this.tableList.forEach(item => {
item.one = item.quickenRate * 100 + '%'; const ratio = new Decimal(item.quickenRate);
item.two = item.quickenValue; item.one = ratio.times(100).toNumber() + '%';
item.two = new Decimal(item.quickenValue);
item.three = func.formatDate(new Date(item.ctdate), 3) item.three = func.formatDate(new Date(item.ctdate), 3)
}) })
} else { } else {
@@ -127,7 +130,8 @@ export default {
//去签署 //去签署
} }
} },
} }
} }
</script> </script>