From 04102f7237efefa744090ed7c25f7b5d0807b679 Mon Sep 17 00:00:00 2001
From: quanwei <419654421@qq.com>
Date: Thu, 05 Feb 2026 18:11:57 +0800
Subject: [PATCH] 完成运营中心提现和运营中心权限管理
---
mobile/pages/diy-page/diy-page.vue | 65 +++++++++++++++++++++-----------
1 files changed, 43 insertions(+), 22 deletions(-)
diff --git a/mobile/pages/diy-page/diy-page.vue b/mobile/pages/diy-page/diy-page.vue
index 4d6ea55..6065d59 100644
--- a/mobile/pages/diy-page/diy-page.vue
+++ b/mobile/pages/diy-page/diy-page.vue
@@ -4,7 +4,7 @@
<view class="tc d-b-c header"
:style="topBarHeight() == 0 ? '': 'height:'+topBarHeight()+'px;padding-top:'+(topBarTop() + 5)+'px'">
<view class="reg180" :style="topBarHeight() == 0 ? '': 'height:'+topBarHeight()+'px;'">
- <text v-if="hasPage()" @click="goback" class="icon iconfont icon-jiantou"></text>
+ <text v-if="hasPage()" @click="goback" class="icon iconfont icon-jiantou"></text>
</view>
<view class="gray3 f28">{{page_info.params.name}}</view>
<view class="gray3 m20" @click="showShare()"><text class="icon iconfont icon-share1"></text></view>
@@ -33,45 +33,66 @@
data() {
return {
/*页面ID*/
- page_id:null,
+ page_id: null,
/*diy类别*/
- items:{},
+ items: {},
/*页面信息*/
- page_info:{},
+ page_info: {},
/*分享*/
isMpShare: false,
/*app分享*/
isAppShare: false,
- index_open_city:0,
+ index_open_city: 0,
appParams: {
title: '',
summary: '',
path: ''
},
url: '',
+ longitude: 0,
+ latitude: 0,
}
},
onLoad(e) {
- this.page_id=e.page_id;
- this.getData();
+ this.page_id = e.page_id;
+ this.getAdds();
//#ifdef H5
this.url = window.location.href;
//#endif
},
methods: {
- hasPage(){
+ hasPage() {
var pages = getCurrentPages();
return pages.length > 1;
},
goback() {
uni.navigateBack();
},
+ getAdds() {
+ let self = this;
+ uni.getLocation({
+ type: 'wgs84',
+ success: function(res) {
+ console.log('当前位置的经度:' + res.longitude);
+ console.log('当前位置的纬度:' + res.latitude);
+ uni.setStorageSync('longitude',res.longitude)
+ uni.setStorageSync('latitude',res.latitude)
+ self.longitude = res.longitude;
+ self.latitude = res.latitude;
+ self.getData();
+ },fetch() {
+ self.getData();
+ }
+ })
+ },
/*获取数据*/
getData(page_id) {
let self = this;
self._get('index/diy', {
page_id: self.page_id,
- url: self.url
+ url: self.url,
+ longitude: self.longitude,
+ latitude: self.latitude
}, function(res) {
self.page_info = res.data.page;
self.items = res.data.items;
@@ -87,24 +108,24 @@
//#endif
});
},
-
+
/*设置页面*/
- setPage(page){
-
+ setPage(page) {
+
uni.setNavigationBarTitle({
- title: page.params.name
+ title: page.params.name
});
-
- let colors='#000000';
- if(page.style.titleTextColor=='white'){
+
+ let colors = '#000000';
+ if (page.style.titleTextColor == 'white') {
//字母要小写
- colors='#ffffff'
+ colors = '#ffffff'
}
uni.setNavigationBarColor({
- frontColor: colors,
- backgroundColor: page.style.titleBackgroundColor
+ frontColor: colors,
+ backgroundColor: page.style.titleBackgroundColor
})
-
+
},
/*分享当前页面*/
onShareAppMessage() {
@@ -121,7 +142,7 @@
showShare() {
let self = this;
//#ifdef MP-WEIXIN
- return;
+ return;
//#endif
//#ifndef APP-PLUS
self.isMpShare = true;
@@ -152,4 +173,4 @@
<style>
-</style>
+</style>
\ No newline at end of file
--
Gitblit v1.9.2