feat: 过滤地址

This commit is contained in:
2025-10-23 14:12:28 +08:00
parent 64a3e7310c
commit 0a7a4392e2
4 changed files with 513 additions and 569 deletions
+4
View File
@@ -5,6 +5,10 @@
"customPlaygroundType" : "local", "customPlaygroundType" : "local",
"playground" : "custom", "playground" : "custom",
"type" : "uni-app:app-android" "type" : "uni-app:app-android"
},
{
"playground" : "standard",
"type" : "uni-app:app-ios"
} }
] ]
} }
+23 -37
View File
@@ -3,7 +3,7 @@
"appid" : "__UNI__4910728", "appid" : "__UNI__4910728",
"description" : "信任桥优品是一款集线上商城、线下联盟商家的DAO聚合商城;通过“有趣”“有利”“有希望”的卖货玩法,吸引消费者、推广者、商家、投资人参与生态,共同打造共创共享的全球产业生态。", "description" : "信任桥优品是一款集线上商城、线下联盟商家的DAO聚合商城;通过“有趣”“有利”“有希望”的卖货玩法,吸引消费者、推广者、商家、投资人参与生态,共同打造共创共享的全球产业生态。",
"versionName" : "1.0.1", "versionName" : "1.0.1",
"versionCode" : 134, "versionCode" : 135,
"transformPx" : false, "transformPx" : false,
/* 5+App特有相关 */ /* 5+App特有相关 */
"app-plus" : { "app-plus" : {
@@ -87,33 +87,33 @@
}, },
"icons" : { "icons" : {
"android" : { "android" : {
"hdpi" : "static/logo.png", "hdpi" : "unpackage/res/icons/72x72.png",
"xhdpi" : "static/logo.png", "xhdpi" : "unpackage/res/icons/96x96.png",
"xxhdpi" : "static/logo.png", "xxhdpi" : "unpackage/res/icons/144x144.png",
"xxxhdpi" : "static/logo.png" "xxxhdpi" : "unpackage/res/icons/192x192.png"
}, },
"ios" : { "ios" : {
"appstore" : "", "appstore" : "unpackage/res/icons/1024x1024.png",
"ipad" : { "ipad" : {
"app" : "static/logo.png", "app" : "unpackage/res/icons/76x76.png",
"app@2x" : "static/logo.png", "app@2x" : "unpackage/res/icons/152x152.png",
"notification" : "static/logo.png", "notification" : "unpackage/res/icons/20x20.png",
"notification@2x" : "static/logo.png", "notification@2x" : "unpackage/res/icons/40x40.png",
"proapp@2x" : "static/logo.png", "proapp@2x" : "unpackage/res/icons/167x167.png",
"settings" : "static/logo.png", "settings" : "unpackage/res/icons/29x29.png",
"settings@2x" : "static/logo.png", "settings@2x" : "unpackage/res/icons/58x58.png",
"spotlight" : "static/logo.png", "spotlight" : "unpackage/res/icons/40x40.png",
"spotlight@2x" : "static/logo.png" "spotlight@2x" : "unpackage/res/icons/80x80.png"
}, },
"iphone" : { "iphone" : {
"app@2x" : "static/logo.png", "app@2x" : "unpackage/res/icons/120x120.png",
"app@3x" : "static/logo.png", "app@3x" : "unpackage/res/icons/180x180.png",
"notification@2x" : "static/logo.png", "notification@2x" : "unpackage/res/icons/40x40.png",
"notification@3x" : "static/logo.png", "notification@3x" : "unpackage/res/icons/60x60.png",
"settings@2x" : "static/logo.png", "settings@2x" : "unpackage/res/icons/58x58.png",
"settings@3x" : "static/logo.png", "settings@3x" : "unpackage/res/icons/87x87.png",
"spotlight@2x" : "static/logo.png", "spotlight@2x" : "unpackage/res/icons/80x80.png",
"spotlight@3x" : "static/logo.png" "spotlight@3x" : "unpackage/res/icons/120x120.png"
} }
} }
}, },
@@ -139,20 +139,6 @@
"pid" : "11931", "pid" : "11931",
"parameters" : {} "parameters" : {}
} }
},
"WITTestUniPlugin" : {
"__plugin_info__" : {
"name" : "WITTestUniPlugin",
"description" : "iOS原生插件",
"platforms" : "iOS",
"url" : "",
"android_package_name" : "",
"ios_bundle_id" : "",
"isCloud" : false,
"bought" : -1,
"pid" : "",
"parameters" : {}
}
} }
} }
}, },
+65 -123
View File
@@ -2,13 +2,7 @@
<view class="login_warp"> <view class="login_warp">
<view class="login_logo_warp"> <view class="login_logo_warp">
<view style="text-align: center"> <view style="text-align: center">
<up-image <up-image src="/static/logo.png" width="90" height="118" bgColor="#f1f6ff00" radius="10"></up-image>
src="/static/logo.png"
width="90"
height="118"
bgColor="#f1f6ff00"
radius="10"
></up-image>
</view> </view>
<!-- <view style="margin-top: 20rpx;"> <!-- <view style="margin-top: 20rpx;">
<up-image src="/static/logo_z.png" width="100" height="40" bgColor="#f1f6ff00"></up-image> <up-image src="/static/logo_z.png" width="100" height="40" bgColor="#f1f6ff00"></up-image>
@@ -16,59 +10,27 @@
</view> </view>
<view class="login_info"> <view class="login_info">
<view class="login_info_item"> <view class="login_info_item">
<up-input <up-input placeholder="请输入手机号/账户名称" border="surround" v-model="form.name" :customStyle="inputCss"
placeholder="请输入手机号/账户名称" @change="checkNameParam"></up-input>
border="surround"
v-model="form.name"
:customStyle="inputCss"
@change="checkNameParam"
></up-input>
</view> </view>
<!-- 密码登录 --> <!-- 密码登录 -->
<view class="login_info_item" v-if="loginWay === 'password'"> <view class="login_info_item" v-if="loginWay === 'password'">
<up-input <up-input placeholder="请输入密码" border="surround" v-model="form.password" :customStyle="inputCss"
placeholder="请输入密码" :type="isShow ? 'text' : 'password'" @change="checkParam">
border="surround"
v-model="form.password"
:customStyle="inputCss"
:type="isShow ? 'text' : 'password'"
@change="checkParam"
>
<template #suffix style="margin-right: 10rpx"> <template #suffix style="margin-right: 10rpx">
<up-image <up-image v-if="isShow" src="/static/login/show.png" width="20" height="20" bgColor="#f1f6ff00"
v-if="isShow" @click="isShow = false"></up-image>
src="/static/login/show.png" <up-image v-else src="/static/login/hidden.png" width="20" height="20" bgColor="#f1f6ff00"
width="20" @click="isShow = true"></up-image>
height="20"
bgColor="#f1f6ff00"
@click="isShow = false"
></up-image>
<up-image
v-else
src="/static/login/hidden.png"
width="20"
height="20"
bgColor="#f1f6ff00"
@click="isShow = true"
></up-image>
</template> </template>
</up-input> </up-input>
</view> </view>
<!-- 验证码登录 --> <!-- 验证码登录 -->
<view class="login_info_item" v-else> <view class="login_info_item" v-else>
<up-input <up-input placeholder="请输入验证码" border="surround" v-model="form.code" :customStyle="inputCss">
placeholder="请输入验证码"
border="surround"
v-model="form.code"
:customStyle="inputCss"
>
<template #suffix style="margin-right: 10rpx"> <template #suffix style="margin-right: 10rpx">
<view v-if="countdown" class="code-warp"> <view v-if="countdown" class="code-warp">
<up-count-down <up-count-down :time="60 * 1000" format="ss" @finish="countdown = false"></up-count-down>
:time="60 * 1000"
format="ss"
@finish="countdown = false"
></up-count-down>
<text style="margin-left: 10rpx">s</text> <text style="margin-left: 10rpx">s</text>
</view> </view>
<view v-else @click="getMobileCode" class="code_msg"> <view v-else @click="getMobileCode" class="code_msg">
@@ -82,63 +44,36 @@
<text style="margin-left: 10rpx">登录</text> <text style="margin-left: 10rpx">登录</text>
</view> </view>
<view class="cut_way_warp"> <view class="cut_way_warp">
<view v-if="loginWay === 'password'" @click="loginWay = 'code'" <view v-if="loginWay === 'password'" @click="loginWay = 'code'">验证码登录</view>
>验证码登录</view <view v-if="loginWay === 'code'" @click="loginWay = 'password'">密码登录登录</view>
>
<view v-if="loginWay === 'code'" @click="loginWay = 'password'"
>密码登录登录</view
>
<view @click="jumpForgot">忘记密码</view> <view @click="jumpForgot">忘记密码</view>
<view @click="jumpRegister">注册</view> <view @click="jumpRegister">注册</view>
</view> </view>
</view> </view>
<view > <view>
<view class="other_login">其他登录方式</view> <view class="other_login">其他登录方式</view>
<view class="login_other_icon"> <view class="login_other_icon">
<view class="login_other_item" @click="wechatOneLogin"> <view class="login_other_item" @click="wechatOneLogin">
<up-image <up-image src="/static/login/WXICON.png" width="44" height="44" bgColor="#f1f6ff00"></up-image>
src="/static/login/WXICON.png"
width="44"
height="44"
bgColor="#f1f6ff00"
></up-image>
微信登录 微信登录
</view> </view>
<!-- <view class="login_other_item" @click="aa"> --> <!-- <view class="login_other_item" @click="aa"> -->
<view v-if="!isIOS" class="login_other_item" @click="alipayOneLogin"> <view v-if="!isIOS" class="login_other_item" @click="alipayOneLogin">
<up-image <up-image src="/static/login/ZFB.png" width="44" height="44" bgColor="#f1f6ff00"></up-image>
src="/static/login/ZFB.png"
width="44"
height="44"
bgColor="#f1f6ff00"
></up-image>
支付宝登录 支付宝登录
</view> </view>
</view> </view>
</view> </view>
<view class="policy_warp"> <view class="policy_warp">
<up-checkbox <up-checkbox name="isCheck" usedAlone v-model:checked="isPolicy" shape="circle" activeColor="#7934F6"
name="isCheck" size="19" iconSize="18">
usedAlone
v-model:checked="isPolicy"
shape="circle"
activeColor="#7934F6"
size="19"
iconSize="18"
>
<template #label> <template #label>
<text>已阅读并同意</text> <text @click="aa">已阅读并同意</text>
<text class="policy_a_warp" @click="jumpUserAgreement" <text class="policy_a_warp" @click="jumpUserAgreement">《服务协议》</text>
>《服务协议》</text
>
<text>、</text> <text>、</text>
<text class="policy_a_warp" @click="jumpPrivacyAgreement" <text class="policy_a_warp" @click="jumpPrivacyAgreement">《隐私政策》</text>
>《隐私政策》</text
>
<text>、</text> <text>、</text>
<text class="policy_a_warp" @click="jumpProductAgreement" <text class="policy_a_warp" @click="jumpProductAgreement">《售后保障协议》</text>
>《售后保障协议》</text
>
</template> </template>
</up-checkbox> </up-checkbox>
</view> </view>
@@ -147,31 +82,40 @@
</template> </template>
<script> <script>
import InputCodeComm from "@/components/code-comm/code-comm.vue"; import InputCodeComm from "@/components/code-comm/code-comm.vue";
import { SMS_TYPE } from "@/utils/enumUtils.js"; import {
import { getUserList } from "@/api/common.js"; SMS_TYPE
import { loginbysms, loginbypw, wechatLogin, alipayLogin } from "@/api/auth.js"; } from "@/utils/enumUtils.js";
import { import {
getUserList
} from "@/api/common.js";
import {
loginbysms,
loginbypw,
wechatLogin,
alipayLogin
} from "@/api/auth.js";
import {
setStorageFun, setStorageFun,
TOKEN_NAME, TOKEN_NAME,
USER_KEY, USER_KEY,
USER_DATA, USER_DATA,
USER_LOGIN_TIME, USER_LOGIN_TIME,
} from "@/utils/auth.js"; } from "@/utils/auth.js";
import CryptoJS from "crypto-js"; import CryptoJS from "crypto-js";
// #ifdef APP-PLUS // #ifdef APP-PLUS
const hyyAlipay = uni.requireNativePlugin("Hyy-Alipay"); const hyyAlipay = uni.requireNativePlugin("Hyy-Alipay");
// #endif // #endif
export default { export default {
onLaunch: function () { onLaunch: function() {
console.log("App Launch"); console.log("App Launch");
const res = uni.getSystemInfoSync(); const res = uni.getSystemInfoSync();
uni.setStorageSync("platform", res.platform); uni.setStorageSync("platform", res.platform);
// #ifdef APP-PLUS // #ifdef APP-PLUS
// 获取应用版本信息 // 获取应用版本信息
plus.runtime.getProperty(plus.runtime.appid, function (inf) { plus.runtime.getProperty(plus.runtime.appid, function(inf) {
console.log("版本信息", inf.versionCode); console.log("版本信息", inf.versionCode);
uni.setStorageSync("version-1", inf.version); // 大版本号 uni.setStorageSync("version-1", inf.version); // 大版本号
uni.setStorageSync("versionCode", inf.versionCode); // 小版本号 uni.setStorageSync("versionCode", inf.versionCode); // 小版本号
@@ -204,10 +148,9 @@ export default {
}; };
}, },
methods: { methods: {
aa() {
aa(){
const nativiPlugin = uni.requireNativePlugin('WITTestUniPlugin'); const nativiPlugin = uni.requireNativePlugin('WITTestUniPlugin');
console.log("隐藏原生tabbar",nativiPlugin) console.log("隐藏原生tabbar", nativiPlugin)
nativiPlugin.testAsyncFunc({}, nativiPlugin.testAsyncFunc({},
(ret) => { (ret) => {
uni.showToast({ uni.showToast({
@@ -273,7 +216,7 @@ export default {
// #ifdef APP-PLUS          // #ifdef APP-PLUS         
// 获取应用版本信息 // 获取应用版本信息
plus.runtime.getProperty(plus.runtime.appid, function(inf) { plus.runtime.getProperty(plus.runtime.appid, function(inf) {
console.log("版本信息",inf.versionCode) console.log("版本信息", inf.versionCode)
uni.setStorageSync('version-1', inf.version); // 大版本号 uni.setStorageSync('version-1', inf.version); // 大版本号
uni.setStorageSync('versionCode', inf.versionCode); // 小版本号 uni.setStorageSync('versionCode', inf.versionCode); // 小版本号
}); });
@@ -445,8 +388,7 @@ export default {
return; return;
} }
hyyAlipay.openAuthScheme( hyyAlipay.openAuthScheme({
{
appId: "2021005183625053", // 支付宝分配给开发者的应用 ID appId: "2021005183625053", // 支付宝分配给开发者的应用 ID
scheme: "trustbridgeapp", // manifest.json -> "App常用其他设置" -> "UrlSchemes"里设置 scheme: "trustbridgeapp", // manifest.json -> "App常用其他设置" -> "UrlSchemes"里设置
}, },
@@ -487,21 +429,21 @@ export default {
return false; return false;
}, },
}, },
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.login_warp { .login_warp {
height: calc(100vh - 400rpx); height: calc(100vh - 400rpx);
padding: 150rpx 50rpx 0; padding: 150rpx 50rpx 0;
} }
.login_logo_warp { .login_logo_warp {
display: grid; display: grid;
justify-content: center; justify-content: center;
} }
.login_info { .login_info {
margin-top: 60rpx; margin-top: 60rpx;
.login_info_item { .login_info_item {
@@ -512,9 +454,9 @@ export default {
font-size: 36rpx; font-size: 36rpx;
color: $app-bt-bj; color: $app-bt-bj;
} }
} }
.login_comm_but { .login_comm_but {
background: #cccccc; background: #cccccc;
border-radius: 20rpx; border-radius: 20rpx;
width: 100%; width: 100%;
@@ -525,31 +467,31 @@ export default {
padding: 28rpx 0; padding: 28rpx 0;
display: flex; display: flex;
justify-content: center; justify-content: center;
} }
.login_comm_but_yes { .login_comm_but_yes {
background: $app-bt-bj; background: $app-bt-bj;
color: #ffffff; color: #ffffff;
} }
.cut_way_warp { .cut_way_warp {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
font-weight: 500; font-weight: 500;
font-size: 28rpx; font-size: 28rpx;
color: #999999; color: #999999;
margin-top: 20rpx; margin-top: 20rpx;
} }
.other_login { .other_login {
font-size: 28rpx; font-size: 28rpx;
text-align: center; text-align: center;
margin-top: 80rpx; margin-top: 80rpx;
margin-bottom: 32rpx; margin-bottom: 32rpx;
color: #999999; color: #999999;
} }
.login_other_icon { .login_other_icon {
display: flex; display: flex;
padding: 0 100rpx; padding: 0 100rpx;
justify-content: center; justify-content: center;
@@ -562,5 +504,5 @@ export default {
align-items: center; align-items: center;
margin-bottom: 80rpx; margin-bottom: 80rpx;
} }
} }
</style> </style>
@@ -245,9 +245,21 @@ export default {
if (!params.id || params.id === 0) { if (!params.id || params.id === 0) {
delete params.id; delete params.id;
} }
if (!params.townshipId || params.townshipId === 0) {
delete params.townshipId;
}
if (!params.areaId || params.areaId === 0) { if (!params.areaId || params.areaId === 0) {
delete params.areaId; delete params.areaId;
} }
if (!params.cityId || params.cityId === 0) {
delete params.cityId;
}
if (!params.provinceId || params.provinceId === 0) {
delete params.provinceId;
}
if (!params.countryId || params.countryId === 0) {
delete params.countryId;
}
delete params.regionStr; delete params.regionStr;
const res = await editAddress(params); const res = await editAddress(params);
if (res && res.bizcode === 100) { if (res && res.bizcode === 100) {