| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448 |
- <script>
- /**
- * vuex管理登陆状态,具体可以参考官方登陆模板示例
- */
- import {
- mapMutations
- } from 'vuex';
- export default {
- globalData: {
- // 外网测试地址
- //apiUrl: 'https://dd.meetingfuture.top',// api请求地址
- //tuiguangmaUrl: 'https://dd.meetingfuture.top/storeCode/',
- // 生产地址
- apiUrl: 'http://127.0.0.1:8081',// 移动端api请求地址(client-app)
- platApiUrl: 'http://127.0.0.1:8080',// 管理平台api请求地址(client-plat)
- tuiguangmaUrl: 'http://127.0.0.1:8081/storeCode/',
- // 本地地址
- // apiUrl: 'http://127.0.0.1:8081',// 移动端api请求地址(client-app)
-
- storeInfo: null,
- version: 'v1',
- },
- methods: {
- ...mapMutations(['login']),
- getStoreInfo() {
- //更新登陆状态
- return uni.getStorageSync('storeInfo') || ''
- },
- },
-
- async onLaunch(options) {
- let storeInfo = this.getStoreInfo();
- if (storeInfo.storeId) {
- this.login(storeInfo);
- this.globalData.storeInfo = storeInfo
- } else {
- uni.redirectTo({
- url: '/pages/login/login'
- })
- }
- },
- onLoad() {
- },
- onShow: function() {
- },
- onHide: function() {
- },
- }
- </script>
- <style lang='scss'>
- @import "@/uni_modules/uview-ui/index.scss";
- /*
- 全局公共样式和字体图标
- */
-
- @font-face {
- font-family: iconfont;
- font-weight: normal;
- font-style: normal;
- src: url('@/static/iconfont.ttf') format('truetype');
- }
- .iconfont {
- font-family: "iconfont" !important;
- font-size: 16px;
- font-style: normal;
- -webkit-font-smoothing: antialiased;
- -moz-osx-font-smoothing: grayscale;
- }
-
- .icon-fenlei:before {
- content: "\e653";
- }
-
- .icon-23gaojingguize:before {
- content: "\e6a6";
- }
-
- .icon-gengxin:before {
- content: "\e7cb";
- }
-
- .icon-kefu:before {
- content: "\e625";
- }
-
- .icon-yinxingqia3:before {
- content: "\e657";
- }
-
- .icon-weibiaoti--:before {
- content: "\e60f";
- }
-
- .icon-suoxiao:before {
- content: "\e7de";
- }
-
- .icon-xuanzhuan:before {
- content: "\e630";
- }
-
- .icon-add:before {
- content: "\e600";
- }
-
- .icon-fangda2:before {
- content: "\e63f";
- }
-
- .icon-c_icon3:before {
- content: "\e603";
- }
-
- .icon-fensi:before {
- content: "\e74e";
- }
-
- .icon-guanzhu:before {
- content: "\e610";
- }
-
- .icon-shezhi:before {
- content: "\e601";
- }
-
- .icon-daifahuo:before {
- content: "\e61a";
- }
-
- .icon-daipingjia1:before {
- content: "\e635";
- }
-
- .icon-tuikuan:before {
- content: "\e608";
- }
-
- .icon-daishouhuo:before {
- content: "\e661";
- }
-
- .icon-daifukuan2:before {
- content: "\e82f";
- }
-
- .icon-jia:before {
- content: "\e60b";
- }
-
- .icon-jian:before {
- content: "\e647";
- }
-
- .icon-liangdu:before {
- content: "\e71b";
- }
-
- .icon-liangdu1:before {
- content: "\e618";
- }
-
- .icon-shouhuodizhi:before {
- content: "\e64e";
- }
-
- .icon-weixinzhifu:before {
- content: "\e606";
- }
-
- .icon-you:before {
- content: "\e642";
- }
-
- .icon-xuanze:before {
- content: "\e640";
- }
-
- .icon-xuanze1:before {
- content: "\e621";
- }
-
- .icon-2xuanzhong:before {
- content: "\e605";
- }
-
- .icon-pinpai:before {
- content: "\e602";
- }
-
- .icon-shouji:before {
- content: "\e6a1";
- }
-
- .icon-dizhi:before {
- content: "\e769";
- }
-
- .icon-huati:before {
- content: "\e8c4";
- }
-
- .icon-yue:before {
- content: "\e69d";
- }
-
- .icon-tuijianren:before {
- content: "\e641";
- }
- view,
- scroll-view,
- swiper,
- swiper-item,
- cover-view,
- cover-image,
- icon,
- text,
- rich-text,
- progress,
- button,
- checkbox,
- form,
- input,
- label,
- radio,
- slider,
- switch,
- textarea,
- navigator,
- audio,
- camera,
- image,
- video {
- box-sizing: border-box;
- }
- /* 骨架屏替代方案 */
- .Skeleton {
- background: #f3f3f3;
- padding: 20upx 0;
- border-radius: 8upx;
- }
- /* 图片载入替代方案 */
- .image-wrapper {
- font-size: 0;
- background: #f3f3f3;
- border-radius: 4px;
- }
- .clamp {
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- display: block;
- }
- .common-hover {
- background: #f5f5f5;
- }
- /*边框*/
- .b-b:after,
- .b-t:after {
- position: absolute;
- z-index: 3;
- left: 0;
- right: 0;
- height: 0;
- content: '';
- transform: scaleY(.5);
- border-bottom: 1px solid $border-color-base;
- }
- .b-b:after {
- bottom: 0;
- }
- .b-t:after {
- top: 0;
- }
- /* button样式改写 */
- uni-button,
- button {
- font-size: $font-lg + 2upx;
- font-weight: normal;
- background: #fff;
- &.no-border:before,
- &.no-border:after {
- border: none;
- }
- }
- button::after {
- border: none;
- }
- uni-button[type=default],
- button[type=default] {
- color: $font-color-dark;
- }
- /* 立即购买样式 */
- .buyButton {
- position: absolute;
- right: 20upx;
- bottom: 20upx;
- height: 40upx;
- line-height: 40upx;
- font-size: 28upx;
- background: $uni-color-button;
- color: #fff;
- padding: 4upx 10upx;
- height: auto;
- border: none;
- }
- /* 返利样式 */
- .rebate {
- color: $uni-color-word;
- font-size: 30rpx;
- white-space: nowrap;
- padding: 0 4rpx;
- margin: 0 20upx;
- border-radius: 10rpx;
- }
- /* 已售样式 */
- .sold {
- color: gray;
- font-size: 20rpx;
- white-space: nowrap;
- padding: 0 4rpx;
- border-radius: 10rpx;
- }
- /* 优惠样式 */
- .discount {
- padding: 4upx 10upx;
- border: 1px solid #d23540;
- color: #d23540;
- border-radius: 10upx;
- font-size: 24upx;
- display: inline;
- float: left;
- display: inline-block !important;
- }
- /* input 样式 */
- .input-placeholder {
- color: #999999;
- }
- .placeholder {
- color: #999999;
- }
- /* 居中 */
- .center {
- display: flex;
- justify-content: center;
- align-items: center;
- }
- /* 垂直居中 */
- .column {
- display: flex;
- flex-direction: column;
- align-items: center;
- }
- .between {
- display: flex;
- justify-content: space-between;
- align-items: center;
- }
- .onelines {
- overflow: hidden;
- white-space: nowrap;
- text-overflow: ellipsis;
- }
- /* 最多显示两行超出显示点点点 */
- .twolines {
- text-overflow: -o-ellipsis-lastline;
- overflow: hidden;
- text-overflow: ellipsis;
- display: -webkit-box;
- -webkit-line-clamp: 2;
- -webkit-box-orient: vertical;
- }
- .activityLogo {
- position: absolute;
- top: 0;
- right: 0;
- width: 100upx;
- height: auto;
- }
- .sellLogo {
- position: absolute;
- top: 0;
- left: 0;
- width: 100upx;
- height: auto;
- }
- /* ios底部安全距离-padding */
- .savepadding {
- padding-bottom: constant(safe-area-inset-bottom);
- padding-bottom: env(safe-area-inset-bottom);
- box-sizing: content-box;
- }
- /* ios底部安全距离-bottom */
- .savebottom {
- bottom: constant(safe-area-inset-bottom);
- bottom: env(safe-area-inset-bottom);
- }
- .column-cen {
- display: flex;
- justify-content: center;
- flex-direction: column;
- align-items: center;
- }
- .zanwu {
- padding-top: 300upx;
- color: #cdcdcd;
-
- image{
- margin-bottom: 40upx;
- }
- }
-
-
- </style>
|