diff --git a/pages/login_package/login/login.vue b/pages/login_package/login/login.vue index ec71c19..5c2ceeb 100644 --- a/pages/login_package/login/login.vue +++ b/pages/login_package/login/login.vue @@ -81,6 +81,18 @@ + + + + + 温馨提示 + 请您阅读并同意《服务协议》与《隐私政策》 + + 取消 + 同意并登录 + + + @@ -149,6 +161,7 @@ export default { isPolicy: false, // 是否同意 countdown: false, // 清空倒计时 loading: false, + showPolicyModal: false, }; }, methods: { @@ -187,17 +200,7 @@ export default { const form = this.form; const params = {}; if (!this.isPolicy) { - uni.showModal({ - title: '温馨提示', - content: '请您阅读并同意《服务协议》与《隐私政策》', - confirmText: "同意并登录", - success: (res) => { - if (res.confirm) { - this.isPolicy = true; - this.loginFun(val); - } - } - }); + this.showPolicyModal = true; return; } let response = val; @@ -453,6 +456,11 @@ export default { } ); }, + handlePolicyConfirm() { + this.showPolicyModal = false; + this.isPolicy = true; + this.loginFun(); + }, }, computed: { isIOS() { @@ -538,4 +546,59 @@ export default { margin-bottom: 80rpx; } } + +.modal-overlay { + position: fixed; + top: 0; + left: 0; + right: 0; + bottom: 0; + background: rgba(0, 0, 0, 0.5); + display: flex; + align-items: center; + justify-content: center; + z-index: 1000; +} + +.modal-content { + width: 500rpx; + background: #fff; + border-radius: 20rpx; + padding: 24rpx; + text-align: center; +} + +.modal-title { + font-size: 36rpx; + font-weight: bold; + color: #333; + margin-bottom: 30rpx; +} + +.modal-message { + font-size: 28rpx; + color: #666; + line-height: 1.6; + margin-bottom: 40rpx; +} + +.modal-buttons { + display: flex; +} + +.modal-btn { + flex: 1; + height: 80rpx; + line-height: 80rpx; + font-size: 30rpx; +} + +.modal-btn-cancel { + color: #999; + border-right: 1rpx solid #eee; +} + +.modal-btn-confirm { + color: #7934F6; +} \ No newline at end of file diff --git a/pages/mine/mine.vue b/pages/mine/mine.vue index cc6b900..9289265 100644 --- a/pages/mine/mine.vue +++ b/pages/mine/mine.vue @@ -729,9 +729,10 @@ export default { } &.level-grade { - background: rgba(122, 53, 246, 0.1); - color: #7a35f6; + background: rgba(248, 185, 75, 0.15); + color: #613700; } + } .grade_key_warp { diff --git a/pages/rwa_package/dongjian/search.vue b/pages/rwa_package/dongjian/search.vue index 6cc362e..6166463 100644 --- a/pages/rwa_package/dongjian/search.vue +++ b/pages/rwa_package/dongjian/search.vue @@ -4,12 +4,15 @@ - - + + + 搜索 + @@ -17,10 +20,10 @@ - - {{item}} - + + {{ item }} + @@ -32,15 +35,15 @@ 商品展示 - + 暂无数据 - + @@ -55,100 +58,82 @@ import ShopItem from './components/shop-item.vue' import func from '@/utils/func.js'; export default { - components: { Header,TopSafe,DownPopup,ShopItem }, + components: { Header, TopSafe, DownPopup, ShopItem }, data() { return { - searchInput:'', - historyList:[], - isDel:false, - dataList:[], - searchBoxMaxWidth: 0 // 搜索框最大宽度 + searchInput: '', + historyList: [], + isDel: false, + dataList: [], }; }, onShow() { this.init(); }, - onLoad() { - // 获取胶囊按钮位置信息,计算搜索框最大宽度 - this.calculateSearchBoxMaxWidth(); - }, methods: { - init(){ + init() { + // this.isSignContract() + // this.getSignContract() + let arr = uni.getStorageSync('history') || ''; - if(arr){ + if (arr) { this.historyList = arr.split(','); - }else{ + } else { this.historyList = []; } }, - // 计算搜索框最大宽度,确保不与胶囊按钮重叠 - calculateSearchBoxMaxWidth() { - // #ifdef MP-WEIXIN - const menuButtonInfo = uni.getMenuButtonBoundingClientRect(); - if (menuButtonInfo) { - const systemInfo = uni.getSystemInfoSync(); - // 计算屏幕宽度减去左侧内边距和胶囊按钮左侧距离 - // 左侧内边距32rpx转换为px - const leftPadding = 32 * (systemInfo.windowWidth / 750); - // 箭头图标宽度和间距约为30rpx + 24rpx = 54rpx - const arrowWidth = 54 * (systemInfo.windowWidth / 750); - // 计算搜索框最大宽度(px) - const maxWidthPx = menuButtonInfo.left - leftPadding - arrowWidth - 20; // 20px额外间距 - // 转换为rpx - this.searchBoxMaxWidth = Math.ceil(maxWidthPx * (750 / systemInfo.windowWidth)); - } - // #endif - }, - onJump(item){ + onJump(item) { uni.navigateTo({ - url: '/pages/other_package/productInfo/productInfo?id='+item.id, + url: '/pages/other_package/productInfo/productInfo?id=' + item.id, }) }, - onBack(){ + onBack() { uni.navigateBack(); }, - onSearch(){ - if(!this.searchInput){ + onSearch() { + if (!this.searchInput) { return; } this.onAdd(); let params = { - keyword:this.searchInput + keyword: this.searchInput } - searchList(params).then((res)=>{ + searchList(params).then((res) => { this.dataList = res.data; - console.log('res',res) + console.log('res', res) }) }, - onDel(index){ - this.historyList.splice(index,1); + onDel(index) { + this.historyList.splice(index, 1); this.onSave() }, - onAdd(){ - if(this.searchInput){ + onAdd() { + + if (this.searchInput) { let bool = false; - this.historyList.forEach(item=>{ - if(item == this.searchInput){ + this.historyList.forEach(item => { + if (item == this.searchInput) { bool = true; } }) - if(!bool){ + if (!bool) { this.historyList.unshift(this.searchInput); - if(this.historyList.length > 15){ + if (this.historyList.length > 15) { this.historyList.pop(); } this.onSave(); - } + } + } }, - onText(item){ + onText(item) { this.searchInput = item; }, - onSave(){ - if(this.historyList.length){ - uni.setStorageSync('history',this.historyList.join(',')); - }else{ - uni.setStorageSync('history',''); + onSave() { + if (this.historyList.length) { + uni.setStorageSync('history', this.historyList.join(',')); + } else { + uni.setStorageSync('history', ''); } } } @@ -156,109 +141,131 @@ export default { \ No newline at end of file + diff --git a/pages/shopping_cart/shopping_cart.vue b/pages/shopping_cart/shopping_cart.vue index c4ad21b..85a72bf 100644 --- a/pages/shopping_cart/shopping_cart.vue +++ b/pages/shopping_cart/shopping_cart.vue @@ -440,8 +440,7 @@ export default {