保存11.1
|
@ -1,16 +0,0 @@
|
|||
# Windows
|
||||
[Dd]esktop.ini
|
||||
Thumbs.db
|
||||
$RECYCLE.BIN/
|
||||
node_modules/
|
||||
miniprogram_npm/
|
||||
|
||||
# macOS
|
||||
.DS_Store
|
||||
.fseventsd
|
||||
.Spotlight-V100
|
||||
.TemporaryItems
|
||||
.Trashes
|
||||
|
||||
# Node.js
|
||||
node_modules/
|
|
@ -0,0 +1,12 @@
|
|||
# 云开发 quickstart
|
||||
|
||||
这是云开发的快速启动指引,其中演示了如何上手使用云开发的三大基础能力:
|
||||
|
||||
- 数据库:一个既可在小程序前端操作,也能在云函数中读写的 JSON 文档型数据库
|
||||
- 文件存储:在小程序前端直接上传/下载云端文件,在云开发控制台可视化管理
|
||||
- 云函数:在云端运行的代码,微信私有协议天然鉴权,开发者只需编写业务逻辑代码
|
||||
|
||||
## 参考文档
|
||||
|
||||
- [云开发文档](https://developers.weixin.qq.com/miniprogram/dev/wxcloud/basis/getting-started.html)
|
||||
|
59
app.js
|
@ -1,59 +0,0 @@
|
|||
// app.js
|
||||
App({
|
||||
onLaunch() {
|
||||
// 展示本地存储能力
|
||||
const logs = wx.getStorageSync('logs') || []
|
||||
logs.unshift(Date.now())
|
||||
wx.setStorageSync('logs', logs)
|
||||
|
||||
// 登录
|
||||
wx.login({
|
||||
success: res => {
|
||||
console.log(res);
|
||||
|
||||
// wx.request({
|
||||
// url: 'https://www.umayle.com/weixin_api/API/Wx/User/GetUserInfo.ashx?appName=Inland&code='+res.code,
|
||||
// method: 'POST',
|
||||
// success:(_res)=>{
|
||||
// console.log(_res);
|
||||
// let openId = _res.data.openid;
|
||||
// this.globalData.openId = openId
|
||||
// console.log('openid',openId);
|
||||
// wx.request({
|
||||
// url: 'https://www.umayle.com/inland/Api/GetUserInfo.ashx?openId='+openId,
|
||||
// method: 'POST',
|
||||
// success:(_res_)=>{
|
||||
// console.log(_res_,',,,res');
|
||||
// this.globalData.userInfo = _res_.data.data
|
||||
// if(_res_.data.code == 0 && _res_.data.message == '获取成功'){
|
||||
// //跳转到列表页面
|
||||
// setTimeout(() => {
|
||||
// wx.redirectTo({
|
||||
// url:'/pages/map/map'
|
||||
// // url:'/pages/register/register'
|
||||
// })
|
||||
// }, 2000);
|
||||
|
||||
// }else{
|
||||
// //跳转到注册页面
|
||||
// setTimeout(() => {
|
||||
// wx.redirectTo({
|
||||
// url:'/pages/register/register'
|
||||
// // url:'/pages/list/list'
|
||||
// })
|
||||
// }, 2000);
|
||||
|
||||
// }
|
||||
// }
|
||||
// })
|
||||
// }
|
||||
// })
|
||||
// 发送 res.code 到后台换取 openId, sessionKey, unionId
|
||||
}
|
||||
})
|
||||
},
|
||||
globalData: {
|
||||
userInfo: null,
|
||||
openId:null
|
||||
}
|
||||
})
|
32
app.json
|
@ -1,32 +0,0 @@
|
|||
{
|
||||
"pages": [
|
||||
"pages/start/start",
|
||||
"pages/map/map",
|
||||
"pages/list/list",
|
||||
"pages/item/item"
|
||||
],
|
||||
"plugins": {
|
||||
"routePlan": {
|
||||
"version": "1.0.5",
|
||||
"provider": "wx50b5593e81dd937a"
|
||||
},
|
||||
"chooseLocation": {
|
||||
"version": "1.0.3",
|
||||
"provider": "wx76a9a06e5b4e693e"
|
||||
}
|
||||
},
|
||||
"permission": {
|
||||
"scope.userLocation": {
|
||||
"desc": "你的位置信息将用于小程序位置接口的效果展示"
|
||||
}
|
||||
},
|
||||
"requiredPrivateInfos": ["getLocation"],
|
||||
"window": {
|
||||
"backgroundTextStyle": "light",
|
||||
"navigationBarBackgroundColor": "#3669f8",
|
||||
"navigationBarTitleText": "桥梁空间智慧监管试点平台",
|
||||
"navigationBarTextStyle": "white"
|
||||
},
|
||||
"sitemapLocation": "sitemap.json",
|
||||
"lazyCodeLoading": "requiredComponents"
|
||||
}
|
13
app.wxss
|
@ -1,13 +0,0 @@
|
|||
/**app.wxss**/
|
||||
page{
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.container {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
box-sizing: border-box;
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"permissions": {
|
||||
"openapi": [
|
||||
"phonenumber.getPhoneNumber"
|
||||
]
|
||||
}
|
||||
}
|
|
@ -0,0 +1,24 @@
|
|||
// 云函数入口文件
|
||||
const cloud = require('wx-server-sdk')
|
||||
cloud.init({
|
||||
env: cloud.DYNAMIC_CURRENT_ENV
|
||||
})
|
||||
|
||||
// 云函数入口函数
|
||||
exports.main = async (event, context) => {
|
||||
const wxContext = cloud.getWXContext()
|
||||
const openid = wxContext.OPENID
|
||||
const cloudIdList = event.cloudIdList
|
||||
|
||||
try {
|
||||
const result = await cloud.openapi.cloudbase.getOpenData({
|
||||
openid: openid,
|
||||
cloudidList: cloudIdList
|
||||
})
|
||||
return result
|
||||
}
|
||||
catch (err) {
|
||||
console.error('transaction error')
|
||||
return err
|
||||
}
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"name": "getMobile",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"wx-server-sdk": "~2.6.3"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"permissions": {
|
||||
"openapi": [
|
||||
]
|
||||
}
|
||||
}
|
|
@ -0,0 +1,16 @@
|
|||
// 云函数入口文件
|
||||
const cloud = require('wx-server-sdk')
|
||||
|
||||
cloud.init()
|
||||
|
||||
// 云函数入口函数
|
||||
exports.main = async (event, context) => {
|
||||
const wxContext = cloud.getWXContext()
|
||||
|
||||
return {
|
||||
event,
|
||||
openid: wxContext.OPENID,
|
||||
appid: wxContext.APPID,
|
||||
unionid: wxContext.UNIONID,
|
||||
}
|
||||
}
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"name": "login",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"wx-server-sdk": "~2.6.3"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,7 @@
|
|||
{
|
||||
"permissions": {
|
||||
"openapi": [
|
||||
"wxacode.get"
|
||||
]
|
||||
}
|
||||
}
|
|
@ -0,0 +1,56 @@
|
|||
const cloud = require('wx-server-sdk');
|
||||
|
||||
cloud.init({
|
||||
env: cloud.DYNAMIC_CURRENT_ENV
|
||||
});
|
||||
|
||||
const db = cloud.database();
|
||||
|
||||
// 创建集合云函数入口函数
|
||||
exports.main = async (event, context) => {
|
||||
try {
|
||||
// 创建集合
|
||||
await db.createCollection('sales');
|
||||
await db.collection('sales').add({
|
||||
// data 字段表示需新增的 JSON 数据
|
||||
data: {
|
||||
region: '华东',
|
||||
city: '上海',
|
||||
sales: 11
|
||||
}
|
||||
});
|
||||
await db.collection('sales').add({
|
||||
// data 字段表示需新增的 JSON 数据
|
||||
data: {
|
||||
region: '华东',
|
||||
city: '南京',
|
||||
sales: 11
|
||||
}
|
||||
});
|
||||
await db.collection('sales').add({
|
||||
// data 字段表示需新增的 JSON 数据
|
||||
data: {
|
||||
region: '华南',
|
||||
city: '广州',
|
||||
sales: 22
|
||||
}
|
||||
});
|
||||
await db.collection('sales').add({
|
||||
// data 字段表示需新增的 JSON 数据
|
||||
data: {
|
||||
region: '华南',
|
||||
city: '深圳',
|
||||
sales: 22
|
||||
}
|
||||
});
|
||||
return {
|
||||
success: true
|
||||
};
|
||||
} catch (e) {
|
||||
// 这里catch到的是该collection已经存在,从业务逻辑上来说是运行成功的,所以catch返回success给前端,避免工具在前端抛出异常
|
||||
return {
|
||||
success: true,
|
||||
data: 'create collection success'
|
||||
};
|
||||
}
|
||||
};
|
|
@ -0,0 +1,20 @@
|
|||
const cloud = require('wx-server-sdk');
|
||||
|
||||
cloud.init({
|
||||
env: cloud.DYNAMIC_CURRENT_ENV
|
||||
});
|
||||
|
||||
// 获取小程序二维码云函数入口函数
|
||||
exports.main = async (event, context) => {
|
||||
// 获取小程序二维码的buffer
|
||||
const resp = await cloud.openapi.wxacode.get({
|
||||
path: 'pages/index/index'
|
||||
});
|
||||
const { buffer } = resp;
|
||||
// 将图片上传云存储空间
|
||||
const upload = await cloud.uploadFile({
|
||||
cloudPath: 'code.png',
|
||||
fileContent: buffer
|
||||
});
|
||||
return upload.fileID;
|
||||
};
|
|
@ -0,0 +1,17 @@
|
|||
const cloud = require('wx-server-sdk');
|
||||
|
||||
cloud.init({
|
||||
env: cloud.DYNAMIC_CURRENT_ENV
|
||||
});
|
||||
|
||||
// 获取openId云函数入口函数
|
||||
exports.main = async (event, context) => {
|
||||
// 获取基础信息
|
||||
const wxContext = cloud.getWXContext();
|
||||
|
||||
return {
|
||||
openid: wxContext.OPENID,
|
||||
appid: wxContext.APPID,
|
||||
unionid: wxContext.UNIONID,
|
||||
};
|
||||
};
|
|
@ -0,0 +1,25 @@
|
|||
const getOpenId = require('./getOpenId/index');
|
||||
const getMiniProgramCode = require('./getMiniProgramCode/index');
|
||||
const createCollection = require('./createCollection/index');
|
||||
const selectRecord = require('./selectRecord/index');
|
||||
const updateRecord = require('./updateRecord/index');
|
||||
const sumRecord = require('./sumRecord/index');
|
||||
|
||||
|
||||
// 云函数入口函数
|
||||
exports.main = async (event, context) => {
|
||||
switch (event.type) {
|
||||
case 'getOpenId':
|
||||
return await getOpenId.main(event, context);
|
||||
case 'getMiniProgramCode':
|
||||
return await getMiniProgramCode.main(event, context);
|
||||
case 'createCollection':
|
||||
return await createCollection.main(event, context);
|
||||
case 'selectRecord':
|
||||
return await selectRecord.main(event, context);
|
||||
case 'updateRecord':
|
||||
return await updateRecord.main(event, context);
|
||||
case 'sumRecord':
|
||||
return await sumRecord.main(event, context);
|
||||
}
|
||||
};
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"name": "quickstartFunctions",
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"wx-server-sdk": "~2.4.0"
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
const cloud = require('wx-server-sdk');
|
||||
|
||||
cloud.init({
|
||||
env: cloud.DYNAMIC_CURRENT_ENV
|
||||
});
|
||||
const db = cloud.database();
|
||||
|
||||
// 查询数据库集合云函数入口函数
|
||||
exports.main = async (event, context) => {
|
||||
// 返回数据库查询结果
|
||||
return await db.collection('sales').get();
|
||||
};
|
|
@ -0,0 +1,18 @@
|
|||
const cloud = require('wx-server-sdk');
|
||||
|
||||
cloud.init({
|
||||
env: cloud.DYNAMIC_CURRENT_ENV
|
||||
});
|
||||
const db = cloud.database();
|
||||
const $ = db.command.aggregate;
|
||||
|
||||
// 聚合记录云函数入口函数
|
||||
exports.main = async (event, context) => {
|
||||
// 返回数据库聚合结果
|
||||
return db.collection('sales').aggregate()
|
||||
.group({
|
||||
_id: '$region',
|
||||
sum: $.sum('$sales')
|
||||
})
|
||||
.end();
|
||||
};
|
|
@ -0,0 +1,32 @@
|
|||
const cloud = require('wx-server-sdk');
|
||||
|
||||
cloud.init({
|
||||
env: cloud.DYNAMIC_CURRENT_ENV
|
||||
});
|
||||
const db = cloud.database();
|
||||
|
||||
// 修改数据库信息云函数入口函数
|
||||
exports.main = async (event, context) => {
|
||||
try {
|
||||
// 遍历修改数据库信息
|
||||
for (let i = 0; i < event.data.length; i++) {
|
||||
await db.collection('sales').where({
|
||||
_id: event.data[i]._id
|
||||
})
|
||||
.update({
|
||||
data: {
|
||||
sales: event.data[i].sales
|
||||
},
|
||||
});
|
||||
}
|
||||
return {
|
||||
success: true,
|
||||
data: event.data
|
||||
};
|
||||
} catch (e) {
|
||||
return {
|
||||
success: false,
|
||||
errMsg: e
|
||||
};
|
||||
}
|
||||
};
|
|
@ -1,68 +0,0 @@
|
|||
Component({
|
||||
properties: {
|
||||
options: {
|
||||
type: Array,
|
||||
value: []
|
||||
},
|
||||
defaultOption: {
|
||||
type: Object,
|
||||
value: {
|
||||
id: '000',
|
||||
name: '全部城市'
|
||||
}
|
||||
},
|
||||
key: {
|
||||
type: String,
|
||||
value: 'id'
|
||||
},
|
||||
text: {
|
||||
type: String,
|
||||
value: 'name'
|
||||
}
|
||||
},
|
||||
data: {
|
||||
result: [],
|
||||
isShow: false,
|
||||
current: {}
|
||||
},
|
||||
methods: {
|
||||
optionTap(e) {
|
||||
let dataset = e.target.dataset
|
||||
this.setData({
|
||||
current: dataset,
|
||||
isShow: false
|
||||
});
|
||||
|
||||
// 调用父组件方法,并传参
|
||||
this.triggerEvent("change", { ...dataset })
|
||||
},
|
||||
openClose() {
|
||||
this.setData({
|
||||
isShow: !this.data.isShow
|
||||
})
|
||||
},
|
||||
|
||||
// 此方法供父组件调用
|
||||
close() {
|
||||
this.setData({
|
||||
isShow: false
|
||||
})
|
||||
}
|
||||
},
|
||||
lifetimes: {
|
||||
attached() {
|
||||
// 属性名称转换, 如果不是 { id: '', name:'' } 格式,则转为 { id: '', name:'' } 格式
|
||||
let result = []
|
||||
if (this.data.key !== 'id' || this.data.text !== 'name') {
|
||||
for (let item of this.data.options) {
|
||||
let { [this.data.key]: id, [this.data.text]: name } = item
|
||||
result.push({ id, name })
|
||||
}
|
||||
}
|
||||
this.setData({
|
||||
current: Object.assign({}, this.data.defaultOption),
|
||||
result: result
|
||||
})
|
||||
}
|
||||
}
|
||||
})
|
|
@ -1,17 +0,0 @@
|
|||
<view class="select-box">
|
||||
<view class="select-current" catchtap="openClose">
|
||||
<text class="current-name">{{current.name}}</text>
|
||||
</view>
|
||||
<view class="option-list" wx:if="{{isShow}}" catchtap="optionTap">
|
||||
<text class="option"
|
||||
data-id="{{defaultOption.id}}"
|
||||
data-name="{{defaultOption.name}}">{{defaultOption.name}}
|
||||
</text>
|
||||
<text class="option"
|
||||
wx:for="{{result}}"
|
||||
wx:key="{{item.id}}"
|
||||
data-id="{{item.id}}"
|
||||
data-name="{{item.name}}">{{item.name}}
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
|
@ -1,60 +0,0 @@
|
|||
.select-box {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
font-size: 30rpx;
|
||||
}
|
||||
|
||||
.select-current {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
padding: 0 10rpx;
|
||||
line-height: 70rpx;
|
||||
border: 1rpx solid #ddd;
|
||||
border-radius: 6rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.select-current::after {
|
||||
position: absolute;
|
||||
display: block;
|
||||
right: 16rpx;
|
||||
top: 30rpx;
|
||||
content: '';
|
||||
width: 0;
|
||||
height: 0;
|
||||
border: 10rpx solid transparent;
|
||||
border-top: 10rpx solid #999;
|
||||
}
|
||||
|
||||
.current-name {
|
||||
display: block;
|
||||
width: 85%;
|
||||
height: 100%;
|
||||
word-wrap: normal;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.option-list {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 76rpx;
|
||||
width: 100%;
|
||||
padding: 12rpx 20rpx 10rpx 20rpx;
|
||||
border-radius: 6rpx;
|
||||
box-sizing: border-box;
|
||||
z-index: 99;
|
||||
box-shadow: 0rpx 0rpx 1rpx 1rpx rgba(0, 0, 0, 0.2) inset;
|
||||
background-color: #fff;
|
||||
}
|
||||
|
||||
.option {
|
||||
display: block;
|
||||
width: 100%;
|
||||
line-height: 70rpx;
|
||||
border-bottom: 1rpx solid #eee;
|
||||
}
|
||||
|
||||
.option:last-child {
|
||||
border-bottom: none;
|
||||
padding-bottom: 0;
|
||||
}
|
3789
data/city.js
|
@ -0,0 +1,39 @@
|
|||
// app.js
|
||||
App({
|
||||
onLaunch: function () {
|
||||
if (!wx.cloud) {
|
||||
console.error('请使用 2.2.3 或以上的基础库以使用云能力');
|
||||
} else {
|
||||
// console.error('1111');
|
||||
|
||||
wx.cloud.init({
|
||||
// env 参数说明:
|
||||
// env 参数决定接下来小程序发起的云开发调用(wx.cloud.xxx)会默认请求到哪个云环境的资源
|
||||
// 此处请填入环境 ID, 环境 ID 可打开云控制台查看
|
||||
// 如不填则使用默认环境(第一个创建的环境)
|
||||
env: 'cloud1-1gbol7fg65e0e0cf',
|
||||
traceUser: true,
|
||||
}).then(res => {
|
||||
wx.cloud.callFunction({
|
||||
// 要调用的云函数名称
|
||||
name: 'getOpenId',
|
||||
// 传递给云函数的event参数
|
||||
// data: {
|
||||
// x: 1,
|
||||
// y: 2,
|
||||
// }
|
||||
}).then(res => {
|
||||
console.log("res",res)
|
||||
// output: res.result === 3
|
||||
}).catch(err => {
|
||||
// handle error
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
|
||||
this.globalData = {};
|
||||
}
|
||||
|
||||
});
|
|
@ -0,0 +1,25 @@
|
|||
{
|
||||
"pages": [
|
||||
"pages/start/start",
|
||||
"pages/login/login",
|
||||
"pages/map/map",
|
||||
"pages/list/list",
|
||||
"pages/item/item",
|
||||
"pages/items/items"
|
||||
],
|
||||
"window": {
|
||||
"backgroundColor": "#F6F6F6",
|
||||
"backgroundTextStyle": "light",
|
||||
"navigationBarBackgroundColor": "#F6F6F6",
|
||||
"navigationBarTitleText": "桥梁空间智慧监管试点平台",
|
||||
"navigationBarTextStyle": "black"
|
||||
},
|
||||
"permission": {
|
||||
"scope.userLocation": {
|
||||
"desc": "你的位置信息将用于小程序位置接口的效果展示"
|
||||
}
|
||||
},
|
||||
"sitemapLocation": "sitemap.json",
|
||||
"style": "v2",
|
||||
"cloudfunctionRoot": "./cloudfunction/"
|
||||
}
|
|
@ -0,0 +1,27 @@
|
|||
/**app.wxss**/
|
||||
.container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
button {
|
||||
background: initial;
|
||||
}
|
||||
|
||||
button:focus{
|
||||
outline: 0;
|
||||
}
|
||||
|
||||
button::after{
|
||||
border: none;
|
||||
}
|
||||
|
||||
|
||||
.page {
|
||||
background: #f6f6f6;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: flex-start;
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
// miniprogram/components/cloudTipModal/index.js
|
||||
const { isMac } = require('../../envList.js');
|
||||
|
||||
Component({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
showUploadTip: false,
|
||||
tipText: isMac ? 'sh ./uploadCloudFunction.sh' : './uploadCloudFunction.bat'
|
||||
},
|
||||
properties: {
|
||||
showUploadTipProps: Boolean
|
||||
},
|
||||
observers: {
|
||||
showUploadTipProps: function(showUploadTipProps) {
|
||||
this.setData({
|
||||
showUploadTip: showUploadTipProps
|
||||
});
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
onChangeShowUploadTip() {
|
||||
this.setData({
|
||||
showUploadTip: !this.data.showUploadTip
|
||||
});
|
||||
},
|
||||
|
||||
copyShell() {
|
||||
wx.setClipboardData({
|
||||
data: this.data.tipText,
|
||||
});
|
||||
},
|
||||
}
|
||||
|
||||
});
|
|
@ -0,0 +1,4 @@
|
|||
{
|
||||
"usingComponents": {},
|
||||
"component": true
|
||||
}
|
|
@ -0,0 +1,13 @@
|
|||
<!--miniprogram/components/cloudTipModal/index.wxml-->
|
||||
<view class="install_tip" wx:if="{{showUploadTip}}">
|
||||
<view class="install_tip_back"></view>
|
||||
<view class="install_tip_detail">
|
||||
<view class="install_tip_detail_title">体验前需部署云资源</view>
|
||||
<view class="install_tip_detail_tip">请开启调试器进入终端窗口,复制并运行以下命令</view>
|
||||
<view class="install_tip_detail_shell">
|
||||
{{tipText}}
|
||||
<view bindtap="copyShell" class="install_tip_detail_copy">复制</view>
|
||||
</view>
|
||||
<view bindtap="onChangeShowUploadTip" class="install_tip_detail_button">已执行命令</view>
|
||||
</view>
|
||||
</view>
|
|
@ -0,0 +1,57 @@
|
|||
.install_tip_back {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
background-color: rgba(0,0,0,0.4);
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.install_tip_detail {
|
||||
position: fixed;
|
||||
background-color: white;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
top: 60%;
|
||||
border-radius: 40rpx 40rpx 0 0;
|
||||
padding: 50rpx;
|
||||
z-index: 9;
|
||||
}
|
||||
|
||||
.install_tip_detail_title {
|
||||
font-weight: 400;
|
||||
font-size: 40rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.install_tip_detail_tip {
|
||||
font-size: 25rpx;
|
||||
color: rgba(0,0,0,0.4);
|
||||
margin-top: 20rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.install_tip_detail_shell {
|
||||
margin: 70rpx 0;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.install_tip_detail_copy {
|
||||
color: #546488;
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
|
||||
.install_tip_detail_button {
|
||||
color: #07C160;
|
||||
font-weight: 500;
|
||||
background-color: rgba(0,0,0,0.1);
|
||||
width: 60%;
|
||||
text-align: center;
|
||||
height: 90rpx;
|
||||
line-height: 90rpx;
|
||||
border-radius: 10rpx;
|
||||
margin: 0 auto;
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
const envList = [{"envId":"cloud1-1gbol7fg65e0e0cf","alias":"cloud1"}]
|
||||
const isMac = false
|
||||
module.exports = {
|
||||
envList,
|
||||
isMac
|
||||
}
|
|
@ -0,0 +1,11 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="8px" height="14px" viewBox="0 0 8 14" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>☀ iOS/☀ 图标/线型/icons_outlined_arrow@3x</title>
|
||||
<g id="控件" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" fill-opacity="0.3">
|
||||
<g id="4.列表/z.覆盖层/右边/箭头" transform="translate(-334.000000, -21.000000)" fill="#000000">
|
||||
<g id="☀-iOS/☀-图标/线型/icons_outlined_arrow" transform="translate(332.000000, 16.000000)">
|
||||
<path d="M2.45405845,6.58064919 L3.51471863,5.51998901 L9.29361566,11.298886 C9.68374096,11.6890113 9.6872014,12.318069 9.29361566,12.7116547 L3.51471863,18.4905518 L2.45405845,17.4298916 L7.87867966,12.0052704 L2.45405845,6.58064919 Z" id="Combined-Shape"></path>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 906 B |
After Width: | Height: | Size: 155 KiB |
After Width: | Height: | Size: 328 KiB |
After Width: | Height: | Size: 181 KiB |
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"lockfileVersion": 1
|
||||
}
|
|
@ -16,14 +16,14 @@ Page({
|
|||
*/
|
||||
pagechange: function (e) {
|
||||
// 通过touch判断,改变tab的下标值
|
||||
if ("touch" === e.detail.source) {
|
||||
let currentPageIndex = this.data.currentIndex;
|
||||
currentPageIndex = (currentPageIndex + 1) % 2;
|
||||
// 拿到当前索引并动态改变
|
||||
this.setData({
|
||||
currentIndex: currentPageIndex,
|
||||
})
|
||||
}
|
||||
// if ("touch" === e.detail.source) {
|
||||
// let currentPageIndex = this.data.currentIndex;
|
||||
// currentPageIndex = (currentPageIndex + 1) % 2;
|
||||
// // 拿到当前索引并动态改变
|
||||
// this.setData({
|
||||
// currentIndex: currentPageIndex,
|
||||
// })
|
||||
// }
|
||||
},
|
||||
|
||||
//点击tab时触发
|
|
@ -4,24 +4,7 @@
|
|||
<loading hidden="{{!loading}}">加载中...</loading>
|
||||
<!--滚动列表-->
|
||||
<scroll-view scroll-y="true" wx:if="{{movie.title}}">
|
||||
<!-- <view class='meta'>
|
||||
<view class='poster'>
|
||||
<video
|
||||
id="myVideo"
|
||||
src="http://wxsnsdy.tc.qq.com/105/20210/snsdyvideodownload?filekey=30280201010421301f0201690402534804102ca905ce620b1241b726bc41dcff44e00204012882540400&bizid=1023&hy=SH&fileparam=302c020101042530230204136ffd93020457e3c4ff02024ef202031e8d7f02030f42400204045a320a0201000400"
|
||||
danmu-list="{{danmuList}}"
|
||||
enable-danmu
|
||||
danmu-btn
|
||||
controls
|
||||
></video>
|
||||
</view>
|
||||
<view class='main'>
|
||||
<text class='title'>{{movie.title}}({{movie.year}})</text>
|
||||
|
||||
</view>
|
||||
<text class='info'>描述:{{movie.average}}</text>
|
||||
|
||||
</view> -->
|
||||
|
||||
<view>
|
||||
<!-- Tab布局 -->
|
||||
<view class='navBox'>
|
|
@ -0,0 +1,71 @@
|
|||
// pages/item/item.js
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
title: '',
|
||||
loading: true,
|
||||
movie: {},
|
||||
currentIndex: 0,
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
pagechange: function (e) {
|
||||
// 通过touch判断,改变tab的下标值
|
||||
// if ("touch" === e.detail.source) {
|
||||
// let currentPageIndex = this.data.currentIndex;
|
||||
// currentPageIndex = (currentPageIndex + 1) % 2;
|
||||
// // 拿到当前索引并动态改变
|
||||
// this.setData({
|
||||
// currentIndex: currentPageIndex,
|
||||
// })
|
||||
// }
|
||||
},
|
||||
|
||||
//点击tab时触发
|
||||
titleClick: function (e) {
|
||||
this.setData({
|
||||
//拿到当前索引并动态改变
|
||||
currentIndex: e.currentTarget.dataset.idx
|
||||
})
|
||||
},
|
||||
onLoad: function (options) {
|
||||
const _this = this;
|
||||
// 拼接请求url
|
||||
// const url = 'https://api.douban.com/v2/movie/subject/' + options.id;
|
||||
// // 请求数据
|
||||
// wx.request({
|
||||
// url: url,
|
||||
// data: {},
|
||||
// header: {
|
||||
// 'content-type': 'json' // 默认值
|
||||
// },
|
||||
// success:function(res) {
|
||||
// // 赋值
|
||||
// _this.setData({
|
||||
// movie: res.data,
|
||||
// loading: false // 隐藏等待框
|
||||
// })
|
||||
// }
|
||||
// })
|
||||
_this.setData({
|
||||
movie: {title:'日本7.2级地震',images:'111',year:'2022年7月7日',average:'17:00:00日本发生7.2级地震,张家港桥跨中位移超限,其余桥梁无异',directors:'111',name:'111',casts:'111',directors:'111',summary:'1111'},
|
||||
loading: false // 隐藏等待框
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady: function () {
|
||||
// 修改导航栏标题
|
||||
wx.setNavigationBarTitle({
|
||||
// title: this.data.title + '<<预警信息<<详情'
|
||||
title: this.data.title+ '事件回看'
|
||||
})
|
||||
}
|
||||
})
|
|
@ -1,4 +1,3 @@
|
|||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
|
@ -0,0 +1,81 @@
|
|||
<!--pages/item/item.wxml-->
|
||||
<!--详情页-->
|
||||
<!--等待框-->
|
||||
<loading hidden="{{!loading}}">加载中...</loading>
|
||||
<!--滚动列表-->
|
||||
<scroll-view scroll-y="true" wx:if="{{movie.title}}">
|
||||
<view class='meta'>
|
||||
<view class='poster'>
|
||||
<video
|
||||
id="myVideo"
|
||||
src="http://wxsnsdy.tc.qq.com/105/20210/snsdyvideodownload?filekey=30280201010421301f0201690402534804102ca905ce620b1241b726bc41dcff44e00204012882540400&bizid=1023&hy=SH&fileparam=302c020101042530230204136ffd93020457e3c4ff02024ef202031e8d7f02030f42400204045a320a0201000400"
|
||||
danmu-list="{{danmuList}}"
|
||||
enable-danmu
|
||||
danmu-btn
|
||||
controls
|
||||
></video>
|
||||
</view>
|
||||
<view class='main'>
|
||||
<text class='title'>{{movie.title}}({{movie.year}})</text>
|
||||
|
||||
</view>
|
||||
<text class='info'>描述:{{movie.average}}</text>
|
||||
|
||||
</view>
|
||||
<!-- <view>
|
||||
|
||||
<view class='navBox'>
|
||||
<view class='titleBox' bindtap='titleClick' data-idx='0'>
|
||||
<text class="{{0 == currentIndex ? 'fontColorBox' : ''}}">事件回放</text>
|
||||
<hr class="{{0 == currentIndex ? 'lineBox' : 'notLineBox'}}" />
|
||||
</view>
|
||||
<view class='titleBox' bindtap='titleClick' data-idx='1'>
|
||||
<text class="{{1 == currentIndex ? 'fontColorBox1' : ''}}">现场直播</text>
|
||||
<hr class="{{1 == currentIndex ? 'lineBox' : 'notLineBox'}} " />
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<swiper class='swiperTtemBox' bindchange='pagechange' current='{{currentIndex}}'>
|
||||
<swiper-item class='swiperTtemBox'>
|
||||
<view class='meta'>
|
||||
<view class='poster'>
|
||||
<video
|
||||
id="myVideo"
|
||||
src="http://wxsnsdy.tc.qq.com/105/20210/snsdyvideodownload?filekey=30280201010421301f0201690402534804102ca905ce620b1241b726bc41dcff44e00204012882540400&bizid=1023&hy=SH&fileparam=302c020101042530230204136ffd93020457e3c4ff02024ef202031e8d7f02030f42400204045a320a0201000400"
|
||||
danmu-list="{{danmuList}}"
|
||||
enable-danmu
|
||||
danmu-btn
|
||||
controls>
|
||||
</video>
|
||||
</view>
|
||||
<view class='main'>
|
||||
<text class='title'>{{movie.title}}({{movie.year}})</text>
|
||||
|
||||
</view>
|
||||
<text class='info'>描述:{{movie.average}}</text>
|
||||
|
||||
</view>
|
||||
</swiper-item>
|
||||
<swiper-item class='swiperTtemBox'>
|
||||
<view class='meta'>
|
||||
<view class='poster'>
|
||||
<video
|
||||
id="myVideo"
|
||||
src="http://wxsnsdy.tc.qq.com/105/20210/snsdyvideodownload?filekey=30280201010421301f0201690402534804102ca905ce620b1241b726bc41dcff44e00204012882540400&bizid=1023&hy=SH&fileparam=302c020101042530230204136ffd93020457e3c4ff02024ef202031e8d7f02030f42400204045a320a0201000400"
|
||||
danmu-list="{{danmuList}}"
|
||||
enable-danmu
|
||||
danmu-btn
|
||||
controls
|
||||
></video>
|
||||
</view>
|
||||
<view class='main'>
|
||||
<text class='title'>{{movie.title}}({{movie.year}})</text>
|
||||
|
||||
</view>
|
||||
<text class='info'>描述:{{movie.average}}</text>
|
||||
</view>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
</view> -->
|
||||
|
||||
</scroll-view>
|
|
@ -0,0 +1,97 @@
|
|||
/* pages/item/item.wxss */
|
||||
.meta {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
height: 1000rpx;
|
||||
padding: 50rpx 40rpx;
|
||||
}
|
||||
.poster {
|
||||
height: 50%;
|
||||
margin: 20rpx;
|
||||
}
|
||||
.title {
|
||||
font-size: 42rpx;
|
||||
color: #444;
|
||||
}
|
||||
.info {
|
||||
font-size: 15px;
|
||||
color: #888;
|
||||
margin-left: 20px;
|
||||
padding: 20px 10px;
|
||||
line-height: 28px;
|
||||
}
|
||||
.summary {
|
||||
|
||||
margin: 30rpx auto;
|
||||
}
|
||||
.label {
|
||||
display: block;
|
||||
}
|
||||
.content {
|
||||
color: #666;
|
||||
font-size: 20rpx;
|
||||
padding: 10rpx;
|
||||
}
|
||||
.mainBottom{
|
||||
padding-top: 30px;
|
||||
}
|
||||
.main{
|
||||
margin-top: -20px;
|
||||
}
|
||||
|
||||
.fontColorBox,
|
||||
.fontColorBox1 {
|
||||
/* 文字默认颜色 */
|
||||
color: black;
|
||||
}
|
||||
|
||||
.navBox {
|
||||
/* 顶部tab盒子样式 */
|
||||
width: 100%;
|
||||
height: 108rpx;
|
||||
background: white;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.navBox view:last-child {
|
||||
/* 最后一个tab标题的样式 */
|
||||
padding-left: 20%;
|
||||
}
|
||||
|
||||
.titleBox {
|
||||
/* 未选中文字的样式 */
|
||||
color: rgb(168, 170, 175);
|
||||
font-size: 30rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
.lineBox,.notLineBox{
|
||||
/* 选中及未选中底线共同样式 */
|
||||
width: 32rpx;
|
||||
height: 8rpx;
|
||||
}
|
||||
|
||||
.lineBox {
|
||||
/* 选中底线样式 */
|
||||
background: rgb(43, 44, 45);
|
||||
margin-top: 16rpx;
|
||||
border-radius: 4rpx;
|
||||
}
|
||||
|
||||
.notLineBox {
|
||||
/* 未选中底线样式 */
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.swiperTtemBox {
|
||||
/* 底部内容样式 */
|
||||
height: 100vh;
|
||||
overflow: scroll;
|
||||
margin: 12rpx 0rpx;
|
||||
background: white;
|
||||
font-size: 28rpx;
|
||||
}
|
|
@ -11,12 +11,14 @@ Page({
|
|||
loading: true, // 显示等待框
|
||||
page: 0, // page:当前页--
|
||||
tabList: [{
|
||||
title: '预警信息',
|
||||
title: '现场直播',
|
||||
num: 0
|
||||
}, {
|
||||
title: '特殊事件',
|
||||
num: 0
|
||||
num: 1
|
||||
}],
|
||||
movie: {title:'日本7.2级地震',images:'111',year:'2022年7月7日',average:'17:00:00日本发生7.2级地震,张家港桥跨中位移超限,其余桥梁无异',directors:'111',name:'111',casts:'111',directors:'111',summary:'1111'},
|
||||
currentIndex:0
|
||||
},
|
||||
|
||||
/**
|
||||
|
@ -30,6 +32,13 @@ Page({
|
|||
page: a,
|
||||
})
|
||||
},
|
||||
//点击tab时触发
|
||||
titleClick: function (e) {
|
||||
this.setData({
|
||||
//拿到当前索引并动态改变
|
||||
currentIndex: e.currentTarget.dataset.idx
|
||||
})
|
||||
},
|
||||
// changeNext:function () {
|
||||
// setTimeout(() => {
|
||||
// wx.redirectTo({
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"usingComponents": {
|
||||
|
||||
}
|
||||
}
|
|
@ -0,0 +1,151 @@
|
|||
<!--pages/list/list.wxml-->
|
||||
<!--列表页-->
|
||||
<view class="body">
|
||||
<!--等待框-->
|
||||
|
||||
<!-- <view class="swiper-tab">
|
||||
<view wx:for="{{tabList}}" wx:key="index" catchtap="change" class="{{currentIndex==index?'selected-menu':'unselect-menu'}}" data-pageid="{{index}}">{{item.title}}
|
||||
<hr class="{{currentIndex==index?'selected-line':'unselect-line'}}" />
|
||||
</view>
|
||||
</view> -->
|
||||
<view>
|
||||
<!-- Tab布局 -->
|
||||
<view class='navBox'>
|
||||
<view class='titleBox' bindtap='titleClick' data-idx='0'>
|
||||
<text class="{{0 == currentIndex ? 'fontColorBox' : ''}}">现场直播</text>
|
||||
<hr class="{{0 == currentIndex ? 'lineBox' : 'notLineBox'}}" />
|
||||
</view>
|
||||
<view class='titleBox' bindtap='titleClick' data-idx='1'>
|
||||
<text class="{{1 == currentIndex ? 'fontColorBox1' : ''}}">特殊事件</text>
|
||||
<hr class="{{1 == currentIndex ? 'lineBox' : 'notLineBox'}} " />
|
||||
</view>
|
||||
</view>
|
||||
<!-- 内容布局 -->
|
||||
<swiper class='swiperTtemBox' bindchange='pagechange' current='{{currentIndex}}'>
|
||||
<swiper-item class='swiperTtemBox'>
|
||||
<view class='metaVideo'>
|
||||
<view class='posterVideo'>
|
||||
<video
|
||||
id="myVideo"
|
||||
src="http://wxsnsdy.tc.qq.com/105/20210/snsdyvideodownload?filekey=30280201010421301f0201690402534804102ca905ce620b1241b726bc41dcff44e00204012882540400&bizid=1023&hy=SH&fileparam=302c020101042530230204136ffd93020457e3c4ff02024ef202031e8d7f02030f42400204045a320a0201000400"
|
||||
danmu-list="{{danmuList}}"
|
||||
enable-danmu
|
||||
danmu-btn
|
||||
controls>
|
||||
</video>
|
||||
</view>
|
||||
<view class='main'>
|
||||
<text class='title'>{{movie.title}}({{movie.year}})</text>
|
||||
|
||||
</view>
|
||||
<text class='info'>描述:{{movie.average}}</text>
|
||||
|
||||
</view>
|
||||
</swiper-item>
|
||||
<swiper-item class='swiperTtemBox'>
|
||||
<view class="view-Content">
|
||||
<loading hidden="{{!loading}}">加载中...</loading>
|
||||
<view wx:for="{{tabList}}" wx:key="index" class="{{page==index?'show tabCon':'hidden tabCon'}}">
|
||||
<view class="content">
|
||||
<view class='page-body' wx:for="{{list}}" wx:key="id" wx:if="page==1">
|
||||
<block wx:if="{{type === 'us_box'}}">
|
||||
<navigator url='../items/items?id={{item.id}}'>
|
||||
<view class='item'>
|
||||
|
||||
<view class='meta'>
|
||||
<view class='titContent'>
|
||||
<text class='title'>{{item.title}}</text>
|
||||
<text class='titleButton' >详情</text>
|
||||
</view>
|
||||
<text class='sub-title'>{{item.year}}</text><text>{{item.content}}</text>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</navigator>
|
||||
</block>
|
||||
<block wx:else>
|
||||
<navigator url='../items/items?id={{ item.id }}'>
|
||||
<view class='item'>
|
||||
|
||||
<view class='meta'>
|
||||
<view class='titContent'>
|
||||
<text class='title'>{{item.title}}</text>
|
||||
<text class='titleButton' >详情</text>
|
||||
</view>
|
||||
<view class='subContent'>
|
||||
<text class='sub-year'>{{item.year}}</text><text class='sub-title'>{{item.content}}</text>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</navigator>
|
||||
</block>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
</view>
|
||||
<!-- <view class="view-Content">
|
||||
<loading hidden="{{!loading}}">加载中...</loading>
|
||||
<view wx:for="{{tabList}}" wx:key="index" class="{{page==index?'show tabCon':'hidden tabCon'}}">
|
||||
<view class="content">
|
||||
<view class='page-body' wx:for="{{list}}" wx:key="id" wx:if="page==1">
|
||||
<block wx:if="{{type === 'us_box'}}">
|
||||
<navigator url='../item/item?id={{item.id}}'>
|
||||
<view class='item'>
|
||||
|
||||
<view class='meta'>
|
||||
<view class='titContent'>
|
||||
<text class='title'>{{item.title}}</text>
|
||||
<text class='titleButton' >详情</text>
|
||||
</view>
|
||||
<text class='sub-title'>{{item.year}}</text><text>{{item.content}}</text>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</navigator>
|
||||
</block>
|
||||
<block wx:else>
|
||||
<navigator url='../item/item?id={{ item.id }}'>
|
||||
<view class='item'>
|
||||
|
||||
<view class='meta'>
|
||||
<view class='titContent'>
|
||||
<text class='title'>{{item.title}}</text>
|
||||
<text class='titleButton' >详情</text>
|
||||
</view>
|
||||
<view class='subContent'>
|
||||
<text class='sub-year'>{{item.year}}</text><text class='sub-title'>{{item.content}}</text>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</navigator>
|
||||
</block>
|
||||
</view>
|
||||
<view class='meta' wx:if="page==0">
|
||||
<view class='poster'>
|
||||
<video
|
||||
id="myVideo"
|
||||
src="http://wxsnsdy.tc.qq.com/105/20210/snsdyvideodownload?filekey=30280201010421301f0201690402534804102ca905ce620b1241b726bc41dcff44e00204012882540400&bizid=1023&hy=SH&fileparam=302c020101042530230204136ffd93020457e3c4ff02024ef202031e8d7f02030f42400204045a320a0201000400"
|
||||
danmu-list="{{danmuList}}"
|
||||
enable-danmu
|
||||
danmu-btn
|
||||
controls
|
||||
></video>
|
||||
</view>
|
||||
<view class='main'>
|
||||
<text class='title'>{{movie.title}}({{movie.year}})</text>
|
||||
|
||||
</view>
|
||||
<text class='info'>描述:{{movie.average}}</text>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view> -->
|
||||
|
||||
</view>
|
|
@ -1,6 +1,6 @@
|
|||
/* pages/list/list.wxss */
|
||||
/* pages/dingdan/dingdan.wxss */
|
||||
page {
|
||||
.page {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
|
@ -180,3 +180,74 @@ page {
|
|||
.tips image,.tips text {
|
||||
vertical-align: middle;
|
||||
}
|
||||
.navBox {
|
||||
/* 顶部tab盒子样式 */
|
||||
width: 100%;
|
||||
height: 108rpx;
|
||||
background: white;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.navBox view:last-child {
|
||||
/* 最后一个tab标题的样式 */
|
||||
padding-left: 20%;
|
||||
}
|
||||
|
||||
.titleBox {
|
||||
/* 未选中文字的样式 */
|
||||
color: rgb(168, 170, 175);
|
||||
font-size: 30rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
}
|
||||
.lineBox,.notLineBox{
|
||||
/* 选中及未选中底线共同样式 */
|
||||
width: 32rpx;
|
||||
height: 8rpx;
|
||||
}
|
||||
|
||||
.lineBox {
|
||||
/* 选中底线样式 */
|
||||
background: rgb(43, 44, 45);
|
||||
margin-top: 16rpx;
|
||||
border-radius: 4rpx;
|
||||
}
|
||||
|
||||
.notLineBox {
|
||||
/* 未选中底线样式 */
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.swiperTtemBox {
|
||||
/* 底部内容样式 */
|
||||
height: 100vh;
|
||||
overflow: scroll;
|
||||
margin: 12rpx 0rpx;
|
||||
background: white;
|
||||
font-size: 28rpx;
|
||||
}
|
||||
.metaVideo {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
height: 1000rpx;
|
||||
padding: 50rpx 40rpx;
|
||||
}
|
||||
.posterVideo {
|
||||
height: 50%;
|
||||
margin: 20rpx;
|
||||
}
|
||||
.title {
|
||||
font-size: 42rpx;
|
||||
color: #444;
|
||||
}
|
||||
.info {
|
||||
font-size: 15px;
|
||||
color: #888;
|
||||
margin-left: 20px;
|
||||
padding: 20px 10px;
|
||||
line-height: 28px;
|
||||
}
|
|
@ -0,0 +1,106 @@
|
|||
// pages/item/item.js
|
||||
Page({
|
||||
|
||||
/**
|
||||
* 页面的初始数据
|
||||
*/
|
||||
data: {
|
||||
userInfo: {},
|
||||
openID: ""
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
// onGotUserInfo: function (e) { // 一定要传递参数e
|
||||
// console.log("e",e)
|
||||
// const that = this // 保存this对象
|
||||
// // 调用云函数
|
||||
// wx.cloud.callFunction({
|
||||
// name: "login",
|
||||
// data: {
|
||||
// openID: ui.openID // 从缓存中获取到openID字段
|
||||
// },
|
||||
// success: res => {
|
||||
// console.log("res",res)
|
||||
// console.log("云函数调用成功")
|
||||
// that.setData({
|
||||
// openID: res.result.openid, // 将用户openID保存在opendID里面
|
||||
// userInfo: e.detail.userInfo // 将用户信息保存在userInfo里面
|
||||
// })
|
||||
// that.data.userInfo.openID = that.data.openID // 将openID作为一个字段加入userInfo中
|
||||
// console.log(that.data.userInfo)
|
||||
// wx.setStorageSync('userInfo', that.data.userInfo) // 将userInfo保存至缓存中
|
||||
// },
|
||||
// fail: res => {
|
||||
// console.log("云函数调用失败")
|
||||
// }
|
||||
// })
|
||||
// },
|
||||
// 页面加载时执行
|
||||
onLoad: function (options) {
|
||||
// 从缓存中获取userInfo
|
||||
const userInfoFromStorage = wx.getStorageSync("userInfo")
|
||||
this.setData({
|
||||
userInfo: userInfoFromStorage,
|
||||
openID: userInfoFromStorage.openID
|
||||
})
|
||||
},
|
||||
async getPhoneNumber(event) {
|
||||
const errMsg = event.detail.errMsg
|
||||
// 判断用户是否点击允许
|
||||
if (errMsg === "getPhoneNumber:ok") {
|
||||
const cloudId = event.detail.cloudID
|
||||
const cloudIdList = [cloudId]
|
||||
// 请求云函数
|
||||
const cloudFunRes = await wx.cloud.callFunction({
|
||||
name: "getMobile", // 云函数名
|
||||
data: { cloudIdList }
|
||||
})
|
||||
const jsonStr = cloudFunRes.result.dataList[0].json
|
||||
const jsonData = JSON.parse(jsonStr)
|
||||
const phoneNumber = jsonData.data.phoneNumber
|
||||
// 手机号
|
||||
this.onGotUserInfo(phoneNumber)
|
||||
}
|
||||
},
|
||||
//请求登录接口
|
||||
onGotUserInfo: function (e) { // 一定要传递参数e
|
||||
console.log("e",e)
|
||||
const that = this // 保存this对象
|
||||
// 调用云函数
|
||||
wx.cloud.callContainer({
|
||||
config: {
|
||||
env: 'prod-3g40nj3p9469214c',// 微信云托管的环境ID
|
||||
}, //encodeURIComponent为获取的token转义
|
||||
header: {
|
||||
'X-WX-SERVICE': 'bsisp-api', // xxx中填入服务名称(微信云托管 - 服务管理 - 服务列表 - 服务名称)
|
||||
},
|
||||
path: '/api/v1/login',
|
||||
data: {
|
||||
phoneNumber: e // 从缓存中获取到phoneNumber字段
|
||||
},
|
||||
method:'POST',
|
||||
success: function (res) {
|
||||
console.log("res",res)
|
||||
if(res.data.status=='SUCCESS'){
|
||||
console.log("res.data.data",res.data.data)
|
||||
wx.setStorageSync('token', res.data.data)
|
||||
setTimeout(() => {
|
||||
wx.redirectTo({
|
||||
url:'/pages/map/map'
|
||||
})
|
||||
}, 2000);
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
/**
|
||||
* 生命周期函数--监听页面初次渲染完成
|
||||
*/
|
||||
onReady: function () {
|
||||
// 修改导航栏标题
|
||||
}
|
||||
})
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"usingComponents": {}
|
||||
}
|
|
@ -0,0 +1,23 @@
|
|||
|
||||
<view wx:if="{{!openID}}">
|
||||
<!-- <button open-type="getUserInfo" lang="zh_CN" bindgetuserinfo="onGotUserInfo">
|
||||
登陆
|
||||
</button> -->
|
||||
<button open-type="getPhoneNumber" lang="zh_CN" bindgetphonenumber="getPhoneNumber">
|
||||
登陆
|
||||
</button>
|
||||
</view>
|
||||
<!-- <view>
|
||||
<button
|
||||
class="login authorize"
|
||||
open-type="getPhoneNumber"
|
||||
bindgetphonenumber="getPhoneNumber"
|
||||
>
|
||||
获取手机号
|
||||
</button>
|
||||
</view> -->
|
||||
<view class="uploader-container" wx:if="{{openID}}">
|
||||
<image class="image" src="{{userInfo.avatarUrl}}"></image>
|
||||
<view class="name">{{userInfo.nickName}}</view>
|
||||
</view>
|
||||
|
|
@ -0,0 +1,19 @@
|
|||
.image {
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
margin: 0 auto;
|
||||
display: block;
|
||||
padding-top: 20px;
|
||||
}
|
||||
|
||||
.name {
|
||||
text-align: center;
|
||||
padding-top: 10px;
|
||||
}
|
||||
|
||||
button {
|
||||
background: #ea5149;
|
||||
width: 60%;
|
||||
margin-top: 100px;
|
||||
color: #fff;
|
||||
}
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
Before Width: | Height: | Size: 47 KiB After Width: | Height: | Size: 47 KiB |
Before Width: | Height: | Size: 3.2 KiB After Width: | Height: | Size: 3.2 KiB |
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 17 KiB |
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
Before Width: | Height: | Size: 66 KiB After Width: | Height: | Size: 66 KiB |
|
@ -14,7 +14,10 @@ Page({
|
|||
latitude: 33.963864,
|
||||
longitude: 118.277435,
|
||||
suggestion:[],
|
||||
district:{},
|
||||
district:{
|
||||
latitude: 34.093003,
|
||||
longitude: 118.756021,
|
||||
},
|
||||
distance: '',
|
||||
distance: '',
|
||||
scale: 11,
|
||||
|
@ -23,7 +26,6 @@ Page({
|
|||
customCalloutMarkerIds: [1,2,3],
|
||||
list:{name:'1111',},
|
||||
mapShow:true,
|
||||
listShow:false,
|
||||
tabList: [{
|
||||
title: '总体情况',
|
||||
num: 0
|
||||
|
@ -34,60 +36,24 @@ Page({
|
|||
listNew: [{id:'01',title:'日本7.2级地震',content:'17:00:00日本发生7.2级地震,张家港桥跨中位移超限,其余桥梁无异',year:'2022年7月7日'},{id:'01',title:'日本7.2级地震',content:'17:00:00日本发生7.2级地震,张家港桥跨中位移超限,其余桥梁无异',year:'2022年7月7日'},{id:'01',title:'日本7.2级地震',content:'17:00:00日本发生7.2级地震,张家港桥跨中位移超限,其余桥梁无异',year:'2022年7月7日'},{id:'01',title:'日本7.2级地震',content:'17:00:00日本发生7.2级地震,张家港桥跨中位移超限,其余桥梁无异',year:'2022年7月7日'},{id:'01',title:'日本7.2级地震',content:'17:00:00日本发生7.2级地震,张家港桥跨中位移超限,其余桥梁无异',year:'2022年7月7日'},{id:'01',title:'日本7.2级地震',content:'17:00:00日本发生7.2级地震,张家港桥跨中位移超限,其余桥梁无异',year:'2022年7月7日'}], // 数据列表
|
||||
page: 0, // page:当前页--
|
||||
currentIndex: 0,
|
||||
bridge:[{
|
||||
iconPath: './images/mapIcon.png',
|
||||
width: 25,
|
||||
height: 25,
|
||||
address: 'S324 淮沭新河特大桥',
|
||||
latitude: 34.079334,
|
||||
longitude: 118.726242,
|
||||
img:'./images/hsxhtdq.png',
|
||||
id: 900000000,
|
||||
callout: {
|
||||
display: 'BYCLICK'
|
||||
}
|
||||
}, {
|
||||
iconPath: './images/mapIcon.png',
|
||||
width: 25,
|
||||
height: 25,
|
||||
address: 'S245 沭新河大桥',
|
||||
latitude: 34.157661,
|
||||
longitude: 118.713860,
|
||||
img:'./images/sxhdq.png',
|
||||
id: 900000001,
|
||||
callout: {
|
||||
display: 'BYCLICK'
|
||||
}
|
||||
}, {
|
||||
iconPath: './images/mapIcon.png',
|
||||
width: 25,
|
||||
height: 25,
|
||||
address: 'S324 柴米河大桥',
|
||||
img:'./images/cmhdq.png',
|
||||
latitude: 34.064072,
|
||||
longitude: 118.827042,
|
||||
id: 900000002,
|
||||
callout: {
|
||||
display: 'BYCLICK'
|
||||
}
|
||||
}],
|
||||
bridge:[],
|
||||
bridgeItem:{
|
||||
iconPath: './images/mapIcon.png',
|
||||
width: 25,
|
||||
height: 25,
|
||||
address: 'S324 淮沭新河特大桥',
|
||||
bridgeName: '淮沭新河特大桥',
|
||||
latitude: 34.079334,
|
||||
longitude: 118.726242,
|
||||
img:'./images/hsxhtdq.png',
|
||||
id: 900000000,
|
||||
id: "1",
|
||||
callout: {
|
||||
display: 'BYCLICK'
|
||||
}
|
||||
},
|
||||
flag: true,
|
||||
// 用户输入的学校关键词
|
||||
// 用户输入的关键词
|
||||
searchValue:'',
|
||||
// 滚动选择的学校索引
|
||||
// 滚动选择的索引
|
||||
selectSchoolIndex:'',
|
||||
school_name:'',
|
||||
schoolValidate:'',
|
||||
|
@ -95,15 +61,96 @@ Page({
|
|||
},
|
||||
pagechange: function (e) {
|
||||
console.log("e",e)
|
||||
|
||||
// 通过touch判断,改变tab的下标值
|
||||
if ("touch" === e.detail.source) {
|
||||
let currentPageIndex = this.data.currentIndex;
|
||||
currentPageIndex = (currentPageIndex + 1) % 2;
|
||||
// 拿到当前索引并动态改变
|
||||
this.setData({
|
||||
currentIndex: currentPageIndex,
|
||||
})
|
||||
}
|
||||
// if ("touch" === e.detail.source) {
|
||||
// let currentPageIndex = this.data.currentIndex;
|
||||
// currentPageIndex = (currentPageIndex + 1) % 2;
|
||||
// // 拿到当前索引并动态改变
|
||||
// this.setData({
|
||||
// currentIndex: currentPageIndex,
|
||||
// })
|
||||
// }
|
||||
},
|
||||
//获取所有桥梁数据
|
||||
getMainbridge: function () {
|
||||
let that = this;
|
||||
// 调用云函数
|
||||
wx.cloud.callContainer({
|
||||
config: {
|
||||
env: 'prod-3g40nj3p9469214c',// 微信云托管的环境ID
|
||||
},
|
||||
path: '/api/v1/bridges',
|
||||
method: 'GET',
|
||||
header: {
|
||||
'X-WX-SERVICE': 'bsisp-api',
|
||||
'content-type': 'application/json',
|
||||
'Authorization':'Bearer '+wx.getStorageSync('token')
|
||||
},
|
||||
|
||||
success: function (res) {
|
||||
console.log("res",res)
|
||||
if(res.data.status="SUCCESS"){
|
||||
var getBridgeContent = []
|
||||
console.log("res.data.data",res.data.data)
|
||||
for (let i = 0; i < res.data.data.length; i++) {
|
||||
getBridgeContent.push({ // 获取返回结果,放到sug数组中
|
||||
iconPath: './images/mapIcon.png',
|
||||
width: 25,
|
||||
height: 25,
|
||||
callout: {
|
||||
display: 'BYCLICK'
|
||||
},
|
||||
bridgeName: res.data.data[i].bridgeName,
|
||||
id: Number(res.data.data[i].id),
|
||||
img: res.data.data[i].fileId,
|
||||
latitude: res.data.data[i].latitude,
|
||||
longitude: res.data.data[i].longitude,
|
||||
bridgeLength: res.data.data[i].bridgeLength,
|
||||
bridgeType: res.data.data[i].bridgeType,
|
||||
|
||||
roadNo: res.data.data[i].roadNo,
|
||||
stakeNo: res.data.data[i].stakeNo,
|
||||
});
|
||||
}
|
||||
console.log("getBridgeContent",getBridgeContent)
|
||||
|
||||
that.getMyLocation(getBridgeContent)
|
||||
that.setData({
|
||||
bridge: getBridgeContent
|
||||
})
|
||||
console.log("that.data.bridge",that.data.bridge)
|
||||
}
|
||||
|
||||
}
|
||||
})
|
||||
},
|
||||
//获取单个桥数据 //wx.getStorageSync
|
||||
getItembridge: function (e) { // 一定要传递参数e
|
||||
console.log("e",e)
|
||||
console.log("wx.getStorageSync('token')",wx.getStorageSync('token'))
|
||||
// const that = this // 保存this对象
|
||||
// 调用云函数
|
||||
wx.cloud.callContainer({
|
||||
config: {
|
||||
env: 'prod-3g40nj3p9469214c',// 微信云托管的环境ID
|
||||
},
|
||||
path: '/api/v1/bridges',
|
||||
method: 'get',
|
||||
header: {
|
||||
'X-WX-SERVICE': 'bsisp-api',
|
||||
'content-type': 'application/json',
|
||||
'Authorization':'Bearer '+wx.getStorageSync('token')
|
||||
},
|
||||
data: {
|
||||
bridgeName: [e]// 从缓存中获取到phoneNumber字段
|
||||
},
|
||||
|
||||
success: function (res) {
|
||||
console.log("res",res)
|
||||
|
||||
}
|
||||
})
|
||||
},
|
||||
showSchoolPicker()
|
||||
{
|
||||
|
@ -128,20 +175,19 @@ Page({
|
|||
},
|
||||
confirm(e)
|
||||
{
|
||||
|
||||
console.log("self.e",e)
|
||||
let self = this;
|
||||
console.log("self.data")
|
||||
self.setData({
|
||||
flag: !self.data.flag
|
||||
})
|
||||
// self.inputVal
|
||||
// 获取用户选择的学校
|
||||
// 获取选择
|
||||
let item = self.data.bridge[self.data.selectSchoolIndex]?self.data.bridge[self.data.selectSchoolIndex]:self.data.bridge[0];
|
||||
console.log("item",item)
|
||||
// 通过发送自定义事件把用户选择的学校传递到父组件
|
||||
// 通过发送自定义事件把用户选择的传递到父组件
|
||||
self.setData({
|
||||
// 用户选择的学校索引
|
||||
inputVal:item.address
|
||||
// 选择
|
||||
inputVal:item.bridgeName
|
||||
})
|
||||
self.bindmarkertap(e,item)
|
||||
},
|
||||
|
@ -151,28 +197,10 @@ Page({
|
|||
console.log("e.detail.value[0]",e.detail.value[0])
|
||||
let self = this;
|
||||
self.setData({
|
||||
// 用户选择的学校索引
|
||||
// 索引
|
||||
selectSchoolIndex:e.detail.value[0]
|
||||
})
|
||||
},
|
||||
getItems(e){
|
||||
console.log("e",e)
|
||||
let self = this;
|
||||
if (self.data.items.length && self.data.initValue) {
|
||||
let items = self.data.items
|
||||
for (let i = 0; i < items.length; i++) {
|
||||
if (self.data.initValue == items[i].id) {
|
||||
self.setData({
|
||||
bridge: [i]
|
||||
})
|
||||
return
|
||||
}
|
||||
}
|
||||
}
|
||||
self.setData({
|
||||
bridge: [0]
|
||||
})
|
||||
},
|
||||
//点击tab时触发
|
||||
titleClick: function (e) {
|
||||
console.log("e",e.currentTarget.dataset.idx)
|
||||
|
@ -196,8 +224,8 @@ Page({
|
|||
for (var i = 0; i < res.data.length; i++) {
|
||||
sug.push({ // 获取返回结果,放到sug数组中
|
||||
title: res.data[i].title,
|
||||
id: res.data[i].id,
|
||||
addr: res.data[i].address,
|
||||
id: Number(res.data[i].id),
|
||||
addr: res.data[i].bridgeName,
|
||||
city: res.data[i].city,
|
||||
district: res.data[i].district,
|
||||
latitude: res.data[i].location.lat,
|
||||
|
@ -218,57 +246,23 @@ Page({
|
|||
},
|
||||
|
||||
// 获取我的位置
|
||||
getMyLocation: function () {
|
||||
var that = this;
|
||||
wx.getLocation({
|
||||
type: 'gcj02',
|
||||
success: function (res) {
|
||||
that.setData({
|
||||
latitude: res.latitude,
|
||||
longitude: res.longitude
|
||||
})
|
||||
let arr = [{
|
||||
iconPath: './images/mapIcon.png',
|
||||
width: 25,
|
||||
height: 25,
|
||||
address: 'S324 淮沭新河特大桥',
|
||||
latitude: 34.079334,
|
||||
longitude: 118.726242,
|
||||
img:'./images/hsxhtdq.png',
|
||||
id: 900000000,
|
||||
callout: {
|
||||
display: 'BYCLICK'
|
||||
}
|
||||
}, {
|
||||
iconPath: './images/mapIcon.png',
|
||||
width: 25,
|
||||
height: 25,
|
||||
address: 'S245 沭新河大桥',
|
||||
latitude: 34.157661,
|
||||
longitude: 118.713860,
|
||||
img:'./images/sxhdq.png',
|
||||
id: 900000001,
|
||||
callout: {
|
||||
display: 'BYCLICK'
|
||||
}
|
||||
}, {
|
||||
iconPath: './images/mapIcon.png',
|
||||
width: 25,
|
||||
height: 25,
|
||||
address: 'S324 柴米河大桥',
|
||||
img:'./images/cmhdq.png',
|
||||
latitude: 34.064072,
|
||||
longitude: 118.827042,
|
||||
id: 900000002,
|
||||
callout: {
|
||||
display: 'BYCLICK'
|
||||
}
|
||||
}]
|
||||
that.setData({
|
||||
markers: arr
|
||||
})
|
||||
}
|
||||
getMyLocation: function (e) {
|
||||
var that = this;
|
||||
console.log("e",e)
|
||||
that.setData({
|
||||
markers: e
|
||||
})
|
||||
|
||||
// wx.getLocation({
|
||||
// type: 'gcj02',
|
||||
// success: function (res) {
|
||||
// that.setData({
|
||||
// latitude: res.latitude,
|
||||
// longitude: res.longitude
|
||||
// })
|
||||
|
||||
// }
|
||||
// })
|
||||
},
|
||||
// marker的点击事件
|
||||
bindmarkertap(e,index) {
|
||||
|
@ -276,6 +270,7 @@ Page({
|
|||
|
||||
if(index){
|
||||
console.log('index', index)
|
||||
// this.getItembridge(index.bridgeName)
|
||||
let that = this
|
||||
that.setData({
|
||||
currMaker: index
|
||||
|
@ -284,25 +279,31 @@ Page({
|
|||
console.log('_markers', _markers)
|
||||
let arr = []
|
||||
for (let i = 0; i < _markers.length; i++) {
|
||||
if (parseInt(_markers[i].id) === index.id) {
|
||||
console.log("_markers[i].id",_markers[i].id)
|
||||
if (_markers[i].bridgeName === index.bridgeName) {
|
||||
that.setData({
|
||||
isChecked:true ,
|
||||
list:_markers[i]
|
||||
})
|
||||
arr.push({
|
||||
address: _markers[i].address,
|
||||
bridgeName: _markers[i].bridgeName,
|
||||
latitude: _markers[i].latitude,
|
||||
longitude: _markers[i].longitude,
|
||||
img:_markers[i].img,
|
||||
id: _markers[i].id,
|
||||
id: Number(_markers[i].id),
|
||||
width: 40,
|
||||
height: 40,
|
||||
iconPath: './images/mapIcon.png',
|
||||
bridgeLength: _markers[i].bridgeLength,
|
||||
bridgeType: _markers[i].bridgeType,
|
||||
roadNo: _markers[i].roadNo,
|
||||
stakeNo: _markers[i].stakeNo,
|
||||
callout: {
|
||||
// content: `距您${distanceKm}`,
|
||||
content: _markers[i].address,
|
||||
content: _markers[i].bridgeName,
|
||||
img:_markers[i].img,
|
||||
bridgeLength: _markers[i].bridgeLength,
|
||||
bridgeType: _markers[i].bridgeType,
|
||||
roadNo: _markers[i].roadNo,
|
||||
stakeNo: _markers[i].stakeNo,
|
||||
display: 'ALWAYS',
|
||||
color: '#333333',
|
||||
bgColor: '#fff',
|
||||
|
@ -316,11 +317,15 @@ Page({
|
|||
})
|
||||
} else {
|
||||
arr.push({
|
||||
address: _markers[i].address,
|
||||
bridgeName: _markers[i].bridgeName,
|
||||
img:_markers[i].img,
|
||||
bridgeLength: _markers[i].bridgeLength,
|
||||
bridgeType: _markers[i].bridgeType,
|
||||
roadNo: _markers[i].roadNo,
|
||||
stakeNo: _markers[i].stakeNo,
|
||||
latitude: _markers[i].latitude,
|
||||
longitude: _markers[i].longitude,
|
||||
id: _markers[i].id,
|
||||
id: Number(_markers[i].id),
|
||||
width: 25,
|
||||
height: 25,
|
||||
iconPath: './images/mapIcon.png',
|
||||
|
@ -344,12 +349,9 @@ Page({
|
|||
console.log('_markers', _markers)
|
||||
let markerId = parseInt(e.detail.markerId)
|
||||
console.log('markerId', markerId)
|
||||
wx.showLoading({
|
||||
title: `${markerId}`,
|
||||
})
|
||||
_markers.forEach(item => {
|
||||
// console.log('item', item)
|
||||
if (parseInt(item.id) === markerId) {
|
||||
if (Number(item.id) === markerId) {
|
||||
// console.log('11111', item)
|
||||
that.setData({
|
||||
currMaker: item
|
||||
|
@ -358,6 +360,7 @@ Page({
|
|||
})
|
||||
let currMaker = that.data.currMaker
|
||||
console.log('currMaker', that.data.currMaker)
|
||||
this.getItembridge(currMaker.bridgeName)
|
||||
// qqmapsdk.calculateDistance({
|
||||
// to: [{
|
||||
// latitude: currMaker.latitude,
|
||||
|
@ -367,24 +370,32 @@ Page({
|
|||
// console.log("res",res)
|
||||
let arr = []
|
||||
for (let i = 0; i < _markers.length; i++) {
|
||||
if (parseInt(_markers[i].id) === markerId) {
|
||||
if (Number(_markers[i].id) === markerId) {
|
||||
console.log("_markers[i].id",_markers[i].id)
|
||||
that.setData({
|
||||
isChecked:true ,
|
||||
list:_markers[i]
|
||||
})
|
||||
arr.push({
|
||||
address: _markers[i].address,
|
||||
bridgeName: _markers[i].bridgeName,
|
||||
latitude: _markers[i].latitude,
|
||||
longitude: _markers[i].longitude,
|
||||
img:_markers[i].img,
|
||||
id: _markers[i].id,
|
||||
id: Number(_markers[i].id),
|
||||
bridgeLength: _markers[i].bridgeLength,
|
||||
bridgeType: _markers[i].bridgeType,
|
||||
roadNo: _markers[i].roadNo,
|
||||
stakeNo: _markers[i].stakeNo,
|
||||
width: 40,
|
||||
height: 40,
|
||||
iconPath: './images/mapIcon.png',
|
||||
callout: {
|
||||
// content: `距您${distanceKm}`,
|
||||
content: _markers[i].address,
|
||||
content: _markers[i].bridgeName,
|
||||
bridgeLength: _markers[i].bridgeLength,
|
||||
bridgeType: _markers[i].bridgeType,
|
||||
roadNo: _markers[i].roadNo,
|
||||
stakeNo: _markers[i].stakeNo,
|
||||
img:_markers[i].img,
|
||||
display: 'ALWAYS',
|
||||
color: '#333333',
|
||||
|
@ -399,11 +410,15 @@ Page({
|
|||
})
|
||||
} else {
|
||||
arr.push({
|
||||
address: _markers[i].address,
|
||||
bridgeName: _markers[i].bridgeName,
|
||||
img:_markers[i].img,
|
||||
bridgeLength: _markers[i].bridgeLength,
|
||||
bridgeType: _markers[i].bridgeType,
|
||||
roadNo: _markers[i].roadNo,
|
||||
stakeNo: _markers[i].stakeNo,
|
||||
latitude: _markers[i].latitude,
|
||||
longitude: _markers[i].longitude,
|
||||
id: _markers[i].id,
|
||||
id: Number(_markers[i].id),
|
||||
width: 25,
|
||||
height: 25,
|
||||
iconPath: './images/mapIcon.png',
|
||||
|
@ -437,20 +452,21 @@ Page({
|
|||
var that = this;
|
||||
//通过这个方法来实现经纬度反推省市区
|
||||
qqmapsdk.reverseGeocoder({
|
||||
// location: {
|
||||
// latitude: latitude,
|
||||
// longitude: longitude
|
||||
// },
|
||||
location: {
|
||||
latitude: 34.093003,
|
||||
longitude: 118.756021,
|
||||
},
|
||||
|
||||
success: function (res) {
|
||||
that.setData({
|
||||
// district:res.result.address_component.city
|
||||
})
|
||||
console.log(res,'asda');
|
||||
// var obj = {
|
||||
|
||||
// latitude: 34.093003,
|
||||
// longitude: 118.756021,
|
||||
// }
|
||||
// that.setData({
|
||||
// district:obj
|
||||
// })
|
||||
// console.log(res,'asda');
|
||||
}
|
||||
})
|
||||
},
|
||||
|
@ -463,29 +479,22 @@ Page({
|
|||
* 生命周期函数--监听页面加载
|
||||
*/
|
||||
onLoad(options) {
|
||||
this.getMyLocation()
|
||||
console.log("options",options)
|
||||
var that = this
|
||||
that.getMainbridge()
|
||||
that.getOnlineDistrict()
|
||||
// wx.getLocation({
|
||||
// type: 'wgs84',
|
||||
// // altitude: false,
|
||||
// success: (result) => {
|
||||
// console.log("result",result)
|
||||
// // var obj = {
|
||||
// // latitude:result.latitude,longitude:result.longitude
|
||||
// // }
|
||||
// that.getOnlineDistrict(result.latitude, result.longitude)
|
||||
// },
|
||||
// });
|
||||
|
||||
wx.getLocation({
|
||||
type: 'wgs84',
|
||||
altitude: false,
|
||||
success: (result) => {
|
||||
that.getOnlineDistrict(result.latitude, result.longitude)
|
||||
// var obj = {
|
||||
// latitude:result.latitude,longitude:result.longitude
|
||||
// }
|
||||
var obj = {
|
||||
|
||||
latitude: 34.093003,
|
||||
longitude: 118.756021,
|
||||
}
|
||||
this.setData({
|
||||
district:obj
|
||||
})
|
||||
console.log(this.district,obj,'district');
|
||||
},
|
||||
});
|
||||
|
||||
},
|
||||
/**
|
||||
* 生命周期函数--监听页面显示
|
|
@ -0,0 +1,5 @@
|
|||
{
|
||||
"usingComponents": {
|
||||
|
||||
}
|
||||
}
|
|
@ -3,9 +3,9 @@
|
|||
<view>
|
||||
|
||||
<!-- 内容布局 -->
|
||||
<swiper class='swiperTtemBox' bindchange='pagechange' current='{{currentIndex}}'>
|
||||
<swiper class='swiperTtemBox' bindchange='pagechange' current='{{currentIndex}}' >
|
||||
|
||||
<swiper-item class='swiperTtemBox'>
|
||||
<swiper-item class='swiperTtemBox' catchtouchmove="stopTouchMove">
|
||||
<view class="mapContent" >
|
||||
<view class="mapTop">
|
||||
<!-- <view class="inputVal">
|
||||
|
@ -44,19 +44,19 @@
|
|||
</view>
|
||||
<view class="title">
|
||||
<view class="text">
|
||||
<span style="font-size:15px;font-weight: 600;">{{list.address}}</span>
|
||||
<span style="font-size:15px;font-weight: 600;">{{list.roadNo}}{{list.bridgeName}}</span>
|
||||
<view style="display: flex;align-items: center" bindtap='handleRouter'>
|
||||
<span style="font-size:14px;color:rgb(105, 131, 255)">详情</span>
|
||||
<van-icon name="arrow" style="font-size:14px;color:rgb(105, 131, 255);margin: 8rpx 0 0 5rpx;"/>
|
||||
</view>
|
||||
</view>
|
||||
<view class="middle" style="font-size:13px;margin: 18rpx 0; width: 100%;overflow: hidden;">
|
||||
<span style="word-break: keep-all;white-space:nowrap; width: 100%; ">(14+9*20)+(20+2*30+20)+(6*20+14)</span>
|
||||
<span style="word-break: keep-all;white-space:nowrap; width: 100%; ">{{list.bridgeLength}}</span>
|
||||
</view>
|
||||
<view class="bottom">
|
||||
<span class="btn" style="width: 70rpx;">g15</span>
|
||||
<span class="btn" style="width: 120rpx;">kd+212</span>
|
||||
<span class="btn" style="width: 160rpx;">预制空心板</span>
|
||||
<span class="btn" style="width: 15%;">g15</span>
|
||||
<span class="btn" style="width: 35%;">{{list.stakeNo}}</span>
|
||||
<span class="btn" style="width: 45%;">{{list.bridgeType}}</span>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
@ -68,10 +68,10 @@
|
|||
</view>
|
||||
</view>
|
||||
</swiper-item>
|
||||
<swiper-item class='swiperTtemBox'>
|
||||
<view class='page-body' wx:for="{{listNew}}" wx:key="id" v-if='listShow'>
|
||||
<swiper-item class='swiperTtemBox' catchtouchmove="stopTouchMove">
|
||||
<view class='page-body' wx:for="{{listNew}}" wx:key="id" >
|
||||
<block wx:if="{{type === 'us_box'}}">
|
||||
<navigator url='../item/item?id={{item.id}}'>
|
||||
<navigator url='../items/items?id={{ item.id }}'>
|
||||
<view class='item'>
|
||||
|
||||
<view class='meta'>
|
||||
|
@ -86,7 +86,7 @@
|
|||
</navigator>
|
||||
</block>
|
||||
<block wx:else>
|
||||
<navigator url='../item/item?id={{ item.id }}'>
|
||||
<navigator url='../items/items?id={{ item.id }}'>
|
||||
<view class='item'>
|
||||
<view class='meta'>
|
||||
<view class='titContent'>
|
||||
|
@ -153,7 +153,7 @@
|
|||
>
|
||||
|
||||
<picker-view-column class="pickViewColumn">
|
||||
<view wx:for="{{bridge}}" wx:key="id" style="line-height: 104rpx">{{item.address}}</view>
|
||||
<view wx:for="{{bridge}}" wx:key="id" style="line-height: 104rpx">{{item.bridgeName}}</view>
|
||||
</picker-view-column>
|
||||
</picker-view>
|
||||
</view>
|
|
@ -15,6 +15,7 @@
|
|||
.inputVal{
|
||||
width: 100%;
|
||||
height: 100rpx;
|
||||
padding-top: 10rpx;
|
||||
padding-bottom: 10rpx;
|
||||
background-color: rgb(54, 105, 248);
|
||||
display: flex;
|
||||
|
@ -45,6 +46,11 @@
|
|||
padding: 20rpx 15rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.mapContent .infoDisplay{
|
||||
width: 100%;
|
||||
display: none;
|
||||
|
||||
}
|
||||
.mapContent .info .top{
|
||||
width: 100%;
|
||||
height: 170rpx;
|
Before Width: | Height: | Size: 38 KiB After Width: | Height: | Size: 38 KiB |
|
@ -16,7 +16,7 @@ Page({
|
|||
onLoad: function (options) {
|
||||
setTimeout(() => {
|
||||
wx.redirectTo({
|
||||
url:'/pages/map/map'
|
||||
url:'/pages/login/login'
|
||||
})
|
||||
}, 2000);
|
||||
},
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"desc": "关于本文件的更多信息,请参考文档 https://developers.weixin.qq.com/miniprogram/dev/framework/sitemap.html",
|
||||
"rules": [{
|
||||
"action": "allow",
|
||||
"page": "*"
|
||||
"action": "allow",
|
||||
"page": "*"
|
||||
}]
|
||||
}
|
25
package.json
|
@ -1,25 +0,0 @@
|
|||
{
|
||||
"name": "bridgespace-app",
|
||||
"version": "1.0.0",
|
||||
"main": "app.js",
|
||||
"dependencies": {
|
||||
"chokidar": "^3.5.3",
|
||||
"miniprogram-computed": "^4.4.0",
|
||||
"miniprogram-sm-crypto": "^0.3.10",
|
||||
"node-sass": "^7.0.1",
|
||||
"vant-weapp": "^0.5.29",
|
||||
"weui-miniprogram": "^1.2.3"
|
||||
},
|
||||
"devDependencies": {},
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://git.lgzn.space/chengdandan/bridgeSpace.git"
|
||||
},
|
||||
"author": "",
|
||||
"license": "ISC",
|
||||
"keywords": [],
|
||||
"description": ""
|
||||
}
|
|
@ -1,5 +0,0 @@
|
|||
{
|
||||
"usingComponents": {
|
||||
"van-icon":"../../miniprogram_npm/vant-weapp/icon/index"
|
||||
}
|
||||
}
|
|
@ -1 +0,0 @@
|
|||
.list{width:100%;height:100%;display:flex;flex-flow:row wrap;justify-content:center;background:url("https://download-1300932214.cos.ap-nanjing.myqcloud.com/inlandVessel/%E5%9C%A8%E7%BA%BF%E5%AD%A6%E4%B9%A0-%E8%83%8C%E6%99%AF.png") no-repeat;background-size:100% auto}.list .top{width:686rpx;height:100rpx;display:flex;flex-flow:row nowrap;justify-content:space-between;align-items:center}.list .top picker{width:30%}.list .top .search-input{position:relative;width:100%;height:68rpx;-webkit-overflow-scrolling:touch;background:#fff;border-radius:22rpx;font-size:24rpx;color:#1f272a;padding-left:36rpx;box-sizing:border-box}.list .top .search-placeholder{font-size:28rpx}.list .top .phcolor{color:#999;font-size:14px}.list .top .select{width:100%;height:35px;background:#ffffff;border-radius:20px;text-indent:26px}.list .content{width:686rpx;height:calc(100% - 140rpx);margin-top:20rpx;overflow-y:scroll;overflow-x:hidden}.list .content::-webkit-scrollbar{width:0}.list .content>view{width:100%;height:516rpx;background:#ffffff;border-radius:40rpx;margin-bottom:40rpx;overflow:hidden;box-shadow:1px 1px 1px 1px #c6cae9,-1px 0px 1px 1px #c6cae9}.list .content>view .bgpic{width:100%;height:400rpx}.list .content>view .bgpic image{width:100%;height:100%}.list .content>view .bottom{height:116rpx;width:100%;display:flex;flex-flow:row nowrap;justify-content:space-between;padding:0 10rpx;align-items:center;box-sizing:border-box}.list .content>view .bottom .left{width:70%;display:flex;flex-flow:row nowrap;align-items:center}.list .content>view .bottom .left .logo{width:80rpx;height:84rpx;background:url("https://download-1300932214.cos.ap-nanjing.myqcloud.com/inlandVessel/-e-icon.png") no-repeat;background-size:100% 100%}.list .content>view .bottom .left .title{margin-left:20rpx;width:fit-content;font-size:32rpx}.list .content>view .bottom .right{font-size:32rpx;color:#5187fd}.list .model{width:100%;height:100%;position:fixed;top:0;left:0}.list .model .contents{width:80%;padding:0 20rpx;box-sizing:border-box;height:540rpx;background:#ffffff;border-radius:40rpx;position:absolute;top:calc(50% - 270rpx);left:10%;display:flex;flex-flow:row wrap;justify-content:center;align-items:flex-start}.list .model .contents .title{width:100%;height:30px;text-align:center;font-size:40rpx;margin-top:20rpx}.list .model .contents .text{width:80%;height:80rpx;line-height:40rpx;font-size:32rpx}.list .model .contents .people{width:80%;height:60rpx;display:flex;flex-flow:row nowrap;align-items:center;justify-content:space-between}.list .model .contents .people .name{width:35%;display:flex;flex-flow:row nowrap;align-items:center}.list .model .contents .people .name .icon{font-size:32rpx;color:#3669f8;padding-top:10rpx}.list .model .contents .people .name span{font-size:28rpx;margin-left:10rpx}.list .model .contents .people .phone{flex:1;text-align:left;font-size:28rpx;color:#2b61f8}.list .model .contents .handleTrue{width:80%;height:80rpx;text-align:center;line-height:80rpx;font-size:34rpx;letter-spacing:4rpx;color:#ffffff;font-weight:600;background:#3669f8;border-radius:60rpx}.list .model .video{width:90%;height:480rpx;position:absolute;top:calc(50% - 290rpx);left:5%}.list .model .video .top{width:100%;height:40rpx;display:flex;flex-flow:row wrap;justify-content:flex-end;padding-right:10rpx}.list .model .video .top .icon{font-size:36rpx;font-weight:700;color:rgba(255,255,255,0.8)}.list .model .video video{width:100%;height:calc(100% - 40rpx);object-fit:cover}
|
|
@ -1,207 +0,0 @@
|
|||
.list {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-flow: row wrap;
|
||||
justify-content: center;
|
||||
background: url("https://download-1300932214.cos.ap-nanjing.myqcloud.com/inlandVessel/%E5%9C%A8%E7%BA%BF%E5%AD%A6%E4%B9%A0-%E8%83%8C%E6%99%AF.png") no-repeat;
|
||||
background-size: 100% auto;
|
||||
.top {
|
||||
width: 686rpx;
|
||||
height: 100rpx;
|
||||
display: flex;
|
||||
flex-flow: row nowrap;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
picker{
|
||||
width: 30%;
|
||||
}
|
||||
.search-input {
|
||||
position: relative;
|
||||
width: 100%;
|
||||
height: 68rpx;
|
||||
-webkit-overflow-scrolling: touch;
|
||||
background: #fff;
|
||||
border-radius: 22rpx;
|
||||
font-size: 24rpx;
|
||||
color: #1f272a;
|
||||
padding-left: 36rpx;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
//自定义样式
|
||||
.search-placeholder {
|
||||
font-size: 28rpx;
|
||||
}
|
||||
.phcolor {
|
||||
color: #999;
|
||||
font-size: 14px;
|
||||
}
|
||||
.select {
|
||||
width: 100%;
|
||||
height: 35px;
|
||||
background: #ffffff;
|
||||
border-radius: 20px;
|
||||
text-indent: 26px;
|
||||
}
|
||||
}
|
||||
.content {
|
||||
width: 686rpx;
|
||||
height: calc(100% - 140rpx);
|
||||
margin-top: 20rpx;
|
||||
overflow-y: scroll;
|
||||
overflow-x: hidden;
|
||||
&::-webkit-scrollbar {
|
||||
width: 0;
|
||||
}
|
||||
& > view {
|
||||
width: 100%;
|
||||
height: 516rpx;
|
||||
background: #ffffff;
|
||||
border-radius: 40rpx;
|
||||
margin-bottom: 40rpx;
|
||||
overflow: hidden;
|
||||
box-shadow: 1px 1px 1px 1px rgb(198, 202, 233),
|
||||
-1px 0px 1px 1px rgb(198, 202, 233);
|
||||
.bgpic {
|
||||
width: 100%;
|
||||
height: 400rpx;
|
||||
image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
.bottom {
|
||||
height: 116rpx;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-flow: row nowrap;
|
||||
justify-content: space-between;
|
||||
padding: 0 10rpx;
|
||||
align-items: center;
|
||||
box-sizing: border-box;
|
||||
.left {
|
||||
width: 70%;
|
||||
display: flex;
|
||||
flex-flow: row nowrap;
|
||||
align-items: center;
|
||||
.logo {
|
||||
width: 80rpx;
|
||||
height: 84rpx;
|
||||
background: url("https://download-1300932214.cos.ap-nanjing.myqcloud.com/inlandVessel/-e-icon.png") no-repeat;
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
.title {
|
||||
margin-left: 20rpx;
|
||||
width: fit-content;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
}
|
||||
.right {
|
||||
font-size: 32rpx;
|
||||
color: rgb(81, 135, 253);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
.model {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
.contents {
|
||||
width: 80%;
|
||||
padding: 0 20rpx;
|
||||
box-sizing: border-box;
|
||||
height: 540rpx;
|
||||
background: #ffffff;
|
||||
border-radius: 40rpx;
|
||||
position: absolute;
|
||||
top: calc(50% - 270rpx);
|
||||
left: 10%;
|
||||
display: flex;
|
||||
flex-flow: row wrap;
|
||||
justify-content: center;
|
||||
align-items: flex-start;
|
||||
.title {
|
||||
width: 100%;
|
||||
height: 30px;
|
||||
text-align: center;
|
||||
font-size: 40rpx;
|
||||
margin-top: 20rpx;
|
||||
}
|
||||
.text {
|
||||
width: 80%;
|
||||
height: 80rpx;
|
||||
line-height: 40rpx;
|
||||
font-size: 32rpx;
|
||||
}
|
||||
.people {
|
||||
width: 80%;
|
||||
height: 60rpx;
|
||||
display: flex;
|
||||
flex-flow: row nowrap;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
.name {
|
||||
width: 35%;
|
||||
display: flex;
|
||||
flex-flow: row nowrap;
|
||||
align-items: center;
|
||||
.icon {
|
||||
font-size: 32rpx;
|
||||
color: rgb(54, 105, 248);
|
||||
padding-top: 10rpx;
|
||||
}
|
||||
span {
|
||||
font-size: 28rpx;
|
||||
margin-left: 10rpx;
|
||||
}
|
||||
}
|
||||
.phone {
|
||||
flex: 1;
|
||||
text-align: left;
|
||||
font-size: 28rpx;
|
||||
color: rgb(43, 97, 248);
|
||||
}
|
||||
}
|
||||
.handleTrue {
|
||||
width: 80%;
|
||||
height: 80rpx;
|
||||
text-align: center;
|
||||
line-height: 80rpx;
|
||||
font-size: 34rpx;
|
||||
letter-spacing: 4rpx;
|
||||
color: #ffffff;
|
||||
font-weight: 600;
|
||||
background: rgb(54, 105, 248);
|
||||
border-radius: 60rpx;
|
||||
}
|
||||
}
|
||||
.video {
|
||||
width: 90%;
|
||||
height: 480rpx;
|
||||
position: absolute;
|
||||
top: calc(50% - 290rpx);
|
||||
left: 5%;
|
||||
.top {
|
||||
width: 100%;
|
||||
height: 40rpx;
|
||||
display: flex;
|
||||
flex-flow: row wrap;
|
||||
justify-content: flex-end;
|
||||
padding-right: 10rpx;
|
||||
.icon {
|
||||
font-size: 36rpx;
|
||||
font-weight: 700;
|
||||
color: rgba(255, 255, 255, 0.8);
|
||||
}
|
||||
}
|
||||
video {
|
||||
width: 100%;
|
||||
height: calc(100% - 40rpx);
|
||||
object-fit: cover;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,61 +0,0 @@
|
|||
<!--pages/list/list.wxml-->
|
||||
<!--列表页-->
|
||||
<view class="body">
|
||||
<!--等待框-->
|
||||
|
||||
<view class="swiper-tab">
|
||||
<view wx:for="{{tabList}}" wx:key="index" catchtap="change" class="{{page==index?'selected-menu':'unselect-menu'}}" data-pageid="{{index}}">{{item.title}}
|
||||
<hr class="{{page==index?'selected-line':'unselect-line'}}" />
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="view-Content">
|
||||
<loading hidden="{{!loading}}">加载中...</loading>
|
||||
<view wx:for="{{tabList}}" wx:key="index" class="{{page==index?'show tabCon':'hidden tabCon'}}">
|
||||
<view class="content">
|
||||
<!-- <view class='page-header'>
|
||||
<text class='page-title'>{{title}}</text>
|
||||
</view> -->
|
||||
<!--列表-->
|
||||
<view class='page-body' wx:for="{{list}}" wx:key="id">
|
||||
<!--类型判断,显示不同的数据-->
|
||||
<block wx:if="{{type === 'us_box'}}">
|
||||
<navigator url='../item/item?id={{item.id}}'>
|
||||
<view class='item'>
|
||||
|
||||
<view class='meta'>
|
||||
<view class='titContent'>
|
||||
<text class='title'>{{item.title}}</text>
|
||||
<text class='titleButton' >详情</text>
|
||||
</view>
|
||||
<text class='sub-title'>{{item.year}}</text><text>{{item.content}}</text>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</navigator>
|
||||
</block>
|
||||
<!--另一种情况-->
|
||||
<block wx:else>
|
||||
<navigator url='../item/item?id={{ item.id }}'>
|
||||
<view class='item'>
|
||||
|
||||
<view class='meta'>
|
||||
<view class='titContent'>
|
||||
<text class='title'>{{item.title}}</text>
|
||||
<text class='titleButton' >详情</text>
|
||||
</view>
|
||||
<view class='subContent'>
|
||||
<text class='sub-year'>{{item.year}}</text><text class='sub-title'>{{item.content}}</text>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</navigator>
|
||||
</block>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
|
@ -1,5 +0,0 @@
|
|||
{
|
||||
"usingComponents": {
|
||||
"van-icon":"../../miniprogram_npm/vant-weapp/icon/index"
|
||||
}
|
||||
}
|
|
@ -1,65 +1,81 @@
|
|||
{
|
||||
"description": "项目配置文件,详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
|
||||
"packOptions": {
|
||||
"ignore": [
|
||||
{
|
||||
"value": ".eslintrc.js",
|
||||
"type": "file"
|
||||
}
|
||||
],
|
||||
"include": []
|
||||
},
|
||||
"miniprogramRoot": "miniprogram/",
|
||||
"cloudfunctionRoot": "cloudfunctions/",
|
||||
"setting": {
|
||||
"bundle": false,
|
||||
"userConfirmedBundleSwitch": false,
|
||||
"urlCheck": true,
|
||||
"scopeDataCheck": false,
|
||||
"coverView": true,
|
||||
"es6": true,
|
||||
"enhance": true,
|
||||
"postcss": true,
|
||||
"compileHotReLoad": true,
|
||||
"lazyloadPlaceholderEnable": false,
|
||||
"preloadBackgroundData": false,
|
||||
"minified": true,
|
||||
"autoAudits": false,
|
||||
"newFeature": false,
|
||||
"uglifyFileName": false,
|
||||
"uploadWithSourceMap": true,
|
||||
"useIsolateContext": true,
|
||||
"newFeature": true,
|
||||
"coverView": true,
|
||||
"nodeModules": false,
|
||||
"enhance": true,
|
||||
"autoAudits": false,
|
||||
"showShadowRootInWxmlPanel": true,
|
||||
"scopeDataCheck": false,
|
||||
"uglifyFileName": false,
|
||||
"checkInvalidKey": true,
|
||||
"checkSiteMap": true,
|
||||
"uploadWithSourceMap": true,
|
||||
"compileHotReLoad": false,
|
||||
"lazyloadPlaceholderEnable": false,
|
||||
"useMultiFrameRuntime": true,
|
||||
"useApiHook": true,
|
||||
"useApiHostProcess": true,
|
||||
"showShadowRootInWxmlPanel": true,
|
||||
"packNpmManually": false,
|
||||
"enableEngineNative": false,
|
||||
"packNpmRelationList": [
|
||||
{
|
||||
"packageJsonPath": "./package.json",
|
||||
"miniprogramNpmDistDir": "./miniprogram/"
|
||||
}
|
||||
],
|
||||
"minifyWXSS": true,
|
||||
"showES6CompileOption": false,
|
||||
"minifyWXML": true,
|
||||
"useStaticServer": true,
|
||||
"checkInvalidKey": true,
|
||||
"babelSetting": {
|
||||
"ignore": [],
|
||||
"disablePlugins": [],
|
||||
"outputPath": ""
|
||||
},
|
||||
"enableEngineNative": false,
|
||||
"useIsolateContext": true,
|
||||
"userConfirmedBundleSwitch": false,
|
||||
"packNpmManually": false,
|
||||
"packNpmRelationList": [],
|
||||
"minifyWXSS": true,
|
||||
"disableUseStrict": false,
|
||||
"useCompilerPlugins": false
|
||||
"showES6CompileOption": false,
|
||||
"useCompilerPlugins": false,
|
||||
"minifyWXML": true,
|
||||
"useStaticServer": true
|
||||
},
|
||||
"compileType": "miniprogram",
|
||||
"libVersion": "2.19.4",
|
||||
"appid": "wxa9783cf92ee95a72",
|
||||
"projectname": "bridgespace-app",
|
||||
"condition": {},
|
||||
"projectname": "quickstart-wx-cloud",
|
||||
"libVersion": "2.14.1",
|
||||
"cloudfunctionTemplateRoot": "cloudfunctionTemplate/",
|
||||
"condition": {
|
||||
"search": {
|
||||
"list": []
|
||||
},
|
||||
"conversation": {
|
||||
"list": []
|
||||
},
|
||||
"plugin": {
|
||||
"list": []
|
||||
},
|
||||
"game": {
|
||||
"list": []
|
||||
},
|
||||
"miniprogram": {
|
||||
"list": [
|
||||
{
|
||||
"id": -1,
|
||||
"name": "db guide",
|
||||
"pathName": "pages/databaseGuide/databaseGuide"
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"srcMiniprogramRoot": "miniprogram/",
|
||||
"compileType": "miniprogram",
|
||||
"packOptions": {
|
||||
"ignore": [],
|
||||
"include": []
|
||||
},
|
||||
"editorSetting": {
|
||||
"tabIndent": "insertSpaces",
|
||||
"tabSize": 2
|
||||
}
|
||||
},
|
||||
"description": "项目配置文件,详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html"
|
||||
}
|
|
@ -1,8 +1,62 @@
|
|||
{
|
||||
"projectname": "inlandVessel-app",
|
||||
"setting": {
|
||||
"compileHotReLoad": true
|
||||
"compileHotReLoad": true,
|
||||
"urlCheck": true
|
||||
},
|
||||
"condition": {
|
||||
"miniprogram": {
|
||||
"list": [
|
||||
{
|
||||
"name": "db guide",
|
||||
"pathName": "pages/databaseGuide/databaseGuide",
|
||||
"query": ""
|
||||
},
|
||||
{
|
||||
"name": "pages/getOpenId/index",
|
||||
"pathName": "pages/getOpenId/index",
|
||||
"query": "",
|
||||
"scene": null
|
||||
},
|
||||
{
|
||||
"name": "pages/deployService/index",
|
||||
"pathName": "pages/deployService/index",
|
||||
"query": "",
|
||||
"scene": null
|
||||
},
|
||||
{
|
||||
"name": "pages/selectRecord/index",
|
||||
"pathName": "pages/selectRecord/index",
|
||||
"query": "",
|
||||
"scene": null
|
||||
},
|
||||
{
|
||||
"name": "pages/sumRecordResult/index",
|
||||
"pathName": "pages/sumRecordResult/index",
|
||||
"query": "",
|
||||
"scene": null
|
||||
},
|
||||
{
|
||||
"name": "pages/updateRecord/index",
|
||||
"pathName": "pages/updateRecord/index",
|
||||
"query": "",
|
||||
"scene": null
|
||||
},
|
||||
{
|
||||
"name": "pages/updateRecordResult/index",
|
||||
"pathName": "pages/updateRecordResult/index",
|
||||
"query": "",
|
||||
"scene": null
|
||||
},
|
||||
{
|
||||
"name": "pages/updateRecordSuccess/index",
|
||||
"pathName": "pages/updateRecordSuccess/index",
|
||||
"query": "",
|
||||
"scene": null
|
||||
}
|
||||
]
|
||||
}
|
||||
},
|
||||
"projectname": "%E6%A1%A5%E6%A2%81%E7%A9%BA%E9%97%B4",
|
||||
"description": "项目私有配置文件。此文件中的内容将覆盖 project.config.json 中的相同字段。项目的改动优先同步到此文件中。详见文档:https://developers.weixin.qq.com/miniprogram/dev/devtools/projectconfig.html",
|
||||
"libVersion": "2.25.1"
|
||||
"libVersion": "2.23.4"
|
||||
}
|
|
@ -0,0 +1 @@
|
|||
"C:\Program Files (x86)\Tencent\微信web开发者工具\cli.bat" cloud functions deploy --e cloud1-1gbol7fg65e0e0cf --n quickstartFunctions --r --project "D:\桥梁空间" --report_first --report
|