-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
45 changed files
with
1,589 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
.DS_Store | ||
node_modules/ | ||
unpackage/ | ||
npm-debug.log* | ||
yarn-debug.log* | ||
yarn-error.log* | ||
/test/unit/coverage/ | ||
|
||
# Editor directories and files | ||
.idea | ||
.vscode | ||
*.suo | ||
*.ntvs* | ||
*.njsproj | ||
*.sln | ||
manifest.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{ // launch.json 配置了启动调试时相关设置,configurations下节点名称可为 app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/ | ||
// launchtype项可配置值为local或remote, local代表前端连本地云函数,remote代表前端连云端云函数 | ||
"version": "0.0", | ||
"configurations": [{ | ||
"type": "uniCloud", | ||
"default": { | ||
"launchtype": "remote" | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
<script> | ||
export default { | ||
onLaunch: function() { | ||
console.log('App Launch'); | ||
const userInfo = uni.getStorageSync('userInfo'); | ||
if(userInfo){ | ||
this.globalData.userInfo = userInfo | ||
} | ||
}, | ||
onShow: function() { | ||
console.log('App Show'); | ||
}, | ||
onHide: function() { | ||
console.log('App Hide'); | ||
}, | ||
globalData: { | ||
api: { | ||
home: 'https://ecf20ecb-ad68-4ff4-994f-e94b0d610533.bspapp.com/http/api/home', | ||
openid: 'https://ecf20ecb-ad68-4ff4-994f-e94b0d610533.bspapp.com/http/api/openid', | ||
}, | ||
subscribe: 'https://ecf20ecb-ad68-4ff4-994f-e94b0d610533.bspapp.com/http/api/subscribe', | ||
openid: '', | ||
userInfo: '', | ||
}, | ||
methods: { | ||
shareConfig(){ | ||
var messages = [{ | ||
title: '美团饿了么大额红包,每日可领!', | ||
path: '/pages/index/index', | ||
imageUrl : 'https://upload-images.jianshu.io/upload_images/302100-d28345a30e3c51c7.png', | ||
imageUrl : 'https://upload-images.jianshu.io/upload_images/302100-d28345a30e3c51c7.png', | ||
},{ | ||
title: '吃了这么多年外卖,你知道这个秘密吗?', | ||
path: '/pages/index/index', | ||
imageUrl : 'https://upload-images.jianshu.io/upload_images/302100-d28345a30e3c51c7.png' | ||
},{ | ||
title: '这样点外卖,一年省下一个亿', | ||
path: '/pages/index/index', | ||
imageUrl : 'https://upload-images.jianshu.io/upload_images/302100-d28345a30e3c51c7.png' | ||
},{ | ||
title: '点外卖前先领券,吃霸王餐', | ||
path: '/pages/index/index', | ||
imageUrl : 'https://upload-images.jianshu.io/upload_images/302100-d28345a30e3c51c7.png' | ||
},{ | ||
title: '美团饿了么内部优惠券,手慢无', | ||
path: '/pages/index/index', | ||
imageUrl : 'https://upload-images.jianshu.io/upload_images/302100-d28345a30e3c51c7.png' | ||
},{ | ||
title: '点外卖不用优惠券,你就out了', | ||
path: '/pages/index/index', | ||
imageUrl : 'https://upload-images.jianshu.io/upload_images/302100-d28345a30e3c51c7.png' | ||
},{ | ||
title: '外卖不为人知的秘密,点这解密', | ||
path: '/pages/index/index', | ||
imageUrl : 'https://upload-images.jianshu.io/upload_images/302100-d28345a30e3c51c7.png' | ||
},{ | ||
title: '震惊!小伙点外卖竟然花了1分钱', | ||
path: '/pages/index/index', | ||
imageUrl : 'https://upload-images.jianshu.io/upload_images/302100-d28345a30e3c51c7.png' | ||
},{ | ||
title: '从这点外卖,你也可以吃霸王餐', | ||
path: '/pages/index/index', | ||
imageUrl : 'https://upload-images.jianshu.io/upload_images/302100-d28345a30e3c51c7.png' | ||
}]; | ||
return messages[Math.floor(Math.random()*messages.length)]; | ||
} | ||
} | ||
}; | ||
</script> | ||
|
||
<style> | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,130 @@ | ||
<template> | ||
<view> | ||
<view :class="['mask',maskState===0?'none':maskState===1?'show':'']"> | ||
<view class="mask-content"> | ||
<view class="mask-content-topbar"> | ||
<view class="left" @tap="cance">取消</view> | ||
<view class="right" @tap="confirm">确定</view> | ||
</view> | ||
<view class="mask-content-input"> | ||
<textarea v-model="content" adjustPosition="true" class="textarea" cursorSpacing="50" :focus="focus" maxlength="1000" showConfirmBar="false"></textarea> | ||
</view> | ||
<view class="tips">想吃什么以空格分割输入,例如"面条 米饭 牛排"</view> | ||
</view> | ||
</view> | ||
|
||
|
||
</view> | ||
</template> | ||
|
||
<script> | ||
export default { | ||
data() { | ||
return { | ||
maskState: 0, | ||
content: "", | ||
focus: !1 | ||
}; | ||
}, | ||
methods: { | ||
toggleMask(content) { | ||
this.maskState = 1; //显示弹窗 | ||
this.content = content; | ||
this.focus = true; | ||
}, | ||
cance() { | ||
this.maskState = 0; | ||
}, | ||
confirm() { | ||
this.$emit('ok', this.content); | ||
this.cance(); | ||
} | ||
} | ||
} | ||
</script> | ||
|
||
<style scoped> | ||
.mask { | ||
-webkit-box-align: end; | ||
align-items: flex-end; | ||
position: fixed; | ||
left: 0; | ||
top: 0; | ||
bottom: 0; | ||
background: transparent; | ||
z-index: 9995; | ||
} | ||
.mask, | ||
.mask .mask-content { | ||
display: flex; | ||
width: 100%; | ||
transition: .3s; | ||
} | ||
.mask .mask-content { | ||
background: #fff; | ||
transform: translateY(100%); | ||
-webkit-box-orient: vertical; | ||
-webkit-box-direction: normal; | ||
flex-direction: column; | ||
} | ||
.mask .mask-content .mask-content-topbar { | ||
display: flex; | ||
-webkit-box-orient: horizontal; | ||
-webkit-box-direction: normal; | ||
flex-direction: row; | ||
-webkit-box-pack: justify; | ||
justify-content: space-between; | ||
padding: 20rpx 30rpx 10rpx; | ||
font-size: 32rpx; | ||
} | ||
.mask .mask-content .mask-content-topbar .left { | ||
padding: 10rpx 0rpx; | ||
color: #606266; | ||
} | ||
.mask .mask-content .mask-content-topbar .right { | ||
padding: 10rpx 100rpx; | ||
border-radius: 6rpx; | ||
color: #fff; | ||
font-weight: 500; | ||
background-color: orange; | ||
} | ||
.mask .mask-content .mask-content-input { | ||
width: 718rpx; | ||
padding: 10rpx 16rpx 20rpx; | ||
} | ||
.mask .mask-content .mask-content-input .textarea { | ||
height: 100px; | ||
width: 686rpx; | ||
font-size: 25rpx; | ||
text-align: left; | ||
padding: 16rpx; | ||
border: 2rpx solid #d5d5d6; | ||
border-radius: 8rpx; | ||
} | ||
.mask.none { | ||
display: none; | ||
} | ||
.mask.show { | ||
background: rgba(0, 0, 0, .4); | ||
} | ||
.mask.show .mask-content { | ||
transform: translateY(0); | ||
} | ||
.mask .tips { | ||
font-size: 12px; | ||
color: grey; | ||
} | ||
</style> |
Oops, something went wrong.