作者 韩昌

修改logo,修改上传域名

... ... @@ -14,7 +14,7 @@
</view>
<view class="price flexA" v-else>
<view class="new">¥{{ info.spec[0].goods_price }}</view>
<text v-if="info.goodstatus == 2">¥{{ info.spec[0].line_price }}</text>
<text v-if="[2,1].includes(info.goodstatus)">¥{{ info.spec[0].line_price }}</text>
</view>
<!-- 1=普通商品,2=特价商品,3=积分商品 -->
<view class="inventory">{{ info.goodstatus == 1 ? '已售:' : info.goodstatus == 2 ? '库存:' : '已兑:' }}{{ info.goodstatus != 2 ? info.sales_actual : info.spec[0].stock_num }}份</view>
... ...
... ... @@ -18,7 +18,7 @@
{{ item.coscore }}
</view>
<view v-if="shopWidth == 344 && !isTejia" class="sold">{{ pointShop ? '已兑换:' : '已售:' }}{{ item.sales_actual }}份</view>
<view v-if="shopHeight == 322 || isTejia" class="sold">库存:{{ item.stock_num }}件</view>
<view v-if="(shopHeight == 322 || isTejia) && item.stock_num" class="sold">库存:{{ item.stock_num }}件</view>
</view>
</view>
</view>
... ...
... ... @@ -28,13 +28,13 @@ let data = reactive({
firstClass: [], //一级分类
titleList: [] //二级分类名称
})
onShow(() => {
onLoad(() => {
getClassifications()
})
onHide(() => {
console.log(11222)
uni.removeStorage({ key: 'classId' })
data.cur = 0
// data.cur = 0
})
// 左边一级分类点击
const bindToView = (item, index) => {
... ...
... ... @@ -52,7 +52,7 @@
</view>
<!-- 推荐商品 -->
<view class="recomBox">
<shops :list="data.recommendList" :shopWidth="344" :shopHeight="344"></shops>
<shops :list="data.recommendList" :shopWidth="344" :shopHeight="344" :isTejia="true"></shops>
</view>
</view>
</template>
... ...
... ... @@ -333,7 +333,7 @@ const getShopDetailes = async id => {
background: linear-gradient(139deg, #fb753cff 0%, #fb3e3cff 100%);
}
}
img {
image {
width: 100% !important;
height: 100% !important;
}
... ...
... ... @@ -5,8 +5,11 @@
<image src="/static/indexIc/loginBg.png" mode=""></image>
</view>
<view class="logo flexC">
<image src="/static/indexIc/logo.png" mode=""></image>
<image src="/static/indexIc/lo.jpg" mode=""></image>
</view>
<!-- <view class="inputBox flexC">
<input type="text" placeholder="请输入微信号码">
</view> -->
<view class="btnBox flexC" @click="login" v-if="!agreeStatus">
<image src="/static/indexIc/loginBtn.png" mode=""></image>
微信账号一键登录
... ... @@ -37,6 +40,8 @@ import { onShow, onLoad } from '@dcloudio/uni-app'
import { getLogin } from '@/api/'
const agreeStatus = ref(false) //是否勾选协议
const code = ref('') //登录参数code
const value = ref('')
onLoad(() => {
// this.statusBarHeight = uni.getSystemInfoSync().statusBarHeight //'状态栏的高度'
if (uni.getStorageSync('token')) {
... ... @@ -84,7 +89,8 @@ const getLogins = async (data, iv) => {
let params = {
code: code.value, //string 是 code-wx.login的code
encryptedData: data, //string 是 encryptedData
iv: iv //string 是 iv
iv: iv, //string 是 iv
wxCode: value.value // 微信号
}
const res = await getLogin(params)
uni.setStorageSync('token', res.token)
... ... @@ -102,7 +108,7 @@ const toRichText = e => {
url: `/pages/index/richText?type=${e}`
})
}
// // 勾选协议
// 勾选协议
const agree = () => {
agreeStatus.value = !agreeStatus.value
}
... ... @@ -131,11 +137,12 @@ const agree = () => {
image {
width: 156rpx;
height: 158rpx;
border-radius: 50%;
}
}
.btnBox {
margin: 292rpx auto 60rpx;
margin: 202rpx auto 60rpx;
width: 646rpx;
height: 88rpx;
border-radius: 44rpx;
... ... @@ -168,8 +175,6 @@ const agree = () => {
}
.agreeBox {
margin-top: 502rpx;
.checkImage {
margin: 8rpx 8rpx 0 0;
... ... @@ -184,4 +189,17 @@ const agree = () => {
font-size: 24rpx;
}
}
.inputBox {
width: 686rpx;
height: 158rpx;
z-index: 999999 !important;
position: relative;
/* margin: 202rpx auto 0; */
input {
background: #fff;
border-radius: 20rpx;
box-sizing: border-box;
padding: 0 20rpx;
}
}
</style>
... ...
... ... @@ -53,7 +53,7 @@ onLoad(e => {
// 上传图片
const addPhoto = () =>
proxy.$methods.upload('http://health.shs.broing.cn/api/common/upload', imgUrl => {
proxy.$methods.upload('https://dajiankang.y.broing.cn/api/common/upload', imgUrl => {
console.log('返回图片', imgUrl)
imgList.value.push(imgUrl.upImg)
photoList.push(imgUrl.avatar)
... ...

4.0 KB | 宽: | 高:

1.7 KB | 宽: | 高:

  • 两方对比
  • 交换覆盖
  • 透明覆盖
"use strict";const t=require("../common/vendor.js"),e={__name:"shopInfo",props:{isPoints:{type:Boolean,default:!1},info:{type:Object,default:{}}},setup(o){return t.onMounted(()=>{}),(s,i)=>t.e({a:t.t(o.info.name),b:o.info.goodstatus===1},o.info.goodstatus===1?{c:t.t(o.info.spec[0].score)}:{},{d:o.info.goodstatus==3},o.info.goodstatus==3?{e:t.t(o.info.spec[0].coscore)}:t.e({f:t.t(o.info.spec[0].goods_price),g:o.info.goodstatus==2},o.info.goodstatus==2?{h:t.t(o.info.spec[0].line_price)}:{}),{i:t.t(o.info.goodstatus==1?"已售:":o.info.goodstatus==2?"库存:":"已兑:"),j:t.t(o.info.goodstatus!=2?o.info.sales_actual:o.info.spec[0].stock_num)})}},n=t._export_sfc(e,[["__file","D:/vue/大健康商城/healthMall/componets/shopInfo.vue"]]);wx.createComponent(n);
"use strict";const t=require("../common/vendor.js"),e={__name:"shopInfo",props:{isPoints:{type:Boolean,default:!1},info:{type:Object,default:{}}},setup(o){return t.onMounted(()=>{}),(s,i)=>t.e({a:t.t(o.info.name),b:o.info.goodstatus===1},o.info.goodstatus===1?{c:t.t(o.info.spec[0].score)}:{},{d:o.info.goodstatus==3},o.info.goodstatus==3?{e:t.t(o.info.spec[0].coscore)}:t.e({f:t.t(o.info.spec[0].goods_price),g:[2,1].includes(o.info.goodstatus)},[2,1].includes(o.info.goodstatus)?{h:t.t(o.info.spec[0].line_price)}:{}),{i:t.t(o.info.goodstatus==1?"已售:":o.info.goodstatus==2?"库存:":"已兑:"),j:t.t(o.info.goodstatus!=2?o.info.sales_actual:o.info.spec[0].stock_num)})}},n=t._export_sfc(e,[["__file","D:/vue/大健康商城/healthMall/componets/shopInfo.vue"]]);wx.createComponent(n);
... ...
"use strict";const e=require("../common/vendor.js"),l={__name:"shops",props:{shopWidth:{type:Number,default:322},shopHeight:{type:Number,default:344},pointShop:{type:Boolean,default:!1},list:{type:Array,default:[]},isClass:Boolean,isTejia:{type:Boolean,default:!1}},setup(t){const a=t;e.useCssVars(i=>({"5e4b6e14":o.value,"5e592e04":n.value}));const o=e.ref(a.shopWidth+"rpx"),n=e.ref(a.shopHeight+"rpx");e.onMounted(()=>{});const h=i=>{e.index.navigateTo({url:`/pages/index/shopDetaile?id=${i}`})};return console.log(1),(i,d)=>({a:e.f(t.list,(s,u,f)=>e.e({a:s.image,b:e.t(s.name),c:e.t(s.describe)},t.pointShop?{i:e.t(s.coscore)}:e.e({d:e.t(s.goods_price||s.spprice),e:t.shopHeight==322||t.isTejia},t.shopHeight==322||t.isTejia?{f:e.t(s.line_price)}:{},{g:t.isClass},t.isClass?{h:e.t(s.spyprice)}:{}),t.shopWidth==344&&!t.isTejia?{j:e.t(t.pointShop?"已兑换:":"已售:"),k:e.t(s.sales_actual)}:{},t.shopHeight==322||t.isTejia?{l:e.t(s.stock_num)}:{},{m:s.id,n:e.o(g=>h(s.id),s.id)})),b:!t.pointShop,c:t.shopWidth==344&&!t.isTejia,d:t.shopHeight==322||t.isTejia,e:e.s(i.__cssVars())})}},c=e._export_sfc(l,[["__file","D:/vue/大健康商城/healthMall/componets/shops.vue"]]);wx.createComponent(c);
"use strict";const e=require("../common/vendor.js"),c={__name:"shops",props:{shopWidth:{type:Number,default:322},shopHeight:{type:Number,default:344},pointShop:{type:Boolean,default:!1},list:{type:Array,default:[]},isClass:Boolean,isTejia:{type:Boolean,default:!1}},setup(s){const a=s;e.useCssVars(o=>({"5e4b6e14":i.value,"5e592e04":n.value}));const i=e.ref(a.shopWidth+"rpx"),n=e.ref(a.shopHeight+"rpx");e.onMounted(()=>{});const h=o=>{e.index.navigateTo({url:`/pages/index/shopDetaile?id=${o}`})};return console.log(1),(o,u)=>({a:e.f(s.list,(t,d,f)=>e.e({a:t.image,b:e.t(t.name),c:e.t(t.describe)},s.pointShop?{i:e.t(t.coscore)}:e.e({d:e.t(t.goods_price||t.spprice),e:s.shopHeight==322||s.isTejia},s.shopHeight==322||s.isTejia?{f:e.t(t.line_price)}:{},{g:s.isClass},s.isClass?{h:e.t(t.spyprice)}:{}),s.shopWidth==344&&!s.isTejia?{j:e.t(s.pointShop?"已兑换:":"已售:"),k:e.t(t.sales_actual)}:{},{l:(s.shopHeight==322||s.isTejia)&&t.stock_num},(s.shopHeight==322||s.isTejia)&&t.stock_num?{m:e.t(t.stock_num)}:{},{n:t.id,o:e.o(g=>h(t.id),t.id)})),b:!s.pointShop,c:s.shopWidth==344&&!s.isTejia,d:e.s(o.__cssVars())})}},l=e._export_sfc(c,[["__file","D:/vue/大健康商城/healthMall/componets/shops.vue"]]);wx.createComponent(l);
... ...
<view class="flexW" style="{{e}}"><view wx:for="{{a}}" wx:for-item="item" wx:key="m" class="shopBox" bindtap="{{item.n}}"><view class="shopPhoto"><image src="{{item.a}}" mode=""></image></view><view class="btomBox"><view class="shopName ellipsis">{{item.b}}</view><view class="desc ellipsis">{{item.c}}</view><view wx:if="{{b}}" class="shopPrice flexA"><view class="new">¥{{item.d}}</view><view wx:if="{{item.e}}" class="original">¥{{item.f}}</view><view wx:if="{{item.g}}" class="original">¥{{item.h}}</view></view><view wx:else class="points"><image src="/static/shopCarIc/pointsIc.png" mode=""></image> {{item.i}}</view><view wx:if="{{c}}" class="sold">{{item.j}}{{item.k}}份</view><view wx:if="{{d}}" class="sold">库存:{{item.l}}件</view></view></view></view>
\ No newline at end of file
<view class="flexW" style="{{d}}"><view wx:for="{{a}}" wx:for-item="item" wx:key="n" class="shopBox" bindtap="{{item.o}}"><view class="shopPhoto"><image src="{{item.a}}" mode=""></image></view><view class="btomBox"><view class="shopName ellipsis">{{item.b}}</view><view class="desc ellipsis">{{item.c}}</view><view wx:if="{{b}}" class="shopPrice flexA"><view class="new">¥{{item.d}}</view><view wx:if="{{item.e}}" class="original">¥{{item.f}}</view><view wx:if="{{item.g}}" class="original">¥{{item.h}}</view></view><view wx:else class="points"><image src="/static/shopCarIc/pointsIc.png" mode=""></image> {{item.i}}</view><view wx:if="{{c}}" class="sold">{{item.j}}{{item.k}}份</view><view wx:if="{{item.l}}" class="sold">库存:{{item.m}}件</view></view></view></view>
\ No newline at end of file
... ...
"use strict";const e=require("../../common/vendor.js"),u=require("../../api/index.js");require("../../utils/request.js");const f={__name:"class",setup(_){let t=e.reactive({cur:0,firstClass:[],titleList:[]});e.onShow(()=>{o()}),e.onHide(()=>{console.log(11222),e.index.removeStorage({key:"classId"}),t.cur=0});const c=(s,a)=>{t.cur=s.id,t.titleList=s.two},o=async()=>{try{const s=await u.getTwoClassification();console.log(s,"三级分类"),t.cur=e.index.getStorageSync("classId")||0,t.firstClass=s,t.cur===0?(t.cur=s[0].id,t.titleList=s[0].two):t.titleList=s.find(a=>a.id===t.cur).two,console.log("getClassification",s)}catch(s){e.index.showToast({title:s,icon:"none"}),console.log("getClassification",s)}},r=s=>e.index.navigateTo({url:`/pages/class/classList?pid=${s}`});return(s,a)=>({a:e.f(e.unref(t).firstClass,(i,l,d)=>({a:e.t(i.name),b:e.n(e.unref(t).cur==i.id?"check":""),c:i.id,d:e.o(n=>c(i),i.id)})),b:e.f(e.unref(t).titleList,(i,l,d)=>({a:e.t(i.name),b:e.f(i.three,(n,x,h)=>({a:n.image_text,b:e.t(n.name),c:n.id,d:e.o(w=>r(n.id),n.id)}))}))})}},g=e._export_sfc(f,[["__file","D:/vue/大健康商城/healthMall/pages/class/class.vue"]]);wx.createPage(g);
"use strict";const e=require("../../common/vendor.js"),u=require("../../api/index.js");require("../../utils/request.js");const f={__name:"class",setup(_){let t=e.reactive({cur:0,firstClass:[],titleList:[]});e.onLoad(()=>{c()}),e.onHide(()=>{console.log(11222),e.index.removeStorage({key:"classId"})});const o=(s,n)=>{t.cur=s.id,t.titleList=s.two},c=async()=>{try{const s=await u.getTwoClassification();console.log(s,"三级分类"),t.cur=e.index.getStorageSync("classId")||0,t.firstClass=s,t.cur===0?(t.cur=s[0].id,t.titleList=s[0].two):t.titleList=s.find(n=>n.id===t.cur).two,console.log("getClassification",s)}catch(s){e.index.showToast({title:s,icon:"none"}),console.log("getClassification",s)}},r=s=>e.index.navigateTo({url:`/pages/class/classList?pid=${s}`});return(s,n)=>({a:e.f(e.unref(t).firstClass,(i,l,d)=>({a:e.t(i.name),b:e.n(e.unref(t).cur==i.id?"check":""),c:i.id,d:e.o(a=>o(i),i.id)})),b:e.f(e.unref(t).titleList,(i,l,d)=>({a:e.t(i.name),b:e.f(i.three,(a,x,h)=>({a:a.image_text,b:e.t(a.name),c:a.id,d:e.o(p=>r(a.id),a.id)}))}))})}},g=e._export_sfc(f,[["__file","D:/vue/大健康商城/healthMall/pages/class/class.vue"]]);wx.createPage(g);
... ...
"use strict";const e=require("../../common/vendor.js"),c=require("../../api/index.js");require("../../utils/request.js");Array||e.resolveComponent("u-navbar")();const p=()=>"../../uni_modules/uview-plus/components/u-navbar/u-navbar.js";Math||(p+m+_)();const m=()=>"../../componets/searchBox.js",_=()=>"../../componets/shops.js",h={__name:"index",setup(r){const t=e.ref(1),o=e.ref(1);e.onShow(()=>{o.value=1,a.recommendList.splice(0),g()});const i=()=>{e.index.navigateTo({url:"/pages/mine/recharge"})};let a=e.reactive({classList:[],specialList:[],recommendList:[]});const l=s=>{e.index.setStorageSync("classId",s.id),e.index.switchTab({url:"/pages/class/class"})},d=()=>e.index.switchTab({url:"/pages/class/class"}),u=()=>e.index.navigateTo({url:"/pages/index/bargainPrice"}),g=async()=>{try{const s=await c.getIndex({page:o.value});a.classList=s.fenlei,a.specialList=s.tjgoods,a.recommendList=a.recommendList.concat(s.goods.data),console.log(a.recommendList,"推荐商品"),console.log("getIndex",s),t.value=s.goods.last_page}catch(s){e.index.showToast({title:s,icon:"none"}),console.log("getIndex",s)}};return e.onReachBottom(()=>{o.value++,!(o.value>=t.value)&&c.getIndex()}),(s,x)=>({a:e.p({bgColor:"transparent"}),b:e.o(i),c:e.f(e.unref(a).classList,(n,f,b)=>({a:n.image,b:e.t(n.name),c:n.id,d:e.o(L=>l(n),n.id)})),d:e.o(d),e:e.o(u),f:e.p({list:e.unref(a).specialList.slice(0,2),shopWidth:322,shopHeight:322,isTejia:!0}),g:e.p({list:e.unref(a).recommendList,shopWidth:344,shopHeight:344})})}},v=e._export_sfc(h,[["__file","D:/vue/大健康商城/healthMall/pages/index/index.vue"]]);wx.createPage(v);
"use strict";const e=require("../../common/vendor.js"),c=require("../../api/index.js");require("../../utils/request.js");Array||e.resolveComponent("u-navbar")();const p=()=>"../../uni_modules/uview-plus/components/u-navbar/u-navbar.js";Math||(p+m+_)();const m=()=>"../../componets/searchBox.js",_=()=>"../../componets/shops.js",h={__name:"index",setup(r){const t=e.ref(1),o=e.ref(1);e.onShow(()=>{o.value=1,a.recommendList.splice(0),g()});const i=()=>{e.index.navigateTo({url:"/pages/mine/recharge"})};let a=e.reactive({classList:[],specialList:[],recommendList:[]});const l=s=>{e.index.setStorageSync("classId",s.id),e.index.switchTab({url:"/pages/class/class"})},d=()=>e.index.switchTab({url:"/pages/class/class"}),u=()=>e.index.navigateTo({url:"/pages/index/bargainPrice"}),g=async()=>{try{const s=await c.getIndex({page:o.value});a.classList=s.fenlei,a.specialList=s.tjgoods,a.recommendList=a.recommendList.concat(s.goods.data),console.log(a.recommendList,"推荐商品"),console.log("getIndex",s),t.value=s.goods.last_page}catch(s){e.index.showToast({title:s,icon:"none"}),console.log("getIndex",s)}};return e.onReachBottom(()=>{o.value++,!(o.value>=t.value)&&c.getIndex()}),(s,x)=>({a:e.p({bgColor:"transparent"}),b:e.o(i),c:e.f(e.unref(a).classList,(n,f,b)=>({a:n.image,b:e.t(n.name),c:n.id,d:e.o(L=>l(n),n.id)})),d:e.o(d),e:e.o(u),f:e.p({list:e.unref(a).specialList.slice(0,2),shopWidth:322,shopHeight:322,isTejia:!0}),g:e.p({list:e.unref(a).recommendList,shopWidth:344,shopHeight:344,isTejia:!0})})}},v=e._export_sfc(h,[["__file","D:/vue/大健康商城/healthMall/pages/index/index.vue"]]);wx.createPage(v);
... ...
.u-nav-slot image{width:48rpx;height:48rpx}.indicator-num{padding:2px 0;background-color:rgba(0,0,0,.35);border-radius:100px;width:35px;display:flex;flex-direction:row;justify-content:center}.indicator-num__text{color:#fff;font-size:12px}.swiperBox{margin-bottom:32rpx}.info{width:702rpx;margin:0 auto}.line{width:100%;height:6rpx;opacity:1;background:#f7f8faff;margin:32rpx 0}.mainBox{padding:0 24rpx}.mainBox .commentNmu{margin-bottom:40rpx}.mainBox .commentNmu text{color:#1a1a1a;font-size:28rpx;font-weight:700}.mainBox .commentNmu .see{color:#ff7534;font-size:24rpx}.mainBox .commentNmu .see image{margin-left:2rpx;width:24rpx;height:24rpx}.mainBox .commentNull{color:rgba(0,0,0,.4);font-size:26rpx;margin-bottom:212rpx}.mainBox .commentNull image{width:348rpx;height:240rpx;margin-bottom:16rpx}.titles{color:#1a1a1a;font-size:28rpx;font-weight:700}.lineBox{margin:24rpx 0 30rpx}.lineBox .lines{width:149rpx;height:1rpx;opacity:1;border:0 solid #979797ff;background:#dcdee0ff}.lineBox text{margin:0 24rpx;color:#969799;font-size:24rpx}.btnBox{position:fixed;left:0;bottom:0;width:100%;height:120rpx;background:#ffffffff}.btnBox .left{margin-left:32rpx}.btnBox .left .leftIc{margin-right:34rpx;position:relative}.btnBox .left .leftIc .images{position:relative;width:48rpx;height:48rpx;margin-bottom:8rpx}.btnBox .left .leftIc .images image{width:48rpx;height:48rpx}.btnBox .left .leftIc text{color:#323233;font-size:20rpx}.btnBox .left .leftIc button{position:absolute;bottom:0;left:0;top:0;right:0;background:transparent;font-size:20rpx;border:none!important;padding:0!important;line-height:28rpx}.btnBox .left .leftIc button:after{border:none}.btnBox .buy{margin-right:32rpx;width:200rpx;height:80rpx;border-radius:80rpx;color:#fff;font-size:24rpx;font-weight:700;background:linear-gradient(139deg,#fb753cff 0%,#fb3e3cff 100%)}.btnBox .add{margin-right:14rpx;width:200rpx;height:80rpx;border-radius:80rpx;color:#fff;font-size:24rpx;font-weight:700;background:linear-gradient(139deg,#ffac0bff 0%,#ffc24aff 100%)}.btnBox .exchange{margin-right:32rpx;width:358rpx;height:80rpx;border-radius:80rpx;color:#fff;font-size:30rpx;font-weight:700;background:linear-gradient(139deg,#fb753cff 0%,#fb3e3cff 100%)}img{width:100%!important;height:100%!important}
.u-nav-slot image{width:48rpx;height:48rpx}.indicator-num{padding:2px 0;background-color:rgba(0,0,0,.35);border-radius:100px;width:35px;display:flex;flex-direction:row;justify-content:center}.indicator-num__text{color:#fff;font-size:12px}.swiperBox{margin-bottom:32rpx}.info{width:702rpx;margin:0 auto}.line{width:100%;height:6rpx;opacity:1;background:#f7f8faff;margin:32rpx 0}.mainBox{padding:0 24rpx}.mainBox .commentNmu{margin-bottom:40rpx}.mainBox .commentNmu text{color:#1a1a1a;font-size:28rpx;font-weight:700}.mainBox .commentNmu .see{color:#ff7534;font-size:24rpx}.mainBox .commentNmu .see image{margin-left:2rpx;width:24rpx;height:24rpx}.mainBox .commentNull{color:rgba(0,0,0,.4);font-size:26rpx;margin-bottom:212rpx}.mainBox .commentNull image{width:348rpx;height:240rpx;margin-bottom:16rpx}.titles{color:#1a1a1a;font-size:28rpx;font-weight:700}.lineBox{margin:24rpx 0 30rpx}.lineBox .lines{width:149rpx;height:1rpx;opacity:1;border:0 solid #979797ff;background:#dcdee0ff}.lineBox text{margin:0 24rpx;color:#969799;font-size:24rpx}.btnBox{position:fixed;left:0;bottom:0;width:100%;height:120rpx;background:#ffffffff}.btnBox .left{margin-left:32rpx}.btnBox .left .leftIc{margin-right:34rpx;position:relative}.btnBox .left .leftIc .images{position:relative;width:48rpx;height:48rpx;margin-bottom:8rpx}.btnBox .left .leftIc .images image{width:48rpx;height:48rpx}.btnBox .left .leftIc text{color:#323233;font-size:20rpx}.btnBox .left .leftIc button{position:absolute;bottom:0;left:0;top:0;right:0;background:transparent;font-size:20rpx;border:none!important;padding:0!important;line-height:28rpx}.btnBox .left .leftIc button:after{border:none}.btnBox .buy{margin-right:32rpx;width:200rpx;height:80rpx;border-radius:80rpx;color:#fff;font-size:24rpx;font-weight:700;background:linear-gradient(139deg,#fb753cff 0%,#fb3e3cff 100%)}.btnBox .add{margin-right:14rpx;width:200rpx;height:80rpx;border-radius:80rpx;color:#fff;font-size:24rpx;font-weight:700;background:linear-gradient(139deg,#ffac0bff 0%,#ffc24aff 100%)}.btnBox .exchange{margin-right:32rpx;width:358rpx;height:80rpx;border-radius:80rpx;color:#fff;font-size:30rpx;font-weight:700;background:linear-gradient(139deg,#fb753cff 0%,#fb3e3cff 100%)}image{width:100%!important;height:100%!important}
... ...
"use strict";const e=require("../../common/vendor.js"),x=require("../../api/index.js");require("../../utils/request.js");const v={__name:"login",setup(_){const o=e.ref(!1),a=e.ref("");e.onLoad(()=>{e.index.getStorageSync("token")&&e.index.reLaunch({url:"/pages/index/index"})}),e.onShow(()=>{g()});const s=()=>{if(!o.value)return e.index.showToast({title:"请勾选协议",icon:"none"})},l=n=>{n.detail.errMsg=="getPhoneNumber:fail user deny"?e.index.showToast({title:"您已取消授权",icon:"none"}):u(n.detail.encryptedData,n.detail.iv)},g=()=>{e.index.login({provider:"weixin",success:function(n){console.log(n),a.value=n.code}})},u=async(n,c)=>{try{let t={code:a.value,encryptedData:n,iv:c};const i=await x.getLogin(t);e.index.setStorageSync("token",i.token),e.index.setStorageSync("userInfo",i),e.index.reLaunch({url:"/pages/index/index"}),console.log("getLogin",i)}catch(t){console.log("getLogin",t)}},r=n=>{e.index.navigateTo({url:`/pages/index/richText?type=${n}`})},d=()=>{o.value=!o.value};return(n,c)=>e.e({a:!o.value},o.value?{c:e.o(l)}:{b:e.o(s)},{d:!o.value},o.value?{}:{},{e:e.o(d),f:e.o(t=>r(4)),g:e.o(t=>r(5))})}},p=e._export_sfc(v,[["__file","D:/vue/大健康商城/healthMall/pages/login/login.vue"]]);wx.createPage(p);
"use strict";const e=require("../../common/vendor.js"),v=require("../../api/index.js");require("../../utils/request.js");const p={__name:"login",setup(_){const o=e.ref(!1),i=e.ref(""),s=e.ref("1213231");e.onLoad(()=>{e.index.getStorageSync("token")&&e.index.reLaunch({url:"/pages/index/index"})}),e.onShow(()=>{u()});const l=()=>{if(!o.value)return e.index.showToast({title:"请勾选协议",icon:"none"})},g=n=>{n.detail.errMsg=="getPhoneNumber:fail user deny"?e.index.showToast({title:"您已取消授权",icon:"none"}):d(n.detail.encryptedData,n.detail.iv)},u=()=>{e.index.login({provider:"weixin",success:function(n){console.log(n),i.value=n.code}})},d=async(n,c)=>{try{let t={code:i.value,encryptedData:n,iv:c,wxCode:s.value};const a=await v.getLogin(t);e.index.setStorageSync("token",a.token),e.index.setStorageSync("userInfo",a),e.index.reLaunch({url:"/pages/index/index"}),console.log("getLogin",a)}catch(t){console.log("getLogin",t)}},r=n=>{e.index.navigateTo({url:`/pages/index/richText?type=${n}`})},x=()=>{o.value=!o.value};return(n,c)=>e.e({a:!o.value},o.value?{c:e.o(g)}:{b:e.o(l)},{d:!o.value},o.value?{}:{},{e:e.o(x),f:e.o(t=>r(4)),g:e.o(t=>r(5))})}},f=e._export_sfc(p,[["__file","D:/vue/大健康商城/healthMall/pages/login/login.vue"]]);wx.createPage(f);
... ...
<view class=""><view class="bgBox"><image src="/static/indexIc/loginBg.png" mode=""></image></view><view class="logo flexC"><image src="/static/indexIc/logo.png" mode=""></image></view><view wx:if="{{a}}" class="btnBox flexC" bindtap="{{b}}"><image src="/static/indexIc/loginBtn.png" mode=""></image> 微信账号一键登录 </view><view wx:else class="btnBox flexC"><image src="/static/indexIc/loginBtn.png" mode=""></image> 微信账号一键登录 <button open-type="getPhoneNumber" bindgetphonenumber="{{c}}"></button></view><view class="agreeBox flexC"><view class="checkImage" bindtap="{{e}}"><image wx:if="{{d}}" src="/static/shopCarIc/checks.png" mode=""></image><image wx:else src="/static/shopCarIc/modeCheck.png" mode=""></image></view><view class="agree flexA"> 我已阅读并同意 <view class="" bindtap="{{f}}">《用户协议》</view> 和 <view class="" bindtap="{{g}}">《隐私协议》</view></view></view></view>
\ No newline at end of file
<view class=""><view class="bgBox"><image src="/static/indexIc/loginBg.png" mode=""></image></view><view class="logo flexC"><image src="/static/indexIc/lo.jpg" mode=""></image></view><view wx:if="{{a}}" class="btnBox flexC" bindtap="{{b}}"><image src="/static/indexIc/loginBtn.png" mode=""></image> 微信账号一键登录 </view><view wx:else class="btnBox flexC"><image src="/static/indexIc/loginBtn.png" mode=""></image> 微信账号一键登录 <button open-type="getPhoneNumber" bindgetphonenumber="{{c}}"></button></view><view class="agreeBox flexC"><view class="checkImage" bindtap="{{e}}"><image wx:if="{{d}}" src="/static/shopCarIc/checks.png" mode=""></image><image wx:else src="/static/shopCarIc/modeCheck.png" mode=""></image></view><view class="agree flexA"> 我已阅读并同意 <view class="" bindtap="{{f}}">《用户协议》</view> 和 <view class="" bindtap="{{g}}">《隐私协议》</view></view></view></view>
\ No newline at end of file
... ...
.bgBox{position:fixed;left:0;top:0;width:100%;height:100vh;z-index:-1}.bgBox image{width:100%;height:100vh}.logo{width:100%;height:158rpx;margin-top:480rpx}.logo image{width:156rpx;height:158rpx}.btnBox{margin:292rpx auto 60rpx;width:646rpx;height:88rpx;border-radius:44rpx;opacity:1;background:#fff;color:#fd7452;font-size:32rpx;font-weight:700;position:relative}.btnBox image{margin-right:12rpx;width:48rpx;height:38rpx}.btnBox button{position:absolute;background:transparent;width:100%;height:100%;color:#fd7452;font-size:32rpx;font-weight:700}.btnBox button:after{border:none}.agreeBox{margin-top:502rpx}.agreeBox .checkImage{margin:8rpx 8rpx 0 0}.agreeBox .checkImage image{width:28rpx;height:28rpx}.agreeBox .agree{color:#fff;font-size:24rpx}
.bgBox{position:fixed;left:0;top:0;width:100%;height:100vh;z-index:-1}.bgBox image{width:100%;height:100vh}.logo{width:100%;height:158rpx;margin-top:480rpx}.logo image{width:156rpx;height:158rpx;border-radius:50%}.btnBox{margin:202rpx auto 60rpx;width:646rpx;height:88rpx;border-radius:44rpx;opacity:1;background:#fff;color:#fd7452;font-size:32rpx;font-weight:700;position:relative}.btnBox image{margin-right:12rpx;width:48rpx;height:38rpx}.btnBox button{position:absolute;background:transparent;width:100%;height:100%;color:#fd7452;font-size:32rpx;font-weight:700}.btnBox button:after{border:none}.agreeBox .checkImage{margin:8rpx 8rpx 0 0}.agreeBox .checkImage image{width:28rpx;height:28rpx}.agreeBox .agree{color:#fff;font-size:24rpx}.inputBox{width:686rpx;height:158rpx;z-index:999999!important;position:relative}.inputBox input{background:#fff;border-radius:20rpx;box-sizing:border-box;padding:0 20rpx}
... ...
"use strict";const e=require("../../common/vendor.js"),g=require("../../api/index.js");require("../../utils/request.js");if(!Array){const c=e.resolveComponent("u-navbar"),s=e.resolveComponent("u-rate");(c+s)()}const f=()=>"../../uni_modules/uview-plus/components/u-navbar/u-navbar.js",b=()=>"../../uni_modules/uview-plus/components/u-rate/u-rate.js";Math||(f+b)();const C={__name:"evaluate",setup(c){const s=e.ref(5),l=e.ref(0);let n=e.reactive([]);const u=e.ref([]);let a=e.ref("");const{proxy:v}=e.getCurrentInstance(),p=()=>{h()},i=e.ref(0);e.onLoad(t=>{i.value=t.id});const _=()=>v.$methods.upload("http://health.shs.broing.cn/api/common/upload",t=>{console.log("返回图片",t),u.value.push(t.upImg),n.push(t.avatar)}),d=t=>{u.value.splice(t,1),n.splice(t,1)},h=async()=>{try{let t={id:i.value,image:u.value.join(","),content:a.value};const m=await g.getComment(t);e.index.showToast({title:"感谢您的评论~",icon:"none"}),setTimeout(()=>{e.index.navigateBack()},1e3),console.log("getComment",m)}catch(t){e.index.showToast({title:t,icon:"none"}),console.log("getComment",t)}};return(t,m)=>({a:e.p({placeholder:!0,title:"评价",bgColor:"transparent",autoBack:!0}),b:e.f(e.unref(n),(o,r,w)=>({a:o,b:e.o(x=>d(r),r),c:r})),c:e.t(5-e.unref(n).length),d:e.o(_),e:e.unref(a),f:e.o(o=>e.isRef(a)?a.value=o.detail.value:a=o.detail.value),g:e.o(o=>l.value=o),h:e.p({activeColor:"#FEA302",count:s.value,modelValue:l.value}),i:e.o(p)})}},y=e._export_sfc(C,[["__file","D:/vue/大健康商城/healthMall/pages/mine/evaluate.vue"]]);wx.createPage(y);
"use strict";const e=require("../../common/vendor.js"),h=require("../../api/index.js");require("../../utils/request.js");if(!Array){const c=e.resolveComponent("u-navbar"),s=e.resolveComponent("u-rate");(c+s)()}const f=()=>"../../uni_modules/uview-plus/components/u-navbar/u-navbar.js",b=()=>"../../uni_modules/uview-plus/components/u-rate/u-rate.js";Math||(f+b)();const C={__name:"evaluate",setup(c){const s=e.ref(5),l=e.ref(0);let n=e.reactive([]);const u=e.ref([]);let a=e.ref("");const{proxy:v}=e.getCurrentInstance(),p=()=>{g()},i=e.ref(0);e.onLoad(t=>{i.value=t.id});const _=()=>v.$methods.upload("https://dajiankang.y.broing.cn/api/common/upload",t=>{console.log("返回图片",t),u.value.push(t.upImg),n.push(t.avatar)}),d=t=>{u.value.splice(t,1),n.splice(t,1)},g=async()=>{try{let t={id:i.value,image:u.value.join(","),content:a.value};const m=await h.getComment(t);e.index.showToast({title:"感谢您的评论~",icon:"none"}),setTimeout(()=>{e.index.navigateBack()},1e3),console.log("getComment",m)}catch(t){e.index.showToast({title:t,icon:"none"}),console.log("getComment",t)}};return(t,m)=>({a:e.p({placeholder:!0,title:"评价",bgColor:"transparent",autoBack:!0}),b:e.f(e.unref(n),(o,r,w)=>({a:o,b:e.o(x=>d(r),r),c:r})),c:e.t(5-e.unref(n).length),d:e.o(_),e:e.unref(a),f:e.o(o=>e.isRef(a)?a.value=o.detail.value:a=o.detail.value),g:e.o(o=>l.value=o),h:e.p({activeColor:"#FEA302",count:s.value,modelValue:l.value}),i:e.o(p)})}},y=e._export_sfc(C,[["__file","D:/vue/大健康商城/healthMall/pages/mine/evaluate.vue"]]);wx.createPage(y);
... ...
... ... @@ -13,6 +13,13 @@
"query": "",
"launchMode": "default",
"scene": null
},
{
"name": "",
"pathName": "pages/login/login",
"query": "",
"launchMode": "default",
"scene": null
}
]
}
... ...

4.0 KB | 宽: | 高:

1.7 KB | 宽: | 高:

  • 两方对比
  • 交换覆盖
  • 透明覆盖
"use strict";const t=require("../common/vendor.js"),d="http://health.shs.broing.cn",c=a=>new Promise((o,n)=>{t.index.request({url:d+a.url,method:a.method||"GET",data:a.data||{},header:{token:t.index.getStorageSync("token")||""},success:e=>{console.log(e,t.index.getStorageSync("token")),e.data.code==1?o(e.data.data):(e.data.code==401&&(t.index.navigateTo({url:"/pages/login/login"}),t.index.clearStorageSync()),n(e.data.msg))},fail:e=>{console.log(e),n(e)}})});exports.request=c;
"use strict";const a=require("../common/vendor.js"),d="https://dajiankang.y.broing.cn",c=t=>new Promise((o,n)=>{a.index.request({url:d+t.url,method:t.method||"GET",data:t.data||{},header:{token:a.index.getStorageSync("token")||""},success:e=>{console.log(e,a.index.getStorageSync("token")),e.data.code==1?o(e.data.data):(e.data.code==401&&(a.index.navigateTo({url:"/pages/login/login"}),a.index.clearStorageSync()),n(e.data.msg))},fail:e=>{console.log(e),n(e)}})});exports.request=c;
... ...
export const baseURL = 'http://health.shs.broing.cn'
// export const baseURL = 'http://health.shs.broing.cn' // 测试
export const baseURL = 'https://dajiankang.y.broing.cn' // 线上
// http://healthmall.shs.broing.cn/api.html 接口文档
... ...