Browse Source

天气

master
jiazhipeng 9 months ago
parent
commit
03419a6f83
  1. 2
      app.js
  2. 3
      pages/index/index.js
  3. 2
      pages/index/index.wxss
  4. 4
      utils/https.js

2
app.js

@ -38,7 +38,7 @@ App({
// 获取前端配置文件 // 获取前端配置文件
commonApi._post("pbservice/Other/getClientConfig", {unique_key: "wechatxcx"}).then(res => { commonApi._post("pbservice/Other/getClientConfig", {unique_key: "wechatxcx"}).then(res => {
let data = JSON.parse(res.data); let data = JSON.parse(res.data);
data.isTest = data.isTest127? true : false; data.isTest = data.isTest129? true : false;
data.indexSeason = null data.indexSeason = null
this.globalData.configJson = data this.globalData.configJson = data
}).then(() => { }).then(() => {

3
pages/index/index.js

@ -437,6 +437,7 @@ Page({
onReady: function() { onReady: function() {
this.getHeight() this.getHeight()
this.getWeather() // 天气
this.getIndexSeason() this.getIndexSeason()
this.getBanner() this.getBanner()
@ -445,7 +446,7 @@ Page({
this.getList() // 回购榜 this.getList() // 回购榜
this.getRepurchaseList() this.getRepurchaseList()
this.getWeather() // 2025-5-26首页改版不需要天气了
// this.getFourProduct() // 活动日历 // this.getFourProduct() // 活动日历
wx.getLocation({ wx.getLocation({

2
pages/index/index.wxss

@ -65,7 +65,7 @@
justify-content: space-between; justify-content: space-between;
padding: 0rpx 20rpx 30rpx; padding: 0rpx 20rpx 30rpx;
box-sizing: border-box; box-sizing: border-box;
background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(0, 0, 0, 0.2)) /* background: linear-gradient(180deg, rgba(255, 255, 255, 0), rgba(0, 0, 0, 0.2)) */
} }
.banner-main image{ .banner-main image{
width: 173.33rpx; width: 173.33rpx;

4
utils/https.js

@ -1,8 +1,8 @@
var app = getApp(); var app = getApp();
import util from "../utils/util" import util from "../utils/util"
// import userApi from "../utils/https/user.js"; // import userApi from "../utils/https/user.js";
const baseUrl = "https://test.api.cloud.sz-trip.com/api/"; // const baseUrl = "https://test.api.cloud.sz-trip.com/api/";
// let baseUrl = "https://api.cloud.sz-trip.com/api/"; let baseUrl = "https://api.cloud.sz-trip.com/api/";
const env = wx.getAccountInfoSync().miniProgram.envVersion const env = wx.getAccountInfoSync().miniProgram.envVersion
if (env == 'develop1') { if (env == 'develop1') {
baseUrl = "https://test.api.cloud.sz-trip.com/api/" baseUrl = "https://test.api.cloud.sz-trip.com/api/"

Loading…
Cancel
Save