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" : "信任桥",
"appid" : "__UNI__4910728",
"description" : "信任桥优品是一款集线上商城、线下联盟商家的DAO聚合商城;通过“有趣”“有利”“有希望”的卖货玩法,吸引消费者、推广者、商家、投资人参与生态,共同打造共创共享的全球产业生态。",
"versionName" : "1.0.0",
"versionCode" : 125,
"versionName" : "1.0.2",
"versionCode" : 127,
"transformPx" : false,
/* 5+App特有相关 */
"app-plus" : {
+24 -23
View File
@@ -15,13 +15,13 @@
"navigationStyle": "custom"
}
},
{
"path": "pages/index/index",
"style": {
"navigationBarTitleText": "%index.title%",
"navigationStyle": "custom"
}
},
// {
// "path": "pages/index/index",
// "style": {
// "navigationBarTitleText": "%index.title%",
// "navigationStyle": "custom"
// }
// },
{
"path": "pages/sort/sort",
@@ -35,22 +35,13 @@
"navigationStyle": "custom"
}
},
{
"path": "pages/LuckyWheel/LuckyWheel",
"style": {
"navigationBarTitleText": ""
}
},
{
"path": "pages/merchant_settlement/merchant_settlement",
"style": {
"navigationBarTitleText": "%mine.merchant.settlement.title%",
"navigationBarBackgroundColor": "#FFFFFF",
"navigationBarTextStyle": "black",
"enablePullDownRefresh": false,
"navigationStyle": "default" // 默认样式,会显示返回图标
}
},
// {
// "path": "pages/LuckyWheel/LuckyWheel",
// "style": {
// "navigationBarTitleText": ""
// }
// },
{
"path": "pages/supply_chain/supply_chain",
"style": {
@@ -257,6 +248,16 @@
"navigationStyle": "custom"
}
},
{
"path": "merchant_settlement/merchant_settlement",
"style": {
"navigationBarTitleText": "%mine.merchant.settlement.title%",
"navigationBarBackgroundColor": "#FFFFFF",
"navigationBarTextStyle": "black",
"enablePullDownRefresh": false,
"navigationStyle": "default" // 默认样式,会显示返回图标
}
},
{
"path": "dongjian/index",
"style": {
+1 -1
View File
@@ -88,7 +88,7 @@
radius='15'></up-image>
<view class="product_f_item">
<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>
-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_1">企业入驻</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 class="but_">
<view class="but_copy" @click="copyMobile(CUSTOMER_SERVICE_PHONE_NUMBER)">复制号码</view>
@@ -82,7 +82,7 @@ export default {
}
const ids = option.ids;
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: {
@@ -246,6 +246,8 @@ export default {
message: params.id && params.id !== 0 ? '修改成功' : "添加成功",
});
const leftPath = this.leftPath;
console.log("参数--111-", leftPath)
setTimeout(() => {
uni.navigateTo({
url: leftPath,
@@ -180,7 +180,7 @@
import Address from '@/components/address.vue';
import { getGoodsDetail } from '@/api/product.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 { feedback } from '@/api/payment.js';
import { assembleAddress } from '@/utils/index.js'
@@ -216,14 +216,14 @@ export default {
selectAddress: {},// 收件地址选择
wayOption: [],
isShowBalance: false,
ji:0,
sed:null,
curPay:null
ji: 0,
sed: null,
curPay: null
};
},
onLoad(option) {
// const ids = option.ids;
if(option.sed){
if (option.sed) {
this.ji = 1;
this.sed = JSON.parse(option.sed)
this.getOrderTwo();
@@ -232,9 +232,11 @@ export default {
this.ids = option.ids;
this.getOrder();
}
const addressShow = option.addressShow;
if (addressShow && addressShow !== "null") {
this.addressShow = addressShow;
console.log("参数---", option)
const addressShowPop = option.addressShow;
if (addressShowPop && addressShowPop !== "null") {
this.addressShow = addressShowPop;
}
// 支付弹框
const payOpen = option.payOpen;
@@ -266,12 +268,12 @@ export default {
async getWayOption() {
let parmas = {
}
if(this.ji){
if (this.ji) {
parmas['types'] = '4';
}else{
} else {
parmas['types'] = '2,3';
}
console.log('this.ji',parmas)
console.log('this.ji', parmas)
const result = await getSupportPay(parmas);
if (result && result.bizcode === 100) {
const data = result.data || [];
@@ -285,7 +287,7 @@ export default {
this.isShowBalance = balanceFlag;
}
this.wayOption = data;
console.log('getWayOption',this.wayOption)
console.log('getWayOption', this.wayOption)
}
},
async getOrder() {
@@ -330,42 +332,42 @@ export default {
const data = resp.data;
this.ji = data.type == 3 ? 1 : 0;
this.orderInfo = {
address:null,
amount:this.sed.goodsNum * this.sed.specsId.price,
shops:[{
addrTimes:[
address: null,
amount: this.sed.goodsNum * this.sed.specsId.price,
shops: [{
addrTimes: [
{
address:null,
deliveryTime:data.deliveryTime,
postagesId:data.postagesId,
postagesType:1,
goods:[
address: null,
deliveryTime: data.deliveryTime,
postagesId: data.postagesId,
postagesType: 1,
goods: [
{
adress:null,
addressId:null,
areaName:null,
cityName:null,
goodsId:this.sed.id,
id:this.sed.specsId.id,
img:data.goodsGraph,
name:null,
num:this.sed.goodsNum,
phone:null,
provinceName:null,
specs:this.sed.specsId.combNames,
title:data.name,
totalPrice:this.sed.goodsNum * this.sed.specsId.price,
unitPrice:this.sed.specsId.price
adress: null,
addressId: null,
areaName: null,
cityName: null,
goodsId: this.sed.id,
id: this.sed.specsId.id,
img: data.goodsGraph,
name: null,
num: this.sed.goodsNum,
phone: null,
provinceName: null,
specs: this.sed.specsId.combNames,
title: data.name,
totalPrice: this.sed.goodsNum * 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;
}
// const params = {
// cartIds: ids,
@@ -453,8 +455,8 @@ export default {
* 去支付
*/
async goPay() {
console.log('getWayOption',this.wayOption,this.orderInfo)
console.log('getWayOption', this.wayOption, this.orderInfo)
const orderInfo = this.orderInfo;
if (!orderInfo.address || Object.keys(orderInfo.address).length === 0) {
@@ -473,10 +475,10 @@ export default {
});
return;
}
let arr = this.wayOption.filter(i=>i.type == orderInfo.paymentMethod);
if(arr.length){
if(arr[0].type == 'balance' || arr[0].type == 'redpacket'){
if(arr[0].balance < orderInfo.amount){
let arr = this.wayOption.filter(i => i.type == orderInfo.paymentMethod);
if (arr.length) {
if (arr[0].type == 'balance' || arr[0].type == 'redpacket') {
if (arr[0].balance < orderInfo.amount) {
this.$refs.uToastRef.show({
type: 'error',
message: "余额不足",
@@ -484,14 +486,14 @@ export default {
return;
}
}
}else{
} else {
this.$refs.uToastRef.show({
type: 'error',
message: "请先选择支付方式",
});
return;
}
const params = {
addrId: orderInfo.address.id,// 收货地址ID
//结算的购物车ID,多个以逗号分割,ALL表示全选
@@ -499,19 +501,19 @@ export default {
remark: JSON.stringify(this.getRemark()),//备注信息'[{"sid":"店铺ID","rmk":"备注内容"},{"sid":"店铺ID","rmk":"备注内容"}]'
}
let resp = null;
if(this.sed){
if (this.sed) {
params['goodsId'] = this.sed.id;
params['specsId'] = this.sed.specsId.id;
params['goodsNum'] = this.orderInfo.shops[0].addrTimes[0].goods[0].num;
resp = await settlementOrder(params);
}else{
} else {
params['cartIds'] = this.ids;
resp = await settle(params);
}
console.log('getWayOption',resp)
console.log('getWayOption', resp)
// 提交订单成功,就唤起支付
if (resp && resp.bizcode === 100) {
const item = resp.data;
+8 -4
View File
@@ -27,7 +27,8 @@
</view>
<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"
: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-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 DownPopup from '@/components/common/down-popup.vue';
import { quickens } from '@/api/contract.js'
import Decimal from 'decimal.js';
import func from '@/utils/func.js';
@@ -104,8 +106,9 @@ export default {
this.topList[2].value = res.data.quickenBalance;
this.tableList = res.data.quickenDetail;
this.tableList.forEach(item => {
item.one = item.quickenRate * 100 + '%';
item.two = item.quickenValue;
const ratio = new Decimal(item.quickenRate);
item.one = ratio.times(100).toNumber() + '%';
item.two = new Decimal(item.quickenValue);
item.three = func.formatDate(new Date(item.ctdate), 3)
})
} else {
@@ -127,7 +130,8 @@ export default {
//去签署
}
}
},
}
}
</script>